AWS S3 : iOS SDK - AWSContentDownloadTypeIfNewerExists not working

158 Views Asked by At

I am using the AWS iOS SDK to download a file from S3.

The file is downloaded like this:

  AWSContentManager *contentManager = [AWSContentManager sharedManager];
  AWSContent *content = [contentManager contentWithKey:filename];


        [content downloadWithDownloadType:AWSContentDownloadTypeIfNewerExists pinOnCompletion:NO progressBlock:^(AWSContent *content, NSProgress *progress) {

            progressBlock(progress);

        } completionHandler:^(AWSContent *content, NSData *data, NSError *error) {

            if (!error) {
                completionHandler(data);
            }
            else {
                completionHandler(nil);
            }


        }];

However this keeps downloading the file each time even and disregarding the AWSContentDownloadTypeIfNewerExists value.

Is this an AWS bug or is there something I'm missing?

0

There are 0 best solutions below