没有这样的模块"Firebase",无法将Firebase导入Swift 4 [英] No such module 'Firebase' , cannot import Firebase Into Swift 4
问题描述
我正在构建一个iOS应用程序,这是我第一次使用Firebase数据库.在Xcode 10.1和Swift 4.2版本中,我试图将Firebase导入到我的类中.在一个快速文件中,我通过"import Firebase"导入了数据库.
I am building an iOS app and it is my first experience using Firebase database. In Xcode 10.1 and swift version 4.2, I am trying to import Firebase into my classes. In a swift file, I have imported the database by "import Firebase".
但不幸的是,我收到一条错误消息,提示没有此类模块"Firebase".
But unfortunately, I am getting an error that says No such module 'Firebase’.
这是我的podfile:
This is my podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Jawwab' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'EstimoteProximitySDK', '~> 1.0'
# Pods for Jawwab
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/Database'
end
任何帮助将不胜感激.
推荐答案
这是XCode中的常见错误,只需尝试清理并构建您的项目,通常会有所帮助.如果没有:
it's a common error in XCode, just try to clean and build your project, usually it helps. If it doesn't:
选项1:再次检查" podfile "文件,然后运行 $ pod pod
.
Option 1: check your "podfile" file once again, and then run $ pod install
.
选项2:删除项目的派生数据文件,然后重新构建.
Option 2: delete derived data files of your project and then rebuild it.
选项3:关闭xcworkspace文件,然后解集成您的pod文件(运行 $ pod deintegrate
),然后运行 $ pod install
.
Option 3: close your xcworkspace file, and then deintegrate your pod files (run $ pod deintegrate
) and then run $ pod install
.
这篇关于没有这样的模块"Firebase",无法将Firebase导入Swift 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!