This demo project was created to test collecting GPS coordinates while iOS app is in background.
- Build & Run project
- Allow to use «Your Current Location»
- Check either «Background App Refresh» is allowed or not:
- go to settings
- general
- choose «Background App Refresh»
- switcher opposite «Background GPS» should be enabled
- Go back to application and switch on switcher in upper toolbar
- Now you can collect coordinates while application is in background!
You can adjust coordinates update distance by going to BGMainTVC.m
and in ViewDidLoad
method change distanceFilter
property for self.locationManager
(1.0f == 1 meter).