Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 491
Ximena Flores de la Tijera Avatar asked Feb 27 '19 23:02

Ximena Flores de la Tijera


People also ask

How do I add entitlement to provisioning profile?

To use this special entitlement you must create a new provisioning profile in the Certificates, Identifiers & Profiles section of your developer account and select the entitlement after the “Do you need additional entitlements?” page.

What is APS environment?

APS Environment (macOS) Entitlement. The environment for push notifications in macOS apps. Key: com.apple.developer.aps-environment. com.apple.developer.usernotifications.filtering. Enable receiving notifications without displaying the notification to the user.

How do I fix failed to create a provisioning profile?

3. How To Fix Xcode Failed To Create Provisioning Profile Error. To fix this error is very easy, just connect your real iOS device such as iPhone to the Mac computer with a USB line, follow the popup screen on the iPhone, then you can select your iOS device in the Set the active scheme drop down list.


2 Answers

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.
like image 59
Rocky Avatar answered Nov 15 '22 06:11

Rocky


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.

like image 36
Nibin V Avatar answered Nov 15 '22 06:11

Nibin V