MacOS Sonoma,Xcode 15, iOS 17. Bug in iOS version,emulator and preview.
I updated to the latest version on my MacOS (Sonoma) and everything was slow in my xcode, I searched Google and I couldn’t find the solution, the way I thought to get around the problem (at least it was much better than it was, now I can open the preview normally and the emulator works a little slow but much better than it was). What we are going to do is use version 16.4 of iOS.
Let’s go step by step with the solution I found
Start by clearing all build data, click on the apple, then on system settings
Then go to General -> Storage, sorry, my language is in Portuguese
Now click on developer, your compilation data will appear, select it and click on delete, I advise you to delete everything possible
This step is complete, now let’s download iOS version 16.4
At the top center, where the name of your project is, click on the selected device then go to the manage run destination option
In the section that opens just below, in the top left corner there will be a “+” button, click on it!
In the window that appears, click on iOS Version and then on download more simulator runtimes
Now click on the “+” in the bottom left corner and select the type of simulator (In my case iOS)
Now just select the version to download and once it is complete and finished installing, I advise you to restart your Mac
Now you just need to create a new emulator with version 16.4, for example on iOS.
Remember to change the preview below to the new device with iOS 16.4
If this doesn’t work go to ~/Library/Developer/CoreSimulator, Delete all folders inside, then uninstall the simulators.
Here on my Mac this approach works, it seems to be a bug in iOS 17, I can’t say that, I hope it helps someone else.