Cannot Import Firebase Into Swift Class

后端 未结 11 1887
[愿得一人]
[愿得一人] 2020-12-03 06:29

I am totally new to Firebase and building iOS apps. In Xcode 7, I am trying to import Firebase into my Swift class. In a swift file, I have typed \"import Firebase\".

11条回答
  •  一生所求
    2020-12-03 07:19

    When using the CocoaPods installation method, you can start by removing the project workspace file:
    rm -rf MyProject.xcworkspace

    Then, edit the Podfile to following, which will be automatically set for the latest version of Firebase:

    use_frameworks! 
    target 'MyProject' do
      pod 'Firebase/Core'
      pod 'Firebase/Database'
    end
    
    target 'MyProjectUITests' do
      pod 'Firebase/Core'
      pod 'Firebase/Database'
    end
    

    Finally, reinstall the pod

    pod install
    

提交回复
热议问题