About Push Notification

http://stackoverflow.com/questions/2438400/reset-push-notification-settings-for-app

I am developing an app with push notifications. To check all possible ways of user interaction, I'd like to test my app when a user declines to have push notifications enabled for my app during the first start.

The dialog (initiated by registerForRemoteNotificationTypes), however, appears only once per app. How do I reset the iPhone OS's memory of my app. Deleting the app and reinstalling doesn't help.

//************************************************************************************

The first time a push-enabled app registers for push notifications, iOS asks the user if they wish to receive notifications for that app. Once the user has responded to this alert it is not presented again unless the device is restored or the app has been uninstalled for at least a day.

If you want to simulate a first-time run of your app, you can leave the app uninstalled for a day. You can achieve the latter without actually waiting a day by setting the system clock forward a day or more, turning the device off completely, then turning the device back on.

//************************************************************************************

Apple added a new requirement to the AppStore submissions guidelines, which relies on the application to show the prompt. This may suggest that the automatic prompt has been removed in iOS 5.1. However there is no API to query the notification center settings, so not sure what would be the purpose of the prompt anyway. See my response to a similar issue: stackoverflow.com/questions/10191006/… – Amiramix

//************************************************************************************

The plist: /private/var/mobile/Library/RemoteNotification/Clients.plist

... contains the registered clients for push notifications. Removing your app's entry will cause the prompt to re-appear

//************************************************************************************

 

你可能感兴趣的:(notification)