How can I check the existence of a key/file on an Amazon S3 Bucket using AWS iOS SDK v2?

1.8k views Asked by At

I writing an iOS app that uploads and downloads files from an Amazon S3 bucket. I got said functionality working, but I need to write unit tests for it. Is there any way I can check if a file exists in my bucket so that I can confirm that it has been uploaded??

1

There are 1 answers

1
Yosuke On BEST ANSWER

AWSS3 has a method called - headObject:. You can use it to see if the object exists in the bucket.