Google Mobile Ads 7.3.0
自分の環境最新
Bitcodeの状態は変えてもエラーになるので、最新?に更新
Unity 2021.3.20f1
Google Mobile Ads 7.4.1
これでなんとか?ダメなので
Google Mobile Ads と ExtraDependencyManagerを削除してしまい
Plugins以下の google mobile ads 関連と思われる GAD… unity plugin libraryなども削除
↓で入れるものは削除
Google Mobile Ads 7.3.0 を入れ直し
7.3.0はOKとの情報があったので。

削除したら広告設定をやり直し。
方法は ↓7.2.0と同じです
やはり?
UnityFramework の Bitcodeを No にするのがポイントのようです?

エラーが一生治らないので GoogleMobileAds 7.2.0に入れ直しました。
さらにBITCODEのところをYesにしても…エラー
GoogleAppMeasurement/WithoutAdIdSupport/GoogleAppMeasurement.framework/GoogleAppMeasurement’ for architecture arm64

ここは Noで

ArchitecturesのところがなぜかReleaseのところだけNoだったのでYesにしてみたら出来ました?
んーとりあえずメモで。どこが正解かわかりません。
結局 adplacementは使わず普通に表示

何回かやっているので特に..と言う感じですが
広告プレースメント
https://developers.google.com/admob/unity/ad-placements
というのを使ってみようかなと使わなくてもできるのですがunity editorから管理できるような雰囲気?
GoogleMobileAds-Ad-Placements.unitypackage をダウンロードして実行


何かエラーが出ています。
Assembly ‘Assets/ExternalDependencyManager/Editor/Google.VersionHandlerImpl_v1.2.161.dll’ will not be loaded due to errors:
Assembly name ‘Google.VersionHandlerImpl’ does not match file name ‘Google.VersionHandlerImpl_v1.2.161’
とりあえずシンボリックリンクしてみる dllとmdbという2つ。
$ ln -s ./Google.VersionHandlerImpl_v1.2.161.dll ./Google.VersionHandlerImpl.dll
$ ln -s ./Google.VersionHandlerImpl_v1.2.161.dll.mdb ./Google.VersionHandlerImpl.dll.mdb
Unityを再起動すると何か登録しろとなり 続けると
Added registries to Packages/manifest.json:
name: Game Package Registry by Google, url: https://unityregistry-pa.googleapis.com, scopes: [com.google]
こんな感じで、エラーは出ていないようです。
Admobにアプリを追加
Assets > Google Mobile Ads > Settings で Admob idを設定

Delay app measurementにチェック
Assets > Google Mobile Ads > Ad Placement で設定

広告のGameobjectを追加
GameObject > Google Mobile Ads > 追加する種類のAd を選択でシーンにオブジェクト追加
インテースティシャルなのでリセットように広告シーンを作っても良いかな、今回は普通に入れてみる。

こんなのが追加されました^^

iOS ビルドエラー
error build: ‘/Users/—–/Library/Developer/Xcode/DerivedData/Unity-iPhone-fowzprwvlssasladuhdzodosrbel/Build/Products/ReleaseForRunning-iphoneos/GoogleUtilities/libGoogleUtilities.a(GULURLSessionDataResponse.o)’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file ‘/Users/—–/Library/Developer/Xcode/DerivedData/Unity-iPhone-fowzprwvlssasladuhdzodosrbel/Build/Products/ReleaseForRunning-iphoneos/GoogleUtilities/libGoogleUtilities.a’ for architecture arm64
Xcode setting ENABLE_BITCODE

Yes を Noにしてみる。

Unity-iPhoneのほうは関係なかったのでYesのままで
Unity-iPhoneではなくPods のほうで
Google-Mobile-Ads-SDK -は Noになっているので Yes に変更!

個別ではなく 「 Pods 」の Enable BitcodeをYesにしたらいけました^^

リビルドするとき毎回セットしないとダメかな?
んー広告表示はされているけど、シーンを変わる前に消える。。。
persistentチェックしても変わらないし。なぞ。
またちょっとアナリティクスを入れてから手動に戻してみます。。。
コメント