代码之家  ›  专栏  ›  技术社区  ›  Yuki.M

没有这样的模块'FirebaseUI'

  •  -1
  • Yuki.M  · 技术社区  · 6 年前

    我想通过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' 已发生。

    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 回复  |  直到 6 年前
        1
  •  0
  •   Yuki.M    6 年前

    对不起,我忘了加 pod 'Firebase/Core' 播客文件。

    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