Question:
I’m trying to delete a public image (cannedACL
property of the S3PutObjectRequest
to upload the image was [S3CannedACL publicRead]
) uploaded to an S3 bucket.
There is an S3DeleteObjectRequest
class in the AWS SDK documentation, but there don’t seem to be any properties or initialization methods for this class.
Based on sample code in other languages, it looks like there should be key
or bucket
property or an initialization method setting those properties, as there are in the iOS SDK’s S3PutObjectRequest
class, used to upload files to a bucket.
What’s going on here? Is the SDK simply incomplete? Is there a way to delete an object with the iOS AWS SDK?
Answer:
Just going off the documentation you linked to, but does this not work?
1 2 |
[s3Client deleteObjectWithKey:@"objectKey" withBucket:@"my-bucket"]; |