菜鸟教程小白 发表于 2022-12-12 19:58:22

ios - 如何在 ios 中实现 unregisterForRemoteNotifications


                                            <p><p>我想在注销通知时向服务器发送一条消息,但我该如何实现呢?</p>

<p>我写了</p>

<pre><code>[ unregisterForRemoteNotifications];
</code></pre>

<p>但是我可以在哪里编写代码<em>发送到服务器</em>? </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>根据<a href="http://developer.apple.com/library/ios/DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/unregisterForRemoteNotifications" rel="noreferrer noopener nofollow">docs</a> :</p>

<blockquote>
<p><strong>Discussion</strong><br/>
You should call this method in rare circumstances only, such as when a new version of the application drops support for remote notifications. Users can temporarily prevent applications from receiving remote notifications through the Notifications section of the Settings application. Applications unregistered through this method can always re-register.</p>
</blockquote>

<p>您的服务器没有收到通知,只是当您调用该函数时,向您的服务器发送一个数据包并假设操作成功。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在 ios 中实现 unregisterForRemoteNotifications,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/9911934/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/9911934/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在 ios 中实现 unregisterForRemoteNotifications