DEV Community

Vasilis Papagrigoriou
Vasilis Papagrigoriou

Posted on

1 1 1

Help to connect firebase auth to react-native project

React Native iOS Build Issue: 'FirebaseAuth/FirebaseAuth-Swift.h' file not found

Problem:

I keep encountering this error during the iOS build:

/ios/Pods/Headers/Private/Firebase/Firebase.h:40:15: fatal error: 'FirebaseAuth/FirebaseAuth-Swift.h' file not found

required ios: 17.0+

Steps I’ve Already Tried:

1. Cleaning Pods

  • Deleted Podfile.lock.
  • Ran pod install --repo-update to ensure dependencies are updated.

2. Cleaning Xcode Project

  • Deleted Derived Data.
  • Cleaned the build folder in Xcode.

3. Podfile Setup

I’m using use_modular_headers! instead of use_frameworks! because use_frameworks! creates conflicts with React Native. Here’s my Podfile:

require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, min_ios_version_supported
prepare_react_native_project!

use_modular_headers!  # Using modular headers to resolve static library issues.

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'mbn_ios' do
  config = use_native_modules!

  pod 'Firebase', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseAuth', :modular_headers => true

  use_react_native!(
    :path => config[:reactNativePath],
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'mbn_iosTests' do
    inherit! :complete
  end

  post_install do |installer|
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false,
    )
  end
end
Enter fullscreen mode Exit fullscreen mode

4. React Native Firebase

Installed the following dependencies:

  • @react-native-firebase/app
  • @react-native-firebase/auth

5. FirebaseAuth Directory Check

I noticed the following directory exists:

  • ios/Pods/FirebaseAuth/FirebaseAuth/

But it seems the FirebaseAuth-Swift.h file is still not being found.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (1)

Collapse
 
vspapg profile image
Vasilis Papagrigoriou

up

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up