7
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

The Google Mobile Ads SDK was initialized incorrectly.のエラーでアプリがクラッシュした際の対処方法

Last updated at Posted at 2019-04-20

概要

Admobのバージョンを上げたところ、クラッシュが発生したので、原因と対処方法についてまとめたいと思います。

エラーログ

*** Terminating app due to uncaught exception 'GADInvalidInitializationException', 
reason: 'The Google Mobile Ads SDK was initialized incorrectly. 
Google AdMob publishers should follow instructions here: https://googlemobileadssdk.page.link/admob-ios-update-plist to include the AppMeasurement framework, 
set the -ObjC linker flag, and set GADApplicationIdentifier with a valid App ID.
 Google Ad Manager publishers should follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist'
*** First throw call stack:

原因

Google Mobile AdsのSDKのverを7.42.0以上にあげるとInfo.plistにAdMobを追加しなくてはいけない仕様変更があったため。

対処方法

Info.plistの更新を行う。
Keyに GADApplicationIdentifier、ValueにAdMobのアプリIDを追加する。アプリID取得方法についてはこちらを参照してください。

<key>GADApplicationIdentifier</key>
<string>AdMobのアプリID</string>

参考資料

Google AdMob
https://developers.google.com/admob/ios/quick-start?hl=ja

7
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?