Unable to preview on latest Xcode

I'm new to Xcode and decided to give it a try, however, I'm unable to preview even the default "hello, world" message.

I've tried downloading Xcode on the App Store on Mac and from the official website, but I couldn't go pass the "Preparing (Automatic) iPhone Simulator."

I've also tried the following line of code on Terminal, but nada:

xcrun simctl erase all

Here's what I see for almost two hours now (it makes no sense):

My system specs: iMac Retina 4K, 21.5-inch, 2019, 3 GHz Intel Core i5 6-Core, Radeon Pro 560X 4 GB, 8 GB 2667 MHz DDR4 (two 4gb core each), 1TB SSD.

I've coded way bigger web projects using various applications, but Xcode can't even preview the sample file?

Please, help. I would really like to code using Swift. :)

Sure it works. I've tested with Xcode 16.2, MacOS 14.7.2 and using iPhone 16 Pro simulator as in your case.

How long ago did you install Xcode ?

Are you sure installation is complete ? Or were you asked to download simulators.

If so, did you do it ?

Try to

  • select another simulator, or
  • restart Xcode.
  • If that does not work, try to reinstall, from a different site. This one works well: https://xcodereleases.com

Hi @Claude31, thanks for the response.

Just updated to Sequoia (15.2 (24C101)) but the issue persists.

I completely reseted my iMac to its default settings, downloaded it from the official website again, simulators were downloaded without a problem, however, when it comes to previewing, nothing happens.

It just keeps spinning, as shown in the OP.

I even enabled Legacy Previews, but it didn't seem to work.

Unable to preview on latest Xcode
 
 
Q