ForestDb

54 views
Skip to first unread message

Raj Shekhar

unread,
Jul 15, 2015, 12:06:20 PM7/15/15
to mobile-c...@googlegroups.com
Hello All I want to use ForestDb as a storage device. I have imported the latest cblite community edition i.e 1.1 and also imported 'libCBLForestDBStorage.a' from extras.But I got error when I try to write :

CBLManager *mgr=[CBLManager sharedInstance];
mgr.storageType=@"ForestDB"  -(Property StorageType is not found on CBLManger).

Please help me guys to rectify this problem.

Jens Alfke

unread,
Jul 15, 2015, 12:35:36 PM7/15/15
to mobile-c...@googlegroups.com

On Jul 15, 2015, at 2:49 AM, Raj Shekhar <rajshe...@gmail.com> wrote:

CBLManager *mgr=[CBLManager sharedInstance];
mgr.storageType=@"ForestDB"  -(Property StorageType is not found on CBLManger).

Oops, it looks like I forgot to move the declaration of the storageType property into the public API before the 1.1 release. It exists, it’s just not declared in CBLManager.h.

For now you can work around this by adding your own declaration of it in your source file:

@interface CBLManager (OopsNotDeclared)
@property (copy, nonatomic) NSString* storageType;
@end

Alternatively you can register a user default:

[[NSUserDefaults standardUserDefaults] registerDefaults: @{@“CBLStorageType”: @“ForestDB”}];

(I think the other developers who’ve been using ForestDB must all be doing it that way, because none of them reported that the Obj-C property is missing…)

—Jens

Raj Shekhar

unread,
Jul 16, 2015, 2:18:00 AM7/16/15
to mobile-c...@googlegroups.com
Thanks Jens ,I will implement 'register user default' way...

Raj Shekhar

unread,
Jul 16, 2015, 2:52:51 AM7/16/15
to mobile-c...@googlegroups.com
Jens ,I have implemented ForestDB but now my live query in all the projects is not working and when I removed 'ForestDB' it works well.I am unable to identify the problem. 

Jens Alfke

unread,
Jul 16, 2015, 11:52:17 AM7/16/15
to mobile-c...@googlegroups.com

On Jul 15, 2015, at 11:52 PM, Raj Shekhar <rajshe...@gmail.com> wrote:

Jens ,I have implemented ForestDB but now my live query in all the projects is not working and when I removed 'ForestDB' it works well.I am unable to identify the problem. 

Well, if you can describe what “not working” means, maybe we can try to diagnose it.

The first thing to do would be to turn on some logging (see the wiki for details if you don’t know how). Try the ‘Query’ flag.

—Jens
Reply all
Reply to author
Forward
0 new messages