自动启动的iPhone应用程序 [英] Autostart of an iphone app

查看:98
本文介绍了自动启动的iPhone应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建GPS跟踪应用。我希望在重启设备后启动跟踪功能
。现在我做了后台兼容性,它在后台工作正常,但我需要在设备重启(打开)时开始跟踪,而不必打开应用程序来启动功能。

I am building GPS Tracking app. I want the tracking functionality to be started after a reboot of device. Now I did with background compatibility, It works fine on background, but I need to start tracking when the device is rebooted (switch on) without having to open the app to start the functionality.

我该如何实现呢?请给我一些程序,了解如何为该应用程序启用
的自动启动以及如何调用一种方法来开始跟踪。

How can I implement that. Please give me procedure for how to enable the autostart for that app and how to invoke a method to start tracking.

如果您观看应用程序,如Skype和在iphone上自动启动的webEx启动..
这些应用程序是如何工作的。我不知道启用此自动启动。

If you watch the app like skype and webEx that are autostarted on iphone starts.. How these apps are working. I have no idea for enabling this autostart.

请建议我该怎么办?

提前致谢。 ..

推荐答案

将UIBackgroundModes键添加到应用程序的Info.plist文件中。将此键的值设置为包含voip字符串的数组。
您可以在xcode中执行此操作:选择您的项目根目录 - >功能 - >背景模式 - >选中'Voice over IP'。

Add the UIBackgroundModes key to your app’s Info.plist file. Set the value of this key to an array that includes the voip string. You can do that in xcode: Select your project root -> Capabilities -> Background Modes -> check 'Voice over IP'.

来自文档
具有此密钥的应用程序也会在系统启动后立即在后台重新启动。

From the documentation: "An app with this key is also relaunched in the background immediately after system boot".

这篇关于自动启动的iPhone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