diff --git a/example/ios/Podfile b/example/ios/Podfile index 0ce5dfa..7513337 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -34,7 +34,7 @@ target 'TsAccountprotectionExample' do # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. - :flipper_configuration => flipper_config, + #:flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index c6e7d19..1bf9428 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,8 +1,7 @@ PODS: - - AccountProtection (2.1.0): - - TSCoreSDK (~> 1.0.21) + - AccountProtection (2.1.12): + - TSCoreSDK (~> 1.0.27) - boost (1.83.0) - - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - FBLazyVector (0.73.5) - FBReactNativeSpec (0.73.5): @@ -12,69 +11,12 @@ PODS: - React-Core (= 0.73.5) - React-jsi (= 0.73.5) - ReactCommon/turbomodule/core (= 0.73.5) - - Flipper (0.201.0): - - Flipper-Folly (~> 2.6) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - FlipperKit (0.201.0): - - FlipperKit/Core (= 0.201.0) - - FlipperKit/Core (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.201.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.201.0) - - FlipperKit/FKPortForwarding (0.201.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.201.0) - - FlipperKit/FlipperKitLayoutHelpers (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - hermes-engine (0.73.5): - hermes-engine/Pre-built (= 0.73.5) - hermes-engine/Pre-built (0.73.5) - libevent (2.1.12) - - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): - boost - DoubleConversion @@ -946,8 +888,8 @@ PODS: - React-Mapbuffer (0.73.5): - glog - React-debug - - react-native-ts-accountprotection (0.1.0): - - AccountProtection (~> 2.1.0) + - react-native-ts-accountprotection (0.1.2): + - AccountProtection (~> 2.1.12) - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1119,7 +1061,7 @@ PODS: - React-logger (= 0.73.5) - React-perflogger (= 0.73.5) - SocketRocket (0.6.1) - - TSCoreSDK (1.0.21) + - TSCoreSDK (1.0.27) - Yoga (1.14.0) DEPENDENCIES: @@ -1127,30 +1069,9 @@ DEPENDENCIES: - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.201.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - FlipperKit (= 0.201.0) - - FlipperKit/Core (= 0.201.0) - - FlipperKit/CppBridge (= 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0) - - FlipperKit/FBDefines (= 0.201.0) - - FlipperKit/FKPortForwarding (= 0.201.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0) - - FlipperKit/FlipperKitReactPlugin (= 0.201.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.201.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) @@ -1159,7 +1080,6 @@ DEPENDENCIES: - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../node_modules/react-native/`) - - React-Core/DevSupport (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) @@ -1201,18 +1121,8 @@ DEPENDENCIES: SPEC REPOS: trunk: - AccountProtection - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - FlipperKit - fmt - libevent - - OpenSSL-Universal - SocketRocket - TSCoreSDK @@ -1318,25 +1228,15 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - AccountProtection: 549c37697c3ff4cb50b69c20cd5e4223601812a7 + AccountProtection: 871ae6927d64aa608c396b25000be08e6a53d767 boost: d3f49c53809116a5d38da093a8aa78bf551aed09 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881 - Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 hermes-engine: 1d1835b2cc54c381909d94d1b3c8e0a2f1a94a0e libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 RCTRequired: 2544c0f1081a5fa12e108bb8cb40e5f4581ccd87 RCTTypeSafety: 50efabe2b115c11ed03fbf3fd79e2f163ddb5d7c @@ -1358,7 +1258,7 @@ SPEC CHECKSUMS: React-jsinspector: 32db5e364bcae8fca8cdf8891830636275add0c5 React-logger: 0331362115f0f5b392bd7ed14636d1a3ea612479 React-Mapbuffer: 7c35cd53a22d0be04d3f26f7881c7fb7dd230216 - react-native-ts-accountprotection: 4338eb8b785a384e1d3b4445e9c884435e131894 + react-native-ts-accountprotection: ac24ef89b922a60a07c6cc8cac1ef2241ca62f88 React-nativeconfig: 1166714a4f7ea57a0df5c2cb44fbc70f98d580f9 React-NativeModulesApple: 726664e9829eb5eed8170241000e46ead269a05f React-perflogger: 0dd9f1725d55f8264b81efadd373fe1d9cca7dc2 @@ -1380,9 +1280,9 @@ SPEC CHECKSUMS: React-utils: 987a4526a2fc0acdfaf87888adfe0bf9d0452066 ReactCommon: 2947b0bffd82ea0e58ca7928881152d4c6dae9af SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - TSCoreSDK: e30a537480334e5b9971f955ec3d3cdaa334f0a4 + TSCoreSDK: 750f7723e2c8c8e7501f050021674bc30e48de37 Yoga: a716eea57d0d3430219c0a5a233e1e93ee931eb7 -PODFILE CHECKSUM: 1447f917ade423bbfebc1fa4bdb3a16dbb406f4c +PODFILE CHECKSUM: f4bf8cd8d354e08c7c833a720648a16bd26f7e54 -COCOAPODS: 1.14.2 +COCOAPODS: 1.15.2 diff --git a/example/ios/TsAccountprotectionExample.xcodeproj/project.pbxproj b/example/ios/TsAccountprotectionExample.xcodeproj/project.pbxproj index b753095..fb1f892 100644 --- a/example/ios/TsAccountprotectionExample.xcodeproj/project.pbxproj +++ b/example/ios/TsAccountprotectionExample.xcodeproj/project.pbxproj @@ -586,7 +586,10 @@ "-DFOLLY_USE_LIBCPP=1", "-DFOLLY_CFG_NO_COROUTINES=1", ); - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; @@ -654,7 +657,10 @@ "-DFOLLY_USE_LIBCPP=1", "-DFOLLY_CFG_NO_COROUTINES=1", ); - OTHER_LDFLAGS = "$(inherited) "; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; diff --git a/example/src/App.tsx b/example/src/App.tsx index d9d6b95..4e37b91 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -71,7 +71,7 @@ export default class App extends React.Component { private onAppReady = async (): Promise => { // this is for iOS only, Android TSAccountProtectionSDK is initialized from application onCreate. - if(Platform.OS === 'ios'){ + if (Platform.OS === 'ios') { await TSAccountProtectionSDKModule.initializeIOS(config.clientId); } } @@ -119,17 +119,18 @@ export default class App extends React.Component { this.convertMoneyTransferDTOToEventOptions(requestDTO) ); - const recommendationResponse = await this.mockServer.fetchRecommendation(triggerActionResponse.actionToken); - console.log("Server returned recomendation for action:"); - console.log(recommendationResponse); + const recommendationResponse = await this.mockServer.fetchRecommendation(triggerActionResponse.actionToken); + console.log("Server returned recomendation for action:"); + console.log(recommendationResponse); + Alert.alert("Recommendation Received", JSON.stringify(recommendationResponse)); - const recomendation = recommendationResponse.recommendation; - if (recomendation) { - const message = `Recommendation: ${recomendation.type} | Risk Score: ${recommendationResponse.risk_score}`; - Alert.alert("Recommendation Received", message); - } + const recomendation = recommendationResponse.recommendation; + if (recomendation) { + const message = `Recommendation: ${recomendation.type} | Risk Score: ${recommendationResponse.risk_score}`; + Alert.alert("Recommendation Received", message); + } - this.setState({ errorMessage: "", isLoading: false }); + this.setState({ errorMessage: "", isLoading: false }); } catch (error) { this.setState({ errorMessage: `${error}`, isLoading: false }); @@ -139,10 +140,10 @@ export default class App extends React.Component { private handleTriggerActionLoginExample = async () => { const triggerActionResponse = await TSAccountProtectionSDKModule.triggerAction( TSAccountProtectionSDK.TSAction.login, - { - correlationId: "CORRELATION_ID", - claimUserId: "CLAIM_USER_ID", - referenceUserId: "REFERENCE_USER_ID", + { + correlationId: "CORRELATION_ID", + claimUserId: "CLAIM_USER_ID", + referenceUserId: "REFERENCE_USER_ID", transactionData: undefined } ) diff --git a/react-native-ts-accountprotection.podspec b/react-native-ts-accountprotection.podspec index a4657df..2576189 100644 --- a/react-native-ts-accountprotection.podspec +++ b/react-native-ts-accountprotection.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.platforms = { :ios => min_ios_version_supported } s.source = { :git => "https://github.com/TransmitSecurity/react-native-ts-accountprotection.git", :tag => "#{s.version}" } - s.dependency 'AccountProtection', '~> 2.1.0' + s.dependency 'AccountProtection', '~> 2.1.12' s.source_files = "ios/**/*.{h,m,mm,swift}" # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.