XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.82k stars 133 forks source link

Ability to install a specified simulator version #91

Closed MaxDesiatov closed 1 year ago

MaxDesiatov commented 4 years ago

I'm mainly using xcodes as a replacement for Ruby-based xcversion. Unfortunately, xcodes lacks a great feature when compared to xcversion, that is simulator version management. It would be great if xcodes was able to provide a list of available simulators and install a specificied version.

rogerluan commented 2 years ago

Hi @MattKiazyk and @interstateone 👋 Since I opened this discussion: https://github.com/xcpretty/xcode-install/issues/467 do you think we could get some help to port over the simulator feature from xcversion into xcodes?

Really looking forward to hearing from you 🤗 Thank you!

rogerluan commented 2 years ago

This newly created issue is related to this one: #213, and it seems like there are Xcode-14-specific issues around managing additional simulators

MattKiazyk commented 2 years ago

Hey @rogerluan thanks for starting that conversation on xcode-install. I'll do what I can to help ease on that transition.

StevenSorial commented 2 years ago

@MattKiazyk I would like to try implementing this feature. Open for a PR?

MattKiazyk commented 2 years ago

@StevenMagdy I'm always open for PR's!

I have started looking into it, and am trying to wrap my head around how xcinstall does it vs how we could do on Xcodes, but more eyes on understanding the better I think.

Just talking out loud here for what I'm thinking:

StevenSorial commented 2 years ago

I think apple changed the simulator-runtime architecture in Xcode 14.0, so I think xcode-install is not super useful, which is why it doesn't work anymore. My plan was to start implementing the feature for Xcode 14 only, to make it simpler and because xcode-install works fine for Xcode <14.0.

Ability to download a simulator without logging in with Apple credentials.

Not needed. Xcode 14.0 uses https://devimages-cdn.apple.com/downloads/xcode/simulators/index2.dvtdownloadableindex which includes the URLs, and images can be downloaded directly.

Ability to install without user intervention (if possible)

Apple mentions that xcrun simctl runtime add runtime.dmg is the only needed command, but I did not try tbh.

Code must be easily reused between CLI and Xcodes.app (there's a long TODO of making it more shareable between the apps)

Oh! I thought that the app just run the CLI internally so I did not put it into consideration. Sorry I never contributed to a CLI before 😊

MattKiazyk commented 2 years ago

So looking into xcrun simctl runtime, I believe that only works on the current active/selected Xcode version only? So that might not work with installing older versions?

Let me know how you're making out. I'll work on the Xcodes.app side of things

rogerluan commented 2 years ago

I think I support the idea of only supporting Xcode 14+, for a few reasons:

(there's a long TODO of making it more shareable between the apps)

I was surprised by this as well 😱 I thought the app just consumed the xcodes Swift Package and implemented a thin UI layer on top of it 😮

StevenSorial commented 1 year ago

Added in 1.2.0 🎉 xcodes runtimes install 'iOS 16.0'

rogerluan commented 1 year ago

@MattKiazyk we can prob close this issue? 🤗

byassine52 commented 1 year ago

@MattKiazyk Great 🎉 I think now "Known Limitations" section of MIGRATION.md can be updated accordingly 👍🏻

rogerluan commented 1 year ago

@MattKiazyk @StevenSorial we will need documentation around how the new runtimes API work (in the README perhaps), should we create an issue for it? 🙇

rogerluan commented 1 year ago

Thanks for the heads up @byassine52 , just updated 💪

rogerluan commented 1 year ago

Cross-referencing the PR that closed this issue: https://github.com/RobotsAndPencils/xcodes/pull/230