Skip to content

iOS build fails: 'FirebaseAuth/FirebaseAuth-Swift.h' file not found in React Native + FirebaseAuth setup #15249

@Anirudh-1606

Description

@Anirudh-1606

Description

Problem

When building my React Native iOS app with Firebase Auth, the build fails with the following error:

/Users/anirudhsaladi/Documents/codebase/rural-share/RuralShareApp/ios/Pods/Headers/Private/Firebase/Firebase.h:40:15:
'FirebaseAuth/FirebaseAuth-Swift.h' file not found

Podfile (current state)
source 'https://cdn.cocoapods.org/'
platform :ios, '16.0'

require_relative '../node_modules/react-native/scripts/react_native_pods'
prepare_react_native_project!

target 'RuralShareApp' do
config = use_native_modules!

use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => true
)

rn_maps_path = File.join(dir, '../node_modules/react-native-maps')
pod 'react-native-google-maps', :path => rn_maps_path
pod 'GoogleMaps', '7.4.0'
pod 'GooglePlaces','7.4.0'

Firebase (Auth pulls Core transitively)

pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseAuth', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'RecaptchaInterop', :modular_headers => true
pod 'FirebaseAppCheckInterop',:modular_headers => true
pod 'FirebaseAuthInterop', :modular_headers => true

post_install do |installer|
react_native_post_install(installer)

# ensure modules are enabled across Firebase pods
installer.pods_project.targets.each do |t|
  if ['FirebaseAuth','FirebaseCore','FirebaseCoreInternal','FirebaseAuthInterop',
      'FirebaseAppCheckInterop','FirebaseCoreExtension','GoogleUtilities','RecaptchaInterop'].include?(t.name)
    t.build_configurations.each do |c|
      c.build_settings['CLANG_ENABLE_MODULES'] = 'YES'
      c.build_settings['DEFINES_MODULE'] = 'YES'
    end
  end
end

end
end

Attempts so far (none worked)

Using use_modular_headers! globally

Using use_frameworks! :linkage => :static

Manually forcing DEFINES_MODULE = YES in post_install for Firebase pods

Adding/removing modular_headers => true per pod

Cleaning DerivedData, pod deintegrate, pod install --clean-install

Adding EXCLUDED_ARCHS for simulator (Apple Silicon)

Switching between static and dynamic frameworks

Every configuration eventually leads back to the error:

'FirebaseAuth/FirebaseAuth-Swift.h' file not found

Reproducing the issue

Image

ios % pod deintegrate
rm -rf Pods Podfile.lock ~/Library/Developer/Xcode/DerivedData
pod repo update
pod install --clean-install
open workspace and build and get the error

Firebase SDK Version

11.15.0

Xcode Version

16

Installation Method

Swift Package Manager

Firebase Product(s)

Authentication

Targeted Platforms

iOS

Relevant Log Output

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
PODS:
  - boost (1.84.0)
  - BVLinearGradient (2.8.3):
    - React-Core
  - DoubleConversion (1.1.6)
  - fast_float (8.0.0)
  - FBLazyVector (0.80.1)
  - Firebase/Auth (11.15.0):
    - Firebase/CoreOnly
    - FirebaseAuth (~> 11.15.0)
  - Firebase/CoreOnly (11.15.0):
    - FirebaseCore (~> 11.15.0)
  - FirebaseAppCheckInterop (11.15.0)
  - FirebaseAuth (11.15.0):
    - FirebaseAppCheckInterop (~> 11.0)
    - FirebaseAuthInterop (~> 11.0)
    - FirebaseCore (~> 11.15.0)
    - FirebaseCoreExtension (~> 11.15.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 8.1)
    - GoogleUtilities/Environment (~> 8.1)
    - GTMSessionFetcher/Core (< 5.0, >= 3.4)
    - RecaptchaInterop (~> 101.0)
  - FirebaseAuthInterop (11.15.0)
  - FirebaseCore (11.15.0):
    - FirebaseCoreInternal (~> 11.15.0)
    - GoogleUtilities/Environment (~> 8.1)
    - GoogleUtilities/Logger (~> 8.1)
  - FirebaseCoreExtension (11.15.0):
    - FirebaseCore (~> 11.15.0)
  - FirebaseCoreInternal (11.15.0):
    - "GoogleUtilities/NSData+zlib (~> 8.1)"
  - fmt (11.0.2)
  - glog (0.3.5)
  - Google-Maps-iOS-Utils (4.1.0):
    - Google-Maps-iOS-Utils/Clustering (= 4.1.0)
    - Google-Maps-iOS-Utils/Geometry (= 4.1.0)
    - Google-Maps-iOS-Utils/GeometryUtils (= 4.1.0)
    - Google-Maps-iOS-Utils/Heatmap (= 4.1.0)
    - Google-Maps-iOS-Utils/QuadTree (= 4.1.0)
    - GoogleMaps
  - Google-Maps-iOS-Utils/Clustering (4.1.0):
    - Google-Maps-iOS-Utils/QuadTree
    - GoogleMaps
  - Google-Maps-iOS-Utils/Geometry (4.1.0):
    - GoogleMaps
  - Google-Maps-iOS-Utils/GeometryUtils (4.1.0):
    - GoogleMaps
  - Google-Maps-iOS-Utils/Heatmap (4.1.0):
    - Google-Maps-iOS-Utils/QuadTree
    - GoogleMaps
  - Google-Maps-iOS-Utils/QuadTree (4.1.0):
    - GoogleMaps
  - GoogleMaps (7.4.0):
    - GoogleMaps/Maps (= 7.4.0)
  - GoogleMaps/Base (7.4.0)
  - GoogleMaps/Maps (7.4.0):
    - GoogleMaps/Base
  - GooglePlaces (7.4.0)
  - GoogleUtilities (8.1.0):
    - GoogleUtilities/AppDelegateSwizzler (= 8.1.0)
    - GoogleUtilities/Environment (= 8.1.0)
    - GoogleUtilities/Logger (= 8.1.0)
    - GoogleUtilities/MethodSwizzler (= 8.1.0)
    - GoogleUtilities/Network (= 8.1.0)
    - "GoogleUtilities/NSData+zlib (= 8.1.0)"
    - GoogleUtilities/Privacy (= 8.1.0)
    - GoogleUtilities/Reachability (= 8.1.0)
    - GoogleUtilities/SwizzlerTestHelpers (= 8.1.0)
    - GoogleUtilities/UserDefaults (= 8.1.0)
  - GoogleUtilities/AppDelegateSwizzler (8.1.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
    - GoogleUtilities/Privacy
  - GoogleUtilities/Environment (8.1.0):
    - GoogleUtilities/Privacy
  - GoogleUtilities/Logger (8.1.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Privacy
  - GoogleUtilities/MethodSwizzler (8.1.0):
    - GoogleUtilities/Logger
    - GoogleUtilities/Privacy
  - GoogleUtilities/Network (8.1.0):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Privacy
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (8.1.0)":
    - GoogleUtilities/Privacy
  - GoogleUtilities/Privacy (8.1.0)
  - GoogleUtilities/Reachability (8.1.0):
    - GoogleUtilities/Logger
    - GoogleUtilities/Privacy
  - GoogleUtilities/SwizzlerTestHelpers (8.1.0):
    - GoogleUtilities/MethodSwizzler
  - GoogleUtilities/UserDefaults (8.1.0):
    - GoogleUtilities/Logger
    - GoogleUtilities/Privacy
  - GTMSessionFetcher/Core (4.5.0)
  - hermes-engine (0.80.1):
    - hermes-engine/Pre-built (= 0.80.1)
  - hermes-engine/Pre-built (0.80.1)
  - otpless-headless-rn (1.0.9):
    - OtplessBM/Core (= 1.1.7)
    - RCT-Folly
    - RCTRequired
    - RCTTypeSafety
    - React-Codegen
    - React-Core
    - ReactCommon/turbomodule/core
  - OtplessBM/Core (1.1.7)
  - RCT-Folly (2024.11.18.00):
    - boost
    - DoubleConversion
    - fast_float (= 8.0.0)
    - fmt (= 11.0.2)
    - glog
    - RCT-Folly/Default (= 2024.11.18.00)
  - RCT-Folly/Default (2024.11.18.00):
    - boost
    - DoubleConversion
    - fast_float (= 8.0.0)
    - fmt (= 11.0.2)
    - glog
  - RCT-Folly/Fabric (2024.11.18.00):
    - boost
    - DoubleConversion
    - fast_float (= 8.0.0)
    - fmt (= 11.0.2)
    - glog
  - RCTDeprecation (0.80.1)
  - RCTRequired (0.80.1)
  - RCTTypeSafety (0.80.1):
    - FBLazyVector (= 0.80.1)
    - RCTRequired (= 0.80.1)
    - React-Core (= 0.80.1)
  
  - SocketRocket (0.7.1)
  - Yoga (0.0.0)



PODFILE CHECKSUM: 9407da6543ee1aeed654ba546dbaaddf08d3799e

COCOAPODS: 1.16.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions