Could not download iOS 17.0.1 Simulator (21A342).

I updated my MacBook to Sonoma which was a problematic task, presumably because the MacBook Pro sat unused for 10 months. Once it finally installed, Xcode needed to be updated to run. Once that finished, all of my devices/simulators are gone. When I attempt to download iOS 17.0.1 as it suggests, it downloads about 800MB of it and then fails with the error code below. I've also attempted to download previous versions of Xcode on the developer site and they also end the download prematurely. I cannot upload my app because I can't Build or Archive.

There are dozens of similar complaints from previous Xcode updates with fixes. I've tried many of them to no avail.

Could not download iOS 17.0.1 Simulator (21A342).

Hardware Overview:

Model Name: MacBook Pro Model Identifier: MacBookPro17,1 Model Number: MYDA2LL/A Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 8 GB System Firmware Version: 10151.1.1 OS Loader Version: 10151.1.1

I had the same problem since yesterday. Now the download completed. I don't know why. Be patient and try again and again.

2023-10-21 14:20:12.433 Xcode[6356:1443667] DVTDownloadable: Observed finish. Stop observing simulator updates. error: (null) 2023-10-21 14:25:42.218 Xcode[6356:1446770] DVTDownloadable: Download Failed. Downloadable: https://download.developer.apple.com/Developer_Tools/iOS_17.0.1_Simulator_Runtime/iOS_17.0.1_Simulator_Runtime.dmg. Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSURLSessionDownloadTaskResumeData=<CFData 0x600001c0ff60 [0x1dfc4b720]>{length = 24878, capacity = 65536, bytes = 0x3c3f786d6c2076657273696f6e3d2231 ... 2f706c6973743e0a}, NSUnderlyingError=0x600001b422e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <BCEE6F1A-FFF5-452C-BE24-6B0C812B019C>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDownloadTask <BCEE6F1A-FFF5-452C-BE24-6B0C812B019C>.<1>" ), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://download.developer.apple.com/Developer_Tools/iOS_17.0.1_Simulator_Runtime/iOS_17.0.1_Simulator_Runtime.dmg, NSErrorFailingURLKey=https://download.developer.apple.com/Developer_Tools/iOS_17.0.1_Simulator_Runtime/iOS_17.0.1_Simulator_Runtime.dmg, _kCFStreamErrorDomainKey=4}

Same, keep trying all day without success: `Could not download iOS 17.0.1 Simulator (21A342). Domain: NSURLErrorDomain Code: -1005 Recovery Suggestion: The network connection was lost. User Info: { DVTErrorCreationDateKey = "2023-10-23 11:17:32 +0000"; DVTRecoveryBlockKey = "<NSGlobalBlock: 0x108f8c810>"; NSLocalizedRecoveryOptions = ( Cancel ); NSRecoveryAttempter = "<_DVTErrorRecoveryHandler: 0x60000003fe80>"; }

System Information

macOS Version 14.0 (Build 23A344) Xcode 15.0.1 (22266) (Build 15A507) Timestamp: 2023-10-23T19:17:32+08:00`

There is the same problem, but with other error message. Downloading up to 30% and throw an error:

Could not download iOS 17.0.1 Simulator (21A342). Domain: NSURLErrorDomain Code: -1001 Recovery Suggestion: The request timed out. User Info: { DVTErrorCreationDateKey = "2023-10-23 12:43:41 +0000"; DVTRecoveryBlockKey = "<NSGlobalBlock: 0x108ef8810>"; NSLocalizedRecoveryOptions = ( Cancel ); NSRecoveryAttempter = "<_DVTErrorRecoveryHandler: 0x6000263da0f0>"; }

System Information

macOS Version 14.0 (Build 23A344) Xcode 15.0.1 (22266) (Build 15A507) Timestamp: 2023-10-23T14:43:41+02:00

I finally got the proposed solution to work.

Follow the instructions here:

https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes#

Firefox will struggle to download the Runtimes as well, but until Xcode you can resume the download again and again and it will continue from where it left off last. Restart after downloading the runtime, then run the commands in Terminal.

@gentleben10 i tried downloading from xcode and from terminal. both didnt continue from where it stopped. how did u manage to download them

Try to download seperately with terminal command. Preferably when the servers are free (It's early in the morning in my case). It might take a while.

xcodebuild -downloadPlatform iOS

I had exactly the same error as described above: The network connection was lost. I tried lots of things (ID, certificate, cache, etcetera). But in the end it was just a matter of luck. I guess that the Apple server is quite busy. You need to be lucky to click on the 'get' button at the right time.

Proof:

Registering simulator runtime with CoreSimulator failed. Domain: DVTDownloadableErrorDomain Code: 29 User Info: { DVTErrorCreationDateKey = "2024-04-13 11:49:33\U202fAM +0000"; }

Registering simulator runtime with CoreSimulator failed. Domain: DVTDownloadableErrorDomain Code: 29

Could not download iOS 17.0.1 Simulator (21A342).
 
 
Q