0
0

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.

FlutterのAdMobプラグインを入れたiOSアプリが起動時にクラッシュする

Last updated at Posted at 2019-06-24

事象

アプリ起動時に画面が真っ暗になり、アプリがクラッシュする。

クラッシュログ

*** First throw call stack:
(
	0   CoreFoundation                      0x000000010c2956fb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x000000010b839ac5 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010c295269 -[NSException raise] + 9
	3   Runner                              0x000000010248bd91 GADVerifyApplicationID + 148
	4   Runner                              0x000000010248c9c0 GADVerifyApplicationID + 3267
	5   libdispatch.dylib           <…>
Lost connection to device.

原因

GADApplicationIdentifier(AdMobアプリID)Info.plistに追記していなかった。

AndroidでAdMobプラグインを導入する際には、AndroidManifest.xmlにAdMobアプリIDを記載する必要がありますが、iOSでも同様の処理が必要だったようです。
こちらの公式ドキュメントに記載がありました。
https://firebase.google.com/docs/admob/ios/quick-start?hl=en#update_your_infoplist

解決策

Info.plistに下記の<key>, <string>を追記します。

Info.plist
<dict>
  <key>GADApplicationIdentifier</key>
  <string>[MY-ADMOB-APP-ID]</string>
</dict>
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?