SwiftUI - preview stopped working on one specific device

Viewed 662

I was using the iPhone 11 preview until I made some changes to CoreData - now I'm getting a persistent store migration error. If I switch to a different preview profile, everything works as expected.

My question is, how do I reset the iPhone 11 profile? In the simulator I would just erase the app and start over. But I'm not sure how to do that with Canvas. Thanks!

2 Answers

I finally came across the solution, thanks to @Monica Granbois.

First delete:

~/Library/Developer/Xcode/UserData/Previews/Simulator Devices/

Then run this line at the terminal:

killall -9 com.apple.CoreSimulator.CoreSimulatorService

In my case that was a simulator iOS version which was causing a problem. My simulators was using version 13, 13.7 and 15.x. I had the problem only under 13.x and not under 15.x

Related