Hi,
My app is configured to receive location updates while running in the background.
I need to send these updates to a server. I'd like to do it as soon as possible, but it isn't absolutely necessary.
If I receive a location update in the background, am I allowed to send the data to a server immediately using an NSURLRequest? Do I need to call "beginBackgroundTaskWithExpirationHandler" to request time for the request to complete?
Or, should I just store the location update in a local database and send it when the app is running in the foreground?
I'm assuming that I can use an expression such as "[[UIApplication sharedApplication] applicationState] != UIApplicationStateActive" in my CLLocationManagerDelegate callback to determine whether I'm getting locations in the background.
Thanks!