Skip to content

[ios] Fix regression stopping --project-directory from working#55204

Closed
kitten wants to merge 2 commits intofacebook:mainfrom
kitten:@kitten/fix/project-dir-arg-pod-install
Closed

[ios] Fix regression stopping --project-directory from working#55204
kitten wants to merge 2 commits intofacebook:mainfrom
kitten:@kitten/fix/project-dir-arg-pod-install

Conversation

@kitten
Copy link
Contributor

@kitten kitten commented Jan 16, 2026

Summary:

This is a fix for a regression in #54948 found by @Kudo. Passing an absolute path for react_native_path was non-functional before and the change was meant to fix this.

This however used Pathname.pwd.join(path) since I assumed that'd be the intention for a relative path. However, my assumption was that pod install would only ever be run in the installation root and hence be equivalent to Pod::Config.instance.installation_root most of the time.

This broke: pod install --project-directory ios (and the likes), since I wasn't aware of the --project-directory argument before.

To fix this, we should construct the absolute path and join from Pod::Config.instance.installation_root as well.

Note to self: Needs a pick into 0.84.0 due to being a regression (will file a pick request after this is merged)

Changelog:

[IOS] [FIXED] Regression from #54948 preventing pod install --project-directory from working properly

Test Plan:

  • Run pod install in rn-tester to validate

@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 Jan 16, 2026
@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 Jan 16, 2026
ReactNativePodsUtils.detect_use_frameworks(current_target_definition)

CodegenUtils.clean_up_build_folder(path, $CODEGEN_OUTPUT_DIR)
CodegenUtils.clean_up_build_folder(react_native_path, $CODEGEN_OUTPUT_DIR)
Copy link
Contributor Author

@kitten kitten Jan 16, 2026

Choose a reason for hiding this comment

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

This is something I updated for clarity. Without this, if path isn't relative to the pwd the FileUtils.rm_rf can silently fail here afaict:

base_provider_path = file_manager.join(rn_path, 'React', 'Fabric', 'RCTThirdPartyFabricComponentsProvider')
FileUtils.rm_rf("#{base_provider_path}.h")
FileUtils.rm_rf("#{base_provider_path}.mm")

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.

Thanks for the fix

@meta-codesync
Copy link

meta-codesync bot commented Jan 16, 2026

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

@meta-codesync meta-codesync bot closed this in 9f686f2 Jan 19, 2026
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @kitten in 9f686f2

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 Jan 19, 2026
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.

4 participants