RNCSliderComponentView.mm fails on legacy Architecture
Error
❌ (node_modules/@react-native-community/slider/ios/RNCSliderComponentView.mm:5:9)
3 | #import <React/RCTConversions.h>
4 |
5 | #import <react/renderer/components/RNCSlider/RNCSliderComponentDescriptor.h>
| ^ 'react/renderer/components/RNCSlider/RNCSliderComponentDescriptor.h' file not found
6 | #import <react/renderer/components/RNCSlider/EventEmitters.h>
7 | #import <react/renderer/components/RNCSlider/Props.h>
8 | #import <react/renderer/components/RNCSlider/RCTComponentViewHelpers.h>
- are you using the new architecture?
NO, this is probably the reason of the error.
- which version of react & react-native are you using?
"expo": "~54.0.22"
"react": "19.1.0"
"react-native": "0.81.5"
Description
Fix by patch, vibe-coded
diff --git a/node_modules/@react-native-community/slider/react-native-slider.podspec b/node_modules/@react-native-community/slider/react-native-slider.podspec
index 54d77bd..be7edb9 100644
--- a/node_modules/@react-native-community/slider/react-native-slider.podspec
+++ b/node_modules/@react-native-community/slider/react-native-slider.podspec
@@ -16,7 +16,13 @@ Pod::Spec.new do |s|
s.platforms = { :ios => "9.0", :visionos => "1.0" }
s.source = { :git => "https://github.com/callstack/react-native-slider.git", :tag => "v#{s.version}" }
- s.source_files = "ios/*/.{h,m,mm}"
+
+ if new_arch_enabled
+ s.source_files = "ios/*/.{h,m,mm}"
+ else
+ s.source_files = "ios/*/.{h,m}"
+ s.exclude_files = "ios/**/RNCSliderComponentView.{h,mm}"
+ end
if new_arch_enabled
s.subspec "common" do |ss|
By using 4.5.5 as before, we get SIGSV fault, so it's not an option for us.... probably because react native is too new.
@razvanphp Did you try other old-architecture versions of Slider? v4.5.6 and v4.5.7? You didn't give any info what version are you using in this issue, but know that from v5 of Slider only the new architecture is supported.
We did not switch to the new architecture yet, but with the diff above, v5 compiles even on the old arch, is it supposed to work? We tried latest v4, but as mentioned, we get SIGSERV fatal error.
I had the same error and could run on v4.5.7, maybe it helps, react-native version is 0.78 though