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 AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (1)

Collapse
 
vspapg profile image
Vasilis Papagrigoriou

up

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay