'Could not find a valid GoogleService-Info.plist in your project

When I run my swift 3.2 code with Xcode 9 beta 4 this is the error I get:

*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure]; (FirebaseApp.configure() in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'

I already have a GoogleService-Info.plist file that is named exactly like it should and it is valid.

Is there any trial to firebase or something like that?



Solution 1:[1]

Remove the Google-Info.plist file from your project and try to add it from your project folder's option menu.

EDIT: this is how you remove a plist file Xcode 10 Error: Multiple commands produce

Solution 2:[2]

I had the same issue.

Click on the Googleservice-info.plist in your project and check Target Membership for app in the inspector. That fixed it for me.

That is the reason for this crash and removing the file and adding again is another way of doing as suggested by answers above. But the actual cause is this and this is the right way to solve it.

Please refer to the image below for further clarification:

enter image description here

Solution 3:[3]

Once you add the file to the project, you may also need to add it to Build Phases in the Compile Sources section.

Solution 4:[4]

If you have multiple environments (Production, Develop, Staging), you will need a different Google.plist for each.

They all have to have the same name.

To get around this, create folders for each of these files (one for each environment) and place them inside their corresponding folders.

When you drag the files from the Finder to Xcode, make sure to select the proper environment for each under Target Membership

That will do the trick and allow you to build environments separately. Especially if each environment has a different Bundle ID.

Solution 5:[5]

  1. Make sure the name of the file is correct, i.e: "GoogleService-info.plist"
  2. Add it to the project in mac finder under the project name and then drag it into the project to reference it.
  3. Finally, as Silvajee mentioned, go to the file inspector for the plist file and tick the box under target membership to include it as part of the project.

Solution 6:[6]

Restarting Xcode worked for me, none of the above option worked.

Solution 7:[7]

enter image description here

Add the GoogleService-Info.plist in Build Phases as screenshot above:

Solution 8:[8]

Make sure your file name is correct as "GoogleService-Info.plist". Any other name would cause problem. Restart XCode and you are good to go.

Solution 9:[9]

Unfortunately or fortunately, the error specified is very accurate. There is only one option available right now. i.,e placing Google-Info.plist file in your project properly. Try to remove and add that again. Also, check if a target is selected or not.

Solution 10:[10]

These steps solved my problem. FOllow these. 1.You must drag and drop the GoogleService-Info.plist file into your project in a location such as Shared Resources. When you have successfully added the file, you should also make sure to include it in the project build:

2.Double-check that in the "Build Phases" section of your project that your project is including GoogleService-Info.plist.

3.Double check the file name. The file name must be exactly GoogleService-Info.plist common misspellings include GoogleServices-Info.plist and GoogleService-info.plist - case sensitive and exactly named only will work.

Solution 11:[11]

  1. Actually this error is occur when GoogleService-Info.plist file is not actually located in our project folder but it just have a reference to that file where it is downloaded. So solution is that remove reference to this file and again add it to your project folder by drag and drop or by using "Add Files ..." option by right click to your project folder. Also recheck whether file is locating your project folder destination otherwise error will be occur again.

  2. Don't forget to check your "GoogleService-Info.plist" file have same name as shown in error otherwise rename it.

Solution 12:[12]

For those of you working with Ionic, make sure to open your .xcworkspace file in Xcode first, then drag the GoogleService-info.plist file into the Resources folder.

Most tutorials online don't do a good job of explaining that portion for some reason.

Shout out to Shahzaib Maqbool because his comment helped me get this for my project.

Solution 13:[13]

Below setting can fix my compiler fail 1. Add to "Copy Files" 2. Not add to "Copy Bundle Resources"

enter image description here

Solution 14:[14]

Doing a clean then build a couple times worked for me.

Solution 15:[15]

1 - open "GoogleService-Info.plist" and change any or to and

2 - reopen the xamarin solution 3 - it should work now

Solution 16:[16]

I solved the issue by deleting the project from Firebase and deleted the GoogleService-Info.plist from project. After I again added the project to Firebase and added the new GoogleService-Info.plist file worked for me.

Solution 17:[17]

This error occur download google service more than 1 time. When we download first time from firebase, it's like GoolgeService-Info.Plist. If you download again, that will come GoogleService-Info(1).Plist. We need to remove (1) from GoogleService-Info(1).Plist.

Solution 18:[18]

We must make sure that full path is correct in Xcode. It would be better to add it from the start. If you already did, jump to step 5.

  1. Quit Xcode.
  2. Make sure that file name is correct, "GoogleService-Info.plist".
  3. Add .plist file to project folder. Same level with Podfile, .xcworkspace, etc.
  4. Open Xcode, identify .plist file on Project Navigator. If it's not there, right-click and click Add new file to "[Project Name]". Make sure to click project name below Add to targets option.
  5. On Project Navigator, click on GoogleService-Info.plist. Select File Inspector from right navigator. Ensure that Full Path is correct. If not, click on folder icon and select the .plist file inside the project file.
  6. Build. If still doesn't work, Quit Xcode and Build again.

Solution 19:[19]

Go to build phases and add file in copy bundle resources. Thats it.

Solution 20:[20]

delete any other "GoogleService-Info.plist" files that have been previously installed. in my case, when I installed it, it was names as "GoogleService-Info.plist-2" since I had another file installed in the same folder. it looks that this will create a confusion for firebase. I deleted all old files and changed the name of the current one to "GoogleService-Info.plist" exactly. it worked.

Solution 21:[21]

In my case something went wrong when i merged conflicts in project.pbxproj

GoogleService-Info.plist -> didn't have Target membership selected on the right pane and I couldn't select it because project.pbxproj was corrupted (even though build was successful)

I had to rollback project.pbxproj and after that GoogleService-Info.plist had Target membership selected.

Make sure project.pbxproj isn't corrupted after merging conflicts (it had something to do with attempted to initialize an object with an unknown UUID)

Solution 22:[22]

For anyone using Xamarin by mistake (you should avoid this piece of tool by all means): open project file as code, and check that the file has import tag BundleResource, and not None (the red one is the correct one): enter image description here

Solution 23:[23]

I'm using FirebaseUI and was receiving a slightly different error when pressing Sign-In with Google:

***Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'OAuth client ID not found. Please make sure Google Sign-In is enabled in the Firebase console. You may have to download a new GoogleService-Info.plist file after enabling Google Sign-In.'

What fixed that issue for me was changing this line (that seems to be deprecated)

[[FUIGoogleAuth alloc] init]]

to

[[FUIGoogleAuth alloc] initWithAuthUI:[FUIAuth defaultAuthUI]]

when building providers list

NSArray<id<FUIAuthProvider>> *providers = @[
  [[FUIGoogleAuth alloc] initWithAuthUI:[FUIAuth defaultAuthUI]],
  [[FUIPhoneAuth alloc] initWithAuthUI:[FUIAuth defaultAuthUI]]
];

Solution 24:[24]

Another easily overlooked problem is when you have multiple PLIST files downloaded so the file is not exactly named 'GoogleService-Info.plist'.

I had multiple copies so was trying to use 'GoogleService-Info.plist(2)' which throws the same error, so make sure the file itself is named as it is meant to be!

Solution 25:[25]

Please try this. Click on GoogleService-Info. checked the target membership on the right side . Clean and build . It will work.

Solution 26:[26]

My problem same this case and solved that -> ? added xcode runner Open Xcode, then right-click on Runner directory and select Add Files to "Runner". most importantly; terminal: cd ios- " pod install " and info.list thats ok. ? hope your problems solved

Solution 27:[27]

If your mac add some number by default to your google file u must to delete it and write the file like that "GoogleService-Info.plist" and drag it to your xcode project I hope that will be usefull :)