react-native-background-geolocation 4.8.2 → 4.9.3
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.
- package/README.md +5 -7
- package/android/build.gradle +10 -2
- package/android/libs/com/transistorsoft/tslocationmanager/{3.2.1/tslocationmanager-3.2.1.aar → 3.2.7/tslocationmanager-3.2.7.aar} +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/{3.2.1/tslocationmanager-3.2.1.pom → 3.2.7/tslocationmanager-3.2.7.pom} +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +5 -5
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.2.1/tslocationmanager-reverse-3.2.1.aar → 3.2.7/tslocationmanager-reverse-3.2.7.aar} +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.2.1/tslocationmanager-reverse-3.2.1.pom → 3.2.7/tslocationmanager-reverse-3.2.7.pom} +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +5 -5
- package/app.plugin.js +2 -0
- package/expo/plugin/build/androidPlugin.d.ts +6 -0
- package/expo/plugin/build/androidPlugin.js +102 -0
- package/expo/plugin/build/androidPlugin.js.map +1 -0
- package/expo/plugin/build/iOSPlugin.d.ts +4 -0
- package/expo/plugin/build/iOSPlugin.js +10 -0
- package/expo/plugin/build/iOSPlugin.js.map +1 -0
- package/expo/plugin/build/index.d.ts +8 -0
- package/expo/plugin/build/index.js +21 -0
- package/expo/plugin/build/index.js.map +1 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/Info.plist +9 -9
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Headers/TSAuthorization.h +1 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/Info.plist +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_armv7/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Headers/TSAuthorization.h +1 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/Info.plist +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/TSLocationManager +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_i386_x86_64-simulator/TSLocationManager.framework/_CodeSignature/CodeResources +4 -4
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Headers/TSAuthorization.h +1 -0
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/Resources/Info.plist +6 -6
- package/ios/RNBackgroundGeolocation/TSLocationManager.xcframework/ios-arm64_x86_64-maccatalyst/TSLocationManager.framework/TSLocationManager +0 -0
- package/package.json +12 -6
- package/src/declarations/interfaces/Authorization.d.ts +28 -0
- package/src/declarations/interfaces/Config.d.ts +20 -0
- package/src/declarations/interfaces/Location.d.ts +12 -3
- package/src/declarations/interfaces/Notification.d.ts +7 -0
- package/CHANGELOG.md +0 -1241
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.aar.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.1/tslocationmanager-3.2.1.pom.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.aar.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.1/tslocationmanager-reverse-3.2.1.pom.sha512 +0 -1
- package/scripts/cp-declarations +0 -53
- package/scripts/declare-module +0 -3
- package/scripts/docs-index.html +0 -4
- package/scripts/generate-docs +0 -23
- package/scripts/tsconfig.json +0 -21
- package/scripts/xcode-helpers.js +0 -171
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
|
-
|
|
47
|
+
### With *Expo*
|
|
49
48
|
|
|
50
|
-
```
|
|
51
|
-
|
|
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
|
-
###
|
|
66
|
+
### Expo
|
|
67
|
+
- [Expo Setup](help/INSTALL-EXPO.md)
|
|
70
68
|
|
|
71
69
|
### iOS
|
|
72
70
|
- [Auto-linking Setup](help/INSTALL-IOS-AUTO.md)
|
package/android/build.gradle
CHANGED
|
@@ -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 =
|
|
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 = "
|
|
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)
|
|
Binary file
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bfbe154562a0bd36e6de59b01db6e3a6
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
646dd4b53337a3080cb1f4b407c35c3f476a7997
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f0b920709441b748f8c029ba046262a75a3deebea81772a58f1bf1ac778aabc6
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a3221bb3e97bf8dd37c1785cd4a373e1e38147f6ebd9e3557f04c22ab565260754d74e1175e5be1f555153db3656c78ce3b40e192e9505bf73f14797dad66df3
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7d99f3b24498fe9a089817acc433ba5e
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e02dd92c5d5f1996b5a7545ac21bcc3487d17735
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b7f5c299d1cfa0e74ff23afc8db34e0b95ce6cc5b08626850d2269a15f3617b9
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a6081fb382046e288ba6fc35256ec950645e9e63950b51361837bdb90111e4dbcb9950ecb7dab7cc580c3992e3f5297df1cd0e495062c1196ff1a5d3acc23966
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<groupId>com.transistorsoft</groupId>
|
|
4
4
|
<artifactId>tslocationmanager</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>3.2.
|
|
7
|
-
<release>3.2.
|
|
6
|
+
<latest>3.2.7</latest>
|
|
7
|
+
<release>3.2.7</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>3.2.
|
|
10
|
-
<version>3.2.
|
|
9
|
+
<version>3.2.6</version>
|
|
10
|
+
<version>3.2.7</version>
|
|
11
11
|
</versions>
|
|
12
|
-
<lastUpdated>
|
|
12
|
+
<lastUpdated>20221026135257</lastUpdated>
|
|
13
13
|
</versioning>
|
|
14
14
|
</metadata>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9c76cbc585c54d50c668361c10ef3ec2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7ff5da635f3ee43fb297d45b914d823af7810f8f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ccb988bf634e17222af4298b6b4fad13aead99e74c7861c7f4b3efa20190ea41
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f6c1a31b649d9cbe7161e0e68b0eef8582599374dfcb837b12a12a12509b013c99ee3b9bf71f77fb7d2bc903ea6caa155dad77926e470cd785ceecd189fc2fec
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9a6136e2bd04007e11fcc84fa8b4c765
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a8f65c6057bad6cbdb89968b2bed8e60f38781e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a4882a1d3c81b08da5924b8340c1bc0d3d7fd98e6615627f58fddffd1d7a100
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
85119ae37d69431011cd3b3dd26168169cd64e5b88afae6af60098bc55c13b90db0bdee84765ef56935881363a232797191b2a47febf2992986020abb5ecf7bf
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<groupId>com.transistorsoft</groupId>
|
|
4
4
|
<artifactId>tslocationmanager-reverse</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>3.2.
|
|
7
|
-
<release>3.2.
|
|
6
|
+
<latest>3.2.7</latest>
|
|
7
|
+
<release>3.2.7</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>3.2.
|
|
10
|
-
<version>3.2.
|
|
9
|
+
<version>3.2.6</version>
|
|
10
|
+
<version>3.2.7</version>
|
|
11
11
|
</versions>
|
|
12
|
-
<lastUpdated>
|
|
12
|
+
<lastUpdated>20221026135257</lastUpdated>
|
|
13
13
|
</versioning>
|
|
14
14
|
</metadata>
|
package/app.plugin.js
ADDED
|
@@ -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":";;;;;AAAA,yDAQ8B;AAE9B,gFAGuD;AAQvD,gDAAwB;AACxB,4CAAoB;AAEpB,MAAM,aAAa,GAAG,qCAAqC,CAAC;AAC5D,MAAM,cAAc,GAAG,aAAa,GAAG,UAAU,CAAC;AAClD,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AAEpD,MAAM,gBAAgB,GAAG,4CAA4C,CAAC;AAEtE,MAAM,WAAW,GAAG,YA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AwB;QAC1E,MAAM,EAAE,gBAAgB;QACxB,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,IAAI;KACd,CAAC,CAAC,QAAQ,CAAC;AACd,CAAC,CAAA;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -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,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-
|
|
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>
|
|
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-
|
|
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>
|
|
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-
|
|
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>
|
|
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
|
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</data>
|
|
43
43
|
<key>Headers/TSAuthorization.h</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
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
|
-
|
|
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
|
-
|
|
253
|
+
Kb3Cx6ApdAI2YnWvWNmq5pHoXHc=
|
|
254
254
|
</data>
|
|
255
255
|
<key>hash2</key>
|
|
256
256
|
<data>
|
|
257
|
-
|
|
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>
|
|
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.
|
|
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>
|
|
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>
|
|
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>
|
|
40
|
+
<string>1341</string>
|
|
41
41
|
<key>DTXcodeBuild</key>
|
|
42
|
-
<string>
|
|
42
|
+
<string>13F100</string>
|
|
43
43
|
<key>LSMinimumSystemVersion</key>
|
|
44
44
|
<string>10.15</string>
|
|
45
45
|
<key>UIDeviceFamily</key>
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-background-geolocation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.3",
|
|
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.
|
|
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
|
-
"
|
|
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
|
*/
|