0

When I run 'npx react-native run-ios --simulator='iPhone 14'', the build failed with this error:

The following build commands failed: CompileC /Users/xx/Library/Developer/Xcode/DerivedData/Chatbot-eeojnmlkiuetmccwazfgajbalxbi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/arm64/RNFirebaseFirestore.o /Users/xx/Desktop/Chatbot/node_modules/react-native-firebase/ios/RNFirebase/firestore/RNFirebaseFirestore.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNFirebase' from project 'Pods') (1 failure)

I have tried uninstalling and reinstalling firebase using 'npm (un)install react-native-firebase' and specifying the version of flipper to use. However, the error still persists. I ran 'pod repo update' and 'pod install' afterwards. My Podfile is:

$FirebaseSDKVersion = '9.6.0'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'
install! 'cocoapods', :deterministic_uuids => false

target 'Chatbot' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'ChatbotTests' do
    inherit! :complete
    # Pods for testing
  end

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

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  # use_flipper!()
  use_flipper!({ 'Flipper' => '0.162.0' })

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

My react-native versions are: react-native-cli: 2.0.1 & react-native: 0.68.2

My firebase related versions are: @react-native-firebase/firestore: 16.4.2 & firebase: 9.13.0

Help will be greatly appreciated.

3
  • Please don't post screenshots of your code, or other textual content. Instead post the actual text, and use the formatting tools of Stack Overflow to mark it up. Also see: Why not upload images of code/errors when asking a question? Commented Nov 5, 2022 at 13:59
  • Have a look at the suggestions in this stackoverflow thread & github Commented Nov 9, 2022 at 8:41
  • I hope you get the help you need. I am also struggling : ( Commented Feb 19, 2024 at 19:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.