Da quando ho aggiunto questa richiesta asincrono, sto ricevendo un errore di Xcode Sending 'NSError *const __strong *' to parameter of type 'NSError *__autoreleasing *' changes retain/release properties of pointer
tipi ios NSError
...
[NSURLConnection sendAsynchronousRequest:req queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error){
dispatch_async(dispatch_get_main_queue(), ^{
NSDictionary *xmlDictionary = [XMLReader dictionaryForXMLData:data error:&error];
...
});
}];
...
Se uso allora il mio codice funziona benissimo, ma mi sento a disagio di non usando gli errori .. Cosa dovrei fare?
Se in realtà non stai facendo nulla con l'errore potresti anche passare NULL. Di solito è possibile rilevare se si è verificato un errore in ogni caso perché il metodo restituisce zero, quindi non è che ti manchi il fatto che gli errori stanno accadendo. –