I am getting an error after adding this code from parse.com:
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
if (application.applicationState == UIApplicationStateInactive) {
[PFAnalytics trackAppOpenedWithRemoteNotificationPayload:userInfo];
}
}
I don't really understand what is going on, but I am getting this warning in the log:
You've implemented -[
application:didReceiveRemoteNotification:fetchCompletionHandler:], but
you still need to add "remote-notification" to the list of your
supported UIBackgroundModes in your Info.plist.
I think adding in your plist file UIBackgroundModes - remote-notification
would fix the problem,
But when I do that, it changes the words to the follow:
Required Background Modes
-> App downloads content in response to push notifications
Which my app doesn't do, so I am confused as to why I am doing this in the first place.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…