tuist / XcodeProj

📝 Read, update and write your Xcode projects
https://xcodeproj.tuist.io
MIT License
2.03k stars 309 forks source link

Missing PBXTarget accessor method. #716

Closed michaelmcguire closed 2 years ago

michaelmcguire commented 2 years ago

Context 🕵️‍♀️

I've been using xcdiff to verify refactorings I'm making to our Tuist definitions are not resulting in changes to the generated Xcode projects. While doing this, I discovered that xcdiff is not properly comparing all of the properties of the Run Script build phase.

What 🌱

I'm working on a fix for the above issue that would involve looping through PBXTarget.buildPhases and conditionally casting to PBXShellScriptBuildPhase so I can access the various properties I need to do a proper comparison. However, I noticed that PBXTarget already has several accessor methods for filtering and getting the various subclasses of PBXBuildPhase.

Proposal 🎉

I'd like to add a runScriptBuildPhases method to PBXTarget that returns the PBXBuildPhase instances that are of type PBXShellScriptBuildPhase. I'm working on this now, but figured starting with an Issue would be helpful.

Thanks for the great library!