stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.59k stars 1.55k forks source link

Insert Query issue. #1045

Closed DedicatedDev closed 3 years ago

DedicatedDev commented 3 years ago

func saveWordToDB(with savedWord:SavedWord)->Future<Bool,Error>{ return Future<Bool,Error> { promise in let dbQuery = "INSERT INTO SAVEDWORDS VALUES(\"(savedWord.word!)\",\"(savedWord.date!)\")" do { try self.database.run(dbQuery) promise(.success(true)) }catch{ print(error.localizedDescription) promise(.failure(error)) } } }

this code is working very well in simulator but not working in real device. not sure why this is happened.

updev0612 commented 3 years ago

repeated question. you can't use bundle resource.

DedicatedDev commented 3 years ago

just solved my problem. thanks.