Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用AppleScript在xcode中设置活动SDK?_Applescript - Fatal编程技术网

如何使用AppleScript在xcode中设置活动SDK?

如何使用AppleScript在xcode中设置活动SDK?,applescript,Applescript,我已经设法使用AppleScript设置了项目的活动目标、可执行文件和构建配置,但我无法确定如何设置活动SDK。 有什么想法吗?我找到了答案。我需要将构建设置SDKROOT设置为指向模拟器SDK的路径 set SDK to "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/" open file templateProj set tabReaderProj to

我已经设法使用AppleScript设置了项目的活动目标、可执行文件和构建配置,但我无法确定如何设置活动SDK。
有什么想法吗?

我找到了答案。我需要将构建设置SDKROOT设置为指向模拟器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

你是如何通过applescript做到这一点的?我在回答中添加了更多信息谢谢!我到处寻找如何使用AppleScript在Xcode中设置活动目标。很高兴在这里找到答案。