September 4, 2015, 3:46pm
I’m having issues integrating the Grocery Sync app to my iOS project. The project is a mix of C++ and Objective C. I’ve got it all compiling and running, but it seems that my document is not saving. I can’t get any log output even though I have set
[CBLManager enableLogging: @"Database"];
[CBLManager enableLogging: @"Query"];
I can see log output from
The result of
[doc putProperties: document error: &error] shows
null for both
What would be good places to look to help debug the issue?
September 4, 2015, 4:05pm
doc is nil.
If NSLog doesn’t work, something’s pretty wrong … I’d focus on that first.
September 4, 2015, 4:12pm
I was mistaken about that - NSLog does work.
Yes you’re right,
CBLDocument* doc = [database createDocument]; is returning nil.
Can I check for an error there?
September 4, 2015, 5:55pm
-createDocument should never return nil. Check whether
database is nil.
September 4, 2015, 6:34pm
Thanks - that was it - I’d not passed in the database instance from the delegate object.