title: How to open CoreData database file to see saved values
body: <p>Right now i am using coredata to save my data. 
  Its all working fine but now i changed the logic to save values to the database. So i need to compare that the after logic change same values are getting saved in tables. So I need to compare tables. </p>
  
  <p>I went through many links like
  <a href="https://stackoverflow.com/questions/10239634/how-can-i-check-what-is-stored-in-my-core-data-database">link 1</a>
  <a href="https://stackoverflow.com/questions/2268102/how-view-data-stored-in-core-data">link 2</a></p>
  
  <p>all the links shows that the database file that coredata create is of .sqlite extension. But the files create at that location are "persistentStore, persistentStore-shm, persistentStore-wal" as show in screenshot.</p>
  
  <p><a href="https://i.stack.imgur.com/Nzzef.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nzzef.png" alt="Image of database file"></a></p>
  
  <p>How should i suppose to open these files to see the saved data in tables.
  Thanks in advance</p>
  
  <pre><code> - (void)setupDatabase:(void (^)(BOOL))completionHandler
  {
  
      NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
      url = [url URLByAppendingPathComponent:@"MainDataModel"];
  
      self.db = [[CWUIManagedDocument alloc] initWithFileURL:url];
  
      NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
                                                    [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
                                                    [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
  
      self.db.persistentStoreOptions = options;
  
      if(![[NSFileManager defaultManager] fileExistsAtPath:[self.db.fileURL path]])
      {
          [self.db saveToURL:self.db.fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) {
              self.dataManager.db = self.db;
              completionHandler(success);
          }];
      } else if (self.db.documentState == UIDocumentStateClosed) {
          [self.db openWithCompletionHandler:^(BOOL success) {
              self.dataManager.db = self.db;
              completionHandler(success);
          }];
      }
  }
  </code></pre>