Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS fails to run on version 0.72.1, 'react/debug/react_native_assert.h' file not found on RunLoopObserver.cpp (React-utils) #38283

Closed
maksibajo4 opened this issue Jul 11, 2023 · 98 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@maksibajo4
Copy link

Description

I get the error: 'react/debug/react_native_assert.h' file not found, React-utils/RunLoopObserver.
This is my Podfile:

# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
  'require.resolve(
    "react-native/scripts/react_native_pods.rb",
    {paths: [process.argv[1]]},
  )', __dir__]).strip

platform :ios, '13.0'
prepare_react_native_project!

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled


dynamic_frameworks = [
    'Starscream',
    'iProov',
    'DatadogSDK',
    'SwiftProtobuf',
]
pre_install do |installer|
  installer.pod_targets.each do |pod|
    if !dynamic_frameworks.include?(pod.name)
      puts "Overriding the static_framework? method for #{pod.name}"
      def pod.static_framework?;
        true
      end
      def pod.build_type;
        Pod::BuildType.static_library
      end
    end
  end
end

target 'POK' do
  use_frameworks! :linkage => :static
  config = use_native_modules!
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => true,
    :fabric_enabled => flags[:fabric_enabled],
    :flipper_configuration => FlipperConfiguration.disabled,
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
  
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
  pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/Simon-TechForm/google-maps-ios-utils.git', :branch => 'feat/support-apple-silicon'
  pod 'SRSRadialGradient', :path => '../node_modules/react-native-radial-gradient/ios'
  pod 'FirebaseCoreExtension', :modular_headers => true
  pod 'FirebaseInstallations', :modular_headers => true
  pod 'GoogleDataTransport', :modular_headers => true
  pod 'nanopb', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  $RNFirebaseAsStaticFramework = true

  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path

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

  post_install do |installer|
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
        end
      end
      installer.generated_projects.each do |project|
        project.targets.each do |target|
          target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
          end
        end
      end
      `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_13_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h`
      path = "Pods/Target Support Files/Pods-POK/Pods-POK-frameworks.sh"
      lines = File.readlines(path)
      lines.insert(177, 'install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"'+"\n")
      File.write(path, lines.join, mode: "w")
  end
end


### React Native Version

0.72.1

### Output of `npx react-native info`

System:
  OS: macOS 13.0
  CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
  Memory: 74.79 MB / 32.00 GB
  Shell:
    version: 5.8.1
    path: /bin/zsh
Binaries:
  Node:
    version: 18.16.1
    path: ~/.nvm/versions/node/v18.16.1/bin/node
  Yarn:
    version: 1.22.18
    path: /usr/local/bin/yarn
  npm:
    version: 9.5.1
    path: ~/.nvm/versions/node/v18.16.1/bin/npm
  Watchman:
    version: 2023.07.03.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK:
    API Levels:
      - "23"
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
    Build Tools:
      - 28.0.3
      - 29.0.0
      - 29.0.2
      - 29.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
    System Images:
      - android-24 | Google Play Intel x86 Atom
      - android-29 | Intel x86 Atom_64
      - android-30 | Intel x86 Atom_64
      - android-30 | Google APIs Intel x86 Atom
      - android-30 | Google Play Intel x86 Atom
      - android-31 | Intel x86 Atom_64
      - android-33 | Google APIs Intel x86 Atom_64
      - android-33 | Google Play Intel x86 Atom_64
    Android NDK: Not Found
IDEs:
  Android Studio: 2022.2 AI-222.4459.24.2221.10121639
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.1
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.1
    wanted: 0.72.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

### Steps to reproduce

i migrated my app to a new clean version of a React native 0.72.1. i install my dependencies successfully using `yarn install`, then i run `pod install` successfully, but when i try to run the project on iOS, it throws me `'react/debug/react_native_assert.h' file not found` error.
Here's my package.json

