XcodesOrg / xcodes

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

iOS 18 runtime can not be downloaded #384

Closed wangwanjie closed 3 weeks ago

wangwanjie commented 2 months ago

➜ xcodes runtimes download "iOS 18.0" Error: Runtime com.apple.dmg.iPhoneSimulatorSDK18_0 is missing source url. Downloading of iOS 18 runtimes are not supported. Please install manually see https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtime

mttlmnt commented 2 months ago

When I click on the iOS 18 install button:

image
msuzoagu commented 1 month ago

@mttlmnt and @wangwanjie: release notes states "iOS 18 runtimes are not supported downloading via the xcodes runtimes command. Apple has included a new way to download that is not supported."

you have to manually down load the stimulators you need/want

spadafiva commented 1 month ago

@MattKiazyk (moving to here since I'm working on this issue and don't want to spam the other one). I started looking at this and I found the code to run the xcodebuild install process (https://github.com/XcodesOrg/XcodesApp/pull/622/files#diff-fc53334fc7d50be6adfb7a819b958d83855d0d4e8e5b4757f103bbaf53536de6R211). From what I can tell this looks like it only downloads it. When I had done this locally I had to use xcodebuild -importPlatform "$file" to actually install the DMG that xcodebuild found. I'm guessing there's something I'm missing or not understanding here, can you help me out?

spadafiva commented 1 month ago

@MattKiazyk okay, sorry for the extra updates. I've got a WIP approach going here that seems to be downloading and installing the runtimes. I think it's still missing the version check stuff, but I'd love to get some feedback on a couple things when you have time:

  1. Does the overall approach here make sense to you? (e.g. you can only install, so just let the runtime download command fail and redirect to runtime install
  2. What would be the best way to check that the correct selected xcode version is being used for the new download style?
MattKiazyk commented 1 month ago
  1. I think for now that is fine. I can see in a future where the download command would add onto the xcodebuild command to save the package.
  2. See https://github.com/XcodesOrg/XcodesApp/blob/main/Xcodes/Backend/AppState%2BRuntimes.swift#L61 where I specifically am checking for Xcode 16.1. Think we can do something similar.

Thanks for the work!

spadafiva commented 1 month ago

Awesome, thanks so much for the response! I saw this bit for checking, but wasn't sure what this repo's version of self.allXcodes would be. Is there an easy way to grab that? https://github.com/XcodesOrg/XcodesApp/blob/dd9a348298421b14f513f55ae281d940c943fd5c/Xcodes/Backend/AppState%2BRuntimes.swift#L52

MattKiazyk commented 1 month ago

You'll have to probably call Current.shell.xcodeSelectPrintPath() to get the version and parse it.

MattKiazyk commented 1 month ago

Or you might be able to check the result from the new xcodebuild command and if it errors because the option doesn't exist you can assume it's not supported.

spadafiva commented 1 month ago

@MattKiazyk , I think I've gotten it to a point where I felt comfortable opening up a full PR, please let me know if there's anything you'd like changed or adjusted.

spadafiva commented 1 month ago

Realized I forgot to actually include the PR here https://github.com/XcodesOrg/xcodes/pull/391 cc @MattKiazyk .