Skip to content

Commit

Permalink
Merge branch 'release/update_sdk' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Vasin committed Jul 2, 2024
2 parents 35f3d42 + 82e5de1 commit 9957686
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ public void initializeRecaptcha(String siteKey, Promise promise) {
}
Application application = currentActivity.getApplication();

if(!checkPlayServices()) {
promise.reject("NotAvailable", "Recaptcha is not available as no Google Play Services.");
try {
if(!checkPlayServices()) {
promise.reject("NotAvailable", "Recaptcha is not available as no Google Play Services.");
}
} catch (Exception e) {
promise.reject("NotAvailable", "Recaptcha is not available as no Google Play Services.");
}

Recaptcha
Expand Down
4 changes: 2 additions & 2 deletions ios/RecaptchaEnterprise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RecaptchaEnterprise: NSObject {
}
if let error = error {
print("RecaptchaClient creation error: \(error).")
reject(String(error.errorCode), error.errorMessage, error)
reject(String(error.errorCode), error.errorMessage, error)
}
}
}
Expand All @@ -33,7 +33,7 @@ class RecaptchaEnterprise: NSObject {
if let executeResult = executeResult {
resolve(executeResult.recaptchaToken)
} else if let error = error {
reject(String(error.errorCode), error.errorMessage, error)
reject(String(error.errorCode), error.errorMessage, error)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion react-native-recaptcha-enterprise.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm,swift}"

s.dependency "React-Core"
s.dependency "RecaptchaEnterprise", '18.1.1'
s.dependency "RecaptchaEnterprise", '18.5.1'

# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
Expand Down

0 comments on commit 9957686

Please sign in to comment.