Reputation: 11275
My apologies for any confusion or misunderstandings, this is my first phone app so I'm still getting the hang of things.
I've been getting this error when I try to enable push notifications:
no valid 'aps-environment' entitlement string found for application
And my understanding of the issue (from reading other posts and Googling) is that this is most likely due to an incorrectly setup provisioning profile.
I currently have two certificates created, one created about 6 months ago strictly for development:
FirstName LastName iOS Development Mar 22, 2017
com.namehere.tasks APNs Development iOS Sep 18, 2017
Now I've heard that you might have to remake the provisioning profile after creating the APN, however when I try to recreate it to include the APN cert, it only lists the first cert.
I do notice that my current provisioning profile says invalid, which it didn't before, if this is at all relevant:
Name and OtherName 2016 iOS Development Invalid
So my question essentially is - do I need to create a new provisioning profile now that I've created a push certificate? And why can't I add it to my provisioning profile?
Upvotes: 1
Views: 1057
Reputation: 425
Yes, you will need to regenerate the provisioning profile. You can think of the provisioning profile as the single source of truth for all your certificates and bundled app services (eg. Push Notification)
That is correct. Just go ahead with it. The provisioning process will obtain the push cert information automatically. When you view your App ID in the developer website, you should be able to see that Push Notification is enabled.
If you are looking for an automatic way to regenerate these provisioning profile, you could let XCode manage the provisioning for you using Team Provisioning Profile.
If you enter information about your app and assign a team to your app, Xcode creates the necessary signing identities and provisioning profiles for you. Specifically, Xcode creates a team provisioning profile that allows your app to run on all your devices and use app services.
See link for more info
Upvotes: 1