Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

error getting database Error Domain=SQLite Code=1 "no such module: fts4" UserInfo=0x7fdc0ae21de0 {NSLocalizedDescription=no such module: fts4} #37

Open
liufsd opened this issue Nov 25, 2014 · 3 comments

Comments

@liufsd
Copy link

liufsd commented Nov 25, 2014

HI,i have clone your project and run success.
and then i add this library to my project :https://www.zetetic.net/sqlcipher/ios-tutorial/
But it will exit.
code here:
CBLManager *manager = [CBLManager sharedInstance];
NSError *error;
self.database = [manager databaseNamed:@"recite_db" error:&error];
if (error) {
NSLog(@"error getting database %@",error);
exit(-1);
}
log here:

2014-11-25 18:34:30.039 Recite_IOS[92671:434274] Error calling sqlite3_step (1: no such module: fts4) SQLITE_ERROR
2014-11-25 18:34:30.040 Recite_IOS[92671:434274] DB Query: CREATE VIRTUAL TABLE fulltext USING fts4(content, tokenize=unicodesn)
18:34:30.041| WARNING: CBLDatabase: Could not initialize schema of /Users/liupeng/Library/Developer/CoreSimulator/Devices/50A64A93-FFA7-41A5-8C14-004429011B37/data/Containers/Data/Application/DA116901-9C14-4CD1-841D-F98D8090D89A/Library/Application Support/CouchbaseLite/recite_db.cblite -- May be an old/incompatible format. SQLite error: no such module: fts4
2014-11-25 18:41:19.384 Recite_IOS[92671:434274] error getting database Error Domain=SQLite Code=1 "no such module: fts4" UserInfo=0x7fdc0ae21de0 {NSLocalizedDescription=no such module: fts4}

(you can clone this project :https://github.com/79144876/SQLCipher-iOS.git,and add couchbase: for test.)
I guess,may be at this time your couchbase call the sqlite is SQLCipher's custom sqlite.so.may be not support ,and then crash.
if right.how to fix it ?(couchbase and SQLCipher in same project.)
thanks.

@snej
Copy link
Contributor

snej commented Nov 25, 2014

Look at the error: it says "no module fts4". CBL needs that SQLite module. You'll need to build sqlcipher with it.=

@liufsd
Copy link
Author

liufsd commented Nov 26, 2014

Yes. i have try add a new flag -DSQLITE_ENABLE_FTS4 flag within the Other C Flags of the project at last night. but it look like not working also.i will fix it by myself today.
Thanks.

@liufsd
Copy link
Author

liufsd commented Nov 26, 2014

I have post my code here:https://github.com/79144876/CouchbaseQuery
And also question here:sqlcipher/sqlcipher#102 (comment)
Maybe you can help me.
Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants