0

We can register iPhone app to run in background when using location/music functionality. My question is can we fire an even based on a location update? eg: Send lat/long to a server when i reach a certain predefined lat/long in the background without launching the app?

I would not mind using Enterprise solution if its of any help.

B K
  • 1,554
  • 3
  • 19
  • 40
  • 1
    http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW10 – Ankit Srivastava Apr 18 '12 at 11:43

4 Answers4

2

Check out the significant location change API, it should provide what you want, albeit not very accurately.
http://longweekendmobile.com/2010/07/22/iphone-background-gps-accurate-to-500-meters-not-enough-for-foot-traffic/

unexpectedvalue
  • 6,079
  • 3
  • 38
  • 62
  • +1 wow they have done some pretty exhaustive research. I was looking at a foot traffic based app guess the accuracy level in the background wont be enough. Will have to look further into this. – B K Apr 19 '12 at 07:25
0

yeah that's possible. If you use the locationmanager and you get a new location through the delegate, your code there will be executed without opening the app.

Bob de Graaf
  • 2,630
  • 1
  • 25
  • 43
0

Yes this can be done. Check for details from Apple on Getting the User’s Location

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
0

You need to implement this API

- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region{
     //write code here
}
Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
RKY
  • 266
  • 1
  • 7