Closed ndurell closed 5 months ago
Maybe worth adding "missing" types in the same release https://github.com/klaviyo/klaviyo-swift-sdk/issues/119
Would this work for namespacing the event names?
public struct Event: Equatable {
private enum EventName: Equatable {}
public struct V1 {
public enum EventName: EventName {
case OpenedPush
case ViewedProduct
case CustomEvent(String)
}
}
public struct V2 {
public enum EventName: EventName {
case OpenedPush
case ViewedProduct
case CustomEvent(String)
}
}
and
extension Event.V1.EventName {
var value: String {
switch self {
case .OpenedPush: return "$opened_push"
case .ViewedProduct: return "$viewed_product"
case let .CustomEvent(value): return "\(value)"
}
}
}
extension Event.V2.EventName {
var value: String {
switch self {
case .OpenedPush: return "$opened_push"
case .ViewedProduct: return "Viewed Product"
case let .CustomEvent(value): return "\(value)"
}
}
}
Never mind, my XCode was broken, that idea doesn't even compile
This PR needs to be split up now, into a non-breaking deprecation for a minor version release, and a breaking change for major release.
This PR needs to be split up now, into a non-breaking deprecation for a minor version release, and a breaking change for major release.
I can help with this if you have not already started on it.
Superceded by #138 and #139
Description
We used inccorect event names in some cases. This should fix the names to be more in line with other Klaviyo SDKs. These names will also look better in Klaviyo.
Check List
Manual Test Plan
1.
Supporting Materials