如何运行命令行(bash)的
问题描述:
Xcode的内置应用程序从我的问题How to run an xcode project from bash?如何运行命令行(bash)的
我发现内置*。应用程序在生成目录,但我试图找出如何继让xcode打开它,因为它不能像Mac OS X程序那样运行。
任何想法?
感谢川这个帖子:XCode Test Automation For IPhone
答
我已经解决了利用使用rsync的同步工作目录,然后的AppleScript其生成并运行该项目一个bash文件我的问题。
sync.sh:
#!/bin/bash
# script for moving development files into xcode for building
developmentDirectory="/"
xcodeDirectory="/"
echo 'Synchronising...'
rsync -r $developmentDirectory $xcodeDirectory \
--exclude='.DS_Store' --exclude='.*' --exclude='utils/' --exclude='photos'
echo 'Synchronising Done at:'
echo $(date)
buildandrun:
set projectName to "projectName"
# AppleScript uses : for/in directory paths
set projectDir to "Users:username:Documents:" & projectName & ":" & projectName & ".xcodeproj"
tell application "Xcode"
open projectDir
tell project projectName
clean
build
(* for some reasons, debug will hang even the debug process has completed.
The try block is created to suppress the AppleEvent timeout error
*)
try
debug
end try
end tell
quit
end tell
然后,终于,我使用所谓run.sh在我的.bash_profile别名shell脚本:
运行.sh:
#!/bin/bash
bash utils/sync.sh
osascript utils/buildandrun
答
我是stuc k与尝试从构建我的xcode项目启动我的调试输出相同的问题。我只是试验以下
open ./prog.app&
似乎做的伎俩。
你在说什么模拟器或设备? – Constantin 2011-01-06 09:23:29