You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering a build failure on iOS when trying to compile my React Native project with @react-native-firebase modules installed. The error points to a duplicate copy command for the file ScopedShadowTreeRevisionLock.h, specifically from targets React-Fabric and React-rendererconsistency.
Multiple commands produce '/Users/.../Library/Developer/Xcode/DerivedData/driverapp-bdzjbubssrkxnodvkzzofvxausck/Build/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@react-native-community+cli@1_crwjwnw4p4u62bhybwdnt3idjq/node_modules/react-native/ReactCommon/react/renderer/consistency/ScopedShadowTreeRevisionLock.h'
Target 'React-Fabric' (project 'Pods') has copy command from '/Users/.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@react-native-community+cli@1_crwjwnw4p4u62bhybwdnt3idjq/node_modules/react-native/ReactCommon/react/renderer/consistency/ScopedShadowTreeRevisionLock.h' to '/Users/aleksandrbogdanov/Library/Developer/Xcode/DerivedData/driverapp-bdzjbubssrkxnodvkzzofvxausck/Build/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@react-native-community+cli@1_crwjwnw4p4u62bhybwdnt3idjq/node_modules/react-native/ReactCommon/react/renderer/consistency/ScopedShadowTreeRevisionLock.h'
Target 'React-rendererconsistency' (project 'Pods') has copy command from '/Users/.../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@react-native-community+cli@1_crwjwnw4p4u62bhybwdnt3idjq/node_modules/react-native/ReactCommon/react/renderer/consistency/ScopedShadowTreeRevisionLock.h' to '/Users/.../Library/Developer/Xcode/DerivedData/driverapp-bdzjbubssrkxnodvkzzofvxausck/Build/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@react-native-community+cli@1_crwjwnw4p4u62bhybwdnt3idjq/node_modules/react-native/ReactCommon/react/renderer/consistency/ScopedShadowTreeRevisionLock.h'
# 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_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
target 'driverapp' do
config = use_native_modules!
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
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
source'https://rubygems.org'# You may use http://rbenv.org/ or https://rvm.io/ to install and use this versionruby">= 2.6.10"# Exclude problematic versions of cocoapods and activesupport that causes build failures.gem'cocoapods','>= 1.13','!= 1.15.0','!= 1.15.1'gem'activesupport','>= 6.1.7.5','!= 7.1.0'gem'xcodeproj','< 1.26.0'gem'concurrent-ruby','< 1.3.4'gem'cocoapods-user-defined-build-types'
AppDelegate.swift:
import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider
import Firebase
@main
class AppDelegate: RCTAppDelegate {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
self.moduleName = "driverapp"
self.dependencyProvider = RCTAppDependencyProvider()
// You can add your custom initial props in the dictionary below.// They will be passed down to the ViewController used by React Native.
self.initialProps = [:]
FirebaseApp.configure()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}
override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}
Android
Click To Expand
Have you converted to AndroidX?
my application is an AndroidX application?
I am using android/gradle.settingsjetifier=true for Android compatibility?
I am using the NPM package jetifier for react-native compatibility?
Hi there, if this issue only occurs when trying to install React Native Firebase, I think it may be a configuration issue on your end. Please refer to https://github.com/mikehardy/rnfbdemo which is a working example app. I hope this helps!
Issue
I'm encountering a build failure on iOS when trying to compile my React Native project with @react-native-firebase modules installed. The error points to a duplicate copy command for the file ScopedShadowTreeRevisionLock.h, specifically from targets React-Fabric and React-rendererconsistency.
Project Files
Javascript
Click To Expand
package.json
:# N/A
firebase.json
for react-native-firebase v6:iOS
Click To Expand
ios/Podfile
:AppDelegate.swift
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:20.5.0
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y
&5.6.3
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: