react-native-radar 3.14.0 → 3.16.0
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 +10 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/io/radar/react/RNRadarModule.java +1 -1
- package/app.plugin.js +1 -0
- package/dist/{src/ui → ui}/autocomplete.d.ts +2 -1
- package/dist/{src/ui → ui}/autocomplete.js +1 -1
- package/dist/{src/ui → ui}/map.d.ts +2 -1
- package/ios/Cartfile.resolved +1 -1
- package/ios/RNRadar.m +1 -1
- package/package.json +18 -11
- package/plugin/build/index.d.ts +3 -0
- package/plugin/build/index.js +6 -0
- package/plugin/build/types.d.ts +9 -0
- package/plugin/build/types.js +2 -0
- package/plugin/build/withRadar.d.ts +4 -0
- package/plugin/build/withRadar.js +26 -0
- package/plugin/build/withRadarAndroid.d.ts +3 -0
- package/plugin/build/withRadarAndroid.js +107 -0
- package/plugin/build/withRadarIOS.d.ts +3 -0
- package/plugin/build/withRadarIOS.js +38 -0
- package/react-native-radar.podspec +1 -1
- package/dist/package.json +0 -84
- package/src/@types/RadarNativeInterface.ts +0 -106
- package/src/@types/types.ts +0 -784
- package/src/helpers.js +0 -15
- package/src/index.native.ts +0 -298
- package/src/index.ts +0 -22
- package/src/index.web.js +0 -410
- package/src/ui/autocomplete.jsx +0 -323
- package/src/ui/back.png +0 -0
- package/src/ui/close.png +0 -0
- package/src/ui/images.js +0 -5
- package/src/ui/map-logo.png +0 -0
- package/src/ui/map.jsx +0 -122
- package/src/ui/marker.png +0 -0
- package/src/ui/radar-logo.png +0 -0
- package/src/ui/search.png +0 -0
- package/src/ui/styles.js +0 -125
- /package/dist/{src/@types → @types}/RadarNativeInterface.d.ts +0 -0
- /package/dist/{src/@types → @types}/RadarNativeInterface.js +0 -0
- /package/dist/{src/@types → @types}/types.d.ts +0 -0
- /package/dist/{src/@types → @types}/types.js +0 -0
- /package/dist/{src/helpers.d.ts → helpers.d.ts} +0 -0
- /package/dist/{src/helpers.js → helpers.js} +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/index.native.d.ts → index.native.d.ts} +0 -0
- /package/dist/{src/index.native.js → index.native.js} +0 -0
- /package/dist/{src/index.web.d.ts → index.web.d.ts} +0 -0
- /package/dist/{src/index.web.js → index.web.js} +0 -0
- /package/dist/{src/ui → ui}/back.png +0 -0
- /package/dist/{src/ui → ui}/close.png +0 -0
- /package/dist/{src/ui → ui}/images.d.ts +0 -0
- /package/dist/{src/ui → ui}/images.js +0 -0
- /package/dist/{src/ui → ui}/map-logo.png +0 -0
- /package/dist/{src/ui → ui}/map.js +0 -0
- /package/dist/{src/ui → ui}/marker.png +0 -0
- /package/dist/{src/ui → ui}/radar-logo.png +0 -0
- /package/dist/{src/ui → ui}/search.png +0 -0
- /package/dist/{src/ui → ui}/styles.d.ts +0 -0
- /package/dist/{src/ui → ui}/styles.js +0 -0
package/README.md
CHANGED
|
@@ -18,6 +18,16 @@ See an example app in `example/`.
|
|
|
18
18
|
|
|
19
19
|
Setup Radar public key check pre-commit hook with `cp -r hooks .git` to prevent accidental key leak when working with the Example app.
|
|
20
20
|
|
|
21
|
+
To run example app with local `react-native-radar` dependency:
|
|
22
|
+
|
|
23
|
+
- install node dependencies with `npm ci` and typescript if needed with `npm install -g typescript`.
|
|
24
|
+
- build local `react-native-radar` with `npm run build-all`.
|
|
25
|
+
- navigate to the example dir with `cd example`.
|
|
26
|
+
- install node dependency of example with `npm ci`.
|
|
27
|
+
- build native app using expo pre-build and `react-native-plugin` with `npm run install-radar-rebuild`.
|
|
28
|
+
- run iOS and android example app with `npx expo run:ios` or `npx expo run:android`.
|
|
29
|
+
|
|
30
|
+
|
|
21
31
|
## Support
|
|
22
32
|
|
|
23
33
|
Have questions? We're here to help! Email us at [support@radar.com](mailto:support@radar.com).
|
package/android/build.gradle
CHANGED
|
@@ -18,7 +18,7 @@ android {
|
|
|
18
18
|
minSdkVersion 16
|
|
19
19
|
targetSdkVersion 31
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName '3.
|
|
21
|
+
versionName '3.15.0'
|
|
22
22
|
}
|
|
23
23
|
lintOptions {
|
|
24
24
|
abortOnError false
|
|
@@ -45,6 +45,6 @@ repositories {
|
|
|
45
45
|
|
|
46
46
|
dependencies {
|
|
47
47
|
api 'com.facebook.react:react-native:+'
|
|
48
|
-
api 'io.radar:sdk:3.
|
|
48
|
+
api 'io.radar:sdk:3.16.2'
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -96,7 +96,7 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
96
96
|
this.fraud = fraud;
|
|
97
97
|
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
|
|
98
98
|
editor.putString("x_platform_sdk_type", "ReactNative");
|
|
99
|
-
editor.putString("x_platform_sdk_version", "3.
|
|
99
|
+
editor.putString("x_platform_sdk_version", "3.15.0");
|
|
100
100
|
editor.apply();
|
|
101
101
|
if (fraud) {
|
|
102
102
|
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);
|
package/app.plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./plugin/build');
|
|
@@ -174,7 +174,7 @@ const autocompleteUI = ({ options = {} }) => {
|
|
|
174
174
|
<react_native_1.Modal animationType="slide" transparent={false} visible={isOpen} onRequestClose={() => setIsOpen(false)}>
|
|
175
175
|
<react_native_1.Animated.View style={{ flex: 1, opacity: modalOpacity }}>
|
|
176
176
|
<react_native_1.SafeAreaView>
|
|
177
|
-
<react_native_1.KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : "height"} keyboardVerticalOffset={50} style={styles.container}>
|
|
177
|
+
<react_native_1.KeyboardAvoidingView behavior={react_native_1.Platform.OS === "ios" ? "padding" : "height"} keyboardVerticalOffset={50} style={styles.container}>
|
|
178
178
|
<react_native_1.View style={styles.modalInputContainer}>
|
|
179
179
|
<react_native_1.TouchableOpacity onPress={() => {
|
|
180
180
|
setIsOpen(false);
|
package/ios/Cartfile.resolved
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
github "radarlabs/radar-sdk-ios" "3.
|
|
1
|
+
github "radarlabs/radar-sdk-ios" "3.16.0"
|
package/ios/RNRadar.m
CHANGED
|
@@ -102,7 +102,7 @@ RCT_EXPORT_MODULE();
|
|
|
102
102
|
|
|
103
103
|
RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
|
|
104
104
|
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
|
|
105
|
-
[[NSUserDefaults standardUserDefaults] setObject:@"3.
|
|
105
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"3.15.0" forKey:@"radar-xPlatformSDKVersion"];
|
|
106
106
|
[Radar initializeWithPublishableKey:publishableKey];
|
|
107
107
|
}
|
|
108
108
|
|
package/package.json
CHANGED
|
@@ -3,23 +3,26 @@
|
|
|
3
3
|
"description": "React Native module for Radar, the leading geofencing and location tracking platform",
|
|
4
4
|
"homepage": "https://radar.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"version": "3.
|
|
7
|
-
"main": "dist/
|
|
6
|
+
"version": "3.16.0",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
8
|
"files": [
|
|
9
|
-
"android",
|
|
10
|
-
"ios",
|
|
11
|
-
"src",
|
|
9
|
+
"/android",
|
|
10
|
+
"/ios",
|
|
12
11
|
"README.md",
|
|
13
12
|
"react-native-radar.podspec",
|
|
14
|
-
"/dist"
|
|
13
|
+
"/dist",
|
|
14
|
+
"app.plugin.js",
|
|
15
|
+
"/plugin/build"
|
|
15
16
|
],
|
|
16
|
-
"types":"dist/
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
17
18
|
"scripts": {
|
|
18
19
|
"test": "jest ./test/*.test.js",
|
|
19
20
|
"check-latest-tag": "node ./scripts/check-latest-tag.cjs",
|
|
20
21
|
"check-beta-tag": "node ./scripts/check-beta-tag.cjs",
|
|
21
22
|
"build": "tsc",
|
|
22
|
-
"copy-assets": "./copyAssets.sh"
|
|
23
|
+
"copy-assets": "./copyAssets.sh",
|
|
24
|
+
"build-plugin": "tsc --build plugin/",
|
|
25
|
+
"build-all": "npm run build && npm run build-plugin && npm run copy-assets"
|
|
23
26
|
},
|
|
24
27
|
"jest": {
|
|
25
28
|
"preset": "react-native",
|
|
@@ -34,13 +37,17 @@
|
|
|
34
37
|
]
|
|
35
38
|
},
|
|
36
39
|
"peerDependencies": {
|
|
37
|
-
"@maplibre/maplibre-react-native": "
|
|
40
|
+
"@maplibre/maplibre-react-native": ">=9.0.1 || >=10.0.0-alpha",
|
|
41
|
+
"expo": ">=43.0.5",
|
|
38
42
|
"react": ">= 16.8.6",
|
|
39
43
|
"react-native": ">= 0.60.0"
|
|
40
44
|
},
|
|
41
45
|
"peerDependenciesMeta": {
|
|
42
46
|
"@maplibre/maplibre-react-native": {
|
|
43
47
|
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"expo": {
|
|
50
|
+
"optional": true
|
|
44
51
|
}
|
|
45
52
|
},
|
|
46
53
|
"devDependencies": {
|
|
@@ -48,8 +55,6 @@
|
|
|
48
55
|
"@babel/preset-env": "^7.2.3",
|
|
49
56
|
"@babel/preset-react": "^7.0.0",
|
|
50
57
|
"@babel/register": "^7.0.0",
|
|
51
|
-
"@types/node": "^20.11.7",
|
|
52
|
-
"@types/react-native": "^0.73.0",
|
|
53
58
|
"babel-core": "^7.0.0-bridge.0",
|
|
54
59
|
"babel-eslint": "^10.0.1",
|
|
55
60
|
"babel-jest": "^23.4.2",
|
|
@@ -60,6 +65,8 @@
|
|
|
60
65
|
"eslint-plugin-jest": "^22.1.2",
|
|
61
66
|
"eslint-plugin-jsx-a11y": "^6.1.1",
|
|
62
67
|
"eslint-plugin-react": "^7.11.1",
|
|
68
|
+
"expo": "^47.0.0",
|
|
69
|
+
"expo-module-scripts": "^3.4.1",
|
|
63
70
|
"jest": "^23.6.0",
|
|
64
71
|
"jest-junit": "^5.2.0",
|
|
65
72
|
"logkitty": ">=0.7.1",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withRadar = void 0;
|
|
4
|
+
const withRadar_1 = require("./withRadar");
|
|
5
|
+
Object.defineProperty(exports, "withRadar", { enumerable: true, get: function () { return withRadar_1.withRadar; } });
|
|
6
|
+
exports.default = withRadar_1.withRadar;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface RadarPluginProps {
|
|
2
|
+
iosFraud?: boolean;
|
|
3
|
+
androidFraud?: boolean;
|
|
4
|
+
iosNSLocationWhenInUseUsageDescription?: string;
|
|
5
|
+
iosNSLocationAlwaysAndWhenInUseUsageDescription?: string;
|
|
6
|
+
iosBackgroundMode?: boolean;
|
|
7
|
+
androidBackgroundPermission?: boolean;
|
|
8
|
+
androidFineLocationPermission?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withRadar = void 0;
|
|
4
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
5
|
+
const withRadarAndroid_1 = require("./withRadarAndroid");
|
|
6
|
+
const withRadarIOS_1 = require("./withRadarIOS");
|
|
7
|
+
const pkg = require("../../package.json");
|
|
8
|
+
const withRadarPlugin = (config, args = {}) => {
|
|
9
|
+
try {
|
|
10
|
+
config = (0, withRadarAndroid_1.withRadarAndroid)(config, args);
|
|
11
|
+
}
|
|
12
|
+
catch (e) {
|
|
13
|
+
config_plugins_1.WarningAggregator.addWarningAndroid("react-native-radar", "There was a problem configuring react-native-radar in your native Android project: " +
|
|
14
|
+
e);
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
config = (0, withRadarIOS_1.withRadarIOS)(config, args);
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
config_plugins_1.WarningAggregator.addWarningIOS("react-native-radar", "There was a problem configuring react-native-radar in your native iOS project: " +
|
|
21
|
+
e);
|
|
22
|
+
}
|
|
23
|
+
return config;
|
|
24
|
+
};
|
|
25
|
+
const withRadar = (0, config_plugins_1.createRunOncePlugin)(withRadarPlugin, pkg.name, pkg.version);
|
|
26
|
+
exports.withRadar = withRadar;
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
exports.withRadarAndroid = void 0;
|
|
7
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const { addPermission } = config_plugins_1.AndroidConfig.Permissions;
|
|
11
|
+
const withRadarAndroid = (config, args) => {
|
|
12
|
+
config = (0, config_plugins_1.withAndroidManifest)(config, async (config) => {
|
|
13
|
+
config.modResults = await setCustomConfigAsync(config, config.modResults, args);
|
|
14
|
+
return config;
|
|
15
|
+
});
|
|
16
|
+
config = (0, config_plugins_1.withDangerousMod)(config, [
|
|
17
|
+
"android",
|
|
18
|
+
async (config) => {
|
|
19
|
+
if (!args.androidFraud) {
|
|
20
|
+
return config;
|
|
21
|
+
}
|
|
22
|
+
// Get the path to the Android folder
|
|
23
|
+
const androidPath = path_1.default.join(config.modRequest.projectRoot, "android", "app", "src", "main", "res", "xml");
|
|
24
|
+
// Check if the directory exists, if not, create it
|
|
25
|
+
if (!fs_1.default.existsSync(androidPath)) {
|
|
26
|
+
fs_1.default.mkdirSync(androidPath, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
// Create the path to the new file
|
|
29
|
+
const newFilePath = path_1.default.join(androidPath, "network_security_config.xml");
|
|
30
|
+
// Define xml content
|
|
31
|
+
const xml = `<?xml version="1.0" encoding="utf-8"?>
|
|
32
|
+
<network-security-config>
|
|
33
|
+
<!-- for React Native -->
|
|
34
|
+
<domain-config cleartextTrafficPermitted="true">
|
|
35
|
+
<domain includeSubdomains="true">localhost</domain>
|
|
36
|
+
</domain-config>
|
|
37
|
+
|
|
38
|
+
<!-- for SSL pinning -->
|
|
39
|
+
<domain-config cleartextTrafficPermitted="false">
|
|
40
|
+
<domain includeSubdomains="true">api-verified.radar.io</domain>
|
|
41
|
+
<pin-set>
|
|
42
|
+
<pin digest="SHA-256">15ktYXSSU2llpy7YyCgeqUKDBkjcimK/weUcec960sI=</pin>
|
|
43
|
+
<pin digest="SHA-256">15ktYXSSU2llpy7YyCgeqUKDBkjcimK/weUcec960sI=</pin>
|
|
44
|
+
</pin-set>
|
|
45
|
+
</domain-config>
|
|
46
|
+
</network-security-config>`;
|
|
47
|
+
// Write to the new file
|
|
48
|
+
fs_1.default.writeFileSync(newFilePath, xml);
|
|
49
|
+
return config;
|
|
50
|
+
},
|
|
51
|
+
]);
|
|
52
|
+
return (0, config_plugins_1.withAppBuildGradle)(config, (config) => {
|
|
53
|
+
if (config.modResults.language === "groovy") {
|
|
54
|
+
config.modResults.contents = modifyAppBuildGradle(config.modResults.contents, args.androidFraud ?? false);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
throw new Error("Cannot configure Sentry in the app gradle because the build.gradle is not groovy");
|
|
58
|
+
}
|
|
59
|
+
return config;
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
exports.withRadarAndroid = withRadarAndroid;
|
|
63
|
+
async function setCustomConfigAsync(config, androidManifest, args) {
|
|
64
|
+
if (!androidManifest.manifest["uses-permission"]) {
|
|
65
|
+
androidManifest.manifest["uses-permission"] = [];
|
|
66
|
+
}
|
|
67
|
+
// Add permissions
|
|
68
|
+
if (args.androidFineLocationPermission &&
|
|
69
|
+
!androidManifest.manifest["uses-permission"].some((e) => e["$"]["android:name"] === "android.permission.ACCESS_FINE_LOCATION")) {
|
|
70
|
+
addPermission(androidManifest, "android.permission.ACCESS_FINE_LOCATION");
|
|
71
|
+
}
|
|
72
|
+
if (args.androidBackgroundPermission &&
|
|
73
|
+
!androidManifest.manifest["uses-permission"].some((e) => e["$"]["android:name"] ===
|
|
74
|
+
"android.permission.ACCESS_BACKGROUND_LOCATION")) {
|
|
75
|
+
addPermission(androidManifest, "android.permission.ACCESS_BACKGROUND_LOCATION");
|
|
76
|
+
}
|
|
77
|
+
if (!androidManifest.manifest["uses-permission"].some((e) => e["$"]["android:name"] === "android.permission.ACCESS_COARSE_LOCATION")) {
|
|
78
|
+
addPermission(androidManifest, "android.permission.ACCESS_COARSE_LOCATION");
|
|
79
|
+
}
|
|
80
|
+
if (!androidManifest.manifest["uses-permission"].some((e) => e["$"]["android:name"] === "android.permission.FOREGROUND_SERVICE")) {
|
|
81
|
+
addPermission(androidManifest, "android.permission.FOREGROUND_SERVICE");
|
|
82
|
+
}
|
|
83
|
+
return androidManifest;
|
|
84
|
+
}
|
|
85
|
+
function modifyAppBuildGradle(buildGradle, androidFraud) {
|
|
86
|
+
let hasLocationService = false;
|
|
87
|
+
let hasPlayIntegrity = false;
|
|
88
|
+
if (buildGradle.includes('com.google.android.gms:play-services-location:21.0.1"')) {
|
|
89
|
+
hasLocationService = true;
|
|
90
|
+
}
|
|
91
|
+
if (buildGradle.includes('com.google.android.play:integrity:1.2.0"')) {
|
|
92
|
+
hasPlayIntegrity = true;
|
|
93
|
+
}
|
|
94
|
+
const pattern = /^dependencies {/m;
|
|
95
|
+
if (!buildGradle.match(pattern)) {
|
|
96
|
+
config_plugins_1.WarningAggregator.addWarningAndroid("react-native-radar", "Could not find react.gradle script in android/app/build.gradle.");
|
|
97
|
+
}
|
|
98
|
+
let replacementString = "\n\n" +
|
|
99
|
+
(!hasLocationService
|
|
100
|
+
? ' implementation "com.google.android.gms:play-services-location:21.0.1"'
|
|
101
|
+
: "");
|
|
102
|
+
if (androidFraud && !hasPlayIntegrity) {
|
|
103
|
+
replacementString +=
|
|
104
|
+
"\n\n" + ' implementation "com.google.android.play:integrity:1.2.0"';
|
|
105
|
+
}
|
|
106
|
+
return buildGradle.replace(pattern, (match) => match + replacementString);
|
|
107
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withRadarIOS = void 0;
|
|
4
|
+
const config_plugins_1 = require("expo/config-plugins");
|
|
5
|
+
const withRadarIOS = (config, args) => {
|
|
6
|
+
return (0, config_plugins_1.withInfoPlist)(config, (config) => {
|
|
7
|
+
config.modResults.NSLocationWhenInUseUsageDescription =
|
|
8
|
+
args.iosNSLocationWhenInUseUsageDescription ??
|
|
9
|
+
"This app uses the location service to provide location-based services.";
|
|
10
|
+
if (args.iosNSLocationAlwaysAndWhenInUseUsageDescription) {
|
|
11
|
+
config.modResults.NSLocationAlwaysAndWhenInUseUsageDescription =
|
|
12
|
+
args.iosNSLocationAlwaysAndWhenInUseUsageDescription;
|
|
13
|
+
}
|
|
14
|
+
if (args.iosBackgroundMode) {
|
|
15
|
+
config.modResults.UIBackgroundModes = ["location", "fetch"];
|
|
16
|
+
}
|
|
17
|
+
if (args.iosFraud) {
|
|
18
|
+
config.modResults.NSAppTransportSecurity = {
|
|
19
|
+
NSAllowsArbitraryLoads: false,
|
|
20
|
+
NSPinnedDomains: {
|
|
21
|
+
"api-verified.radar.io": {
|
|
22
|
+
NSIncludesSubdomains: true,
|
|
23
|
+
NSPinnedLeafIdentities: [
|
|
24
|
+
{
|
|
25
|
+
"SPKI-SHA256-BASE64": "15ktYXSSU2llpy7YyCgeqUKDBkjcimK/weUcec960sI=",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"SPKI-SHA256-BASE64": "15ktYXSSU2llpy7YyCgeqUKDBkjcimK/weUcec960sI=",
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return config;
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
exports.withRadarIOS = withRadarIOS;
|
package/dist/package.json
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-native-radar",
|
|
3
|
-
"description": "React Native module for Radar, the leading geofencing and location tracking platform",
|
|
4
|
-
"homepage": "https://radar.com",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"version": "3.14.0",
|
|
7
|
-
"main": "dist/src/index.js",
|
|
8
|
-
"files": [
|
|
9
|
-
"android",
|
|
10
|
-
"ios",
|
|
11
|
-
"src",
|
|
12
|
-
"README.md",
|
|
13
|
-
"react-native-radar.podspec",
|
|
14
|
-
"/dist"
|
|
15
|
-
],
|
|
16
|
-
"types": "dist/src/index.d.ts",
|
|
17
|
-
"scripts": {
|
|
18
|
-
"test": "jest ./test/*.test.js",
|
|
19
|
-
"check-latest-tag": "node ./scripts/check-latest-tag.cjs",
|
|
20
|
-
"check-beta-tag": "node ./scripts/check-beta-tag.cjs",
|
|
21
|
-
"build": "tsc",
|
|
22
|
-
"copy-assets": "./copyAssets.sh"
|
|
23
|
-
},
|
|
24
|
-
"jest": {
|
|
25
|
-
"preset": "react-native",
|
|
26
|
-
"clearMocks": true,
|
|
27
|
-
"reporters": [
|
|
28
|
-
"default",
|
|
29
|
-
"jest-junit"
|
|
30
|
-
],
|
|
31
|
-
"modulePathIgnorePatterns": [
|
|
32
|
-
"example",
|
|
33
|
-
"example2"
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"@maplibre/maplibre-react-native": "^9.0.1",
|
|
38
|
-
"react": ">= 16.8.6",
|
|
39
|
-
"react-native": ">= 0.60.0"
|
|
40
|
-
},
|
|
41
|
-
"peerDependenciesMeta": {
|
|
42
|
-
"@maplibre/maplibre-react-native": {
|
|
43
|
-
"optional": true
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@babel/core": "^7.2.2",
|
|
48
|
-
"@babel/preset-env": "^7.2.3",
|
|
49
|
-
"@babel/preset-react": "^7.0.0",
|
|
50
|
-
"@babel/register": "^7.0.0",
|
|
51
|
-
"@types/node": "^20.11.7",
|
|
52
|
-
"@types/react-native": "^0.73.0",
|
|
53
|
-
"babel-core": "^7.0.0-bridge.0",
|
|
54
|
-
"babel-eslint": "^10.0.1",
|
|
55
|
-
"babel-jest": "^23.4.2",
|
|
56
|
-
"braces": ">=2.3.2",
|
|
57
|
-
"eslint": "^5.6.1",
|
|
58
|
-
"eslint-config-airbnb": "^17.1.0",
|
|
59
|
-
"eslint-plugin-import": "^2.14.0",
|
|
60
|
-
"eslint-plugin-jest": "^22.1.2",
|
|
61
|
-
"eslint-plugin-jsx-a11y": "^6.1.1",
|
|
62
|
-
"eslint-plugin-react": "^7.11.1",
|
|
63
|
-
"jest": "^23.6.0",
|
|
64
|
-
"jest-junit": "^5.2.0",
|
|
65
|
-
"logkitty": ">=0.7.1",
|
|
66
|
-
"metro-react-native-babel-preset": "^0.51.1",
|
|
67
|
-
"npm-run-all": "^4.1.5",
|
|
68
|
-
"react": "16.8.6",
|
|
69
|
-
"react-native": "0.60.0",
|
|
70
|
-
"typescript": "^5.3.3"
|
|
71
|
-
},
|
|
72
|
-
"bugs": {
|
|
73
|
-
"url": "https://github.com/radarlabs/react-native-radar/issues"
|
|
74
|
-
},
|
|
75
|
-
"repository": {
|
|
76
|
-
"type": "git",
|
|
77
|
-
"url": "https://github.com/radarlabs/react-native-radar.git"
|
|
78
|
-
},
|
|
79
|
-
"dependencies": {
|
|
80
|
-
"@babel/runtime": "^7.21.0",
|
|
81
|
-
"@react-native-community/netinfo": "^7.1.3",
|
|
82
|
-
"radar-sdk-js": "^3.6.0"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Location,
|
|
3
|
-
RadarAutocompleteOptions,
|
|
4
|
-
RadarContextCallback,
|
|
5
|
-
RadarAddressCallback,
|
|
6
|
-
RadarEventChannel,
|
|
7
|
-
RadarGeocodeOptions,
|
|
8
|
-
RadarGetDistanceOptions,
|
|
9
|
-
RadarLocationCallback,
|
|
10
|
-
RadarLogConversionCallback,
|
|
11
|
-
RadarLogConversionOptions,
|
|
12
|
-
RadarLogLevel,
|
|
13
|
-
RadarMockTrackingOptions,
|
|
14
|
-
RadarNotificationOptions,
|
|
15
|
-
RadarPermissionsStatus,
|
|
16
|
-
RadarReverseGeocodeOptions,
|
|
17
|
-
RadarRouteCallback,
|
|
18
|
-
RadarRouteMatrix,
|
|
19
|
-
RadarSearchGeofencesCallback,
|
|
20
|
-
RadarSearchGeofencesOptions,
|
|
21
|
-
RadarSearchPlacesCallback,
|
|
22
|
-
RadarSearchPlacesOptions,
|
|
23
|
-
RadarStartTripOptions,
|
|
24
|
-
RadarTrackCallback,
|
|
25
|
-
RadarTrackOnceOptions,
|
|
26
|
-
RadarTrackVerifiedCallback,
|
|
27
|
-
RadarTrackingOptions,
|
|
28
|
-
RadarTrackingOptionsDesiredAccuracy,
|
|
29
|
-
RadarTrackingOptionsForegroundService,
|
|
30
|
-
RadarTrackVerifiedOptions,
|
|
31
|
-
RadarTripCallback,
|
|
32
|
-
RadarTripOptions,
|
|
33
|
-
RadarUpdateTripOptions,
|
|
34
|
-
RadarVerifiedTrackingOptions,
|
|
35
|
-
RadarListenerCallback,
|
|
36
|
-
RadarGetMatrixOptions,
|
|
37
|
-
RadarMetadata,
|
|
38
|
-
RadarIPGeocodeCallback,
|
|
39
|
-
} from "./types";
|
|
40
|
-
|
|
41
|
-
export interface RadarNativeInterface {
|
|
42
|
-
initialize: (publishableKey: string, fraud?: boolean) => void;
|
|
43
|
-
setLogLevel: (level: RadarLogLevel) => void;
|
|
44
|
-
setUserId: (userId: string) => void;
|
|
45
|
-
getUserId: () => Promise<string>;
|
|
46
|
-
setDescription: (description: string) => void;
|
|
47
|
-
getDescription: () => Promise<string>;
|
|
48
|
-
setMetadata: (metadata: RadarMetadata) => void;
|
|
49
|
-
getMetadata: () => Promise<RadarMetadata>;
|
|
50
|
-
setAnonymousTrackingEnabled: (enabled: boolean) => void;
|
|
51
|
-
getPermissionsStatus: () => Promise<RadarPermissionsStatus>;
|
|
52
|
-
requestPermissions: (background: boolean) => Promise<RadarPermissionsStatus>;
|
|
53
|
-
getLocation: (
|
|
54
|
-
desiredAccuracy?: RadarTrackingOptionsDesiredAccuracy
|
|
55
|
-
) => Promise<RadarLocationCallback>;
|
|
56
|
-
trackOnce: (
|
|
57
|
-
options?: RadarTrackOnceOptions | Location
|
|
58
|
-
) => Promise<RadarTrackCallback>;
|
|
59
|
-
trackVerified: (options?: RadarTrackVerifiedOptions) => Promise<RadarTrackVerifiedCallback>;
|
|
60
|
-
getVerifiedLocationToken: () => Promise<RadarTrackVerifiedCallback>;
|
|
61
|
-
startTrackingEfficient: () => void;
|
|
62
|
-
startTrackingResponsive: () => void;
|
|
63
|
-
startTrackingContinuous: () => void;
|
|
64
|
-
startTrackingCustom: (options: RadarTrackingOptions) => void;
|
|
65
|
-
startTrackingVerified: (options?: RadarVerifiedTrackingOptions) => void;
|
|
66
|
-
mockTracking: (options: RadarMockTrackingOptions) => void;
|
|
67
|
-
stopTracking: () => void;
|
|
68
|
-
stopTrackingVerified: () => void;
|
|
69
|
-
getTrackingOptions: () => Promise<RadarTrackingOptions>;
|
|
70
|
-
isUsingRemoteTrackingOptions: () => Promise<boolean>;
|
|
71
|
-
isTracking: () => Promise<boolean>;
|
|
72
|
-
setForegroundServiceOptions: (
|
|
73
|
-
options: RadarTrackingOptionsForegroundService
|
|
74
|
-
) => void;
|
|
75
|
-
setNotificationOptions: (options: RadarNotificationOptions) => void;
|
|
76
|
-
getTripOptions: () => Promise<RadarTripOptions>;
|
|
77
|
-
startTrip: (options: RadarStartTripOptions) => Promise<RadarTripCallback>;
|
|
78
|
-
completeTrip: () => Promise<RadarTripCallback>;
|
|
79
|
-
cancelTrip: () => Promise<RadarTripCallback>;
|
|
80
|
-
updateTrip: (options: RadarUpdateTripOptions) => Promise<RadarTripCallback>;
|
|
81
|
-
acceptEvent: (eventId: string, verifiedPlaceId: string) => void;
|
|
82
|
-
rejectEvent: (eventId: string) => void;
|
|
83
|
-
getContext: (location?: Location) => Promise<RadarContextCallback>;
|
|
84
|
-
searchPlaces: (
|
|
85
|
-
options: RadarSearchPlacesOptions
|
|
86
|
-
) => Promise<RadarSearchPlacesCallback>;
|
|
87
|
-
searchGeofences: (
|
|
88
|
-
options: RadarSearchGeofencesOptions
|
|
89
|
-
) => Promise<RadarSearchGeofencesCallback>;
|
|
90
|
-
autocomplete: (
|
|
91
|
-
options: RadarAutocompleteOptions
|
|
92
|
-
) => Promise<RadarAddressCallback>;
|
|
93
|
-
geocode: (options: RadarGeocodeOptions) => Promise<RadarAddressCallback>;
|
|
94
|
-
reverseGeocode: (options?: RadarReverseGeocodeOptions) => Promise<RadarAddressCallback>;
|
|
95
|
-
ipGeocode: () => Promise<RadarIPGeocodeCallback>;
|
|
96
|
-
getDistance: (option: RadarGetDistanceOptions) => Promise<RadarRouteCallback>;
|
|
97
|
-
getMatrix: (option: RadarGetMatrixOptions) => Promise<RadarRouteMatrix>;
|
|
98
|
-
logConversion: (
|
|
99
|
-
options: RadarLogConversionOptions
|
|
100
|
-
) => Promise<RadarLogConversionCallback>;
|
|
101
|
-
sendEvent: (name: string, metadata: RadarMetadata) => void;
|
|
102
|
-
on: (channel: RadarEventChannel, callback: RadarListenerCallback) => void;
|
|
103
|
-
off: (channel: RadarEventChannel, callback?: Function | undefined) => void;
|
|
104
|
-
nativeSdkVersion: () => Promise<string>;
|
|
105
|
-
rnSdkVersion: () => string;
|
|
106
|
-
}
|