Skip to content
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

Support New Architecture (Fabric & TurboModules) #225

Open
DanBN95 opened this issue Feb 4, 2025 · 1 comment
Open

Support New Architecture (Fabric & TurboModules) #225

DanBN95 opened this issue Feb 4, 2025 · 1 comment
Labels
feature help wanted Extra attention is needed

Comments

@DanBN95
Copy link

DanBN95 commented Feb 4, 2025

🚀 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

@DanBN95 DanBN95 added the feature label Feb 4, 2025
@birkir birkir added the help wanted Extra attention is needed label Feb 13, 2025
@trikstudio
Copy link

We're looking into integrating this library too but holding back because the new architecture is not yet supported. We would highly appreciate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants