From 60b1c365d6bccd2244b29173a4ed9bda0d8713fd Mon Sep 17 00:00:00 2001 From: Emilio Davis Date: Fri, 30 Aug 2024 20:11:39 -0400 Subject: [PATCH] feat: using KhipuClientIOS 2.7.8 with default presenter view --- example/ios/Podfile.lock | 10 +++++----- ios/Khipu.swift | 9 +-------- react-native-khipu.podspec | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index fd3ac23..3b990b6 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -10,7 +10,7 @@ PODS: - KhenshinProtocol (1.0.44) - KhenshinSecureMessage (1.3.0): - KHTweetNacl (= 1.1.4) - - KhipuClientIOS (2.7.6): + - KhipuClientIOS (2.7.8): - KhenshinProtocol (= 1.0.44) - KhenshinSecureMessage (= 1.3.0) - Socket.IO-Client-Swift (= 16.1.0) @@ -944,11 +944,11 @@ PODS: - React-Mapbuffer (0.74.1): - glog - React-debug - - react-native-khipu (2.10.1): + - react-native-khipu (2.10.4): - DoubleConversion - glog - hermes-engine - - KhipuClientIOS (= 2.7.6) + - KhipuClientIOS (= 2.7.8) - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1392,7 +1392,7 @@ SPEC CHECKSUMS: hermes-engine: 16b8530de1b383cdada1476cf52d1b52f0692cbc KhenshinProtocol: 12df55da4968686dfda93a80c3ffcc87de09cc32 KhenshinSecureMessage: f0604e236fe33a3538ee01129c74c94d724bf546 - KhipuClientIOS: 20173611d903d8980152ad6b3df76dd7c0641e03 + KhipuClientIOS: c5d5bb545aec1c331e984dd4871c773ad19167c5 KHTweetNacl: 405b98e955a2fdb50eb8372fde9c6b50b218e51b RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47 RCTDeprecation: efb313d8126259e9294dc4ee0002f44a6f676aba @@ -1418,7 +1418,7 @@ SPEC CHECKSUMS: React-jsitracing: 233d1a798fe0ff33b8e630b8f00f62c4a8115fbc React-logger: 7e7403a2b14c97f847d90763af76b84b152b6fce React-Mapbuffer: 11029dcd47c5c9e057a4092ab9c2a8d10a496a33 - react-native-khipu: f3e21532d81a990e5d4e44187a93353fc770fbfd + react-native-khipu: 9ffedae8f9d2864852e27293180c01bdb4bb3c9a React-nativeconfig: b0073a590774e8b35192fead188a36d1dca23dec React-NativeModulesApple: df46ff3e3de5b842b30b4ca8a6caae6d7c8ab09f React-perflogger: 3d31e0d1e8ad891e43a09ac70b7b17a79773003a diff --git a/ios/Khipu.swift b/ios/Khipu.swift index ef59131..c854d29 100644 --- a/ios/Khipu.swift +++ b/ios/Khipu.swift @@ -102,19 +102,12 @@ class Khipu: NSObject { DispatchQueue.main.async { - - guard let presenter = UIApplication.shared.windows.filter({$0.isKeyWindow}).first?.rootViewController else { - reject("NO_AVAILABLE_VIEW", "There is no presented UIViewController", NSError()) - return - } - guard let operationId = startOperationOptions["operationId"] else { reject("NO_OPERATION_ID", "OperationId is needed to start the operation", NSError()) return } - KhipuLauncher.launch(presenter: presenter, - operationId: operationId as! String, + KhipuLauncher.launch(operationId: operationId as! String, options: optionsBuilder.build()) { result in resolve([ "operationId": result.operationId, diff --git a/react-native-khipu.podspec b/react-native-khipu.podspec index 2e63db3..e442501 100644 --- a/react-native-khipu.podspec +++ b/react-native-khipu.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,swift}" - s.dependency "KhipuClientIOS", "2.7.7" + s.dependency "KhipuClientIOS", "2.7.8" # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. if respond_to?(:install_modules_dependencies, true)