Swift Data Recovery

Hi

Writing an app in Swift on Xcode for my iPhone, all software is the latest version.

If after making a minor change and re-building all the application data has disappeared, is there a way to see if it is still in the .modelContainer and just not showing up?

First of all you should check the console and check if you get any warning messages when you run the app and access your data.

if nothing shows up then you can turn on sql debug logging to help you figure out what is happening. See this article from the Hacking With Swift website on how to do that, https://www.hackingwithswift.com/quick-start/swiftdata/using-launch-arguments-to-debug-swiftdata-and-core-data

Also, I'd say that providing more context, such as what change you made, how to trigger the issue, and what error message you get will help. See tips on writing forums posts, if necessary.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Swift Data Recovery
 
 
Q