Reputation: 12304
Steps to reproduce:
- create a default app in Android Studio
- build and run the app successfully in iOS simulator through Android Studio
- add dependency
firebase_admob: ^0.9.0+2
in pubspec.yaml- app builds successfully but crashes on startup
- follow instructions to add
GADApplicationIdentifier
with test ID code intoios/Runner/info.plist
file
The app still crashes on startup. Instructions were followed for setting up on iOS as detailed here: https://pub.dev/packages/firebase_admob.
As far as I can see, I've done everything as instructed so no idea why it doesn't work with a default app.
The error I get after all steps above is:
Xcode build done. 8.5s
Configuring the default Firebase app...
6.4.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
6.4.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
6.4.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
6.4.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
*** First throw call stack: ( 0 CoreFoundation 0x0000000113b521bb
__exceptionPreprocess + 331 1 libobjc.A.dylib 0x00000001130f0735
objc_exception_throw + 48 2 CoreFoundation 0x0000000113b52015 +
[NSException raise:format:] + 197 3 Runner 0x000000010bd33af0 +[FIRApp
configure] + 576 4 Runner 0x000000010bd7f1c5 -[FLTFirebaseAdMobPlugin
init] + 261 5 Runner 0x000000010bd7ef2e +[FLTFirebaseAdMobPlugin
registerWithRegistrar:] + 78 6 Runner 0x000000010bd333fb +
[GeneratedPluginRegistrant registerWithRegistry:] + 123 7 Runner <…>
Upvotes: 1
Views: 1966
Reputation: 1533
I believe this medium post is the most comprehensive ios Firebase setup guide, however point 1 can be skipped - I have an app using firebase_admob 0.8.0+3
and it works flawlessly under iOS, once all other steps are completed.
Upvotes: 1
Reputation: 568
You need to add GoogleService-Info.plist from firebase to your project.
Check this links:
https://support.google.com/firebase/answer/7015592
https://firebase.google.com/docs/ios/setup
Upvotes: 0