iPhone软件开发工具包(SDK)在硬盘上的位置。

11
我尝试在我的 Mac 上重新安装 iPhone sdk。我以为重新安装只会覆盖之前的安装,但第二次安装后似乎占用了更多的硬盘空间。有人知道怎么刷新我的安装并从头开始以释放所有丢失的空间吗?

1
这可能应该发布在superuser.com上。 - Alex Reynolds
1
由于这是关于开发者工具(iPhone SDK)的内容,我认为它应该留在这里,而不是移动到superuser.com,因为我认为那里更适合非开发人员系统相关的内容... - epatel
3个回答

44

从Xcode 4.4开始,这个问题已经有所改变。现在的做法是:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

并且

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

4
虽然所选答案在/Applications/Xcode.app/Contents/目录中的上下文中是正确的,但是这个给出完整路径的答案比所选答案提供的相对路径更加明确易懂。 - Patrick

26

您也可以使用xcrun工具获取路径。在Terminal.app中输入以下内容:

xcrun --sdk iphoneos --show-sdk-path

xcrun --sdk iphonesimulator --show-sdk-path

这将会产生以下结果:

$ xcrun --sdk iphoneos --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk
$ xcrun --sdk iphonesimulator --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk

1
这应该是一个被接受的答案,因为这种方法可以独立于安装的Xcode版本工作。因为Xcode本身使用它来管理路径问题。 - Yevhen Dubinin

4

每个SDK版本都有相应的SDK文件夹,位置在:

 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs

并且

 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接