barduchi
barduchi

Reputation: 81

Error in Xcode 12.2: Provisioning profile doesn't include the push notifications entitlement

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:

Upvotes: 2

Views: 5270

Answers (4)

PKo
PKo

Reputation: 978

In my case the solution was to go to the Apple Developer site and accept updated agreements. After that, Xcode was able to sign the packages as normally.

Upvotes: 0

barduchi
barduchi

Reputation: 81

Finnally, I have solved this error!

The problem was in the entitlements files on my project: they were generated with two entries:

  1. Push Notifications with the boolean value 1;
  2. aps-environment with the string value 'production'.

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!

Upvotes: 5

C.Carlson
C.Carlson

Reputation: 491

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.

Upvotes: 0

rockdaswift
rockdaswift

Reputation: 9983

Try doing the following:

  • Select your app target in project targets.
  • Click on the signing & Capabilities tab.
  • Click + Capability and add the push notifications capability.

Upvotes: 0

Related Questions