Import sqlite database to SwiftData

Hello, I recently switched my app from flutter which was using sqlite3 database. I would like to migrate my existing users to SwiftData. The issue is I do not know where to start in finding the database for the current users, reading the data and inserting into the SwiftData schema.

I tried searching but not clear on how to proceed. Any help pointing in the right direction would be great. Thanks.

I do not know where to start in finding the database for the current users

If the Flutter docs don’t tell you where it is, use the “download app container” function in the Devices and Simulators window, and look for it.

reading the data

Google “swift sqlite” will find StackOverflow posts and github projects describing how to access sqlite databases from Swift.

and inserting into the SwiftData schema.

Someone else can comment on that; I don’t know much about SwiftData.

Import sqlite database to SwiftData
 
 
Q