推送通知对话框
有什么方法可以使“您想启用推送通知...”对话框不会在第一次应用程序启动时出现,而是在应用程序中的其他操作中出现吗?
问候, 姆拉登
Is there any way I could make the "Would you like to enable push notifications..." dialogue not to come up upon first time application launch but rather on some other action in the application?
Regardz,
Mladen
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在调用
registerForRemoteNotificationTypes
方法之前,该对话框不会出现。我假设您现在正在appDidFinishLoading
中调用它?只需将其移至应用程序中与推送通知相关的部分即可。CoreLocation 的情况也类似。如果您在应用程序表明为什么需要用户位置之前请求用户位置,可能会让用户感到困惑。
The dialog should not appear until you call the method
registerForRemoteNotificationTypes
. I assume you're calling it inappDidFinishLoading
at the moment? Just move it to the part of your application that is relevant to Push Notifications.It's a similar situation with CoreLocation. It can confuse the user if you request the users location before your application has indicated why it needs it.