diff --git a/CHANGELOG.md b/CHANGELOG.md index 630337d..a6b43ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 18.3.0 + +Upgrade iOS and Android SDK to 18.3.0 + ## 18.2.2 Upgrade iOS SDK to 18.2.2 diff --git a/README.md b/README.md index db78c0e..73a0ee8 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Podfile: `flipper_config = FlipperConfiguration.disabled` Install prerequisites: -npm update cd example && npm update cd example/ios && pod install +npx yarn install && cd example && npx yarn install && cd ios && pod install ### Run sample app: diff --git a/android/build.gradle b/android/build.gradle index f3d0cbd..9653692 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -101,7 +101,7 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'com.google.android.recaptcha:recaptcha:18.2.1' + implementation 'com.google.android.recaptcha:recaptcha:18.3.0' } if (isNewArchitectureEnabled()) { diff --git a/android/gradle.properties b/android/gradle.properties index 783ee7d..c6b6673 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,4 @@ -RecaptchaEnterpriseReactNative_kotlinVersion=1.7.0 +RecaptchaEnterpriseReactNative_kotlinVersion=1.8.20 RecaptchaEnterpriseReactNative_minSdkVersion=21 RecaptchaEnterpriseReactNative_targetSdkVersion=31 RecaptchaEnterpriseReactNative_compileSdkVersion=31 diff --git a/android/src/main/java/com/recaptchaenterprisereactnative/RecaptchaEnterpriseReactNativeModule.kt b/android/src/main/java/com/recaptchaenterprisereactnative/RecaptchaEnterpriseReactNativeModule.kt index 7c690ad..e05ce61 100644 --- a/android/src/main/java/com/recaptchaenterprisereactnative/RecaptchaEnterpriseReactNativeModule.kt +++ b/android/src/main/java/com/recaptchaenterprisereactnative/RecaptchaEnterpriseReactNativeModule.kt @@ -64,12 +64,11 @@ class RecaptchaEnterpriseReactNativeModule(reactContext: ReactApplicationContext @ReactMethod fun initClient(siteKey: String, arguments: ReadableMap, promise: Promise) { - // JS+ReadableMap have no support for long - val timeout = arguments.getDouble("timeout").toLong() - GlobalScope.launch { let { - if (timeout != null) { + if (arguments.hasKey("timeout")) { + // JS+ReadableMap have no support for long + val timeout = arguments.getDouble("timeout").toLong() Recaptcha.getClient(application, siteKey, timeout) } else { Recaptcha.getClient(application, siteKey) @@ -85,7 +84,7 @@ class RecaptchaEnterpriseReactNativeModule(reactContext: ReactApplicationContext @ReactMethod fun execute(actionStr: String, arguments: ReadableMap, promise: Promise) { - if (!this::recaptchaClient.isInitialized || recaptchaClient == null) { + if (!this::recaptchaClient.isInitialized) { promise.reject("RN_EXECUTE_FAILED", "Initialize client first", null) return } @@ -96,7 +95,7 @@ class RecaptchaEnterpriseReactNativeModule(reactContext: ReactApplicationContext GlobalScope.launch { recaptchaClient - .let { if (timeout != null) it.execute(action, timeout) else it.execute(action) } + .let { if (arguments.hasKey("timeout")) it.execute(action, timeout) else it.execute(action) } .onSuccess { token -> promise.resolve(token) } .onFailure { exception -> promise.reject(exception) } } diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/example/android/gradle/wrapper/gradle-wrapper.jar index 943f0cb..afba109 100644 Binary files a/example/android/gradle/wrapper/gradle-wrapper.jar and b/example/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index da36385..5be0ff3 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -309,12 +309,12 @@ PODS: - React-jsi (= 0.70.6) - React-logger (= 0.70.6) - React-perflogger (= 0.70.6) - - recaptcha-enterprise-react-native (18.2.2): + - recaptcha-enterprise-react-native (18.3.0): - React-Core - - RecaptchaEnterprise (= 18.2.2) - - RecaptchaEnterprise (18.2.2): - - RecaptchaInterop (~> 18.2.1) - - RecaptchaInterop (18.2.1) + - RecaptchaEnterprise (= 18.3.0) + - RecaptchaEnterprise (18.3.0): + - RecaptchaInterop (~> 100.0.0) + - RecaptchaInterop (100.0.0) - Yoga (1.14.0) DEPENDENCIES: @@ -475,9 +475,9 @@ SPEC CHECKSUMS: React-RCTVibration: c75ceef7aa60a33b2d5731ebe5800ddde40cefc4 React-runtimeexecutor: 15437b576139df27635400de0599d9844f1ab817 ReactCommon: 349be31adeecffc7986a0de875d7fb0dcf4e251c - recaptcha-enterprise-react-native: b7a8cc466f74e18a61b3e11e3448e1f71e6a18b2 - RecaptchaEnterprise: 3959c4a60afa01021f4e75f60644ce5fc4b8e90e - RecaptchaInterop: df2e3c6d5b27abf3367234e9ba6fc316e4540a07 + recaptcha-enterprise-react-native: 8c142509f1878e81fe7395ab4e06fe177875fc37 + RecaptchaEnterprise: 9b60bc1e1633d120e24a098d80546776fab1282e + RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 Yoga: 99caf8d5ab45e9d637ee6e0174ec16fbbb01bcfc PODFILE CHECKSUM: ab598883a61e86008d9cf3b61f344bd0b355263b diff --git a/package.json b/package.json index a85b133..f5440d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/recaptcha-enterprise-react-native", - "version": "18.2.2", + "version": "18.3.0", "description": "React Native plugin for reCAPTCHA Enterprise Mobile SDKs", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/recaptcha-enterprise-react-native.podspec b/recaptcha-enterprise-react-native.podspec index 6a11b35..38ebb16 100644 --- a/recaptcha-enterprise-react-native.podspec +++ b/recaptcha-enterprise-react-native.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,swift}" s.dependency "React-Core" - s.dependency "RecaptchaEnterprise", '=18.2.2' + s.dependency "RecaptchaEnterprise", '=18.3.0' s.static_framework = true