Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWSRegion #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

AWSRegion #13

wants to merge 2 commits into from

Conversation

CavalcanteLeo
Copy link

init with AWS region type

@CavalcanteLeo
Copy link
Author

CavalcanteLeo commented Apr 28, 2016

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
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants