I am trying to use the BoxSearchRequestBuilder class to be able to perform a search in Box via the iOS SDK (v2). When I try to instantiate a BoxSearchRequestBuilder instance with its initializer, I get a compiler error.
What I am trying to do:
BoxSearchRequestBuilder* builder = [[BoxSearchRequestBuilder alloc] initWithSearch:@"123" queryStringParameters:@{@"content_types" : @"tags"}];
The error:
receiver 'BoxSearchRequestBuilder' for class message is a forward declaration
or receiver type 'BoxSearchRequestBuilder' for instance message is a forward declaration
.
Basically the BoxSearchRequestBuilder class is declared via a forward declaration (@BoxSearchRequestBuilder), so I cannot directly access its properties/initializers.
I can fix the error by going to the iOS SDK class BoxSearchResourceManager
and changing the forward declaration to an import statement:
#import "BoxSearchRequestBuilder.h"
//@class BoxSearchRequestBuilder;
However, I don't think I should be doing this. Are there any other alternatives? The rest of the API works fine.
Thanks for flagging this. It has been fixed thanks to your feedback in this change: https://github.com/box/box-ios-sdk-v2/commit/67064ea1f0c1aff040fba1e249b9f550281c01e2
feel free to file issues on SDK github page.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다