I am new to Xcode and I’m trying to build an archive to upload to the App Store Connect, but I am getting the following error:
Provisioning profile <my_profile_name> doesn't include the Push Notifications entitlement.
My app has the push notification feature and I’m using Firebase Cloud Messaging to deliver those notifications.
What I have tried so far:
- Check the "Automatically manage signing", but Xcode fails to
provision the target. - Delete the provisioning profiles in ~/Library/MobileDevice/Provisioning Profiles and let Xcode regenerate them, but the error persists.
- Create my own Provisioning Profile on
https://developer.apple.com/. It has the push Notifications enabled
capability, but the downloaded version of it doesn’t have the
entitlement. - Add, delete and add again the push notifications
capability in the "Signing and Capabilities" tab on XCode. - Edit the entitlements file, and have created new Provisioning Profiles without any success.
3
Answers
Finnally, I have solved this error!
The problem was in the entitlements files on my project: they were generated with two entries:
The right entry for the Apple Push Notifications service is only the aps-environment, so I just deleted the Push Notifications entry and now I am able to build the archive!
Thank you all for helping me!
Try doing the following:
I’m having a similar problem as well. Spoke with someone at apple and they said a few other people had complained as well.
If I validate the app, it fails Mac App Store validation, saying application- name entitlement error. If I validate for external distribution and notarization, it works fine.
In the same week I’ve updated 3 other mac app store apps with all the same signing certificates, and everything works.
The app I’m having a persistant problem with was open when I upgraded to 12.1.lastX, and then to 12.2. My bad… that was where things got mucked up.
I’ve tried every suggestion I can find, to no avail. Will probably rebuild from the ground up, or just wait for an update to Xcode.
It’s Apple that created the problem, not me. Sometimes they ruin things.