Skip to content

Can't Build project on iOS 15, throws "RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE" #8485

@gaurav-vij

Description

@gaurav-vij

We facing a strange issue in latest react-native 0.79 and firebase.

a. if we remove use_frameworks! :linkage => :static, we get FirebaseAuth not found error.
b. If we add "use_frameworks! :linkage => :static", we get "RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE"
c. if we enable that in Podfile, we get "'RCTDevLoadingViewProtocol.h' file not found".

Please share the solution. seems use_frameworks is not working. if we remove that, Firebase is not working.

Our POD File is provided below.

Activity

gaurav-vij

gaurav-vij commented on Apr 23, 2025

@gaurav-vij
Author
AsurNikul

AsurNikul commented on Apr 27, 2025

@AsurNikul

same issue here. Please solve this asap

AsurNikul

AsurNikul commented on Apr 27, 2025

@AsurNikul

My pod file

def node_require(script)

Resolve script with node to allow for hoisting

require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", dir]).strip
end

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true

setup_permissions([
'Camera', 'PhotoLibrary', 'PhotoLibraryAddOnly'
])

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

pod 'react-native-maps-generated', :path => '../node_modules/react-native-maps/react-native-maps-generated.podspec'
pod 'react-native-maps', :path => '../node_modules/react-native-maps'

target 'TravelTeacherPartner' 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}/..",
:hermes_enabled => true # ✅ Enable Hermes
)

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

MichaelVerdon

MichaelVerdon commented on Apr 28, 2025

@MichaelVerdon
Collaborator

Hey there, I would encourage you to check out this demo that shows a working example of a React Native Firebase project using React Native 0.79: https://github.com/mikehardy/rnfbdemo

AsurNikul

AsurNikul commented on Apr 28, 2025

@AsurNikul

@MichaelVerdon Can you please try with older version

"react-native": "0.78.0",

"@react-native-firebase/app": "^21.12.0",
"@react-native-firebase/messaging": "^21.12.0",

mikehardy

mikehardy commented on Apr 28, 2025

@mikehardy
Collaborator

@AsurNikul that won't be fruitful, two reasons: use current, because that's the future, right? And we demonstrate it.

However, and most importantly, everything ran fine with the older versions too, you can see as I note them in the commit log of the build demonstrator which works

https://github.com/mikehardy/rnfbdemo/commits/main/make-demo.sh

Asking us to try things is not how to resolve this. We ask you to try something we know works to prove to you it works. I don't see evidence you've done any of that work. But if you try what we pointed you to - you'll see that it works then. At which point your path to resolving your project-specific problem is to compare the thing we pointed you to that works with your project, and eliminating the difference

AsurNikul

AsurNikul commented on Apr 30, 2025

@AsurNikul

@mikehardy Thank you for the clarification and for pointing me to the working example. I really appreciate the guidance

mikehardy

mikehardy commented on Apr 30, 2025

@mikehardy
Collaborator

I'm going to close this as there is no reproduction - however we provide a reproduction that works

Additionally, the issue template wasn't used so there is inadequate information to troubleshoot - as a general rule: if you want help in an open source repo you should never delete the template for the issue instead of filling it out, it won't lead to getting help in most cases

If a minimal viable reproduction can show there is a build problem open a fresh issue with version information etc and that reproduction and we'll investigate it + get it fixed

Resource-4

Resource-4 commented on May 12, 2025

@Resource-4

Resolve react_native_pods.rb with node to allow for hoisting

def node_require(script)

Resolve script with node to allow for hoisting

require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", dir]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

platform :ios, min_ios_version_supported
prepare_react_native_project!

use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true

rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
pod 'RNFS', :path => '../node_modules/react-native-fs'

setup_permissions([
'Camera',

'MediaLibrary',

'Notifications',

'PhotoLibrary',
])
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 'GFTL' 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}/..",
:hermes_enabled => true # ✅ Enable Hermes
)

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

i am getting the same error in react-native 0.79.1 version, can anyone help me to solve this?

mikehardy

mikehardy commented on May 12, 2025

@mikehardy
Collaborator

@Resource-4 if there is some modification you would like to see in the script please post a PR or be specific about the actual modification. Otherwise I'm not sure exactly what your comment has, as a purpose - I can't really decipher it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution: needs-reproThis issue could not be reproduced or needs a repro provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mikehardy@gaurav-vij@Resource-4@AsurNikul@MichaelVerdon

        Issue actions

          Can't Build project on iOS 15, throws "RCT_ENABLE_INSPECTOR needs to be set to fulfill RCT_REMOTE_PROFILE" · Issue #8485 · invertase/react-native-firebase