Skip to content

Instantly share code, notes, and snippets.

@masonforest
Created October 17, 2012 00:20
Show Gist options
  • Save masonforest/3902965 to your computer and use it in GitHub Desktop.
Save masonforest/3902965 to your computer and use it in GitHub Desktop.
[~/tmp] gem install xcodeproj --pre
gem:14: /usr/local/bin/gem: bad interpreter: /usr/local/bin/ruby: no such file or directory
Fetching: xcodeproj-0.2.0.rc3.gem (100%)
Building native extensions. This could take a while...
Successfully installed xcodeproj-0.2.0.rc3
1 gem installed
[~/tmp] irb
zsh: /usr/local/bin/irb: bad interpreter: /usr/local/bin/ruby: no such file or directory
1.9.3-p194 :001 > project = Xcodeproj::Project.new
NameError: uninitialized constant Xcodeproj
from (irb):1
from /Users/masonf/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'
1.9.3-p194 :002 > require 'xcodeproj'
=> true
1.9.3-p194 :003 > project = Xcodeproj::Project.new
=> #<Xcodeproj::Project:0x007f9a251facb8 @plist={"archiveVersion"=>"1", "classes"=>{}, "objectVersion"=>"46", "objects"=>{"52998390BC9E4435993800E1"=>{"isa"=>"PBXGroup", "sourceTree"=>"<group>", "children"=>["245784F28DAE419897F52063"]}, "245784F28DAE419897F52063"=>{"name"=>"Products", "isa"=>"PBXGroup", "sourceTree"=>"<group>", "children"=>[]}, "58100A16C40C4606B1882CC3"=>{"attributes"=>{"LastUpgradeCheck"=>"0420"}, "compatibilityVersion"=>"Xcode 3.2", "developmentRegion"=>"English", "hasScannedForEncodings"=>"0", "knownRegions"=>["en"], "mainGroup"=>"52998390BC9E4435993800E1", "productRefGroup"=>"245784F28DAE419897F52063", "projectDirPath"=>"", "projectRoot"=>"", "targets"=>[], "isa"=>"PBXProject", "buildConfigurationList"=>"52B5678D0D6E4689B4BFD0D1"}, "52B5678D0D6E4689B4BFD0D1"=>{"isa"=>"XCConfigurationList", "buildConfigurations"=>["46933C2AC7F340129DBD170D", "BB790B4807DF4D878602956A"], "defaultConfigurationName"=>"Release", "defaultConfigurationIsVisible"=>"0"}, "46933C2AC7F340129DBD170D"=>{"name"=>"Debug", "isa"=>"XCBuildConfiguration", "buildSettings"=>{}}, "BB790B4807DF4D878602956A"=>{"name"=>"Release", "isa"=>"XCBuildConfiguration", "buildSettings"=>{}}}, "rootObject"=>"58100A16C40C4606B1882CC3"}>
1.9.3-p194 :004 > project.save_as('MyProject')
=> true
1.9.3-p194 :005 > ^D
[~/tmp] cat MyProject
cat: MyProject: Is a directory
[~/tmp] ls MyProject
project.pbxproj
[~/tmp] ls MyProject/project.pbxproj
MyProject/project.pbxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment