iOS Entitlements Removed during App Store Upload

157 Views Asked by At

I have an application which uses push notifications. Recently the ANPS cert had to be recreated as it had expired. When I next pushed a build to the store I received this warning email from Apple.

Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement. Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor's Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.

When I look at the provisioning profile in Xcode I can see the that entitlement aps-environment is there and when i browse the file for the profile after converting it to xml i can see that its value is production.

It seems that after I archive the new build the entitlement gets removed. When I go to validate I manually select the cert and the popup shows its has aps-environment, but the review content section does not have aps-environment.

I have tried making a new provisioning profile, I've confirmed that Push Notifications are enabled in Capabilities, and the developer portals profile includes push notifications. Is there something obvious I'm missing?

0

There are 0 best solutions below