ios - 在应用未显示内容时收到相应的推送通知时显示 Urban Airship 登陆页面

标签 ios swift push-notification urbanairship.com

通过使用着陆页操作,我能够在前台或后台状态下发送推送消息,如文档中所述,当用户下次打开应用程序时会显示该消息。

但我想在应用程序在前台状态下立即显示着陆页容器(不显示应用内通知并等待用户交互显示它)并立即显示(不要等到下一次启动) .

在文档中提到:

If you need to display a Landing Page while the app is in the foreground state, replace the registry predicate associated with that action with one that allows foreground execution.

如何检索此功能?

最佳答案

您可以更新谓词:

[[UAirship shared].actionRegistry updatePredicate:nil
                                 forEntryWithName:kUALandingPageActionDefaultRegistryName];

关于ios - 在应用未显示内容时收到相应的推送通知时显示 Urban Airship 登陆页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32350465/

相关文章:

ios - 使用自定义加密系统覆盖 ATS 中使用的默认加密系统

ios - 以编程方式检索用户的 App Store 昵称

ios - 使用 iOS7 的 Swift ISO-8601 日期格式

swift - 没有物理设备的配置文件

java - Firebase 云消息通知仅在我打开 "notification tab"时显示

ios - 为什么数据没有被保存?

ios - 从类 func 返回到上一个 ViewController

ios - 更新 Int32 类型的 CoreData 属性

swift - 在 Vapor 4 中的文件流之后运行操作

javascript - 如何停止 Node.JS 通知流?