Hello I am unable to observe and monitor replication..Pull replication is
working fine I got all the documents but could not observe replication
through *kCBLReplicationChangeNotification*. I have used your code from
your documentation. I am using latest CBLITE 1.2.1. I am using all code in
main thread.The replication function is called only once when I start my
app.Here is my code :
NSURL* newRemoteURL = [NSURL URLWithString:syncUrl];
if (newRemoteURL) {
_pull = [database createPullReplication:newRemoteURL];
CBLReplication *push = [database createPushReplication
:newRemoteURL];
NSNotificationCenter* nctr = [NSNotificationCenter defaultCenter];
[nctr addObserver:self selector: @selector(replicationProgress1:)
name: kCBLReplicationChangeNotification object: _pull];
_pull.continuous = YES;
if (!kSyncGatewayWebSocketSupport) {
_pull.customProperties = @{@"websocket": @NO,@"normal": @YES};
}
[_pull start];
}
- (void)replicationProgress1:(NSNotification*)n
{
Bool active = (_pull.status == kCBLReplicationActive)
}
I have tried everything but couldnt succeed .Please help me out as I need
to call my function when replication stops.
--
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/ba8f35e5-6b22-4e3e-bf20-26f66a02c50d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.