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

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