when I run the following code in swift playground it returned success. When I copied it to my Xcode project it returned failure. I figure it has something to do with the path so I googled and tried, path.cString(using: String.Encoding.utf8) but still no luck. what I don't understand is why it works in playground but not in the app itself.
var db: OpaquePointer? = nil;
let path:String="/Users/williamstorey/Documents/db182.db"
if sqlite3_open(path ,&db) == SQLITE_OK {
print("SUCCESS")
} else {
print("FAILURE");
}