- This topic has 0 replies, 1 voice, and was last updated 3 years, 3 months ago by CatWiki.
October 11, 2017 at 4:22 pm #227CatWikiModerator
Recently I have submitted an app to the AppStore that uses Push Notifications service as well. When I submitted the app I received an email from iTunes with the following message:
” Missing Push Notification Entitlement – Your app appears to register with the Apple Push Notification service, but the app signature’s entitlements do not include the “aps-environment” entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the “aps-environment” entitlement. 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. ”
I have searched for a solution online and everything I found simply didn’t solve my problem. The solution was simpler than expected – but if you are having the same error and tried different things that didn’t solve it, check below simple steps.
1. check in your developer.apple.com account for the certificates and provisioning profiles to be set correctly and all valid
2. in your Xcode project, go on top toolbar menu to Xcode > Preferences > Accounts tab > check your certificates to be all valid (these are usually downloaded from your Apple developer account when signed-in – you would need a valid Developer + a valid Distribution certificate)
3. in your Xcode project, click on project name (folder view in the left sidebar) > click on Capabilities and turn the “Push Notifications” to ON. If there is any Red icon next to the Add Push Notifications text, this is what causes your problem
4. click on Build Settings for your project, search for “Signing” and make sure the code signing identities are set properly (I selected the Developer certificate across the Signing Identity). On Signing Style select Automatic, and on Provisioning Profile also set on Automatic.
5. also in “Signing” section of your Build Settings there is the “Code Signing Entitlement”. Make sure the value to the right is not empty. If it is empty, double-click in the right field and include the path to the .entitlements file in your project. In my case the file was generated in folder of the app project called Universal, so the path for the file had to be set to “Universal/file name.entitlements” . Go back to the Capabilities and turn Off and then On the Push Notifications – this should have solved the error.
Now you can archive your app and submit it again.
- You must be logged in to reply to this topic.