您如何处理未启用推送通知但稍后可能想要启用的用户?
您如何处理最初禁用推送通知的用户?我使用 EASYAPNS 记录推送 ID,我担心如果有人禁用推送通知,他们会错过我的应用程序的一些出色功能。
如果他们想稍后启用通知,您该怎么办?如果我为推送通知创建一个设置选项卡,然后他们启用它们,应用程序会生成一个推送 ID,还是一次性的事情,如果他们不注册通知,他们就不走运了该应用程序第一次启动?
谢谢
How do you handle users who initially disable push notifications? I keep a record of push id's using EASYAPNS and I'm concerned that if someone disables push notifications, they'll miss out on some great features of my app.
What do you do if they want to enable notifications later on? If I create a settings tab for push notifications and they later on enable them, will the app then and there generate a push id, or is it a one time thing and they're out of luck if they don't register for notifications the first time the app launches?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 Apple 的本地和推送通知编程指南,
“应用程序应在每次启动时注册并为其提供者提供当前令牌。
(...)
可以在“设置”应用程序的“通知”首选项中修改启用的通知类型,并且您可以通过调用
enabledRemoteNotificationTypes
方法检索当前启用的通知类型。”此后,用户 启用或禁用您的应用程序的通知,无论他最初是否启用它都无关紧要。
According to Apple's Local and Push Notifications Programming Guide,
"an application should register every time it launches and give its provider the current token.
(...)
Users can thereafter modify the enabled notification types in the Notifications preference of the Settings application, and you can retrieve the currently enabled notification types by calling the
enabledRemoteNotificationTypes
method."The user can always go to the iPhone Settings and enable or disable notifications for your app, doesn't matter if he initially had it enabled or not.
您无需编写推送通知设置的代码。 iPhone本身具有启用或禁用推送通知的功能,但应用程序必须实现推送通知的代码。
You don't need to write the code for setting of Push Notification. iPhone itself has a feature to enable or disable Push Notifications, but application must have implemented the code ofr Push Notification.