繁体   English   中英

SUP 2.1.3-iOS本机应用程序-createCore中存在异常

[英]SUP 2.1.3 - iOS native application - exception is in createCore

我正在使用Sybase Unwired Platform 2.1 ESD 3开发iOS应用。在保存同步参数之前,我得到此错误:

Terminating app due to uncaught exception 'SUPPersistenceException', reason: 'exception is in createCore: Illegal key generator status: the key generator must be populated first.'

这是源代码:

SUPConnectionProfile *sp = [SyncMBOFlowInboxSyncMBOFlowInboxDB getSynchronizationProfile];

[sp setAsyncReplay:NO];
[sp setUser:user];
[sp setPassword:pass];
[sp setServerName:server];


NSUserDefaults *usr = [NSUserDefaults standardUserDefaults];

SyncMBOFlowInboxFlowInboxSynchronizationParameters *pp = [SyncMBOFlowInboxFlowInbox getSynchronizationParameters];
[pp setS_USER_ID:[usr stringForKey:@"netUser"]];
[pp save]; <--The error appear after run this

[SyncMBOFlowInboxSyncMBOFlowInboxDB synchronize];

谢谢!!

每次启动应用程序时(即使您处于脱机状态且不是第一次同步),也需要在尝试同步之前初始化SUP应用程序和相关的数据库,否则会收到该错误。

我找到了解决方案。

如果使用SynchronizationParameters,则需要先使用[SyncMBOFlowInboxSyncMBOFlowInboxDB订阅]。 并在我完成使用数据库后退订。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM