我注意到这个链接中: https://realm.io/news/thomas-goyne-fast-inter-process-communication/
它声明 Realm 内支持进程间通信。这是否意味着我在应用程序及其共享扩展在 ios 中打开数据库都没有问题。 如果是这样,对于 Realm 对象类,我是否需要将它们放入某个框架中,或者为了简单起见,我可以在应用程序和应用程序扩展中复制该类吗?
最佳答案
It states that inter process communication is supported in realm.
没错!
Does that mean I will have no problem opening the database in both an app and its share extension in ios.
这就是计划!
If so, for the realm object class, do I need to put them in some framework or can I just duplicate the class in both the app and app extension just for simplicity?
这两种方法都可以。
我们关于进程间 Realm 访问的文档非常少,因为按照设计,它应该“正常工作”,但事实上,您链接到的博客文章是 Realm 声明支持多进程访问的唯一地方,这一事实是可笑的,这就是为什么我们有 #3362跟踪改进我们关于该主题的文档。
关于ios - 在 ios swift 中使用 Realm 作为应用程序和共享扩展?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37004501/