Managing Xcode Downloads • furbo.org


Starting with Xcode 14, the Simulators for watchOS and tvOS can be found as separate downloads (iOS and macOS are nonetheless “built-in”). This reduces the app obtain dimension considerably, however it additionally signifies that you now need to handle these giant (3-4 GB) parts your self.

If you launch Xcode 14 the primary time, you’re prompted to obtain further platforms. One other immediate is displayed once you attempt to run a goal for a platform with out a runtime.

However what are these downloads and the place are they saved?

The primary trace is once you take a look at Disk Utility. You’ll see a bunch of latest “Simulator” volumes mounted beneath Disk Photos:

Disk Utility displaying 4 Simulator runtimes.

When you choose these volumes, you’ll see that all of them mount at /Library/Developer/CoreSimulator/Volumes. Inside every quantity you’ll discover a authorized PDF and a path to a .simruntime bundle in a Runtimes listing. This construction is identical as further iOS runtimes in /Library/Developer/CoreSimulator/Profile/Runtimes. These .simruntime packages include all the data wanted to simulate the gadget.

Now that you recognize what Xcode is utilizing, you’ll marvel the place it’s getting the disk picture. It’s positioned in a sibling listing: /Library/Developer/CoreSimulator/Photos. That folder additionally incorporates an photos.plist file that incorporates metadata for the disk photos. There are solely a handful of recordsdata there, however on my Mac they use 13 GB of disk house.

And up till a few hours in the past, that folder contained 7 GB of information that was incompatible with the present model of Xcode. I needed to delete these recordsdata manually. However how?

The best strategy to handle this house is utilizing the brand new Platforms panel in Xcode preferences:

Xcode settings displaying all built-in and downloaded Simulator runtimes.

This window additionally exhibits once you final used the runtime: within the screenshot above it’s clear that I can do away with the iOS 14 and tvOS 16.0 runtimes and save about 25 GB of storage. It’s straightforward to get these runtimes again if wanted, simply press the + button. (After downloading a brand new runtime, it may be used within the Units & Simulator home windows to create a brand new check gadget.)

If the command line is extra your factor, you need to use xcrun to assemble the identical data:

$ xcrun simctl runtime checklist

Add a -v possibility there if you’d like extra particulars (from the photos.plist talked about above). To delete any one of many objects listed, use the listed GUID on this command:

$ xcrun simctl runtime delete <GUID>

Ultimately, this quick put up saved me 32 GB of disk house. For those who’re creating for platforms aside from the present iOS, you’ll probably see one thing related. As time passes, you’ll must manually regulate these items: Xcode can’t clear issues up for you as a result of it has no concept what you want.

For extra particulars, take a look at Apple’s documentation for putting in and managing Simulator runtimes. Thanks go to Jason Yao for serving to me determine a bunch of these things!



Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles