S3GetObjectRequest has an NSMutableData * body, where it adds all the data it loads.
For large files, the data is constantly being added during the download process, and it goes through the VM limit of 90 MB, and then the application becomes killed by iOS.
A quick and dirty workaround is to create your own S3GetObjectRequest and S3GetObjectResponse classes. The AWS framework creates an instance of the response based on the name of the request class (the name of the request class without the last 7 characters is “request” and adds it using “Response” and tries to create a new class of this name).
- (void): (NSURLConnection *) didReceiveData: (NSData *) datastrong > , .
, , , . , . 150-700 2,55 , +/- 0,2 .
ASIHTTP, .
- LargeFileS3GetObjectRequest.h
@interface LargeFileS3GetObjectRequest : S3GetObjectRequest
@end
- LargeFileS3GetObjectRequest.m
@implementation LargeFileS3GetObjectRequest
@end
- LargeFileS3GetObjectResponse.h
@interface LargeFileS3GetObjectResponse : S3GetObjectResponse
@end
- LargeFileS3GetObjectResponse.m
@implementation LargeFileS3GetObjectResponse
-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[super connection:connection didReceiveData:data];
[body release];
body = NULL;
}
@end
, .