react-native-background-geolocation 4.7.1 → 4.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +29 -3
  2. package/android/libs/com/transistorsoft/tslocationmanager/{3.1.42/tslocationmanager-3.1.42.aar → 3.2.1/tslocationmanager-3.2.1.aar} +0 -0
  3. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.md5 +1 -0
  4. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.sha1 +1 -0
  5. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.sha256 +1 -0
  6. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.sha512 +1 -0
  7. package/android/libs/com/transistorsoft/tslocationmanager/{3.1.42/tslocationmanager-3.1.42.pom → 3.2.1/tslocationmanager-3.2.1.pom} +1 -1
  8. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.md5 +1 -0
  9. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.sha1 +1 -0
  10. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.sha256 +1 -0
  11. package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.sha512 +1 -0
  12. package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +5 -11
  13. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.1.42/tslocationmanager-reverse-3.1.42.aar → 3.2.1/tslocationmanager-reverse-3.2.1.aar} +0 -0
  14. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.md5 +1 -0
  15. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.sha1 +1 -0
  16. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.sha256 +1 -0
  17. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.sha512 +1 -0
  18. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.1.42/tslocationmanager-reverse-3.1.42.pom → 3.2.1/tslocationmanager-reverse-3.2.1.pom} +1 -1
  19. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.md5 +1 -0
  20. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.sha1 +1 -0
  21. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.sha256 +1 -0
  22. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.sha512 +1 -0
  23. package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +5 -11
  24. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/Info.plist +9 -9
  25. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSLocation.h +2 -0
  26. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Info.plist +0 -0
  27. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/TSLocationManager +0 -0
  28. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSLocation.h +2 -0
  29. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
  30. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
  31. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
  32. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
  33. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +4 -4
  34. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSLocation.h +2 -0
  35. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +4 -4
  36. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
  37. package/package.json +2 -14
  38. package/src/declarations/types.d.ts +1 -0
  39. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.aar.md5 +0 -1
  40. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.aar.sha1 +0 -1
  41. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.aar.sha256 +0 -1
  42. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.aar.sha512 +0 -1
  43. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.pom.md5 +0 -1
  44. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.pom.sha1 +0 -1
  45. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.pom.sha256 +0 -1
  46. package/android/libs/com/transistorsoft/tslocationmanager/3.1.42/tslocationmanager-3.1.42.pom.sha512 +0 -1
  47. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.aar.md5 +0 -1
  48. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.aar.sha1 +0 -1
  49. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.aar.sha256 +0 -1
  50. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.aar.sha512 +0 -1
  51. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.pom.md5 +0 -1
  52. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.pom.sha1 +0 -1
  53. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.pom.sha256 +0 -1
  54. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.1.42/tslocationmanager-reverse-3.1.42.pom.sha512 +0 -1
  55. package/react-native.config.js +0 -20
  56. package/scripts/postlink.js +0 -146
  57. package/scripts/postunlink.js +0 -128
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.8.2 — 2022-08-08
4
+ * [Android] Fix `java.lang.IllegalArgumentException `TSProviderManager.handleProviderChangeEvent`.
5
+ * [Android] `startOnBoot: false` with `stopOnTerminate: false` could start-on-boot.
6
+ * [Android] `State.enabled` returned by calling `.stop()` returns `true` due to implementation running in a background-thread but `callback` executed immediately on the main-thread. However, requesting `.getState()` immediately after calling `.stop` *would* return the correct value of `State.enabled`
7
+ * [Android] Fix `notification.sticky` not being respected.
8
+
9
+ ## 4.8.1 — 2022-06-28
10
+ * Fix issue for react-native 0.69: They made a breaking change with the old, unused react-native.config.js, causing builds to fail. Simply delete the file `react-native.config.js`.
11
+
12
+ ## 4.8.0 — 2022-06-21
13
+ * [Android] Fix bug in `onProviderChange` event: not properly detecting when location-services disabled.
14
+ * [Android] __Android 12__: Guard `Context.startForegroundService` with `try / catch`: the plugin will now catch exception `ForegroundServiceStartNotAllowedException` and automatically retry with an `AlarmManager` *oneShot* event.
15
+ * [Android] __Android 12__: Refactor foreground-service management for Android 12: A way has been found to restore the traditional behaviour of foreground-services, allowing them to stop when no longer required (eg: where the plugin is in the stationary state).
16
+ * [Android] Refactor application life-cycle management. Remove deprecated permission `android.permission.GET_TASKS` traditionally used for detecting when the app has been terminated. The new life-cycle mgmt system can detect Android headless-mode in a much more elegant manner.
17
+ * [Android] Better handling for `WhenInUse` behaviour: The plugin will not allow `.changePace(true)` to be executed when the app is in the background (since Android forbids location-services to initiated in the background with `WhenInUse`).
18
+ * [Android] Refactor `useSignificantChangesOnly` behaviour. Will use a default `motionTriggerDelay` with minimum 60000ms, minimum `distanceFilter: 250` and enforced `stopTimeout: 20`.
19
+ * [iOS] iOS 15 has finally implemented *Mock Location Detection*. `location.mock` will now be present for iOS when the location is mocked, just like Android.
20
+
21
+ ## 4.7.2 — Unreleased
22
+ * [Android] Re-factor onProviderChange. Add broadcast-receiver for `AIRPLANE_MODE` detection.
23
+ * [Android] Add guard against Android 12 issue where location-services fail to turn off after terminate and plugin enters stationary state.
24
+ * [Android] Prevent recording motionchange position from running after onProviderChange.
25
+ * [Android] Fix bug in Android 12 support for executing `.start()` in background while terminated. Used `JobScheduler` ONESHOT instead of `AlarmManager`.
26
+ * [Android] Plugin could be placed into an infinite loop requesting motionchange position in some cases.
27
+ * [Android] Address `ConcurrentModificationException` in `onPermissionGranted`.
28
+
3
29
  ## 4.7.1 — 2022-05-12
4
30
  * [Android] If on device reboot location-services fails to provide a location (eg: timeout, airplane mode), the plugin would rely on motion API events to try again. This is a problem if the motion api is disabled. Instead, the SDK will keep trying to retrieve a location.
5
31
  * [Android] Android 12 support for `ForegroundServiceStartNotAllowedException`: immediately launch the SDK's `TrackingService` as soon as `.start()` executes. If a location-timeout occurs while fetching the onMotionChange position after device reboot with `startOnBoot: true`, the `ForegroundServiceStartNotAllowedException` could be raised.
@@ -452,10 +478,10 @@ Replace `@available` macro with `SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO`.
452
478
  - [Added] iOS 13 support.
453
479
  - [Added] Auto-linking support. Do not use `react-native link` anymore. See the Setup docs for Android and iOS. Before installing `3.2.0`, first `react-native unlink` both `background-geolocation` and `background-fetch`.
454
480
 
455
- :warning: If you have a previous version of **`react-native-background-geolocation-android < 3.2.0`** installed into **`react-native >= 0.60`**, you should first `unlink` your previous version as `react-native link` is no longer required.
481
+ :warning: If you have a previous version of **`react-native-background-geolocation < 3.2.0`** installed into **`react-native >= 0.60`**, you should first `unlink` your previous version as `react-native link` is no longer required.
456
482
 
457
483
  ```bash
