React-native-background-geolocation: forceSync() method not working on iOS

Created on 20 Apr 2020  路  3Comments  路  Source: mauron85/react-native-background-geolocation


forceSync() method not working on iOS

I am trying to create a solution where the received locations are shared with the API only after N locations, using syncUrl parameter. Except, when the user decides to stop sharing his location (by pressing a stop button) I want to force the synchronization of the locations that haven't been shared yet.

On iOS, the onSuccess of syncUrl() is not called. Same thing for getValidLocations().
Working on Android.

Your Environment


  • Plugin version: 0.6.3
  • Platform: iOS
  • OS version: 13.3.1
  • Device manufacturer and model: iPhone XR and iPhone 11
  • Running in Simulator: Both
  • React Native version: 0.62

System:
OS: macOS 10.15.3
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 132.63 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 13.12.0 - /usr/local/bin/node
Yarn: 1.22.0 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 23, 26, 27, 28, 29
Build Tools: 28.0.3
System Images: android-29 | Google Play Intel x86 Atom
Android NDK: 19.0.5232133
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6200805
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
npmPackages:
@react-native-community/cli: ^4.5.1 => 4.6.3
react: 16.11.0 => 16.11.0
react-native: 0.62.0 => 0.62.0
npmGlobalPackages:
react-native-cli: 2.0.1

Context


I receive onSuccess on android but not on iOS

Expected Behavior


Receive onSuccess on iOS

Actual Behavior

Possible Fix

Steps to Reproduce



1.
2.
3.
4.

Context

Well, I'm using url and not syncUrl on iOS because of this

Debug logs

Most helpful comment

Maybe by @time not recorded?

Seem like @mauron85 no longer maintain this project. Do you want to bring it to react-native-community?

All 3 comments

Probably not related but on android, I get strange results when testing the app with syncUrl mode enabled:

I get like a lot of locations and they are kind of unordered, as you can see on my screenshot :

test_locaiton

I was going from east to west, but according to the locations I kept going back and forth, and the total distance on the API was around 13km instead of around 2km

Maybe by @time not recorded?

Seem like @mauron85 no longer maintain this project. Do you want to bring it to react-native-community?

If this lib bring to react-native-community it will be best.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aemdy picture aemdy  路  4Comments

Batuhan-Akkaya picture Batuhan-Akkaya  路  4Comments

canerd7u picture canerd7u  路  7Comments

pewh picture pewh  路  6Comments

vinceprofeta picture vinceprofeta  路  5Comments