Skip to Content
avatar image
Former Member

SUP Persistence Exception while unsubscribe database

-(BOOL)isInitialSyncDone {

  BOOL initialSyncDone=NO;

  NSUserDefaults *stdUserDflts = [NSUserDefaults standardUserDefaults];

  SUPApplication* app = [SUPApplication getInstance];

  if([stdUserDflts boolForKey:DIFFERENT_SERVER])


  if([app connectionStatus] == SUPConnectionStatus_CONNECTED) {

  NSLog(@"Unregistering application");

  @try {

  //[VisualInspection_DVIDB initialize];

  [VisualInspection_DVIDB deleteDatabase];

  [VisualInspection_DVIDB closeConnection];

  } @catch(NSException *exception) {

  //make sure that the db is getting deleted

  NSLog(@"Exception Caught while unregistering applicaiton.");

  NSLog(@"%@ %@", [exception name],[exception description]); }

  @finally {




  if ([VisualInspection_DVIDB databaseExists] && [VisualInspection_DVIDB isSynchronized:PROJECT_GROUP])




  return initialSyncDone;


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 29, 2015 at 06:16 PM

    Perhaps you could provide your question as well as the code?  I would also recommend providing a few more details on your environment including which version of SUP you are working with.

    Thanks, Mike (Moderator)

    SAP Technology RIG

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      We are having different domains (i.e. servers) where the application can point to one by default. When I upgrade from one version to another version where AppVer.1 points to Server1 and AppVer.2 points to Server2. When I tried to upgrade to higher version. App is pointing to the old connection (i.e. Server1) Here we are using Server1 : SUP , Server2 :SMP. I want to reset the connection when a change in server is detected.

      The App is developed in Xamarin.iOS and XCode (.a lib) as binding project which exposes methods/ functions in order to consume from Xamarin.iOS (C#).

      I want working steps for unregister previous connection and register the new connection with successful synchronization.

      SUP Server Version :

      SUP Workspace Version : 2.2 SP02 PL00

      SMP Server Version:

      Let me know if you require any additional information.

      Thanks in advance,