With the introduction of iOS 10 and XCode 8 and there are a number of changes made for push notifications, see other support articles for more information. If you are upgrading to iOS10 note the following change to the aps-environment entitlements.
Scenario: If you upgrade to iOS 10 / Xcode 8 and push notifications don't work, check to see if there are errors from didFailToRegisterForRemoteNotificationsWithError. If you get the following error on iOS 10 but not iOS9, you will need to enable push entitlements locally.
fail to register with error Error Domain=NSCocoaErrorDomain Code=3000
"no valid 'aps-environment' entitlement string found for application"
UserInfo={NSLocalizedDescription=no valid 'aps-environment'
entitlement string found for application}
*You're probably thinking, I already enabled Push Notifications on the Apple Developer Portal for my App ID.
XCode 8 changes
With XCode 8, the entitlements are set from your local entitlements file rather than from the provisioning profile you created on the Apple Developer Portal. The entitlements will now need to be added to your Xcode build under Capabilities in addition to in your provisioning profile.
Comments
0 comments
Please sign in to leave a comment.