开发者

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.

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

Tha开发者_开发百科nks.


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

[[UIApplication sharedApplication] registerForRemoteNotificationTypes: types];


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