458
- $ react-native unlink react-native-background-geolocation-android
484
+ $ react-native unlink react-native-background-geolocation
459
485
  ```
460
486
 
461
487
  - [Fixed] Android Geofence `DWELL` transition (`notifyOnDwell: true`) not firing.
@@ -627,7 +653,7 @@ Logging for Android background-tasks looks like this (when you see an hourglass,
627
653
  - [Added] New custom Android debug sound FX. See the [Config.debug](https://transistorsoft.github.io/cordova-background-geolocation/interfaces/_cordova_background_geolocation_.config.html#debug) for a new decription of iOS / Android sound FX **including a media player to play each.**
628
654
  ![](https://dl.dropbox.com/s/zomejlm9egm1ujl/Screenshot%202019-03-26%2023.10.50.png?dl=1)
629
655
 
630
- :warning: These debug sound FX consume about **1.4MB** in the plugin's `tslocationmanager.aar`. These assets can easily be stripped in your `release` builds by adding the following gradle task to your `app/build.gradle` (I'm working on an automated solution within the context of the plugin's `build.gradle`; so far, no luck). [Big thanks](https://github.com/transistorsoft/react-native-background-geolocation-android/issues/667#issuecomment-475928108) to @mikehardy.
656
+ :warning: These debug sound FX consume about **1.4MB** in the plugin's `tslocationmanager.aar`. These assets can easily be stripped in your `release` builds by adding the following gradle task to your `app/build.gradle` (I'm working on an automated solution within the context of the plugin's `build.gradle`; so far, no luck). [Big thanks](https://github.com/transistorsoft/react-native-background-geolocation/issues/667#issuecomment-475928108) to @mikehardy.
631
657
  ```gradle
