react-native-background-geolocation 4.8.1 → 4.9.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 (69) hide show
  1. package/README.md +5 -7
  2. package/android/build.gradle +10 -2
  3. package/android/libs/com/transistorsoft/tslocationmanager/{3.2.0/tslocationmanager-3.2.0.aar → 3.2.6/tslocationmanager-3.2.6.aar} +0 -0
  4. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.md5 +1 -0
  5. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha1 +1 -0
  6. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha256 +1 -0
  7. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha512 +1 -0
  8. package/android/libs/com/transistorsoft/tslocationmanager/{3.2.0/tslocationmanager-3.2.0.pom → 3.2.6/tslocationmanager-3.2.6.pom} +1 -1
  9. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.md5 +1 -0
  10. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha1 +1 -0
  11. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha256 +1 -0
  12. package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha512 +1 -0
  13. package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +4 -5
  14. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.2.0/tslocationmanager-reverse-3.2.0.aar → 3.2.6/tslocationmanager-reverse-3.2.6.aar} +0 -0
  15. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.md5 +1 -0
  16. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.sha1 +1 -0
  17. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.sha256 +1 -0
  18. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.sha512 +1 -0
  19. package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.2.0/tslocationmanager-reverse-3.2.0.pom → 3.2.6/tslocationmanager-reverse-3.2.6.pom} +1 -1
  20. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.md5 +1 -0
  21. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.sha1 +1 -0
  22. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.sha256 +1 -0
  23. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.sha512 +1 -0
  24. package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +4 -5
  25. package/app.plugin.js +2 -0
  26. package/expo/plugin/build/androidPlugin.d.ts +6 -0
  27. package/expo/plugin/build/androidPlugin.js +102 -0
  28. package/expo/plugin/build/androidPlugin.js.map +1 -0
  29. package/expo/plugin/build/iOSPlugin.d.ts +4 -0
  30. package/expo/plugin/build/iOSPlugin.js +10 -0
  31. package/expo/plugin/build/iOSPlugin.js.map +1 -0
  32. package/expo/plugin/build/index.d.ts +8 -0
  33. package/expo/plugin/build/index.js +21 -0
  34. package/expo/plugin/build/index.js.map +1 -0
  35. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/Info.plist +9 -9
  36. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSAuthorization.h +1 -0
  37. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Info.plist +0 -0
  38. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/TSLocationManager +0 -0
  39. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorization.h +1 -0
  40. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
  41. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
  42. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
  43. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
  44. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +4 -4
  45. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorization.h +1 -0
  46. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +6 -6
  47. package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
  48. package/package.json +12 -6
  49. package/src/declarations/interfaces/Authorization.d.ts +28 -0
  50. package/src/declarations/interfaces/Config.d.ts +20 -0
  51. package/src/declarations/interfaces/Location.d.ts +12 -3
  52. package/src/declarations/interfaces/Notification.d.ts +7 -0
  53. package/CHANGELOG.md +0 -1235
  54. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.aar.md5 +0 -1
  55. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.aar.sha1 +0 -1
  56. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.aar.sha256 +0 -1
  57. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.aar.sha512 +0 -1
  58. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.pom.md5 +0 -1
  59. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.pom.sha1 +0 -1
  60. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.pom.sha256 +0 -1
  61. package/android/libs/com/transistorsoft/tslocationmanager/3.2.0/tslocationmanager-3.2.0.pom.sha512 +0 -1
  62. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.aar.md5 +0 -1
  63. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.aar.sha1 +0 -1
  64. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.aar.sha256 +0 -1
  65. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.aar.sha512 +0 -1
  66. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.pom.md5 +0 -1
  67. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.pom.sha1 +0 -1
  68. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.pom.sha256 +0 -1
  69. package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.0/tslocationmanager-reverse-3.2.0.pom.sha512 +0 -1
