I have use Sqlite (sqlcipher) in my iOS project for database. In iOS 9 all things are working perfectly. Now i have update new Xcode. But DB encryption is not working now.
sqlite3 *db1;
if (sqlite3_open([[self.databaseURL path] UTF8String], &db1) == SQLITE_OK) {
const char* key = [g_sqlite_key UTF8String];
AZLog(@"%s",key);
sqlite3_key(db1, key, (int)strlen(key));
if (sqlite3_exec(db1, (const char*) "SELECT count(*) FROM sqlite_master;", NULL, NULL, NULL) == SQLITE_OK) {
AZLog(@"Password is correct, or a new database has been initialized");
} else {
AZLog(@"Incorrect password!");
}
sqlite3_close(db1);
}
Can anyone help me ?
Thanks in advance