using xcodebuild command line to put an app on the iPhone
Is this possible? How does Xcode actually deploy iPhone apps that were built into the iPhone?
Or is there another tool which I'm missing out on?
clarification: by "deploy" I mean actua开发者_如何学JAVAlly install and run gdb on the iPhone like when you do run>debug
xcodebuild only builds targets, it does not run executables; there's no way for it to invoke the code that transfers an iPhone app to a device and starts the debugger.
xcodebuild is what Xcode uses under the cover the build iPhone apps. So you can definitely use it to build the app. Just cd into the directory in which your project resides and then execute xcodebuild:
cd myProjectDir
xcodebuild
This will build the project in that directory, much in the same way as if you'd hit Build from xcode.
One thing you cannot do with xcodebuild is deploy the app to the iPhone. If you want to do this I beleive the simplest way is to use Xcode. If you want to automate this I would suggest using AppleScript.
You can find out more about xcodebuild here, a page which includes the following description of xcodebuild:
Run xcodebuild from the directory containing your project (i.e. the directory containing the projectname.xcodeproj package). If you have multiple projects in this directory you will need to use -project to indicate which project should be built.
By default, xcodebuild builds the first target listed in your project, with the default build configuration. The order of the targets is a property of the project and is the same for all users of the project. The active target and active build configuration properties are set for each user of the project and can vary from user to user.
精彩评论