Search code examples
iossybasesup

SUP 2.1.3 - iOS native application - exception is in createCore


I am developing an iOS app using Sybase Unwired Platform 2.1 ESD 3. I am getting this error before save the Synchronization Parameters:

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

This is the source code:

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];

Thanks!!


Solution

  • I found the solution.

    If I use SynchronizationParameters, I need to use [SyncMBOFlowInboxSyncMBOFlowInboxDB subscribe] before. And unsubscribe when I finish to use the database.