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.

Vanessa Stanley
  • 111
  • 1
  • 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?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) – Frank van Puffelen Nov 05 '22 at 13:59
  • Have a look at the suggestions in this stackoverflow [thread](https://stackoverflow.com/questions/43391417/react-native-ios-build-failed-on-react-native-run-ios) & [github](https://github.com/facebook/react-native/issues/26118) – Sathi Aiswarya Nov 09 '22 at 08:41

0 Answers0