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上找到了答案。
這裏寫圖片描述
就是在capabilites中設置一下自己後臺的模式。
stockoverflow

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章