小编Aur*_*ura的帖子

iOS 14+ 中的 Swift Realm 问题

------LE:我们最终删除了数据库的加密,因为根据领域团队的建议,情况变得更糟 - 我们所能做的就是删除数据库并丢失所有存储的信息。现在我们只在钥匙串中加密我们需要的字段。------

我在商店发布了一个应用程序,在将他们的 iOS 版本更新到 14+ 后,用户开始抱怨没有从数据库中填充信息。并非所有 iOS 14+ 用户都有此问题,它会在某些设备上随机出现。

如果他们重新安装应用程序或将其更新到另一个版本后,问题会消失一段时间,但在使用它几分钟后又会再次发生。

我的数据库使用此处记录的加密。

我的应用程序的商店版本使用 Realm 5.4.8,但我测试了他们的最新版本 (10.0.0),但问题仍然存在。

我检查了这个问题,但对我来说不是这样,我没有共享的应用程序组容器或共享扩展。

以下是 Realm 的初始化方式:

override init() {
    super.init()

    do {
        guard let config = getMigrationAndEncryptionConfiguration() else {
            realmConfigured = try Realm()
            return
        }
        realmConfigured = try Realm(configuration: config)
    } catch let error as NSError {
        // this is where I got the error:
        //"Encrypted interprocess sharing is currently unsupported.DB has been opened by pid: 4848. Current pid is 5806." …
Run Code Online (Sandbox Code Playgroud)

realm swift ios14

9
推荐指数
0
解决办法
543
查看次数

标签 统计

ios14 ×1

realm ×1

swift ×1