0
나는 데이터베이스를 생성하는 코드 아래했지만, 이것이 내가에서 잘못 가고처럼 보이는
let part1DbPath = "/Users/username/Documents/"
import UIKit
class ViewController: UIViewController {
let part1DbPath = "/Users/username/Documents/"
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func openDatabase() -> COpaquePointer {
var db: COpaquePointer = nil
if sqlite3_open_v2(part1DbPath, &db, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, "") == SQLITE_OK {
print("Successfully opened connection to database at \(part1DbPath)")
return db
} else {
print("Unable to open database. Verify that you created the directory described " +
"in the Getting Started section.")
}
return db
}
}
근처 나 실행 시간 동안 브레이크 포인트 오류를 스레드 반환
데이터베이스 경로 선언. 이게 뭐가 잘못 됐니? 어떻게 작동하게합니까? 어떤 도움
어디에서 응용 프로그램을 실행하고 있습니까? 시뮬레이터 또는 실제 장치? –
@LucaDavanzo 시뮬레이터를 사용 중입니다. – SunShine
아래에서 대답을 읽으면 간단히 중단 점이 설정됩니다. 걱정하지 마십시오! –