-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[BUG] - Can't Build project on iOS 15, throws "RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE" #46144
Comments
|
|
same here |
I could pass this issue by adding a flag to the Podfile
Apparently this issue is related to Debugger and Flipper (even though I am not using it) **
* RCT_REMOTE_PROFILE: RCT_PROFILE + RCT_ENABLE_INSPECTOR + enable the
* connectivity functionality to control the profiler remotely, such as via Chrome DevTools or
* Flipper.
*/
#ifndef RCT_REMOTE_PROFILE
#define RCT_REMOTE_PROFILE RCT_DEV
#endif
/**
* Sanity check that these compile-time flags are compatible. RCT_REMOTE_PROFILE requires RCT_PROFILE and
* RCT_ENABLE_INSPECTOR
*/
#if RCT_REMOTE_PROFILE // this block will be jumped entirely
#if !RCT_PROFILE
#error "RCT_PROFILE needs to be set to fulfill RCT_REMOTE_PROFILE"
#endif // RCT_PROFILE
#if !RCT_ENABLE_INSPECTOR
#error "RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE"
#endif // RCT_ENABLE_INSPECTOR
#endif // RCT_REMOTE_PROFILE But the issue now becomes a missing file ( #if RCT_ENABLE_INSPECTOR
#import "RCTInspectorDevServerHelper.h"
#endif
#import "RCTDevLoadingViewProtocol.h" Some places says to use I tried removing both These libraries work
These throws an issue asking to use
I don't know what I could be doing wrong but it seems that some config breaks the Swift link and others break the React Native linking... |
Same here |
Hey @gmantuanrosa! thanks for the issue.
Is very outdated and probably wrong. That's not the right way to integrate a project anymore. Your podfile, after the process, should look like this. Let me know if you make progress there. |
Hey @cipolleschi Having For React Native alone I had to move some of the configuration to be globally applied but the My Podfile currently looks like: # Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p', 'require("path").resolve(__dirname, "../node_modules/react-native/scripts/react_native_pods.rb")']).strip
workspace 'project'
platform :ios, '15.0'
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
# Override Firebase SDK Version
$FirebaseSDKVersion = '10.24.0'
def sharedPods
pod 'Parse'
pod 'Parse/FacebookUtils'
pod 'AssetsPickerViewController'
pod 'FBSDKCoreKit/Swift'
pod 'FBSDKLoginKit/Swift'
pod 'FBSDKShareKit/Swift'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Crashlytics'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'SwiftyJSON'
pod "CleverTap-iOS-SDK"
end
target 'project-client' do
sharedPods
pod 'AppsFlyerFramework'
pod 'ReachabilitySwift'
pod 'SSZipArchive'
pod 'Stripe'
end
target 'project-dash' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
sharedPods
pod 'AppsFlyerFramework'
pod 'ReachabilitySwift'
pod 'SSZipArchive'
pod 'Stripe'
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNScreens') || pod.name.eql?('react-native-video')
def pod.build_type
Pod::BuildType.static_library
end
end
end
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
)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_REMOTE_PROFILE=0'
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end
end I'm also running |
If the issue was with the Expo integration, I suggest also to open it on the Expo repository (https://github.com/expo/expo). They are pretty responsive and they might help out! |
+1 package.json: Podfile:
npx react-native doctor ⠸ Running diagnostics...* daemon not running; starting now at tcp:5037
Android iOS |
Description
My React-Native project is a brownfield app running on version 0.73.9 and expo version 50. I was setting iOS 13.0 as minimum version and we bumped to 15.0 to use some recent SwiftUI API. Now when I try to build the app it always throws the same issue:
"RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE"
Sometimes when I change the value of
RCT_ENABLE_INSPECTOR
on Podfile it saysRCTInspectorDevServerHelper.h
not found orRCTDevLoadingViewProtocol.h
not found onRCTBridge
I've read over the internet (can't remember where) that I had to add some
GCC_PREPROCESSOR_DEFINITIONS
, so my Podfile contains this bit:Removing these values or changing between 0 and 1 always throws one or the other issue.
As mentioned before, the app was working fine on iOS version 12.4 and 13.0 (had to bump the version in order for Expo to work) and in all cases I am using Xcode 15
Steps to reproduce
React Native Version
0.73.9
Affected Platforms
Runtime - iOS, Build - MacOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
no reproducible repository
Screenshots and Videos
The text was updated successfully, but these errors were encountered: