【问题标题】:No such module 'FirebaseUI'没有这样的模块“FirebaseUI”
【发布时间】:2019-02-13 12:32:59
【问题描述】:

我想通过 FirebaseUI 进行身份验证。在https://firebase.google.com/docs/auth/ios/firebaseui?authuser=0 之后,我制作了这个程序(Swift 4.1.2,Xcode 9.4.1)。

import UIKit
import FirebaseUI // No such module 'FirebaseUI'

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        FirebaseApp.configure()
        // ...
        return true
    }
}

但是出现编译错误No such module 'FirebaseUI'

这是我的 Podfile。

target 'MyApp' do
  use_frameworks!
  pod 'FirebaseUI'

  target 'MyAppTests' do
    inherit! :search_paths
  end

  target 'MyAppUITests' do
    inherit! :search_paths
  end
end

这是我的 Podfile.lock。

PODS:
  - Bolts (1.9.0):
    - Bolts/AppLinks (= 1.9.0)
    - Bolts/Tasks (= 1.9.0)
  - Bolts/AppLinks (1.9.0):
    - Bolts/Tasks
  - Bolts/Tasks (1.9.0)
  - BoringSSL (10.0.6):
    - BoringSSL/Implementation (= 10.0.6)
    - BoringSSL/Interface (= 10.0.6)
  - BoringSSL/Implementation (10.0.6):
    - BoringSSL/Interface (= 10.0.6)
  - BoringSSL/Interface (10.0.6)
  - FBSDKCoreKit (4.36.0):
    - Bolts (~> 1.7)
  - FBSDKLoginKit (4.36.0):
    - FBSDKCoreKit
  - Firebase/Auth (5.7.0):
    - Firebase/CoreOnly
    - FirebaseAuth (= 5.0.3)
  - Firebase/CoreOnly (5.7.0):
    - FirebaseCore (= 5.1.2)
  - Firebase/Database (5.7.0):
    - Firebase/CoreOnly
    - FirebaseDatabase (= 5.0.2)
  - Firebase/Firestore (5.7.0):
    - Firebase/CoreOnly
    - FirebaseFirestore (= 0.13.2)
  - Firebase/Storage (5.7.0):
    - Firebase/CoreOnly
    - FirebaseStorage (= 3.0.1)
  - FirebaseAuth (5.0.3):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 5.0)
    - GoogleUtilities/Environment (~> 5.2)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseAuthInterop (1.0.0)
  - FirebaseCore (5.1.2):
    - GoogleUtilities/Logger (~> 5.2)
  - FirebaseDatabase (5.0.2):
    - FirebaseCore (~> 5.0)
    - leveldb-library (~> 1.18)
  - FirebaseFirestore (0.13.2):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 5.0)
    - FirebaseFirestore/abseil-cpp (= 0.13.2)
    - gRPC-ProtoRPC (~> 1.0)
    - leveldb-library (~> 1.18)
    - nanopb (~> 0.3.8)
    - Protobuf (~> 3.1)
  - FirebaseFirestore/abseil-cpp (0.13.2):
    - FirebaseAuthInterop (~> 1.0)
    - FirebaseCore (~> 5.0)
    - gRPC-ProtoRPC (~> 1.0)
    - leveldb-library (~> 1.18)
    - nanopb (~> 0.3.8)
    - Protobuf (~> 3.1)
  - FirebaseStorage (3.0.1):
    - FirebaseCore (~> 5.0)
    - GTMSessionFetcher/Core (~> 1.1)
  - FirebaseUI (5.2.1):
    - FirebaseUI/Anonymous (= 5.2.1)
    - FirebaseUI/Auth (= 5.2.1)
    - FirebaseUI/Database (= 5.2.1)
    - FirebaseUI/Facebook (= 5.2.1)
    - FirebaseUI/Firestore (= 5.2.1)
    - FirebaseUI/Google (= 5.2.1)
    - FirebaseUI/Phone (= 5.2.1)
    - FirebaseUI/Storage (= 5.2.1)
    - FirebaseUI/Twitter (= 5.2.1)
  - FirebaseUI/Anonymous (5.2.1):
    - FirebaseUI/Auth
  - FirebaseUI/Auth (5.2.1):
    - Firebase/Auth (~> 5.0)
  - FirebaseUI/Database (5.2.1):
    - Firebase/Database (~> 5.0)
  - FirebaseUI/Facebook (5.2.1):
    - FBSDKLoginKit (~> 4.0)
    - FirebaseUI/Auth
  - FirebaseUI/Firestore (5.2.1):
    - Firebase/Firestore
  - FirebaseUI/Google (5.2.1):
    - FirebaseUI/Auth
    - GoogleSignIn (~> 4.0)
  - FirebaseUI/Phone (5.2.1):
    - FirebaseUI/Auth
  - FirebaseUI/Storage (5.2.1):
    - Firebase/Storage (~> 5.0)
    - SDWebImage (~> 4.0)
  - FirebaseUI/Twitter (5.2.1):
    - FirebaseUI/Auth
    - TwitterKit (~> 3.0)
  - GoogleSignIn (4.2.0):
    - "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
    - "GoogleToolboxForMac/NSString+URLArguments (~> 2.1)"
    - GTMOAuth2 (~> 1.0)
    - GTMSessionFetcher/Core (~> 1.1)
  - GoogleToolboxForMac/DebugUtils (2.1.4):
    - GoogleToolboxForMac/Defines (= 2.1.4)
  - GoogleToolboxForMac/Defines (2.1.4)
  - "GoogleToolboxForMac/NSDictionary+URLArguments (2.1.4)":
    - GoogleToolboxForMac/DebugUtils (= 2.1.4)
    - GoogleToolboxForMac/Defines (= 2.1.4)
    - "GoogleToolboxForMac/NSString+URLArguments (= 2.1.4)"
  - "GoogleToolboxForMac/NSString+URLArguments (2.1.4)"
  - GoogleUtilities/Environment (5.2.3)
  - GoogleUtilities/Logger (5.2.3):
    - GoogleUtilities/Environment
  - gRPC (1.14.1):
    - gRPC-RxLibrary (= 1.14.1)
    - gRPC/Main (= 1.14.1)
  - gRPC-Core (1.14.1):
    - gRPC-Core/Implementation (= 1.14.1)
    - gRPC-Core/Interface (= 1.14.1)
  - gRPC-Core/Implementation (1.14.1):
    - BoringSSL (~> 10.0)
    - gRPC-Core/Interface (= 1.14.1)
    - nanopb (~> 0.3)
  - gRPC-Core/Interface (1.14.1)
  - gRPC-ProtoRPC (1.14.1):
    - gRPC-ProtoRPC/Main (= 1.14.1)
  - gRPC-ProtoRPC/Main (1.14.1):
    - gRPC (= 1.14.1)
    - gRPC-RxLibrary (= 1.14.1)
    - Protobuf (~> 3.0)
  - gRPC-RxLibrary (1.14.1)
  - gRPC/Main (1.14.1):
    - gRPC-Core (= 1.14.1)
    - gRPC-RxLibrary (= 1.14.1)
  - GTMOAuth2 (1.1.6):
    - GTMSessionFetcher (~> 1.1)
  - GTMSessionFetcher (1.2.0):
    - GTMSessionFetcher/Full (= 1.2.0)
  - GTMSessionFetcher/Core (1.2.0)
  - GTMSessionFetcher/Full (1.2.0):
    - GTMSessionFetcher/Core (= 1.2.0)
  - leveldb-library (1.20)
  - nanopb (0.3.8):
    - nanopb/decode (= 0.3.8)
    - nanopb/encode (= 0.3.8)
  - nanopb/decode (0.3.8)
  - nanopb/encode (0.3.8)
  - Protobuf (3.6.1)
  - SDWebImage (4.4.2):
    - SDWebImage/Core (= 4.4.2)
  - SDWebImage/Core (4.4.2)
  - TwitterCore (3.2.0)
  - TwitterKit (3.4.0):
    - TwitterCore (>= 3.1.0)

DEPENDENCIES:
  - FirebaseUI
...
COCOAPODS: 1.5.3

请告诉我如何解决这个编译错误。提前致谢。

注意:

我尝试了以下解决方案。但是,它们没有用。

  • 产品 > 清洁
  • 执行pod repo update,然后执行pod update

【问题讨论】:

  • 尝试构建项目
  • 感谢您的评论。我已经执行了产品 > 构建。但是发生了我上面提到的同样的编译错误。

标签: swift xcode firebase firebase-authentication cocoapods


【解决方案1】:

很抱歉我忘记添加pod 'Firebase/Core' Podfile。

https://firebase.google.com/docs/ios/setup?authuser=0

target 'MyApp' do
  use_frameworks!
  pod 'Firebase/Core' # added this line
  pod 'FirebaseUI'

  target 'MyAppTests' do
    inherit! :search_paths
  end

  target 'MyAppUITests' do
    inherit! :search_paths
  end
end

【讨论】:

    猜你喜欢
    • 2018-12-07
    • 2021-09-07
    • 2018-08-10
    • 2017-02-09
    • 2019-02-21
    • 2018-03-21
    • 2021-12-07
    • 2023-03-27
    • 2018-12-18
    相关资源
    最近更新 更多