package/README.md CHANGED
@@ -43,16 +43,13 @@ The **[Android module](http://www.transistorsoft.com/shop/products/react-native-
43
43
 
44
44
  ## :large_blue_diamond: Installing the Plugin
45
45
 
46
- -------------------------------------------------------------
47
46
 
48
- :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.
47
+ ### With *Expo*
49
48
 
50
- ```bash
51
- $ react-native unlink react-native-background-geolocation
49
+ ```shell
50
+ npx expo install react-native-background-geolocation
52
51
  ```
53
52
 
54
- -------------------------------------------------------------
55
-
56
53
  ### With `yarn`
57
54
 
58
55
  ```bash
@@ -66,7 +63,8 @@ $ npm install react-native-background-geolocation --save
66
63
 
67
64
  ## :large_blue_diamond: Setup Guides
68
65
 
69
- ### `react-native >= 0.60`
66
+ ### Expo
67
+ - [Expo Setup](help/INSTALL-EXPO.md)
70
68
 
71
69
  ### iOS
72
70
  - [Auto-linking Setup](help/INSTALL-IOS-AUTO.md)
@@ -2,11 +2,11 @@ apply plugin: 'com.android.library'
2
2
 
3
3
  // Android dependencies
4
4
  def DEFAULT_COMPILE_SDK_VERSION = 31
5
- def DEFAULT_TARGET_SDK_VERSION = 30
5
+ def DEFAULT_TARGET_SDK_VERSION = 31
6
6
  def DEFAULT_APP_COMPAT_VERSION = "1.4.1"
7
7
 
8
8
  // Plugin dependencies
9
- def DEFAULT_GOOGLE_PLAY_SERVICES_LOCATION_VERSION = "19.0.1"
9
+ def DEFAULT_GOOGLE_PLAY_SERVICES_LOCATION_VERSION = "20.0.0"
10
10
  def DEFAULT_OK_HTTP_VERSION = "3.12.13"
11
11
  def DEFAULT_ANDROID_PERMISSIONS_VERSION = "2.1.6"
12
12
  def DEFAULT_EVENTBUS_VERSION = "3.3.1"
@@ -41,6 +41,14 @@ dependencies {
41
41
  // Prefer appCompatVersion vs supportLibVersion.
42
42
  def appCompatVersion = safeExtGet('appCompatVersion', DEFAULT_APP_COMPAT_VERSION)
43
43
  def playServicesLocationVersion = safeExtGet('googlePlayServicesLocationVersion', DEFAULT_GOOGLE_PLAY_SERVICES_LOCATION_VERSION)
44
+ def locationMajorVersion = playServicesLocationVersion.split('\\.')[0] as int
45
+ if (locationMajorVersion > 20) {
46
+ println("*****************************************************")
47
+ println("* [WARNING] background-geolocation requires a maximum googlePlayServicesLocationVersion of 20.0.0 due to breaking changes in v21")
48
+ println("* googlePlayServicesLocationVersion has been overridden to $DEFAULT_GOOGLE_PLAY_SERVICES_LOCATION_VERSION")
49
+ println("*****************************************************")
50
+ playServicesLocationVersion = DEFAULT_GOOGLE_PLAY_SERVICES_LOCATION_VERSION
51
+ }
44
52
  def okHttpVersion = safeExtGet('okHttpVersion', DEFAULT_OK_HTTP_VERSION)
45
53
  def androidPermissionsVersion = safeExtGet('androidPermissionsVersion', DEFAULT_ANDROID_PERMISSIONS_VERSION)
46
54
  def eventBusVersion = safeExtGet('eventBusVersion', DEFAULT_EVENTBUS_VERSION)
@@ -0,0 +1 @@
1
+ c65a6f4d0721d90fee84de3e60a2676a696866ef
@@ -0,0 +1 @@
1
+ 734dca901c9fa132ef04bcff43a2a20bc045e88cb7e55e9ca17fde2474f58672
@@ -0,0 +1 @@
1
+ 517eca12476d737d2b7469b4246d8f488654fd8355666910b9e4e5b641afe10c3fe963849926a607c13e03144308cc355c7b4dd3c5cf5532c815df2a374cbbf1
@@ -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.2.0</version>
7
+ <version>3.2.6</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ 9048834dc1ad2dc8047811dd58c2a8adf59798c1
@@ -0,0 +1 @@
1
+ 364bb683fb5235a848be6cf96b801852880b6ab6df36a4604b7e0ef43c653cbb
@@ -0,0 +1 @@
1
+ c2501c6c8c322cbc07839c36ee9ffcd5d0a2328723699c8d9ea80fa246134e26de943bd50e2c49d61c971f802e35f7da10c200df8f4ada248d7f44c2b6e8e16a
@@ -3,12 +3,11 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager</artifactId>
5
5
  <versioning>
6
- <latest>3.2.0</latest>
7
- <release>3.2.0</release>
6
+ <latest>3.2.6</latest>
7
+ <release>3.2.6</release>
8
8
  <versions>
9
- <version>3.1.46</version>
10
- <version>3.2.0</version>
9
+ <version>3.2.6</version>
11
10
  </versions>
12
- <lastUpdated>20220620224941</lastUpdated>
11
+ <lastUpdated>20221025164146</lastUpdated>
13
12
  </versioning>
14
13
  </metadata>
@@ -0,0 +1 @@
1
+ d8895605981e46748187b8b09a66e61352188ec48ec04338531383b985fbb4c2
@@ -0,0 +1 @@
1
+ f4b6b70c113a7fac573f224168f1e637881419b12f729928ef15cad3dce74924964158dbe6dc791f32d75c8ca6365049b64d227bae81452b24ad778e1b96e18d
@@ -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.2.0</version>
7
+ <version>3.2.6</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ 74bb64c1b2f6aed572821a3356ee6aee71d6d7a63c317ea1a33d96afcef98064
@@ -0,0 +1 @@
1
+ 45d69b06687c7e3340be6fd163082b5d9872bc88d573109fb12d7feab559a8896f871269c36dc4cd428db6e786c7febc0b266064f90f6dbad46e5f84ab180805
@@ -3,12 +3,11 @@
3
3
  <groupId>com.transistorsoft</groupId>
4
4
  <artifactId>tslocationmanager-reverse</artifactId>
5
5
  <versioning>
6
- <latest>3.2.0</latest>
7
- <release>3.2.0</release>
6
+ <latest>3.2.6</latest>
7
+ <release>3.2.6</release>
8
8
  <versions>
9
- <version>3.1.46</version>
10
- <version>3.2.0</version>
9
+ <version>3.2.6</version>
11
10
  </versions>
12
- <lastUpdated>20220620224941</lastUpdated>
11
+ <lastUpdated>20221025164146</lastUpdated>
13
12
  </versioning>
14
13
  </metadata>
package/app.plugin.js ADDED
@@ -0,0 +1,2 @@
1
+ module.exports = require('./expo/plugin/build');
2
+
@@ -0,0 +1,6 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ declare type Props = {
3
+ license?: string;
4
+ };
5
+ declare const androidPlugin: ConfigPlugin<Props>;
6
+ export default androidPlugin;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const config_plugins_1 = require("@expo/config-plugins");
7
+ const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
8
+ const path_1 = __importDefault(require("path"));
9
+ const fs_1 = __importDefault(require("fs"));
10
+ const PUBLIC_MODULE = 'react-native-background-geolocation';
11
+ const PRIVATE_MODULE = PUBLIC_MODULE + '-android';
12
+ const NODE_MODULES = path_1.default.join('.', 'node_modules');
13
+ const META_LICENSE_KEY = "com.transistorsoft.locationmanager.license";
14
+ const MODULE_NAME = fs_1.default.existsSync(path_1.default.join(NODE_MODULES, PUBLIC_MODULE)) ? PUBLIC_MODULE : PRIVATE_MODULE;
15
+ const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } = config_plugins_1.AndroidConfig.Manifest;
16
+ const androidPlugin = (config, props = {}) => {
17
+ config = (0, config_plugins_1.withProjectBuildGradle)(config, ({ modResults, ...subConfig }) => {
18
+ if (modResults.language !== 'groovy') {
19
+ config_plugins_1.WarningAggregator.addWarningAndroid('withBackgroundGeolocation', `Cannot automatically configure project build.gradle if it's not groovy`);
20
+ return { modResults, ...subConfig };
21
+ }
22
+ modResults.contents = applyMavenUrl(modResults.contents);
23
+ return { modResults, ...subConfig };
24
+ });
25
+ config = (0, config_plugins_1.withAppBuildGradle)(config, ({ modResults, ...subConfig }) => {
26
+ if (modResults.language !== 'groovy') {
27
+ config_plugins_1.WarningAggregator.addWarningAndroid('withBackgroundGeolocation', `Cannot automatically configure project build.gradle if it's not groovy`);
28
+ return { modResults, ...subConfig };
29
+ }
30
+ modResults.contents = applyAppGradle(modResults.contents);
31
+ return { modResults, ...subConfig };
32
+ });
33
+ config = (0, config_plugins_1.withAndroidManifest)(config, async (config) => {
34
+ const mainApplication = getMainApplicationOrThrow(config.modResults);
35
+ addMetaDataItemToMainApplication(mainApplication, META_LICENSE_KEY, props.license || "UNDEFINED");
36
+ return config;
37
+ });
38
+ return config;
39
+ };
40
+ const applyAppGradle = (buildGradle) => {
41
+ // Apply background-geolocation.gradle
42
+ const newSrc = [];
43
+ newSrc.push(`Project background_geolocation = project(':${MODULE_NAME}')`);
44
+ newSrc.push(`apply from: "\${background_geolocation.projectDir}/app.gradle"`);
45
+ buildGradle = (0, generateCode_1.mergeContents)({
46
+ tag: `[${MODULE_NAME}]-project`,
47
+ src: buildGradle,
48
+ newSrc: newSrc.join("\n"),
49
+ anchor: /\"react\.gradle\"\)/,
50
+ offset: 1,
51
+ comment: "//",
52
+ }).contents;
53
+ buildGradle = (0, generateCode_1.mergeContents)({
54
+ tag: `[${MODULE_NAME}]-proguard`,
55
+ src: buildGradle,
56
+ newSrc: `\t proguardFiles "\${background_geolocation.projectDir}/proguard-rules.pro"`,
57
+ anchor: /\"proguard-rules.pro\"/,
58
+ offset: 1,
59
+ comment: "//",
60
+ }).contents;
61
+ return buildGradle;
62
+ };
63
+ /**
64
+ * DISABLED in favour of gradle.properties
65
+ *
66
+ const applyExtVars = (buildGradle: string, props:Props) => {
67
+
68
+ const newSrc = [];
69
+
70
+ const ext = props.ext;
71
+ if (ext) {
72
+ for (let [key, value] of ext) {
73
+ if (typeof(value) === 'boolean') {
74
+ newSrc.push(`\t${key} = ${value}`)
75
+ } else {
76
+ newSrc.push(`\t${key} = "${value}"`)
77
+ }
78
+ }
79
+ }
80
+
81
+ return mergeContents({
82
+ tag: `[${MODULE_NAME}-ext`,
83
+ src: buildGradle,
84
+ newSrc: newSrc.join("\n"),
85
+ anchor: /ext(?:\s+)?\{/,
86
+ offset: 1,
87
+ comment: "//",
88
+ }).contents;
89
+ }
90
+ */
91
+ const applyMavenUrl = (buildGradle) => {
92
+ return (0, generateCode_1.mergeContents)({
93
+ tag: `[${MODULE_NAME}-maven`,
94
+ src: buildGradle,
95
+ newSrc: `\tmaven { url "\${project(":${MODULE_NAME}").projectDir}/libs" }`,
96
+ anchor: /mavenLocal\(\)/,
97
+ offset: 1,
98
+ comment: "//",
99
+ }).contents;
100
+ };
101
+ exports.default = androidPlugin;
102
+ //# sourceMappingURL=androidPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"androidPlugin.js","sourceRoot":"","sources":["../src/androidPlugin.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import { ConfigPlugin } from "@expo/config-plugins";
2
+ declare type Props = {};
3
+ export declare const withBackgroundGeolocationPluginIos: ConfigPlugin<Props>;
4
+ export default withBackgroundGeolocationPluginIos;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withBackgroundGeolocationPluginIos = void 0;
4
+ const withBackgroundGeolocationPluginIos = (config, props = {}) => {
5
+ // Nothing to here here currently, but left for future considerations.
6
+ return config;
7
+ };
8
+ exports.withBackgroundGeolocationPluginIos = withBackgroundGeolocationPluginIos;
9
+ exports.default = exports.withBackgroundGeolocationPluginIos;
10
+ //# sourceMappingURL=iOSPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iOSPlugin.js","sourceRoot":"","sources":["../src/iOSPlugin.ts"],"names":[],"mappings":";;;AAQO,MAAM,kCAAkC,GAAwB,CAAC,MAAM,EAAE,KAAK,GAAC,EAAE,EAAE,EAAE;IAC1F,sEAAsE;IACtE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAHW,QAAA,kCAAkC,sCAG7C;AAEF,kBAAe,0CAAkC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ declare const withBackgroundGeolocation: ConfigPlugin<{
3
+ /**
4
+ * Default ""
5
+ */
6
+ license?: string;
7
+ } | void>;
8
+ export default withBackgroundGeolocation;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const config_plugins_1 = require("@expo/config-plugins");
7
+ const androidPlugin_1 = __importDefault(require("./androidPlugin"));
8
+ const iOSPlugin_1 = __importDefault(require("./iOSPlugin"));
9
+ const withBackgroundGeolocation = (config, _props) => {
10
+ const props = _props || {};
11
+ return (0, config_plugins_1.withPlugins)(config, [
12
+ [androidPlugin_1.default, {
13
+ license: props.license
14
+ }],
15
+ [iOSPlugin_1.default, {
16
+ // no props for ios currently.
17
+ }]
18
+ ]);
19
+ };
20
+ exports.default = withBackgroundGeolocation;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,yDAAiE;AAEjE,oEAA4C;AAC5C,4DAAoC;AAEpC,MAAM,yBAAyB,GAQ3B,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;IACrB,MAAM,KAAK,GAAG,MAAM,IAAI,EAAE,CAAC;IAE3B,OAAO,IAAA,4BAAW,EAAC,MAAM,EAAE;QACzB,CAAC,uBAAa,EAAE;gBACd,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB,CAAC;QACF,CAAC,mBAAS,EAAE;YACV,8BAA8B;aAC/B,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,yBAAyB,CAAC"}
@@ -6,47 +6,47 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_i386_x86_64-simulator</string>
9
+ <string>ios-arm64_armv7</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>
16
- <string>x86_64</string>
15
+ <string>armv7</string>
17
16
  </array>
