iOS 10.3 到 iOS 11 升级 : User stop receiving silent push notifications
<p><p>我有很多用户提示当他们从 iOS 10.3.3 迁移到昨天发布的 iOS 11 时,他们不再收到静默推送通知。</p>
<p>需要注意的是,如果我已经要求用户注册推送通知,我在 NSUSerDefaults 中有一个设置。我愿意:</p>
<pre><code>[ registerUserNotificationSettings:settings];
</code></pre>
<p>仅当用户之前没有被询问时。</p>
<p>现在,如果用户在 iOS 10.3.3 上已经注册了通知,并升级到 iOS 11,代码 <code>registerUserNotificationSettings:settings</code> 将永远不会为他调用,直到他重新安装。这可能是个问题吗?但是,我认为他没有必要像他一样重新注册。</p>
<p>那么我该如何解决这个问题?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>来自 <a href="https://developer.apple.com/documentation/uikit/uiapplication/1622932-registerusernotificationsettings" rel="noreferrer noopener nofollow">documentation</a> :</p>
<blockquote>
<p>It is recommended that you call this method before you schedule any
local notifications or register with the push notification service.</p>
</blockquote>
<p>因此建议每次应用启动时至少调用一次,但在您的服务器发送推送通知之前。</p></p>
<p style="font-size: 20px;">关于iOS 10.3 到 iOS 11 升级 : User stop receiving silent push notifications,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/46320262/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/46320262/
</a>
</p>
页:
[1]