jazzband / django-push-notifications

Send push notifications to mobile devices through GCM or APNS in Django.
MIT License
2.24k stars 605 forks source link

Apns error handling and debug information #342

Open psychok7 opened 7 years ago

psychok7 commented 7 years ago

I noticed that currently for the GCM when we use the bulk send_message we get back a json like this:

    {
      "failure":15,
      "canonical_ids":0,
      "success":985,
      "multicast_id":53060675676755618095648,
      "results"
        ...
      }

For the APNS with https://github.com/jleclanche/django-push-notifications/commit/fcebfc1a3c66e761f46641977106a1caee7291b0 i am only getting a string like "6b9ea422e297a61c5284600fc4498345344f724cfc3d540d8e5b9727541cadfe" (even for multiple apn devices).

        try:
            apns_devices_response = apns_devices.send_message(
                None, extra=kwargs)
        except (APNSError, SSLError) as e:
            logger.error('APNSError "%s"', str(e))

Isn't there a way for apns send_message to return a json like gcm with more information?

psychok7 commented 7 years ago

@jamaalscarlett created the issue like we talked about