菜鸟教程小白 发表于 2022-12-12 20:50:25

受密码保护的设备上的 iOS 后台唤醒


                                            <p><p>在 Apple 文档中 <a href="https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html" rel="noreferrer noopener nofollow">Understanding When Your App Gets Launched into the Background</a>说</p>

<blockquote>
<p>When password protection is enabled on the device, the system does not
launch an app in the background before the user first unlocks the
device.</p>
</blockquote>

<p>每隔几分钟,某些应用就会在后台唤醒,用户无法继续解锁 iPhone。</p>

<p>当受密码保护的设备不允许应用在后台启动时,区域监控应用将如何在后台唤醒并执行其工作? </p>

<p>Apple doc中写的是什么意思? </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>我认为您误解了文档。</p>

<blockquote>
<p>In most cases, the system does not relaunch apps <strong>after they are
force quit</strong> by the user. One exception is location apps, which in iOS
8 and later are relaunched after being force quit by the user. In
other cases, though, the user must launch the app explicitly or reboot
the device before the app can be launched automatically into the
background by the system. When password protection is enabled on the
device, the system does not launch an app in the background before the
user first unlocks the device</p>
</blockquote>

<p>这意味着<strong>如果</strong>用户<strong>强制退出</strong>您的应用在受密码保护的 iPhone 上:</p>

<ol>
<li><p>如果这是定位服务
=> 用户必须<strong>解锁</strong>手机才能执行后台操作</p></li>
<li><p>如果这不是定位服务
=> 用户必须<strong>解锁</strong>并<strong>启动应用一次</strong>才能执行后台操作。</p></li>
</ol>

<p>无论如何,一旦应用<strong>启动一次</strong>,后台操作<strong>就可以</strong>被触发。</p></p>
                                   
                                                <p style="font-size: 20px;">关于受密码保护的设备上的 iOS 后台唤醒,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/37935606/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/37935606/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: 受密码保护的设备上的 iOS 后台唤醒