我可以从iOS DeviceSupport中删除数据吗?

iOS DeviceSupport 文件夹占用大量磁盘空间,通常用于符号化崩溃日志。只要保留当前用于测试的版本,可以安全删除旧的或不支持的设备/iOS版本,Xcode会在需要时重新下载数据。此外,定期清理模拟器数据、存档和高速缓存也能释放空间。
摘要由CSDN通过智能技术生成

本文翻译自:Can I delete data from iOS DeviceSupport?

After going through and cleaning my disk with old things that I didn't need anymore, I came across the iOS DeviceSupport folder in ~/User/Library/Developer/Xcode which was taking nearly 20 GB. 在经历了我不再需要的旧东西并清理我的磁盘之后,我遇到了~/User/Library/Developer/Xcode中的iOS DeviceSupport文件夹,它占用了近20 GB。

A similar question has been asked before , but since then many things have changed and I would like an up-to-date answer. 之前已经提出类似的问题,但从那时起,许多事情都发生了变化,我想要一个最新的答案。

As long as I have the version I use for testing, can I delete the older/unused versions without breaking anything? 只要我有用于测试的版本,我可以删除旧的/未使用的版本而不会破坏任何东西吗?

截图


#1楼

参考:https://stackoom.com/question/21aD8/我可以从iOS-DeviceSupport中删除数据吗


#2楼

The ~/Library/Developer/Xcode/iOS DeviceSupport folder is basically only needed to symbolicate crash logs. 基本上只需要~/Library/Developer/Xcode/iOS DeviceSupport文件夹来表示崩溃日志。

You could completely purge the entire folder. 您可以完全清除整个文件夹。 Of course the next time you connect one of your devices, Xcode would redownload the symbol data from the device. 当然,下次连接其中一个设备时,Xcode会重新下载设备中的符号数据。

I clean out that folder once a year or so by deleting folders for versions of iOS I no longer support or expect to ever have to symbolicate a crash log for. 我每年清理一次该文件夹一次左右,删除iOS版本的文件夹,我不再支持或期望用来表示崩溃日志。


#3楼

More Suggestive answer supporting rmaddy's answer as our primary purpose is to delete unnecessary file and folder: 支持rmaddy答案的更多暗示性答案,我们的主要目的是删除不必要的文件和文件夹:

  1. DeviceSupport - You can keep the simulator which log's you may need in future. DeviceSupport - 您可以保留模拟器将来可能需要的日志。 It's symbolicate crash logs for different device/iOS. 它是不同设备/ iOS的符号崩溃日志。

  2. Delete this folder after every few days interval 每隔几天后删除此文件夹

     ~/Library/Developer/Xcode/DerivedData 
  3. All your targets are kept in the archived form in Archives folder. 您的所有目标都保存在Archives文件夹中的存档表单中。 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 在您决定删除此文件夹的内容之前,这是一个警告 - 如果您希望能够调试应用程序的已部署版本,则不应删除存档

     ~/Library/Developer/Xcode/Archives 
  4. iOS Device Support folder creates a subfolder with the device version as an identifier when you attach the device. 当您附加设备时,iOS Device Support文件夹会创建一个子设备,其中设备版本作为标识符。 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). 保留最新版本,其余部分可以删除(如果您没有在5.1.1上运行的应用程序,则没有理由保留5.1.1目录/目录)。

     ~/Library/Developer/Xcode/iOS DeviceSupport 
  5. Core Simulator folder is familiar for many Xcode users. Core Simulator文件夹对许多Xcode用户来说都很熟悉。 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. 很明显,如果您不再支持这些版本的应用程序,则可以折腾旧版本的模拟器文件夹/文件夹。 And, 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 
  6. 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. 它是一个Xcode项目的文件。 Delete away! 删除!

     ~/Library/Caches/com.apple.dt.Xcode 
  7. Additionally, Apple iOS device automatically syncs specific files and settings to your Mac every time they are connected to your Mac machine. 此外,Apple iOS设备每次连接到Mac计算机时都会自动将特定文件和设置同步到Mac。 To be on safe side, it's wise to use Devices pane of iTunes preferences to delete older backups; 为了安全起见,最好使用iTunes首选项的“设备”面板删除旧备份; you should be retaining your most recent back-ups off course. 你应该保留你最近的备份课程。

     ~/Library/Application Support/MobileSync/Backup 

I got back about 40GB! 我回来了大约40GB! For more help go to http://ajithrnayak.com/post/95441624221/xcode-users-can-free-up-space-on-your-mac 如需更多帮助,请访问http://ajithrnayak.com/post/95441624221/xcode-users-can-free-up-space-on-your-mac


#4楼

As it's not recommended to delete final versions because of the symbolicate crash logs, you can still delete all beta versions as you won't need them. 由于符号化崩溃日志不建议删除最终版本,因此您仍然可以删除所有测试版本,因为您不需要它们。 Those are the ones with a longer id after the version number. 这些是版本号后面具有更长ID的那些。

See screenshot comparison from 12.3.1 (final) and 12.4 (beta) 查看12.3.1(最终)和12.4(测试版)的屏幕截图对比

公测


#5楼

Yes, you can delete data from iOS device support by the symbols of the operating system, one for each version for each architecture. 是的,您可以通过操作系统的符号从iOS设备支持中删除数据,每个架构的每个版本都有一个。 It's used for debugging. 它用于调试。 If you don't need to support those devices any more, you can delete the directory without ill effect 如果您不再需要支持这些设备,则可以删除该目录而不会产生不良影响

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值