ios - 没有这样的模块 'Firebase' ,无法将 Firebase 导入 Swift 4

标签 ios firebase cocoapods swift4.2

我正在构建一个 iOS 应用程序,这是我第一次使用 Firebase 数据库。在 Xcode 10.1 和 swift 版本 4.2 中,我试图将 Firebase 导入我的类。在一个 swift 文件中,我通过“import Firebase”导入了数据库。

但不幸的是,我收到一条错误消息,显示没有这样的模块“Firebase”。

这是我的播客文件:

# 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 中的常见错误,请尝试 清洁和 build 您的项目,通常会有所帮助。如果没有:

选项 1:再次检查您的“ podfile ”文件,然后运行 ​​$ pod install .

选项 2:删除项目的派生数据文件,然后重新构建它。

选项 3:关闭您的 xcworkspace 文件,然后分解您的 pod 文件(运行 $ pod deintegrate ),然后运行 ​​$ pod install .

关于ios - 没有这样的模块 'Firebase' ,无法将 Firebase 导入 Swift 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55488563/

相关文章:

firebase - 如果启用持久化,当数据存在于缓存中时,什么算作读操作?

android - 如何在特定时间后(例如 10 分钟后)更新 firebase 数据库中的值?

android - 身份验证后读取数据时权限被拒绝 Firebase

ios - 当gitignore没有提及时,Git会忽略podfile

swift - 使用 Jetbrains AppCode 时出现 Cocoapods 错误

ios - 在 Swift 中实现 Objective C 代码

ios - 我应该重构以便能够在 XCTests 中使用模拟吗?

ios - 快速发出 GET 请求时无法到达端点

ios - pod firebase 到 Xcode 时出错

objective-c - 混合两个图像并从两个 UIImageViews 绘制调整大小的图像