Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying RecaptchaEnterprise React Native version 18.3.0 #8

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RecaptchaEnterpriseReactNative_kotlinVersion=1.7.0
RecaptchaEnterpriseReactNative_kotlinVersion=1.8.20
RecaptchaEnterpriseReactNative_minSdkVersion=21
RecaptchaEnterpriseReactNative_targetSdkVersion=31
RecaptchaEnterpriseReactNative_compileSdkVersion=31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand All @@ -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) }
}
Expand Down
Binary file modified example/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
16 changes: 8 additions & 8 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion recaptcha-enterprise-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading