Open Stefanpgr opened 11 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
@Stefanpgr Any updates on this? I encounter the same issue.
IPHONEOS_DEPLOYMENT_TARGET @gobzila Honestly do not know how I fixed it. However I took these steps
pod install --repo-update
You can use this as reference to fix yours and make sure you followed the upgrade guidelines word for word here
` require Pod::Executable.execute_command('node', ['-p', 'require.resolve( "react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]}, )', dir]).strip
require_relative '../node_modules/react-native-permissions/scripts/setup'
platform :ios, min_ios_version_supported prepare_react_native_project!
flipper_config = FlipperConfiguration.disabled
use_frameworks! :linkage => :static $RNFirebaseAsStaticFramework = true
target 'myApp' 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}/.." )
permissions_path = '../node_modules/react-native-permissions/ios' setup_permissions([ 'Camera', 'Contacts', 'FaceID', 'LocationAccuracy', 'LocationAlways', 'LocationWhenInUse', 'Notifications', 'PhotoLibrary', 'PhotoLibraryAddOnly', ]) pod 'OpenSSL-Universal', :modular_headers => true
pod 'react-native-geolocation-service', path: '../node_modules/react-native-geolocation-service'
target 'myAppTests' do inherit! :complete
end
pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
def pod.build_type;
Pod::BuildType.static_library
end
end
end
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`
It was same in here, but for me the following changes in the Podfile
helped:
pod 'podname', path: 'xxxpath'
declarations from the beginning of the Podfile to the end of target declarationuse_frameworks! :linkage => :static
declaration before the targetI also had the RCTDevSettings.h' file not found
error (doing the 0.73 upgrade from 0.72). It took me a ridiculous amount of time to realize what was wrong in my podfile 🤦♀️
-> I was doing the post_install
loop outside the target!
So my advices here:
target 'App' do
(before its end
):
target 'RnDiffApp' do
[...]
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( ... )
[...]
end
end
Thanks for all the suggestions above - the key line that helped us to resolve the 'React/RCTDevSettings.h' file not found
build error was to ensure that the following config
statement was within our target
block.
target 'TheApp' do
config = use_native_modules!
...
As recommended above, following the reference Upgrade Helper Podfile
helped us to track this down.
With previous versions of RN having this config
statement outside of the target block did not seem to be a problem.
I was facing the same issue 'React/RCTDevSettings.h' file not found
. My podfile has 2 targets (production and staging). I made it work moving config = use_native_modules!
and post_install
inside one target and removing the other one. The issue I am having now is the only way I made it work was defining the post_install inside the target but Podfile should have only one post_install hook defined so I am stuck for the second target.
Anyone had a similar issue?
New Version
0.72.4
Old Version
0.70.8
Build Target(s)
ios simulator
Output of
react-native info
System: OS: macOS 13.3.1 CPU: (8) arm64 Apple M1 Pro Memory: 102.48 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.17.1 path: ~/.nvm/versions/node/v18.17.1/bin/node Yarn: version: 1.22.17 path: /opt/homebrew/bin/yarn npm: version: 9.6.7 path: ~/.nvm/versions/node/v18.17.1/bin/npm Watchman: version: 2023.07.24.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms:
Issue and Reproduction Steps
Trying to build for ios simulator and I get this error
/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:22:9 'React/RCTDevSettings.h' file not found
Pod File `# require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-permissions/scripts/setup'
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
$RNFirebaseAsStaticFramework = true config = use_native_modules!
platform :ios, min_ios_version_supported prepare_react_native_project!
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
If you are using a
react-native-flipper
your iOS build will fail whenNO_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 areact-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
use_frameworks! :linkage => :static
target 'myApp' do
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.
) pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' permissions_path = '../node_modules/react-native-permissions/ios' setup_permissions([
'AppTrackingTransparency',
'BluetoothPeripheral',
'Calendars',
'Camera', 'Contacts', 'FaceID', 'LocationAccuracy', 'LocationAlways', 'LocationWhenInUse',
'MediaLibrary',
'Microphone',
'Motion',
'Notifications', 'PhotoLibrary', 'PhotoLibraryAddOnly',
'Reminders',
'SpeechRecognition',
'StoreKit'
]) pod 'OpenSSL-Universal', :modular_headers => true
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'react-native-geolocation-service', path: '../node_modules/react-native-geolocation-service'
target 'myAppTests' do inherit! :complete
Pods for testing
end
pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
post_install do |installer|
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
end end `