Skip to content

Instantly share code, notes, and snippets.

@himaratsu
Created October 6, 2014 02:40
Show Gist options
  • Save himaratsu/2bdb5b76cbb40a6b63e6 to your computer and use it in GitHub Desktop.
Save himaratsu/2bdb5b76cbb40a6b63e6 to your computer and use it in GitHub Desktop.
Pushのテスト
Resetting the Push Notifications Permissions Alert on iOS
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 following these steps:

Delete your app from the device.
Turn the device off completely and turn it back on.
Go to Settings > General > Date & Time and set the date ahead a day or more.
Turn the device off completely again and turn it back on.

https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment