iOS版 - 要求他们启用后最初下跌推送通知 [英] iOS - Ask to enable push notifications after initial decline

查看:145
本文介绍了iOS版 - 要求他们启用后最初下跌推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能迫使XXXXX想向您发送推送通知从应用程序内弹出,在经过最初的下降。用例是如下:

I would like to know if it's possible to force the "XXXXX would like to send you push notifications" popup from within an app, after an initial decline. The use case is as follows:


  • 用户安装应用程序,获取有关推送通知警报,
    和拒绝,因为他们不知道/信任该应用呢。

  • The user installs the app, gets the alert about push notifications, and declines because they don't know/trust the app yet.

他们使用的应用程序和应用程序内主动要求被警告
有事时(例如说他们想买东西
卖完了所以他们希望得到通知时,它是早在股票)。

They use the app and proactively request within the app to be alerted when something happens (say for example something they want to buy is sold out so they want to be alerted when it is back in stock).

所以,现在的用户要求的应用程序,通知他们有关的东西
在操作系统禁用特定但推送通知
水平。

So now the user has asked the app to notify them about something specific but has push notifications disabled at the operating system level.

因此​​,如果用户请求一个警报,但是我发现他们拒绝
在第一次运行警报,我需要通知这个他们,并让他们转
推的警报工作通知。

So if the user requests an alert, but I detect that they declined alerts on first run, I need to notify them of this and have them turn push notifications on for the alert to work.

在理想情况下,我想迫使XXXX想送你推
在这一点上警报的通知(第二次,因为他们
安装该应用程序)。

Ideally, I would like to force the "XXXX would like to send you push notifications alert" at this point (a second time since they installed the app).

我想B计划会向他们展示我自己的消息告诉他们,他们
必须进入他们的系统设置和手动重新开启
为了得到他们想要的警报。这是很不理想。

I guess plan b would be to show them my own message telling them they have to go into their system settings and turn it back on manually in order to receive the alert they want. This is far from ideal.

任何帮助将是AP preciated。谢谢你。

Any help would be appreciated. Thanks.

推荐答案

您不能让iOS的再次显示警报。这里有一个更好的方法:

You can't make iOS show the alert again. Here's a better approach:


  1. 保留一个标志,在你的 NSUserDefaults的指示是否应在启动推送通知登记。默认情况下,标志为false。

  2. 当您启动,检查该标志。如果这是真的,立即注册。否则,不注册。

  3. 的用户第一次做一些事情,会导致一个推送通知,注册推送通知,并设置标志 NSUserDefaults的

  1. Keep a flag in your NSUserDefaults indicating whether you should register for push notifications at launch. By default the flag is false.
  2. When you launch, check the flag. If it's true, register immediately. Otherwise, don't register.
  3. The first time the user does something that would cause a push notification, register for push notifications and set the flag in NSUserDefaults.

这样,当用户得到的推送通知警报,他有一些想法,为什么他得到它,实际上可能会说是的。

This way, when the user gets the push notifications alert, he has some idea why he's getting it, and might actually say yes.

这篇关于iOS版 - 要求他们启用后最初下跌推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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