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
Showing
2 changed files
with
2 additions
and
1 deletions
@@ -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, |
@@ -390,7 +390,7 @@ static NSError *ASIUnableToCreateRequestError; | @@ -390,7 +390,7 @@ static NSError *ASIUnableToCreateRequestError; | ||
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]; |
-
Please register or login to post a comment