Open jalvini opened 1 year ago
Hello @jalvini,
I'm not very familiar with SwiftUI but you might try adding this extension https://swiftuirecipes.com/blog/getting-key-window-and-top-root-view-controller-in-swiftui to grab the rootViewController
from SwiftUI, and then hooking your card scan button up to present from the root view controller.
e.g.
Button("scan card") {
CardScanSheet().present(from: UIApplication.shared.rootViewController)
}
I can't say whether this is good practice, but might help you get something working.
It's present 2 view here on above first example. SimpleScanViewController not able to access on code. is there any solution on swiftUI?
@jaimepark-stripe can you please help us to find out solution on present card scan sheet on swiftUI.
Any updates on a solution for this in SwiftUI?
Hello,
I am trying to integrate StripeCardScan into SwiftUI. I am already using Stripe in a custom form within our app and I would like to add the ability for a user to scan their card directly. I am trying to implement this using a ViewController and ViewControllerRepresntable but am having a hard time. There should probably be some documentation on how to do this. Here is my current code, can someone please point me in the right direction. Thanks.
So just to clarify, I just want to be able to add the ability for a user to capture their card info with the phones camera. If there is an easier way to do this without compromising our custom form then please let me know, thanks.