远程推送通知是否需要在Info.plist中添加UIBackgroundModes? [英] Do remote push notifications require to add UIBackgroundModes in Info.plist?
问题描述
我已经集成了远程推送通知,但是我收到此警告:
I have integrated remote push notifications, but I am getting this warning:
didReceiveRemoteNotification:fetchCompletionHandler:]
,但您仍然 需要在支持的列表中添加"remote-notification
"Info.plist
中的UIBackgroundMode
s.
didReceiveRemoteNotification:fetchCompletionHandler:]
, but you still need to add "remote-notification
" to the list of your supportedUIBackgroundMode
s in yourInfo.plist
.
我的Xcode版本是8.3.1.我真的很想将此添加到Info.plist
.我也遵循了一些教程,但是他们也都没有提到.我该怎么办?
My Xcode version is 8.3.1. I really want to add this to Info.plist
. I have followed some tutorials as well but they didn't mentioned this either. What should I really do?
推荐答案
是的,您应该启用后台模式/远程通知,以便能够将远程通知用于后台更新.
Yes, you should enable Background Modes/Remote notifications to be able to use remote notifications for background updates.
最简单的方法是通过项目设置.导航到目标->您的应用->功能->后台模式,然后选中远程通知.这将自动启用所需的设置.
The easiest way to do this is via the project settings. Navigate to Targets -> Your App -> Capabilities -> Background Modes and check Remote notifications. This will automatically enable the required settings.
这篇关于远程推送通知是否需要在Info.plist中添加UIBackgroundModes?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!