Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

  {

  initialSyncDone=YES;

  }

  return initialSyncDone;

}

Tags:
Not what you were looking for? View more on this topic or Ask a question