在清理磁盘上那些我不再需要的旧东西之后,我在~/Library/Developer/Xcode中发现了iOS DeviceSupport文件夹,它占用了将近20gb的空间。
以前也有人问过类似的问题,但从那时起,很多事情都发生了变化,我想知道一个最新的答案。
只要我有用于测试的版本,我可以在不破坏任何东西的情况下删除旧的/未使用的版本吗?
在清理磁盘上那些我不再需要的旧东西之后,我在~/Library/Developer/Xcode中发现了iOS DeviceSupport文件夹,它占用了将近20gb的空间。
以前也有人问过类似的问题,但从那时起,很多事情都发生了变化,我想知道一个最新的答案。
只要我有用于测试的版本,我可以在不破坏任何东西的情况下删除旧的/未使用的版本吗?
当前回答
~/Library/Developer/Xcode/iOS DeviceSupport文件夹基本上只需要用来表示崩溃日志。
您可以完全清除整个文件夹。当然,下次你连接设备时,Xcode会从设备上重新下载符号数据。
我大约每年清理一次文件夹,删除那些我不再支持或不希望出现崩溃日志的iOS版本的文件夹。
其他回答
~/Library/Developer/Xcode/iOS DeviceSupport文件夹基本上只需要用来表示崩溃日志。
您可以完全清除整个文件夹。当然,下次你连接设备时,Xcode会从设备上重新下载符号数据。
我大约每年清理一次文件夹,删除那些我不再支持或不希望出现崩溃日志的iOS版本的文件夹。
更多提问性的回答支持rmaddy的回答,因为我们的主要目的是删除不必要的文件和文件夹:
Delete this folder after every few days interval. Most of the time, it occupy huge space! ~/Library/Developer/Xcode/DerivedData All your targets are kept in the archived form in Archives folder. Before you decide to delete contents of this folder, here is a warning - if you want to be able to debug deployed versions of your App, you shouldn’t delete the archives. Xcode will manage of archives and creates new file when new build is archived. ~/Library/Developer/Xcode/Archives iOS Device Support folder creates a subfolder with the device version as an identifier when you attach the device. Most of the time it’s just old stuff. Keep the latest version and rest of them can be deleted (if you don’t have an app that runs on 5.1.1, there’s no reason to keep the 5.1.1 directory/directories). If you really don't need these, delete. But we should keep a few although we test app from device mostly. ~/Library/Developer/Xcode/iOS DeviceSupport Core Simulator folder is familiar for many Xcode users. It’s simulator’s territory; that's where it stores app data. It’s obvious that you can toss the older version simulator folder/folders if you no longer support your apps for those versions. As it is user data, no big issue if you delete it completely but it’s safer to use ‘Reset Content and Settings’ option from the menu to delete all of your app data in a Simulator. ~/Library/Developer/CoreSimulator
(这是第5步的一个方便的shell命令:xcrun simctl delete不可用)
Caches are always safe to delete since they will be recreated as necessary. This isn’t a directory; it’s a file of kind Xcode Project. Delete away! ~/Library/Caches/com.apple.dt.Xcode Additionally, Apple iOS device automatically syncs specific files and settings to your Mac every time they are connected to your Mac machine. To be on safe side, it’s wise to use Devices pane of iTunes preferences to delete older backups; you should be retaining your most recent back-ups off course. ~/Library/Application Support/MobileSync/Backup
来源:https://ajithrnayak.com/post/95441624221/xcode-users-can-free-up-space-on-your-mac
我得到了大约40GB的内存!
我根据@JamshedAlam的回答为那些厌倦手动删除这些文件夹内容的人写了一个小的命令行实用程序。如果你觉得对你有帮助,就来这里看看。
是的,您可以通过操作系统的符号从iOS设备支持中删除数据,每种体系结构的每个版本对应一个符号。它用于调试。 如果您不再需要支持这些设备,您可以删除该目录而不会产生不良影响