iOS: Missing aps-environment in entitlement

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.

I have seen it too. This is for those who actually don’t use push notifications but get the warning. In our case we use push notifications. Without aps-environment entitlement they simply does not work.

As workaround for now we just do builds locally with Xcode 14.

Thanks for the tip. VoltBuilder calls Xcode through the Cordova modules. We are looking closely at how Cordova is doing this.

Fixed! There was a build setting for Xcode which needed to be changed.

Special thanks to Tommy for his help!

(We’re still working on the other problem with Push Notifications)