Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道我们是否可以关闭或打开 iphone 中的事件。在 Android、BREW 等其他平台上,我们会收到一条通知我们的应用程序,说手机已打开。在iphone中可以吗?
谢谢吉滕德拉
简短的回答:没有。
您的应用未在开机时运行,因此无需通知任何内容。(这里的一个特例是注册为 VoIP 客户端的应用程序。但您仍然无法判断手机是否刚刚启动,或者您的应用程序是否因其他原因被终止然后重新启动。)
当 iOS 关闭时,它会向任何后台运行的任务发送 KILL 信号。你不能拦截它们,所以这对你没有帮助。(即使您可以再次说明,它也没有说明您的应用程序被杀死的原因。)