Skip to content

Conversation

kitten
Copy link
Contributor

@kitten kitten commented Aug 28, 2025

Summary:

Resolves #53501

This is a pretty major oversight of (presumably) the old autolinking refactor. The iOS autolinking's second stage, invoked in use_react_native! does not accept the react-native-config sub-command's react-native-config output. This is only invoked and used in the prior step, use_native_modules.

The second step instead invokes old code that does something similar to the new autolinking in scripts/generate-artifacts-executor, and happens to align in most cases. (But it does "autolinking" from scratch). tl;dr: When the results don't match up, things go wrong.

Instead, we now write the autolinking (react native config) results to a file, then read the output back in the second step.

This doesn't affect Android/Gradle, which are implemented correctly.

Changelog:

[IOS] [FIXED] - Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source

Test Plan:

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 28, 2025
@facebook-github-bot facebook-github-bot added p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Aug 28, 2025
@kitten kitten force-pushed the @kitten/fix/broken-ios-autolinking branch 3 times, most recently from 5c06b10 to 045db60 Compare August 28, 2025 13:57
Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

code makes sense, but there is one important part that needs to be addressed.

@kitten
Copy link
Contributor Author

kitten commented Aug 28, 2025

I'm having some trouble building on main (hermes-engine isn't picking up a prebuilt for me, if that's what's supposed to happen and build fails w/o target for libhermes). I picked this change over to 0.81-stable, and rn-tester builds fine with and without these changes. I ran the legacy and turbo module tests and they completed as expected.

0.81-stable...kitten:react-native:@kitten/0.81-stable/fix/pick-broken-ios-autolinking

I'll have to look at the lint failures but the flow-bin isn't running for me and a version that's one minor behind isn't matching the flow check failures in the CI tests

@kitten kitten requested a review from cipolleschi August 28, 2025 22:20
Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

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

Talked at the CCS with @byCedric. I think this is good to go, as soon as the linting and JS tests are fixed.

@kitten kitten force-pushed the @kitten/fix/broken-ios-autolinking branch 2 times, most recently from 28de9a8 to c8dfe0d Compare September 2, 2025 07:35
@kitten kitten force-pushed the @kitten/fix/broken-ios-autolinking branch from c8dfe0d to a9ab883 Compare September 2, 2025 07:49
@kitten
Copy link
Contributor Author

kitten commented Sep 2, 2025

Should be back to normal and passing. Rebased on main which also allowed me to check flow check manually. Main issues was console.warn -> codegenLog being needed, and an invalid FlowFixMe pragma on the require call

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D81490755.

Copy link
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @kitten in f170db4

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 3, 2025
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in f170db4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Codegen doesn't use autolinking on iOS
6 participants