[FEATURE] Native SwiftUI Support
ericlewis opened this issue · 4 comments
Is your feature request related to a problem? Please describe.
SwiftUI is no longer new but the only way to use vgs-collect-ios
with SwiftUI is a number of hacks or wrapping of the provided textfields. VGSCollect
itself seems to rely on a storage that is based on VGSTextField
which only extends UIView.
Describe the solution you'd like
It would be nice perhaps if there was more decoupling of view elements from VGSCollect
, so we can work with it without needing UIKit.
Describe alternatives you've considered
It is completely possible to instead wrap the VGSTextField
elements with UIViewRepresentable
, but that leads to more annoying problems.
Additional context
Add any other context or screenshots about the feature request here.
Possible solution
Decouple the view elements from VGSCollect
, decouple VGSTextField
from UIView
, and using a more composable architecture for interacting with VGSCollect
.
@ericlewis SwiftUI support is definitely in our Roadmap, no ETA for now.
Note that if you collecting PII or other sensitive data, using custom UI elements that are not a part of VGSCollectSDK
will put you into PCI scope. For other types of data, you can collect it with custom UI elements and send it with extraData: [String: Any]
param in VGSCollect.sendData(_:)
request.
@dmytrokhl oh wow, I didn't know that! thanks, for the time being we are wrapping VGSTextFields