I'm porting an existing game engine to the iPhone. As a result of a large and complicated build process that isn't really conducive to Xcode I'm developing my own build system that calls the same programs and does the same build steps as Xcode does.
This is generally working pretty well, referring heavily to xcodebuild's output for reference.
The one big thing I can't do is install stuff programatically. I can use Xcode's Organizer window to install manually, but I know of no way to duplicate that behavior via the commandline, nor to run the installed program directly on the iPhone afterwards. I can script it with a GUI macroing system if I have to, but I'd rather not.
I've found the program "iphonesim" to run iPhone apps in the simulator from the commandline, but nothing equivalent for actual hardware development. Any suggestions?
(To stav开发者_如何学编程e off the inevitable suggestions: nothing involved is jailbroken in any way, and I don't really plan to jailbreak it.)
The Xcode build system is just a lightweight face on top of standard Unix build tools. Therefore, anything you can do from the command line you can do from Xcode. Most large and/or complex projects use customized build scripts.
The easiest solution for you is to take your existing build scripts and plug them into a custom build script in Xcode. That way you get the control of the command line with the integration of Xcode.
If you're a command line build wizard you shouldn't have any problems customizing Xcode to suit the needs of your project. See the Xcode build documentation for details.
Personally I think Jailbreaking is the way to go.
I bootstrapped a SIP client that way; compile stuff on the command line on Mac with regular Makefiles, then transfer to the iPhone and run there from the command line.
This made my initial development/experiments so much easier.
I wish Apple would ship iPhones with a root shell to developers.
精彩评论