mauron85 / react-native-background-geolocation

Background and foreground geolocation plugin for React Native. Tracks user when app is running in background.
Apache License 2.0
1.34k stars 565 forks source link

Background tracking works on Simulator but not on real device IOS! #533

Open volondio opened 3 years ago

volondio commented 3 years ago

Issuehunt badges

Your Environment

locationProvider: BackgroundGeolocation.RAW_PROVIDER,
startForeground: true,
desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
stationaryRadius: 10,
distanceFilter: 10,
locationTimeout: 30,
notificationTitle: "Maschinenring Burgenland",
notificationText: "Arbeitszeit läuft",
debug: false,
startOnBoot: false,
stopOnTerminate: true,
interval: 3000,
fastestInterval: 1500,
activitiesInterval: 3000,
stopOnStillActivity: false,
saveBatteryOnBackground: false,
activityType: "Fitness",
postTemplate: null,
httpHeaders: {
  "X-FOO": "bar",
},

Context

The background tracking works on simulator but not on a real device. On device the tracking stops, after sending the application to the background. I already have set all permissions needed for background tracking. I also set the background capabilities in xcode.

Allow "APP" to also use your location even when youre not using the app?
Keep only while using
Change to always allow

This message is shown in simulator but not on my device. In Simulator the background tracking works fine after submitting the change to always allow button.

Permissions i have set:

Privacy - Location Always and When In Use Usage Description,
Privacy - Location Always Usage Description
Privacy - Location When In Use Usage Description
Privacy - Motion Usage Description

Expected Behavior

The background tracking should work in on a real device too.

Actual Behavior

The background tracking does not work in on a real device.

Possible Fix

I think i just missed any configs because i already tried other libraries but still have the same problem

Steps to Reproduce

Context

I already tried other libraries but still have the same problem.

Debug logs


IssueHunt Summary ### Backers (Total: $0.00) #### [Become a backer now!](https://issuehunt.io/r/mauron85/react-native-background-geolocation/issues/533) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/mauron85/react-native-background-geolocation/issues/533) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/mauron85/react-native-background-geolocation/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
sergeylaptev commented 3 years ago

I have the same problem. Is there any fix for that?

ciaoamigoschat commented 3 years ago

Same problem too. Solution???

armandomendivil commented 3 years ago

@sergeylaptev @ciaoamigoschat i have the same problem, did you find the fix?

issuehunt-oss[bot] commented 3 years ago

@abner01061998 has funded $5.00 to this issue.


issuehunt-oss[bot] commented 3 years ago

@abner01061998 has cancelled funding for this issue.(Cancelled amount: $5.00) See it on IssueHunt

gigby commented 3 years ago

@sergeylaptev @ciaoamigoschat How did you solved this issue. I found 3 opened issue related to this but no one answered.