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 you continue, [set up Google Mobile Ads Unity Plugin](https://developers.google.com/ad-manager/mobile-ads-sdk/unity/quick-start.md.txt).

## Link frameworks statically

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](https://developers.google.com/ad-manager/mobile-ads-sdk/unity/mediation/applovin.md.txt#version-8.1.1) |
| InMobi | [4.7.1](https://developers.google.com/ad-manager/mobile-ads-sdk/unity/mediation/inmobi.md.txt#version-4.7.1) |
| maio | [3.0.0](https://developers.google.com/ad-manager/mobile-ads-sdk/unity/mediation/maio.md.txt#version-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:

   ```xml
   <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>
   ```
2. Keep only the `<iosPod>` elements for ad sources that apply to your app.