I\'ve been trying very very hard to create a simple simple iOS app which can recieve push notifications. My only reason for doing this is to establish a procedure for some
This was what fixed it for me. (I had already tried toggling the capabilities on/off, recreating the provisioning profile, etc).
In the Build Settings tab, in Code Signing Entitlements, my .entitlements file wasn't link for all sections. Once I added it to the Any SDK section, the error was resolved.
If you created your provisioning profile before configuring the app ID
for push, try to regenerate the provisioning profile.
iOS Provisioning Portal -> Provisioning -> Your cert -> EDIT -> Make an edit -> Download new provisioning
Worked for me. Now i'm able to use push.
(Xcode 5) Well, after spending an hour I solved my issue. Even if you re-generate the provisioning file in Xcode 5, you should manually update your account. I only changed provisioning file in the Organizer tab that did not work, Xcode kept build with old provisioning file.
So go to
Xcode > Preferences > Accounts > View Details (Select your account)
Then refresh your provisioning files.
I had the same issue was everyone else and tried all the above tricks, nothing worked. I even deleted and started fresh with a different developer account.
What worked for me in the end was
I don't know if you can enable that for a wildcard app, but after trying at least 12 different suggestions and losing a few days I hope this helps someone
My problem was simply that I was signing with the Xcode-managed wildcard provisioning profile.
After I created an app-specific profile (and downloaded it, double-clicked it, and ensured my Build Settings referred to it), I successfully received an APNS device token.
It took me hours to solve it. Given that someone is using custom scripts to sign and pack while others are using xcode itself, there's only one way to check what ended in your app. Dump you entitlements with
codesign --display --entitlements :- path/to/MyApp.app
and check aps-environment
and application-identifier
.