我試圖構建一個xcode項目並通過iPhone模擬器通過applescript運行它。我知道xcodebuild但它不會讓你在模擬器中運行應用程序。我已經得到相當接近與下面的腳本...通過AppleScript構建和運行xcode項目
tell application "Xcode"
set targetProject to project of active project document
tell targetProject
set active build configuration type to build configuration type "Debug"
set active SDK to "iphonesimulator3.0"
end tell
if (build targetProject) is equal to "Build succeeded" then
launch targetProject
end if
end tell
...但build命令似乎不服從活動的SDK財產,它總是默認爲項目的基本SDK設置(如iPhoneOS3.0而不是iPhonesimulator3.0)
有沒有辦法告訴build命令使用特定的SDK?我在雪豹上使用xcode 3.2。
您可能會提及您正在使用的Xcode版本。我在Xcode 3.2中通過AppleScript設置活動SDK沒有問題。 – 2009-10-04 16:38:02
我也使用xcode 3.2,但它不起作用(除非我將iphonesimulator3.1設置爲xcode中的基本SDK) – probablyCorey 2009-10-04 23:20:39
看來,這些類型的AppleScripts不再適用於Xcode 4. – ThomasW 2012-02-06 10:13:34