iOS SDK  12.0.0
 All Classes Functions Enumerations Enumerator Groups Pages
FlurryMessaging Class Reference

Inherits NSObject.

Class Methods

(void) + setDeviceToken:
 (MANUAL INTEGRATION) Enables Passing of the Device Token for the Push Notification More...
 
(void) + presentNotification:withCompletionHandler:
 (MANUAL INTEGRATION) Method to be called when a remote notfication is received More...
 
(void) + receivedNotificationResponse:withCompletionHandler:
 (MANUAL INTEGRATION) Method to be called when a action on a notfication is received from UNUserNotificationCenter. More...
 
(BOOL) + isFlurryMsg:
 Helper method which identifies a Flurry generated Push Notification. More...
 
(void) + setAutoIntegrationForMessaging
 Call this setter if you want enable AUTOMATIC INTEGRATION for Push Notificaions. More...
 
(void) + setMessagingDelegate:
 Set FlurryMessaging delegate for optional callback on push events. More...
 
(void) + setMessagingDelegate:withCallbackQueue:
 Set FlurryMessaging delegate for optional callback on push events. More...
 

Detailed Description

Definition at line 68 of file FlurryMessaging.h.

Method Documentation

+ (BOOL) isFlurryMsg: (nonnull NSDictionary *)  userInfo

Helper method which identifies a Flurry generated Push Notification.

Since
8.1.0.rc.1
-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
if(Flurry isFlurryMsg:userInfo]) {
[Flurry receivedRemoteNotification:userInfo withCompletionHandler:^{
//Load and Nibs or storyboard from here
completionHandler(UIBackgroundFetchResultNoData);
}];
}
}
+ (void) presentNotification: (nonnull UNNotification *)  notification

(MANUAL INTEGRATION) Method to be called when a remote notfication is received

Since
8.1.0.rc.1

This method logs and processes the Flurry Push Notification when received.

-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
[Flurry receivedRemoteNotification:userInfo withCompletionHandler:^{
//Load and Nibs or storyboard from here
completionHandler(UIBackgroundFetchResultNoData);
}];
}
@note The completionHandler provided by UIApplication should be called within the Flurry's completion handler.
This gives Flurry sufficient time to finish processing and not suspend the app in between. The completionHandler may be called from a background thread.

(MANUAL INTEGRATION) Method to be called when a notification is presented by the UNUserNotificationCenter when in foreground.

Since
8.1.0.rc.1

This method logs and processes the Flurry Push Notification when presented in foreground by the UNUserNotificationCenter.

- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
[Flurry presentNotification:notification withCompletionHandler:^{
completionHandler(UNNotificationPresentationOptionSound);
}];
}
@note Does not have to be implemented if the app is not targetting iOS10 or if you do not wish to use
UNUserNotificationCenter.
The completionHandler provided by UNUserNotificationCenter should be called within the Flurry's completion handler.
This gives Flurry sufficient time to finish processing and not suspend the app in between.
UNNotificationPresentationOptions - gives various options to deal with a notifcation in foreground.
+ (void) receivedNotificationResponse: (nonnull UNNotificationResponse *)  response

(MANUAL INTEGRATION) Method to be called when a action on a notfication is received from UNUserNotificationCenter.

Since
8.1.0.rc.1

This method logs and processes the Flurry Push Notification actions.

- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void (^)(void))completionHandler
{
[Flurry receivedNotificationResponse:response withCompletionHandler:^{
completionHandler();
}];
}
@note Does not have to be implemented if the app is not targetting iOS10 or if you do not wish to use
UNUserNotificationCenter.
The completionHandler provided by UNUserNotificationCenter should be called within the Flurry's completion handler.
This gives Flurry sufficient time to finish processing and not suspend the app in between. The completionHandler may be called from a background thread.
+ (void) setAutoIntegrationForMessaging

Call this setter if you want enable AUTOMATIC INTEGRATION for Push Notificaions.

Since
8.1.0.rc.1

This method takes care of all the setup for Push Notifications. 1) Registers for Notifications 2) Handles device tokens 3) Listens for callbacks from UIApplication and UNUserNotificationCenter

- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ....
}
+ (void) setDeviceToken:

(MANUAL INTEGRATION) Enables Passing of the Device Token for the Push Notification

Since
8.1.0.rc.1
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[FlurryMessaging setDeviceToken:deviceToken];
}
+ (void) setMessagingDelegate:

Set FlurryMessaging delegate for optional callback on push events.

Since
8.1.0.rc.1
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// If self implements protocol, FlurryMessagingDelegate
[Flurry setMessagingDelegate:self];
// ....
}
@note By default the callback is received on the main queue. Optionally users can choose to receive on a specific queue by using
+(void) setMessagingDelegate:(nonnull __weak id<FlurryMessagingDelegate>)delegate withCallbackQueue:(nonnull dispatch_queue_t)messagingCallbackQueue;
+ (void) setMessagingDelegate: (nonnull id< FlurryMessagingDelegate >)  delegate

Set FlurryMessaging delegate for optional callback on push events.

Since
8.4.4
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// If self implements protocol, FlurryMessagingDelegate
[Flurry setMessagingDelegate:self withCallbackQueue:queue];
// ....
}

The documentation for this class was generated from the following file: