update_ats_in_plist
in cocoapods/utils.rb
fails to correctly resolve the file names of plist files added in targets, causing pod install failures
#42239
Labels
Resolution: Fixed
A PR that fixes this issue has been merged.
Description
The
update_ats_in_plist
method incocoapods/utils.rb
added in #38086 fails to correctly resolve the file names of plist files added in targets, causing pod install failures.The error message I get is "The plist file at path [...] ReproducerApp/ios/NotificationServiceExtension-Info.plist doesn't exist." The file does exist, but not at that path.
update_ats
looks at the wrong path.The logic issue seems to be triggered when the name field is added to the PBXFileReference (the name field is what
update_ats
looks at to determine whether the file is an Info.plist file), which in my testing Xcode didn't add by default (though there may be some circumstance in which it does) but common tooling in the React Native ecosystem which uses theaddPbxGroup
method of the xcode NPM package does consistently add the name field and it appears to be a standard PBXFileReference field.The correct resolution, as demonstrated by Xcode on another project, finds the Info.plist file in the target/group:
@EvanBacon notes some of this thoughts on how to improve the logic here.
Steps to reproduce
yarn install
npx pod-install
React Native Version
0.73.2
Affected Platforms
Build - MacOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
chriszs/reproducer-react-native#1
The text was updated successfully, but these errors were encountered: