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

Export apns:default_connection/0 to allow key file password to be added,... #28

Merged
merged 1 commit into from Sep 3, 2014

Conversation

robinmacharg
Copy link

... e.g.

%% Pull password from e.g. sys.config here
ConnectionProfile = (apns:default_connection())#apns_connection{cert_password=Password, error_fun=fun ?MODULE:handle_apns_error/2, feedback_fun=fun ?MODULE:handle_apns_feedback/2},
Connection = apns:connect(apns_connection, ConnectionProfile)

It's this approach vs. modifying default_connection/0 directly. This is the least intrusive.

…ed, e.g.

%% Pull password from e.g. sys.config here
ConnectionProfile = (apns:default_connection())#apns_connection{cert_password=Password, error_fun=fun ?MODULE:handle_apns_error/2, feedback_fun=fun ?MODULE:handle_apns_feedback/2},
Connection = apns:connect(apns_connection, ConnectionProfile)

It's this approach vs. modifying default_connection/0 directly.  This is the least intrusive.
@elbrujohalcon
Copy link
Member

Hi @robinmacharg ! default connection is built entirely from stuff on the application environment on top of a simple #apns_connection. I'll merge this PR because it's harmless, but why don't you try setting up your parameters on the environment (for instance, using an app.config file)?

elbrujohalcon added a commit that referenced this pull request Sep 3, 2014
Export apns:default_connection/0 to allow key file password to be added,...
@elbrujohalcon elbrujohalcon merged commit 45d112c into inaka:master Sep 3, 2014
@elbrujohalcon
Copy link
Member

or… if your problem is that cert_password is not pulled from the app environment on default_connnection/0, please add code to do so and send us another PR :)

@robinmacharg
Copy link
Author

Thanks. It was my bad actually: I was using tag 1.0.1, from 8 months ago. cert_password has been added to the defaults since then.

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.

None yet

2 participants