I followed your example and when I try to set the name of the DB via NSString (see below) I get an Error 400. When I change it back to static definition @“test” it works!
What am I missing ?
NSString* localDBName = @"dbName";
// Initialize Couchbase Lite and find/create my database:
NSError* error;
self.database = [[CBLManager sharedInstance] createDatabaseNamed: localDBName error: &error];
You’re trying to use a name containing uppercase letters. For compatibility reasons, database names only allow lowercase (and digits and a small set of punctuation).
If you look at the NSError you got back, there was a clue in the message: “Invalid database/document/revision ID”.