diff --git a/android/build.gradle b/android/build.gradle index 29dab4f..315935a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -38,7 +38,7 @@ def getExtOrIntegerDefault(name) { } // Update this value to the latest Android SDK version published on Maven -def transact_version = "3.11.9" +def transact_version = "3.12.0" android { namespace "com.atomicfi.transactreactnative" diff --git a/atomicfi-transact-react-native.podspec b/atomicfi-transact-react-native.podspec index 4e64dec..ea0e84a 100644 --- a/atomicfi-transact-react-native.podspec +++ b/atomicfi-transact-react-native.podspec @@ -20,13 +20,13 @@ Pod::Spec.new do |s| # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. if respond_to?(:install_modules_dependencies, true) install_modules_dependencies(s) - s.dependency "AtomicSDK", "3.20.7" + s.dependency "AtomicSDK", "3.22.0" s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES", } else s.dependency "React-Core" - s.dependency "AtomicSDK", "3.20.7" + s.dependency "AtomicSDK", "3.22.0" # Don't install the dependencies when we run `pod install` in the old architecture. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then diff --git a/example/screens/TransactScreen.tsx b/example/screens/TransactScreen.tsx index b4cafef..476e9a4 100644 --- a/example/screens/TransactScreen.tsx +++ b/example/screens/TransactScreen.tsx @@ -36,6 +36,9 @@ const TransactScreen: React.FC = () => { const [isLoading, setIsLoading] = useState(false); const [presentationStyleIOS, setPresentationStyleIOS] = useState(PresentationStyles.formSheet); + const [useDeeplink, setUseDeeplink] = useState(false); + const [deeplinkCompanyId, setDeeplinkCompanyId] = useState(''); + const [singleSwitch, setSingleSwitch] = useState(false); const products = [ { key: Product.DEPOSIT, label: 'Deposit' }, @@ -95,9 +98,14 @@ const TransactScreen: React.FC = () => { return; } + if (useDeeplink && !deeplinkCompanyId.trim()) { + Alert.alert('Error', 'Please enter a Company ID when using deeplink'); + return; + } + setIsLoading(true); - const config = { + const config: any = { publicToken: publicToken.trim(), scope: getScope(), tasks: [ @@ -107,6 +115,15 @@ const TransactScreen: React.FC = () => { ], }; + // Add deeplink configuration if enabled and company ID is provided + if (useDeeplink && deeplinkCompanyId.trim()) { + config.deeplink = { + step: 'login-company', + companyId: deeplinkCompanyId.trim(), + singleSwitch: singleSwitch, + }; + } + Atomic.transact({ config, environment: getEnvironment(), @@ -263,6 +280,55 @@ const TransactScreen: React.FC = () => { )} + + Deeplink Options (Optional) + + + Use Deeplink + + Off + + On + + + + {useDeeplink && ( + <> + + Company ID + + + + {selectedProduct === Product.SWITCH && ( + + Single Switch + + Off + + On + + + )} + + )} + +