菜鸟教程小白 发表于 2022-12-12 12:56:10

ios - 如何在不注册远程静默通知的情况下使用推送 token ?


                                            <p><p>从 <a href="https://developer.apple.com/videos/play/wwdc2015/720/?time=126" rel="noreferrer noopener nofollow">WWDC 2015 Session 720</a> 阅读它说:</p>

<blockquote>
<p>Silent notifications are enabled by default.
The user does not need to give permission to your app to use them. You can start using them without asking the user for permission</p>
</blockquote>

<p>我的问题是:</p>

<ol>
<li>如何在不注册 Remote 的情况下使用 <strong>推送 token </strong>? </li>
<li>如果我仍然需要注册,<strong>那么这里的“默认”是什么意思?</strong></li>
</ol>

<p>这是否意味着您不必提示注册,但仍必须在应用启动时进行后台注册?这可能意味着默认是一个非常糟糕的词选择?</p>

<p>我读到 <a href="https://stackoverflow.com/questions/25721269/do-i-still-need-to-register-for-remote-notifications-to-enable-silent-notificati" rel="noreferrer noopener nofollow">this question</a>但它没有回答这个问题。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>您仍然需要注册推送通知。
只需<strong>不要</strong>注册 <code>UIUserNotificationTypeAlert</code> 或 <code>UIUserNotificationTypeBadge</code> 或 <code>UIUserNotificationTypeSound</code> 类型以使其静音,以便用户不会'不提示启用推送通知</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在不注册远程静默通知的情况下使用推送 token ?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/42282075/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/42282075/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在不注册远程静默通知的情况下使用推送 token ?