Reset Push Notification settings for alert

我是研究僧i 提交于 2019-12-01 22:08:24

问题


I have developed an app that enabled push notification. It is available in AppStore. After installing the application on my device it shows Alert for enabling push notification sometimes only. Is that an issue from my side?.

In the case that once I did "Use" action and after some days I deleted app from my device. Will the alert for allowing push notification be asked the next I download it from AppStore.

Issue is like once I give "Use/Cancel", and deleted the app from device, on next download it is not asking whether you interested use push notification or not.

Please help.

Thank you in advance


回答1:


1.Delete your app from the device.

2.Turn the device off completely and turn it back on.

3.Go to Settings > General > Date & Time and set the date ahead a day or more.

4.Turn the device off completely again and turn it back on.

for reference: https://developer.apple.com/library/ios/technotes/tn2265/_index.html




回答2:


See the Apple technical note TN2265. In section "Resetting the Push Notifications Permissions Alert on iOS" they explain how to reset the permission dialog on iOS. However many developers complain that the procedure doesn't work. See my response to a similar question for more details.




回答3:


It seems like in IOS 10 and development environment

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>aps-environment</key>
    <string>development</string>
</dict>
</plist>

is enough to uninstall the app and rerun it and the push notification permission alert is shown on every ne install.



来源:https://stackoverflow.com/questions/6780795/reset-push-notification-settings-for-alert

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!