Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Added the ability to send GCM messages to iOS #9

Merged
merged 3 commits into from
Dec 1, 2016
Merged

Added the ability to send GCM messages to iOS #9

merged 3 commits into from
Dec 1, 2016

Conversation

luisdalmolin
Copy link
Contributor

GCM can send push messages to iOS devices too. For that, a new 'notification' key is needed.

Since ZendService\Google\Gcm\Message doesn't provice this key, I extended the class, added the property and rewrite the toJson method.

Also change the Packet that GcmChannel creates.

@barryvdh
Copy link
Collaborator

barryvdh commented Dec 1, 2016

Is this already proposed upstream?

@luisdalmolin
Copy link
Contributor Author

I think it was introduced in GCM 3.0. Here it's a article in google developers portal:
https://developers.google.com/cloud-messaging/ios/client#receive_messages_through_the_gcm_apns_interface

This notification I received on iOS with the code in this pull request.
whatsapp image 2016-12-01 at 17 05 53

@barryvdh
Copy link
Collaborator

barryvdh commented Dec 1, 2016

Thanks, meant that it perhaps makes sense to add this to the zend package directly?

@luisdalmolin
Copy link
Contributor Author

Yes, I first look for that on the zend library.

But I found this issue (zendframework/ZendService_Google_Gcm#14) without answer from a long time and still open.

Maybe it's better to use another library or even write the code all here.

@barryvdh
Copy link
Collaborator

barryvdh commented Dec 1, 2016

Could tot Fix The cs issue and add a test?

@barryvdh
Copy link
Collaborator

barryvdh commented Dec 1, 2016

Cool, and this doesn't change anything on android?

@luisdalmolin
Copy link
Contributor Author

I did many tests sending notifications individually, for both devices and only for iOS and it worked every time.

Also I researched and didn't find any breaking change on that too.

@barryvdh barryvdh merged commit 063c2e5 into laravel-notification-channels:master Dec 1, 2016
@barryvdh
Copy link
Collaborator

barryvdh commented Dec 1, 2016

Thanks!

@luisdalmolin
Copy link
Contributor Author

Awesome. Could you tag another release of the package?

@barryvdh
Copy link
Collaborator

barryvdh commented Dec 2, 2016

I added a branch-alias so you should be able to require 0.1.x@dev in a couple of minutes. Will tag when I have a chance to verify myself.

@luisdalmolin
Copy link
Contributor Author

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants