问题
So in Xcode the provision profile says that aps-environment entitlement is part of it but after Archive the provisioning profile is missing the aps-entitlement.
回答1:
The Xcode 8 release notes mention this issue:
Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. (28076333)
In general, any entitlement you intend your app to have should be in your entitlements file.
来源:https://stackoverflow.com/questions/39606938/xcode-8-says-provisioning-profile-has-aps-environment-entitlement-but-after-expo