I need to automate the build/deploy process for my iphone applications from a script. I can use xcodebuild to build the project, then use Applescript to deploy and debug/run the application. Assuming the application will stop by itself after a while, I need to collect the generated logs for verification. But the problem is I have no way to know when the application ended from outside of the application itself. If the running time is fixed, I can again use Applescript to stop the application (Cmd+Shift+Enter). So there has to be a way to connect to the device/simulator and wait on the application somehow.
I need to automate the build/deploy process for my iphone applications from a script.
Share
I found that it is not possible to connect to the device or simulator through any other means than Xcode. Unless you jailbreak the device, of course.
I solved the problem with the simulator by just polling for the process name in the output of the unix command ‘ps’. There will be a process with the name of your application. As for the device, I don’t think it is possible.