diff --git a/Development/UID2GoogleIMADevelopmentApp/UID2GoogleIMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Development/UID2GoogleIMADevelopmentApp/UID2GoogleIMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 803dedc..10b177e 100644 --- a/Development/UID2GoogleIMADevelopmentApp/UID2GoogleIMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Development/UID2GoogleIMADevelopmentApp/UID2GoogleIMADevelopmentApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,12 +1,30 @@ { "pins" : [ + { + "identity" : "applovin-max-swift-package", + "kind" : "remoteSourceControl", + "location" : "https://github.com/AppLovin/AppLovin-MAX-Swift-Package.git", + "state" : { + "revision" : "d829feb5b7de8755e9a1834c2e1e0b95c9126424", + "version" : "13.6.2" + } + }, + { + "identity" : "prebid-mobile-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/prebid/prebid-mobile-ios.git", + "state" : { + "revision" : "4f96890f9f8b38db6abd92044a928a709d5458d2", + "version" : "3.3.1" + } + }, { "identity" : "swift-asn1", "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-asn1.git", "state" : { - "revision" : "c7e239b5c1492ffc3ebd7fbcc7a92548ce4e78f0", - "version" : "1.1.0" + "revision" : "eb50cbd14606a9161cbc5d452f18797c90ef0bab", + "version" : "1.7.0" } }, { @@ -14,8 +32,26 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/googleads/swift-package-manager-google-interactive-media-ads-ios.git", "state" : { - "revision" : "8b8e3bbe0b8044cdfeedeadae3e8dc871017c31d", - "version" : "3.23.0" + "revision" : "3ab3dee61922cf4e024b9086f324f0737bc73339", + "version" : "3.31.0" + } + }, + { + "identity" : "swift-package-manager-google-mobile-ads", + "kind" : "remoteSourceControl", + "location" : "https://github.com/googleads/swift-package-manager-google-mobile-ads.git", + "state" : { + "revision" : "a81f522aa4f59c0d90ee523d703bd426d5b27a03", + "version" : "13.4.0" + } + }, + { + "identity" : "swift-package-manager-google-user-messaging-platform", + "kind" : "remoteSourceControl", + "location" : "https://github.com/googleads/swift-package-manager-google-user-messaging-platform.git", + "state" : { + "revision" : "13b248eaa73b7826f0efb1bcf455e251d65ecb1b", + "version" : "3.1.0" } }, { @@ -23,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/IABTechLab/uid2-ios-sdk.git", "state" : { - "revision" : "02dc358fa6977357bffc12bad81c7d5650170e27", - "version" : "1.7.0" + "revision" : "6c5a119212623fa2bc51f55cf5e3e973d500a7d6", + "version" : "3.0.2" } } ], diff --git a/Package.resolved b/Package.resolved index 803dedc..87edd9a 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,23 @@ { "pins" : [ + { + "identity" : "applovin-max-swift-package", + "kind" : "remoteSourceControl", + "location" : "https://github.com/AppLovin/AppLovin-MAX-Swift-Package.git", + "state" : { + "revision" : "d829feb5b7de8755e9a1834c2e1e0b95c9126424", + "version" : "13.6.2" + } + }, + { + "identity" : "prebid-mobile-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/prebid/prebid-mobile-ios.git", + "state" : { + "revision" : "4f96890f9f8b38db6abd92044a928a709d5458d2", + "version" : "3.3.1" + } + }, { "identity" : "swift-asn1", "kind" : "remoteSourceControl", @@ -18,13 +36,31 @@ "version" : "3.23.0" } }, + { + "identity" : "swift-package-manager-google-mobile-ads", + "kind" : "remoteSourceControl", + "location" : "https://github.com/googleads/swift-package-manager-google-mobile-ads.git", + "state" : { + "revision" : "e2b1c31cdf11cb4b57b4e70ae4c313d4e48c444a", + "version" : "13.3.0" + } + }, + { + "identity" : "swift-package-manager-google-user-messaging-platform", + "kind" : "remoteSourceControl", + "location" : "https://github.com/googleads/swift-package-manager-google-user-messaging-platform.git", + "state" : { + "revision" : "13b248eaa73b7826f0efb1bcf455e251d65ecb1b", + "version" : "3.1.0" + } + }, { "identity" : "uid2-ios-sdk", "kind" : "remoteSourceControl", "location" : "https://github.com/IABTechLab/uid2-ios-sdk.git", "state" : { - "revision" : "02dc358fa6977357bffc12bad81c7d5650170e27", - "version" : "1.7.0" + "revision" : "6c5a119212623fa2bc51f55cf5e3e973d500a7d6", + "version" : "3.0.2" } } ], diff --git a/Package.swift b/Package.swift index 921f32d..20c3503 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,7 @@ let package = Package( name: "UID2IMAPlugin", defaultLocalization: "en", platforms: [ - .iOS(.v12) + .iOS(.v15) ], products: [ .library( @@ -15,7 +15,7 @@ let package = Package( targets: ["UID2IMAPlugin"]) ], dependencies: [ - .package(url: "https://github.com/IABTechLab/uid2-ios-sdk.git", "1.7.0" ..< "3.0.0"), + .package(url: "https://github.com/IABTechLab/uid2-ios-sdk.git", "1.7.0" ..< "4.0.0"), .package(url: "https://github.com/googleads/swift-package-manager-google-interactive-media-ads-ios.git", from: "3.18.5") ], targets: [ diff --git a/Sources/UID2IMAPlugin/EUIDIMASecureSignalsAdapter.swift b/Sources/UID2IMAPlugin/EUIDIMASecureSignalsAdapter.swift index fa95bc6..c9730f8 100644 --- a/Sources/UID2IMAPlugin/EUIDIMASecureSignalsAdapter.swift +++ b/Sources/UID2IMAPlugin/EUIDIMASecureSignalsAdapter.swift @@ -11,9 +11,6 @@ import UID2 public class EUIDIMASecureSignalsAdapter: NSObject { required public override init() { - guard isOperatingSystemSupported else { - return - } // Ensure UID2Manager has started _ = EUIDManager.shared } @@ -25,9 +22,9 @@ extension EUIDIMASecureSignalsAdapter: IMASecureSignalsAdapter { public static func adapterVersion() -> IMAVersion { let version = IMAVersion() - version.majorVersion = 1 + version.majorVersion = 2 version.minorVersion = 0 - version.patchVersion = 4 + version.patchVersion = 0 return version } @@ -41,10 +38,6 @@ extension EUIDIMASecureSignalsAdapter: IMASecureSignalsAdapter { } public func collectSignals(completion: @escaping IMASignalCompletionHandler) { - guard isOperatingSystemSupported else { - completion(nil, OperatingSystemUnsupportedError()) - return - } Task { guard let advertisingToken = await EUIDManager.shared.getAdvertisingToken() else { completion(nil, AdvertisingTokenNotFoundError()) diff --git a/Sources/UID2IMAPlugin/OperatingSystemSupport.swift b/Sources/UID2IMAPlugin/OperatingSystemSupport.swift deleted file mode 100644 index 9fa5387..0000000 --- a/Sources/UID2IMAPlugin/OperatingSystemSupport.swift +++ /dev/null @@ -1,20 +0,0 @@ -import Foundation - -/// Adapter implementations in this package are called at runtime, ignoring @available attributes. -/// By checking the operating system version we can avoid calling UID code which is unavailable. -let isOperatingSystemSupported = ProcessInfo.processInfo.isOperatingSystemAtLeast( - .init( - majorVersion: 13, - minorVersion: 0, - patchVersion: 0 - ) -) - -/// Adapter called on an unsupported operating system version i.e. lower than UID2's deployment target. -@objc(UID2IMAOperatingSystemUnsupported) -public final class OperatingSystemUnsupportedError: NSError, @unchecked Sendable { - - convenience init() { - self.init(domain: "UID", code: 2) - } -} diff --git a/Sources/UID2IMAPlugin/UID2IMASecureSignalsAdapter.swift b/Sources/UID2IMAPlugin/UID2IMASecureSignalsAdapter.swift index 2fcaf6b..feaec6a 100644 --- a/Sources/UID2IMAPlugin/UID2IMASecureSignalsAdapter.swift +++ b/Sources/UID2IMAPlugin/UID2IMASecureSignalsAdapter.swift @@ -14,9 +14,6 @@ import UID2 public class UID2IMASecureSignalsAdapter: NSObject { required public override init() { - guard isOperatingSystemSupported else { - return - } // Ensure UID2Manager has started _ = UID2Manager.shared } @@ -28,9 +25,9 @@ extension UID2IMASecureSignalsAdapter: IMASecureSignalsAdapter { public static func adapterVersion() -> IMAVersion { let version = IMAVersion() - version.majorVersion = 1 + version.majorVersion = 2 version.minorVersion = 0 - version.patchVersion = 4 + version.patchVersion = 0 return version } @@ -44,10 +41,6 @@ extension UID2IMASecureSignalsAdapter: IMASecureSignalsAdapter { } public func collectSignals(completion: @escaping IMASignalCompletionHandler) { - guard isOperatingSystemSupported else { - completion(nil, OperatingSystemUnsupportedError()) - return - } Task { guard let advertisingToken = await UID2Manager.shared.getAdvertisingToken() else { completion(nil, AdvertisingTokenNotFoundError()) diff --git a/UID2IMAPlugin.podspec.json b/UID2IMAPlugin.podspec.json index b42329a..bc595cc 100644 --- a/UID2IMAPlugin.podspec.json +++ b/UID2IMAPlugin.podspec.json @@ -3,16 +3,16 @@ "summary": "A plugin for integrating UID2 and Google IMA into iOS applications.", "homepage": "https://unifiedid.com/", "license": "Apache License, Version 2.0", - "version": "1.0.4", + "version": "2.0.0", "authors": { "David Snabel-Caunt": "dave.snabel-caunt@thetradedesk.com" }, "source": { "git": "https://github.com/IABTechLab/uid2-ios-plugin-google-ima.git", - "tag": "v1.0.4" + "tag": "v2.0.0" }, "platforms": { - "ios": "12.0" + "ios": "15.0" }, "swift_versions": [ "5" @@ -31,7 +31,7 @@ ], "UID2": [ ">= 1.7.0", - "< 3.0" + "< 4.0" ] } }