avec Xcode if let colorsFilePath = syncDataConfiguration.colorsFile, data = NSData(contentsOfFile:colorsFilePath) { MetadataJSONDeserializer.deserialize(data, keyPath: "colors.color") .success { color -> ColorDuplicateRemovalTask in return self.removeDuplicateIdentifiers(colors) } .success { colors -> JSONInsertTask in return entityStore.replaceAllObjects(colors, transformer: Color.tranform) } .success { JSONs -> Void in taskTuple.fulfill(JSONs) } .failure { (error, isCancelled) in if let error = error { taskTuple.reject(error) } } return taskTuple.task }