{
"name": "POK",
"version": "0.0.1",
"private": true,
"scripts": {
"postinstall": "patch-package",
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.19.0",
"@react-native-clipboard/clipboard": "^1.11.2",
"@react-native-community/blur": "^4.3.2",
"@react-native-community/netinfo": "^9.4.1",
"@react-native-firebase/analytics": "^18.1.0",
"@react-native-firebase/app": "^18.1.0",
"@react-native-firebase/crashlytics": "^18.1.0",
"@react-native-firebase/messaging": "^18.1.0",
"@react-navigation/bottom-tabs": "^6.5.8",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@react-navigation/stack": "^6.3.17",
"axios": "^1.4.0",
"buffer": "^6.0.3",
"card-validator": "^8.1.1",
"expo-modules-core": "^1.5.4",
"fbjs": "^3.0.5",
"isomorphic-webcrypto": "^2.3.8",
"js-base64": "^3.7.5",
"lodash": "^4.17.21",
"lodash.compact": "^3.0.1",
"lodash.every": "^4.6.0",
"lodash.pick": "^4.4.0",
"lodash.values": "^4.3.0",
"lottie-ios": "3.4.1",
"lottie-react-native": "^5.1.6",
"moment-timezone": "^0.5.43",
"patch-package": "^7.0.0",
"postinstall-postinstall": "^2.1.0",
"prop-types": "^15.8.1",
"react": "18.2.0",
"react-hook-form": "^7.45.1",
"react-native": "0.72.1",
"react-native-biometrics": "^3.0.1",
"react-native-blob-util": "^0.18.3",
"react-native-bootsplash": "^4.7.4",
"react-native-calendars": "^1.1299.0",
"react-native-camera": "^4.2.1",
"react-native-confirmation-code-field": "^7.3.1",
"react-native-contacts": "^7.0.5",
"react-native-device-info": "^10.7.0",
"react-native-fast-image": "^8.6.3",
"react-native-flash-message": "^0.4.1",
"react-native-flip-card": "^3.5.7",
"react-native-geocoding": "^0.5.0",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.12.0",
"react-native-google-places-autocomplete": "^2.5.1",
"react-native-image-picker": "^5.6.0",
"react-native-jumio-mobilesdk": "https://github.com/Jumio/mobile-react.git#v4.5.0",
"react-native-keychain": "^8.1.1",
"react-native-linear-gradient": "^2.7.3",
"react-native-loading-spinner-overlay": "^3.0.1",
"react-native-localization": "^2.3.2",
"react-native-localize": "^3.0.2",
"react-native-map-clustering": "^3.4.2",
"react-native-maps": "^1.7.1",
"react-native-masked-text": "^1.13.0",
"react-native-mmkv": "^2.10.1",
"react-native-modal": "^13.0.1",
"react-native-modalize": "^2.1.1",
"react-native-pdf": "^6.7.1",
"react-native-permissions": "^3.8.3",
"react-native-qrcode-scanner": "^1.5.5",
"react-native-qrcode-svg": "^6.2.0",
"react-native-radial-gradient": "^1.1.3",
"react-native-radio-buttons": "^1.0.0",
"react-native-reanimated": "^3.3.0",
"react-native-safe-area-context": "^4.6.4",
"react-native-screens": "^3.22.1",
"react-native-skeleton-content-nonexpo": "^1.0.13",
"react-native-svg": "^13.9.0",
"react-native-toast-message": "^2.1.6",
"react-native-vector-icons": "^9.2.0",
"react-native-webview": "^13.2.2",
"react-redux": "^8.1.1",
"reanimated-bottom-sheet": "^1.0.0-alpha.22",
"redux": "^4.2.1",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.2",
"reselect": "^4.1.8",
"socket.io-client": "^4.7.1",
"validate.js": "^0.13.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.7",
"@tsconfig/react-native": "^3.0.0",
"@types/metro-config": "^0.76.3",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"babel-plugin-module-resolver": "^5.0.0",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.27.5",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.5",
"prettier": "^2.4.1",
"react-native-svg-transformer": "^1.0.0",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
},
"engines": {
"node": ">=16"
}
}

Snack, code example, screenshot, or link to a repository

Screenshot 2023-07-11 at 11 01 12 AM
@github-actions github-actions bot added the Platform: iOS iOS applications. label Jul 11, 2023
@blakef
Copy link
Contributor

blakef commented Jul 11, 2023

This looks similar to this reported issue: #38140 (comment), can you read that thread if that's useful to unblock yourself.

@maksibajo4
Copy link
Author

This looks similar to this reported issue: #38140 (comment), can you read that thread if that's useful to unblock yourself.

I've read that threat but that issue is for version 0.69.1, so it didn't really help

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jul 11, 2023
@maksibajo4
Copy link
Author

@blakef even after applying the patch react-native@0.72.1.patch
I still get the same error:

/Users/user/Documents/projects/UpdateTest/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp:10:10 'react/debug/react_native_assert.h' file not found

@blakef
Copy link
Contributor

blakef commented Jul 11, 2023

This looks similar to this reported issue: #38140 (comment), can you read that thread if that's useful to unblock yourself.

I've read that threat but that issue is for version 0.69.1, so it didn't really help

CleanShot 2023-07-11 at 12 06 40@2x

Did you rerun bundle exec pod install after applying the patch?

@maksibajo4
Copy link
Author

@blakef yes i did, i also tried to remove all pods and cache to do a clean bundle exec pod install, but still the issue persists.

/Users/user/Documents/projects/UpdateTest/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp:10:10 'react/debug/react_native_assert.h' file not found

@vishesh9096
Copy link

any solution for this problem?

@ravindraguptacapgemini
Copy link

+1

@surbhidavara99
Copy link

I am also facing the same issue

@VasuLief
Copy link

Also seeing the same issue

@Shreepadav
Copy link

I am also facing the same issue

@github-actions github-actions bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jul 20, 2023
@cortinico cortinico removed the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jul 20, 2023
@github-actions github-actions bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jul 21, 2023
@MarcinuDev
Copy link

Any fix? Also struggling with it.

@hairus
Copy link

hairus commented Jul 22, 2023

you can see here
i'am success

and you can type npx react-native doctor

#38140

@harouf
Copy link

harouf commented Jul 31, 2023

@maksibajo4 Did you manage to fix this issue?

@adelindanaila
Copy link

adelindanaila commented Aug 7, 2023

+1

LE: Fixed by using software-mansion/react-native-svg#2081 (comment)
Make sure you pass the libraries that complain

if ["React-cxxreact", "React-NativeModulesApple", "RNGestureHandler", "RNScreens", "React-utils", "React-runtimescheduler"].any? { |t| t == target.name }
	append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon")
end

@zjkuang
Copy link

zjkuang commented Aug 9, 2023

+1

@zjkuang
Copy link

zjkuang commented Aug 15, 2023

@blakef I found that the patches mentioned in the thread above have already been included in RN 0.72.4. But with RN 0.72.4 I still have this issue.

@WYA-Not-Found
Copy link

Is there anyone who can solve? I've been stuck there for a while :(

@daniel-toth-leeder
Copy link

I was able to fix the issue with this:
software-mansion/react-native-svg#2081 (comment)

@ShRoO0oM
Copy link

For those who still has this problem, you can temporary get rid of it by pointing out to those headers manually by adding this into your podfile:

installer.pods_project.targets.each do |target|
    # These React Naive targets have probelm on resolving some of their header files
    # These lines will point out to header files that were missing
    # This is a known issue on React Native 0.72
    # https://github.com/facebook/react-native/issues/38283
    
    if target.name == 'React-RCTSettings' || target.name == 'React-RCTBlob' || target.name == 'React-NativeModulesApple' || target.name == 'React-RCTVibration' || target.name == 'React-RCTNetwork' || target.name == 'React-RCTAnimation' || target.name == 'React-RCTImage' || target.name == 'React-RCTLinking' || target.name == 'React-Codegen' || target.name == 'React-CoreModules'
      target.build_configurations.each do |config|
        config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/"
      end
    end
    
    if target.name == "RNReanimated"
      target.build_configurations.each do |config|
        config.build_settings["CLANG_CXX_LANGUAGE_STANDARD"] = 'c++17'
        config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/"
      end
    end
    if target.name == 'React-RCTAppDelegate' || target.name == 'React-utils' || target.name == 'React-NativeModulesApple' || target.name == 'React-cxxreact'
      target.build_configurations.each do |config|
        config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon"
      end
    end

    if target.name == 'VisionCamera' || target.name == 'ReactCommon'
      target.build_configurations.each do |config|
        config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ "
        config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/"
      end
    end
  end

After this step you will also need to resolve RCTAppSetupUtils.h, for doing so add "${PODS_ROOT}/../../../../node_modules/react-native/Libraries/AppDelegate" in Header search paths in the build settings of main target of application, also change #import <React/RCTAppSetupUtils.h> to #import <RCTAppSetupUtils.h>

I know this is not an ideal solution but it will bypass current errors for bumping your ReactNative version to 0.72.4.

Note to developers: Seems like all the problems lies in ReactCommon so I guess fixing its podspec might fix the issue

@WYA-Not-Found
Copy link

WYA-Not-Found commented Aug 29, 2023

Hello I found the solution after working on this for so many long :)
It's like the issue with your react native version gap

So I did this :

  • I remove everything from my podfile from ios folder
  • create new react native application
    • copy everything from podfile(new project ios folder) and paste it to old project podfile
    • delete Pods folder from (old project) ios folder and then pod install

If you don't want to create new project to copy new podfile code, you can have it here
"(
use_modular_headers!
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!

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 'YourProject' do
config = use_native_modules!

flags = get_default_flags()

use_react_native!(
:path => config[:reactNativePath],

:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
:app_path => "#{Pod::Config.instance.installation_root}/.."

)

target 'YourProjectTests' do
inherit! :complete
end

post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end

)"

Hope It will solve your problem with "react/debug/react_native_assert.h' file not found" error in react native ios
GoodLuck Guys!

@zjkuang
Copy link

zjkuang commented Sep 11, 2023

After having been blocked many days, my issue was finally fixed by this: software-mansion/react-native-svg#2081 (comment)

@cetinahmetemre
Copy link

cetinahmetemre commented Feb 14, 2024

I disabled flipper and i tried this solution nrwl/nx#20115 (comment) but still same :( @slapbox

I am using use_framework! and

dynamic_frameworks = [
    'TensorFlowLiteSwift',
  ] # <- swift libraries names
    # Make all the other frameworks into static frameworks by overriding the static_framework? function to return true
  pre_install do |installer|
    installer.pod_targets.each do |pod|
      if !dynamic_frameworks.include?(pod.name)
        def pod.static_framework?;
          true
        end
        def pod.build_type;
          Pod::BuildType.static_library
        end
      end
    end
  end

@cetinahmetemre
Copy link

cetinahmetemre commented Feb 14, 2024

I solved the problem. Add these code blocks to Podflie

installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        if [
          "React-cxxreact",
          "React-utils",
          "React-NativeModulesApple",
          "React-jserrorhandler",
          "React-ImageManager",
          "React-graphics",
          "React-Fabric",
          "ReactCommon",
          "RNReanimated",
          "React-Codegen",
          "React-RCTNetwork",
          "React-RCTVibration",
          "React-RCTSettings",
          "React-RCTLinking",
          "React-RCTAnimation",
          "React-RCTImage",
          "React-RCTBlob",
          "React-CoreModules",
          "React-RCTAppDelegate"
        ].any? { |t| t == target.name }
          config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
          config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../node_modules/react-native/ReactCommon "
          config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ "
          config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../node_modules/react-native/ReactCommon/react/nativemodule/core/ "
        end
   end
end

@Nantris
Copy link

Nantris commented Feb 14, 2024

@cetinahmetemre thanks for looping back to share! Could you clarify whether the changes you posted are needed in addition to, or instead of, the previously mentioned fixes?

@SathishSaminathan
Copy link

Where to add the code @cetinahmetemre?

@aybarska
Copy link

aybarska commented Feb 21, 2024

use_frameworks! :linkage => :static

Just ran into the same issue when adding RN Firebase to project and adding use_frameworks! :linkage => :static. Can confirm downgrading RN to 0.72.4 resolves the issue. Also may be worth mentioning I'm using pnpm and started my project on 0.72.3 version.

On 0.72.6 the workaround from @enchorb fixed this specific issue for me, but lead to other import problems, finally I got stuck on error resolving FLT_MAX constant.

Thx for mentioning this was the one leading to FLT_MAX error. But downgrading to 0.72.4 didnt worked for me. I dont want to use the workaround too. Any other ideas?

Copy link

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 17, 2024
Copy link

github-actions bot commented Apr 3, 2024

This issue was closed because the author hasn't provided the requested feedback after 7 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
@abhayciitizen
Copy link

I am also getting the same error. below is my podfile

# Resolve react_native_pods.rb with node to allow for hoisting
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!
pod "react-native-branch", path: "../node_modules/react-native-branch"

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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 'GlicRX' do
  config = use_native_modules!
  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true
  pod 'GoogleUtilities', :modular_headers => true;
  pod 'Firebase', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => FlipperConfiguration.enabled,
    # NO_FLIPPER=1
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

@cipolleschi
Copy link
Contributor

@abhayciitizen thanks for posting the podfile.

Can you:

  1. apply these changes:
+  use_frameworks! :linkage => :static
+  $RNFirebaseAsStaticFramework = true
target 'GlicRX' do
config = use_native_modules!
-  use_frameworks! :linkage => :static
-  $RNFirebaseAsStaticFramework = true
-  pod 'GoogleUtilities', :modular_headers => true;
-  pod 'Firebase', :modular_headers => true
-  pod 'FirebaseCoreInternal', :modular_headers => true
-  pod 'FirebaseCore', :modular_headers => true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
-    # :flipper_configuration => FlipperConfiguration.enabled,
+ :flipper_configuration => FlipperConfiguration.disabled,
    # NO_FLIPPER=1
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
+  pod 'GoogleUtilities', :modular_headers => true;
+  pod 'Firebase', :modular_headers => true
+  pod 'FirebaseCoreInternal', :modular_headers => true
+  pod 'FirebaseCore', :modular_headers => true
  1. Make sure to open the .xcworkspace file and not the .xcodeproj file.

The rationale of the changes in 1 is:

  • use_frameworks! :linkage => :static and $RNFirebaseAsStaticFramework = true are project-wide configuration, not target-specific ones. Thus, they should be set outside of the target block
  • Flipper is not compatible with use_frameworks, so we need to disable it, or it won't build
  • We have some code that detects whether you are using frameworks or not and sets an environment variable, but this code runs in the use_react_native! function. If you add some pods BEFORE that function, those pods might end up misconfigured, that's why the suggestion is to run use_react_native! first, and then to add other dependencies.

Let me know if this fixes.

@LeonelRiera
Copy link

@abhayciitizen thanks for posting the podfile.

Can you:

  1. apply these changes:
+  use_frameworks! :linkage => :static
+  $RNFirebaseAsStaticFramework = true
target 'GlicRX' do
config = use_native_modules!
-  use_frameworks! :linkage => :static
-  $RNFirebaseAsStaticFramework = true
-  pod 'GoogleUtilities', :modular_headers => true;
-  pod 'Firebase', :modular_headers => true
-  pod 'FirebaseCoreInternal', :modular_headers => true
-  pod 'FirebaseCore', :modular_headers => true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
-    # :flipper_configuration => FlipperConfiguration.enabled,
+ :flipper_configuration => FlipperConfiguration.disabled,
    # NO_FLIPPER=1
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
+  pod 'GoogleUtilities', :modular_headers => true;
+  pod 'Firebase', :modular_headers => true
+  pod 'FirebaseCoreInternal', :modular_headers => true
+  pod 'FirebaseCore', :modular_headers => true
  1. Make sure to open the .xcworkspace file and not the .xcodeproj file.

The rationale of the changes in 1 is:

  • use_frameworks! :linkage => :static and $RNFirebaseAsStaticFramework = true are project-wide configuration, not target-specific ones. Thus, they should be set outside of the target block
  • Flipper is not compatible with use_frameworks, so we need to disable it, or it won't build
  • We have some code that detects whether you are using frameworks or not and sets an environment variable, but this code runs in the use_react_native! function. If you add some pods BEFORE that function, those pods might end up misconfigured, that's why the suggestion is to run use_react_native! first, and then to add other dependencies.

Let me know if this fixes.

This doesn't work. I'm upgrading from 0.71.17 to 0.73.6

Also, rnfirebase.io states:
add this line inside your targets (right before the use_react_native line in current react-native releases that calls the react native Podfile function to get the native modules config):
use_frameworks! :linkage => :static

My podfile after your @cipolleschi changes:

# Resolve react_native_pods.rb with node to allow for hoisting
def node_require(script)
  # Resolve script with node to allow for hoisting
  require Pod::Executable.execute_command('node', ['-p',
    "require.resolve(
      '#{script}',
      {paths: [process.argv[1]]},
    )", __dir__]).strip
end

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

# Permissions for react-native-permissions STARTS
setup_permissions([
  # 'AppTrackingTransparency',
  # 'BluetoothPeripheral',
  # 'Calendars',
  'Camera',
  # 'Contacts',
  # 'FaceID',
  # 'LocationAccuracy',
  # 'LocationAlways',
  # 'LocationWhenInUse',
  # 'MediaLibrary',
  # 'Microphone',
  # 'Motion',
  'Notifications',
  'PhotoLibrary',
  # 'PhotoLibraryAddOnly',
  # 'Reminders',
  # 'Siri',
  # 'SpeechRecognition',
  # 'StoreKit',
])
# Permissions for react-native-permissions ENDS

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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 'AwesomeProject' do
  config = use_native_modules!

  # Firebase config for firebase versions over 15
  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    :flipper_configuration => FlipperConfiguration.disabled,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

@abhayciitizen
Copy link

abhayciitizen commented Apr 13, 2024

thanks for your reply @LeonelRiera. Below is my updated podfile and it's working fine. I am working on 0.73.6 react native version.

# Resolve react_native_pods.rb with node to allow for hoisting
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!
pod "react-native-branch", path: "../node_modules/react-native-branch"
pod 'Firebase', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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 'GlicRX' do
  config = use_native_modules!
  # use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

@nikhil2882
Copy link

Hello I found the solution after working on this for so many long :) It's like the issue with your react native version gap

So I did this :

  • I remove everything from my podfile from ios folder

  • create new react native application

    • copy everything from podfile(new project ios folder) and paste it to old project podfile
    • delete Pods folder from (old project) ios folder and then pod install

If you don't want to create new project to copy new podfile code, you can have it here "( use_modular_headers! 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!

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 'YourProject' do config = use_native_modules!

flags = get_default_flags()

use_react_native!( :path => config[:reactNativePath],

:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
:app_path => "#{Pod::Config.instance.installation_root}/.."

)

target 'YourProjectTests' do inherit! :complete end

post_install do |installer| react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) end end

)"

Hope It will solve your problem with "react/debug/react_native_assert.h' file not found" error in react native ios GoodLuck Guys!

this worked for me

@ManzurSaiyed007
Copy link

ManzurSaiyed007 commented Jul 3, 2024

@ManzurSaiyed007 I'm checking the RNMapBox Doc and the problem seems to be related to them, not the React-Native itself. I would open a new discussion on RNMapBox github, asking how to integrate it with React-Native new arch.

Yeah i tried using herems disable option that wont worked.

Great!! Thanks will helpfull and will be relief for others like me.

@appdeveloperfurqan
Copy link

Thanks for your reply @cipolleschi. As long as it doesn't matter how far I diverge from that repo to reproduce it, I'll try to find the time.

At the moment this suggestion resolved our error: nrwl/nx#20115 (comment)

Thanks for your reply @cipolleschi. As long as it doesn't matter how far I diverge from that repo to reproduce it, I'll try to find the time.

At the moment this suggestion resolved our error: nrwl/nx#20115 (comment)

which suggestion?

@appdeveloperfurqan
Copy link

thanks for your reply @LeonelRiera. Below is my updated podfile and it's working fine. I am working on 0.73.6 react native version.

# Resolve react_native_pods.rb with node to allow for hoisting
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!
pod "react-native-branch", path: "../node_modules/react-native-branch"
pod 'Firebase', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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 'GlicRX' do
  config = use_native_modules!
  # use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

I'm also working on same version of rn and facing same issue
can you please guide me more about it how to solve

@appdeveloperfurqan
Copy link

I'm also facing same issue when i integrate firebase in my ios project

this is my podfile

Resolve react_native_pods.rb with node to allow for hoisting

def node_require(script)

Resolve script with node to allow for hoisting

require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", dir]).strip
end

Use it to require both react-native's and this package's scripts:

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

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

setup_permissions([

'AppTrackingTransparency',

'Bluetooth',

'Calendars',

'CalendarsWriteOnly',

'Camera',

'Contacts',

'FaceID',

'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse',
'MediaLibrary',

'Microphone',

'Motion',

'Notifications',

'PhotoLibrary',

'PhotoLibraryAddOnly',

'Reminders',

'Siri',

'SpeechRecognition',

'StoreKit',

])

If you are using a react-native-flipper your iOS build will fail when NO_FLIPPER=1 is set.

because react-native-flipper depends on (FlipperKit,...) that will be excluded

To fix this you can also exclude react-native-flipper using a react-native.config.js

```js

module.exports = {

dependencies: {

...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),

```

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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

rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path

