iCoder86
iCoder86

Reputation: 1895

alert for allow or dont allow Apple push notification in iphone application

I am using Apple Push Notification in my application.

when my application is installed on device i want application to ask user if they want allow application to use notification or not, how can i implement so? something like this application.

enter image description here

Thanks.

Upvotes: 1

Views: 1200

Answers (2)

Noah Witherspoon
Noah Witherspoon

Reputation: 57149

This happens automatically when an app asks to register itself for push notifications, just as it does when an app first asks for the device's location. You don't need to do anything special beyond the -registerForRemoteNotificationTypes: call (as Max mentioned) which you have to make anyway.

Upvotes: 0

Max
Max

Reputation: 16719

You don't need to do any extra work for that. Just configure your app for push notifications and call:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes: types];

Upvotes: 2

Related Questions