解決 iOS 中介服務執行階段錯誤
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如果應用程式啟動後發生動態連結器錯誤,您可能會遇到下列執行階段錯誤:
dylib
dynamic framework
Library not loaded
no such file
如要解決這些錯誤,請靜態連結這些框架。本指南說明如何建構 iOS 版 Unity 應用程式,並連結這些框架。
先決條件
繼續操作前,請先完成「開始使用」的步驟。
靜態連結框架
下表列出採用動態框架的廣告來源,以及可自動處理靜態連結的最低轉接程式版本。如要靜態連結框架,請將轉接程式更新至最低要求以上的版本,如下列所示:
如要使用舊版轉接程式,且不自動設定靜態連結,請按照下列步驟操作:
建立 Assets/GoogleMobileAds/Editor/iOSDynamicDependencies.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>
只保留與您應用程式相關的廣告來源 <iosPod>
元素。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[],[],null,["# Resolve iOS mediation runtime errors\n\nIf you encounter dynamic linker errors after app launch, you might encounter\nthe following runtime errors:\n\n- `dylib`\n- `dynamic framework`\n- `Library not loaded`\n- `no such file`\n\nTo resolve these errors, link these frameworks statically. This guide covers how\nto build the Unity application for iOS and link these frameworks.\n\nPrerequisites\n-------------\n\nBefore continuing, complete [Get started](/ad-manager/mobile-ads-sdk/unity/quick-start).\n\nLink frameworks statically\n--------------------------\n\nThe following table lists ad sources with dynamic frameworks and the minimum\nadapter version that automatically handles static linking. To link frameworks\nstatically, update your adapters to the following minimum version or higher:\n\n| Ad source | Minimum version for automatic static linking |\n|-----------|----------------------------------------------------------------------------|\n| AppLovin | [8.1.1](/ad-manager/mobile-ads-sdk/unity/mediation/applovin#version-8.1.1) |\n| InMobi | [4.7.1](/ad-manager/mobile-ads-sdk/unity/mediation/inmobi#version-4.7.1) |\n| maio | [3.0.0](/ad-manager/mobile-ads-sdk/unity/mediation/maio#version-3.0.0) |\n\n### Manually configure static linking\n\nTo use an older adapter version that doesn't automatically configure static\nlinking, do the following:\n\n1. Create an `Assets/GoogleMobileAds/Editor/iOSDynamicDependencies.xml` file\n with the following content:\n\n \u003cdependencies\u003e\n \u003ciosPods\u003e\n \u003c!-- AppLovin adapter dependencies. --\u003e\n \u003ciosPod name=\"AppLovinSDK\" addToAllTargets=\"true\"/\u003e\n \u003c!-- InMobi adapter dependencies. --\u003e\n \u003ciosPod name=\"InMobiSDK\" addToAllTargets=\"true\"/\u003e\n \u003c!-- maio adapter dependencies. --\u003e\n \u003ciosPod name=\"MaioSDK-v2\" addToAllTargets=\"true\"/\u003e\n \u003c/iosPods\u003e\n \u003c/dependencies\u003e\n\n2. Keep only the `\u003ciosPod\u003e` elements for ad sources that apply to your app."]]