From b13421a05ab8280c3373cae8df62b2b3603a7022 Mon Sep 17 00:00:00 2001 From: Emilio Davis Date: Fri, 30 Aug 2024 16:15:17 -0400 Subject: [PATCH] fix: use native rootViewController instead of RCN one --- example/src/App.tsx | 4 ++-- ios/Khipu.swift | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index be7e708..8ac8ed1 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -23,8 +23,8 @@ export default function App() { theme: 'light', skipExitPage: false, showFooter: false, - showMerchantLogo: true, - showPaymentDetails: true, + showMerchantLogo: false, + showPaymentDetails: false, colors: { // lightBackground: '#0000ff', // lightPrimary: '#ff00ff', diff --git a/ios/Khipu.swift b/ios/Khipu.swift index 03dad87..ef59131 100644 --- a/ios/Khipu.swift +++ b/ios/Khipu.swift @@ -102,7 +102,8 @@ class Khipu: NSObject { DispatchQueue.main.async { - guard let presenter = RCTPresentedViewController() else { + + guard let presenter = UIApplication.shared.windows.filter({$0.isKeyWindow}).first?.rootViewController else { reject("NO_AVAILABLE_VIEW", "There is no presented UIViewController", NSError()) return }