gpt4 book ai didi

ios - 拿起 iOS 设备时获得回调

转载 作者:行者123 更新时间:2023-11-29 11:41:28 25 4
gpt4 key购买 nike

情况是设备被锁定并躺在周围,直到用户拿起手机查看它。当他偷看时,是否可以在您的应用程序后台检测到您的 iOS 设备被拿起的事件?

我正在考虑系统明显提供的事件,至少在内部,用于打开屏幕以显示该 peek 事件的时间和通知。

最佳答案

iOS 不提供这样的公共(public) API。
更一般地说,由于 sandbox,iOS 不会提供任何可以让您的应用了解用户在系统或其他应用上的操作的 API。如果您的应用未处于事件状态,则更多:

For security reasons, iOS places each app (including its preferences and data) in a sandbox at install time. A sandbox is a set of fine-grained controls that limit the app’s access to files, preferences, network resources, hardware, and so on. As part of the sandboxing process, the system installs each app in its own sandbox directory, which acts as the home for the app and its data.

此规则存在一些异常(exception)情况,例如位置更新。

关于ios - 拿起 iOS 设备时获得回调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46301298/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com