Hi, The following error is returned when we call the *"databaseNamed*:" method and the iOS app gets crashed after that.
Dec 10 11:40:45 ITD-0002 BEST[436] <Warning>: Unknown error calling
sqlite3_step (11: database disk image is malformed) rs
Dec 10 11:40:45 ITD-0002 BEST[436] <Warning>: WARNING: CBLDatabase: Could
not initialize schema of
/var/mobile/Containers/Data/Application/9C58CE5E-0260-4761-A799-B5B6AB106837/Library/Application
Support/CouchbaseLite/cabincrew.cblite -- May be an old/incompatible
format. SQLite error: database disk image is malformed
Please find below the code that has been written to call the databaseNamed:
method. Also, the device console log, crash log are attached for your
reference. Could you please help to fix this problem.
+ (BOOL)createDataBase:(NSString *)databaseName {
BOOL status = false;
CBLManager *cblManager = [[CBLManager sharedInstance]copy];
BOOL isvalidDBName = [CBLManager isValidDatabaseName:databaseName];
if (isvalidDBName) {
NSError *error;
CBLDatabase *couchDB = [cblManager databaseNamed:databaseName
error:&error];
if (couchDB != nil) {
couchDB.maxRevTreeDepth = 1;
[couchDB setFilterNamed:P2P_REPLICATION_FILTER_NAME
asBlock:^BOOL(CBLSavedRevision *revision, NSDictionary *params) {
if ([[revision.properties objectForKey:@"shared"]
boolValue] || revision.isDeletion) {
return YES;
} else {
return NO;
}
}];
status = true;
}
}
return status;
}
Thanks & Regards,
Phaniteja N
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/e309ac58-b3e5-43af-8e18-0f7539314d9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
BEST 10-12-14 11-02 31324am.crash
Description: Binary data
BEST_Appcrash_device_log.rtf
Description: RTF file
