Hi I used this SQLCipher(http://sqlcipher.net/ios-tutorial/) to encrypt my sqlite but when I compile I met this error
"_sqlite3_key", referenced from:
-[LCAppDelegate application:didFinishLaunchingWithOptions:] in LCAppDelegate.o
Symbol(s) not found for architecture i386
It happened when I used this code in my AppDelegate
#import <sqlite3.h>
...
NSString *databasePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
stringByAppendingPathComponent: @"sqlcipher.db"];
sqlite3 *db;
if (sqlite3_open([databasePath UTF8String], &db) == SQLITE_OK) {
const char* key = [@"BIGSecret" UTF8String];
sqlite3_key(db, key, strlen(key));
if (sqlite3_exec(db, (const char*) "SELECT count(*) FROM sqlite_master;", NULL, NULL, NULL) == SQLITE_OK) {
// password is correct, or, database has been initialized
} else {
// incorrect password!
}
sqlite3_close(db);
}
Anyone know how to solve this? Please help me !!!