views:

395

answers:

2

I have an application in which I change the data on web and then download the files then I compile my iPhone app with data. I just want to create ad-hoc distribution so I have already added devices. So is there a way that anytime I change data on web then I compile my iPhone app over the server using PHP and some command-line script so that I create a ready-made ipa and user can install the application using iTunes? Also is it possible to compile on Windows? Also how do we change ad hoc provision profile? I mean where we can set code sign?

How do we invoke terminal and run command xcodebuild using PHP? Suppose we have mac server then how we invoke terminal and then navigate to project directory and run xcodebuild command?

+1  A: 

Check out the OS X commandline program xcodebuild. When your current directory is the project directory (the one with the .xcodeproj file), xcodebuild will compile the primary target. See man xcodebuild for more options.

CajunLuke
thanks for your answer.can you please tell me that how do i change codesign profile? and also other settings like sdk,OS Version there is not a complete example of xcodebuild on apple's site....also is it possible that we delete somefiles from the project folder and add new into resoures folder using terminal? if yes then how?
Rahul Vyas
I don't know that there is a way to do that. You could try poking around in the files in the `.xcodeproj` bundle, or you could do some UI scripting in Applescript. (The latter's less likely to break, but Applescript can be odd if you're not familiar with it.) From what I remember, the `xcodebuild` program is essentially hitting the build button.
CajunLuke
After looking at the manpage, you can explicitly set the sdk, but changing the project looks to be a UI-only operation.
CajunLuke
A: 

Hello, have you thought about setting up a build server with different scripts that can perform the requirements that you are asking for and of course a Web Interface to interact with it ?

This link describes how to do it, and in the comments of the blog readers mention several other Build Server alternatives with Xcode Project support.

Sorry if this is not the exact answer that you are looking for, but may be a valid angle to solve your problem ?

Mr.Gando