Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing setup steps in readme: After adding ads dependency to pubspec.yaml and app ID configuration, application does not load #9

Closed
katscott opened this issue Jul 3, 2019 · 2 comments

Comments

@katscott
Copy link

katscott commented Jul 3, 2019

TLDR:
Either firebase_admob has made a recent changes that added some extra required steps in getting ads working or these were missed in the readme. Either way, it'd be good to add a note that lets others know that steps 1-3 from firebase setup instructions regarding the app configuration files are needed:
https://firebase.google.com/docs/ios/setup#create-firebase-project
https://firebase.google.com/docs/android/setup#create-firebase-project

Reproduction:

  1. Create a new flutter app flutter create testapp
  2. Edit pubspec.yaml and add ads:
  3. Edit AndroidManifest.xml and Info.plist with app ID as described in readme.
  4. Start the flutter app with flutter run.
  • Android appears to hang on installing and the simulator shows a message of testapp keeps stopping
  • iOS appears to start, but then closes and you see some exceptions thrown:
6.1.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
6.1.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
6.1.0 - [Firebase/Core][I-COR000005] No app has been configured yet.

If you follow instructions for setting up firebase you can get the apps loading again.

In iOS:
Steps 1-3 (https://firebase.google.com/docs/ios/setup#create-firebase-project) which address adding the missing plist, then iOS will run again with flutter run, but opening in xcode and trying to run there gives an build failure (before adding ads xcode could build and run fine):

Multiple commands produce '/testapp/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/testapp/ios/Flutter/Flutter.framework' to '/testapp/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”

Editing the [CP] Embed Pods Framework build phase and removing the Flutter.framework from the outputs list fixes this error (but it may cause other issues down the road).

In Android:
Steps 1-3 (https://firebase.google.com/docs/android/setup#create-firebase-project) have you add a json file to the app module. Adding this file allows the app to run with flutter run again.

@Andrious
Copy link
Member

Andrious commented Jul 3, 2019

Thank-you very much for your 'heads up', Kat. Something may indeed has changed, and I'll look into that when I have time. Regardless, its good to include those two links to the README file anyway as associating a 'firebase project' to your app then supplies additional app usage data and analytics capabilities to the ads.

@Andrious
Copy link
Member

Andrious commented Jul 4, 2019

The README file now includes those links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants