没有这样的模块“ FirebaseUI”

时间:2018-09-08 11:02:33

标签: swift xcode firebase firebase-authentication cocoapods

我想通过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

1 个答案:

答案 0 :(得分:0)

对不起,我忘记添加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