由于RealmSwift,当快速3 @obj推理设置为“默认”时,应用程序崩溃

时间:2021-11-08 11:11:49

When I am setting the Swift 3 @obj inference to "Default" then the app is crashing and giving the error:

当我将Swift 3 @obj推断设置为“Default”时,应用程序崩溃并给出错误:

Primary key property 'id' does not exist on object

对象上不存在主键属性“id”

And also I can't see any object in Realm Browser. But when I set the Swift 3 @obj inference to "On" then it is working perfectly but is taking too much time to load the screen. It was working perfectly in Swift 3 but when I upgraded to Swift 4 this problem start coming. Can someone please help me? Thanks.

而且我在Realm Browser中看不到任何对象。但是,当我将Swift 3 @obj推理设置为“On”时,它工作正常,但是花费了太多时间来加载屏幕。它在Swift 3中运行得很好但是当我升级到Swift 4时,这个问题就开始了。有人可以帮帮我吗?谢谢。

I have attached the image of realm browser when the Swift 3 @obj inference set to default.

当Swift 3 @obj推理设置为默认值时,我附加了领域浏览器的图像。

由于RealmSwift,当快速3 @obj推理设置为“默认”时,应用程序崩溃

1 个解决方案

#1


0  

i have marked all my model properties with "@objc dynamic" and now everything is working perfectly in my case.

我用“@objc dynamic”标记了我所有的模型属性,现在一切都在我的情况下完美运行。

#1


0  

i have marked all my model properties with "@objc dynamic" and now everything is working perfectly in my case.

我用“@objc dynamic”标记了我所有的模型属性,现在一切都在我的情况下完美运行。