You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:引入FirebaseUI模块失败,继承FirebaseAppDelegate报错

Fixing the "No such module 'FirebaseUI'" Error

Hey there, let's work through that frustrating "No such module 'FirebaseUI'" error you're seeing when trying to inherit from FirebaseAppDelegate. This issue almost always boils down to installation or configuration gaps—here's how to troubleshoot it:

1. Verify FirebaseUI is properly installed

If using CocoaPods:

  • Double-check your Podfile includes the FirebaseUI dependency. Depending on your needs, it might look like this:
    pod 'FirebaseUI'
    # Or specify a submodule if you only need specific features, e.g.:
    # pod 'FirebaseUI/Auth'
    
  • Run pod install in your project directory, then make sure you open the .xcworkspace file (not the old .xcodeproj)—this is a super common mistake!

If installing manually:

  • Confirm you've added all FirebaseUI framework files to your project.
  • Check that the FirebaseUI frameworks are listed in your target's Build Phases > Link Binary With Libraries section.

2. Tweak your project's Build Settings

  • Head to your target's Build Settings and look for Framework Search Paths. Ensure it includes paths pointing to where FirebaseUI is located. For CocoaPods users, adding $(inherited) and $(PROJECT_DIR)/Pods should cover it.
  • Make sure Enable Modules (C and Objective-C) is set to YES—this lets Xcode properly recognize Swift modules like FirebaseUI.

3. Clean and rebuild your project

  • Hit Cmd + Shift + K to clean your project's build artifacts.
  • Rebuild with Cmd + B, and if that doesn't work, try restarting Xcode entirely—sometimes Xcode holds onto old cache that causes module issues.

4. Check version compatibility

The documentation you're referencing is for FirebaseUI 0.3.2, which is pretty outdated. Newer versions of Swift or Firebase might not play nice with this old release. Make sure you're using a FirebaseUI version that's compatible with your Swift and Firebase SDK versions.

For reference, here's how your code should look once the module issue is fixed:

import UIKit
import FirebaseUI

@UIApplicationMain
class AppDelegate: FirebaseAppDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Your initialization code here
        return true
    }
}

内容的提问来源于stack exchange,提问作者xdeleon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:42:34