I am using FMDB as a submodule. I Also need the database encryption. Going by the implementation file
- (BOOL)setKeyWithData:(NSData *)keyData {
#ifdef SQLITE_HAS_CODEC
if (!keyData) {
return NO;
}
int rc = sqlite3_key(_db, [keyData bytes], (int)[keyData length]);
return (rc == SQLITE_OK);
#else
return NO;
#endif
}
Encryption/Decrytion requires following settings
1.Build Settings -> Preprocessor Macros-> SQLITE_HAS_CODEC=1
2.Build Settings -> "Other C Flags" —>DSQLITE_HAS_CODEC
Although setting this value in my project which contains FMDB as submodule, doesn’t have any effect i.e. key is not set.
However if this settings is changed in FMDB project which is a submodule , everything is all right.
How can i override SQLITE_HAS_CODEC from the original project which include FMDB as submodule