lytics / ios-sdk

MIT License
0 stars 0 forks source link

SwiftUI Conveniences #70

Closed mgacy closed 1 year ago

mgacy commented 1 year ago

Adds view modifiers and View methods to make SDK usage with SwiftUI more convenient. These were added to a separate LyticsUI library

Adds View method to emit screen event

Adds models, view methods, and Lytics methods to support:

Also adds Lytics method to support UIApplicationDelegate.application(_:performActionFor:completionHandler:)

Finally moves event names from Constants into EventNames

Demo App

mgacy commented 1 year ago

I like that idea

jagreenwood commented 1 year ago

Maybe UIKit and swiftui related stuff is in a singlular UI target?

mgacy commented 1 year ago

Yeah, I was leaning towards that direction

mgacy commented 1 year ago

I added a separate LyticsUI target and product. I considered organizing its source files according to our usual View Modifiers (and in the future, Extensions and Protocols) directories but decided that SwiftUI and (in the future, UIKit) would be the most relevant organizing principle.