Good day.
There is an ios swift application that uses sqlite3 for data storage.
To this application, I screwed SQLCipher to work with an encrypted database, I did the integration through cocaopods ( https://cocoapods.org/pods/SQLCipher ). Everything works perfectly.
The problem begins when I integrate the appliance from Yandex ( https://github.com/yandexmobile/metrica-sdk-ios/blob/master/YandexMobileMetrica.podspec ). After integration, the code on the sqlite3_key function is simply not executed; however, there is no crash and no messages in the console.
YandexMobileMetrica also uses sqlite3 + SQLCipher and some kind of conflict apparently occurs, can it somehow be solved?
The test application code is simple:
var db: COpaquePointer = nil let documentsPath : AnyObject = NSSearchPathForDirectoriesInDomains(.DocumentDirectory,.UserDomainMask,true)[0] let path = documentsPath.stringByAppendingString("/data.db") if (sqlite3_open(path, &db) == SQLITE_OK) { print("open") let key = "secret" sqlite3_key(db, key, Int32(key.utf8.count)) if (sqlite3_exec(db, "SELECT count(*) FROM books;", nil, nil, nil) == SQLITE_OK) { print("ok") } else { print("no") } sqlite3_close(db); }