When integrating more than one Google Mobile Ads mediation package via Swift Package Manager, the build fails with a target name conflict.
Steps to reproduce:
Add two mediation packages to a SwiftPM manifest, for example:
dependencies: [
.package(url: "
https://github.com/googleads/googleads-mobile-ios-mediation-applovin", branch: "main"),
.package(url: "
https://github.com/googleads/googleads-mobile-ios-mediation-mintegral", branch: "main"),
]
Run package resolution and build.
Observed result:
SwiftPM reports:
error: multiple packages ('googleads-mobile-ios-mediation-applovin', 'googleads-mobile-ios-mediation-mintegral') declare targets with a conflicting name: 'Adapter'; target names need to be unique across the package graph
Root cause:
Each mediation repo declares its internal target simply as Adapter. Since SwiftPM requires target names to be globally unique across the dependency graph, the packages cannot coexist.
Expected result:
Multiple mediation adapters should be usable side by side in the same project without target name collisions.
Proposed fix:
Rename each adapter’s internal target to a unique name (for example AppLovinAdapter, MintegralAdapter, MetaAdapter, etc.) and update the product definition to reference the renamed target. The public product names (such as AppLovinAdapterTarget) can remain the same, so this would not break existing clients.
Environment:
SwiftPM 5.9
Xcode 16
iOS deployment target 12+