18
17
  <key>SupportedPlatform</key>
19
18
  <string>ios</string>
20
- <key>SupportedPlatformVariant</key>
21
- <string>simulator</string>
22
19
  </dict>
23
20
  <dict>
24
21
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_armv7</string>
22
+ <string>ios-arm64_x86_64-maccatalyst</string>
26
23
  <key>LibraryPath</key>
27
24
  <string>TSLocationManager.framework</string>
28
25
  <key>SupportedArchitectures</key>
29
26
  <array>
30
27
  <string>arm64</string>
31
- <string>armv7</string>
28
+ <string>x86_64</string>
32
29
  </array>
33
30
  <key>SupportedPlatform</key>
34
31
  <string>ios</string>
32
+ <key>SupportedPlatformVariant</key>
33
+ <string>maccatalyst</string>
35
34
  </dict>
36
35
  <dict>
37
36
  <key>LibraryIdentifier</key>
38
- <string>ios-arm64_x86_64-maccatalyst</string>
37
+ <string>ios-arm64_i386_x86_64-simulator</string>
39
38
  <key>LibraryPath</key>
40
39
  <string>TSLocationManager.framework</string>
41
40
  <key>SupportedArchitectures</key>
42
41
  <array>
43
42
  <string>arm64</string>
43
+ <string>i386</string>
44
44
  <string>x86_64</string>
45
45
  </array>
46
46
  <key>SupportedPlatform</key>
47
47
  <string>ios</string>
48
48
  <key>SupportedPlatformVariant</key>
49
- <string>maccatalyst</string>
49
+ <string>simulator</string>
50
50
  </dict>
51
51
  </array>
52
52
  <key>CFBundlePackageType</key>
@@ -23,6 +23,7 @@ extern NSString * const TS_REFRESH_URL;
23
23
  @property(nonatomic) NSString* accessToken;
24
24
  @property(nonatomic) NSString* refreshToken;
25
25
  @property(nonatomic) NSDictionary* refreshPayload;
26
+ @property(nonatomic) NSDictionary* refreshHeaders;
26
27
  @property(nonatomic) NSString* refreshUrl;
27
28
  @property(nonatomic) NSTimeInterval expires;
28
29
 
@@ -23,6 +23,7 @@ extern NSString * const TS_REFRESH_URL;
23
23
  @property(nonatomic) NSString* accessToken;
24
24
  @property(nonatomic) NSString* refreshToken;
25
25
  @property(nonatomic) NSDictionary* refreshPayload;
26
+ @property(nonatomic) NSDictionary* refreshHeaders;
26
27
  @property(nonatomic) NSString* refreshUrl;
27
28
  @property(nonatomic) NSTimeInterval expires;
