SQLite not working on iOS 10

I’m using SQLite in my app, it works fine but not on my test device (iPhone 5 iOS 10). Creating a table doesn’t work:

CREATE TABLE IF NOT EXISTS tickets (id INTEGER PRIMARY KEY, barcode TEXT, tickettype_id INTEGER, first_name TEXT, last_name TEXT, seat TEXT

it returns:

[Error: could not prepare CREATE TABLE IF NOT EXISTS tickettypes (id INTEGER PRIMARY KEY, name TEXT, voucher BOOL, multiple_days BOOL, guest_ticket BOOL, valid_start TEXT, valid_end TEXT)]

code:

this.db = SQLite.openDatabase('db');
    this.db.transaction(tx => {
      tx.executeSql('CREATE TABLE IF NOT EXISTS tickettypes (id INTEGER PRIMARY KEY, name TEXT, voucher BOOL, multiple_days BOOL, guest_ticket BOOL, valid_start TEXT, valid_end TEXT)', null, null, (e, error)=> {
        console.log(error)
      })

Hi @sweebee-

This looks the same as this Github issue which has since been fixed/closed. However, the fix will come with SDK 34 (which should be released soon, probably in the next week or so)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.