Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ViewController: UIViewController {
- var db :sqliteConnect?
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view, typically from a nib.
- // 資料庫檔案的路徑
- let urls = FileManager.default.urls(
- for: .documentDirectory, in: .userDomainMask)
- let sqlitePath = urls[urls.count-1].absoluteString + "sqlite3.db"
- // 印出儲存檔案的位置
- print(sqlitePath)
- // SQLite 資料庫
- db = SQLiteConnect(path: sqlitePath)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement