使用时xcode 8做推送通知设置,不像xcode 7,xcode 8需要推送通知功能切换开发商转(位于TARGETS -> AppName -> Capabilities如下图),

然后它将生成AppName.entitlements文件,如下所示
//AppName.entitlements
<key>aps-environment</key>
<string>development</string>
Run Code Online (Sandbox Code Playgroud)
但对于生产版App,如果我们将字符串更改为
//AppName.entitlements
<key>aps-environment</key>
<string>production</string>
Run Code Online (Sandbox Code Playgroud)
然后功能显示警告
似乎无论在aps-environment中指定了哪个字符串值,我们仍然可以获得推送设备令牌 application:didRegisterForRemoteNotificationsWithDeviceToken:
那么推送通知权利的正确设置是什么?谢谢
push-notification ios10 xcode8 unnotificationrequest xcode8-beta6