Ios Swift:使用未解析标识符';FDataSnapShot';使用firebase SDK时

Ios Swift:使用未解析标识符';FDataSnapShot';使用firebase SDK时,ios,swift,firebase,Ios,Swift,Firebase,我正在用firebase和swift开发应用程序。 我在使用FDataSnapShot时出错。 这是我的密码 DataService.dataService.DATA_REF.observeEventType(.Value, withBlock: { snapshot in var newItems = [FDataSnapshot]() // loop through the children and append them to th

我正在用firebase和swift开发应用程序。 我在使用FDataSnapShot时出错。 这是我的密码

    DataService.dataService.DATA_REF.observeEventType(.Value, withBlock: {
        snapshot in
        var newItems = [FDataSnapshot]()

        // loop through the children and append them to the new array
        for item in snapshot.children {
            newItems.append(item as! FDataSnapshot)
        }

        // replace the old array
        self.items = newItems
    })
我用cocoapods安装了firebase sdk。 我的pod文件看起来像这样

use_frameworks!

pod 'Firebase'
target 'nos' do
end
有没有人在这方面有经验? *注意:我使用的是最新版本的Xcode(7.2)。
我真的希望很快收到您的来信。

如果您试图在
UIViewController
上使用,请确保添加:

import Firebase

YourViewController
,请在将CocoaPod添加到项目中后,清除缓存(
ctrl+k
),并重建(
ctrl+b
)。

尝试在类标题中添加
import Firebase
。另外,执行
ctrl+k
ctrl+b
清理缓存并使用新的Firebase CoCoCoapod重建您的项目抱歉,它工作正常。我已经导入了Firebase in-app delegate,但它不起作用。现在,我实现了“导入Firebase”来查看控制器,它工作正常。谢谢。@AntonKolya,如果这能帮您解决问题,我贴了一封回信。