Resolve iOS mediation runtime errors

If you encounter dynamic linker errors after app launch, you might encounter the following runtime errors:

  • dylib
  • dynamic framework
  • Library not loaded
  • no such file

To resolve these errors, link these frameworks statically. This guide covers how to build the Unity application for iOS and link these frameworks.

Prerequisites

Before continuing, complete Get started.

The following mediation ad sources SDKs require linking statically:

  • AppLovin
  • InMobi
  • maio

To link a mediation ad source SDK statically, do the following:

  1. Create an Assets/GoogleMobileAds/Editor/iOSDynamicDependencies.xml file.
  2. Add a dependencies/iosPods/iosPod element for each framework.
  3. In the iosPod element include a addToAllTargets attribute with a value of true.
<dependencies>
  <iosPods>
    <!-- AppLovin adapter dependencies. -->
    <iosPod name="AppLovinSDK" addToAllTargets="true"/>
    <!-- InMobi adapter dependencies. -->
    <iosPod name="InMobiSDK" addToAllTargets="true"/>
    <!-- maio adapter dependencies. -->
    <iosPod name="MaioSDK-v2" addToAllTargets="true"/>
  </iosPods>
</dependencies>