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

Enable environment variable for APNS config mode #79

Closed
jeandavid opened this issue Jul 17, 2017 · 2 comments
Closed

Enable environment variable for APNS config mode #79

jeandavid opened this issue Jul 17, 2017 · 2 comments

Comments

@jeandavid
Copy link

I understand that there are an atom option, :dev or :prod, for the APNS mode configuration setting. It would be great if instead we could pass some environment variable System.get_env("APNS_MODE") .
I have my staging and production on Heroku and I need to manually change my configuration from :dev to :prod every time I push a new release :(
Thanks!

@hpopp
Copy link
Member

hpopp commented Jul 17, 2017

It's on my list. In the meantime you can start workers manually if it would makes things easier.

{:ok, pid} = Pigeon.APNS.start_connection(cert: System.get_env("APNS_CERTIFICATE"), key: System.get_env("APNS_KEY"), mode: :dev)
Pigeon.APNS.push(notif, to: pid)

Pigeon.APNS.start_connection(cert: System.get_env("APNS_CERTIFICATE"), key: System.get_env("APNS_KEY"), mode: :dev, name: :custom)
Pigeon.APNS.push(notif, to: :custom)

@hpopp
Copy link
Member

hpopp commented Nov 6, 2017

Closing this because of support for runtime configs in v1.1

@hpopp hpopp closed this as completed Nov 6, 2017
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

No branches or pull requests

2 participants