尝试将Simperium添加到我现有的应用程序中,我收到了NSAssertion错误:
(gdb) po $eax
Simperium couldn't load member data (unsupported type)
堆栈追踪:
(gdb) bt
#0 0x02f63cbc in objc_exception_throw ()
#1 0x0190da48 in +[NSException raise:format:arguments:] ()
#2 0x00a5b2cb in -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] ()
#3 0x003ac625 in -[SPCoreDataExporter addMembersFrom:to:] (self=<value temporarily unavailable, due to optimizations>, entityDesc=<value temporarily unavailable, due to optimizations>) at /Users/kineticpoet/dev/simperium-ios-private/Simperium/SPCoreDataExporter.m:95
#4 0x003acd3b in -[SPCoreDataExporter exportModel:classMappings:] (_cmd=0x3fa641, model=0x7b377560) at /Users/kineticpoet/dev/simperium-ios-private/Simperium/SPCoreDataExporter.m:156
#5 0x00374a4d in -[Simperium startWithAppID:APIKey:model:context:coordinator:] (self=<value temporarily unavailable, due to optimizations>, _cmd=<value temporarily unavailable, due to optimizations>, model=<value temporarily unavailable, due to optimizations>) at /Users/kineticpoet/dev/simperium-ios-private/Simperium/Simperium.m:385
#6 …
支持的类型有哪些?是否支持二进制数据?我的应用程序使用“允许外部存储”来存储二进制数据是否支持?
我如何找到更多信息?
更新
扩展Simperiums Simpletodo示例并添加具有二进制数据属性的新实体会导致同样的错误:
…
2012-05-13 14:30:20:192 SimpletodoFinal[42429:fb03] Simperium starting...
2012-05-13 14:30:20.222 SimpletodoFinal[42429:fb03] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Simperium couldn't load member data (unsupported type)'
*** First throw call stack:
(0x17f2022 0x1bcecd6 0x179aa48 0xdda2cb 0x3fb85 0x4029b 0x7fad 0x2e37 0x441386 0x442274 0x451183 0x451c38 0x445634 0x2082ef5 0x17c6195 0x172aff2 0x17298da 0x1728d84 0x1728c9b 0x441c65 0x443626 0x290d 0x2875 0x1)
terminate called throwing an exception
更新^ 2 :
Simperium在将具有二进制数据的实体的超类更改为非NSManagedObject
类后开始同步。
答案 0 :(得分:2)
Simperium对核心数据中二进制类型的支持目前尚未记录且有限。为了防止Simperium看到任何特定属性(包括尚未完全支持的二进制属性),您可以向该属性添加User Info参数。
在模型编辑器中突出显示该属性,打开检查器窗格,然后添加“用户信息”参数。将密钥设置为spDisableSync
,将值设置为1
。这应该允许该实体的其余部分成功地与Simperium一起使用(如果您需要)。