开发者

Autostart of an iphone app

开发者 https://www.devze.com 2023-03-20 01:17 出处:网络
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 tra

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.

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.

Please su开发者_如何学运维ggest me how to do?

Thanks in advance...


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".


No third party app can be launched on startup. Skype (and others) simple respond to push notifiactions

The only way to actually open an app from the user not explicitly opening it, is to call a [[UIApplication sharedApplication] openURL]; - or somehow otherwise open a URL, and you have to set your app up to have a custom URL scheme... see this page.

E.g: Doodle jump has URLs such as doodlejump://highscores - which you can open from an email from them or their website.

0

精彩评论

暂无评论...
验证码 换一张
取 消