28
29
 
@@ -42,7 +42,7 @@
42
42
  </data>
43
43
  <key>Headers/TSAuthorization.h</key>
44
44
  <data>
45
- ejGHmB3cWE9NhMtsgdktieAc+Ag=
45
+ Kb3Cx6ApdAI2YnWvWNmq5pHoXHc=
46
46
  </data>
47
47
  <key>Headers/TSAuthorizationEvent.h</key>
48
48
  <data>
@@ -138,7 +138,7 @@
138
138
  </data>
139
139
  <key>Info.plist</key>
140
140
  <data>
141
- YDZTb0oJE3fq+OMxysmlktNu66E=
141
+ s5vsrtTl12zwWaO61fpcxIwNozw=
142
142
  </data>
143
143
  <key>Modules/module.modulemap</key>
144
144
  <data>
@@ -250,11 +250,11 @@
250
250
  <dict>
251
251
  <key>hash</key>
252
252
  <data>
253
- ejGHmB3cWE9NhMtsgdktieAc+Ag=
253
+ Kb3Cx6ApdAI2YnWvWNmq5pHoXHc=
254
254
  </data>
255
255
  <key>hash2</key>
256
256
  <data>
257
- moNjVyqpDlKPFVD5U18V2PJ+BK2pmEsuktmApT1YE68=
257
+ wanynAdYmouyOQdVfHkKnlnodPzGZae7hqyXahQaUV8=
258
258
  </data>
