rahuljiresal / BugReportKit

Easier bug reports on iOS. Just take a screenshot in your app, doodle on the image, and send it away! Bug reports automatically include device metadata with free/used memory, disk and battery status. Currently, reports can be added to Github Issues, JIRA Issues, Gitlab Issues or sent as emails.
www.rahuljiresal.com
MIT License
43 stars 10 forks source link

AWSRegion #13

Open CavalcanteLeo opened 8 years ago

CavalcanteLeo commented 8 years ago

init with AWS region type

CavalcanteLeo commented 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

rahuljiresal commented 8 years ago

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?

rahuljiresal commented 8 years ago

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.