菜鸟教程小白 发表于 2022-12-13 02:29:21

ios - 来自 Rails 应用程序的 Apple 推送通知


                                            <p><p>我正在使用 Houston Gem 从我的 Rails 应用程序发送推送通知。我尝试从 API 打印响应。它只返回一个 Integer(120,124,192,etc...)</p>

<p>如果推送通知已成功处理,我是否可以从我的 Rails 应用程序中了解任何方法。</p>

<pre><code>certificate_enterprise = File.read(&#34;config/enterprise.pem&#34;)
connection = Houston::Connection.new(&#34;apn://gateway.sandbox.push.apple.com:2195&#34;, certificate, pass_phrase)
connection.open
connection.write(notification.message)
connection.close
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>APNS 服务不会提供有关它是否已收到并处理通知的反馈,但您可以连接到反馈服务以查看它是否未能传递到您尝试与之通信的任何设备: <a href="https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html" rel="noreferrer noopener nofollow">APNS feedback service documentation</a> .</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 来自 Rails 应用程序的 Apple 推送通知,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/26272561/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/26272561/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 来自 Rails 应用程序的 Apple 推送通知