1

Is server gateway.sandbox.push.apple.com:2195 the correct development APN server?

I found this address in back-end sources and wondering hence Apple documentation contains another address: api.development.push.apple.com:443.

Kara
  • 5,650
  • 15
  • 48
  • 55
drewpts
  • 439
  • 1
  • 5
  • 18

2 Answers2

1

TCP port 443: For a fallback on Wi-Fi only, when devices can't reach APNs on port 5223
TCP port 2195: For sending notifications to APNs

Check below link for details. https://support.apple.com/en-in/HT203609

JP_Mob
  • 114
  • 7
  • Thank you! I do not receive notifications from dev server (remote) instead from local one. How can I found the core of problem? Is there a possibility to know correctness of settings of certificates on dev server? Or correctness of provisioning profiles state? – drewpts Jun 05 '16 at 17:10
  • 1
    just check your backend that should be correct and if you are using developer profile use sandbox APNS on server,Also check server side they should get correct device token. – JP_Mob Jun 05 '16 at 17:14
1

From the useful CLI utility source code of Houston by Mattt Thompson:

APPLE_PRODUCTION_GATEWAY_URI = "apn://gateway.push.apple.com:2195"
APPLE_PRODUCTION_FEEDBACK_URI = "apn://feedback.push.apple.com:2196"
APPLE_DEVELOPMENT_GATEWAY_URI = "apn://gateway.sandbox.push.apple.com:2195"
APPLE_DEVELOPMENT_FEEDBACK_URI = "apn://feedback.sandbox.push.apple.com:2196"

Further references can be found here. Hope this helps.

Zack
  • 46
  • 1
  • 4
  • Thank you! Can I test ability to receive push notifications in app with Houston? – drewpts Jun 05 '16 at 17:12
  • 1
    Of course! I use it every day and It is an excellent utility. Just install the nomad-cli by typing: `gem install nomad-cli` and send your push with `apn push "" -c /path/to/apple_push_notification.pem -m "Test"` – Zack Jun 05 '16 at 17:18
  • Thanks! `.pem` file is a push notifications certificate for back-end? – drewpts Jun 05 '16 at 17:25
  • 1
    Yes, a `.pem` file is a converted Apple `.p12` certificate downloaded from `developer.apple.com` and then exported from your Mac's keychain. You can follow this guide to generate it: http://stackoverflow.com/questions/21250510/generate-pem-file-used-to-setup-apple-push-notification – Zack Jun 05 '16 at 17:32
  • If you find my information correct and did solve your question please mark it as resolved. It could help to build my reputation on S.O. Thanks a lot and have a nice day. – Zack Jun 05 '16 at 21:07
  • 1
    JP_Mob's answers were valuable as well! So I can not tick your answer as more valuable in honour to JP_Mob. Peace to you all guys! Thanks! – drewpts Jun 06 '16 at 07:38
  • Ok no problem, you decide. Peace. – Zack Jun 06 '16 at 10:27