La Documentation est en effet un gâchis, bien que regardant le changelog de 4,3 à 5.0 pour NSURLConnection.h:
Supprimé
Removed -[NSObject connection:canAuthenticateAgainstProtectionSpace:]
Removed -[NSObject connection:didCancelAuthenticationChallenge:]
Removed -[NSObject connection:didFailWithError:]
Removed -[NSObject connection:didReceiveAuthenticationChallenge:]
Removed -[NSObject connection:didReceiveData:]
Removed -[NSObject connection:didReceiveResponse:]
Removed -[NSObject connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]
Removed -[NSObject connection:needNewBodyStream:]
Removed -[NSObject connection:willCacheResponse:]
Removed -[NSObject connection:willSendRequest:redirectResponse:]
Removed -[NSObject connectionDidFinishLoading:]
Removed -[NSObject connectionShouldUseCredentialStorage:]
Removed NSObject(NSURLConnectionDelegate)
Ajouté
Added -[NSURLConnection currentRequest]
Added -[NSURLConnection originalRequest]
Added +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]
Added -[NSURLConnection setDelegateQueue:]
Added NSURLConnectionDataDelegate
Added -[NSURLConnectionDataDelegate connection:didReceiveData:]
Added -[NSURLConnectionDataDelegate connection:didReceiveResponse:]
Added -[NSURLConnectionDataDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]
Added -[NSURLConnectionDataDelegate connection:needNewBodyStream:]
Added -[NSURLConnectionDataDelegate connection:willCacheResponse:]
Added -[NSURLConnectionDataDelegate connection:willSendRequest:redirectResponse:]
Added -[NSURLConnectionDataDelegate connectionDidFinishLoading:]
Added NSURLConnectionDelegate
Added -[NSURLConnectionDelegate connection:canAuthenticateAgainstProtectionSpace:]
Added -[NSURLConnectionDelegate connection:didCancelAuthenticationChallenge:]
Added -[NSURLConnectionDelegate connection:didFailWithError:]
Added -[NSURLConnectionDelegate connection:didReceiveAuthenticationChallenge:]
Added -[NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge:]
Added -[NSURLConnectionDelegate connectionShouldUseCredentialStorage:]
Added NSURLConnectionDownloadDelegate
Added -[NSURLConnectionDownloadDelegate connection:didWriteData:totalBytesWritten:expectedTotalBytes:]
Added -[NSURLConnectionDownloadDelegate connectionDidFinishDownloading:destinationURL:]
Added -[NSURLConnectionDownloadDelegate connectionDidResumeDownloading:totalBytesWritten:expectedTotalBytes:]
Added NSURLConnection(NSURLConnectionQueuedLoading)
Il semble donc que ces fonctions sont en effet toujours là. Il suffit d'ajouter les protocoles de votre @interface de déclaration et vous devriez être bon d'aller.
J'ai essayé la nouvelle NSURLConnectionDownloadDelegate, être averti que, si ces méthodes sont présents dans votre délégué, votre NSURLConnectionDataDelegate méthodes ne sera PAS appelé.
J'ai aussi eu la question de l'ouverture de la destinationURL, iOS me disait que le fichier n'existe pas, bien que la documentation indique que le fichier est garanti lors de l'appel de méthode.