ios 通过 Pod 添加 Firebase 后,Xcode 无法识别 GoogleService-Info.plist 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37578378/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode doesn't recognize GoogleService-Info.plist file after adding Firebase via pods
提问by Bruno Lemos
I'm trying to add Firebase and I keep getting a log message thats says:
我正在尝试添加 Firebase,但不断收到一条日志消息,内容为:
Could not locate configuration file: 'GoogleService-Info.plist'.
找不到配置文件:“GoogleService-Info.plist”。
I added the file in Xcode by way of File > Add new file to project
.
Any suggestions?
我通过File > Add new file to project
.
有什么建议?
采纳答案by Eduardo Aguirree Edair
It happen 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 have another character in the name the firebase framework will not recognise it. The frame work is searching just for the 'GoogleService-Info.plist' not 'GoogleService-Info.plist (07)'
它发生在我身上。只需擦除(7)。当您构建代码时,Xcode firebase 框架通过 GoogleService-Info.plist 连接到 firebase,如果 .plist 文件没有被准确调用,则会显示错误: GoogleService-Info.plist 。当 .plist 文件的名称中有另一个字符时,firebase 框架将无法识别它。该框架仅搜索“GoogleService-Info.plist”而不是“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.
当您从控制台多次下载 GoogleService-Info.plist 时,通常会发生这种情况。如果你想避免这种情况。从“下载”地毯中取出文件。否则,如果您在地毯中已经有了一个数字,您的计算机将在名称文件的末尾添加一个数字。它创建一个副本。
Hope this can help!
希望这可以帮助!
回答by Bruno Lemos
回答by Surendra Kumar
回答by Yakup Ad
I had the same problem. I solved the problem by following the steps below Source: https://github.com/firebase/quickstart-ios/issues/5
我有同样的问题。我按照以下步骤解决了问题来源:https: //github.com/firebase/quickstart-ios/issues/5
回答by kye
Change the plist
name from GoogleService-Info(7).plist
to GoogleService-Info.plist
将plist
名称从更改GoogleService-Info(7).plist
为GoogleService-Info.plist
回答by Harshita Ahuja
This file should be in your project directory, not in pods directory.
这个文件应该在你的项目目录中,而不是在 pods 目录中。
回答by Basir Alam
Rename your file GoogleService-Info(7).plist
to GoogleService-Info.plist
.
将您的文件重命名GoogleService-Info(7).plist
为GoogleService-Info.plist
.