Summary
lib/xcodeproj/project/object/build_phase.rb defines classes for the standard
build-phase ISAs — PBXHeadersBuildPhase, PBXSourcesBuildPhase,
PBXFrameworksBuildPhase, PBXResourcesBuildPhase, PBXCopyFilesBuildPhase,
PBXShellScriptBuildPhase, PBXRezBuildPhase — but there is no
PBXAppleScriptBuildPhase.
Xcode does emit PBXAppleScriptBuildPhase objects (targets that compile/run
AppleScript). Because the class is absent, xcodeproj cannot represent this
build phase, and opening or re-saving any .pbxproj that contains one is
unreliable.
Expected
PBXAppleScriptBuildPhase is a first-class AbstractBuildPhase subclass, so
projects containing AppleScript build phases round-trip cleanly.
Actual
The ISA is unknown to xcodeproj. Consumers have to monkey-patch the gem after
every install/update to add the class, e.g.:
class PBXAppleScriptBuildPhase < AbstractBuildPhase
attribute :contextName, String, ''
attribute :isSharedContext, String, '0'
end
Suggested fix
Add a PBXAppleScriptBuildPhase < AbstractBuildPhase class to
build_phase.rb with its contextName and isSharedContext string
attributes, alongside the other phase classes.
Environment
- xcodeproj: 1.28.1
- Ruby: 2.6.0 (system Ruby, macOS)
Summary
lib/xcodeproj/project/object/build_phase.rbdefines classes for the standardbuild-phase ISAs —
PBXHeadersBuildPhase,PBXSourcesBuildPhase,PBXFrameworksBuildPhase,PBXResourcesBuildPhase,PBXCopyFilesBuildPhase,PBXShellScriptBuildPhase,PBXRezBuildPhase— but there is noPBXAppleScriptBuildPhase.Xcode does emit
PBXAppleScriptBuildPhaseobjects (targets that compile/runAppleScript). Because the class is absent, xcodeproj cannot represent this
build phase, and opening or re-saving any
.pbxprojthat contains one isunreliable.
Expected
PBXAppleScriptBuildPhaseis a first-classAbstractBuildPhasesubclass, soprojects containing AppleScript build phases round-trip cleanly.
Actual
The ISA is unknown to xcodeproj. Consumers have to monkey-patch the gem after
every install/update to add the class, e.g.:
Suggested fix
Add a
PBXAppleScriptBuildPhase < AbstractBuildPhaseclass tobuild_phase.rbwith itscontextNameandisSharedContextstringattributes, alongside the other phase classes.
Environment