From 334e48df1071e6a450310dcc048dbe591d132ab1 Mon Sep 17 00:00:00 2001 From: Dave Snabel-Caunt Date: Tue, 12 May 2026 10:26:34 +0100 Subject: [PATCH] Fix UID2Prebid compilation for PrebidMobile breaking change --- Package.resolved | 8 ++++---- Sources/UID2Prebid/UID2Prebid.swift | 2 +- Tests/UID2PrebidTests/UID2PrebidTests.swift | 18 +++++++++--------- UID2.podspec.json | 4 ++-- UID2Prebid.podspec.json | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Package.resolved b/Package.resolved index e14c6c7..eef2273 100644 --- a/Package.resolved +++ b/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/prebid/prebid-mobile-ios.git", "state" : { - "revision" : "e632be68c5f74261fa550374b41699b481824dd3", - "version" : "3.1.0" + "revision" : "4f96890f9f8b38db6abd92044a928a709d5458d2", + "version" : "3.3.1" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/googleads/swift-package-manager-google-mobile-ads.git", "state" : { - "revision" : "d24a9f5ad472610598449dc669befa5b7ed50658", - "version" : "12.7.0" + "revision" : "e2b1c31cdf11cb4b57b4e70ae4c313d4e48c444a", + "version" : "13.3.0" } }, { diff --git a/Sources/UID2Prebid/UID2Prebid.swift b/Sources/UID2Prebid/UID2Prebid.swift index 773653b..32b6394 100644 --- a/Sources/UID2Prebid/UID2Prebid.swift +++ b/Sources/UID2Prebid/UID2Prebid.swift @@ -80,7 +80,7 @@ public actor UID2Prebid { if let advertisingToken { userIDs.append(ExternalUserId( source: source, - uids: [.init(id: advertisingToken, aType: agentType)] + uids: [.init(uniqueId: advertisingToken, aType: agentType)] )) } await userIDUpdater.updateUserIDs(userIDs) diff --git a/Tests/UID2PrebidTests/UID2PrebidTests.swift b/Tests/UID2PrebidTests/UID2PrebidTests.swift index 8985a92..18caf4b 100644 --- a/Tests/UID2PrebidTests/UID2PrebidTests.swift +++ b/Tests/UID2PrebidTests/UID2PrebidTests.swift @@ -52,7 +52,7 @@ final class UID2PrebidTests: XCTestCase { ) await observation( of: [ - ExternalUserId(source: "uidapi.com", uids: [.init(id: "cat", aType: 3)]) + ExternalUserId(source: "uidapi.com", uids: [.init(uniqueId: "cat", aType: 3)]) ], by: updater ) @@ -68,7 +68,7 @@ final class UID2PrebidTests: XCTestCase { ) await observation( of: [ - ExternalUserId(source: "uidapi.com", uids: [.init(id: "turtle", aType: 3)]) + ExternalUserId(source: "uidapi.com", uids: [.init(uniqueId: "turtle", aType: 3)]) ], by: updater ) @@ -93,7 +93,7 @@ final class UID2PrebidTests: XCTestCase { manager: manager, thirdPartyUserIDs: { [ - ExternalUserId(source: "example.com", uids: [.init(id: "dog", aType: 3)]) + ExternalUserId(source: "example.com", uids: [.init(uniqueId: "dog", aType: 3)]) ] }, userIDUpdater: updater, @@ -106,8 +106,8 @@ final class UID2PrebidTests: XCTestCase { ) await observation( of: [ - ExternalUserId(source: "example.com", uids: [.init(id: "dog", aType: 3)]), - ExternalUserId(source: "uidapi.com", uids: [.init(id: "cat", aType: 3)]), + ExternalUserId(source: "example.com", uids: [.init(uniqueId: "dog", aType: 3)]), + ExternalUserId(source: "uidapi.com", uids: [.init(uniqueId: "cat", aType: 3)]), ], by: updater ) @@ -115,7 +115,7 @@ final class UID2PrebidTests: XCTestCase { continuation.yield(.invalid) await observation( of: [ - ExternalUserId(source: "example.com", uids: [.init(id: "dog", aType: 3)]), + ExternalUserId(source: "example.com", uids: [.init(uniqueId: "dog", aType: 3)]), ], by: updater ) @@ -148,7 +148,7 @@ final class UID2PrebidTests: XCTestCase { ) await observation( of: [ - ExternalUserId(source: "euid.eu", uids: [.init(id: "cat", aType: 3)]) + ExternalUserId(source: "euid.eu", uids: [.init(uniqueId: "cat", aType: 3)]) ], by: updater ) @@ -164,7 +164,7 @@ final class UID2PrebidTests: XCTestCase { ) await observation( of: [ - ExternalUserId(source: "euid.eu", uids: [.init(id: "turtle", aType: 3)]) + ExternalUserId(source: "euid.eu", uids: [.init(uniqueId: "turtle", aType: 3)]) ], by: updater ) @@ -205,7 +205,7 @@ extension UID2PrebidTests { var id: String var aType: Int init(_ userId: UserUniqueID) { - self.id = userId.id + self.id = userId.uniqueId self.aType = userId.aType.intValue } } diff --git a/UID2.podspec.json b/UID2.podspec.json index 7fbbf4d..8d16d7b 100644 --- a/UID2.podspec.json +++ b/UID2.podspec.json @@ -12,8 +12,8 @@ "tag": "v3.0.0" }, "platforms": { - "ios": "12.0", - "tvos": "12.0" + "ios": "13.0", + "tvos": "13.0" }, "swift_versions": [ "5" diff --git a/UID2Prebid.podspec.json b/UID2Prebid.podspec.json index b42e4b3..45c344b 100644 --- a/UID2Prebid.podspec.json +++ b/UID2Prebid.podspec.json @@ -29,7 +29,7 @@ ], "dependencies": { "UID2": [ - "~> 1.3.0" + "~> 2.1.0" ], "PrebidMobile": [ "~> 3.1"