OGeek|极客世界-中国程序员成长平台

标题: iOS 10.3 到 iOS 11 升级 : User stop receiving silent push notifications [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:44
标题: iOS 10.3 到 iOS 11 升级 : User stop receiving silent push notifications

我有很多用户提示当他们从 iOS 10.3.3 迁移到昨天发布的 iOS 11 时,他们不再收到静默推送通知。

需要注意的是,如果我已经要求用户注册推送通知,我在 NSUSerDefaults 中有一个设置。我愿意:

[[UIApplication sharedApplication] registerUserNotificationSettings:settings];

仅当用户之前没有被询问时。

现在,如果用户在 iOS 10.3.3 上已经注册了通知,并升级到 iOS 11,代码 registerUserNotificationSettings:settings 将永远不会为他调用,直到他重新安装。这可能是个问题吗?但是,我认为他没有必要像他一样重新注册。

那么我该如何解决这个问题?



Best Answer-推荐答案


来自 documentation :

It is recommended that you call this method before you schedule any local notifications or register with the push notification service.

因此建议每次应用启动时至少调用一次,但在您的服务器发送推送通知之前。

关于iOS 10.3 到 iOS 11 升级 : User stop receiving silent push notifications,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46320262/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4