I am watching the 'completedChanges' property. I'll switch to watching the 'status' property.
On Feb 27, 2014, at 4:09 PM, Jens Alfke <[email protected]> wrote: > > On Feb 27, 2014, at 3:17 PM, Alan McKean <[email protected]> wrote: > >> I am starting a pull replication on app launch and I put up a progress >> indicator to show progress. I hide the progress indicator in my observer >> (observeValueForKeyPath:ofObject:change:context:). The first time I launch >> all goes well. The progress indicator hides when the last change comes in. >> However, when I launch a second time, I get no callbacks on the observer. > > What property are you observing? > > I've found that to display a progress UI you need to observe multiple > properties. So I tend to use NSNotificationCenter instead to observe the > kCBLReplicationChangeNotification. That way my observer gets called when any > of the properties change. > >> Or is there a better way to know when the pull has completed, even if it did >> nothing due to no changes on the remote server? > > Watch for the 'status' property to change to 'idle'. > > --Jens > > > -- > You received this message because you are subscribed to a topic in the Google > Groups "Couchbase Mobile" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/mobile-couchbase/6RCtOMsm5RY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/mobile-couchbase/15330F58-A066-44C1-BA14-F2736D641AFA%40couchbase.com. > For more options, visit https://groups.google.com/groups/opt_out. -- 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/90575A4F-3A85-4639-92C8-9E29EDBA3348%40me.com. For more options, visit https://groups.google.com/groups/opt_out.
