1

尝试将 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类后开始同步。

4

1 回答 1

2

Simperium 对 Core Data 中二进制类型的支持目前没有记录且受到限制。要防止 Simperium 看到任何特定属性(包括尚未完全支持的二进制属性),您可以向该属性添加用户信息参数。

在模型编辑器中突出显示该属性,打开检查器窗格,然后添加一个用户信息参数。将键设置为spDisableSync,将值设置为1。这应该允许该实体的其余部分与 Simperium 一起成功使用(如果需要)。

于 2012-05-13T17:26:58.590 回答