iOS: Missing aps-environment in entitlement

Hi,
Push notification plugin has following in config.xml:

<config-file target="*-Debug.plist" parent="aps-environment">
      <string>development</string>
    </config-file>
    <config-file target="*-Release.plist" parent="aps-environment">
      <string>production</string>
    </config-file>

After the build the .ipa file does not contain it in entitlements and when submitting to appstore we get warning:

ITMS-90078: 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.

Checked with following plugins:
pushwoosh-phonegap-plugin
@havesource/cordova-plugin-push

This wasn’t a case few weeks ago. Could that be related to some build configuration on your end, because when I do build locally it works fine and all entitlements are there.

Thank you!

We updated to Xcode 14 a couple of weeks ago, so that’s probably what changed.

I believe you have to set the push entitlement in your Apple certificates.

I’ve used the same cert and provision profile as before (when it worked). I have also regenerated them and see that required entitlement present in provision profile, but for some reason it’s missing in .ipa after building.

When I do local build with same cert and provision profile using Xcode 14 everything is fine.

Same issue here.

In these topics:
https://developer.apple.com/forums/thread/64417

seems we have to add the Entitlements.plist file in our projects
@ghenne do you confirm that? And where the file must be placed?

Thanks in advance
D.

@daver - that post is from 2016. It’s unlikely to help in this case.

I’ll have a look to see if I can find more on this.

I found this issue in Cordova: ITMS-90078: Missing Push Notification Entitlement · Issue #180 · dpa99c/cordova-plugin-firebasex · GitHub

Are you using Firebasex?

We’d like to look at the log for this. Can you submit it again, and let me know what email address you submitted under?

We are using @havesource/cordova-plugin-push plugin which is based on Firebase.

I have submitted it again using jurijs.pasedko@zalaris.com, but we are using Neptune Software as vendor so I guess it is submitted on behalf of Neptune Software somehow.

This is a screenshot from logs for reference:

I can also provide a full log if needed.

Thanks, @jurijs.pasedko - I’ve got the log to look at.

@jurijs.pasedko - Nothing jumps out at me from the log.

I wonder if it is caused by an interaction with another plugin. Your project has 22 plugins - could you try building without as many other plugins as possible? If the problem goes away, there might be a conflict.

I have removed all plugins except one for push notifications and did rebuild. Same result. The issue must be somewhere else. I think it’s something related to build parameters where it does not copy entitlements or even uses different file for entitlements.

Log for reference:

Usually I can see in the logs which entitlement the app has (well it was like that before Xcode 14). Now there is nothing about entitlements in the logs.

Thank you - this is useful information. We are continuing to work on this.

We have managed to duplicate your issue with a project here. Still working on a solution…

1 Like

I managed to make a successful build and upload it to the store.

I had to make a new Identifier on developer.apple.com. The key thing it needed was to have Push Notifications enabled, with a certificate:

I then generated a new Certificate and Profile. For the Profile, I used the new Identity.

Let me know if this works for you!

I have already tried regenerating certificates/profiles and it does not solve the issue for me. I don’t have any error during build process and Apple also accepts the build but issues a warning about missing entitlement required for push notifications to work. In my case app entitlements missing aps-environment key set to production.

You can check entitlements unzipping the .ipa file and using command:

codesign -d --entitlements - "Payload/YourApp.app" 

You’re right. I need to retract this - I made another build with a new version number and the problem was still there.

We’re continuing to work on it - through the weekend if needed.

1 Like

Do you have any new update?

It looks like there is a bug between Xcode14’s new upload to iTunes Store and VoltBuilder, when using Push Notifications.

We are still working on a fix, but we will be providing a workaround to let you build using Xcode 13 today.

Feel free to contact us at support if you would like to use the workaround.

I found this article on the Apple Developer Site. It basically says, “Don’t worry!”

The app validator checks for an implementation of the UIApplicationDelegate method application:didRegisterForRemoteNotificationsWithDeviceToken: in the app. You’ll get the warning you described if your app delegate implements that method and there is no aps-environment entitlement.

It’s possible that a third-party library you’re using has implemented that method even though your app doesn’t do anything with push notifications. In that case you can just ignore the warning. It’s there to let developers who do use push notifications know that they might have signed their app incorrectly.

The only way to eliminate the warning without configuring your project to use Push Notifications is to remove all push notification code from your app, whether yours or a third party’s.