Unityでスマホ向けにアプリ開発をしています。
そこそこ完成に近づいてきたのでGoogle AdMob広告を導入してビルドしてテストしょうと思いました。
switch PlatformしてPCからiOSへと変えた結果、ビルド後に
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: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions. pod install output: Analyzing dependencies [!] `Google-Mobile-Ads-SDK` requires CocoaPods version `>= 1.9.0`, which is not satisfied by your current version, `1.8.4`. [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile: export LANG=en_US.UTF-8 [0m pod repo update output: Updating spec repo `cocoapods` $ /usr/bin/git -C /Users/jejeje/.cocoapods/repos/cocoapods fetch origin --progress $ /usr/bin/git -C /Users/jejeje/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD master $ /usr/bin/git -C /Users/jejeje/.cocoapods/repos/cocoapods reset --hard origin/master HEAD is now at 3f4fe2e9f125 [Add] Firebase 7.6.0 [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile: export LANG=en_US.UTF-8 [0m remote: Enumerating objects: 63, done. remote: Counting objects: 1% (1/63) remote: Counting objects: 3% (2/63) remote: Counting objects: 4% (3/63) remote: Counting objects: 6% (4/63) remote: Counting objects: 7% (5/63) remote: Counting objects: 9% (6/63) remote: Counting objects: 11% (7/63) remote: Counting objects: 12% (8/63) remote: Counting objects: 14% (9/63) remote: Counting objects: 15% (10/63) remote: Counting objects: 17% (11/63) remote: Counting objects: 19% (12/63) remote: Counting objects: 20% (13/63) remote: Counting objects: 22% (14/63) remote: Counting objects: 23% (15/63) remote: Counting objects: 25% (16/63) remote: Counting objects: 26% (17/63) remote: Counting objects: 28% (18/63) remote: Counting objects: 30% (19/63) remote: Counting objects: 31% (20/63) remote: Counting objects: 33% (21/63) remote: Counting objects: 34% (22/63) remote: Counting objects: 36% (23/63) remote: Counting objects: 38% (24/63) remote: Counting objects: 39% (25/63) remote: Counting objects: 41% (26/63) remote: Counting objects: 42% (27/63) remote: Counting objects: 44% (28/63) remote: Counting objects: 46% (29/63) remote: Counting objects: 47% (30/63) remote: Counting objects: 49% (31/63) remote: Counting objects: 50% (32/63) remote: Counting objects: 52% (33/63) remote: Counting objects: 53% (34/63) remote: Counting objects: 55% (35/63) remote: Counting objects: 57% (36/63) remote: Counting objects: 58% (37/63) remote: Counting objects: 60% (38/63) remote: Counting objects: 61% (39/63) remote: Counting objects: 63% (40/63) remote: Counting objects: 65% (41/63) remote: Counting objects: 66% (42/63) remote: Counting objects: 68% (43/63) remote: Counting objects: 69% (44/63) remote: Counting objects: 71% (45/63) remote: Counting objects: 73% (46/63) remote: Counting objects: 74% (47/63) remote: Counting objects: 76% (48/63) remote: Counting objects: 77% (49/63) remote: Counting objects: 79% (50/63) remote: Counting objects: 80% (51/63) remote: Counting objects: 82% (52/63) remote: Counting objects: 84% (53/63) remote: Counting objects: 85% (54/63) remote: Counting objects: 87% (55/63) remote: Counting objects: 88% (56/63) remote: Counting objects: 90% (57/63) remote: Counting objects: 92% (58/63) remote: Counting objects: 93% (59/63) remote: Counting objects: 95% (60/63) remote: Counting objects: 96% (61/63) remote: Counting objects: 98% (62/63) remote: Counting objects: 100% (63/63) remote: Counting objects: 100% (63/63), done. remote: Compressing objects: 2% (1/40) remote: Compressing objects: 5% (2/40) remote: Compressing objects: 7% (3/40) remote: Compressing objects: 10% (4/40) remote: Compressing objects: 12% (5/40) remote: Compressing objects: 15% (6/40) remote: Compressing objects: 17% (7/40) remote: Compressing objects: 20% (8/40) remote: Compressing objects: 22% (9/40) remote: Compressing objects: 25% (10/40) remote: Compressing objects: 27% (11/40) remote: Compressing objects: 30% (12/40) remote: Compressing objects: 32% (13/40) remote: Compressing objects: 35% (14/40) remote: Compressing objects: 37% (15/40) remote: Compressing objects: 40% (16/40) remote: Compressing objects: 42% (17/40) remote: Compressing objects: 45% (18/40) remote: Compressing objects: 47% (19/40) remote: Compressing objects: 50% (20/40) remote: Compressing objects: 52% (21/40) remote: Compressing objects: 55% (22/40) remote: Compressing objects: 57% (23/40) remote: Compressing objects: 60% (24/40) remote: Compressing objects: 62% (25/40) remote: Compressing objects: 65% (26/40) remote: Compressing objects: 67% (27/40) remote: Compressing objects: 70% (28/40) remote: Compressing objects: 72% (29/40) remote: Compressing objects: 75% (30/40) remote: Compressing objects: 77% (31/40) remote: Compressing objects: 80% (32/40) remote: Compressing objects: 82% (33/40) remote: Compressing objects: 85% (34/40) remote: Compressing objects: 87% (35/40) remote: Compressing objects: 90% (36/40) remote: Compressing objects: 92% (37/40) remote: Compressing objects: 95% (38/40) remote: Compressing objects: 97% (39/40) remote: Compressing objects: 100% (40/40) remote: Compressing objects: 100% (40/40), done. remote: Total 45 (delta 29), reused 0 (delta 0), pack-reused 0 From https://github.com/CocoaPods/Specs 6c58b7a7efa9..3f4fe2e9f125 master -> origin/master UnityEngine.Debug:LogError(Object) Google.Logger:Log(String, LogLevel) (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:136) Google.IOSResolver:Log(String, Boolean, LogLevel) (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:1159) Google.IOSResolver:OnPostProcessInstallPods(BuildTarget, String) (at /Users/chkuang/Workspace/Git/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:2567) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)
といったエラーが表示されてしまいます。
Unity-iPhone.xcodeproj自体はファイルに生成されてはいるのですが、そこからXcodeを開いて実機テストしようとすると
Xcodeで**'GoogleMobileAds/GoogleMobileAds.h' file not found** といったエラーが出てビルドが失敗します。
それで 'GoogleMobileAds/GoogleMobileAds.h' file not found の対処法を調べた結果、
GoogleMobileAds.frameworkをUnityのPluginsフォルダのiOSフォルダの中に入れると直ると色々なサイトで書いてあったので試してみると、
Unity内のビルドでは
"iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project."
とエラーが出てGoogleMobileAds.frameworkを入れる前とまったく同じ結果になりました。
しかもXcodeの方ではエラーが8個に増えてしまいもちろんビルドも失敗します。
色々名方法を試しましたがもう打つ手がない状態です。。。そこで知識を借りようと思い、ここで質問させていただきました。
このエラーについて何か知っている方やAdMobをiOSに実装するにあたり苦労した方など少しでもヒントになることがあればお聞きしたいです。
どうかよろしくお願いします。
環境
Unity 2019.4.17f1 Personal
Xcode 12.4
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。