Skip to content

Commit

Permalink
build(ios): add RecaptchaInterop dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Vasin committed Jul 2, 2024
1 parent 6180c6d commit 7b25c24
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ prepare_react_native_project!
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.disabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Expand Down Expand Up @@ -42,7 +42,8 @@ target 'RecaptchaEnterpriseExample' do
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

pod 'react-native-recaptcha-enterprise', :path => "../..", :linkage => :static, :modular_headers => true
pod 'RecaptchaInterop', :modular_headers => true
# pod 'react-native-recaptcha-enterprise', :path => "../..", :linkage => :static, :modular_headers => true

post_install do |installer|
react_native_post_install(
Expand Down
1 change: 1 addition & 0 deletions example/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ module.exports = {
[pak.name]: {
root: path.join(__dirname, '..'),
},
'react-native-flipper': { platforms: { ios: null } },
},
};
2 changes: 1 addition & 1 deletion ios/RecaptchaEnterprise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class RecaptchaEnterprise: NSObject {
? RecaptchaAction.init(action: .login)
: RecaptchaAction.init(customAction: actionName)

recaptchaClient.execute(actualAction!) { executeResult, error in
recaptchaClient.execute(actualAction) { executeResult, error in
if let executeResult = executeResult {
resolve(executeResult.recaptchaToken)
} else if let error = error {
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": "react-native-recaptcha-enterprise",
"version": "0.2.6",
"version": "0.2.7",
"description": "Google Enterprise reCaptcha library for React-Native. Real native implementation for iOS and Android.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
1 change: 1 addition & 0 deletions react-native-recaptcha-enterprise.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Pod::Spec.new do |s|

s.dependency "React-Core"
s.dependency "RecaptchaEnterprise", '18.5.1'
s.dependency "RecaptchaInterop", '100.0'

# 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 7b25c24

Please sign in to comment.