diff --git a/KlaviyoSwift.podspec b/KlaviyoSwift.podspec index f07adbeb..026c9a96 100644 --- a/KlaviyoSwift.podspec +++ b/KlaviyoSwift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "KlaviyoSwift" - s.version = "3.2.0" + s.version = "4.0.0" s.summary = "Incorporate Klaviyo's event and person tracking and push notifications functionality into iOS applications" s.description = <<-DESC diff --git a/KlaviyoSwiftExtension.podspec b/KlaviyoSwiftExtension.podspec index 5870629d..d7abda9d 100644 --- a/KlaviyoSwiftExtension.podspec +++ b/KlaviyoSwiftExtension.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "KlaviyoSwiftExtension" - s.version = "3.2.0" + s.version = "4.0.0" s.summary = "Incorporate Klaviyo's rich push notifications functionality into your iOS applications" s.description = <<-DESC diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 9ffa83cf..630429a1 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -3,6 +3,13 @@ This guide outlines how developers can migrate from older versions of our SDK to newer ones. +## Migrating to v4.0.0 + +### `Event.EventName` enum: + +- We have removed the PascalCase names in the `Event.EventName` enum, leaving only the camelCase names. You will need to remove any references to the old PascalCase names. See [Migrating to v3.3.0](https://github.com/klaviyo/klaviyo-swift-sdk/blob/as/rel-400/MIGRATION_GUIDE.md#migrating-to-v330) below for more details. +- We have removed the `.OpenedPush` case (there is no camelCase replacement), as this is intended for internal use only. You will need to remove any references to the `.OpenedPush` case. + ## Migrating to v3.3.0 We've updated the case names in the `Event.EventName` enum from PascalCase to camelCase, to be consistent with [Swift naming conventions](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/enumerations/). diff --git a/Sources/KlaviyoCore/Utils/Version.swift b/Sources/KlaviyoCore/Utils/Version.swift index 41a5ab26..25d8d8e5 100644 --- a/Sources/KlaviyoCore/Utils/Version.swift +++ b/Sources/KlaviyoCore/Utils/Version.swift @@ -8,4 +8,4 @@ import Foundation public let __klaviyoSwiftName = "swift" -public let __klaviyoSwiftVersion = "3.2.0" +public let __klaviyoSwiftVersion = "4.0.0" diff --git a/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testEventPayload.1.json b/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testEventPayload.1.json index 0fe6338e..b7b9dc63 100644 --- a/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testEventPayload.1.json +++ b/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testEventPayload.1.json @@ -36,7 +36,7 @@ "OS Version" : "1.1.1", "Push Token" : "", "SDK Name" : "swift", - "SDK Version" : "3.2.0", + "SDK Version" : "4.0.0", "stuff" : 2 }, "time" : "2009-02-13T23:31:30Z", diff --git a/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testKlaviyoRequest.1.json b/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testKlaviyoRequest.1.json index 4e9b45c7..c3676c86 100644 --- a/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testKlaviyoRequest.1.json +++ b/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testKlaviyoRequest.1.json @@ -18,7 +18,7 @@ "manufacturer" : "Orange", "os_name" : "iOS", "os_version" : "1.1.1", - "sdk_version" : "3.2.0" + "sdk_version" : "4.0.0" }, "enablement_status" : "AUTHORIZED", "platform" : "ios", diff --git a/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testTokenPayload.1.json b/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testTokenPayload.1.json index 8935058a..e7705815 100644 --- a/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testTokenPayload.1.json +++ b/Tests/KlaviyoCoreTests/__Snapshots__/EncodableTests/testTokenPayload.1.json @@ -14,7 +14,7 @@ "manufacturer" : "Orange", "os_name" : "iOS", "os_version" : "1.1.1", - "sdk_version" : "3.2.0" + "sdk_version" : "4.0.0" }, "enablement_status" : "AUTHORIZED", "platform" : "ios", diff --git a/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testCreateEmphemeralSesionHeaders.1.txt b/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testCreateEmphemeralSesionHeaders.1.txt index 19cd06cb..2e074992 100644 --- a/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testCreateEmphemeralSesionHeaders.1.txt +++ b/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testCreateEmphemeralSesionHeaders.1.txt @@ -8,7 +8,7 @@ - "deflate" ▿ (2 elements) - key: "User-Agent" - - value: "FooApp/1.2.3 (com.klaviyo.fooapp; build:1; iOS 1.1.1) klaviyo-ios/3.2.0" + - value: "FooApp/1.2.3 (com.klaviyo.fooapp; build:1; iOS 1.1.1) klaviyo-ios/4.0.0" ▿ (2 elements) - key: "X-Klaviyo-Mobile" - value: "1" diff --git a/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testDefaultUserAgent.1.txt b/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testDefaultUserAgent.1.txt index 40374900..24403918 100644 --- a/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testDefaultUserAgent.1.txt +++ b/Tests/KlaviyoCoreTests/__Snapshots__/NetworkSessionTests/testDefaultUserAgent.1.txt @@ -1 +1 @@ -- "FooApp/1.2.3 (com.klaviyo.fooapp; build:1; iOS 1.1.1) klaviyo-ios/3.2.0" +- "FooApp/1.2.3 (com.klaviyo.fooapp; build:1; iOS 1.1.1) klaviyo-ios/4.0.0" diff --git a/Tests/KlaviyoSwiftTests/__Snapshots__/EncodableTests/testKlaviyoState.1.json b/Tests/KlaviyoSwiftTests/__Snapshots__/EncodableTests/testKlaviyoState.1.json index edb7e4c7..dd711ce9 100644 --- a/Tests/KlaviyoSwiftTests/__Snapshots__/EncodableTests/testKlaviyoState.1.json +++ b/Tests/KlaviyoSwiftTests/__Snapshots__/EncodableTests/testKlaviyoState.1.json @@ -15,7 +15,7 @@ "manufacturer" : "Orange", "os_name" : "iOS", "os_version" : "1.1.1", - "sdk_version" : "3.2.0" + "sdk_version" : "4.0.0" }, "pushBackground" : "AVAILABLE", "pushEnablement" : "AUTHORIZED", @@ -42,7 +42,7 @@ "manufacturer" : "Orange", "os_name" : "iOS", "os_version" : "1.1.1", - "sdk_version" : "3.2.0" + "sdk_version" : "4.0.0" }, "enablement_status" : "AUTHORIZED", "platform" : "ios", diff --git a/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testValidStateFileExists.1.txt b/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testValidStateFileExists.1.txt index 751eaaf8..507d0eba 100644 --- a/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testValidStateFileExists.1.txt +++ b/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testValidStateFileExists.1.txt @@ -28,7 +28,7 @@ - manufacturer: "Orange" - osName: "iOS" - osVersion: "1.1.1" - - sdkVersion: "3.2.0" + - sdkVersion: "4.0.0" - pushBackground: PushBackground.available - pushEnablement: PushEnablement.authorized - pushToken: "blob_token"