Anyone seeing iOS11 issue with location services in background?

I have been testing on iOS11 beta versions between 4 and now 8 and I am sometimes seeing an issue where location services stop delivering GPS points when in the background. The logging that I have in the application isn't showing that any application delegate methods are firing, but the application seems to just go to sleep completely. No GPS is reported, nor core motion, etc. I have added the necessary entitlements for "Always On" that iOS11 requires as well, but the issue persists.

Replies

Yes we've been havng this issue as well on iOS 11 - Beta 7 (Trying Beta 8 now). Testing the app works fine in background for maybe 3-4 hours (On Beta 7 best case was 10), but haven't been successful getting locations updates beyond that. Did file a radar today to see if we can get any more background of known issue or development requirement. Maybe more people chiming in via radar will get it some attention and we can do more knowledge sharing here. Thanks

Seeing this is iOS 11 - beta 9 as well. Location updates periodically come through (`didUpdateLocations`), but CoreMotion data is completely stopped once the app goes out of the foreground. This is even with location access always permission.


Same code works fine on iOS 10.3.3

This has been driving me nuts. How are we at beta 9, a week before the GM release and this is still broke?

We also track CoreMotion in the background and have seen issues with iPhone 7 and iPhone 7 Plus. Earlier model phones haven't had the problem. Anyone else?

This mornings tests show me that I did have more consistency in my GPS and CoreMotion on an iPhone 6+ than the iPhone 7 that I used. Only having two devices though I can't draw any conclusions on this.

Some more data on this issue:

- Core Location events do get delivered as of Beta 9, but I did notice some "hiccups" on iPhone 7 (up to a 10 second interval without a location update.

- Core Motion events do not get delievered in the background on iPhone 7 / iPhone 7Plus. The events stop immediately the app goes to the background.

- Core Motion events DO get get delievered in the background on iPhone 5 / 6 models.

I'm running a longer test now and will report back.

The issue with Core Motion is still present as of iOS 11 beta 10 on iPhone 7 and 7 Plus.

I'm also seeing this problem. After some random period of time the location manager appears to stop returning locations completely. And worse, stopping and restarting the location manager has no effect - it still refuses to return locations.


I've only just started investigating it today, so don't have much to add yet. But we're supposedly less than a week away from iOS 11 going live, so fixing this is now an urgent priority.


I'm also seeing background tasks expire after equally random durations, which might be related. Though the two problems don't appear to be linked, in that the location manager can "die" even when the background task hasn't expired.


More disturbing is I'm seeing on one test device that even quitting and restarting the app doesn't fix the location manager. It still gets no locations! Which, put together with the background task expires, suggests iOS 11 is imposing some sort of strict (and black box) resource use limits, and simply refusing to provide location services to apps that have crossed these mysterious boundaries.

I am still observing this behavior on the GM Seed, anyone else continuing to have similar problems?

I´m experiencing the same but I suspect a memory allocation issue when the app is running in the background. So I think didenterregion or didexitregion gets called but the app crashes right after. Read more here:

https://forums.developer.apple.com/thread/86774

I do have this problem with missing location updates as well. But I think this has nothing to do with the memory or crashing .

I do not get any crash logs. Also in my case the App also receives "significant location change" update in addition to the "continuous location updates", so the App works fine with the only difference that instead of being able to save a coordinate approx every second, it will only get a few location updates when "significant location change" events are delivered, which is every 500 m or so. which is of course totally useless.


So only the standard location updates are missing. The rest works fine, no crashes, no memory issues.

Yes, I'm still having the problem. My app is using location and motion. Location updates seem to be good. Console is printing altitude and lat/lon but motion (rotation and accelerometer) stop immediately when the app goes the background.


Any new updates? 2 days from IOS11.... totally broken app.


For whatever it's worth, I'm using Iphone 7 Plus.


Thx

Any updates on this I'm seeing the same issue testing on 6 and 7. 6 works, 7 doesn't...

Dear all,


I have had the same problem. Apple has introduced a lot of new functionality over the latest iOS updates.


To name the solution that finally helped me (I had the same problem):

The CLLocationManager has an

      @property(assign, nonatomic) BOOL allowsBackgroundLocationUpdates;

since iOS9. It used to be default enabled, now it is not.


Hope this also helps someone else.

Best

Hndrik


Unfortunately this can not be the reason for the issue (at least not in my case), because I always had this property set to YES. Also the issue does not always occur. Sometimes it works just fine, the App gets location updates in the background. And then one day, the App does no longer get any. I did not yet found any pattern, when exactly the issue shows up. After the last reboot of my device it did not happen again.