@@ -232,7 +232,7 @@ - (void)enumerateCloudDocuments {
232232 });
233233}
234234
235- - (void )startUpdate : (NSMetadataQuery *)query {
235+ - (void )startUpdate : (NSNotification *)notification {
236236 // Log file update
237237 if (self.verboseLogging == YES ) NSLog (@" [iCloud] Beginning file update with NSMetadataQuery" );
238238
@@ -243,15 +243,15 @@ - (void)startUpdate:(NSMetadataQuery *)query {
243243 });
244244}
245245
246- - (void )recievedUpdate : (NSMetadataQuery *)query {
246+ - (void )recievedUpdate : (NSNotification *)notification {
247247 // Log file update
248248 if (self.verboseLogging == YES ) NSLog (@" [iCloud] An update has been pushed from iCloud with NSMetadataQuery" );
249249
250250 // Get the updated files
251251 [self updateFiles ];
252252}
253253
254- - (void )endUpdate : (NSMetadataQuery *)query {
254+ - (void )endUpdate : (NSNotification *)notification {
255255 // Get the updated files
256256 [self updateFiles ];
257257
@@ -302,13 +302,12 @@ - (void)updateFiles {
302302 [self .delegate iCloudFilesDidChange: discoveredFiles withNewFileNames: names];
303303 });
304304 }
305- }
306- else if ([fileStatus isEqualToString: NSURLUbiquitousItemDownloadingStatusNotDownloaded ]) {
307- NSError *err;
308- BOOL downloading = [[NSFileManager defaultManager ] startDownloadingUbiquitousItemAtURL: fileURL error: &err];
305+ } else if ([fileStatus isEqualToString: NSURLUbiquitousItemDownloadingStatusNotDownloaded ]) {
306+ NSError *error;
307+ BOOL downloading = [[NSFileManager defaultManager ] startDownloadingUbiquitousItemAtURL: fileURL error: &error];
309308 if (self.verboseLogging == YES ) NSLog (@" [iCloud] %@ started downloading locally, successful? %@ " , [fileURL lastPathComponent ], downloading ? @" YES" : @" NO" );
310- if (err ) {
311- if (self.verboseLogging == YES ) NSLog (@" [iCloud] Ubiquitous item failed to start downloading with error: %@ " , err );
309+ if (error ) {
310+ if (self.verboseLogging == YES ) NSLog (@" [iCloud] Ubiquitous item failed to start downloading with error: %@ " , error );
312311 }
313312 }
314313 }];
0 commit comments