259
259
  </dict>
260
260
  <key>Headers/TSAuthorizationEvent.h</key>
@@ -23,6 +23,7 @@ extern NSString * const TS_REFRESH_URL;
23
23
  @property(nonatomic) NSString* accessToken;
24
24
  @property(nonatomic) NSString* refreshToken;
25
25
  @property(nonatomic) NSDictionary* refreshPayload;
26
+ @property(nonatomic) NSDictionary* refreshHeaders;
26
27
  @property(nonatomic) NSString* refreshUrl;
27
28
  @property(nonatomic) NSTimeInterval expires;
28
29
 
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>21E258</string>
6
+ <string>21G115</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -17,17 +17,17 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>FMWK</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>4.1.3</string>
20
+ <string>4.1.5</string>
21
21
  <key>CFBundleSupportedPlatforms</key>
22
22
  <array>
23
23
  <string>MacOSX</string>
24
24
  </array>
25
25
  <key>CFBundleVersion</key>
26
- <string>385</string>
26
+ <string>387</string>
27
27
  <key>DTCompiler</key>
28
28
  <string>com.apple.compilers.llvm.clang.1_0</string>
29
29
  <key>DTPlatformBuild</key>
30
- <string>13E500a</string>
30
+ <string>13F100</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>1331</string>
40
+ <string>1341</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>13E500a</string>
42
+ <string>13F100</string>
43
43
  <key>LSMinimumSystemVersion</key>
