voyage11/Location
关于
适用于 iOS 7 和 8 的长时间后台位置更新编程。在前台和后台都能持续获取位置信息。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Background Location Update Programming for iOS 7 and iOS 8
Most of the solutions before iOS 7 work well because during that time the system does not have multitasking and the system does not automatically move the app from background mode to suspended mode.
So, if your app needs consistent location update from the device, you will have to implement a solution that constantly refresh the app when it is in background mode so that it has a short period of time in executing the code and send the location to your server.
I have personally used a few weeks of time in testing various solutions that I found from StackOverFlow and also Apple Developer Forum but I didn't have much luck.
I only managed to get the consistent location update on the background in iOS 7 by combining a few solutions together with my own tweaks.
The solution that I am provided might not be elegant but it is able to do what I need to do. I am constantly looking for a better solution when I have time.
I am glad that this solution helps some other iOS developers who are developing location based application. So far, this is the most popular post on my blog. If you have any question, you may join us for a discussion here: Background Location Update Programming for iOS 7 and 8.
Update on 26 September 2014: I have updated the solution to work on iOS 8.
Update on 14 October 2014: I have Moved the delay10Seconds timer to become a share property.
Personal Note
Currently, I am working as a Senior iOS Developer in Singapore. I might not be free to keep this solution updated. Please check the changes on the latest iOS to make sure that the solutions works well. Thanks.
Thanks.
Ricky
探索相关项目
加载中…