如果我的应用程序被用户强制退出,iOS会在后台启动它吗?
content-availablefetchremote-notification UIBackgroundModes
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)
(UIBackgroundFetchResult))completionHandler{
NSLog(@"Remote Notification Recieved");
UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.alertBody = @"Looks like i got a notification - fetch thingy";
[application presentLocalNotificationNow:notification];
completionHandler(UIBackgroundFetchResultNewData);}当应用程序在后台运行时,它运行得很好。
content-availabledidRecieveRemoteNotification
content-available
所以真正的问题是:
红糖糍粑
相关分类