#import <CraftARCollectionManager.h>

Instance Methods |
|
(NSArray *) | - getCollections |
(CraftAROnDeviceCollection *) | - getCollectionWithToken:andError: |
(CraftAROnDeviceCollection *) | - getCollectionWithToken:andTag:andError: |
(void) | - setCollectionSyncURL: |
(void) | - addCollectionWithToken:withOnSuccess:andOnError: |
(void) | - addCollectionWithToken:withOnProgress:andOnSuccess:andOnError: |
(void) | - addCollectionWithToken:andTag:withOnSuccess:andOnError: |
(void) | - addCollectionWithToken:andTag:withOnProgress:andOnSuccess:andOnError: |
(void) | - addCollectionFromBundle:withOnSuccess:andOnError: |
(void) | - addCollectionFromBundle:withOnProgress:andOnSuccess:andOnError: |
(void) | - deleteCollectionWithToken:andOnSuccess:andOnError: |
(void) | - deleteCollectionWithToken:andTag:andOnSuccess:andOnError: |
(void) | - deleteCollection:andOnSuccess:andOnError: |
Class Methods |
|
(CraftARCollectionManager *) | + sharedCollectionManager |
Detailed Description
The Collection Manager class allows to add collections of images to the device. The collections are in the form of a Bundle file that can be downloaded from CraftAR. A collection Bundle encapsulates the database for a given collection in CraftAR.
Method Documentation
- (void) addCollectionFromBundle: | (NSString *) | collectionBundlePath | |
withOnProgress: | (void(^)(float progress)) | progressBlock | |
andOnSuccess: | (void(^)(CraftAROnDeviceCollection *collection)) | successBlock | |
andOnError: | (void(^)(CraftARError *error)) | errorBlock | |
Add a CraftAROnDeviceCollection to the device from a collectionBundle
- Parameters
-
collectionBundlePath the path for the collectionBundle to load to the device. progressBlock Executed with the progress completion (percentage). successBlock Executed with the added collection if the process was successful. errorBlock Executed with a CraftARError if the collection could not be added.
- (void) addCollectionFromBundle: | (NSString *) | collectionBundlePath | |
withOnSuccess: | (void(^)(CraftAROnDeviceCollection *collection)) | successBlock | |
andOnError: | (void(^)(CraftARError *error)) | errorBlock | |
Add a CraftAROnDeviceCollection to the device from a collectionBundle
- Parameters
-
collectionBundlePath the path for the collectionBundle to load to the device. successBlock Executed with the added collection if the process was successful. errorBlock Executed with a CraftARError if the collection could not be added.
- (void) addCollectionWithToken: | (NSString *) | collectionToken | |
andTag: | (NSString *) | tagName | |
withOnProgress: | (void(^)(float progress)) | progressBlock | |
andOnSuccess: | (void(^)(CraftAROnDeviceCollection *collection)) | successBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Downloads a collection from the CraftAR Service and add it to the collections database. If the collection is already in the databae it will be synchronized.
- Parameters
-
collectionToken token for the On-Device IR collection to download from the CraftAR service. tag Used to define a subset of items from the collection the "default" tag (whole collection) is used if nil is passed. progressBlock Executed with the progress completion (percentage), 0-50% corresponds to bundle download, 50-100% to adding it to the local database. successBlock Executed with the added collection if the process was successful. errorBlock Executed with a CraftARError if the collection could not be added.
- (void) addCollectionWithToken: | (NSString *) | collectionToken | |
andTag: | (NSString *) | tagName | |
withOnSuccess: | (void(^)(CraftAROnDeviceCollection *collection)) | successBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Downloads a collection from the CraftAR Service and add it to the collections database. If the collection is already in the databae it will be synchronized.
- Parameters
-
collectionToken token for the On-Device IR collection to download from the CraftAR service. tag Used to define a subset of items from the collection the "default" tag (whole collection) is used if nil is passed. successBlock Executed with the added collection if the process was successful. errorBlock Executed with a CraftARError if the collection could not be added.
- (void) addCollectionWithToken: | (NSString *) | collectionToken | |
withOnProgress: | (void(^)(float progress)) | progressBlock | |
andOnSuccess: | (void(^)(CraftAROnDeviceCollection *collection)) | successBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Downloads a collection from the CraftAR Service and add it to the collections database. If the collection is already in the databae it will be synchronized.
- Parameters
-
collectionToken token for the On-Device IR collection to download from the CraftAR service. progressBlock Executed with the progress completion (percentage), 0-50% corresponds to bundle download, 50-100% to adding it to the local database. successBlock Executed with the added collection if the process was successful. errorBlock Executed with a CraftARError if the collection could not be added.
- (void) addCollectionWithToken: | (NSString *) | collectionToken | |
withOnSuccess: | (void(^)(CraftAROnDeviceCollection *collection)) | successBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Downloads a collection from the CraftAR Service and add it to the collections database. If the collection is already in the databae it will be synchronized.
- Parameters
-
collectionToken token for the On-Device IR collection to download from the CraftAR service. successBlock Executed with the added collection if the process was successful. errorBlock Executed with a CraftARError if the collection could not be added.
- (void) deleteCollection: | (CraftAROnDeviceCollection *) | collection | |
andOnSuccess: | (void(^)(void)) | successBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Remove a collection from the device
- Parameters
-
collection collection to remove. successBlock Executed when the collection is removed. errorBlock Executed with a CraftARError if the collection could not be removed.
- (void) deleteCollectionWithToken: | (NSString *) | collectionToken | |
andOnSuccess: | (void(^)(void)) | successBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Remove a collection from the device
- Parameters
-
collectionToken token for the collection to remove. successBlock Executed when the collection is removed. errorBlock Executed with a CraftARError if the collection could not be removed.
- (void) deleteCollectionWithToken: | (NSString *) | collectionToken | |
andTag: | (NSString *) | tag | |
andOnSuccess: | (void(^)(void)) | successBlock | |
andOnError: | (void(^)(NSError *error)) | errorBlock | |
Remove a collection from the device
- Parameters
-
collectionToken token for the collection to remove. tag Used to define a subset of items from the collection the "default" tag (whole collection) is used if nil is passed. successBlock Executed when the collection is removed. errorBlock Executed with a CraftARError if the collection could not be removed.
- (NSArray*) getCollections |
Returns a list with all the collections in the device
- (CraftAROnDeviceCollection*) getCollectionWithToken: | (NSString *) | collectionToken | |
andError: | (NSError **) | error | |
Returns an object representing a CraftAROnDeviceCollection from the device.
- Parameters
-
collectionToken token for the collection to obtain. error Error set when the collection could not be loaded for some reason.
- Returns
- The CraftAROnDeviceCollection with the provided token, nil if the collection is not available.
- (CraftAROnDeviceCollection*) getCollectionWithToken: | (NSString *) | collectionToken | |
andTag: | (NSString *) | tag | |
andError: | (NSError **) | error | |
Returns an object representing a CraftAROnDeviceCollection from the device.
- Parameters
-
collectionToken token for the collection to obtain. tag Used to define a subset of items from the collection the "default" tag (whole collection) is used if nil is passed. error Error set when the collection could not be loaded for some reason.
- Returns
- The CraftAROnDeviceCollection with the provided token, nil if the collection is not available.
+ (CraftARCollectionManager*) sharedCollectionManager |
Get the singleton instance of the CollectionManager
The documentation for this class was generated from the following file:
- CraftARProSDK.framework/Headers/CraftARCollectionManager.h