632
658
  /**
633
659
  * Purge Background Geolocation debug sounds from release build.
@@ -0,0 +1 @@
1
+ d1f338342a6b4714431bd69e74f9354bc5268bfa
@@ -0,0 +1 @@
1
+ 5597fbdd9d6e2d87eca19a1a7238ed82aca83c8d0436125518695c476a184358
@@ -0,0 +1 @@
1
+ 8e346c97fe1a4e11d2e33af81721f718c326b8cfd4be244e5be38f2133f460c7ff061d2d7f392e0367cdeab10532c5833eaf47340b0d50a11647a69cab34ff65
@@ -4,6 +4,6 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>com.transistorsoft</groupId>
6
6
  <artifactId>tslocationmanager</artifactId>
7
- <version>3.1.42</version>
7
+ <version>3.2.1</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ 2db67d0f6798503fd4440edea5171b21e9f9bfbd
@@ -0,0 +1 @@
1
+ 9ba3bcbd6bbcbc3dfd98057bde36f3b39606241ba7baa5e8dc4ea89c4b7d5c7a
@@ -0,0 +1 @@
1
+ 88d0a3bd8afee17c06b804c6ee5f765ec672520e6a9b178f7a5a51562ed26b5ecbef5791592fc9a745512204a039dbc804191e6a62c9a8e32b02327bec0d50af
@@ -3,18 +3,12 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager</artifactId>
5
5
  <versioning>
6
- <latest>3.1.42</latest>
7
- <release>3.1.42</release>
6
+ <latest>3.2.1</latest>
7
+ <release>3.2.1</release>
8
8
  <versions>
9
- <version>3.1.35</version>
10
- <version>3.1.36</version>
11
- <version>3.1.37</version>
12
- <version>3.1.38</version>
13
- <version>3.1.39</version>
14
- <version>3.1.40</version>
15
- <version>3.1.41</version>
16
- <version>3.1.42</version>
9
+ <version>3.2.0</version>
10
+ <version>3.2.1</version>
17
11
  </versions>
18
- <lastUpdated>20220511185706</lastUpdated>
12
+ <lastUpdated>20220722145448</lastUpdated>
19
13
  </versioning>
20
14
  </metadata>
@@ -0,0 +1 @@
1
+ 337d3d9c4bd55eaac23348d1e01d809dac696048e65185d65ef1ba297d342bd2
@@ -0,0 +1 @@
1
+ effbddd7a535509f151a58d4d7a563f96d50fccc50d1b290a2dfc2e7c4257e38ff13ed3122c42333180511c027a3835740d032887478c46bbd0ce74f6ad00c8e
@@ -4,6 +4,6 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>com.transistorsoft</groupId>
6
6
  <artifactId>tslocationmanager-reverse</artifactId>
7
- <version>3.1.42</version>
7
+ <version>3.2.1</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ 051c689812b4e4d8b32c9b1a9a7fedd439542ea0bf604a101f1628ad49a2f161
@@ -0,0 +1 @@
1
+ 062e0991d8d633a9e4e80c7ef7e42e9324f11ddf108f19a41a904b63bb740a471c4b574cde36eb472350047d80272d597132bf08b7caa5ccc14ba8ef4c3e8abd
@@ -3,18 +3,12 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager-reverse</artifactId>
5
5
  <versioning>
6
- <latest>3.1.42</latest>
7
- <release>3.1.42</release>
6
+ <latest>3.2.1</latest>
7
+ <release>3.2.1</release>
8
8
  <versions>
9
- <version>3.1.35</version>
10
- <version>3.1.36</version>
11
- <version>3.1.37</version>
12
- <version>3.1.38</version>
13
- <version>3.1.39</version>
14
- <version>3.1.40</version>
15
- <version>3.1.41</version>
16
- <version>3.1.42</version>
9
+ <version>3.2.0</version>
10
+ <version>3.2.1</version>
17
11
  </versions>
18
- <lastUpdated>20220511185706</lastUpdated>
12
+ <lastUpdated>20220722145448</lastUpdated>
19
13
  </versioning>
20
14
  </metadata>
@@ -6,47 +6,47 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_x86_64-maccatalyst</string>
9
+ <string>ios-arm64_i386_x86_64-simulator</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>TSLocationManager.framework</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
+ <string>i386</string>
15
16
  <string>x86_64</string>
16
17
  </array>
17
18
  <key>SupportedPlatform</key>
18
19
  <string>ios</string>
19
20
  <key>SupportedPlatformVariant</key>
20
- <string>maccatalyst</string>
21
+ <string>simulator</string>
21
22
  </dict>
22
23
  <dict>
23
24
  <key>LibraryIdentifier</key>
24
- <string>ios-arm64_i386_x86_64-simulator</string>
25
+ <string>ios-arm64_armv7</string>
25
26
  <key>LibraryPath</key>
26
27
  <string>TSLocationManager.framework</string>
27
28
  <key>SupportedArchitectures</key>
28
29
  <array>
29
30
  <string>arm64</string>
30
- <string>i386</string>
31
- <string>x86_64</string>
31
+ <string>armv7</string>
32
32
  </array>
33
33
  <key>SupportedPlatform</key>
34
34
  <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>simulator</string>
37
35
  </dict>
38
36
  <dict>
39
37
  <key>LibraryIdentifier</key>
40
- <string>ios-arm64_armv7</string>
38
+ <string>ios-arm64_x86_64-maccatalyst</string>
41
39
  <key>LibraryPath</key>
42
40
  <string>TSLocationManager.framework</string>
43
41
  <key>SupportedArchitectures</key>
44
42
  <array>
45
43
  <string>arm64</string>
46
- <string>armv7</string>
44
+ <string>x86_64</string>
47
45
  </array>
48
46
  <key>SupportedPlatform</key>
49
47
  <string>ios</string>
48
+ <key>SupportedPlatformVariant</key>
49
+ <string>maccatalyst</string>
50
50
  </dict>
51
51
  </array>
52
52
  <key>CFBundlePackageType</key>
@@ -72,6 +72,8 @@ typedef enum tsLocationType : NSInteger {
72
72
  * to the plugin's database, nor are they posted to your configured #url
73
73
  */
