gpt4 book ai didi

iOS - Firebase 错误 : Use of unresolved identifier FIRApp running supplied code

转载 作者:IT王子 更新时间:2023-10-29 07:46:15 27 4
gpt4 key购买 nike

当尝试将 XCode 配置为与 Firebase 3 一起使用时,使用设置文档中的代码会出现错误:

https://firebase.google.com/docs/ios/setup#add_the_sdk

import UIKit
import Contacts
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

//contacts
var contactStore = CNContactStore()


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FIRApp.configure() <-- Use of unresolved identifier 'FIRApp'
// Override point for customization after application launch.
return true
}

最佳答案

我认为这是正确的解决方案:

  1. pod repo 更新
  2. pod 更新

但我遇到了同样的问题并在命令行上执行以下步骤解决了它:

  1. pod repo 更新
  2. 评论了我的 Podfile 中的 pod 'Firebase'
  3. pod install(这删除了旧的 Firebase)
  4. 再次添加了 pod 'Firebase' 行。
  5. pod install(添加了新的 Firebase)

我认为第 2 步和第 3 步是关键,否则 CocoaPods 不会尝试更新它。正如我所说,也许这可以通过执行 pod update 来解决,但现在我不能返回并重试。

完成所有这些之后,您应该会看到如下内容:
安装 Firebase (3.2.0)
安装 FirebaseAnalytics (3.2.0)
安装 FirebaseInstanceID (1.0.6)
安装 GoogleInterchangeUtilities (1.2.1)
安装 GoogleSymbolUtilities (1.1.1)
安装 GoogleUtilities (1.3.1)

关于iOS - Firebase 错误 : Use of unresolved identifier FIRApp running supplied code,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37328508/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com