Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

First-

Congratulations!

Second-

How does it work? I get that you can be periodically woken up by iOS to run in the background for short periods of time. But how do you know if you've moved 1.0km or more before before being woken up? It makes sense that you wouldn't want to fire up the GPS equipment if you haven't moved... but there's a chicken-egg problem.

Or do you just record only if you've moved 1.0km or more? How often does the app check your location?



Thanks!

I used the CLLocationManager with the right values set for distanceFilter and desiredAccuracy (see http://developer.apple.com/library/ios/#documentation/CoreLo...)


iPhone has an API that gives you a notification when a significant location change happens.


You hope ;) Significant location change is based on cell phone towers. The update only seems to happen when you switch towers or are switching between towers. Less towers = less accurate, more towers = more accurate.

Also, a kilometer is optimistic, good test and article here describes what was discovered when iOS4 came out. http://longweekendmobile.com/2010/07/22/iphone-background-gp... iOS 5 is now in beta, there may have been improvements, can't say for sure.


You are totally correct. With iOS 4 the significant location changes API can be trusted with distances around 1 mile / 1.5 kilometers. Anything below that and you don't have any guarantee.

I speak from my own experience developing GPS Notifier for iOS (http://jetap.com and AppStore: http://itunes.apple.com/us/artist/jetap/id400203653).

My first version was only using significant location changes and after a lot of users feedback, the second release was improved dramatically by switching the way I was using the significant location changes API and some other GPS API: the app now has a better accuracy and the feedback from my users has almost disappear.

Anyway congrats for the OP to ship his app! Enjoy the ride in the AppStore.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: