no valid 'aps-environment' entitlement string found for application

Hello


I'm using the push notification functionality inside my app.

Everything worked fine. I was able to register my device and sent the registrationdata to my server.

With the generated certificates I was able to send notifcations to my device.


But until the last release of my app something changes.

Now I always get the error no valid 'aps-environment' entitlement string found for application, if I try to register my phone.


I followed several tutorials about this error, but without success.


I have regenerated the provision profiles and load them to Xcode.

I don't know why all this happens.


Best regards

Simon

I'm not sure if this is the case for you, but Xcode 8 doesn't automatically add entitlement from Provisioning Profiles anymore. In order to add entitlement:


1. Click the top item on the left pane, where you have your .swift files. It should be your App name (project editor).

2. When the project editor pops up, to the left of the "Info" tab, you should see your App name with up and down arrow.

3. Click that and navigate to "Targets" with your App name.

4. Then click "Capabilities" tab and you turn on Push Notificiations.


Build your project and run, now that message should be gone. (If it was the same problem that I was having)

no valid 'aps-environment' entitlement string found for application
 
 
Q