5
votes

I have followed a tutorial to enable Push Notifications on the App. It's still in development phase and internal testing only.

Using that, I have correctly enable development push notifications on the App ID, and the development provisioning profile accordingly. So much that the first three or so bundles that I have uploaded worked correctly and the Push Notifications went just fine.

Now, with the last update I've done, I've received an Email with an issue and the Push Notifications stopped working:

"Missing Push Notification Entitlement - Your app appears to include API used to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement... etc."

What I realized since then is that when I run "archive" to build the app, after I choose the team (the only one I have and always have used), when I come to chose the Binary and Entitlements, the Provisioning Profile is a DISTRIBUTION one and not the development one I have created.

I've tried countless things from my search on the internet. Including forcing in Code Signing on my target Build Settings the iPhone Developer:MyName and the development profile I've created in the Provisioning Profile row (wich is available to select here).

Still, no-go. I have no idea what changed in the process since I didn't mess with certificates or changed anything in that field, just plain app code.

Thanks for the input.

EDIT: I'll add some screenshots that maybe can shine some light.

enter image description here enter image description here

The XC:profile is the default distribution provisioning profile that XCode is creating.

3
any solution for this?. I'm facing the same issueDurga Vundavalli

3 Answers

4
votes

Note : without knowing the root cause i can only help you confirm whether you have all the certificates on proper place and using correct one.

Please go this way..

Just check in your Keychain and developer.apple account, if developer certificate is valid, if yes then

Check Provisioning profiles for Development and Distribution with Notification service enable in Provisioning section on developer.apple account.

So far everything is proper then.

Go to Xcode -> Preferences -> account -> refresh all certificate for the same apple account. and hit download.

Now go to Project settings -> general -> confirm you should have selected appropriate team.

finally to to project settings -> build settings -> search "code signing"

now select correct Provisioning profile and developer here.

enter image description here

please let me know if you find any trouble in this.

2
votes

In my case, I had changed the bundle identifier for the app, but the App ID listed on the provisioning profile was still wrong. Turns out that in the "Packaging" section under build settings, there's another place where the bundle id needs to be changed ("Product Bundle Identifier"), and that's what the code sign-y thing was looking at.

1
votes

Using Local Signing assets while exporting solved the issue for me enter image description here