skip to Main Content

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

2

Answers


  1. 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.

    Login or Signup to reply.
  2. Adding pods with modular headers (as Charlotte_Anne) do truly work but it is important NOT to use

    use_frameworks!

    Do not place use_frameworks! in podfile (although firebase installation instructions tell you to do so)
    And it works!
    Also encountered different problems after rebuilding (appregistry not found etc) which have many false solutions/answers and it still didnt work. What worked for me is to rebuild the project from git (git clone original project, modify podfile, pod install).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search