xcode 从 OSX 中删除 iOS SDK

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4186276/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:55:23  来源:igfitidea点击:

Removing iOS SDKs from OSX

iphonexcodemacosiossdk

提问by Justin

This isn't a programming question but it's about the SDKs and the IDE. I've accumulated a ton of different XCode installs over the past couple of years and now my hard drive is nearly full. With each SDK clocking in at around 5 gigs, and my storage space getting low, I have a couple of questions

这不是编程问题,而是关于 SDK 和 IDE。在过去的几年里,我积累了大量不同的 XCode 安装,现在我的硬盘驱动器快满了。每个 SDK 的时钟频率约为 5 次,而我的存储空间越来越小,我有几个问题

3 Questions:

3个问题:

  1. Can I remove old ones?
  2. Where are they stored?
  3. Does the newest SDK overwrite base classes from previous SDKs? (Does NSString.h now reside in two different SDKs or will the newest one take precedence?
  4. What about beta 1, beta 2, beta 3 SDK versions? Does installing the GM/official eliminate the beta version from my Mac?
  5. Most importantly, Can I still target 3.0 if I install the 4.2 SDK? (I understand the difference between base SDK and target SDK)
  1. 我可以删除旧的吗?
  2. 它们存放在哪里?
  3. 最新的 SDK 是否会覆盖以前 SDK 的基类?(NSString.h 现在是否驻留在两个不同的 SDK 中,还是最新的一个优先?
  4. beta 1、beta 2、beta 3 SDK 版本怎么样?安装 GM/official 是否会从我的 Mac 中消除测试版?
  5. 最重要的是,如果我安装了 4.2 SDK,我还能以 3.0 为目标吗?(我了解基础 SDK 和目标 SDK 之间的区别)

I want to clean my hard drive and I have about 18 GB remaining on a 160 GB drive. I'd like to just start over and reinstall OSX, download a fresh SDK, but I still have apps that are targeted to 3.1.2 and I don't want to be forced to only support 4.0.

我想清理我的硬盘驱动器,我在 160 GB 的驱动器上剩余大约 18 GB。我想重新开始并重新安装 OSX,下载一个新的 SDK,但我仍然有针对 3.1.2 的应用程序,我不想被迫只支持 4.0。

Thank you

谢谢

回答by cobbal

Can I remove old ones?

我可以删除旧的吗?

Sure.

当然。

Where are they stored?

它们存放在哪里?

/Developer/Platforms/iPhone*/Developer/SDKs/ usually.

/Developer/Platforms/iPhone*/Developer/SDKs/ 通常。

Does the newest SDK overwrite base classes from previous SDKs? (Does NSString.h now reside in two different SDKs or will the newest one take precedence?

最新的 SDK 是否会覆盖以前 SDK 的基类?(NSString.h 现在是否驻留在两个不同的 SDK 中,还是最新的一个优先?

No, you're fine to delete them. Each SDK is self contained.

不,你可以删除它们。每个 SDK 都是独立的。

What about beta 1, beta 2, beta 3 SDK versions? Does installing the GM/official eliminate the beta version from my Mac?

beta 1、beta 2、beta 3 SDK 版本怎么样?安装 GM/official 是否会从我的 Mac 中消除测试版?

Sometimes, you can choose to reinstall them though

有时,您可以选择重新安装它们

Most importantly, Can I still target 3.0 if I install the 4.2 SDK? (I understand the difference between base SDK and target SDK)

最重要的是,如果我安装了 4.2 SDK,我还能以 3.0 为目标吗?(我了解基础 SDK 和目标 SDK 之间的区别)

Yes

是的

回答by Anthony Elliott

As of May 2016:

截至 2016 年 5 月:

Where are they stored?

它们存放在哪里?

  • /Library/Developer/CoreSimulator/Profiles/Runtimes
  • /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
  • /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/CoreSimulator/Profiles/Runtimes
  • /Library/Developer/CoreSimulator/Profiles/Runtimes
  • /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
  • /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/CoreSimulator/Profiles/Runtimes

回答by SteveCaine

You can choose to install Xcode in a different directory rather than have it overwrite your current version. See Can I have multiple Xcode versions installed?for details. Each installation stands on its own. Just be sure you know which one you're launching when opening your project.

您可以选择将 Xcode 安装在不同的目录中,而不是让它覆盖您当前的版本。请参阅我可以安装多个 Xcode 版本吗?详情。每个装置都是独立的。在打开项目时,请确保您知道要启动哪一个。