apns2
apns2 copied to clipboard
Add function to use alternative port (2197)
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