XcodesOrg / XcodesApp

The easiest way to install and switch between multiple versions of Xcode - with a mouse click.
MIT License
6.67k stars 293 forks source link

Support Runtime/Platforms Downloading and Install 🚀 #448

Closed MattKiazyk closed 7 months ago

MattKiazyk commented 7 months ago

With Apple's change of splitting out the runtimes outside the of the main Xcode download, we need to support that in Xcodes so that users can still feel the speed and ease of downloading GB more of required data

The Xcode CLI had support for this for a while.. sorry it took long to get this in.

What's new

XcodesKit

I started splitting out shared code into a new package called... XcodesKit so that, in the future, both CLI and UI can reuse the same code. Currently there's a lot of duplicated code. There are lots of shell calls that are exactly the same for both.

Any new code that can be shared between the 2 should be moved to XcodesKit when at all possible

Runtime Download

Xcodes CLI currently only uses the current selected Xcode to determine if it's installed. Anytime you have multiple Xcodes installed, it doesn't do a great job of showing you what other runtimes are installed.

This PR includes code that uses /Library/Developer/CoreSimulator/Images (where the downloaded runtimes exist) to determine whether or not you have that it installed.

I'm still working on tweaking the UI for downloading but currently looks like:

Installed Downloading
Screenshot 2023-11-23 at 2 46 28 PM Screenshot 2023-11-23 at 2 46 50 PM

This code started in June - so please give it a run if you have time.

hstdt commented 7 months ago

Network change error makes ObservingProgressIndicator freezing even install button clicked and download task start again, until InfoPane reload.

PS: How about a installing status text or cancel button instead of the install button when installing.

Thanks for your nice work!

MattKiazyk commented 7 months ago

@hstdt thanks for the feedback. Going to work on supporting cancelling for runtimes in a future PR as I def missed that in this pr.

Lakr233 commented 7 months ago

Can't wait for you to release! So excited!