         }
         
         //
-        self.enableUbiquity = (ubiquitousContainerIdentifier != nil)
         super.init(name: name, managedObjectModel: managedObjectModel)
         
         //

        persistentStoreDescription.shouldInferMappingModelAutomatically = true
        persistentStoreDescription.shouldMigrateStoreAutomatically = true
        
        if self.enableUbiquity {
            persistentStoreDescription.setOption((ubiquitousContainerIdentifier!) as NSString, forKey: NSPersistentStoreUbiquitousContainerIdentifierKey)
            persistentStoreDescription.setOption((ubiquitousContentRelativePath ?? "Data/TransactionLogs") as NSString, forKey: NSPersistentStoreUbiquitousContentURLKey)
            persistentStoreDescription.setOption((ubiquitousContentName ?? "UbiquityStore") as NSString, forKey: NSPersistentStoreUbiquitousContentNameKey)
        }

        //
        self.persistentStoreDescriptions = [persistentStoreDescription]
        
        // this should run synchronously since shouldAddStoreAsynchronously is false
        var outError: Swift.Error?
        
        self.loadPersistentStores { description, error in
            if let error = error {
                outError = error
            }
            
            //
            if let _ = ubiquitousContainerIdentifier {
                self.didImportUbiquitousContentObserver = NotificationCenter.default.addObserver(forName: .NSPersistentStoreDidImportUbiquitousContentChanges, object: self.persistentStoreCoordinator, queue: nil) { [weak self] notification in
                    guard let context = self?.viewContext.parent ?? self?.viewContext else {
                        return
                    }
                    
                    context.perform {
                        context.mergeChanges(fromContextDidSave: notification)
                    }
                }
            }
            
            //
            self.viewContext.automaticallyMergesChangesFromParent = true
            self.viewContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
        }
        
        if let outError = outError {
            throw outError
        }
    }
    
    deinit {
        if let didImportUbiquitousContentObserver = self.didImportUbiquitousContentObserver {
            self.didImportUbiquitousContentObserver = nil
            NotificationCenter.default.removeObserver(didImportUbiquitousContentObserver)
        }
    }
    
