Push Notification is not working on iOS 10

我怕爱的太早我们不能终老 提交于 2019-11-30 20:29:04
Ashish Shah

Need some changes for iOS 10 with xCode 8 GM You need to implement UserNotification.framework and their delegate methods to get work of push notifications and in capabilities needs to enable Push Notifications.

You have to import new UserNotification.framework. Please follow this link : Push notification issue with iOS 10

Enabling the push notifications capabilities were not required as part of Xcode 7. This is now required in Xcode 8. By enabling push notifications capabilities in Xcode 8, it'll add the following changes:

project.pbxproj

com.apple.Push = {
    enabled = 1;
};

*.entitlements (for development)

<key>aps-environment</key>
<string>*development*</string>

*.entitlements (for enterprise and production)

<key>aps-environment</key>
<string>*production*</string>

On iOS 10 is necessary add the Push Notifications entitlement, so if you "Fix Issue" the problem will be resolved automatically.

Problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!