2
votes

I'm trying to implement a shared couchbase database between an iOS application and app extension, but there is an issue with consistency between the two targets.

When the application manager deletes the database document in couchbase lite iOS, the app extension manager gets outdated.

Does anyone know how to inform the extension manager about this deletion?

The database is saved in a shared App group.

I've tried to make a pull replication for the database in my extension, which doesn't work as expected.

If I create a new manager every time I read from the database from my extension, it works as expected, but this will create a new thread for every read.

Thank you!

1
What do you mean it "gets outdated"? - pomo
The app extension manager doesn't include the changes made inside the application on the database (such as deletions or changes). - PAK
That's strange. I have it working. Well partially. The changes feed & replications don't work. But if I write to the database in the app extension that data does appear in the main app. - pomo

1 Answers

0
votes

This blog and associated sample app illustrates sharing of data between iOS app and a Today app extension.
There appears to be an issue with replication from within iOS App extensions which is tracked here.