Here are some ways to clean up:
Open Finder Use shortcut key command+shift+g Enter path to enter this folder
1. Removal of Deriveddata, recommended periodic cleanup, will regenerate
Within this folder are the cache files generated by the emulator running each app, which will take a long time to recompile after the app is removed, and the cache file is generated again.
~/library/developer/xcode/deriveddata
2. Remove archives to clean up
The contents of this folder are generated when you package with Xcode and can be deleted depending on whether it is useful or not, and then all of the packaged files under Xcode->organizer are emptied.
~/library/developer/xcode/archives
3. Removal of iOS devicesupport, recommended cleanup, connection device regeneration
This folder holds the version support for your device, each version of the folder is a few G size, just keep your device's current version of the folder, even if all deleted, and then reconnect the device when Xcode will appear processing symbol files and regenerate the corresponding version of the file
~/library/developer/xcode/ios Devicesupport
4. Remove the emulator file, can clean up, run the emulator will regenerate
The folders in this folder directory are all named after the Udid of the emulator, and you can view the. default_created.plist file according to the folder name and the contents of the Plist file to determine that each folder is a version of a device type emulator,. default_ Created.plist file is hidden file, need to turn on show hidden to view
~/library/developer/coresimulator/devices
Clean your Mac's hard disk space, clean Xcode, clear "other"