Open ralfebert opened 3 years ago
Hi Ralf, Thanks for the code, much appreciated. I am trying to invoke this from the cordova plugin, but so far I've had no luck (I am a very beginner with Swift). How would one trigger the SDK with the proper UI wrapper ? Thanks for the help
When using the Sumup SDK in a SwiftUI app, the usage is a bit cumbersome, because the API assumes you have a UIViewController handy which you usually don't have in a SwiftUI app. It would be nice if the SDK would provide a SwiftUI wrapper or accessible UIViewController classes that can be wrapped with UIViewControllerRepresentable.
A workaround to make it work today -
SumupView
can be embedded in the SwiftUI view hierarchy to make the Sumup login/checkout controller appear: