Open nileshzype opened 11 months ago
We are facing similar issues. It works on Android and Web but on IOS it gives errors. @nileshzype @xiongemi Any solution to fix this issue?
Yes, I am facing the same issue. Any solutions yet?
@jaysoo & @xiongemi Can you guys help on this.
We are stuck because of this issue and cannot update NX and React Native in our production apps. @jaysoo @xiongemi Can you please help me?
it seems fine for me when i try to 17.2.6
i change the pod file to:
# 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!
# 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 => :static
end
target 'Mobile' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# 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 'MobileTests' 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
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
then run the nx pod-install mobile
and nx start mobile
and able to build the app in XCode.
what does your podfile look like? do you have a repo?
@xiongemi Tried with the same Pod File but still getting the same error node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp:10:10: fatal error: 'react/debug/react_native_assert.h' file not found
Can you help further?
@malikkhoja what version of react native do you have? i think it is a react native issue: https://github.com/facebook/react-native/issues/38283 https://github.com/facebook/react-native/issues/38140#issuecomment-1614755738
from the thread, are you using react-native-image-picker or pnpm?
@xiongemi it works on RN 0.72.4 but it doesn't on RN 0.72.6 with useFrameworks.
Also, we are not using react-native-image-picker or pnpm.
This issue has been automatically marked as stale because it hasn't had any activity for 6 months. Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore. If at this point, this is still an issue, please respond with updated information. It will be closed in 21 days if no further activity occurs. Thanks for being a part of the Nx community! 🙏
I'm seeing this problem as well trying to update react-native-firebase. @xiongemi was there ever any concrete resolution to this issue?
Current Behavior
Trying to run, but getting below error
This happens also when I create a clean new react native app using @nrwl/react-native generator and I add to the Podfile:
Expected Behavior
I expect the build to succeed with use_frameworks. In my project use_frameworks is required to run react-native-firebase.
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response