I'm using SQLite.swift to run queries on a .db file in my Xcode project, and I keep receiving "code: 26 -- file is not a database" when I try to connect to the database from the documents folder on the device.
When I use the file path to the .db file in on my desktop, it has no problem running my queries. When I add the file to Xcode, however, it comes up with code 26 whether I try to access it from the Bundle.main path or when I copy it to the device's documents folder and try to access it there. If I use the terminal to open the database, it opens in my SQLite viewer just as it would if I accessed it in my desktop. Thus, I know it is a .db file, I know my code can work with this file, but when I try to access it on the device, it somehow doesn't recognize it as a database!
Thanks for your help. This has been plaguing me for days, and I can't figure out what the heck is going on!