Description
🚀 Feature Request: Add New Architecture Support
The react-native-carplay package currently does not support React Native’s New Architecture (RCT_NEW_ARCH_ENABLED=1). This prevents it from working properly when upgrading to the latest versions of React Native, which prioritize Fabric and TurboModules for improved performance and reliability.
🌟 Why This is Important
React Native is transitioning to Fabric and TurboModules, making New Architecture adoption essential for future compatibility.
Apps integrating CarPlay with React Native need full support for TurboModules & Fabric UI components.
The lack of New Architecture support currently breaks app functionality when enabling RCT_NEW_ARCH_ENABLED.
🔍 Issues Observed
After enabling RCT_NEW_ARCH_ENABLED=1, the app fails to build due to:
Old RCT_EXPORT_MODULE() usage – needs conversion to TurboModules.
UIView-based components – should be migrated to Fabric.
Podspec missing New Architecture dependencies (e.g., ReactCommon/turbomodule/core).
📌 Suggested Fixes
To support the new architecture, the following updates are needed:
✅ Migrate Native Modules to TurboModules
Replace RCT_EXPORT_MODULE() with RCTTurboModule.
Implement the module using NativeCarPlaySpec.
✅ Migrate UI Components to Fabric (if applicable)
Convert RCTViewManager to RCTViewComponentView.
✅ Update react-native-carplay.podspec
Modify the Podspec to include new dependencies:
s.dependency "ReactCommon/turbomodule/core"
s.dependency "React-RCTView" # Needed for Fabric components
📢 Request for Help
Would it be possible to add support for Fabric & TurboModules to react-native-carplay? This would allow apps using CarPlay to remain compatible with React Native’s latest updates.
I’d be happy to contribute or test any changes if needed! 🚀
Additional Info
React Native Version: 0.76.5
react-native-carplay Version: 2.4.1-beta.0
Platform: iOS
Activity