Mediation integraton via SPM issue

13 views
Skip to first unread message

Szymon Gajdzica Labmatic

unread,
Oct 6, 2025, 10:24:23 AMOct 6
to Google Mobile Ads SDK Developers
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+

Mobile Ads SDK Forum Advisor

unread,
Oct 6, 2025, 4:41:44 PMOct 6
to sz.ga...@labmatic.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team.

I will check with the team and get back to you shortly.

Please use a single thread for communication instead of creating multiple threads. This helps us investigate the issue more efficiently.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-10-06 20:40:37Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u8KpU:ref" (ADR-00334679)



Mobile Ads SDK Forum Advisor

unread,
Oct 9, 2025, 8:53:47 AMOct 9
to sz.ga...@labmatic.com, google-adm...@googlegroups.com

Hi,

Thank you for your patience.

The issue has been resolved—I was able to add mediation packages to a Swift Package Manager manifest without any build errors. Please check on your end and let us know if you encounter any further issues.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-10-09 12:52:45Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01u8KpU:ref" (ADR-00334679)



Reply all
Reply to author
Forward
0 new messages