這兩個API則不會調用的iOS 9.2應用程序在後臺運行,但是當我收到remoteNotification
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[self handleRemoteNotifications:userInfo];
[APService handleRemoteNotification:userInfo];
}
和
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
[self handleRemoteNotifications:userInfo];
[APService handleRemoteNotification:userInfo];
completionHandler(UIBackgroundFetchResultNewData);
}
我運行的應用程序與Mac連接,它的工作well.but當我沒有連接我的Mac上運行。我發現這個問題 –