AppsDev
AppsDev

Reputation: 12499

Updating locations while app in background working on simulator but not on device (iOS 9)

I have enabled Background Modes > Location updates in my target's capabilites. I run the app in an iOS 9 simulator, I put the app in background state with Location > City run in the simulator, and it seems to keep getting location updates. But I run the app in a real iOS 9 device and few seconds after going to background, I loose the location services arrow in the status bar and no location updates are received.

On the other hand, I've run the app in a real iOS 8 device and it seems to keep listening for locations (the arrow in the status bar does not disappear).

Why are location services stopping in background in an iOS 9 real iPhone?

I need help to solve this, thanks in advance.

Upvotes: 9

Views: 1049

Answers (1)

rmp
rmp

Reputation: 3513

With iOS 9 you also need to set allowsBackgroundLocationUpdates to yes. See the docs here

Upvotes: 15

Related Questions