Does anyone else get this, like every 5 minutes when working with SwiftUI previews in Xcode 16? It's maddening…
Does anyone else get this, like every 5 minutes when working with SwiftUI previews in Xcode 16? It's maddening…
@matt1corey https://iosdev.space/@slow_brewed/113105967990199465
And
https://iosdev.space/@slow_brewed/113109760612404573
I do have to say in the now stable release of Xcode 16, it’s gotten better. I still get crashes at least once an hour. But it is way more tolerable.
I have some serious concerns about the last or latest Xcode beta Previews still crashing every 5 mins so late in the game. The solution to getting it to work again is a full reboot of Xcode. I hope they get this fixed before the full release this week. #xcode16 #iOSDev #SwiftDevCommunity #SwiftDev
@slow_brewed Oh, look at that, there was a new Xcode released yesterday. That's slightly embarrassing :)
Let's see if this does any better
@matt1corey @jandamm I've enabled this recently and it has helped quite a bit. Might help in your case too in really reducing the frequency of the crashes. I only noticed it recently. There is a possibility that there is a new execution environment for Previews that's still quite in beta mode.
@matt1corey @jandamm Did some more digging. This issue could be due to in-place Xcode upgrades through beta versions. Each instance is separate, but caches, files, and binaries may still be shared after an older version is removed.
I’ve now done a full absolute cleanup/removal of Xcode + junk stuff, rebooted, and am reinstalling v16.0 from scratch (including simulators). I’ll test it through Sunday and report. Hopefully, this fixes it—TBD.
1 - I used DevCleaner to remove all simulators and DerivedData (https://github.com/vashpan/xcode-dev-cleaner).
2 - I followed that up with some of the stuff from here: https://byby.dev/uninstall-xcode
3 - I used PearCleaner (my favorite uninstaller) to do a full delete of all versions of Xcode I've got stored: https://github.com/alienator88/Pearcleaner
Fair warning though, because this is as much of a clean up as you can do, you might lose some preferences and might have to set those up again.
Extensions do remain.
@slow_brewed @jandamm Welp, after taking these steps, I had a crash within 5 minutes 😠
I didn't do a full uninstall/reinstall, so that's the next step, I guess
@matt1corey @jandamm OK, last one... I know, I keep chasing this. But hear me out:
during the betas and even after going with the stable versions, until the full cleanup I mentioned earlier, I could no longer get Xcode Previews to work on a physical device.
The cleanup resolved that too.
@matt1corey @jandamm @MuseumShuffle So it's early results. But I worked a few hrs last night into early Sunday and it's been fantastic. Quick reloads (no longer sluggish), zero crashes. 👀
That's on two relatively large projects opened simultaneously, multiple Previews macros for different UI checks in some Views.
Env: base MBP M1 with16 GB RAM, Sequoia 15.1 Beta 3, Xcode 16.0, iOS 18.0 sims, watchOS 11.0 sims.
Based on this, I guess we can say we're probably good with the cleanup solution.