I want to use a local database and I'm using fmdb
library.
now I want to open my local database but I got this error :
value of type stringByAppendingPathComponet
my code:
func openDatabase() {
let resourcePath = Bundle.main.resourceURL!.absoluteString
let dbPath = resourcePath.stringByAppendingPathComponent(dbFileName)
let database = FMDatabase(path: dbPath)
/* Open database read-only. */
if (!database.openWithFlags(1)) {
print("Could not open database at \(dbPath).")
} else {
self.database = database;
}
}