SQLInternalFileURL = URL.init(fileURLWithPath: Bundle.main.path(forResource: SQLFileName, ofType: SQLFileExtension)!)
if (FileManager.default.fileExists(atPath: SQLInternalFileURL.path)) {
var internalDB:FMDatabase = FMDatabase(url: SQLInternalFileURL)
guard internalDB.open(withFlags:0x00000001) else {
…
}
} else {
…
}
Any gotchas with this that I should be aware of?
‘SQLITE_OPEN_READONLY’ wasn’t recognized in Swift (UIKit)