Firebase-找不到配置文件:'GoogleService-Info.plist'

时间:2016-07-07 16:16:21

标签: ios firebase

我已经下载了它并将其添加到我的Xcode项目中我也根据需要复制了项目..我不明白为什么我仍然会收到此错误。我的app委托中有FIRApp.configure()...有什么提示吗?先感谢您。

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

                FIRApp.configure()
                return true
        }

4 个答案:

答案 0 :(得分:8)

  1. 添加到项目
  2. 点击它:
  3. enter image description here

    1. 在Xcode的右侧边栏上,标记Target Membership选项:
    2. enter image description here

答案 1 :(得分:2)

解决方案1 ​​

确保您的Google服务plist名为GoogleServices-Info.plist。如果不是那么它就不会起作用。

解决方案2

如果它仍无法正常工作,则只需在Xcode中创建Resource Folder,然后将GoogleServices-Info.plist复制到Resource folder内。现在Run你的项目。我希望这会对你有所帮助。

See this image

答案 2 :(得分:2)

我尝试了很多复制粘贴方法,甚至在资源文件夹中创建/放置plist文件,但没有任何效果:(

有时候,只使用原始plist文件是工作的最佳指标,但这是每次使用Xcode(8 - 9)/ swift和Firebase时100%工作的最佳解决方案:

  1. 转到您的项目设置
  2. 按Build Phases
  3. 按复制捆绑资源(以展开)
  4. 将您的GoogleServices-Info.plist拖到此文件夹
  5. 现在运行项目,它应该工作:D

答案 3 :(得分:0)

由于哪个应用崩溃,我从两个不同的文件/位置制作了FIRApp.configure()

您只需要打一次电话。

相关问题