apple-push-notifications

didReceiveRemoteNotification not called, iOS 10

天大地大妈咪最大 提交于 2019-11-25 23:16:16
问题 In iOS 9.3, the didReceiveRemoteNotification method gets called on both of the following occasions. 1) When the push notification is received 2) When the user launches the app by tapping on the notification. But on iOS 10, I notice that the didReceiveRemoteNotification method does NOT fire when the user launches the app by tapping on the notification. It\'s called only when the notification is received. Hence, I cannot do any further action after the app is launched from notification. What

Will iOS launch my app into the background if it was force-quit by the user?

笑着哭i 提交于 2019-11-25 22:24:59
问题 I am triggering a background fetch by using the content-available flag on a push notification. I have the fetch and remote-notification UIBackgroundModes enabled. Here is the implementation I am using in my AppDelegate.m: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { NSLog(@\"Remote Notification Recieved\"); UILocalNotification *notification = [