iosxcodepush-notificationprovisioning-profileapple-developer

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:


Solution

  • 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!