Integrating Mediation Partners

If you want to integrate mediated networks on Unity, please follow the instructions in the Supported Networks page.

Below is an in depth comparison between the two different approaches you can take to achieve such an integration.

In case you are not familiar with either (or just one of them) this page can help you make an informed decision.

External Dependency Manager for Unity (EDM4U)

The External Dependency Manager for Unity EDM4U (previously known as "unity jar resolver") is a version management tool for Unity, capable of managing Android and iOS dependencies and resolving transitive dependencies. You must include the EDM4U in your Unity project and then declare the network dependencies in an XML file.

Pros

  • You can maintain your network SDK dependencies in a single XML file for both Android and iOS.
  • You have the flexibility to update network SDK versions for Android and iOS independently.

Cons

  • It is very likely the method count on Android can become a problem when integrating more than a certain amount of networks - this must be solved separately.
  • The EDM4U sometimes adds many more dependencies than those necessary to make the build work. This makes the project heavier and the method count issue more likely to happen on Android.
  • The EDM4U has a specific way to resolve conflicting dependencies on Android where it may "loosen" the version of a declared network SDK with conflicting dependencies resulting in unwanted versions being integrated. Click here, for more information. This requires manual steps for the problematic network SDKs.
  • The tool sometimes does not resolve the dependencies properly and can create conflicts within the imported packages. This must be solved by inspecting the error output.
  • Manifest declarations on Android for networks that require them must be addressed separately.
  • This approach can lead to conflicts when used simultaneously with local jars/aars.
  • On iOS you must run the command “pod install” manually after exporting the XCode project.

Dependency Management with Grade/Maven and CocoPods

With this approach, you use the Gradle template for Android that Unity provides, since version 2017 to declare dependencies, as you would do natively. On iOS you edit a CocoaPod file for the exported Xcode project to add your required network SDKs, run “pod install” and then build your iOS project.

Pros

  • The Gradle file can take care of the method count issue.
  • Transitive dependencies are resolved automatically.
  • Conflicts in transitive dependencies are resolved by Gradle, unless major issues arise.
  • You can maintain your network SDK dependencies in a Gradle/CocoaPod file.
  • Updating a network SDK is diminished to updating a line in the build file.
  • It works seamlessly in a CI environment.
  • You have the flexibility to update network SDK versions for Android/iOS independently.

Cons

  • Manifest declarations on Android for networks that require them must be addressed separately.
  • This approach can lead to conflicts when used simultaneously with local jars/aars.
  • On iOS you must run the command “pod install” manually after exporting the XCode project. 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request