Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting the error 'No such module FirebaseUI' in swift?

Every time I try to build I get the error 'No such module FirebaseUI'

Things I have tried:

  • Clearing derived data
  • running 'pod update' to make sure all dependencies are up to date
  • running my install as arch -x86_64 pod install
  • making sure I am running the app by opening .xcworkspace as opposed to .xcodeproj
  • Cleaning my build folder(Command+Shift+K)
  • Deleting my project and redownloading from Git
  • Adding the FirebaseUI Framework directly to my project
  • Changing the Scheme to FirebaseCore allows the project to build but the simulator does not open for testing, nor does it run on a physical device.
  • Running pod deintegrate && pod install, I noted that this command did mention that FirebaseUI was included and that the version was 11.03
  • Running xcode in Rosetta

I am running this project on a new MacBook Pro with the M1 chip. Previously, my project ran fine on the older intel chip. My Xcode version is 12.5.1, and my OS is 11.4

Here is my pod file:

# 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

Edit

the previously selected answer was working for a while but after changing the version of an unrelated pod the application is showing the same issue.

like image 520
David Avatar asked Mar 01 '23 13:03

David


2 Answers

FirebaseUI version 11 is now broken into submodules so you will need to import individual modules (e.g. import FirebaseAuthUI) rather than previously using just import FirebaseUI. Or instruct your Podfile to use an older version.

From 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
// ...
like image 73
samaitch Avatar answered Mar 07 '23 01:03

samaitch


I recommend you running the pod install command under the x86 architecture because I've seen that running this command native bring some problems, try:

arch -x86_64 pod install
like image 39
rickramirr Avatar answered Mar 07 '23 01:03

rickramirr