Xcode 10 Error - "Profile doesn't include the aps-environment entitlement" & "Profile doesn't support Push Notifications"

I am trying to archive my xcode app to Itunes but I get the following errors:

1.) "Profile doesn't support Push Notifications."

2.) "Profile doesn't include the aps-environment entitlement."

I don't understand why this is happening since I have my Capabilities -- Background Modes (ON) -- with Remote Notifications ON ..... AND... Push Notifications ON as well. Push Notifications ON Background Modes ON

What might be the error? How can I solve this?

Upvotes: 10

Views: 21498

Answers (3)

RKS
RKS

Reputation: 463

Just quit xcode and restart. On restart, xcode will ask you to install some additional components. Install it. And by selecting Automatically manage signin, everything worked fine.

Upvotes: 2

Nibin V
Nibin V

Reputation: 582

Probably you might have missed the push notification configuration.

  1. Goto Apple's developer site (developer.apple.com) and log in using your credential.

  2. Select the right App ID and check if you have a green indication towards the push notification service. If not click on the Edit button.

  3. Scroll all the way down until you see “Push Notifications.” and Click on Create Certificate (Development/Production)

Push Notification

  1. Now generate the CSR file as described Generating the CSR file

  2. You need to select this CSR file and click continue, Then the web page should say “Your certificate is ready.”

  3. Now you can go download your certificate and double tap to add it to your key chain.

  4. Now update your Provisioning Profiles.

  5. Also, verify that Push Notification service is enabled in Capabilities

Exporting the Certificate from Keychain

  1. Open up Keychain Access. Under the “My Certificates” category, you should see the certificate you added at step 6.

  2. Click the expand arrow to the left of the certificate’s name to reveal the private key option. Right click on the private key and press export.

  3. Once clicking Export, a pop up will prompt you to save your private key as a .p12 file. Go ahead and click save. Then enter a password if you want to protect your exported certificate. Click OK to confirm.

Upvotes: 7

Rocky
Rocky

Reputation: 3235

In order to send in-app messages to your users, you must have the following items in place:

  • Push Notifications must be enabled on your App ID.
  • Your Distribution Certificates must have been built after Push Notifications was enabled.
  • Your Provisioning Profiles must have been built after Push Notifications were enabled and uploaded to the Publish portal.
  • Your Push Notification Certificate must be uploaded to the Publish portal.

Upvotes: 10

Related Questions