phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

iOS Notification via GCM #115

Closed tomercagan closed 8 years ago

tomercagan commented 9 years ago

Recently, I found out that GCM support iOS messaging.

From what I recon, you register device with APNS and then submit the token to GCM and in "return" get a GCM token you can use for pushing notifications to iOS devices. If I understand correctly, GCM just pushes your payload to APNS (but I could be wrong here).

From the little I understand of both native iOS development and of Cordova/PG plugins, it seems like a relatively small change to the iOS code (the part of registering Apple token with GCM) could enable a simpler server notification code.

Does this make sense? Could this indeed be added? I've seen that the iOS example code (native) uses dependencies from google - is that something that can be used within the plugin code?

I don't have much experience with either iOS or plugin development but if the above is feasible, and someone can "assist" with it I'd be happy to contribute my time for this.

tomercagan commented 7 years ago

I would check the certificates on your server.

Are you in dev/production? Make sure you use the right certificate and the right URL (sandbox or prod).

From: Heart [mailto:notifications@github.com] Sent: Monday, October 17, 2016 10:15 To: phonegap/phonegap-plugin-push phonegap-plugin-push@noreply.github.com Cc: tomercagan tomer@tomercagan.com; Author author@noreply.github.com Subject: Re: [phonegap/phonegap-plugin-push] iOS Notification via GCM (#115)

Hi, All I am new to Ionic Push, I appreciate your help

I am failing to register device when the app launches I totally followed the ionic push guide for the existing project as well as new template project https://docs.ionic.io/services/push/#plugin-installation But both case, I got the following log on the Xcode log panel

2016-10-17 03:09:07.119186 myapp[635:162318] Push Plugin register called 2016-10-17 03:09:07.119272 myapp[635:162318] PushPlugin.register: setting badge to false 2016-10-17 03:09:07.119297 myapp[635:162318] PushPlugin.register: clear badge is set to 0 2016-10-17 03:09:07.119312 myapp[635:162318] PushPlugin.register: better button setup 2016-10-17 03:09:07.123228 myapp[635:162318] GCM Sender ID (null) 2016-10-17 03:09:07.123278 myapp[635:162318] Using APNS Notification 2016-10-17 03:09:07.130045 myapp[635:162256] Push Plugin register failed

Ionic Clouding Service configuration and the app configuration is done according to the guide

What do you think about this issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/phonegap/phonegap-plugin-push/issues/115#issuecomment-254130015 , or mute the thread https://github.com/notifications/unsubscribe-auth/AD5axY150BacuIN5eTdZQnKqru52Bm4iks5q0yCJgaJpZM4F5dHQ . https://github.com/notifications/beacon/AD5axdlyUPuPQcD-t32zprFdfwDwXdl1ks5q0yCJgaJpZM4F5dHQ.gif

bwoodlt commented 7 years ago

I'm having similar issue. Any idea how to debug this?

2016-11-22 16:09:21.323078 SFF[829:242540] Using APNS Notification 2016-11-22 16:09:21.511167 SFF[829:242429] Push Plugin register success: <f091ff5f 0e70e6bf 5a0a4864 5cc3fcb1 96e210e1 1cb9051f 399dde67 b5cf26b9> 2016-11-22 16:09:21.552051 SFF[829:242429] device token f091ff5f0e70e6bf5a0a48645cc9ccb196e210e11cb9051f399dde67b5cf06c2 2016-11-22 16:09:21.579542 SFF[829:242429] active 2016-11-22 16:09:21.579645 SFF[829:242429] PushPlugin skip clear badge 2016-11-22 16:09:48.596097 SFF[829:242429] active 2016-11-22 16:09:48.596185 SFF[829:242429] PushPlugin skip clear badge 2016-11-22 16:09:48.619033 SFF[829:242429] Push Plugin register success: <f091ff5f 0e70y7bf 5a0a4864 5cc3fcb1 96e210e1 1cb9051f 399dde67 b5cf06c2> 2016-11-22 16:09:50.480582 SFF[829:242429] active 2016-11-22 16:09:50.480724 SFF[829:242429] PushPlugin skip clear badge

Thanks in anticipation.

alastairmcavoy-S1 commented 7 years ago

We resorted to using APN and GCM to resolve the problem – we’ve not retried it recently with the newer GCM versions.

Alastair

From: Ifemide notifications@github.com Reply-To: phonegap/phonegap-plugin-push reply@reply.github.com Date: Tuesday, 22 November 2016 at 16:15 To: phonegap/phonegap-plugin-push phonegap-plugin-push@noreply.github.com Cc: Alastair McAvoy alastair.mcavoy@s1now.com, Comment comment@noreply.github.com Subject: Re: [phonegap/phonegap-plugin-push] iOS Notification via GCM (#115)

I'm having similar issue. Any idea how to debug this?

2016-11-22 16:09:21.323078 SFF[829:242540] Using APNS Notification 2016-11-22 16:09:21.511167 SFF[829:242429] Push Plugin register success: <f091ff5f 0e70e6bf 5a0a4864 5cc3fcb1 96e210e1 1cb9051f 399dde67 b5cf26b9> 2016-11-22 16:09:21.552051 SFF[829:242429] device token f091ff5f0e70e6bf5a0a48645cc9ccb196e210e11cb9051f399dde67b5cf06c2 2016-11-22 16:09:21.579542 SFF[829:242429] active 2016-11-22 16:09:21.579645 SFF[829:242429] PushPlugin skip clear badge 2016-11-22 16:09:48.596097 SFF[829:242429] active 2016-11-22 16:09:48.596185 SFF[829:242429] PushPlugin skip clear badge 2016-11-22 16:09:48.619033 SFF[829:242429] Push Plugin register success: <f091ff5f 0e70y7bf 5a0a4864 5cc3fcb1 96e210e1 1cb9051f 399dde67 b5cf06c2> 2016-11-22 16:09:50.480582 SFF[829:242429] active 2016-11-22 16:09:50.480724 SFF[829:242429] PushPlugin skip clear badge

Thanks in anticipation.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/phonegap/phonegap-plugin-push/issues/115#issuecomment-262285663, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACa10dtA-oBMEKPTKAt233JtQGPVdwujks5rAxURgaJpZM4F5dHQ.


This document is private and confidential. All property, copyright and other rights in it and its contents belong to Newsquest Media Group Limited. It must not be read, copied, disclosed or otherwise used without Newsquest’s authorisation. Newsquest may exercise its legal rights and remedies in the event of any such unauthorised use.

Newsquest Media Group Limited.

Registered in England, number 01676637. Registered office: Loudwater Mill, Station Road, Loudwater, High Wycombe, Bucks HP10 9TY.

lock[bot] commented 6 years ago

This thread has been automatically locked.