Ben Copsey

Add CFNetwork header to make iphone targets build out of the box in release configuration

Use removeItemAtPath rather than removeFileAtPath to get rid of warning when targeting iphone
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 // Portions are based on the ImageClient example from Apple: 10 // Portions are based on the ImageClient example from Apple:
11 // See: http://developer.apple.com/samplecode/ImageClient/listing37.html 11 // See: http://developer.apple.com/samplecode/ImageClient/listing37.html
12 12
  13 +#import <CFNetwork/CFNetwork.h>
13 14
14 typedef enum _ASINetworkErrorType { 15 typedef enum _ASINetworkErrorType {
15 ASIConnectionFailureErrorType = 1, 16 ASIConnectionFailureErrorType = 1,
@@ -386,11 +386,11 @@ static NSError *ASIUnableToCreateRequestError; @@ -386,11 +386,11 @@ static NSError *ASIUnableToCreateRequestError;
386 386
387 if (receivedData) { 387 if (receivedData) {
388 [self setReceivedData:nil]; 388 [self setReceivedData:nil];
389 - 389 +
390 - // If we were downloading to a file, let's remove it 390 + // If we were downloading to a file, let's remove it
391 } else if (downloadDestinationPath) { 391 } else if (downloadDestinationPath) {
392 [outputStream close]; 392 [outputStream close];
393 - [[NSFileManager defaultManager] removeFileAtPath:downloadDestinationPath handler:nil]; 393 + [[NSFileManager defaultManager] removeItemAtPath:downloadDestinationPath error:NULL];
394 } 394 }
395 395
396 [self setResponseHeaders:nil]; 396 [self setResponseHeaders:nil];