I have an app which was supposed to have push notifications enabled, but for some reason doesn't have them. I've seen other people download and install the app, and it doesn't even prompt them for permission to send push notifications. As expected, this app doesn't appear in their Settings > Notifications.
However, on my iPad, I am able to receive push notifications from this app, and it does show up on my Settings > Notifications. I have deleted and reinstalled the app to make sure I had the same thing everyone else has (and not a development version), and I'm still able to get notifications.
Now, this app was written for a client who sent me all the provisioning profiles (dev, adhoc, distribution) as well as the files needed to be able to send push notifications, so I can't know for sure that everything was properly created.
My theory right now is that:
So my questions are:
Ok, I may have found a way to verify whether or not the profiles have push enabled.
If I open the .mobileprovision file as a text file, there is a bit of XML there (a plist apparently) which I'm guessing for a distribution profile should have this:
<key>aps-environment</key>
<string>production</string>
And indeed, the adhoc profile had this and the distribution profile didn't, so... I'm guessing this was the problem.
Still, any feedback would be helpful :)
Slightly different, but still useful: when you upload an app to iTunes connect, you can check whether it has Push notifications (or any other entitlements) enabled.
To do this, go to Manage your Applications, select the application, then go to "View Details" for the version you want to check.
From there, go to the "Binary details" page - there's an Entitlements field that shows what the entitlements the binary has. If Push Notifications are enabled, you'll see a "aps-environment: production
" line in there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With