target 'ROLLING' do
config = use_native_modules!
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true

use_react_native!(
:path => config[:reactNativePath],

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."

)

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

post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
end
end

@abhayciitizen
Copy link

thanks for your reply @LeonelRiera. Below is my updated podfile and it's working fine. I am working on 0.73.6 react native version.

# Resolve react_native_pods.rb with node to allow for hoisting
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!
pod "react-native-branch", path: "../node_modules/react-native-branch"
pod 'Firebase', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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 'GlicRX' do
  config = use_native_modules!
  # use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

I'm also working on same version of rn and facing same issue can you please guide me more about it how to solve

What error message you are getting ?

@appdeveloperfurqan
Copy link

appdeveloperfurqan commented Jul 23, 2024

thanks for your reply @LeonelRiera. Below is my updated podfile and it's working fine. I am working on 0.73.6 react native version.

# Resolve react_native_pods.rb with node to allow for hoisting
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!
pod "react-native-branch", path: "../node_modules/react-native-branch"
pod 'Firebase', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

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 'GlicRX' do
  config = use_native_modules!
  # use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

  use_react_native!(
    :path => config[:reactNativePath],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  post_install do |installer|
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
  end
end

I'm also working on same version of rn and facing same issue can you please guide me more about it how to solve

What error message you are getting ?

Uploading Screenshot 2024-07-23 at 3.16.25 PM.png…

this error I'm getting when I did firebase integration inmy ios project react native
'react/debug/react_native_assert.h' file not found

@Jahanzeb009
Copy link

Jahanzeb009 commented Aug 9, 2024

Getting this on RN 0.72.5 and XCode 15

Adding the following to post_install do |installer| fixed it for now:

    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        if ["React-cxxreact", "React-utils", "React-NativeModulesApple"].any? { |t| t == target.name }
          config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
          config.build_settings["HEADER_SEARCH_PATHS"] << "${PODS_ROOT}/../../node_modules/react-native/ReactCommon"
        end
      end
    end

Also works on RN 0.74.5 when a static framework is enabled and react-native-blob-util and @react-native-firebase/**** libraries are installed.

@hadanghuy
Copy link

+1

LE: Đã sửa bằng cách sử dụng software-mansion/react-native-svg#2081 (bình luận) Đảm bảo bạn vượt qua các thư viện phàn nàn

if ["React-cxxreact", "React-NativeModulesApple", "RNGestureHandler", "RNScreens", "React-utils", "React-runtimescheduler"].any? { |t| t == target.name }
	append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon")
end

Can you help me with this, I still have this error after doing as you said.

@arnoldcamas1
Copy link

arnoldcamas1 commented Aug 27, 2024

im getting the same error also when I use USE_FRAMEWORK=static pod install

(Btw is this a current issue when using this config?)

I already tried the workaround fix, add each dep. to fix the header search path
based on this comments but still getting a few more errors

Im running

  • react-native 0.73.7
  • react-native-firebase v20 latest
  • xcode 15 most latest
  • pod version 1.14.3
  • flipper disabled too
  • already tried clearing podfile.lock, cleared derived data,etc... before doing the pod install

added $RNFirebaseAsStaticFramework = true also as global, followed also this

@Nantris
Copy link

Nantris commented Aug 27, 2024

I'm pretty sure we never found a solution on this and we're indefinitely blocked for getting past 0.72.x. It was to this bug, or another related bug. We're definitely blocked though...

@cipolleschi
Copy link
Contributor

cipolleschi commented Aug 27, 2024

@arnoldcamas1 @Nantris I'm sorry to hear that you are stuck, especially stuck on 0.72 which is now out of support.

Can you try and create a reproducer using this template or any other way to repro it?

Honestly, we recently spin up an app using firebase wit 0.75 to investigate another issue and everything was working fine.

I really cannot help you if I can't reproduce it locally.

@joshnissenbaum

This comment was marked as duplicate.

@kosick
Copy link

kosick commented Sep 8, 2024

  • Xcode 15.4
  • React Native 0.72.5

Originally, my code was working fine on my previous machine. However, when I tried to set up the same project on a new environment, I encountered the error: 'react/debug/react_native_assert.h' file not found. In my case, I was experimenting with pnpm on the new machine, but once I switched to yarn (as I used on my previous computer) to install the dependencies, the problem disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests