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

reproduce update_ats_in_plist file resolution error by adding plist in target #1

Closed
wants to merge 2 commits into from

Conversation

chriszs
Copy link
Owner

@chriszs chriszs commented Jan 11, 2024

This PR reproduces the inability of the update_ats_in_plist function added to a pod installation script in React Native 0.73 to correctly find Info.plist files in targets, causing a pod install failure when additional targets are added.

To trigger this, the PBXFileReference may need a name field, which Xcode doesn't necessarily add, but the addPbxGroup function of the xcode NPM module does (it's possible the name field is added under other circumstances, too, I just don't know which ones). To create a reproduction, I added the target by going to File > New > Target > Notification Service Extension in Xcode, and then added the name field to the file reference by hand. But the actual failure I'm experiencing in the wild is with some tooling that uses the xcode module method, which does add the name field by default.

As you can see, the error message here is, "The plist file at path /Users/runner/work/reproducer-react-native/reproducer-react-native/ReproducerApp/ios/NotificationServiceExtension-Info.plist doesn't exist.", but the file does exist, the update_ats_in_plist method simply looks at the wrong path because its file resolution logic is incorrect, as detailed by Evan Bacon here.

@chriszs chriszs force-pushed the update-ats-in-plist-file-resolution-error branch from c31ec27 to 5c3a8dd Compare February 1, 2024 13:31
@chriszs chriszs closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant