Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support comments attribute in all build phases, groups and targets. #51

Merged
merged 2 commits into from

2 participants

Daniel Rodríguez Troitiño Fabio Pelosin
Daniel Rodríguez Troitiño

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

Seems that Xcode 4 doesn't remove those comments, so supporting them is nice for people with old projects being converted to CocoaPods.

A search in Google for "filetype:pbxproj comments" gives you some of this results.

Fixes CocoaPods/CocoaPods#696

drodriguez added some commits
Daniel Rodríguez Troitiño drodriguez Support comments attribute in all build phases, groups and targets.
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
eb85980
Daniel Rodríguez Troitiño drodriguez Fix typo and bad test.
I should actually write and *build* the test before commiting.
2025710
Fabio Pelosin
Owner

Looks reasonable. Would you like push access to directly commit patches you feel confident about?

Fabio Pelosin fabiopelosin merged commit 750e41a into from
Daniel Rodríguez Troitiño

Thanks Fabio, already have push access. The confidence is what’s I’m not sure about :D

Daniel Rodríguez Troitiño drodriguez deleted the branch
Fabio Pelosin
Owner

Thanks Fabio, already have push access.

Oh, yes... I thought I've checked.

The confidence is what’s I’m not sure about :D

Yes if in doubt opening a pull is much better. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 8, 2013
  1. Daniel Rodríguez Troitiño

    Support comments attribute in all build phases, groups and targets.

    drodriguez authored
    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
  2. Daniel Rodríguez Troitiño

    Fix typo and bad test.

    drodriguez authored
    I should actually write and *build* the test before commiting.
This page is out of date. Refresh to see the latest.
6 lib/xcodeproj/project/object/build_phase.rb
View
@@ -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
#-----------------------------------------------------------------------#
6 lib/xcodeproj/project/object/group.rb
View
@@ -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
6 lib/xcodeproj/project/object/native_target.rb
View
@@ -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`.
4 spec/project/object/build_phase_spec.rb
View
@@ -20,6 +20,10 @@ module ProjectSpecs
@phase.run_only_for_deployment_postprocessing.should == "0"
end
+ it "is initialized with empty comments" do
+ @phase.comments.should.be.nil
+ end
+
it "can add a file reference to its build files" do
file = @project.new_file('some/file')
@phase.add_file_reference(file)
Something went wrong with that request. Please try again.