ios - 在 ios swift 中使用 Realm 作为应用程序和共享扩展?

标签 ios swift realm ios8-share-extension

我注意到这个链接中: 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/

相关文章:

ios - 二元运算符 '<' 不能。应用于两个 'Any?' 操作数

ios - 加载本 map 片到 WKWebView

ios - 在 realm 中保存数据模型对象数组只保存 1 个属性,其余属性我在 realm studio 中看不到

ios - 在 iOS 的 Realm 中添加数据的问题

android - Realm createAllFromJson 抛出 BEGIN_ARRAY 但 BEGIN_OBJECT 异常

android - 将本地存储从 Cordova 应用迁移到 Android 应用

iOS 8 UIImagePickerController 只拍照片的照片

ios - 如何在表格 View 中自动滚动? ( swift )

ios - AFNetworking ASPXAUTH Cookies AFHTTPRequestOperationManager

swift - 在 Swift 中转换为泛型可选