Use this guide if you have integrated the Localytics library 3.0 into your app and
are ready to upgrade to 3.1.
-
Enable background
push. Push reporting will not work well without it.
-
If you are tracking push, remove
application:didReceiveRemoteNotification: if your
application uses it and replace it with
application:didReceiveRemoteNotification:fetchCompletionHandler:.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
[Localytics handlePushNotificationOpened:userInfo];
completionHandler(UIBackgroundFetchResultNoData);
}
-
If your integration is manual, and you use
application:didReceiveRemoteNotification:fetchCompletionHandler:,
be sure to remove the following code from your application delegate's
application:didFinishLaunchingWithOptions: method.
[[LocalyticsSession shared] handleRemoteNotification:[launchOptions objectForKey:
UIApplicationLaunchOptionsRemoteNotificationKey]];