The command line tool to build Xcode projects, xcodebuild, has a new build action available in Xcode 4: archive
.
From man xcodebuild
:
archive Archive a scheme from the build root (SYMROOT). This requires specifying a workspace and scheme.
Unfortunately, when I try to use it I get an error:
$ xcodebuild archive -workspace SimpleTestApp.xcworkspace -scheme SimpleTestApp xcodebuild: error: Failed to build workspace SimpleTestApp with scheme SimpleTestApp. Reason: The selected run destination is not valid for this action.
My impression is this doesn't actually work yet. Has anyone got it to work? If so, how?