# HG changeset patch # User Eric Wing # Date 1313102773 25200 # Node ID 78830332a3beebbed82f52080d8fceeac00d4703 # Parent 8956367af822601190826c5d99d7fda18214ce89# Parent 7a0e6eeedd9230502ec687c9b4838d21b62c70f9 Merged diff -r 8956367af822 -r 78830332a3be README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.txt Thu Aug 11 15:46:13 2011 -0700 @@ -0,0 +1,4 @@ +Example of how to use Scripting Bridge (via LuaCocoa) to control and automate Xcode for the purposes of automated on-device iOS testing + +http://playcontrol.net/ewing/jibberjabber/automated-mobile-test-part2.html + diff -r 8956367af822 -r 78830332a3be ScriptingBridge_Xcode.lua --- a/ScriptingBridge_Xcode.lua Thu Aug 11 15:44:58 2011 -0700 +++ b/ScriptingBridge_Xcode.lua Thu Aug 11 15:46:13 2011 -0700 @@ -38,7 +38,7 @@ -- so use a numeric for local file_to_open = arg[1] or "MySampleProject.xcodeproj" local url_to_open = GetURLFromFileAndPath(file_to_open) - local xcode_document = xcode_application:open(url_to_open) + local xcode_document = xcode_application:open_(url_to_open) local simulator_or_device = arg[2] or "os" @@ -76,11 +76,11 @@ if "simulator" == simulator_or_device then local sdk = string.gsub(active_sdk, "os", "simulator") print("sdk", sdk) - xcode_project:setActiveSDK(sdk) + xcode_project:setActiveSDK_(sdk) else local sdk = string.gsub(active_sdk, "simulator", "os") print("sdk", sdk) - xcode_project:setActiveSDK(sdk) + xcode_project:setActiveSDK_(sdk) end print("changed activeSDK", xcode_project:activeSDK()) end