What is the best way to remove logs file Core Data creates, when removing a UIManagedDocument from iCloud?
问题 I would have thought NSFileManager s method of removeItemAtURL:error: would remove the Core Data log files created when using UIManagedDocuments with iCloud. What is the best way to make sure all of these log files are removed? 回答1: I have used... - (void)deleteRemnantsOfOldDatabaseDocumentAndItsTransactionLogsWithCompletionHandler:(completion_success_t)completionBlock { __weak CloudController *weakSelf = self; NSURL *databaseStoreFolder = self.iCloudDatabaseStoreFolderURL; NSURL