XMMOfflineStorageTagModule Class Reference
Inherits from | NSObject |
---|---|
Declared in | XMMOfflineStorageTagModule.h XMMOfflineStorageTagModule.m |
Overview
Use the XMMOfflineStorageTagModule to have a managed way to download and delete spots and their contents. This supports to download and delete spots and contents by using the tags of the spots. The module will save what tags are saved and when you delete by tags it will check to delete only spots and contents that are save to delete.
– initWithApi:
Constructor needs a valid api to download from cloud.
- (nonnull instancetype)initWithApi:(nonnull XMMEnduserApi *)api
Parameters
api |
XMMEnduserApi instance. |
---|
Declared In
XMMOfflineStorageTagModule.h
– downloadAndSaveWithTags:downloadCompletion:completion:
This will download all spots that have the provided tags. It will also download all the connected contents and all media files used.
- (void)downloadAndSaveWithTags:(nonnull NSArray *)tags downloadCompletion:(nullable void ( ^ ) ( NSString *_Null_unspecified url , NSData *_Null_unspecified data , NSError *_Null_unspecified error ))downloadCompletion completion:(nullable void ( ^ ) ( NSArray *_Null_unspecified spots , NSError *_Null_unspecified error ))completion
Parameters
tags |
NSArray of NSString tags. |
---|---|
downloadCompletion |
Completionblock for downloaded file. |
completion |
Completionblock when all spots & contents are downloaded. |
Declared In
XMMOfflineStorageTagModule.h
– deleteSavedDataWithTags:
Delete downloaded data by tags. This will check what spots, contents and files are secure to delete (unused by other spots/contents) and deletes them.
- (nullable NSError *)deleteSavedDataWithTags:(nonnull NSArray *)tags
Parameters
tags |
Tags to delete. |
---|
Return Value
NSError Error if something goes wrong.
Declared In
XMMOfflineStorageTagModule.h