Frank Boccia
Frank Boccia

Reputation: 285

Firebase- Could not locate configuration file: 'GoogleService-Info.plist'

I have downloaded it already and added it to my Xcode Project I did copy items if needed as well .. I do not understand why I am still getting this error. I have FIRApp.configure() in my app delegate... Any tips? Thank you in advance.

 func application(application: UIApplication,
                         didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?)
            -> Bool {
                UINavigationBar.appearance().tintColor = UIColor.greenColor()
                UIApplication.sharedApplication().statusBarStyle = .LightContent

                FIRApp.configure()
                return true
        }

Upvotes: 6

Views: 12178

Answers (4)

Nasir
Nasir

Reputation: 1727

I was making FIRApp.configure() from two different file/places, due to which app was crashing.

You need to call only one time.

Upvotes: 0

Ahmad Al-Baqawi
Ahmad Al-Baqawi

Reputation: 209

I tried so many copy paste methods even creating/placing plist file in the Resource folder and nothing worked :(

sometimes, only using original plist file was best indicator of working but this is the best solution that worked 100% every time I use Xcode (8 - 9)/swift and Firebase together:

  1. Go to your project settings
  2. Press on Build Phases
  3. Press on Copy Bundle Resources (to expand)
  4. Drag the your GoogleServices-Info.plist into this folder
  5. now Run the project and it should work :D

Upvotes: 3

Bruno Lemos
Bruno Lemos

Reputation: 9253

  1. Add to the project
  2. Click on it:

enter image description here

  1. On the right sidebar from Xcode, mark the Target Membership option:

enter image description here

Upvotes: 13

Vinoth
Vinoth

Reputation: 9734

Solution 1

Make sure your google service plist called GoogleServices-Info.plist. If it's not then it won't work.

Solution 2

If it is still not working then just create Resource Folder in Xcode and then copy the GoogleServices-Info.plist inside the Resource folder. Now Run your project. I hope this helps you.

See this image

Upvotes: 5

Related Questions