Push Notification is not working on iOS 10

假如想象 提交于 2019-12-19 03:08:10

问题


After the installing the new update of iOS 10, push notifications are not working, while the same implementation of code is working for iOS 9. Is there any new thing for iOS 10 for push notification. As, I am not able figure it out. Also, is it necessary to turn on push notification under capabilities.


回答1:


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




回答2:


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>



回答3:


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

Problem



来源:https://stackoverflow.com/questions/39489182/push-notification-is-not-working-on-ios-10

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