Is there any way to start applicaiton when device restarts .开发者_运维技巧
I mean - my appliaction is trying to get location when the application is running in background, but any how if user is restart the device then application will not provide any location updates.
So is there any way to keep application running even though the device is restarted ??
Thanks in advance.
No, iOS does not provide anything like an autostart functionality. There might be a way on jailbroken phones, but if you aim for the App Store you'll have to design your app/service that you can live with this limitation.
Edit: I stand corrected. If you set the voip
value in the UIBackgroundModes
key of your Info.plist
, your app does get restarted after a device reboot. According to the documentation:
voip
: The application provides Voice-over-IP services. Applications with this key are automatically launched after system boot so that the application can reestablish VoIP services.
精彩评论