小编Hai*_*tao的帖子

Realm抛出RLMException,只有'object'属性可以是可选的,属性'name'是'string'类型

'RLMException', reason: 'Only 'object' properties can be made optional, and property 'name' is of type 'string'.'
    `First throw call stack:
    (
    0   CoreFoundation                      0x0000000102e01c65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010496cbb7 objc_exception_throw + 45
    2   Realm                               0x00000001024f2fb6 +[RLMObjectSchema schemaForObjectClass:] + 5846
    3   Realm                               0x000000010257bcb6 +[RLMSchema initialize] + 1862
    4   libobjc.A.dylib                     0x000000010496d4d6 _class_initialize + 648
    5   libobjc.A.dylib                     0x00000001049766e1 lookUpImpOrForward + 351
    6   libobjc.A.dylib                     0x00000001049830d3 objc_msgSend + 211
    7   Realm                               0x0000000102555770 +[RLMRealm realmWithPath:key:readOnly:inMemory:dynamic:schema:error:] + 4800
    8   Realm                               0x0000000102554178 +[RLMRealm realmWithPath:readOnly:error:] + 152
    9 …

realm

7
推荐指数
1
解决办法
1673
查看次数

标签 统计

realm ×1