Use of unresolved identifier 'FIRDatabase' when using Firebase

前端 未结 6 1929
不知归路
不知归路 2021-02-18 16:48

Xcode tells me that FIRDatabaseis not an identifier. My code:

import UIKit
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApp         


        
6条回答
  •  臣服心动
    2021-02-18 16:58

    1. add pod 'Firebase/Database' to your pod file
    2. run the pod update command from your project dir
    3. import

      `*import Firebase

      import FirebaseDatabase*`

    4. Initialize and Configure your Firebase

      `*var ref: DatabaseReference!

      ref = Database.database().reference()*`

提交回复
热议问题