rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
287 stars 320 forks source link

[IOS] Location updates not coming in the background #117

Closed rsbthebest closed 3 years ago

rsbthebest commented 3 years ago

Hi Team,

First of all thanks a lot for this plugin it's extremely useful!

While it is working great for me on Android am facing some issue on IOS.

Here is what I have tried:

  1. Copies the Example code given here
  2. Gave all the needed permission in XCode
  3. Tried running the app

Expectation: I should be able to see location updates when

Monitored the logs coming from the app and found that am only getting location updates when the app is in the foreground.

Am I missing anything here? How can I make sure the location updates are coming even when the phone is locked or the app is minimized?

Please let me know if any other details are needed!

Regards, Rajdeep Barad

mehdok commented 3 years ago

What is your test device? Are you testing on real phone or simulator?

mehul1891 commented 3 years ago

Mehdi,

I support Rajdeep with this. We are testing on a real device - iPhone 6S with the latest iOS version installed.

On the app settings on device: Background Refresh is ON, Location capture is set to "Always" Xcode: background capabilities are enabled for location updates, background fetch and background processing Info.plist screenshot attached too.

Thanks, Mehul

image
mehdok commented 3 years ago

Try to simulate location update with iSpoofer and see if you can receive any location update or not. If not, try the example app and see if situation is the same or not;

rsbthebest commented 3 years ago

We have already tried the example app and it's the same behaviour there.

I will try the iSpoofer and would let you know the results but am not sure if that will help here.

mehdok commented 3 years ago

Any update?

mehdok commented 3 years ago

Closed the issue due inactivity, feel free to open it anytime;