Skip to content

Commit c3c9e9a

Browse files
authored
Fix UID2Prebid compilation for PrebidMobile breaking change (#90)
1 parent adcd583 commit c3c9e9a

6 files changed

Lines changed: 20 additions & 19 deletions

File tree

Package.resolved

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
],
2121
dependencies: [
2222
.package(url: "https://github.com/apple/swift-asn1.git", .upToNextMajor(from: "1.0.0")),
23-
.package(url: "https://github.com/prebid/prebid-mobile-ios.git", .upToNextMajor(from: "3.1.0")),
23+
.package(url: "https://github.com/prebid/prebid-mobile-ios.git", .upToNextMajor(from: "3.3.1")),
2424
],
2525
targets: [
2626
.target(

Sources/UID2Prebid/UID2Prebid.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public actor UID2Prebid {
8080
if let advertisingToken {
8181
userIDs.append(ExternalUserId(
8282
source: source,
83-
uids: [.init(id: advertisingToken, aType: agentType)]
83+
uids: [.init(uniqueId: advertisingToken, aType: agentType)]
8484
))
8585
}
8686
await userIDUpdater.updateUserIDs(userIDs)

Tests/UID2PrebidTests/UID2PrebidTests.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ final class UID2PrebidTests: XCTestCase {
5252
)
5353
await observation(
5454
of: [
55-
ExternalUserId(source: "uidapi.com", uids: [.init(id: "cat", aType: 3)])
55+
ExternalUserId(source: "uidapi.com", uids: [.init(uniqueId: "cat", aType: 3)])
5656
],
5757
by: updater
5858
)
@@ -68,7 +68,7 @@ final class UID2PrebidTests: XCTestCase {
6868
)
6969
await observation(
7070
of: [
71-
ExternalUserId(source: "uidapi.com", uids: [.init(id: "turtle", aType: 3)])
71+
ExternalUserId(source: "uidapi.com", uids: [.init(uniqueId: "turtle", aType: 3)])
7272
],
7373
by: updater
7474
)
@@ -93,7 +93,7 @@ final class UID2PrebidTests: XCTestCase {
9393
manager: manager,
9494
thirdPartyUserIDs: {
9595
[
96-
ExternalUserId(source: "example.com", uids: [.init(id: "dog", aType: 3)])
96+
ExternalUserId(source: "example.com", uids: [.init(uniqueId: "dog", aType: 3)])
9797
]
9898
},
9999
userIDUpdater: updater,
@@ -106,16 +106,16 @@ final class UID2PrebidTests: XCTestCase {
106106
)
107107
await observation(
108108
of: [
109-
ExternalUserId(source: "example.com", uids: [.init(id: "dog", aType: 3)]),
110-
ExternalUserId(source: "uidapi.com", uids: [.init(id: "cat", aType: 3)]),
109+
ExternalUserId(source: "example.com", uids: [.init(uniqueId: "dog", aType: 3)]),
110+
ExternalUserId(source: "uidapi.com", uids: [.init(uniqueId: "cat", aType: 3)]),
111111
],
112112
by: updater
113113
)
114114

115115
continuation.yield(.invalid)
116116
await observation(
117117
of: [
118-
ExternalUserId(source: "example.com", uids: [.init(id: "dog", aType: 3)]),
118+
ExternalUserId(source: "example.com", uids: [.init(uniqueId: "dog", aType: 3)]),
119119
],
120120
by: updater
121121
)
@@ -148,7 +148,7 @@ final class UID2PrebidTests: XCTestCase {
148148
)
149149
await observation(
150150
of: [
151-
ExternalUserId(source: "euid.eu", uids: [.init(id: "cat", aType: 3)])
151+
ExternalUserId(source: "euid.eu", uids: [.init(uniqueId: "cat", aType: 3)])
152152
],
153153
by: updater
154154
)
@@ -164,7 +164,7 @@ final class UID2PrebidTests: XCTestCase {
164164
)
165165
await observation(
166166
of: [
167-
ExternalUserId(source: "euid.eu", uids: [.init(id: "turtle", aType: 3)])
167+
ExternalUserId(source: "euid.eu", uids: [.init(uniqueId: "turtle", aType: 3)])
168168
],
169169
by: updater
170170
)
@@ -205,7 +205,7 @@ extension UID2PrebidTests {
205205
var id: String
206206
var aType: Int
207207
init(_ userId: UserUniqueID) {
208-
self.id = userId.id
208+
self.id = userId.uniqueId
209209
self.aType = userId.aType.intValue
210210
}
211211
}

UID2.podspec.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"tag": "v3.0.0"
1313
},
1414
"platforms": {
15-
"ios": "12.0",
16-
"tvos": "12.0"
15+
"ios": "13.0",
16+
"tvos": "13.0"
1717
},
1818
"swift_versions": [
1919
"5"

UID2Prebid.podspec.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
],
3030
"dependencies": {
3131
"UID2": [
32-
"~> 1.3.0"
32+
"~> 3.0"
3333
],
3434
"PrebidMobile": [
35-
"~> 3.1"
35+
">= 3.3.1",
36+
"< 4.0"
3637
]
3738
}
3839
}

0 commit comments

Comments
 (0)