74
74
  @property (nonatomic, readonly) BOOL isSample;
75
+
76
+ @property (nonatomic, readonly) BOOL mock;
75
77
  /**
76
78
  * YES when this location was provided to a heartbeat event
77
79
  */
@@ -72,6 +72,8 @@ typedef enum tsLocationType : NSInteger {
72
72
  * to the plugin's database, nor are they posted to your configured #url
73
73
  */
74
74
  @property (nonatomic, readonly) BOOL isSample;
75
+
76
+ @property (nonatomic, readonly) BOOL mock;
75
77
  /**
76
78
  * YES when this location was provided to a heartbeat event
77
79
  */
@@ -102,7 +102,7 @@
102
102
  </data>
103
103
  <key>Headers/TSLocation.h</key>
104
104
  <data>
105
- ZOhXybXZGss84kW1u83mEd3w49o=
105
+ 1mg7Br/BpsMYtl9RvmFgPHnnysI=
106
106
  </data>
107
107
  <key>Headers/TSLocationManager.h</key>
108
108
  <data>
@@ -138,7 +138,7 @@
138
138
  </data>
139
139
  <key>Info.plist</key>
140
140
  <data>
141
- 2fwUhP/XxcH3Zc7lGewfTh2dvI4=
141
+ YDZTb0oJE3fq+OMxysmlktNu66E=
142
142
  </data>
143
143
  <key>Modules/module.modulemap</key>
144
144
  <data>
@@ -415,11 +415,11 @@
415
415
  <dict>
416
416
  <key>hash</key>
417
417
  <data>
418
- ZOhXybXZGss84kW1u83mEd3w49o=
418
+ 1mg7Br/BpsMYtl9RvmFgPHnnysI=
419
419
  </data>
420
420
  <key>hash2</key>
421
421
  <data>
422
- TSvnvdnSzHeA3LKw8qJMQJR/HBmlgLQ+446VE9u1atk=
422
+ FTWiNKgNFY9FMbZbJc/dKCyrfir0MadGghuUTPFStXU=
423
423
  </data>
424
424
  </dict>
425
425
  <key>Headers/TSLocationManager.h</key>
@@ -72,6 +72,8 @@ typedef enum tsLocationType : NSInteger {
72
72
  * to the plugin's database, nor are they posted to your configured #url
73
73
  */
74
74
  @property (nonatomic, readonly) BOOL isSample;
75
+
76
+ @property (nonatomic, readonly) BOOL mock;
75
77
  /**
76
78
  * YES when this location was provided to a heartbeat event
77
79
  */
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>21E230</string>
6
+ <string>21E258</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -27,7 +27,7 @@
27
27
  <key>DTCompiler</key>
28
28
  <string>com.apple.compilers.llvm.clang.1_0</string>
29
29
  <key>DTPlatformBuild</key>
30
- <string>13E113</string>
30
+ <string>13E500a</string>
31
31
  <key>DTPlatformName</key>
32
32
  <string>macosx</string>
33
33
  <key>DTPlatformVersion</key>
@@ -37,9 +37,9 @@
37
37
  <key>DTSDKName</key>
38
38
  <string>macosx12.3</string>
39
39
  <key>DTXcode</key>
40
- <string>1330</string>
40
+ <string>1331</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>13E113</string>
42
+ <string>13E500a</string>
43
43
  <key>LSMinimumSystemVersion</key>
44
44
  <string>10.15</string>
45
45
  <key>UIDeviceFamily</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-background-geolocation",
3
- "version": "4.7.1",
3
+ "version": "4.8.2",
4
4
  "description": "The most sophisticated cross-platform background location-tracking & geofencing module with battery-conscious motion-detection intelligence",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -26,24 +26,12 @@
26
26
  "bugs": {
27
27
  "url": "https://github.com/transistorsoft/react-native-background-geolocation/issues"
28
28
  },
29
- "rnpm": {
30
- "commands": {
31
- "postlink": "node node_modules/react-native-background-geolocation/scripts/postlink.js",
32
- "postunlink": "node node_modules/react-native-background-geolocation/scripts/postunlink.js"
33
- },
34
- "ios": {
35
- "sharedLibraries": [
36
- "libsqlite3",
37
- "libz"
38
- ]
39
- }
40
- },
41
29
  "homepage": "https://www.transistorsoft.com/shop/products/react-native-background-geolocation",
42
30
  "peerDependencies": {
43
31
  "react-native": ">=0.36.0"
44
32
  },
45
33
  "dependencies": {
46
- "react-native-background-fetch": "~4.1.0"
34
+ "react-native-background-fetch": "~4.1.1"
47
35
  },
48
36
  "devDependencies": {
49
37
  "@transistorsoft/typedoc-theme": "^2.0.8",
@@ -137,6 +137,7 @@ declare module "react-native-background-geolocation" {
137
137
  * | 0 | Location unknown |
138
138
  * | 1 | Location permission denied |
139
139
  * | 2 | Network error |
140
+ * | 3 | Attempt to initiate location-services in background with WhenInUse authorization |
140
141
  * | 408 | Location timeout |
141
142
  * | 499 | Location request cancelled |
142
143
  */
@@ -1 +0,0 @@
1
- 4cb273adbe765985f6d884ace49f39f297abaa21
@@ -1 +0,0 @@
1
- 726a2b570487857b13ec1d10119b1035ef9fa45d9fad5403a322a1d860eac1c9
@@ -1 +0,0 @@
1
- 36345f129a903c64d3d23b0bce54bfda9ef9e4f699f776574a64e5d3cfa83e51773293c8fcc749f9c8a77b54978b6a8779a472df0134b78a2b003d4372591deb
@@ -1 +0,0 @@
1
- 55995b5273ed85d89bca853b98f156c39b93f542
@@ -1 +0,0 @@
1
- fcf36f752c24fe2713d6874e3ffcbce93f3a380675c852d98070749399d3d84a
@@ -1 +0,0 @@
1
- a172944a2335a4cbfcc849be29897c263064f7f0f6e2813366e21e7130e0c2ca11483b8f7d542d878e4ea02a074fb3a3253cc7ad5b9c0c127cf3e45dcfe116af
@@ -1 +0,0 @@
1
- 2a0898d7cdf20c1bcab7aa723aef768fc0602195a3b617631e13d15cb3baf715
@@ -1 +0,0 @@
1
- 3bb15942716a824a0a8f43cd13ca6a309c45a6d77221da6ec071eca1e0260a7ece95b7f349acbad83f95d2c0da0f9e5806f5f7b7ea638f326495c1a1589207b5
@@ -1 +0,0 @@
1
- d67d171ffa78562a8fa14915fb3ef17d513a8e05021829379c6d8faa86f1e2ef
@@ -1 +0,0 @@
1
- 68fd8c5690c0749400fbed117a62e5603df4f2159b201d423dbf92717a6b8e7e9a75e81fcabee6d0906555151f1d194f80bb5ff1e76ed719834dabec1bbea1d2
@@ -1,20 +0,0 @@
1
- module.exports = {
2
- // config for a library is scoped under "dependency" key
3
- dependency: {
4
- platforms: {
5
- ios: {
6
- "sharedLibraries": [
7
- "libsqlite3",
8
- "libz"
9
- ]
10
- },
11
- android: {}, // projects are grouped into "platforms"
12
- },
13
- assets: [], // stays the same
14
- // hooks are considered anti-pattern, please avoid them
15
- hooks: {
16
- "postlink": "node node_modules/react-native-background-geolocation/scripts/postlink.js",
17
- "postunlink": "node node_modules/react-native-background-geolocation/scripts/postunlink.js"
18
- },
19
- },
20
- };
@@ -1,146 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const path = require('path');
4
- const fs = require('fs');
5
- const xcode = require('xcode');
6
- const PbxFile = require('xcode/lib/pbxFile');
7
- const helpers = require('./xcode-helpers');
8
-
9
- const projectDirectory = process.cwd();
10
- const moduleDirectory = path.resolve(__dirname, '..');
11
-
12
- ////
13
- // iOS
14
- //
15
- const sourceDirectory = path.join(projectDirectory, 'ios');
16
- const xcodeProjectDirectory = helpers.findProject(sourceDirectory);
17
-
18
- const projectConfig = {
19
- sourceDir: sourceDirectory,
20
- pbxprojPath: path.join(
21
- projectDirectory,
22
- 'ios',
23
- xcodeProjectDirectory,
24
- 'project.pbxproj'
25
- ),
26
- };
27
-
28
- const pathToFramework = path.relative(
29
- projectConfig.sourceDir,
30
- path.join(
31
- moduleDirectory,
32
- 'ios',
33
- 'RNBackgroundGeolocation',
34
- 'TSLocationManager.framework'
35
- )
36
- );
37
-
38
-
39
- const project = xcode.project(projectConfig.pbxprojPath).parseSync();
40
-
41
- /**
42
- * There is a method in node-xcode that offers similar functionality than what
43
- * is implemented below `addFramework` (https://github.com/alunny/node-xcode/blob/ffb938b/lib/pbxProject.js#L300)
44
- * but unfortunately it won't work for our use-case because there are two other
45
- * methods in node-xcode that are being used by `addFramework` that don't work
46
- * as expected:
47
- * 1 `addToFrameworksPbxGroup` fails if no group with the name "Frameworks" exists
48
- * https://github.com/alunny/node-xcode/blob/ffb938b/lib/pbxProject.js#L641
49
- * - https://github.com/alunny/node-xcode/issues/43
50
- * - this issue could be worked around by just checking if the group exists and
51
- * creating it if it doesn't exist before executing `addFramework`
52
- * 2 `addToFrameworkSearchPaths` doesn't work with react-native:
53
- * https://github.com/alunny/node-xcode/blob/ffb938b/lib/pbxProject.js#L1125
54
- * - https://github.com/alunny/node-xcode/issues/91
55
- * - https://github.com/alunny/node-xcode/pull/99
56
- * - the issue there is that https://github.com/alunny/node-xcode/blob/ffb938b/lib/pbxProject.js#L1133
57
- * in react-native projects the "PRODUCT_NAME" is "$(TARGET_NAME)", so it won't
58
- * be visited by this method.
59
- * And even if the name would be correct it still wouldn't work correctly for
60
- * react-native projects, because not all targets should get the library added
61
- * for example: react-native creates *tests and *tvOs and *tvOstests targets.
62
- */
63
- const file = new PbxFile(pathToFramework);
64
- file.uuid = project.generateUuid();
65
- file.fileRef = project.generateUuid();
66
- file.path = pathToFramework;
67
- file.target = project.getFirstTarget().uuid;
68
-
69
- if (!project.hasFile(file.path)) {
70
- project.addToPbxBuildFileSection(file);
71
- project.addToPbxFileReferenceSection(file);
72
- // addToFrameworksPbxGroup crashes when it can't find a group named "Frameworks"
73
- if (!project.pbxGroupByName('Frameworks')) {
74
- project.addPbxGroup([], 'Frameworks');
75
- }
76
- project.addToFrameworksPbxGroup(file);
77
- project.addToPbxFrameworksBuildPhase(file);
78
- }
79
-
80
- // Is this a Cocoapods installation?
81
- const podFile = path.join(sourceDirectory, 'Podfile');
82
- const hasPodfile = fs.existsSync(podFile);
83
- if (!hasPodfile) {
84
- // Only add FRAMEWORK_SEARCH_PATHS for non-Cocoapod installation
85
- helpers.addToFrameworkSearchPaths(
86
- project,
87
- '$(PROJECT_DIR)/' +
88
- path.relative(
89
- projectConfig.sourceDir,
90
- path.join(moduleDirectory, 'ios')
91
- ),
92
- true
93
- );
94
- } else {
95
- helpers.addToFrameworkSearchPaths(
96
- project,
97
- '$(inherited)',
98
- false
99
- );
100
- }
101
-
102
-
103
- // enable BackgroundModes in xcode project without overriding any previously
104
- // defined values in the project file.
105
- // That's why we deep clone all previously defined target attributes and extend
106
- // them with our target attributes.
107
- const targetAttributes = helpers.getTargetAttributes(project);
108
- const systemCapabilities = Object.assign({}, (targetAttributes.SystemCapabilities || {}), {
109
- 'com.apple.BackgroundModes': Object.assign(
110
- {},
111
- targetAttributes['com.apple.BackgroundModes'] || {},
112
- { enabled: true }
113
- ),
114
- });
115
- if (targetAttributes.SystemCapabilities) {
116
- targetAttributes.SystemCapabilities = systemCapabilities;
117
- } else {
118
- project.addTargetAttribute('SystemCapabilities', systemCapabilities);
119
- }
120
-
121
- // add "location" background mode to Info.plist file
122
- const plist = helpers.readPlist(projectConfig.sourceDir, project);
123
- const UIBackgroundModes = plist.UIBackgroundModes || [];
124
- if (UIBackgroundModes.indexOf('location') === -1) {
125
- plist.UIBackgroundModes = UIBackgroundModes.concat('location');
126
- }
127
-
128
- // Add NSLocationAlwaysUsageDescription
129
- if (!plist.NSLocationAlwaysUsageDescription) {
130
- plist.NSLocationAlwaysUsageDescription = "CHANGEME: Location Always Usage Description";
131
- }
132
-
133
- // Add NSLocationAlwaysAndWhenInUseUsageDescription
134
- if (!plist.NSLocationAlwaysAndWhenInUseUsageDescription) {
135
- plist.NSLocationAlwaysAndWhenInUseUsageDescription = "CHANGEME: Location Always And When In Use Usage Description";
136
- }
137
-
138
- // Add NSMotionUsageDescription
139
- if (!plist.NSMotionUsageDescription) {
140
- plist.NSMotionUsageDescription = "CHANGEME: Motion updates increase battery efficiency by intelligently toggling location-services when device is detected to be moving";
141
- }
142
-
143
- helpers.writePlist(projectConfig.sourceDir, project, plist);
144
- fs.writeFileSync(projectConfig.pbxprojPath, project.writeSync());
145
-
146
-
@@ -1,128 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const path = require('path');
4
- const fs = require('fs');
5
- const xcode = require('xcode');
6
- const PbxFile = require('xcode/lib/pbxFile');
7
- const helpers = require('./xcode-helpers');
8
-
9
- const projectDirectory = process.cwd();
10
- const moduleDirectory = path.resolve(__dirname, '..');
11
- const sourceDirectory = path.join(projectDirectory, 'ios');
12
- const xcodeProjectDirectory = helpers.findProject(sourceDirectory);
13
-
14
- const projectConfig = {
15
- sourceDir: sourceDirectory,
16
- pbxprojPath: path.join(
17
- projectDirectory,
18
- 'ios',
19
- xcodeProjectDirectory,
20
- 'project.pbxproj'
21
- ),
22
- };
23
-
24
- const pathToFramework = path.relative(
25
- projectConfig.sourceDir,
26
- path.join(
27
- moduleDirectory,
28
- 'ios',
29
- 'RNBackgroundGeolocation',
30
- 'TSLocationManager.framework'
31
- )
32
- );
33
-
34
- const project = xcode.project(projectConfig.pbxprojPath).parseSync();
35
-
36
- const file = new PbxFile(pathToFramework);
37
- file.target = project.getFirstTarget().uuid;
38
-
39
- project.removeFromPbxBuildFileSection(file);
40
- project.removeFromPbxFileReferenceSection(file);
41
- if (project.pbxGroupByName('Frameworks')) {
42
- project.removeFromFrameworksPbxGroup(file);
43
- }
44
- project.removeFromPbxFrameworksBuildPhase(file);
45
-
46
- // Is this a Cocoapods installation?
47
- const podFile = path.join(sourceDirectory, 'Podfile');
48
- const hasPodfile = fs.existsSync(podFile);
49
- if (!hasPodfile) {
50
- helpers.removeFromFrameworkSearchPaths(
51
- project,
52
- '$(PROJECT_DIR)/' +
53
- path.relative(
54
- projectConfig.sourceDir,
55
- path.join(moduleDirectory, 'ios')
56
- )
57
- );
58
- }
59
-
60
- // disable BackgroundModes and remove "fetch" mode from plist file
61
- const systemCapabilities = helpers.getTargetAttributes(project).SystemCapabilities;
62
- if (systemCapabilities && systemCapabilities['com.apple.BackgroundModes']) {
63
- delete systemCapabilities['com.apple.BackgroundModes'].enabled;
64
- if (Object.keys(systemCapabilities['com.apple.BackgroundModes']).length === 0) {
65
- delete systemCapabilities['com.apple.BackgroundModes'];
66
- }
67
-
68
- if (Object.keys(systemCapabilities).length === 0) {
69
- project.removeTargetAttribute('SystemCapabilities');
70
- }
71
- }
72
-
73
- const plist = helpers.readPlist(projectConfig.sourceDir, project);
74
- if (Array.isArray(plist.UIBackgroundModes)) {
75
- plist.UIBackgroundModes = plist.UIBackgroundModes.filter(
76
- mode => mode !== 'location'
77
- );
78
- if (plist.UIBackgroundModes.length === 0) {
79
- delete plist.UIBackgroundModes;
80
- }
81
- }
82
-
83
- helpers.writePlist(projectConfig.sourceDir, project, plist);
84
- fs.writeFileSync(projectConfig.pbxprojPath, project.writeSync());
85
-
86
- ////
87
- // Android
88
- // - Remove maven url
89
- // maven {
90
- // url "$rootDir/../node_modules/react-native-background-geolocation/android/libs"
91
- // }
92
- //
93
- const androidSrcDir = path.join(projectDirectory, 'android');
94
- const gradleFile = path.join(androidSrcDir, 'build.gradle');
95
- const moduleName = (process.platform === 'win32') ? moduleDirectory.split('\\').pop() : moduleDirectory.split('/').pop();
96
-
97
- fs.readFile(gradleFile, 'utf8', function (err,data) {
98
- if (err) {
99
- return console.log(err);
100
- }
101
- var re = new RegExp("[\\t?\\s?]+maven\\s?\\{[\\n?\\s?\\t?]+url.*" + moduleName + "\\/.*[\\n?\\t?\\s?]+\\}", "gm");
102
-
103
- if (data.match(re)) {
104
- fs.writeFile(gradleFile, data.replace(re, ''), 'utf8', function (err) {
105
- if (err) return console.log(err);
106
- });
107
- }
108
-
109
- });
110
-
111
- // Remove method-call purgeBackgroundGeolocationDebugResources(applicationVariants)
112
- const appGradleFile = path.join(androidSrcDir, 'app', 'build.gradle');
113
- const purgeMethodName = "purgeBackgroundGeolocationDebugResources";
114
-
115
- fs.readFile(appGradleFile, 'utf8', function(err, data) {
116
- if (err) {
117
- return console.log(err);
118
- }
119
- var purgeMethodRE = new RegExp("^[\\s\\t]+" + purgeMethodName + "\\(applicationVariants\\).*$[\\s\\n]+(.*)", "gm");
120
-
121
- if (purgeMethodRE.test(data)) {
122
- data = data.replace(purgeMethodRE, '\t$1');
123
- }
124
- fs.writeFile(appGradleFile, data, 'utf8', function (err) {
125
- if (err) return console.log(err);
126
- });
127
- });
128
-