天天看點

You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:],

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.

推送用下面這個方法時。

- (void)application:(UIApplication )application didReceiveRemoteNotification:(NSDictionary )userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler

遇到這個問題,在stockoverflow上找到了答案。

You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:],

就是在capabilites中設定一下自己背景的模式。

stockoverflow