如果我将属性定义为String。
@Property NSString * value;
由于未捕获的异常“ RLMException”而终止应用程序,原因: “字符串”为'__NSCFNumber'类型的'无效值'1993654'
或者定义为整数。
@Property NSInteger value;
由于未捕获的异常“ RLMException”而终止应用程序,原因: 'int'的'NSTaggedPointerString'类型的'无效值'1973906'
在这两种情况下,应用都崩溃了。
崩溃报告。
*** Terminating app due to uncaught exception 'RLMException',reason: 'Invalid value '1973906' of type 'NSTaggedPointerString' for 'int?' property 'MMCase.Id'.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
2 Realm 0x000000010ad75659 _Z17RLMThrowTypeErrorP11objc_objectP15RLMObjectSchemaP11RLMProperty + 617
3 Realm 0x000000010ad766bb _Z27RLMValidateValueForPropertyP11objc_objectP15RLMObjectSchemaP11RLMPropertyb + 3659
4 Realm 0x000000010ab63576 _ZN18RLMaccessorContext18value_for_propertyEP11objc_objectRKN5realm8PropertyEm + 214
5 Realm 0x000000010abd70af _ZN5realm6Object6createIU8__strongP11objc_object18RLMaccessorContextEES0_RT0_RKNSt3__110shared_ptrINS_5RealmEEERKNS_12ObjectSchemaET_bbmPNS_8BasicRowINS_5TableEEE + 431
6 Realm 0x000000010abd8595 RLMCreateObjectInRealmWithValue + 1477
7 Realm 0x000000010ab62c18 _ZN18RLMaccessorContext5unboxIN5realm12BasicRowExprINS1_5TableEEEEET_P11objc_objectbbbm + 296
8 Realm 0x000000010ab745cd _ZN5realm12_GLOBAL__N_112ValueUpdaterIU8__strongP11objc_object18RLMaccessorContexteclEPNS_12BasicRowExprINS_5TableEEE + 157
9 Realm 0x000000010ab735ef