jazzband / django-push-notifications

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

Device ID does not accept Apple devices (iPhone for example) #433

Open gabn88 opened 7 years ago

gabn88 commented 7 years ago

The FCM deviceID now only accepts Android devices. This, while it is certainly possible to send push notifications to Apple devices using Google's FCM service.

I know it is possible to leave this field empty, but 1. it took me some time to find out why push notifications weren't working on iOS and 2. There is not good reason to only accept Android Device IDs.

jamaalscarlett commented 7 years ago

When FCM was added, I believe it was as an update to GCM which will be phased out at some point. But you are correct, FCM does allow for push notifcations to be sent to IOS devices. Feel free to submit a pull request :)

jamaalscarlett commented 7 years ago

This may be fixed by https://github.com/jleclanche/django-push-notifications/pull/386

matthewh commented 7 years ago

Issue #386 needs more testing to determine how it behaves with existing data. I am particularly concerned with how drf api calls would translate old ids. It may be hard to preserve backwards compatibility here.

On Oct 20, 2017, at 11:50 PM, Jamaal Scarlett notifications@github.com wrote:

This may be fixed by #386

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

gabn88 commented 7 years ago

Backwards compatibility? I would say, just make a CharField of it. Of course it would be cool to validate against both the spec of Android and Apple, but I cannot find a hard spec on the device id for both? Validation is also possible on a CharField and at least this is forward compatible, which a UUID field probably is not (if it is even compatible with all existing device IDs).

matthewh commented 7 years ago

I don't disagree with you @gabn88 but @jleclanche has generally disapproved of converting the Device ID field to a CharField.

jleclanche commented 7 years ago

Go for it.

uber1geek commented 6 years ago

Has this been fixed? I was thinking to use this app for implementing push notifications for our ios and android apps via fcm with a django backend. Please advise.

gabn88 commented 6 years ago

Just go for this module and leave the deviceID field empty on ios for now.

sevdog commented 4 years ago

Any news about this? I run into this problem because UIDevice.current.identifierForVendor.uuidString returns a UUID while GCMDevice wants an HexInteger.

sainipray commented 1 year ago

Any update on this, because I need to save iOS device ID