Skip to content

Commit

Permalink
fix: use native rootViewController instead of RCN one
Browse files Browse the repository at this point in the history
  • Loading branch information
edavism committed Aug 30, 2024
1 parent d29ab0e commit b13421a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion ios/Khipu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b13421a

Please sign in to comment.