44
44
  <string>10.15</string>
45
45
  <key>UIDeviceFamily</key>
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "react-native-background-geolocation",
3
- "version": "4.8.1",
3
+ "version": "4.9.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"
7
7
  },
8
8
  "main": "src/index.js",
9
+ "scripts": {
10
+ "build": "yarn run build:expo",
11
+ "test": "echo \"Error: no test specified\" && exit 1",
12
+ "build:expo": "rimraf expo/plugin/build && tsc --build ./expo/plugin"
13
+ },
9
14
  "repository": {
10
15
  "type": "git",
11
16
  "url": "git+ssh://git@github.com/transistorsoft/react-native-background-geolocation.git"
@@ -27,16 +32,17 @@
27
32
  "url": "https://github.com/transistorsoft/react-native-background-geolocation/issues"
28
33
  },
29
34
  "homepage": "https://www.transistorsoft.com/shop/products/react-native-background-geolocation",
30
- "peerDependencies": {
31
- "react-native": ">=0.36.0"
32
- },
33
35
  "dependencies": {
34
- "react-native-background-fetch": "~4.1.1"
36
+ "react-native-background-fetch": "~4.1.5"
35
37
  },
36
38
  "devDependencies": {
39
+ "@expo/config-plugins": "^4.1.0",
37
40
  "@transistorsoft/typedoc-theme": "^2.0.8",
41
+ "@types/node": "^18.11.5",
38
42
  "chalk": "^4.1.0",
39
43
  "fs-extra": "^9.1.0",
40
- "rimraf": "^3.0.2"
44
+ "path": "^0.12.7",
45
+ "rimraf": "^3.0.2",
46
+ "typescript": "^4.6.2"
41
47
  }
42
48
  }
@@ -147,6 +147,34 @@ declare module "react-native-background-geolocation" {
147
147
  *
148
148
  */
149
149
  refreshPayload?:any;
150
+ /**
151
+ * Optional headers applied on requests to [[refreshUrl]]
152
+ * Defaults to: `{"Authorization": "Bearer {accessToken}"}`
153
+ *
154
+ * The template variable `{accessToken}` will automatically be replaced with your app's current auth token.
155
+ *
156
+ * If you do not want *any* headers applied on requests to {refreshUrl}, provide an empty `{}`.
157
+ *
158
+ * ## Example
159
+ *
160
+ * BackgroundGeolocation.ready({
161
+ * authorization: {
162
+ * accessToken: "XXX.YYY.ZZZ",
163
+ * refreshUrl: "https://auth.domain.com/tokens",
164
+ * refreshToken: "smTsfaspfgaadsfgqZerUt0wueflasdfkaxjdfeKIacb",
165
+ * refreshPayload: {
166
+ * "my_refresh_token": "{refreshToken}", // <-- replaced with configured refreshToken above.
167
+ * "grant_type": "refresh_token", // <-- arbitrary fields required by your auth server
168
+ * "foo": "another arbitrary field"
169
+ * },
170
+ * refreshHeaders: {} // <-- Empty {} to provide no refreshHeaders.
171
+ * )
172
+ * ));
173
+ * ```
174
+ *
175
+ */
176
+ refreshHeaders?:any;
177
+
150
178
  /**
151
179
  * Token expiry time in seconds.
152
180
  */