Home > Software design >  Why am I getting the error ''FirebaseCore/FirebaseCore.h' file not found' when t
Why am I getting the error ''FirebaseCore/FirebaseCore.h' file not found' when t

Time:09-22

I recently started using a MacBook pro with the M1 chip from an older MacBook Pro which had no issues running this app. Now when I try to build and run my app I get the following issues:

'FirebaseCore/FirebaseCore.h' file not found

and

Could not build Objective-C module 'Firebase'

What I have tried:

  • cleaning my build folder
  • deleting derived data
  • restarting my computer
  • running pod install --repo-update
  • The error does go away when I change my Scheme to FirebaseCore, but then I am unable to run the app on a simulator.

Here is my pod file:

# Uncomment the next line to define a global platform for your project
 platform :ios, '14.0'

post_install do |pi|
    pi.pods_project.targets.each do |t|
      t.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
      end
    end
end

target 'Pikit' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Firebase
  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/Facebook'
  pod 'FirebaseUI/OAuth' # Used for Sign in with Apple, Twitter, etc
  pod 'FirebaseUI/Phone'

  
  # Other Podfiles
  pod 'OnboardKit'
  pod 'SDWebImage'
  pod 'PureLayout'
  pod 'IQKeyboardManagerSwift'
  pod 'Google-Mobile-Ads-SDK'


  
end

CodePudding user response:

Use pod update for Updating the Pod Use Cmd sht k for clean project and start building

CodePudding user response:

If someone is still facing the problem, If you already cleaned the build folder, remove derived data, remove pod.lock and the pods folder what I suggest is to open the terminal and

insert : pod deintegrate && pod install

The difference is caused by the deintegrate call which will remove build phases as well as the framework folder.

To consider also : Using a M1 chip MacBook, what happened to me as well was getting the said error when building the project for a simulator and not a real device / macbook

  • Related