简体   繁体   中英

iOS Couchbase: Shared CBL manager between app and app extension

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM