External Dependency Manager (EDM)
Recommended External Dependency Manager (EDM) Setup 🔗
The EDM can be downloaded as a tarball or legacy .unitypackage from the following archive Google Unity APIs Archive. It is recommended to download the EDM as a tarball and integrate it through the package manager, as this will make sure future updates can be done without issues.
Since the EDM is meant to be a helper tool to sort out dependencies for Unity projects, it provides many approaches on how this can be done. By default, the EDM will download any available dependencies into your project’s Assets/Plugins/Android folder. Such approach is problematic since the more ad adapters you add, the more libraries and dependencies will be downloaded locally. As a result, your Android’s Plugin folder might become saturated with files.
In order to have the most flexibility and clean approach when utilizing the EDM. It is recommended to have at least the 2 following files into your project:
Both of the following files can be generated by visiting the Player Settings/Android/Publishing Settings/Build section of your Unity project.
-
Custom Main Template 🔗
(Assets/Plugins/Android/mainTemplate.gradle) By having this file the EDM will patch any dependencies into it so they can be fetched during compilation/build time. This is great to avoid having dependencies embedded directly into your codebase. However, this also means that any new libraries will be downloaded the first time you attempt to make a build.
-
Custom Gradle Properties Template 🔗
(Assets/Plugins/Android/gradleTemplate.properties) Gradle Properties Template allows us to specify aspects of how we want our Android project to be handled. This is useful for the EDM when dealing with legacy Android Support Library and Migrations to AndroidX libraries. Once the correct settings are setup, the file should look like this:
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M org.gradle.parallel=true # Android Resolver Properties Start android.useAndroidX=true android.enableJetifier=true # Android Resolver Properties End android.enableR8=**MINIFY_WITH_R_EIGHT** unityStreamingAssets=**STREAMING_ASSETS** **ADDITIONAL_PROPERTIES**
Recommended External Dependency Manager (EDM) Settings 🔗
Android 🔗
Right click on the Assets folder to see actions, then visit External Dependency Manager/Android Resolver/Settings
Make sure the following settings are setup as follows:
- Enable Auto Resolution
- Enable Resolution on Build
- Patch mainTemplate.gradle
- Use Jetifier
The settings above will make sure resolution of dependencies does not happen automatically when adding new ..Dependency.xml files or when trying to make a build. This is ideal since you will only want to resolve dependencies when you know new libraries with Mobile Native dependencies are being added into the Unity project.
Additionally, you can notice that if you leave auto resolution & resolution on build enable without following the recommended setup stated above, the libraries will get automatically downloaded into your Unity project every time a new ..Dependency.xml file is added or when a build is generated.
By selecting to patch the mainTemplate.gradle, your dependencies should look something like this:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
implementation 'androidx.core:core:1.2.0' // Assets/Samples/Chartboost Mediation/4.0.0/UnityAds/Editor/Optional-UnityAdsDependencies.xml:9
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Mediation/Editor/ChartboostMediationDependencies.xml:11
implementation 'androidx.multidex:multidex:2.0.1' // Assets/Demo/Editor/MultidexDependencies.xml:4
implementation 'com.amazon.android:aps-sdk:9.6.2' // Assets/Samples/Chartboost Mediation/4.0.0/Amazon Publisher Services/Editor/Optional-AmazonPublisherServicesDependencies.xml:8
implementation 'com.applovin:applovin-sdk:11.5.5' // Assets/Samples/Chartboost Mediation/4.0.0/AppLovin/Editor/Optional-AppLovinDependencies.xml:8
implementation 'com.chartboost:chartboost-mediation-adapter-admob:4.21.3.0+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/AdMob/Editor/Optional-AdMobDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-amazon-publisher-services:4.9.6.2+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Amazon Publisher Services/Editor/Optional-AmazonPublisherServicesDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-applovin:4.11.5.5+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/AppLovin/Editor/Optional-AppLovinDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-chartboost:4.9.2.0+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Monetization/Editor/Optional-ChartboostDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-digital-turbine-exchange:4.8.2.1+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Digital Turbine Exchange/Editor/Optional-DigitalTurbineExchangeDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-google-bidding:4.21.3.0+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Google Bidding/Editor/Optional-GoogleBiddingDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-inmobi:4.10.1.1+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/InMobi/Editor/Optional-InMobiDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-ironsource:4.7.2.5+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/IronSource/Editor/Optional-IronSourceDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-meta-audience-network:4.6.12.0+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Meta Audience Network/Editor/Optional-MetaAudienceNetworkDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-mintegral:4.16.0.31+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-pangle:4.4.3.0.4+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Pangle/Editor/Optional-PangleDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-unity-ads:4.4.4.1+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/UnityAds/Editor/Optional-UnityAdsDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-adapter-vungle:4.6.12+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Vungle/Editor/Optional-VungleDependencies.xml:5
implementation 'com.chartboost:chartboost-mediation-sdk:4.0+' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Mediation/Editor/ChartboostMediationDependencies.xml:10
implementation 'com.chartboost:chartboost-sdk:9.2.+@aar' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Monetization/Editor/Optional-ChartboostDependencies.xml:8
implementation 'com.facebook.android:audience-network-sdk:6.12.0' // Assets/Samples/Chartboost Mediation/4.0.0/Meta Audience Network/Editor/Optional-MetaAudienceNetworkDependencies.xml:8
implementation 'com.fyber:marketplace-sdk:8.2.1' // Assets/Samples/Chartboost Mediation/4.0.0/Digital Turbine Exchange/Editor/Optional-DigitalTurbineExchangeDependencies.xml:8
implementation 'com.google.android.gms:play-services-ads:21.3.0' // Assets/Samples/Chartboost Mediation/4.0.0/Google Bidding/Editor/Optional-GoogleBiddingDependencies.xml:8
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Mediation/Editor/ChartboostMediationDependencies.xml:20
implementation 'com.google.android.gms:play-services-appset:16.0.2' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Mediation/Editor/ChartboostMediationDependencies.xml:21
implementation 'com.google.android.gms:play-services-base:18.1.0' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Mediation/Editor/ChartboostMediationDependencies.xml:19
implementation 'com.google.android.gms:play-services-basement:18.1.0' // Assets/Samples/Chartboost Mediation/4.0.0/Chartboost Mediation/Editor/ChartboostMediationDependencies.xml:22
implementation 'com.google.guava:guava:31.1-android' // Assets/Samples/Chartboost Mediation/4.0.0/Google Bidding/Editor/Optional-GoogleBiddingDependencies.xml:11
implementation 'com.inmobi.monetization:inmobi-ads:10.1.1' // Assets/Samples/Chartboost Mediation/4.0.0/InMobi/Editor/Optional-InMobiDependencies.xml:8
implementation 'com.ironsource.sdk:mediationsdk:7.2.5' // Assets/Samples/Chartboost Mediation/4.0.0/IronSource/Editor/Optional-IronSourceDependencies.xml:11
implementation 'com.mbridge.msdk.oversea:interstitialvideo:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:18
implementation 'com.mbridge.msdk.oversea:mbbanner:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:21
implementation 'com.mbridge.msdk.oversea:mbbid:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:22
implementation 'com.mbridge.msdk.oversea:mbjscommon:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:13
implementation 'com.mbridge.msdk.oversea:mbnative:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:19
implementation 'com.mbridge.msdk.oversea:nativeex:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:20
implementation 'com.mbridge.msdk.oversea:playercommon:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:14
implementation 'com.mbridge.msdk.oversea:reward:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:15
implementation 'com.mbridge.msdk.oversea:same:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:17
implementation 'com.mbridge.msdk.oversea:videocommon:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:16
implementation 'com.mbridge.msdk.oversea:videojs:16.0.31' // Assets/Samples/Chartboost Mediation/4.0.0/Mintegral/Editor/Optional-MintegralDependencies.xml:12
implementation 'com.pangle.global:ads-sdk:4.3.0.4' // Assets/Samples/Chartboost Mediation/4.0.0/Pangle/Editor/Optional-PangleDependencies.xml:12
implementation 'com.unity3d.ads:unity-ads:4.4.1' // Assets/Samples/Chartboost Mediation/4.0.0/UnityAds/Editor/Optional-UnityAdsDependencies.xml:8
implementation 'com.vungle:publisher-sdk-android:6.12.0' // Assets/Samples/Chartboost Mediation/4.0.0/Vungle/Editor/Optional-VungleDependencies.xml:8
// Android Resolver Dependencies End
**DEPS**}
iOS 🔗
Right click on the Assets folder to see actions, then visit External Dependency Manager/iOS Resolver/Settings
Make sure the following settings are setup as follows:
- Pod File Generation
- CocoaPods Integration -> XCodeWorkspace add cocoapods to the XCode Workspace
- Auto install cocoapods in Editor
The default iOS setup should work right out of the box without issues. Please make sure that the settings above are correct. When exporting an XCode project from Unity, the EDM will generate a .xcdworkspace file and the standard .xcodeproj. Please make sure to always open the .xcdworkspace for proper compatibility with the downloaded and installed pods.
If you have any CI/CD processes in place that target the .xcodeproj to manage your XCode project, please change it to utilize the .xcdworkspace instead.
When pods resolution is successful, the EDM generates the .xcdworkspace and no errors are shown in the Unity Console. If errors appear, it’s generally related to a miss-matching pod dependency, this can be resolved by making sure all your dependencies are compatible with each other. (Make sure they are all up to date).
Pods can be found inside the XCode Workspace in an individual XCode Project called Pods.