meteor-cordova-notifications icon indicating copy to clipboard operation
meteor-cordova-notifications copied to clipboard

Question/Enhancement: Any immediate plans for iOS/APN

Open adamgins opened this issue 11 years ago • 31 comments
trafficstars

Hi there, this looks awesome... I am really interested in any immediate plans for iOS/APN support, pretty pls?

adamgins avatar Nov 03 '14 06:11 adamgins

Yes, I'm talking to somebody about implementing this for iOS at the moment - it will hopefully only take a few days.

richsilv avatar Nov 03 '14 08:11 richsilv

Great stuff :-)

adamgins avatar Nov 03 '14 10:11 adamgins

Would be great if this support IOS as well, would fill the gap.

Are there plans any ETA or a can anyone recommend a package for IOS push notifications which is proven to work at this moment with latest meteor?

pvos avatar Nov 06 '14 14:11 pvos

Kevin O'Hagan's looking at this. He's busy organising MeteorDay Spain at present, but hopefully we will have some progress over the next week. It really shouldn't take long.

On Thu, Nov 6, 2014 at 2:53 PM, Pascal Vos [email protected] wrote:

Would be great if this support IOS as well, would fill the gap.

Are there plans any ETA or a can anyone recommend a package for IOS push notifications which is proven to work at this moment with latest meteor?

— Reply to this email directly or view it on GitHub https://github.com/richsilv/meteor-cordova-notifications/issues/1#issuecomment-61989762 .

richsilv avatar Nov 06 '14 14:11 richsilv

Yes next week ETA! :)

shouldnt be too hard to implement, havent had the time to really look at it yet ! @richsilv you're comments are awesome for TODO's ;)

kevohagan avatar Nov 06 '14 15:11 kevohagan

Hey guys, great work!!! I think it's the only push notification for meteor/android working out of the box. We were trying to get meteor working with push notifications and failed. So thumbs up for you guys.

randyhak avatar Nov 14 '14 13:11 randyhak

Hey Randy and co.

Im working the iOS implementation of things. should be working in the next few days! :)

On 14 November 2014 14:24, Randy [email protected] wrote:

Hey guys, great work!!! I think it's the only push notification for meteor/android working out of the box. We were trying to get meteor working with push notifications and failed. So thumbs up for you guys.

— Reply to this email directly or view it on GitHub https://github.com/richsilv/meteor-cordova-notifications/issues/1#issuecomment-63063683 .

Kevin O'Hagan @kevohagan +0034685245319 Palma de Mallorca, Spain

kevohagan avatar Nov 14 '14 13:11 kevohagan

Hey Kevohagan,

If you need help testing the IOS version, let me know.

Regards,

Randy

randyhak avatar Nov 21 '14 13:11 randyhak

Hi all. Any news on the iOS implementation?

elvismercado avatar Nov 24 '14 13:11 elvismercado

hey guys!

sorry for all of this, i've been really stuck with work and events and havent really advanced on this, so any help would be welcome, im sure @richsilv would appreciate it!!

so for sure @randyhak if you wnat to check things out, go check the dev branch of the repo :)

kevohagan avatar Nov 24 '14 14:11 kevohagan

thanks for the update @kevohagan. I will try to help if i get some time. Great wok by the way. @richsilv @kevohagan

elvismercado avatar Nov 24 '14 14:11 elvismercado

I think the iOS side of this should be relatively straight-forward, and I've put some pretty extensive comments in the dev branch in terms of what needs doing. My limiting factor isn't really time (although that's always an issue), it's that I'm a Linux/Android guy so I don't have the kit to test it on. So if anybody interested in iOS does have a free evening to take a look, be my guest!

On Mon, Nov 24, 2014 at 2:46 PM, kevohagan [email protected] wrote:

hey guys!

sorry for all of this, i've been really stuck with work and events and havent really advanced on this, so any help would be welcome, im sure @richsilv https://github.com/richsilv would appreciate it!!

so for sure @randyhak https://github.com/randyhak if you wnat to check things out, go check the dev branch of the repo :)

— Reply to this email directly or view it on GitHub https://github.com/richsilv/meteor-cordova-notifications/issues/1#issuecomment-64203147 .

richsilv avatar Nov 24 '14 14:11 richsilv

I'm just starting cordova wrapping for my meteor web app. Native app dev is new to me. Conversely I'm an "iOS guy" so I'd help if I can. I need app notifications for both iOS and Android.

Initial googling turns up this for APN notifications: http://stackoverflow.com/questions/22598009/how-can-one-send-ios-push-notifications-from-a-meteor-app

fungilation avatar Nov 27 '14 04:11 fungilation

@kevohagan do you have any uncommitted work for APN? I'm looking at the dev branch right now.

fungilation avatar Dec 04 '14 08:12 fungilation

@fungilation and @kevohagan thanks for the effort guys, I tried looking into this and programming abilities just are up to snuff to tackle this... you have my moral support and excitement!

funkyeah avatar Dec 04 '14 09:12 funkyeah

@fungilation no i havent any uncommitted work thats worth it really :(

On 4 December 2014 at 10:14, funkyeah [email protected] wrote:

@fungilation https://github.com/fungilation and @kevohagan https://github.com/kevohagan thanks for the effort guys, I tried looking into this and programming abilities just are up to snuff to tackle this... you have my moral support and excitement!

— Reply to this email directly or view it on GitHub https://github.com/richsilv/meteor-cordova-notifications/issues/1#issuecomment-65555868 .

Kevin O'Hagan @kevohagan +0034685245319 Palma de Mallorca, Spain

kevohagan avatar Dec 04 '14 09:12 kevohagan

Has anyone tried or looked at https://github.com/SpaceCapsule/Meteor-phonegap-push/blob/master/push.server.js? Doesn't include the device id management like this package does but seems to handle both android and ios push

fungilation avatar Dec 04 '14 13:12 fungilation

I forked this project and managed to receive notifications on an iPhone5 on iOS8. You can see the adaptations here: https://github.com/elvismercado/meteor-cordova-notifications/tree/dev. I used @fungilation's link to send the a message to the APN server

elvismercado avatar Dec 04 '14 14:12 elvismercado

Great stuff, Elvis.

I'd really appreciate if somebody could briefly test Elvis's branch, and I'll merge it if all appears okay.

On Thu, Dec 4, 2014 at 2:25 PM, Elvis Mercado [email protected] wrote:

I forked this project and managed to receive notifications on an iPhone5 on iOS8. You can see the adaptations here: https://github.com/elvismercado/meteor-cordova-notifications/tree/dev. I used @fungilation https://github.com/fungilation's link to send the a message to the APN server

— Reply to this email directly or view it on GitHub https://github.com/richsilv/meteor-cordova-notifications/issues/1#issuecomment-65638557 .

richsilv avatar Dec 04 '14 17:12 richsilv

Nice! You beat me to it @elvismercado. You found a fix to iOS 8 bug too in PushPlugin. I'll verify notifications receiving on my iPhone 6 and iPad on iOS 7.1

Meteor.npmRequire() is undocumented by meteor though, have this instead in package.js for depending on apn?

Npm.depends({
  // "node-gcm": "0.9.12",    // https://github.com/SpaceCapsule/Meteor-phonegap-push use this
  apn: "1.6.2"
});

fungilation avatar Dec 05 '14 00:12 fungilation

Thanks @richsilv @fungilation . I obviously forgot to mention how i made use of npm. I used https://atmospherejs.com/meteorhacks/npm in a test project so i forgot to set the packages Npm.depends on the package itself. Meteor.npmRequire() is part of the meteorhacks:npm package. I changed it to Npm.depends.

elvismercado avatar Dec 05 '14 08:12 elvismercado

Great. I realized I can't test for iOS notifications yet as I need to get my company DUNS registered before I can get on the apple developer program...

fungilation avatar Dec 05 '14 09:12 fungilation

@elvismercado could we get some quick documentation on how to use your fork?

adnissen avatar Dec 06 '14 01:12 adnissen

@elvismercado another pretty please from me on what @adnissen said above!

in particular I'm a bit confused (not surprising since I'm a noob) on how to configure everything properly. In particular where does the deviceToken come from and how do you set it up properly and/or call it?

The Meteor.call function: https://github.com/elvismercado/meteor-cordova-notifications/blob/59fc740b0611cedb5735cb6c89a1fee7c11cb4f2/cordova-both.js#L31

suggests that data needs to have the token in it but where should: tokenHandler(data) be called?

Looks like you also may need to setup

  • cert
  • key
  • passphrase

as per the following documentation and put them somewhere specific... still a bit confusing to me if thats true

https://github.com/argon/node-apn/wiki/Preparing-Certificates https://github.com/argon/node-apn https://github.com/argon/node-apn/blob/master/doc/connection.markdown

funkyeah avatar Dec 07 '14 18:12 funkyeah

Sorry i haven't had time to write some explanation. I will do my best to have something done by tomorrow night. For now ill mention some stuff here.

You should go ahead and read the PushPlugin documentation. (http://plugins.cordova.io/#/package/com.phonegap.plugins.pushplugin).

The moment we have a user logged in then we try to register the device with the PushPlugin: https://github.com/elvismercado/meteor-cordova-notifications/blob/dev/cordova-both.js#L100 The tokenHandler is passed as an argument, which is where we find the deviceToken if the PushPlugin manages to register the device. All that the tokenHandler does is pass the deviceToken to the user so we know who's deviceToken it is later on when the server needs it.

At this moment any time the server needs to send a notification it will need your certificate.pem, key.pem and passphrase. You need to be subscribed to the iOS Developer Program to be able to create a certificate which you will later extract and create the .pem files needed. I will not explain how to do this right now.

I hope this is enough for now.

elvismercado avatar Dec 08 '14 09:12 elvismercado

Just added a Gitter chatroom for this repo, which is here: https://gitter.im/richsilv/meteor-cordova-notifications?utm_source=share-link&utm_medium=link&utm_campaign=share-link It's a far better forum for discussion for this stuff (when the subject isn't a specific issue). Feel free to join!

richsilv avatar Dec 08 '14 10:12 richsilv

Thanks!

On Mon, Dec 8, 2014 at 4:26 AM, Richard Silverton [email protected] wrote:

Just added a Gitter chatroom for this repo, which is here:

https://gitter.im/richsilv/meteor-cordova-notifications?utm_source=share-link&utm_medium=link&utm_campaign=share-link It's a far better forum for discussion for this stuff (when the subject isn't a specific issue). Feel free to join!

— Reply to this email directly or view it on GitHub https://github.com/richsilv/meteor-cordova-notifications/issues/1#issuecomment-66075773 .

funkyeah avatar Dec 08 '14 22:12 funkyeah

I guess the majority of you is now using the raix:push package instead of this one?

Tim-W avatar May 11 '15 15:05 Tim-W

unfortunately yes @Tim-W

elvismercado avatar May 12 '15 08:05 elvismercado

well I'm not, this works fine

On Tue, May 12, 2015 at 1:19 AM Elvis Mercado [email protected] wrote:

unfortunately yes @Tim-W https://github.com/Tim-W

— Reply to this email directly or view it on GitHub https://github.com/richsilv/meteor-cordova-notifications/issues/1#issuecomment-101185387 .

fungilation avatar May 13 '15 00:05 fungilation