MCECallbackDatabaseManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | MCECallbackDatabaseManager.h MCECallbackDatabaseManager.m |
Overview
The MCECallbackDatabaseManager class is used to queue callbacks in the Cordova plugin until the JavaScript callback methods are registered with the SDK.
+ sharedInstance
This method returns the singleton object of this class.
+ (instancetype)sharedInstance
Discussion
This method returns the singleton object of this class.
Declared In
MCECallbackDatabaseManager.h
– insertCallback:dictionary:
The insertCallback:dictionary: method inserts a callback into the database.
- (void)insertCallback:(NSString *)callback dictionary:(NSDictionary *)dictionary
Parameters
callback |
A name of a callback, later used to retrieve the callback |
---|---|
dictionary |
A dictionary describing the callback, must be composed of only simple types so NSJSONSerialization can serialize it |
Discussion
The insertCallback:dictionary: method inserts a callback into the database.
Declared In
MCECallbackDatabaseManager.h
– deleteCallbacksById:
The deleteCallbacksById: method removes the specified callback ids from the database.
- (void)deleteCallbacksById:(NSArray *)callbackIds
Parameters
callbackIds |
a list of ids returned by selectCallbacks:withBlock: to be removed from the database |
---|
Discussion
The deleteCallbacksById: method removes the specified callback ids from the database.
Declared In
MCECallbackDatabaseManager.h
– selectCallbacks:withBlock:
The selectCallbacks:withBlock: method returns the original callback dictionaries and a list of associated IDs.
- (void)selectCallbacks:(NSString *)callback withBlock:(void ( ^ ) ( NSArray *dictionaries , NSArray *ids ))block
Parameters
callback |
A name of the callback, used when calling insertCallback:dictionary: |
---|---|
block |
a code block to execute when callbacks are retrieved from the database |
Discussion
The selectCallbacks:withBlock: method returns the original callback dictionaries and a list of associated IDs.
Declared In
MCECallbackDatabaseManager.h