Help us understand the problem. What is going on with this article?

UnityのiOSアプリにFirebaseを導入したら「iOS framework addition failed」でビルドできない問題

More than 1 year has passed since last update.


UnityからFirebase Realtime Databaseを使おうとした際に、iOSビルドが通らない問題が生じたためその備忘録です。


pod --version -> 1.5.3



  1. Unityプロジェクトを作成し、ビルドプラットフォームをiOSに変更する

  2. 公式に従ってFirebaseを導入する

  3. ビルドすると以下のようなエラーが生じる

    iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.
    After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: for potential solutions.
    pod install output:
    Analyzing dependencies
    [!] CocoaPods could not find compatible versions for pod "GoogleUtilities/MethodSwizzler":
    In Podfile:
    Firebase/Core (= 5.6.0) was resolved to 5.6.0, which depends on
      FirebaseAnalytics (= 5.1.1) was resolved to 5.1.1, which depends on
        GoogleUtilities/MethodSwizzler (~> 5.2.0)
    Specs satisfying the `GoogleUtilities/MethodSwizzler (~> 5.2.0)` dependency were found, but they required a higher minimum deployment target.
    [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:
    export LANG=en_US.UTF-8
    pod repo update output:
    ~ 以下略 ~

    ログにはBuild completed with a result of 'Succeeded'とあり、Xcodeプロジェクトも生成されていますが、そちらを開いて実行してもビルドは通りません。



  1. 生成されたプロジェクトフォルダに移動してPodfileを開く
  2. 下記のようにpod 'GoogleUtilities', '5.2.3'を追記する

    source ''
    platform :ios, '12.0'
    target 'Unity-iPhone' do
    pod 'Firebase/Auth', '5.6.0'
    pod 'Firebase/Core', '5.6.0'
    pod 'Firebase/Database', '5.6.0'
    pod 'GoogleUtilities', '5.2.3'
  3. pod install

  4. 生成されたUnity-iPhone.xcworkspaceを開いてビルド

上記手順で一度インストールしてしまえば、以降はUnityの[Build And Run]からも実行できるようになります。

ちなみに「iOS framework addition failed」で調べると、~/.profile~/.bash_profileexport LANG=en_US.UTF-8を追記する解決法が散見されますが、今回の問題はこの方法では解決しませんでした。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away