Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After installing react-native-firebase/app it's Build will failed in react-native ios

After installing react-native-firebase/[email protected] with react-native-0.68.1 using use_frameworks! and remove flipperin the podfile of the project , but when i ran npx react-native run-ios it's Build failed

The following build commands failed: Ld /Users/userName/Library/Developer/Xcode/DerivedData/-gvnovwrlbjvxedcquaumtvgvdgmn/Build/Products/Debug-iphonesimulator/react-native-razorpay/react_native_razorpay.framework/react_native_razorpay normal (in target 'react-native-razorpay' from project 'Pods') (1 failure) , The Project also contain react-native-razorpay previously added ..now what to do for removing the error and build will succeed with out any crash, Please help i am new to react-native my podfile looks like ``` #use_modular_headers!

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

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

target 'DussriShadi' do

use_frameworks!

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 'DussriShadiTests' do inherit! :complete # Pods for

end

Enables Flipper.

Note that if you have use_frameworks! enabled, Flipper will not work and

you should disable the next line.

#use_flipper!()

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

like image 845
React_Coder Avatar asked Feb 23 '26 15:02

React_Coder


1 Answers

This is what worked for me using

"@react-native-firebase/app": "^15.6.0",
"@react-native-firebase/messaging": "^15.6.0",
"react": "18.1.0",
"react-native": "0.70.1"
  1. first add this into podfile:

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

in between

   flags = get_default_flags()

and

   use_react_native!(
  1. Then delete podfile.lock.

  2. Then do:

      cd ios
      pod deintegrate
      pod cache clean --all
      npm cache verify
      yarn cache clean
      pod install --repo-update
    
  3. Then clean build folder under XCode -> Product -> Clean Build Folder.

  4. Then run from within XCode.

like image 99
Charlotte_Anne Avatar answered Feb 25 '26 10:02

Charlotte_Anne