MCEInAppManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | MCEInAppManager.h MCEInAppManager.m |
+ sharedInstance
This method returns the singleton object of this class.
+ (instancetype)sharedInstance
Discussion
This method returns the singleton object of this class.
Declared In
MCEInAppManager.h
– processPayload:
The processPayload: method reads the incoming APNS payload and if it finds an “inApp” block, it adds the inApp message contained to the database.
- (void)processPayload:(NSDictionary *)payload
Parameters
payload |
The payload parameter is the incoming APNS payload. |
---|
Discussion
The processPayload: method reads the incoming APNS payload and if it finds an “inApp” block, it adds the inApp message contained to the database.
Declared In
MCEInAppManager.h
– incrementView:
The incrementView: method increments the number of views in the database for the provided message.
- (void)incrementView:(MCEInAppMessage *)inAppMessage
Parameters
inAppMessage |
The inAppMessage parameter specifies the specific message to increment. |
---|
Discussion
The incrementView: method increments the number of views in the database for the provided message.
Declared In
MCEInAppManager.h
– disable:
The disable: method removes an inAppMessage from the database.
- (void)disable:(MCEInAppMessage *)inAppMessage
Parameters
inAppMessage |
the message object to be deleted. |
---|
Discussion
The disable: method removes an inAppMessage from the database.
Declared In
MCEInAppManager.h
– executeRule:
The executeRule: method finds messages that match the specified rule keyword strings and immediately executes them.
- (void)executeRule:(NSArray *)rules
Parameters
rules |
The rules array includes rule keyword strings to look for. |
---|
Discussion
The executeRule: method finds messages that match the specified rule keyword strings and immediately executes them.
Declared In
MCEInAppManager.h
– fetchInAppMessagesForRules:completion:
The fetchInAppMessagesForRules:completion: method fetches messages from the database that match one of the provided rule keywords and executes the completion block with those messages found. It doesn’t not include messages that are expired, overviewed or not yet triggered.
- (void)fetchInAppMessagesForRules:(NSArray *)names completion:(void ( ^ ) ( NSMutableArray *inAppMessages , NSError *error ))completion
Parameters
names |
The rule names that are to be fetched. |
---|---|
completion |
The completion block is executed after the messages are looked up. It includes a list of messages or an error flag. |
Discussion
The fetchInAppMessagesForRules:completion: method fetches messages from the database that match one of the provided rule keywords and executes the completion block with those messages found. It doesn’t not include messages that are expired, overviewed or not yet triggered.
Declared In
MCEInAppManager.h