tags:

views:

48

answers:

1

I realize I have to use Xcode to develop for the iphone, but I'm trying to build apps from raw source code generated outside of Xcode.

For example, I would like to "Build and Go" the apple demo "TheElements" (here). (I use this example because it has no .xib files - so Xcode is not needed for the UI).

It works to just unzip and open the .xcodeproj in there, but what if I had generated this code elsewhere and haven't yet used xcode? I.e., I have a directory of files (the contents of the .zip without the xcodeproj stuff):

./Default.png
./Images/*.png
./Classes/*.{h,m}
./Icon.png
./main.m
./Elements.plist
./Info.plist
./TheElements_Prefix.pch

Can I quickly (automatically?) get this built and running in the simulator?

I guess the question also relates to what information is really stored in the xcodeproj. Ideally, there would be some scriptable method for generating the project.pbxproj file, but sadly can't find this.

+3  A: 

You might think of the Xcode project file as a glorified Makefile (if you're coming from the Unix world) or a VC solution file (if you're coming from Windows). It's a description of the dependencies between components and the steps required to build, link, and deploy those components. There is no more fundamental "Build and Go" than that.

On the iPhone, Xcode is required to build a viable application (technically, you could chain up the command line invocations used by Xcode—check the build log—but you'd be pretty crazy to bother). You can use a command line invocation (xcodebuild) instead of using the Xcode GUI app, but you still need a project file.

Barry Wark
Or, if you are very daring, /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.2.1
chpwn