Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

iOS app is rejected because the aps-environment entitlement is missing

Errorthe aps-environment entitlement is missing from the app's signature

Short answer

The app uses push notifications, but its code signature does not claim the aps-environment entitlement, or the provisioning profile does not allow it. Read the entitlements of the built app, then add the Push Notifications capability, enable push for the App ID, and regenerate the profile.

  • Applies to Xcode 26, iOS 26
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Print the entitlements that are really in the built app. The result tells you whether the problem is in the target (nothing printed for aps-environment) or in the profile (the key is there, but signing or upload still fails).

    codesign --display --entitlements - --xml MyApp.app | plutil -convert xml1 -o - -
  2. 2Match what you see, then jump to its fix

    1. 1The command above prints no aps-environment keyThe target never had the Push Notifications capabilityFix
    2. 2The capability is in the target, but nobody ticked Push Notifications on the App ID itselfPush notifications are not enabled for the App ID in the developer accountFix
    3. 3The App ID has push enabled and the target has the capability, but the profile you sign with was made before thatThe provisioning profile is older than the capability and does not allow the entitlementFix

What does the error look like?

  • the aps-environment entitlement is missing from the app's signature
  • didFailToRegisterForRemoteNotificationsWithError is called and no device token arrives

Cause 1 of 3

The target never had the Push Notifications capability

1Check

Apple says you add the entitlements an app needs for push by enabling the Push Notifications capability in the Xcode project. Without it, nothing writes aps-environment into the signature.

codesign --display --entitlements - --xml MyApp.app | plutil -convert xml1 -o - - | grep -A1 "aps-environment"

2Fix

Open the app target, go to Signing & Capabilities, and add Push Notifications. On a macOS target the same capability adds a different key, com.apple.developer.aps-environment.

# Xcode: target > Signing & Capabilities > + Capability > Push Notifications

3Verify

Build again and print the entitlements: the key aps-environment is now there.

codesign --display --entitlements - --xml MyApp.app | plutil -convert xml1 -o - - | grep -A1 "aps-environment"

Confirmed by developer.apple.com

Did this fix it?

Cause 2 of 3

Push notifications are not enabled for the App ID in the developer account

1Check

Apple's registration guide says that, besides the capability in Xcode, you must enable the push notification service for the App ID assigned to your project in your developer account.

# developer.apple.com > Account > Certificates, Identifiers & Profiles > Identifiers > your App ID

2Fix

Edit the App ID, tick Push Notifications, and save. Confirm the warning dialog if one appears.

# Identifiers > select the App ID > Edit
# tick Push Notifications > Save (Confirm if asked)

3Verify

Regenerate the profile (next cause), build again, and check that the signature contains aps-environment.

codesign --display --entitlements - --xml MyApp.app | plutil -convert xml1 -o - - | grep -A1 "aps-environment"

Confirmed by developer.apple.com

Did this fix it?

Cause 3 of 3

The provisioning profile is older than the capability and does not allow the entitlement

1Check

A profile works as an allowlist: every entitlement the app claims must also be in the profile. Apple says profiles that contain a modified App ID become invalid. Open the profile and look for aps-environment in its Entitlements.

security cms -D -i Profile.mobileprovision -o Profile-payload.plist
plutil -extract Entitlements xml1 -o - Profile-payload.plist

2Fix

Regenerate the provisioning profile that uses that App ID in the developer account, download the new one and build with it.

# developer.apple.com > Certificates, Identifiers & Profiles: regenerate the provisioning profile for this App ID, then download it

3Verify

The same plutil command now lists aps-environment, and the build signs without an entitlement error.

security cms -D -i Profile.mobileprovision -o Profile-payload.plist
plutil -extract Entitlements xml1 -o - Profile-payload.plist

Confirmed by developer.apple.com

Did this fix it?

How do I stop it coming back?

  • Add the Push Notifications capability in the same change that adds the first call to registerForRemoteNotifications().
  • After you change a capability for an App ID, regenerate every profile that uses it.
  • Print the entitlements of the archived app before you upload, so a missing key is found on your Mac and not in a rejection.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Mobile apps

App record creation fails because you lack permission

You cannot add a new app in App Store Connect as a Developer or limited user

Only the Account Holder, an Admin or an App Manager can create an app record, and Apple blocks it until the Account Holder has signed the latest agreement.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.