iOS Location update even app is not running (like find my iphone)

隐身守侯 提交于 2019-12-06 04:39:05

My friend , you are on wrong way. Actually there is no any way to do a task after killing of app in iOS. You can read about this here in Apple documentation.

Find My iPhone - It is an Apple App and they are using private api's to make this possible. And these type of features not available for general purpose developer programming.

So please don't go on this path.All will go in vain.

Hope this Helps you !

That is not correct, when your app is terminated it can still monitor significant location updates.

You cannot run anything when the app is killed, except you can recieve push notifications or UILocalNotifications. You could try duplicating UILocalNotifications functionality and do your stuff even when your app is killed/in bg/. BTW this is a complex thing and you could do more digging about ios7 background tasks or something.

This may help you. Getting the User’s Location

see the section Starting the Significant-Change Location Service. It says

If you leave the significant-change location service running and your iOS app is subsequently suspended or terminated, the service automatically wakes up your app when new location data arrives. At wake-up time, the app is put into the background and you are given a small amount of time (around 10 seconds) to manually restart location services and process the location data.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!