简体   繁体   English

在ios swift中使用领域进行app和共享扩展?

[英]Using realm for app and share extension in ios swift?

I noticed that in this link: https://realm.io/news/thomas-goyne-fast-inter-process-communication/ 我注意到在这个链接: https//realm.io/news/thomas-goyne-fast-inter-process-communication/

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. 这是否意味着我在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? 如果是这样,对于领域对象类,我是否需要将它们放在某个框架中,或者为了简单起见,我可以在应用程序和应用程序扩展中复制该类吗?

It states that inter process communication is supported in realm. 它指出了进程间通信是在领域中得到支持的。

That's correct! 那是对的!

Does that mean I will have no problem opening the database in both an app and its share extension in ios. 这是否意味着我在ios中的应用程序及其共享扩展中打开数据库没有问题。

That's the plan! 那是计划!

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? 如果是这样,对于领域对象类,我是否需要将它们放在某个框架中,或者为了简单起见,我可以在应用程序和应用程序扩展中复制该类吗?

Either approach is fine. 两种方法都没问题。


We have very little docs on inter-process Realm access because by design, it should "just work", but the fact that the blog article you linked to is the only place where Realm states that multiprocess access is supported is laughable, which is why we have #3362 tracking improving our docs on the subject. 关于进程间Realm访问的文档非常少,因为在设计上它应该“正常工作”,但是你链接到的博客文章是Realm声称支持多进程访问的唯一地方是可笑的,这就是为什么我们有#3362跟踪改进我们关于这个主题的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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