菜鸟教程小白 发表于 2022-12-12 16:00:44

php - 将数据从服务器发送到 iPhone 应用程序


                                            <p><p>我想在我的 iPhone 应用程序中添加消息功能,但我不知道在发送者提交消息后如何将数据发送到 iPhone。</p>

<p>我正在使用 PHP 网络服务来接收消息并将其添加到数据库中,但是我需要从这里将消息发送到运行相同应用程序的接收器 iphone 上吗?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>如果您谈论的是原生 iPhone 应用程序,我建议您使用 Apple 推送通知服务并在应用程序中对这些消息使用react。</p>

<p>有一些 PHP 库可用于使用 Apple 推送通知服务:</p>

<ul>
<li> <a href="http://libcapn.org/php-apn/" rel="noreferrer noopener nofollow"><strong>php-apn</strong></a> : 需要作为扩展来构建。封装 C 代码并利用 libcap。</li>
<li> <a href="https://github.com/duccio/ApnsPHP" rel="noreferrer noopener nofollow"><strong>ApnsPHP</strong></a> : 带有 Objective-C 代码示例的纯 PHP 实现。</li>
</ul>

<p>这是来自 <a href="https://stackoverflow.com/questions/3891118/apple-push-notification-service-with-php-script" rel="noreferrer noopener nofollow">how to send a simple message using APNS</a> 上一篇 Stack Overflow 帖子的工作示例.</p></p>
                                   
                                                <p style="font-size: 20px;">关于php - 将数据从服务器发送到 iPhone 应用程序,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/19582719/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/19582719/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: php - 将数据从服务器发送到 iPhone 应用程序