ios - 为什么我在 swift 中收到错误 'No such module FirebaseUI'?

标签 ios swift firebase cocoapods firebaseui

每次我尝试构建时都会收到错误“没有这样的模块 FirebaseUI”
我尝试过的事情:

  • 清除派生数据
  • 运行 'pod update' 以确保所有依赖项都是最新的
  • arch -x86_64 pod install 运行我的安装
  • 确保我通过打开 .xcworkspace 而不是 .xcodeproj
  • 来运行应用程序
  • 清理我的构建文件夹(Command+Shift+K)
  • 删除我的项目并从 Git 重新下载
  • 将 FirebaseUI 框架直接添加到我的项目中
  • 将 Scheme 更改为 FirebaseCore 可以构建项目,但模拟器不会打开进行测试,也不会在物理设备上运行。
  • 运行pod deintegrate && pod install ,我注意到这个命令确实提到了 FirebaseUI 并且版本是 11.03
  • 在 Rosetta 中运行 xcode

  • 我正在使用 M1 芯片的新 MacBook Pro 上运行这个项目。以前,我的项目在较旧的英特尔芯片上运行良好。我的 Xcode 版本是 12.5.1,我的操作系统是 11.4
    这是我的 pod 文件:
    # Uncomment the next line to define a global platform for your project
     platform :ios, '12.0'
    
    post_install do |pi|
        pi.pods_project.targets.each do |t|
          t.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
          end
        end
    end
    
    target 'Pikit' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
      # Fixed Pod configuration
      # Pods for Pikit
      pod 'Firebase'
      pod 'Firebase/Storage'
      pod 'Firebase/Auth'
      pod 'Firebase/Firestore'
      pod 'Firebase/Functions'
      pod 'Firebase/Analytics'
      pod 'Firebase/Messaging'
      pod 'Firebase/DynamicLinks'
      pod 'FirebaseUI/Auth'
      pod 'FirebaseUI/Email'
      pod 'FirebaseUI/Google'
      pod 'FirebaseUI/OAuth' # Used for Sign in with Apple, Twitter, etc
      
      # Other Podfiles
      pod 'OnboardKit'
      # Auto move screen for keyboard
      pod 'SDWebImage'
      pod 'PureLayout'
      pod 'IQKeyboardManagerSwift'
      pod 'Google-Mobile-Ads-SDK'
    
    
      
    end
    
    编辑
    先前选择的答案工作了一段时间,但在更改了不相关 pod 的版本后,应用程序显示了同样的问题。

    最佳答案

    FirebaseUI 版本 11 现在分为子模块,因此您需要导入单个模块(例如 import FirebaseAuthUI ),而不是以前仅使用 import FirebaseUI .或者指示您的 Podfile 使用旧版本。
    来自 FirebaseUI 11.0.0 release notes :

    Breaking change: Broke monolithic FirebaseUI module into separate modules per feature. You'll need to update the imports in your project accordingly.

    // FirebaseUI 10.x
    import FirebaseUI
    // FirebaseUI 11
    import FirebaseAuthUI
    import FirebaseDatabaseUI
    // ...
    

    关于ios - 为什么我在 swift 中收到错误 'No such module FirebaseUI'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68102681/

    相关文章:

    ios - 快速绘制手绘形状

    ios - 添加到 AppDelegate 时找不到 Google/Analytics.h 文件

    swift - xCode Swift 文件变灰并带有红色文本

    swift - 如何在 macOS 上使用 swift 在下载文件夹中创建目录?权限异常。

    ios - Firebase 获取用户数据 - Swift

    firebase - 错误 : package com. google.firebase.messaging 不存在

    ios - Swift 代码中的 SVPullToRefresh + SVInfiniteScrolling

    ios - 我的预发行版应用程序在 iTunes Connect 中已超过一周为 "processing",这是怎么回事?

    ios - 如何在 NSDate 扩展 Swift 中改变 self ?

    angularjs - 保存新属性会覆盖 firebase 对象