iOS Xcode開發的Mac清理空間

最近mbp空間越來越小, 看了一下替換mbp硬盤貴的要死, 還是清理一下mac里面無用的內容吧

0.這里我推薦大家使用OmniDiskSwipper, 它可以列出硬盤里面哪里有占資源的文件和文件夾, 通過這個和底下stackoverflow的刪除建議, 配合使用可讓你的mac騰出不少可用空間, 中文并非直譯, 結合自己刪除的總結.

轉自:https://stackoverflow.com/questions/29930198/can-i-delete-data-from-ios-devicesupport
1.模擬器運行數據目錄, 可幾天一刪
~/Library/Developer/Xcode/DerivedData

DeviceSupport - You can keep the simulator which log's you may need in future. It's actually symbolicate crash logs for different device/iOS.
Delete this folder after every few days interval

2.打包文件都在這里, 如果打包文件發布, 并且不再接受蘋果反饋(玩家崩潰的log會下載下來用這個來解析), 就可以刪掉
~/Library/Developer/Xcode/Archives

All your targets are kept in 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

3.當你連接設備時, 會拷貝設備的simbols到本目錄, 手上設備如果沒有的版本可以刪掉
~/Library/Developer/Xcode/iOS DeviceSupport

iOS Device Support folder creates a subfolder with the device version as 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).

4.模擬器目錄, 可以刪掉不需要的, 不過最好在xcode的Organizer下刪除不必要的, 比較明了
~/Library/Developer/CoreSimulator

Core Simulator folder is familiar for many Xcode users. It’s simulator’s territory; thats 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 menu to delete all of your app data in a Simulator.

5.蘋果反饋的崩潰的log, 如果你已經修正了log, 就可以都刪了
~/Library/Caches/com.apple.dt.Xcode

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!

6.itunes設備備份, 保留最近一份, 然后其他可清理掉
~/Library/Application Support/MobileSync/Backup

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 safer 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.

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容