-
Notifications
You must be signed in to change notification settings - Fork 24.1k
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
RCTAppDelegate.h file not found #36611
Comments
I found the issue, it was connected with an m1 chip, on intel, and on a real device it works normally |
having the same issue here, did you figure out how to fix with an M1 or just worked with Intel? |
yea I'm not sure what was the real problem, but deleting podfile.lock, pods, build and removing cache helped |
thanks for answering! unfortunately here no way to make it work, tried all that and still with problems 😭 |
same problem, hope to find help... |
I give a try again following these steps again and using Xcode that build was still failing, but when trying to run directly the |
This solution on stackoverflow helped me solve this issue. https://stackoverflow.com/questions/71933392/react-native-ios-undefined-symbols-for-architecture-x86-64 |
I was getting this error. I had created a new target, and that target wasn't in my
within the larger target. |
same issue 🥲 |
Same issue on M1 |
I'm getting this issue as well |
I got it fixed by following a console warning when building with scratch configuration on my Podfile, Hope this works for you too |
I was able to fixed this issue with by making sure use_frameworks! :linkage => :static was above use_react-native
@callmesilva Is this use_modular_headers safe to use? Could it be away to get around the fact that use_frameworks is not supported on the new architecture? |
I tried the |
Facing the same issue, Any Workaround is there yet? |
same issue 🥲 Update : Found this for resolve the issue.
But facing another issue in "rn-fetch-blob": "^0.12.0", ios/Pods/Headers/Public/React-Core/React/RCTBridgeModule.h:12:9 'React/RCTJSThread.h' file not found ![]() issues occurred in the following files
Is there any additional configurations that need to do or did I do any incorrect configuration. Update : Found this for resolve the issue npm install Works for me. |
I am still getting the same error can anyone please suggest? my react-native version is 0.71.7 |
same issue! |
Me too, same issue! ![]() But still not found. I'm using https://github.com/invertase/react-native-firebase
and my RN version is 0.71.8, i'm using M1 chip |
@keshav-raj @Prathameshlabde @riyan10dec Please, try the following steps:
I hope these steps may help solving your issues. |
Hi @cipolleschi , after I try your steps, when I build on XCode, I'm getting this error: This is my Podfile, in case you need to see source 'https://cdn.cocoapods.org/'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
$RNFirebaseAsStaticFramework = true
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 => linkage.to_sym
end
target 'Influence' do
config = use_native_modules!
# permissions_path = '../node_modules/react-native-permissions/ios'
# pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency"
# pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary"
# pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
# pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
# Flags change depending on the env values.
flags = get_default_flags()
use_frameworks! :linkage => :static
# $RNFirebaseAsStaticFramework = true
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
# :hermes_enabled => false,
# :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,
)
target 'InfluenceTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
# # Fix Xcode 14 warnings like:
# # warning: Run script build phase '[CP] Copy XCFrameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ATargetNameHere' from project 'YourProjectName')
# # Ref.: https://github.com/CocoaPods/CocoaPods/issues/11444
# post_integrate do |installer|
# main_project = installer.aggregate_targets[0].user_project
# pods_project = installer.pods_project
# targets = main_project.targets + pods_project.targets
# targets.each do |target|
# run_script_build_phases = target.build_phases.filter { |phase| phase.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) }
# cocoapods_run_script_build_phases = run_script_build_phases.filter { |phase| phase.name.start_with?("[CP]") }
# cocoapods_run_script_build_phases.each do |run_script|
# next unless (run_script.input_paths || []).empty? && (run_script.output_paths || []).empty?
# run_script.always_out_of_date = "1"
# end
# end
# main_project.save
# pods_project.save
# end
end Update 2I found that the error above because of the
I found the log on Hope my solution help someone |
Hi @riyan10dec, just to understand, the error:
Is local to your configuration, right? I have never seen the |
@cipolleschi My solution is to revert |
For those who still have this issue, first make sure you opened "projectName".xcworkspace and not "projectName".xcodeproj in XCode. |
If after trying all of the above and you are able to run on a real device, but not the simulator; try checking that the project, targets and pods build settings Also you might have this in your Podfile if you are upgrading from an older react native project. This sets it back to arm64 after each pod install. Remove this as well.
|
If you are using React Native Config, please check the Podfile. You must define the target inside the abstract_target
|
#36611 (comment) save my time |
Thank you so much for this... It worked perfectly |
Currently, I'm facing this too, and I have compared a new project vs. https://github.com/mikehardy/rnfbdemo/tree/main vs. my project. I'm noticing something that may cause the issue, but not sure what this means, when checking the section "General" -> "Frameworks, Libraries, and Embedded Content", normally, it uses I was wondering, what do you have there and what's the difference, how does this was created? I've tried using RN 0.72.3 and 0.72.4, not sure about previous releases |
Hi @jackfiallos! |
Thanks for clarifying @cipolleschi, that's what I thought .. In the end, I could manage the error, tried different things and finally, it's working again, I believe my error was in the Podfile because it wasn't updated correctly. Also, I had a mix of different setups from other libraries that weren't updated so had configs from different versions. I think one of the misconfigurations was causing the issue with the project compilation. I'm not sure what the issue was, but I'll suggest anybody having this problem, to check all your custom libraries and see if the configuration still applies to your current RN version. Something to add is, the most important thing to verify is your Gemfile.lock file that effectively has: DEPENDENCIES
cocoapods (~> 1.12) and before testing, remove from your root project, execute the |
same issue. upgrading from 0.66.5 to 0.72.4 |
@feedthedevil it is likely that it depends on your Podfile or on some 3rd party dependency. |
@cipolleschi thank you for reply. I was upgrading by changing files finding differences via upgrade-helper and somehow in my AppDelegate.h i was importing RCTAppDelegate.h as React/RCTAppDelegate.h ;) Leaving just RCTAppDelegate.h helped to resolve the issue) |
I was able to fix this by deleting ios/build folder and reinstalling the dependencies. But I am not sure what caused this, though 😅 |
I am experiencing the same issue, RN 0.70.6 --> 0.72.5
|
I am experiencing same issues after upgrading to rn 0.72.5 $RNFirebaseAsStaticFramework = true
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.0'
deployment_target = '13.0'
require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
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 'prmassist' do
use_expo_modules!
config = use_native_modules!
flags = get_default_flags()
use_frameworks! :linkage => :static
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'
pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-async-storage/async-storage'
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'RCT-Folly', :podspec => '../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec'
pod 'Permission-AppTrackingTransparency', :path => "#{permissions_path}/AppTrackingTransparency"
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
installer.pods_project.targets.each do |target|
if (target.name&.eql?('FBReactNativeSpec'))
target.build_phases.each do |build_phase|
if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
target.build_phases.move(build_phase, 0)
end
end
end
end
end
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
end |
Not an expo app, just have some expo packages installed. should I refer to #38283 for a fix? |
Yes, the root cause is probably the same: one dependency that is not perfectly setup to work with use_frameworks! which is required by Firebase (or by another dependency). |
hi is there any update on a fix for this? |
It will take much more than a day to fix this. Several libraries would have to release a new version. Asking ETAs on update will not help us moving faster. |
This solution solved this AppDelegate issue but caused another issue with
|
Sorry, but this message contains no specific error, so I can't help here. |
In my case, this is works. But I don't have idea why it should be added in Podfile. Before updating Xcode version, there was no script for the new target |
I resolved it by opening the |
I'm getting the same error -- and I have a brand-new project with only TWO libraries: firebase and Vision Camera. Latest versions all around; this is a test app I've spent a while putting together. React Native 0.73.4 |
In my case the same error was caused by cd ios
npx po-install and my problem was solved. |
@DeveloperMCD please make sure of:
|
In my case, after testing all the solutions of this thread, it was uninstalling Xcode and reinstall it. I lost one day of work with this issue. |
I Found Solution This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode) Solution:
Note: Make sure your Xcode app path is correct. Xcode: /Applications/Xcode.app/Contents/Developer U can use command again npm install in ur project & Again pod install Refer link StackOverFlow : https://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error |
I found my solution here: |
Getting this issue error Command failed with exit code 1. |
@aneesh-dasari that's not a valuable error message. It only tells us which command failed, but not why. |
Thanks. Work in my case |
Yes had this left and that was causing it for me. Thank you! |
Description
I have updated my RN app from 0.70.6 to 0.71.4. The
pod install
working well. But when I'm trying to run the app it gave me the error sayingRCTAppDelegate.h file not found
.But I hadn't problems with android running
React Native Version
0.71.4
Output of
npx react-native info
System:
OS: macOS 13.2.1
CPU: (10) arm64 Apple M1 Max
Memory: 732.19 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.1 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.5.0 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
just need to run
run ios
Snack, code example, screenshot, or link to a repository
Sorry it's a private repo, and I can't share the code with you
The text was updated successfully, but these errors were encountered: