AvdLee / RocketSimApp

Enhancing the iOS simulator for productivity
600 stars 20 forks source link

Reset or remove Swift Data or Core Data #444

Open creednmd opened 9 months ago

creednmd commented 9 months ago

Would be nice to be able to remove or reset Swift Data or Core Data from a Simulator in the early days of app development, when it’s changing a lot and may cause model incompatibility, without having to Erase All Content or Settings… every time.

Doing the later works, but obviously is a ’scorched earth’ option, that deletes a bunch of other stuff as well.

AvdLee commented 9 months ago

I'm actually going to build a Simulator Time Machine which allows you to go back to a certain version of your app. That might directly solve this as well, as you could 'reset to clean install'.

Also, for this case, wouldn't a clean install be suitable enough too? I don't think you need to Erase All Content or Settings for just clearing the SwiftData or Core Data database 🤔

creednmd commented 9 months ago

Manually deleting the app from the Simulator—if that’s what you mean by 'clean install'—does delete the database, but lot of clicks and time reloading to get to that state, when a smooth way to handle database versions would be more desirable.

AvdLee commented 9 months ago

Makes total sense! 👌