0

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!!

javiazo
  • 1,892
  • 4
  • 26
  • 41

2 Answers2

0

Every time you start your app (even if you are offline and it is not the first sync) you need to initialize you SUP Application and related DB before trying to synchronize, otherwise you'll get that error.

psychowood
  • 2,900
  • 1
  • 14
  • 14
0

I found the solution.

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

javiazo
  • 1,892
  • 4
  • 26
  • 41