Could not find a valid GoogleService-Info.plist in

2020-02-08 06:51发布

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?

17条回答
迷人小祖宗
2楼-- · 2020-02-08 07:19

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.

查看更多
迷人小祖宗
3楼-- · 2020-02-08 07:23
  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.
查看更多
Root(大扎)
4楼-- · 2020-02-08 07:28

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.

查看更多
来,给爷笑一个
5楼-- · 2020-02-08 07:29

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

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

查看更多
做自己的国王
6楼-- · 2020-02-08 07:30

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.

查看更多
登录 后发表回答