Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Xcode cannot find FirebaseCore.h even though Firebase is installed

Error'FirebaseCore/FirebaseCore.h' file not found

Short answer

The compiler only finds Firebase headers when the build uses the CocoaPods setup. Open the .xcworkspace, not the .xcodeproj, run pod install so the Pods folder is current, and make sure the Podfile has use_frameworks!, as Firebase requires.

  • Applies to Xcode 26.2, CocoaPods 1.12 or newer
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check which file you opened and whether the Pods were installed. A missing workspace means pod install never ran.

    ls -d *.xcworkspace Pods Podfile.lock
  2. 2Match what you see, then jump to its fix

    1. 1The error appears when you build from MyApp.xcodeproj, or the Pods project is missing from the navigatorThe project was opened instead of the workspaceFix
    2. 2There is no Pods folder or no Podfile.lock, or the Podfile changed after the last installThe pods were never installed, or are out of dateFix
    3. 3Podfile has no use_frameworks! line in the app targetThe Podfile does not use frameworks the way Firebase requiresFix

What does the error look like?

  • 'FirebaseCore/FirebaseCore.h' file not found

Cause 1 of 3

The project was opened instead of the workspace

1Check

CocoaPods creates a workspace that joins your project with the Pods project. Building the bare project does not include the Pods settings.

ls -d *.xcworkspace *.xcodeproj

2Fix

Close Xcode and open the workspace file.

open MyApp.xcworkspace

3Verify

Build again; the Pods project shows in the navigator and the header is found.

xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -destination 'generic/platform=iOS Simulator' build

Confirmed by guides.cocoapods.org

Did this fix it?

Cause 2 of 3

The pods were never installed, or are out of date

1Check

Podfile.lock is written by the first run of pod install and records the installed versions. If it is absent, nothing has been installed.

ls Podfile.lock Pods

2Fix

Run pod install in the folder that holds the Podfile. Then build from the workspace.

pod install

3Verify

The Pods folder and Podfile.lock exist, and the build passes the import.

ls Podfile.lock Pods

Confirmed by guides.cocoapods.org

Did this fix it?

Cause 3 of 3

The Podfile does not use frameworks the way Firebase requires

1Check

Firebase's install guide says a Podfile must include use_frameworks! or use_frameworks! :linkage => :static. Firebase's binary dependencies are integrated as static frameworks by default.

grep -n "use_frameworks" Podfile

2Fix

Add one of the two lines to the app target, then reinstall the pods.

target 'MyApp' do
  use_frameworks! :linkage => :static
  pod 'FirebaseCore'
end

3Verify

Reinstall and build from the workspace.

pod install

Confirmed by firebase.google.com

Did this fix it?

How do I stop it coming back?

  • Always open the .xcworkspace after pod install, and commit it with the Podfile and Podfile.lock.
  • Run pod install after every Podfile edit and after switching branches.
  • New projects can use Swift Package Manager, which Firebase recommends. Firebase has said it will stop publishing new CocoaPods versions in October 2026.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Xcode cannot find GoogleService-Info.plist for the Runner target

error: Build input file cannot be found: '/Users/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')

Xcode's project file lists GoogleService-Info.plist as an input, but nothing exists at the path it records.

3 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.