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

Add function to use alternative port (2197) #211

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

Conversation

mtzfederico
Copy link

Apple allows you to use port 2197 instead of 443 when sending notifications to APNs. This PR implements a function that appends ":2197" to the client's host.

Note: If you are specifying production or development, then this function should be called after that.
Example: client := apns2.NewTokenClient(token).Development().UseAlternativePort()

I also added the option --alt-port to the CLI client.

For more info you can take a look at Sending Notification Requests to APNs in Apple's Developer Documentation

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.

1 participant