Reputation: 575
I hope you can help me troubleshoot my issue.
When I install my app, I don't get the message alert asking for the authorization to get push notifications.
I am thinking that if I don't get this message it's not my code to be wrong, but maybe it's a matter of certificates.
Am I right? How can I check if my provisioning file is correct?
I am using Xcode 5 and testing on ios7.0.2
I add a little more: I was never able to get the alert working
Upvotes: 0
Views: 606
Reputation: 11754
I had this issue when developing an app, it turned out I'd not set the entitlements up correctly. So make sure you have in your AppDelegate
:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
Make sure in Developer Center
you've generated an AppID for your application as well, specifying that you want to use Push Notifications
. Then you need to generate a Provisioning Profile
to use for development/deployment with the device ID you want to install it on. Then you need to bring that Provisioning Profile
into Xcode, and apply it to your project within the target build settings
. That should bring up the Push Notification
alert view to get the permission for the app to use push notifications. You then get the fun of setting up the SSL certificates but that's a whole other topic.
I found the Ray Wenderlich Push Notification Tutorial incredibly helpful when I went through it, I'd recommend following through if you're finding yourself stuck.
Edit; also keep in mind Push Notifications
do not work on the Simulator
, you must test them against an actual device as you won't see the alert view at all on the Simulator
.
Upvotes: 2
Reputation: 15512
If you accept or decline it once this screen would not appear again. Go to setting and check permission for push notifications for your app.
Settings->Notifications->YOUREAPP
Upvotes: 1
Reputation: 2056
In order to see the alertView:
Upvotes: 0