Skip to content

Commit

Permalink
Support comments attribute in all build phases, groups and targets.
Browse files Browse the repository at this point in the history
Xcode 2 and 3 used to have a comments attribute almost everywhere. I have
found instances of comments in:
- PBXShellScriptBuildPhase
- PBXCopyFilesBuildPhase
- PBXNativeTarget
- PBXApplicationTarget
- PBXLibraryTarget
- PBXAggregateTarget
- PBXGroup
  • Loading branch information
drodriguez committed Feb 8, 2013
1 parent e1c40a1 commit eb85980
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/xcodeproj/project/object/build_phase.rb
Expand Up @@ -30,6 +30,12 @@ class AbstractBuildPhase < AbstractObject
#
attribute :run_only_for_deployment_postprocessing, String, '0'

# @return [String] Comments associated with this build phase.
#
# This is apparently no longer used by Xcode.
#
attribute :comments, String

end

#-----------------------------------------------------------------------#
Expand Down
6 changes: 6 additions & 0 deletions lib/xcodeproj/project/object/group.rb
Expand Up @@ -57,6 +57,12 @@ class PBXGroup < AbstractObject
#
attribute :wraps_lines, String

# @return [String] Comments associated with this group.
#
# This is apparently no longer used by Xcode.
#
attribute :comments, String

#-----------------------------------------------------------------------#

# @!group Helpers
Expand Down
6 changes: 6 additions & 0 deletions lib/xcodeproj/project/object/native_target.rb
Expand Up @@ -14,6 +14,12 @@ class AbstractTarget < AbstractObject
#
attribute :product_name, String

# @return [String] Comments associated with this target.
#
# This is apparently no longer used by Xcode.
#
attribute :comments, String

# @return [XCConfigurationList] the list of the build configurations of
# the target. This list commonly include two configurations
# `Debug` and `Release`.
Expand Down
4 changes: 4 additions & 0 deletions spec/project/object/build_phase_spec.rb
Expand Up @@ -20,6 +20,10 @@ module ProjectSpecs
@phase.run_only_for_deployment_postprocessing.should == "0"
end

if "is initialized with empty comments" do
@phase.comments.should == ""
end

it "can add a file reference to its build files" do
file = @project.new_file('some/file')
@phase.add_file_reference(file)
Expand Down

0 comments on commit eb85980

Please sign in to comment.