27
votes

I'm trying to add Firebase and I keep getting a log message thats says:

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

I added the file in Xcode by way of File > Add new file to project.
Any suggestions?

enter image description here

9
In your screenshot it looks like the file name includes (7). What is that for? Also, you could try clearing your build cache (Command-Option-Shift-K) in Xcode.chickenparm
7 it was. It worked! Thank you.user6411634

9 Answers

15
votes

It happens to me. Just erase the (7). The Xcode firebase framework connects to firebase through the GoogleService-Info.plist when you build your code an error will be display if the .plist file is not called exactly: GoogleService-Info.plist. At the moment that the .plist file has another character in the name, the firebase framework will not recognize it. The framework is searching just for the GoogleService-Info.plist not GoogleService-Info.plist (07)

This usually happens when you download several times your GoogleService-Info.plist from the console. If you want to avoid this. Get the file out from your "downloads" carpet. Otherwise, your computer is going to add a number at the end of the name file if you already have one inside that carpet. It creates a copy.

Hope this can help!

72
votes

To anyone still having this issue:

  1. Add the file 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

14
votes

I solved this by using these steps :

  1. Go to Build Phases of your project enter image description here

  2. Expand "Copy Bundle Resources"

  3. Click on Plus (+) button and add "GoogleService-Info.plist" file.

clean and build your project.

5
votes

Change the plist name from GoogleService-Info(7).plist to GoogleService-Info.plist

5
votes

https://github.com/firebase/quickstart-ios/issues/5

I had the same problem. I solved the problem by following the steps below Source: https://github.com/firebase/quickstart-ios/issues/5

4
votes

This file should be in your project directory, not in pods directory.

3
votes

Rename your file GoogleService-Info(7).plist to GoogleService-Info.plist.

0
votes

My experience:

google-service.plist was on the gitignore and the Xcode holds a reference to it (if did exists) it SHOULD NOT BE IN RED COLOR. that means the actual file is missing just add them back in each folder manually ( not through Xcode).

0
votes

Just Drag and drop GoogleService-Info.plist into xcode