- Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
What happened?
When using static frameworks in the Podfile:
Use static frameworks
use_frameworks! :linkage => :static
Build fail with an error in RNNButtonView (RCTHost.h file not found) - see the image from Xcode below:
Static linking is required for some packages, e.g. react-native-firebase.
This seems to have something to do with the builds that support new architecture. Build 8.0.0 with new architecture disabled builds fine.
What was the expected behaviour?
The build completes without issue.
Was it tested on latest react-native-navigation?
- I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!
Try using a Podfile like the one below, on 8.1.0 RC1, to replicate
$RNFirebaseAsStaticFramework = true # 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, '15.1' prepare_react_native_project! # Use static frameworks use_frameworks! :linkage => :static config = use_native_modules! 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 ENV['RCT_NEW_ARCH_ENABLED'] = '1' use_react_native!( :path => config[:reactNativePath], # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/..", :hermes_enabled => true ) pod 'Firebase', :modular_headers => true pod 'FirebaseCore', :modular_headers => true pod 'FirebaseCoreInternal', :modular_headers => true pod 'GoogleUtilities', :modular_headers => true 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, # :ccache_enabled => true ) end end In what environment did this happen?
React Native Navigation version: 8.1.0 RC1
React Native version: 0.76.9
Has Fabric (React Native's new rendering system) enabled: (yes/no) yes
Node version: 22
Device model: iPhone 11
iOS version: 18.1
sashansk3, manuhook, lichstam, peteAhn, LorienHW and 9 more
