可能重复:
如何更改 ios sdk?
是否有其他方法可以将 iOS 模拟器 SDK 更改为硬件 -> 版本?
感谢帮助。
编辑: 最后我用applescript得到了它
set selectedVersion to "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk"
set thePListFolderPath to path to preferences folder from user domain as string
set thePListPath to thePListFolderPath & "com.apple.iphonesimulator.plist"
tell application "System Events"
tell property list file thePListPath
tell contents
set value of property list item "currentSDKRoot" to selectedVersion
end tell
end tell
end tell