Skip to content

UID2Prebid SPM build fails: PrebidMobile 3.3.1 requires iOS 13 but package declares iOS 12 #87

Closed

Description

@abdulmedzid

Summary

Adding uid2-ios-sdk via SPM and linking the UID2Prebid product fails to build when the
app target's minimum deployment is iOS 12, producing:

The package product 'PrebidMobile' requires minimum platform version 13.0 for the iOS
platform, but this target supports 12.0

Root Cause

Package.swift declares .iOS(.v12) as the minimum platform, but latest PrebidMobile package
(added in #80) requires .iOS(.v13). SPM enforces that all products in the dependency
graph satisfy the declared minimum, so UID2Prebid, which links PrebidMobile cannot
resolve.

Steps to Reproduce

  1. Create an Xcode project.
  2. Add https://github.com/IABTechLab/uid2-ios-sdk via SPM.
  3. Add UID2Prebid to the target's linked frameworks.
  4. Build.

Expected Behavior

Build succeeds, or a clear compile-time error explains the iOS 13 requirement.

Actual Behavior

SPM emits the platform version conflict error above and the build fails.

Suggested Fix

Bump the minimum platform in Package.swift to .iOS(.v13) (and .tvOS(.v13)) if possible.

Environment

  • uid2-ios-sdk version: 2.1.0 (latest)
  • prebid-mobile-ios version: 3.3.1 (latest, pulled via .upToNextMajor(from: "3.1.0"))
  • Xcode: 16.x
  • Swift tools version: 5.8

Activity

  1. self-assigned this
    on May 12, 2026
  2. sunnywu commented on May 12, 2026

    @sunnywu
    Contributor

    Hi @abdulmedzid thank you for bringing our attention to this issue. I have made a fix and will make a new software release on cocoapod tomorrow.

  3. abdulmedzid commented on May 13, 2026

    @abdulmedzid
    Author

    Hi @sunnywu thank you for a quick update. The platform version mismatch from the original issue has been resolved, but when updating to 3.0.0 i found a new compilation error in UID2Prebid.swift at line 83.

    Error:

    Cannot convert value of type '[Any]' to expected argument type '[UserUniqueID]'
    'Any' cannot be constructed because it has no accessible initializers
    

    Location: Sources/UID2Prebid/UID2Prebid.swift:83

    uids: [.init(id: advertisingToken, aType: agentType)]

    Cause: In some of the latest versions of PrebidMobile they made a breaking change and renamed the id parameter to uniqueId in the UserUniqueID initializer. The current code uses the old .init(id:aType:) signature which no longer exists, causing the compiler to fail to resolve the type.

    Fix: Update line 83 to use the renamed parameter:

    uids: [.init(uniqueId: advertisingToken, aType: agentType)]
  4. sunnywu commented on May 13, 2026

    @sunnywu
    Contributor

    Thanks @abdulmedzid for discovering this. we are working on a fix hopefully we will have it ready tomorrow

  5. sunnywu commented on May 15, 2026

    @sunnywu
    Contributor

    @abdulmedzid we have created https://github.com/IABTechLab/uid2-ios-sdk/releases/tag/v3.0.2 and will push to cocoapod overnight. Please let us know if there are any more issues. Thanks

  6. sunnywu commented on May 18, 2026

    @sunnywu
    Contributor

    @abdulmedzid it's been published to cocoapod now
    https://github.com/CocoaPods/Specs/blob/master/Specs/a/4/0/UID2/3.0.2/UID2.podspec.json

    please let us know if you encountered any further issues. thanks

  7. abdulmedzid commented on May 18, 2026

    @abdulmedzid
    Author

    @sunnywu thank you for a quick fix, I have tested the SDK through swift package manager and didn't encounter any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions