tags:

views:

169

answers:

1

I've managed to set the active target, executable and the build configuration of my project using AppleScript but I can't work out how to set the Active SDK. Any ideas?

+1  A: 

I found the answer. I needed to set the build setting SDKROOT to the path that points to the simulator SDK.

  set SDK to "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/"
  open file templateProj
  set tabReaderProj to project "MyProj"
  tell tabReaderProj
      set the active target to the target named "MyTarget"
      set value of build setting "SDKROOT" of every build configuration of the active target to SDK
  end tell
Ian1971
How did you do this via applescript?
probablyCorey
I've added more info into my answer
Ian1971
Thanks! I searched all over for how to use AppleScript to set the active target in Xcode. Happy to find the answer here.
Noah Sussman