Hi,
I've copy and pasted (almost word for word) the example from the
documentation on how to use NSNotifications to track a replication from
your website.
My replications themselves work great - no problems at all.
However, the below function only gets called *once* when the iOS app first
starts up (I set a breakpoint).
After that, I get nothing. (Sad).
But, if I turn on all the debugging flags, I clearly see that the
replication is working normally and I can see the progress messages X/Y
completed documents and so for. (I have about 5000 documents in my database
that are getting replicated).
Any ideas why I'm not getting any future change notifications?
- (void)pushChanged:(NSNotification *)notification {
CBLReplication *push = notification.object;
unsigned completed = push.completedChangesCount;
unsigned total = push.changesCount;
NSLog(@"COUCH: push %u/%u", completed, total);
}
// and then later, I do this:
NSURL * url = [NSURL URLWithString: foo];
CBLReplication *push = [db createPushReplication:url];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(pushChanged
:)
name:
kCBLReplicationChangeNotification
object: push];
push.continuous = YES;
[push start];
Thanks!
- Michael Hines
--
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/8b0f064a-ffda-495d-8ea6-ae82b3d27f91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.