I found a workaround, but its still pretty weird. The workaround was to 
stop/start the live query after the query gets updated in the 
couchTableSource:updateFromQuery:previousRows: method. This seems to to 
allow it receive future notifications.

On Friday, November 28, 2014 12:46:37 PM UTC-5, Julian Paas wrote:
>
> I have an iOS app that uses a few live queries and they all work quite 
> well, except the first time the app is launched. My app is a basic CRUD app 
> showing CBLModels in lists. The app starts with an empty table backed by a 
> CBLUITableSource. Nothing else can happen until at least one CBLModel is 
> added to that list. Any CBLModels I add are persisted, but the livequery 
> backing the list never gets notified of any changes. But this ONLY happens 
> on first launch. If I kill the app and restart it, the models I added 
> appear in the list and the live query works from then on. I can add, 
> delete, edit to my heart's content and all of those changes will be picked 
> up by the live query. Its only the first time that it never works. I've 
> turned on verbose debugging and I don't see any errors. I've attached two 
> logs, one that shows what happens on first launch and another that shows 
> what happens on the second launch.
>
> I also tried launching the app once, then killing it and restarting before 
> adding my first model, and it worked fine. What is happening here?
>

-- 
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/ee94be90-8ba3-4f8d-ae8d-77eccf217c77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to