Hi,
I have the following code which saves a document to the localDocument store:
- (void)saveSelectedPeers {
NSArray *peerTxtRecords = [self.selectedPeers.allValues valueForKey:
@"txtRecord"];
NSError *error = nil;
CBLJSONDict *peersDict = @{@"peers" : peerTxtRecords};
BOOL success = [self.databaseDocument.couchDatabase
putLocalDocument:peersDict
withID:@"selected-peers" error:&error];
if (!success) {
TFFLog(@"Error saving selected peer: %@", error);
}
}
The contents of the peersDict is this:
{
peers = (
{
dev = "MacBookPro11,3";
seq = 140885;
service = "db-85190f3b780d45449c2f17f8d1d86e1f@Voyager";
user = "Brendan Duddridge";
}
);
}
However, the success flag returns NO even though the NSError is nil on the
return.
If the result is NO, should there be a reason why put into the NSError
parameter?
I'm using the latest Couchbase Lite branch
(c5fb2ee30f0a16895c93415d9276b93366296160) from master on iOS 9.2.
Thanks,
Brendan
--
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/1fbb4dfe-f2e5-4111-9b4c-9cc1e4bfac94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.