Skip to content

Conversation

@kraenhansen
Copy link
Collaborator

This would have helped me debug an issue while building out #297.

@kraenhansen kraenhansen self-assigned this Nov 2, 2025
@kraenhansen kraenhansen added Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) Host 🏡 Our `react-native-node-api-modules` package labels Nov 2, 2025
@kraenhansen kraenhansen requested a review from Copilot November 2, 2025 10:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a warning when React Native Node-API is used with the legacy architecture (when RCT_NEW_ARCH_ENABLED is set to '0'), helping developers identify configuration issues during the build process.

  • Adds a warning check in the podspec to alert users when the new architecture is disabled
  • Includes a changeset documenting this as a patch-level change

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/host/react-native-node-api.podspec Adds environment variable check and warning for legacy architecture usage
.changeset/wicked-tables-deny.md Documents the change as a patch release with warning functionality

end

if ENV['RCT_NEW_ARCH_ENABLED'] == '0'
Pod::UI.warn "React Native Node-API doesn't support the legacy architecture (but RCT_NEW_ARCH_ENABLED == '0')"
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The warning message could be clearer about the required action. Consider rephrasing to: 'React Native Node-API requires the new architecture. Please set RCT_NEW_ARCH_ENABLED=1 in your project configuration.'

Suggested change
Pod::UI.warn "React Native Node-API doesn't support the legacy architecture (but RCT_NEW_ARCH_ENABLED == '0')"
Pod::UI.warn "React Native Node-API requires the new architecture. Please set RCT_NEW_ARCH_ENABLED=1 in your project configuration."

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I specifically wanted to use the "legacy architecture" in the naming, here - since the new architecture is now the default architecture.

@kraenhansen kraenhansen merged commit 4672e01 into main Nov 2, 2025
7 checks passed
@kraenhansen kraenhansen deleted the kh/warn-on-legacy-architecture branch November 2, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) Host 🏡 Our `react-native-node-api-modules` package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants