Xcode cannot find FirebaseCore.h even though Firebase is installed
'FirebaseCore/FirebaseCore.h' file not foundShort 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.
Fix it fast
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.lock2Match what you see, then jump to its fix
- 1
The 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
There 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
Podfile has no use_frameworks! line in the app targetThe Podfile does not use frameworks the way Firebase requiresFix
- 1
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 *.xcodeproj2Fix
Close Xcode and open the workspace file.
open MyApp.xcworkspace3Verify
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' buildConfirmed by guides.cocoapods.org
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 Pods2Fix
Run pod install in the folder that holds the Podfile. Then build from the workspace.
pod install3Verify
The Pods folder and Podfile.lock exist, and the build passes the import.
ls Podfile.lock PodsConfirmed by guides.cocoapods.org
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" Podfile2Fix
Add one of the two lines to the app target, then reinstall the pods.
target 'MyApp' do
use_frameworks! :linkage => :static
pod 'FirebaseCore'
end3Verify
Reinstall and build from the workspace.
pod installConfirmed by firebase.google.com
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:
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
- Spotless LaundryAn on-demand laundry app: Flutter on a Laravel back end, with Firebase for live updates.
Related fixes
Mobile apps
Xcode cannot open the Pods debug.xcconfig file
cocoapod .modulemap file not found
Xcode reads its pod settings from files in the Pods folder.
2 causes, each with a fixMobile apps
FCM cannot reach an iPhone: APNs or web push credentials rejected
HTTP 401 when sending to an iOS registration token
THIRD_PARTY_AUTH_ERROR is HTTP 401.
2 causes, each with a fixMobile apps
FirebaseMessaging.getAPNSToken() returns null on iOS
FirebaseMessaging.instance.getAPNSToken() returns null
getAPNSToken() gives null when iOS has not handed the app an APNs token yet or never will.
4 causes, each with a fixMobile 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 fixMobile apps
Firebase phone sign-in on iOS stops with 'Please register custom URL scheme'
Please register custom URL scheme com.googleusercontent.apps.123456789-abc in the app's Info.plist file.
Phone sign-in on iOS can open a reCAPTCHA page, and Firebase needs a URL scheme in Info.plist to return to your app.
2 causes, each with a fixMobile apps
Firebase on iOS asks for the FCM token before APNs has given one
Be sure to re-retrieve the FCM token once the APNS device token is set.
The Firebase Messaging SDK needs the APNs device token from iOS before it hands out an FCM token.
3 causes, each with a fix