Skip to content

fix: ignore build/ and DerivedData/ dirs in when reading infoPlistFiles #51833

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

Closed
wants to merge 1 commit into from

Conversation

tjzel
Copy link
Contributor

@tjzel tjzel commented Jun 5, 2025

Summary:

#49927 introduced a regression where a Ruby script would read compilation artifacts and fail, when the user has relative build directories set in XCode.

After successful compilation build/ dir and DerivedData/ dir have .plist files that aren't in UTF-8 encoding and shouldn't be read by the script. If the user tries to reinstall pods at this point, he gets the following error:

image

This is how you enable relative build directories in XCode.

Screenshot 2025-06-05 at 11 08 31

Changelog:

[IOS] [FIXED] - Ignore build/ and DerivedData/ directories when reading .plist files.

Test Plan:

After applying this patch the problem doesn't occur anymore on my machine.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Software Mansion Partner: Software Mansion Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jun 5, 2025
@cipolleschi
Copy link
Contributor

Thanks for fixing this! 🙏

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in c783128.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @tjzel in c783128

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

@joprice
Copy link

joprice commented Jun 6, 2025

@tjzel I just hit this for xcarchive files as well. Took a while to debug to find that it was a binary plist causing a invalid byte sequence in UTF-8 error. Perhaps the Plist.read_from_path call should be wrapped in a rescue to log the filename that fails to be read to aid debugging.

react-native-bot pushed a commit that referenced this pull request Jun 9, 2025
…es (#51833)

Summary:
#49927 introduced a regression where a Ruby script would read compilation artifacts and fail, when the user has relative build directories set in XCode.

After successful compilation `build/` dir and `DerivedData/` dir have `.plist` files that aren't in UTF-8 encoding and shouldn't be read by the script. If the user tries to reinstall pods at this point, he gets the following error:

![image](https://github.com/user-attachments/assets/6bd31907-66af-4ea5-b2a6-2847e0ee18e1)

This is how you enable relative build directories in XCode.

![Screenshot 2025-06-05 at 11 08 31](https://github.com/user-attachments/assets/22a555b4-a468-481d-8492-02c3b36bfa25)

## Changelog:

[IOS] [FIXED] - Ignore `build/` and `DerivedData/` directories when reading `.plist` files.

Pull Request resolved: #51833

Test Plan: After applying this patch the problem doesn't occur anymore on my machine.

Reviewed By: cortinico

Differential Revision: D76030133

Pulled By: cipolleschi

fbshipit-source-id: 7ae8c2d0ce28b6925245a9172154e3dcafee126f
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @tjzel in 0a9ea39

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

kligarski added a commit to software-mansion/react-native-screens that referenced this pull request Jun 12, 2025
#2975)

## Description

Bump example apps to `[email protected]` in order to fix issues
with installing pods
(facebook/react-native#51833).

## Changes

- bump version of `react-native` and related libraries (from
upgrade-helper)
- bump lockfiles

## Test code and steps to reproduce

I tested that both example apps build and run on Android and iOS.

## Checklist

- [x] Included code example that can be used to test this change
@renyufei8023
Copy link

I still have this issue. The Infoplist in my main project contains Chinese. [email protected]

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: Software Mansion Partner: Software Mansion 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.

6 participants