To discuss and provide feedback on our products, join the official AdMob Discord channel in the Google Advertising and Measurement Community server.

Resolve iOS mediation runtime errors

  • Dynamic linker errors in Unity iOS apps can be resolved by linking frameworks statically.

  • To automatically link frameworks statically for certain ad sources, update to the specified minimum adapter versions.

  • Static linking can also be manually configured for older adapter versions by creating an iOSDynamicDependencies.xml file.

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 table lists ad sources with dynamic frameworks and the minimum adapter version that automatically handles static linking. To link frameworks statically, update your adapters to the following minimum version or higher:

Ad source Minimum version for automatic static linking
AppLovin 8.1.1
InMobi 4.7.1
maio 3.0.0

Manually configure static linking

To use an older adapter version that doesn't automatically configure static linking, do the following:

  1. Create an Assets/GoogleMobileAds/Editor/iOSDynamicDependencies.xml file with the following content:

    <dependencies>
    <iosPods>
    <!--AppLovinadapterdependencies.-->
    <iosPodname="AppLovinSDK"addToAllTargets="true"/>
    <!--InMobiadapterdependencies.-->
    <iosPodname="InMobiSDK"addToAllTargets="true"/>
    <!--maioadapterdependencies.-->
    <iosPodname="MaioSDK-v2"addToAllTargets="true"/>
    </iosPods>
    </dependencies>
    
  2. Keep only the <iosPod> elements for ad sources that apply to your app.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月18日 UTC.