菜鸟教程小白 发表于 2022-12-13 08:24:28

ios - 在 iOS 后台运行 Http 服务器


                                            <p><p>我目前正在构建一个应用程序,用作 wifi 扬声器下载和播放音乐的 http 服务器。我清楚地知道,应用程序资源在它们消失到后台后不久就会被杀死。有什么方法可以保持 http 服务器和从中获取数据的设备之间的连接?我需要一个合法的方式,因为这个应用程序是要提交到应用商店。我尝试在网上搜索,我发现他们提供的解决方案似乎被苹果拒绝了。 </p>

<p>非常感谢!</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>您可以尝试使用 iOS 中可用的音频和 AirPlay 后台模式。 </p>

<p>他们是否接受作为应用程序一部分的 HTTP 服务器只有时间才能判断。 </p>

<p>在此处阅读更多信息:<a href="https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html" rel="noreferrer noopener nofollow">https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html</a> </p>

<p>如果其他后台模式(例如蓝牙/VOIP)无法用作解决方法,但在审核期间可能不允许使用。 </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 在 iOS 后台运行 Http 服务器,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/31006525/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/31006525/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 在 iOS 后台运行 Http 服务器