I'm new to all this, but I've managed to finish coding my first simple Swift/SwiftUI App. It includes a SQlite DB that I've pre-populated with my data, and I manage it using SQLite.swift. The app is working fine using the iPad simulator in XCode. I tried to test the App on a physical device (iPad 7th generation), but the DB doesn't transfer (or if it is transferring, it isn't recognized). Instead, the App on the iPad creates a new DB with no records. I confirmed that the DB is in the Documents folder when run in the simulator, but the same check on the iPad confirms that there's only a new empty DB.
Here are the first few relevant lines of the function I'm using to find the DB:
func conceptListForAuthor(chosenAuthorIndex: Int, chosenConceptIndex: Int) -> Array<String>{
do{
let path = NSSearchPathForDirectoriesInDomains(
.documentDirectory, .userDomainMask, true
).first!
let quoteDB = try Connection("\(path)/quoteDB.sqlite3")
I've searched extensively for an answer, and even submitted a tech support request on Apple Developer, but with no response. I found one question on stackoverflow that seems to address this question, but for an app that doesn't use SQLite.swift, so I'm not sure how to use the recommended solution.
Is there a way to code my app so the DB will be recognized when tested on the iPad and prevent the app from creating a new empty DB?