如何显示IOS推送通知弹出? [英] How to Display IOS Push Notification Popup?

查看:220
本文介绍了如何显示IOS推送通知弹出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试推送通知添加到我的应用程序。我需要知道如何使推送通知弹出出现。
我属于我的弹出的是,有两个选择,允许和不允许警报视图。它会询问用户是否允许应用程序接收通知和东西与否。
对不起,我没有截图,但我希望我的介绍能帮助。
我试着删除我的应用程序一遍又一遍,推进时间,但毫无效果。

此外,如果弹出出现,我怎么能知道,如果选择不允许用户/允许?
任何帮助将是AP preciated。谢谢你。


解决方案

  

重置推送通知警报的权限在iOS


  
  

第一时间推送通知启用推的应用注册,
  iOS的询问用户是否他们希望收到通知的应用程序。
  一旦用户回应此警报它不是$ P $再次psented
  除非该设备恢复或应用程序已被卸载在
  至少一天。


  
  

如果要模拟你的应用程序的第一次运行,你可以离开
  卸载了一天的应用程序。您可以实现后者不
  实际上按照以下步骤等待了一天:

  1。从设备上删除您的应用程序。2.完全关闭设备并重新打开它。3.进入设置>通用及GT;日期和放大器;时间,并设置日期提前一天以上。4.再次完全关闭设备并重新打开它。


<一个href=\"https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG42\">Source

I'm trying to add push notification to my app. I need to know how to make the push notification popup appear. The popup i'm pertaining to is an alert view that has two choices, "allow" and "don't allow". It asks the user whether to allow the app to receive notifications and stuff or not. Sorry I don't have a screenshot but I hope my description can help. I've tried deleting my app over and over again and advancing the time but nothing worked.

Also, in case the popup appears, how can I know if the user selected don't allow/ allow? Any help would be appreciated. Thanks.

解决方案

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:

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.

Source

这篇关于如何显示IOS推送通知弹出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