From f13dd9087f4733eeb87195db1d1c57528ea54cfb Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Tue, 26 Nov 2024 15:47:48 -0500 Subject: [PATCH 01/13] add addRadarSDKVerify option --- example/app.json | 5 +++-- package.json | 2 +- plugin/src/types.ts | 1 + plugin/src/withRadarIOS.ts | 30 ++++++++++++++++++++++++++++++ react-native-radar.podspec | 2 +- 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/example/app.json b/example/app.json index 101959ab..24956f3f 100644 --- a/example/app.json +++ b/example/app.json @@ -16,7 +16,7 @@ ], "ios": { "supportsTablet": true, - "bundleIdentifier": "com.radar.example", + "bundleIdentifier": "com.radar.example" }, "android": { "adaptiveIcon": { @@ -38,7 +38,8 @@ "androidFraud": true, "androidBackgroundPermission": true, "androidFineLocationPermission": true, - "addRadarSDKMotion": true + "addRadarSDKMotion": true, + "addRadarSDKVerify": true } ], [ diff --git a/package.json b/package.json index 8176fc8f..58a5e508 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "React Native module for Radar, the leading geofencing and location tracking platform", "homepage": "https://radar.com", "license": "Apache-2.0", - "version": "3.18.5", + "version": "3.19.0-beta.1", "main": "dist/index.js", "files": [ "/android", diff --git a/plugin/src/types.ts b/plugin/src/types.ts index 083b011e..54ac0628 100644 --- a/plugin/src/types.ts +++ b/plugin/src/types.ts @@ -8,4 +8,5 @@ export interface RadarPluginProps { androidFineLocationPermission?: boolean; addRadarSDKMotion?: boolean; iosNSMotionUsageDescription?: string; + addRadarSDKVerify?: boolean; } \ No newline at end of file diff --git a/plugin/src/withRadarIOS.ts b/plugin/src/withRadarIOS.ts index b12d6aa5..aa2d376f 100644 --- a/plugin/src/withRadarIOS.ts +++ b/plugin/src/withRadarIOS.ts @@ -74,6 +74,36 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { }, ]); } + if (args.addRadarSDKVerify) { + config = withDangerousMod(config, [ + 'ios', + async config => { + const filePath = path.join(config.modRequest.platformProjectRoot, 'Podfile'); + const contents = await fs.readFile(filePath, 'utf-8'); + + // Check if the pod declaration already exists + if (contents.indexOf("pod 'Telegraph', '0.40.0'") === -1) { + // Find the target block + const targetRegex = /target '(\w+)' do/g; + const match = targetRegex.exec(contents); + if (match) { + const targetStartIndex = match.index; + const targetEndIndex = contents.indexOf('end', targetStartIndex) + 3; + + // Insert the pod declaration within the target block + const targetBlock = contents.substring(targetStartIndex, targetEndIndex); + const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'Telegraph', '0.40.0'`); + const newContents = contents.replace(targetBlock, updatedTargetBlock); + + // Write the updated contents back to the Podfile + await fs.writeFile(filePath, newContents); + } + } + + return config; + }, + ]); + } return config; }; \ No newline at end of file diff --git a/react-native-radar.podspec b/react-native-radar.podspec index 522653c7..c8303f4f 100644 --- a/react-native-radar.podspec +++ b/react-native-radar.podspec @@ -15,5 +15,5 @@ Pod::Spec.new do |s| s.platform = :ios, "10.0" s.dependency "React" - s.dependency "RadarSDK", "~> 3.18.5" + s.dependency "RadarSDK", "~> 3.19.2-beta.1" end From 82a2a1c4479e3d4e907e7ffc566e5e01d35d8e29 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 08:07:47 -0500 Subject: [PATCH 02/13] expose startVerifyServer() --- .../src/main/java/io/radar/react/RNRadarModule.java | 10 ++++++++++ ios/RNRadar.m | 8 ++++++++ react-native-radar.podspec | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/io/radar/react/RNRadarModule.java b/android/src/main/java/io/radar/react/RNRadarModule.java index 5ed94b93..02b50655 100644 --- a/android/src/main/java/io/radar/react/RNRadarModule.java +++ b/android/src/main/java/io/radar/react/RNRadarModule.java @@ -448,6 +448,16 @@ public void onComplete(@NonNull Radar.RadarStatus status, @Nullable RadarVerifie Radar.getVerifiedLocationToken(trackCallback); } + @ReactMethod + public void startVerifyServer() { + Radar.startVerifyServer(); + } + + @ReactMethod + public void stopVerifyServer() { + Radar.stopVerifyServer(); + } + @ReactMethod public void startTrackingEfficient() { Radar.startTracking(RadarTrackingOptions.EFFICIENT); diff --git a/ios/RNRadar.m b/ios/RNRadar.m index db457d98..7c347daf 100644 --- a/ios/RNRadar.m +++ b/ios/RNRadar.m @@ -357,6 +357,14 @@ - (void)didUpdateToken:(RadarVerifiedLocationToken *)token { [Radar getVerifiedLocationToken:completionHandler]; } +RCT_EXPORT_METHOD(startVerifyServer) { + [Radar startVerifyServer]; +} + +RCT_EXPORT_METHOD(stopVerifyServer) { + [Radar stopVerifyServer]; +} + RCT_EXPORT_METHOD(startTrackingEfficient) { [Radar startTrackingWithOptions:RadarTrackingOptions.presetEfficient]; } diff --git a/react-native-radar.podspec b/react-native-radar.podspec index c8303f4f..969771b8 100644 --- a/react-native-radar.podspec +++ b/react-native-radar.podspec @@ -12,8 +12,8 @@ Pod::Spec.new do |s| s.summary = package[:description] s.source = { git: package[:repository][:url] } s.source_files = "ios/*.{h,m}" - s.platform = :ios, "10.0" + s.platform = :ios, "12.0" s.dependency "React" - s.dependency "RadarSDK", "~> 3.19.2-beta.1" + s.dependency "RadarSDK", "~> 3.19.2-beta.4" end From 2a8decc78715ec27a20e6cab12f5ba6e2cbc2bae Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 08:11:23 -0500 Subject: [PATCH 03/13] add types, update example app --- example/App.tsx | 14 ++++++++++++++ src/@types/RadarNativeInterface.ts | 2 ++ 2 files changed, 16 insertions(+) diff --git a/example/App.tsx b/example/App.tsx index e69ef0ce..86186598 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -564,6 +564,20 @@ export default function App() { }} /> + { + Radar.startVerifyServer(); + }} + /> + + { + Radar.stopVerifyServer(); + }} + /> + { diff --git a/src/@types/RadarNativeInterface.ts b/src/@types/RadarNativeInterface.ts index 1d3b2dde..a4088ce7 100644 --- a/src/@types/RadarNativeInterface.ts +++ b/src/@types/RadarNativeInterface.ts @@ -60,6 +60,8 @@ export interface RadarNativeInterface { ) => Promise; trackVerified: (options?: RadarTrackVerifiedOptions) => Promise; getVerifiedLocationToken: () => Promise; + startVerifyServer: () => void; + stopVerifyServer: () => void; startTrackingEfficient: () => void; startTrackingResponsive: () => void; startTrackingContinuous: () => void; From 402e317f3ca29367dc0b690218fdb08e974f612c Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 08:12:25 -0500 Subject: [PATCH 04/13] add types --- src/index.native.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/index.native.ts b/src/index.native.ts index b3eb9abb..85f01d53 100644 --- a/src/index.native.ts +++ b/src/index.native.ts @@ -118,6 +118,12 @@ const trackVerified = ( const getVerifiedLocationToken = (): Promise => NativeModules.RNRadar.getVerifiedLocationToken(); +const startVerifyServer = (): void => + NativeModules.RNRadar.startVerifyServer(); + +const stopVerifyServer = (): void => + NativeModules.RNRadar.stopVerifyServer(); + const startTrackingEfficient = (): void => NativeModules.RNRadar.startTrackingEfficient(); @@ -263,6 +269,8 @@ const Radar: RadarNativeInterface = { trackOnce, trackVerified, getVerifiedLocationToken, + startVerifyServer, + stopVerifyServer, startTrackingEfficient, startTrackingResponsive, startTrackingContinuous, From e2003ae6424db5dd0bfa74799fa5cb092f7d8068 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 08:13:13 -0500 Subject: [PATCH 05/13] add types --- src/index.web.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/index.web.js b/src/index.web.js index a105976b..492401a3 100644 --- a/src/index.web.js +++ b/src/index.web.js @@ -123,6 +123,14 @@ const getVerifiedLocationToken = () => { return new Promise((resolve, reject) => { reject("getVerifiedLocationToken() is not implemented on web") }); }; +const startVerifyServer = () => { + if (throws) throw new Error("startVerifyServer() is not implemented on web"); +}; + +const stopVerifyServer = () => { + if (throws) throw new Error("stopVerifyServer() is not implemented on web"); +}; + const startTrackingEfficient = () => { if (throws) throw new Error("startTrackingEfficient() is not implemented on web"); }; From 727aa631c8a2c8204eb4dac84f3c8730e2223ec8 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 08:44:35 -0500 Subject: [PATCH 06/13] use Telegraph 0.30.0 --- example/package-lock.json | 5 +++-- plugin/src/withRadarIOS.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index c1599cd0..9d84390f 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -12203,8 +12203,9 @@ } }, "node_modules/react-native-radar": { - "version": "3.18.3", + "version": "3.19.0-beta.1", "resolved": "file:..", + "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.21.0", "@react-native-community/netinfo": "^7.1.3", @@ -23201,7 +23202,7 @@ } }, "react-native-radar": { - "version": "3.18.3", + "version": "3.19.0-beta.1", "requires": { "@babel/runtime": "^7.21.0", "@react-native-community/netinfo": "^7.1.3", diff --git a/plugin/src/withRadarIOS.ts b/plugin/src/withRadarIOS.ts index aa2d376f..91e9e7ed 100644 --- a/plugin/src/withRadarIOS.ts +++ b/plugin/src/withRadarIOS.ts @@ -92,7 +92,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { // Insert the pod declaration within the target block const targetBlock = contents.substring(targetStartIndex, targetEndIndex); - const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'Telegraph', '0.40.0'`); + const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'Telegraph', '0.30.0'`); const newContents = contents.replace(targetBlock, updatedTargetBlock); // Write the updated contents back to the Podfile From 01950a50a3d335161f8157d216338dbe5243735b Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 09:17:57 -0500 Subject: [PATCH 07/13] add modular_headers --- plugin/src/withRadarIOS.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/withRadarIOS.ts b/plugin/src/withRadarIOS.ts index 91e9e7ed..e00eed50 100644 --- a/plugin/src/withRadarIOS.ts +++ b/plugin/src/withRadarIOS.ts @@ -82,7 +82,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { const contents = await fs.readFile(filePath, 'utf-8'); // Check if the pod declaration already exists - if (contents.indexOf("pod 'Telegraph', '0.40.0'") === -1) { + if (contents.indexOf("pod 'Telegraph', '0.30.0'") === -1) { // Find the target block const targetRegex = /target '(\w+)' do/g; const match = targetRegex.exec(contents); @@ -92,7 +92,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { // Insert the pod declaration within the target block const targetBlock = contents.substring(targetStartIndex, targetEndIndex); - const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'Telegraph', '0.30.0'`); + const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'Telegraph', '0.30.0', :modular_headers => true\n pod 'CocoaAsyncSocket', :modular_headers => true\n pod 'HTTPParserC', :modular_headers => true`); const newContents = contents.replace(targetBlock, updatedTargetBlock); // Write the updated contents back to the Podfile From 77e9205c767f33395a37ed9379a9f1700a08a576 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 13:41:32 -0500 Subject: [PATCH 08/13] update example app --- android/build.gradle | 3 ++- example/app.json | 2 +- example/package-lock.json | 6 ++++-- plugin/src/withRadarIOS.ts | 2 ++ react-native-radar.podspec | 2 +- react-native-radar.podspec.template | 2 +- src/index.web.js | 2 ++ 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index abc11f43..2029b1c5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -45,6 +45,7 @@ repositories { dependencies { api 'com.facebook.react:react-native:+' - api 'io.radar:sdk:3.18.6' + api 'org.nanohttpd:nanohttpd:2.3.1' + api 'io.radar:sdk:3.18.8-beta.1' } diff --git a/example/app.json b/example/app.json index 24956f3f..f1dc72a7 100644 --- a/example/app.json +++ b/example/app.json @@ -38,7 +38,7 @@ "androidFraud": true, "androidBackgroundPermission": true, "androidFineLocationPermission": true, - "addRadarSDKMotion": true, + "addRadarSDKMotion": false, "addRadarSDKVerify": true } ], diff --git a/example/package-lock.json b/example/package-lock.json index 9d84390f..42a6a2ec 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -26,7 +26,7 @@ } }, "..": { - "version": "3.18.3", + "version": "3.19.0-beta.1", "extraneous": true, "license": "Apache-2.0", "dependencies": { @@ -5273,6 +5273,7 @@ "version": "7.1.12", "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-7.1.12.tgz", "integrity": "sha512-fkCRkOgzfdD0sr8JTasDgm716l8bJPkCNjXIyllG8K+UyixVa68lroQmgW9pewE5G5p43I9MWPtGZR/kVowBzg==", + "license": "MIT", "peerDependencies": { "react-native": ">=0.59" } @@ -12046,7 +12047,8 @@ "node_modules/radar-sdk-js": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/radar-sdk-js/-/radar-sdk-js-3.7.1.tgz", - "integrity": "sha512-yhuvEfyOeOEZpPf9XGOaC/TZlf3iib6iCcvZnwHR+fRV6r5f4/BIEO9xcEiU0WF/sl7pA22Vx4KXi8vsfBrstg==" + "integrity": "sha512-yhuvEfyOeOEZpPf9XGOaC/TZlf3iib6iCcvZnwHR+fRV6r5f4/BIEO9xcEiU0WF/sl7pA22Vx4KXi8vsfBrstg==", + "license": "Apache-2.0" }, "node_modules/range-parser": { "version": "1.2.1", diff --git a/plugin/src/withRadarIOS.ts b/plugin/src/withRadarIOS.ts index e00eed50..0706f9ac 100644 --- a/plugin/src/withRadarIOS.ts +++ b/plugin/src/withRadarIOS.ts @@ -15,6 +15,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { if (args.iosBackgroundMode) { config.modResults.UIBackgroundModes = ["location", "fetch"]; } + /* if (args.iosFraud) { config.modResults.NSAppTransportSecurity = { NSAllowsArbitraryLoads: false, @@ -35,6 +36,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { }, }; } + */ if (args.addRadarSDKMotion) { config.modResults.NSMotionUsageDescription = args.iosNSMotionUsageDescription ?? diff --git a/react-native-radar.podspec b/react-native-radar.podspec index 969771b8..d5c0eec0 100644 --- a/react-native-radar.podspec +++ b/react-native-radar.podspec @@ -15,5 +15,5 @@ Pod::Spec.new do |s| s.platform = :ios, "12.0" s.dependency "React" - s.dependency "RadarSDK", "~> 3.19.2-beta.4" + s.dependency "RadarSDK", "~> 3.19.2-beta.6" end diff --git a/react-native-radar.podspec.template b/react-native-radar.podspec.template index 4eb46fe0..dc5cb547 100644 --- a/react-native-radar.podspec.template +++ b/react-native-radar.podspec.template @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.summary = package[:description] s.source = { git: package[:repository][:url] } s.source_files = "ios/*.{h,m}" - s.platform = :ios, "10.0" + s.platform = :ios, "12.0" s.dependency "React" s.dependency "RadarSDK", "~> {{ version }}" diff --git a/src/index.web.js b/src/index.web.js index 492401a3..de3d7993 100644 --- a/src/index.web.js +++ b/src/index.web.js @@ -489,6 +489,8 @@ const Radar = { trackOnce, trackVerified, getVerifiedLocationToken, + startVerifyServer, + stopVerifyServer, startTrackingEfficient, startTrackingResponsive, startTrackingContinuous, From 789a9d5d34a2f9265968885091b1bf6269f7b769 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 13:49:15 -0500 Subject: [PATCH 09/13] update package-lock --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5fb1b03e..b98835a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-native-radar", - "version": "3.18.5", + "version": "3.19.0-beta.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-native-radar", - "version": "3.18.5", + "version": "3.19.0-beta.1", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.21.0", From 148ee24f04433d74947bdea5987f16470cf0d145 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Fri, 29 Nov 2024 14:00:19 -0500 Subject: [PATCH 10/13] update withRadarIOS --- plugin/src/withRadarAndroid.ts | 1 + plugin/src/withRadarIOS.ts | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/src/withRadarAndroid.ts b/plugin/src/withRadarAndroid.ts index c3638125..77d6b8ce 100644 --- a/plugin/src/withRadarAndroid.ts +++ b/plugin/src/withRadarAndroid.ts @@ -59,6 +59,7 @@ export const withRadarAndroid = ( localhost + 10.0.2.2 diff --git a/plugin/src/withRadarIOS.ts b/plugin/src/withRadarIOS.ts index 0706f9ac..e00eed50 100644 --- a/plugin/src/withRadarIOS.ts +++ b/plugin/src/withRadarIOS.ts @@ -15,7 +15,6 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { if (args.iosBackgroundMode) { config.modResults.UIBackgroundModes = ["location", "fetch"]; } - /* if (args.iosFraud) { config.modResults.NSAppTransportSecurity = { NSAllowsArbitraryLoads: false, @@ -36,7 +35,6 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { }, }; } - */ if (args.addRadarSDKMotion) { config.modResults.NSMotionUsageDescription = args.iosNSMotionUsageDescription ?? From 7b3ba491ac28dff59f09e34dfce28b323d10063d Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Sat, 30 Nov 2024 11:07:30 -0500 Subject: [PATCH 11/13] expo config to insert dependencies --- android/build.gradle | 2 -- plugin/src/withRadarAndroid.ts | 14 ++++++++++++-- plugin/src/withRadarIOS.ts | 4 ++-- react-native-radar.podspec | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 2029b1c5..2f01e914 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -45,7 +45,5 @@ repositories { dependencies { api 'com.facebook.react:react-native:+' - api 'org.nanohttpd:nanohttpd:2.3.1' api 'io.radar:sdk:3.18.8-beta.1' } - diff --git a/plugin/src/withRadarAndroid.ts b/plugin/src/withRadarAndroid.ts index 77d6b8ce..552e3508 100644 --- a/plugin/src/withRadarAndroid.ts +++ b/plugin/src/withRadarAndroid.ts @@ -83,7 +83,8 @@ export const withRadarAndroid = ( if (config.modResults.language === "groovy") { config.modResults.contents = modifyAppBuildGradle( config.modResults.contents, - args.androidFraud ?? false + args.androidFraud ?? false, + args.addRadarSDKVerify ?? false ); } else { throw new Error( @@ -151,9 +152,10 @@ async function setCustomConfigAsync( return androidManifest; } -function modifyAppBuildGradle(buildGradle: string, androidFraud: boolean) { +function modifyAppBuildGradle(buildGradle: string, androidFraud: boolean, addRadarSDKVerify: boolean) { let hasLocationService = false; let hasPlayIntegrity = false; + let hasNanoHTTPD = false; if ( buildGradle.includes( 'com.google.android.gms:play-services-location:21.0.1"' @@ -166,6 +168,10 @@ function modifyAppBuildGradle(buildGradle: string, androidFraud: boolean) { hasPlayIntegrity = true; } + if (buildGradle.includes('org.nanohttpd:nanohttpd:2.3.1"')) { + hasNanoHTTPD = true; + } + const pattern = /^dependencies {/m; if (!buildGradle.match(pattern)) { @@ -185,6 +191,10 @@ function modifyAppBuildGradle(buildGradle: string, androidFraud: boolean) { replacementString += "\n\n" + ' implementation "com.google.android.play:integrity:1.2.0"'; } + if (addRadarSDKVerify && !hasNanoHTTPD) { + replacementString += + "\n\n" + ' implementation "org.nanohttpd:nanohttpd:2.3.1"'; + } return buildGradle.replace( pattern, diff --git a/plugin/src/withRadarIOS.ts b/plugin/src/withRadarIOS.ts index e00eed50..1fde85cf 100644 --- a/plugin/src/withRadarIOS.ts +++ b/plugin/src/withRadarIOS.ts @@ -82,7 +82,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { const contents = await fs.readFile(filePath, 'utf-8'); // Check if the pod declaration already exists - if (contents.indexOf("pod 'Telegraph', '0.30.0'") === -1) { + if (contents.indexOf("pod 'RadarSDK/Verify', '3.19.2-beta.8'") === -1) { // Find the target block const targetRegex = /target '(\w+)' do/g; const match = targetRegex.exec(contents); @@ -92,7 +92,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { // Insert the pod declaration within the target block const targetBlock = contents.substring(targetStartIndex, targetEndIndex); - const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'Telegraph', '0.30.0', :modular_headers => true\n pod 'CocoaAsyncSocket', :modular_headers => true\n pod 'HTTPParserC', :modular_headers => true`); + const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDK/Verify', '3.19.2-beta.8'`); const newContents = contents.replace(targetBlock, updatedTargetBlock); // Write the updated contents back to the Podfile diff --git a/react-native-radar.podspec b/react-native-radar.podspec index d5c0eec0..d4972cd1 100644 --- a/react-native-radar.podspec +++ b/react-native-radar.podspec @@ -15,5 +15,5 @@ Pod::Spec.new do |s| s.platform = :ios, "12.0" s.dependency "React" - s.dependency "RadarSDK", "~> 3.19.2-beta.6" + s.dependency "RadarSDK", "~> 3.19.2-beta.7" end From da78add2aafe2412aaa8d746c9592e4b21f779c4 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Sat, 30 Nov 2024 12:43:19 -0500 Subject: [PATCH 12/13] update plugin --- plugin/src/withRadarIOS.ts | 4 ++-- react-native-radar.podspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/withRadarIOS.ts b/plugin/src/withRadarIOS.ts index 1fde85cf..81f85b70 100644 --- a/plugin/src/withRadarIOS.ts +++ b/plugin/src/withRadarIOS.ts @@ -82,7 +82,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { const contents = await fs.readFile(filePath, 'utf-8'); // Check if the pod declaration already exists - if (contents.indexOf("pod 'RadarSDK/Verify', '3.19.2-beta.8'") === -1) { + if (contents.indexOf("pod 'RadarSDK/Verify', '3.19.2-beta.9'") === -1) { // Find the target block const targetRegex = /target '(\w+)' do/g; const match = targetRegex.exec(contents); @@ -92,7 +92,7 @@ export const withRadarIOS: ConfigPlugin = (config, args) => { // Insert the pod declaration within the target block const targetBlock = contents.substring(targetStartIndex, targetEndIndex); - const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDK/Verify', '3.19.2-beta.8'`); + const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDK/Verify', '3.19.2-beta.9'\n pod 'CocoaAsyncSocket', :modular_headers => true\n pod 'HTTPParserC', :modular_headers => true`); const newContents = contents.replace(targetBlock, updatedTargetBlock); // Write the updated contents back to the Podfile diff --git a/react-native-radar.podspec b/react-native-radar.podspec index d4972cd1..b325cf15 100644 --- a/react-native-radar.podspec +++ b/react-native-radar.podspec @@ -15,5 +15,5 @@ Pod::Spec.new do |s| s.platform = :ios, "12.0" s.dependency "React" - s.dependency "RadarSDK", "~> 3.19.2-beta.7" + s.dependency "RadarSDK", "~> 3.19.2-beta.9" end From 8853da145a29077862ffe5ad18ef5b58284b8060 Mon Sep 17 00:00:00 2001 From: Nick Patrick Date: Sat, 30 Nov 2024 14:15:24 -0500 Subject: [PATCH 13/13] bump version --- example/package-lock.json | 79 ++++++++++++++------------------------- package-lock.json | 4 +- package.json | 2 +- 3 files changed, 31 insertions(+), 54 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index 42a6a2ec..f78d7698 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -27,7 +27,6 @@ }, "..": { "version": "3.19.0-beta.1", - "extraneous": true, "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.21.0", @@ -5269,15 +5268,6 @@ "node": ">=8" } }, - "node_modules/@react-native-community/netinfo": { - "version": "7.1.12", - "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-7.1.12.tgz", - "integrity": "sha512-fkCRkOgzfdD0sr8JTasDgm716l8bJPkCNjXIyllG8K+UyixVa68lroQmgW9pewE5G5p43I9MWPtGZR/kVowBzg==", - "license": "MIT", - "peerDependencies": { - "react-native": ">=0.59" - } - }, "node_modules/@react-native/assets-registry": { "version": "0.74.87", "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.74.87.tgz", @@ -12044,12 +12034,6 @@ "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" }, - "node_modules/radar-sdk-js": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/radar-sdk-js/-/radar-sdk-js-3.7.1.tgz", - "integrity": "sha512-yhuvEfyOeOEZpPf9XGOaC/TZlf3iib6iCcvZnwHR+fRV6r5f4/BIEO9xcEiU0WF/sl7pA22Vx4KXi8vsfBrstg==", - "license": "Apache-2.0" - }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -12205,28 +12189,8 @@ } }, "node_modules/react-native-radar": { - "version": "3.19.0-beta.1", - "resolved": "file:..", - "license": "Apache-2.0", - "dependencies": { - "@babel/runtime": "^7.21.0", - "@react-native-community/netinfo": "^7.1.3", - "radar-sdk-js": "^3.7.1" - }, - "peerDependencies": { - "@maplibre/maplibre-react-native": ">=9.0.1 || >=10.0.0-alpha", - "expo": ">=43.0.5", - "react": ">= 16.8.6", - "react-native": ">= 0.60.0" - }, - "peerDependenciesMeta": { - "@maplibre/maplibre-react-native": { - "optional": true - }, - "expo": { - "optional": true - } - } + "resolved": "..", + "link": true }, "node_modules/react-native-web": { "version": "0.19.13", @@ -18070,12 +18034,6 @@ "joi": "^17.2.1" } }, - "@react-native-community/netinfo": { - "version": "7.1.12", - "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-7.1.12.tgz", - "integrity": "sha512-fkCRkOgzfdD0sr8JTasDgm716l8bJPkCNjXIyllG8K+UyixVa68lroQmgW9pewE5G5p43I9MWPtGZR/kVowBzg==", - "requires": {} - }, "@react-native/assets-registry": { "version": "0.74.87", "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.74.87.tgz", @@ -23015,11 +22973,6 @@ "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" }, - "radar-sdk-js": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/radar-sdk-js/-/radar-sdk-js-3.7.1.tgz", - "integrity": "sha512-yhuvEfyOeOEZpPf9XGOaC/TZlf3iib6iCcvZnwHR+fRV6r5f4/BIEO9xcEiU0WF/sl7pA22Vx4KXi8vsfBrstg==" - }, "range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -23204,11 +23157,35 @@ } }, "react-native-radar": { - "version": "3.19.0-beta.1", + "version": "file:..", "requires": { + "@babel/core": "^7.2.2", + "@babel/preset-env": "^7.2.3", + "@babel/preset-react": "^7.0.0", + "@babel/register": "^7.0.0", "@babel/runtime": "^7.21.0", "@react-native-community/netinfo": "^7.1.3", - "radar-sdk-js": "^3.7.1" + "babel-core": "^7.0.0-bridge.0", + "babel-eslint": "^10.0.1", + "babel-jest": "^23.4.2", + "braces": ">=2.3.2", + "eslint": "^5.6.1", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-jest": "^22.1.2", + "eslint-plugin-jsx-a11y": "^6.1.1", + "eslint-plugin-react": "^7.11.1", + "expo": "^51.0.0", + "expo-module-scripts": "^3.5.2", + "jest": "^29.7.0", + "jest-junit": "^16.0.0", + "logkitty": ">=0.7.1", + "metro-react-native-babel-preset": "^0.51.1", + "npm-run-all": "^4.1.5", + "radar-sdk-js": "^3.7.1", + "react": "^18.2.0", + "react-native": "^0.74.5", + "typescript": "^5.3.3" } }, "react-native-web": { diff --git a/package-lock.json b/package-lock.json index b98835a2..695a4c9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-native-radar", - "version": "3.19.0-beta.1", + "version": "3.19.0-beta.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-native-radar", - "version": "3.19.0-beta.1", + "version": "3.19.0-beta.2", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.21.0", diff --git a/package.json b/package.json index 58a5e508..4672044f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "React Native module for Radar, the leading geofencing and location tracking platform", "homepage": "https://radar.com", "license": "Apache-2.0", - "version": "3.19.0-beta.1", + "version": "3.19.0-beta.2", "main": "dist/index.js", "files": [ "/android",