CRSConnect Class Reference
#import <CRSConnect.h>
Inheritance diagram for CRSConnect:

Instance Methods |
|
(void) | - setConnectURL: |
(void) | - setSearchURL: |
(void) | - connectForCollection:withOnResponse:andOnError: |
(void) | - searchWithData:andParams:forCollection:withOnResponse:andOnError: |
Class Methods |
|
(CRSConnect *) | + sharedCRSConnect |
Returns the singleton instance of this class. More... | |
(NSString *) | + getCloudRecognitionUrl |
Used internally to obtain the url of the server for cloud recognition. More... | |
Detailed Description
The CRSConnect class is used by the SDK to connect to the CRS. It just manages the network connection and requests and forwards the responses to the SDK to be processed. This class behaviour may be overriden in order to place a proxy between the CRS API and the SDK.
Method Documentation
- (void) connectForCollection: | (NSString *) | collectionToken | |
withOnResponse: | (void(^)(id response, int statusCode)) | responseBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Creates a connection with the server using the set token. With this call, you are authenticating the application against the CraftAR service and connecting the app to a specific collection.
- Parameters
-
collectionToken CraftAR collection token. responseBlock called when a response from the server is obtained onError called when an error is produced to perform the call (eg. there's no internet connection).
- See Also
- CraftARSearchProtocol
- Note
- used to validate the collection token
- If you override this method, take into account how the CraftAR CRS API works.
+ (NSString*) getCloudRecognitionUrl |
Used internally to obtain the url of the server for cloud recognition.
- Note
- override to connect to a different server (use a proxy server)
- (void) searchWithData: | (NSData *) | imageNSData | |
andParams: | (NSDictionary *) | params | |
forCollection: | (NSString *) | collectionToken | |
withOnResponse: | (void(^)(id response, int statusCode)) | responseBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Performs a search call for an image data.
- Parameters
-
params dictionary containing options for the CRS: - bbox: NSString (true/false) (return bounding boxes, "false" by default)
- embed_tracking_data: NSString (true/false/app_id) (embed tracking data file in response, "false" by default)
- embed_custom_data: NSString (true/false) (embed custom data in resposnse, "false" by default)
responseBlock called when a response from the server is obtained onError called when an error is produced to perform the call (eg. there's no internet connection).
- Note
- If you override this method, take into account how the CraftAR CRS API works.
+ (CRSConnect *) sharedCRSConnect |
Returns the singleton instance of this class.
- Note
- used internally
The documentation for this class was generated from the following file:
- CraftARProSDK.framework/Headers/CRSConnect.h