I am integrating payments with oppwa. And the Apple Pay popup window works properly in testing mode. But in live mode it disappears immediately, I never thought that the cause could be from how UI-Kitten works, because it was working in the test mode.
The relevant part of my code is this:
internal class OppwaHandler: NSObject, UINavigationControllerDelegate, OPPThreeDSEventListener, PKPaymentAuthorizationViewControllerDelegate {
// constants
let viewController = RCTPresentedViewController()
// ... some irrelevant code
public func onApplePay(params: ApplePayParams) -> String {
// ... some irrelevant code
if let rootViewController = self.viewController {
if let vc = PKPaymentAuthorizationViewController(paymentRequest: request) as PKPaymentAuthorizationViewController? {
vc.delegate = self
DispatchQueue.main.async {
rootViewController.present(vc, animated: true, completion: nil)
}
return "Ok. reached end of ok logic"
} else {
return "Apple Pay not supported."
}
}else{
return "Not showing view controller"
}
The issue is that in my code, the instance rootViewController type is RCTModalHostViewController instead of UIViewController. I don't know how view controllers work, but when I removed all UI Kitten code, the type of the controller was UIViewController and the pop did not disappear.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Link to runnable example or repository (highly encouraged)
🐛 Bug Report
I am integrating payments with oppwa. And the Apple Pay popup window works properly in testing mode. But in live mode it disappears immediately, I never thought that the cause could be from how UI-Kitten works, because it was working in the test mode.
The relevant part of my code is this:
The issue is that in my code, the instance
rootViewController
type isRCTModalHostViewController
instead ofUIViewController
. I don't know how view controllers work, but when I removed all UI Kitten code, the type of the controller wasUIViewController
and the pop did not disappear.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Link to runnable example or repository (highly encouraged)
UI Kitten and Eva version
Environment information