菜鸟教程小白 发表于 2022-12-13 06:15:52

"content-available": 1 时 iOS 远程通知不起作用


                                            <p><p>我可以在我的 iOS 应用程序中毫无问题地接收推送通知,但如果我尝试发送添加“内容可用”的静默通知:1,无论我的应用程序处于何种状态,我都不会收到任何通知(即使它正在前台运行)</p>

<p>我已选中远程通知复选框。 (或在 .plist 中添加远程通知)并且我已经实现了 application:didReceiveRemoteNotification:fetchCompletionHandler 但只有在我发送正常的推送通知并且应用程序在前台运行时才会调用 didReceiveRemoteNotification</p>

<p>有什么想法吗??</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>在 SO 上查看这个答案:<a href="https://stackoverflow.com/questions/19239737/silent-push-notification-in-ios-7-does-not-work" rel="noreferrer noopener nofollow">Silent Push Notification in iOS 7 does not work</a> </p>

<p>似乎有一个错误需要存在另一个字段才能使远程通知有效。</p></p>
                                   
                                                <p style="font-size: 20px;">关于 &#34;content-available&#34;: 1 时 iOS 远程通知不起作用,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/21628857/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/21628857/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: &#34;content-available&#34;: 1 时 iOS 远程通知不起作用