I have the same problem, but we are using Java
Libraries connected to APNs use https://github.com/jchambers/pushy
Topic:
App & System Services
SubTopic:
Notifications
Tags: