0
votes

I am developing one app, i would like to know about location manager that will it work when user remove the app from background in iOS 7 and above?

I am using this delegate method: -(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations;

Will it get called when the app is removed from background?

The distance filter i have set is 50 meters with desiredAccuracy of NearestHundredMeters.

Regards, Aamir

2

2 Answers

0
votes

if you want to run your app when app is removed from background, you have to follow some instruction which are in this document.

https://developer.apple.com/Library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html

-1
votes

If you would like a function to run in background simply go to AppDelegate and place your code block in the "applicationDidEnterBackground" function AppDelegate Location