dnorris707 dnorris707 - 1 year ago 92
iOS Question

Amazon web services AmazonS3Client alloc giving error

I'm trying to learn how to use the

and thought uploading an image would be a good place to start(the tutorial is through Amazon). I used the exact code they supplied:

AmazonS3Client *s3 =
[[[AmazonS3Client alloc] initWithAccessKey:MY_ACCESS_KEY_ID withSecretKey:MY_SECRET_KEY] autorelease];

But for some reason,
doesn't have the
available for the
. I've googled and searched through the forums and not found much so it's not a common problem. Anyone else having this issue and fixed it?

Answer Source

just write the code autorelease has deprecated in iOS 6

AmazonS3Client *s3 = [[AmazonS3Client alloc] initWithAccessKey:MY_ACCESS_KEY_ID withSecretKey:MY_SECRET_KEY]; 

you were imported

#import <AWSS3/AWSS3.h>
#import <AWSRuntime/AWSRuntime.h>

and call the .h file

@interface ArtistProfileViewController : UIViewController<AmazonServiceRequestDelegate>

enter image description here