Aaron Zinman
Aaron Zinman

Reputation: 2754

What version of sqlite does iOS provide?

What version of Sqlite does iOS include?

Upvotes: 34

Views: 15472

Answers (8)

Iulian Onofrei
Iulian Onofrei

Reputation: 9730

This wiki has the latest list:

iOS Version SQLite Version
2.2 3.4.0
3.1.3 3.6.12
4.0.2 3.6.22
4.1.0 3.6.23.2
4.2.0 3.6.23.2
5.1.1 3.7.7
6.0.1 3.7.13
7.0 3.7.13
7.0.6 3.7.13
8.0.2 3.7.13
8.2 3.8.5
9.0 3.8.8
9.3.1 3.8.10.2
10.0 beta 2 3.13.0
10.0 GM 3.14.0
10.2 3.14.0
10.3.1 3.16.0
11.0 3.19.3
12.0 3.24.0
12.1 3.24.0
13.1.3 3.28.0
14.1 3.32.3
14.2 3.32.3
14.4 3.32.3
14.5 3.32.3
14.8 3.32.3
15.0 3.36.0
15.1 3.36.0
15.2 3.36.0
15.4.1 3.37.0
15.6.1 3.37.0
16.0 3.39.0
16.0.3 3.39.0
16.5.2 3.39.5
macOS Version SQLite Version
10.9 3.7.13
10.10 3.8.5
10.10.3 3.8.5
10.11 3.8.10.2
10.12 3.14.0
10.13 3.19.3
10.14.2 3.24.0
12.4 3.37.0
12.5 3.37.0
12.6 3.37.0
13.2 3.39.5

Upvotes: 44

thachnb
thachnb

Reputation: 1533

Update Nov 2020 with iOS 14

  ╔═════════════╦════════════════╗
  ║ iOS Version ║ SQLite Version ║
  ╠═════════════╬════════════════╣
  ║ 13.1.3      ║ 3.28.0         ║
  ╠═════════════╬════════════════╣
  ║ 14.1        ║ 3.32.3         ║
  ╚═════════════╩════════════════╝

Upvotes: 2

lal
lal

Reputation: 8140

Use following to printout the version in your code. You may define following as a separate debug only function and call it from didFinishLaunchingWithOptions in your appDelegate.

#if DEBUG
// Int representing version; e.g. "3016000" for macOS 10.12.4
int sqliteVersion = sqlite3_libversion_number();
NSLog(@"Sqlite Version: %d", sqliteVersion);

// String representing version; e.g. "3.19.3" for iOS 11
const char *sqliteLibVersion = sqlite3_libversion();
NSString *sqliteLibVersionStr = [NSString stringWithUTF8String:sqliteLibVersion];
NSLog(@"Sqlite Lib Version: %@", sqliteLibVersionStr);

// String representing sourceId; e.g. "2017-06-27 16:48:08 2b09...2e2377b" on iOS11
const char *sqliteSourceid = sqlite3_sourceid();
NSString *sqliteSourceidStr = [NSString stringWithUTF8String:sqliteSourceid];
NSLog(@"Sqlite SourceID: %@", sqliteSourceidStr);
#endif

Alternatively, look at sqlite3.h directly in Xcode. For iOS 11:

#define SQLITE_VERSION        "3.19.3"
#define SQLITE_VERSION_NUMBER 3019003
#define SQLITE_SOURCE_ID      "2017-06-27 16:48:08 2b09...2e2377b"

sqlite3.h also has other methods that can be used for debugging purposes.

Upvotes: 2

Yogesh Suthar
Yogesh Suthar

Reputation: 30488

In iOS 9.0 the SQLite version is 3.8.10.2

Upvotes: 1

dalexsoto
dalexsoto

Reputation: 3412

SQLite has been updated in iOS 8.2 to version 3.8.5

Upvotes: 3

stuckj
stuckj

Reputation: 996

Just do:

p (const char*) sqlite3_libversion()

in a debugger running an app (that links to the sqlite lib) on a device on which you want to know the sqlite version.

On an iOS 8.0.2 iPhone 5s I get 3.7.13 so it seems they haven't changed version in a while based on reports in the other answers that version 6.0 used the same version.

Upvotes: 7

ReDetection
ReDetection

Reputation: 3186

I've just checked on the iOS 7:

7.0: 3.7.13

Upvotes: 10

Aaron Zinman
Aaron Zinman

Reputation: 2754

Using SELECT sqlite_version() on various iOS versions:

From the internets:

2.2: 3.4.0
3.1.3: 3.6.12
4.0.2: 3.6.22
4.1.0: 3.6.23.2
4.2.0: 3.6.23.2

I just tested now:

6.0.1: 3.7.13

Upvotes: 12

Related Questions