ios - NewsStand,需要时显示推送通知警报 View 吗?

标签 ios push-notification uialertview newsstand-kit

我知道有人问过这个问题:How to show "Would like to send you Push Notifications" Alert View again? ...但我的问题有点不同。我的问题是,当我想要以编程方式(不是为了调试而是为了真实)时是否可以提示这一点。可能不是因为这是操作系统触发的警报,但如果用户单击“不允许”,是否有办法“撤消”。我的应用程序有一个教程,我想在用户完成教程时弹出此消息。我应该在教程结束后注册推送通知吗?或者用户必须在设置菜单上“允许”什么,以便我可以将其添加到教程中。谢谢

alert notification

最佳答案

要触发您在图像上提供的弹出窗口,您应该调用

[[UIApplicaton sharedApplication]   registerForRemoteNotificationTypes:UIRemoteNotificationTypeNewsstandContentAvailability]

这可以在应用程序的任何地方进行。

检查可用权限使用:

UIRemoteNotificationType* enabledTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

关于ios - NewsStand,需要时显示推送通知警报 View 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22231091/

相关文章:

ios - UITableViewCell 中的 UserDefaults 不保存 (swift3)

iphone - 自定义 UITabBar 选定的标签图像,iOS 5 及更高版本

重新安装后的 iOS 推送通知设置

ios - 用户界面自动化 : Cancel button on Alert view is tapped without actually doing it

objective-c - UIAlertView的基本用法导致EXC_BAD_ACCESS

ios - 给定纬度和经度生成快照的最佳方法是什么,真的鼓励跳过 MKMapView

ios - 如何在 AppDelegate 之外调用 “application didRegisterForRemoteNotificationsWithDeviceToken”

android - 在开发和生产上切换 GCM 客户端

android - 构造函数通知已弃用

iphone - 停止 UIAlertView 关闭