jazzband / django-push-notifications

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

Remove outdated dependency on apns2 and use aioapns instead? #646

Closed gabn88 closed 1 year ago

gabn88 commented 2 years ago

The history:

apns2 is used for communicating with Apple for push notifications (APN). It depends on hyper, which is unmaintained (see here: https://github.com/Pr0Ger/PyAPNs2/issues/126#issuecomment-1008424954).

The problem:

apns2 uses an old version of py-jwt for this communication and is also sort of unmaintained. For example djangorestframework-simplejwt (and probably other packages) use a newer version of py-jwt.

A half-baked solution:

Install apns2 manually from master (pip install --upgrade git+https://github.com/pr0Ger/PyAPNs2.git@5e4a938)

A better solution/proposal:

Change dependency from apns2 to aioapns, since the latter seems to be the better maintained package ( see https://github.com/Pr0Ger/PyAPNs2/issues/126#issuecomment-1008424954, from @erwan-lemmonier )

What do you think?

jamaalscarlett commented 2 years ago

Makes sense to me, if we can get a PR and all the tests still pass. But I only use android/web so I'll differ to others.

Theunis111 commented 2 years ago

Are you able to retrieve the registration ID with aioapns? I am really struggling to retrieve the id of ios devices, keep getting bad device token and cant see the id at all.

azmeuk commented 1 year ago

Closing in favor of #622