Open CavalcanteLeo opened 8 years ago
I have changed the old method
- (id)initWithS3AccessKey:(NSString*)accesskey secretKey:(NSString*)secretKey bucketName:(NSString*)bucketName;
to
- (id)initWithS3AccessKey:(NSString*)accesskey secretKey:(NSString*)secretKey bucketName:(NSString*)bucketName AWSRegion:(AWSRegionType)AWSRegion
so, keep in mind the old projects will get an error. Idk if is better to keep both init methods
Yes, it is always better to keep the older method also for backwards compatibility.
The problem with the newly added method is the enum AWSRegionType
. To be able to use that enum, the user has to include AWS's header files that contains that enum. Ideally, the ImageUploader
should completely hide it so the user doesn't have to deal with AWS's library directly. This can be done by defining our own enum that is a wrapper on AWS's region enum. What do you think?
No, you can't import a specific header file to a generic delegate header. If you do that, even if someone doesn't want to use AWS, they will have to import the whole library just to get the code to compile.
The ideal would be to create a copy of the enum in AWSImageUploader.h
.
init with AWS region type