Meteor-Community-Packages / raix-push

DEPRECATED: Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox)
https://atmospherejs.com/raix/push
MIT License
513 stars 197 forks source link

android works, ios not working #238

Open juniverse76 opened 8 years ago

juniverse76 commented 8 years ago

Hi, first of all, thank you for great library.

I am developing app for both android and iOS. And when I test sending a push, Android device receives the push very well. However, iOS does not.

When I run the server with Push.debug = true; I have the following message.

Push: Got push token from app: { id: 'GkohP22JYBGzyJcs6',
   token: { apn: 'e2fd67a329560c310d58fbc34f413bcd34e64a2d439c50513a190030e664108e' },
   appName: 'main',
   userId: 'HbvZM3EXMriqoMKL6',
   metadata: {} }
 Push: updated { _id: 'GkohP22JYBGzyJcs6',
   appName: 'main',
   userId: 'HbvZM3EXMriqoMKL6',
   enabled: true,
   createdAt: Fri Sep 02 2016 19:40:52 GMT+0900 (KST),
   updatedAt: Fri Sep 02 2016 19:40:52 GMT+0900 (KST) }

I figured this messages is good sign since I got the token from apn, right? I also have similar message for gcm too.

For more background, I am testing on iOS device by distributing from HockeyApp. Also, my work station is in Ubuntu (and so is my test server), so I'm running the server by

meteor run android-device --settings settings-dev.json

like so.

In conclusion, I need help...

raix commented 8 years ago

android easy to setup ios difficult due to the certificate hell (every cert/key/provision etc. have to match...) + note that some network routers might block some ports.

juniverse76 commented 8 years ago

Hey, thanks for a comment. Actually i fixed my issue. It was related to prod/dev setting. Apparently the key was for production and the config was in development. I guess i should've catch this earlier... Though it would've been better if the document has comment about checking the apn key type and 'production' flag in the config json file.

Thank you anyway!

      1. 03:32에 "Morten N.O. Nørgaard Henriksen" < notifications@github.com>님이 작성:

android easy to setup ios difficult due to the certificate hell (every cert/key/provision etc. have to match...) + note that some network routers might block some ports.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/raix/push/issues/238#issuecomment-248390788, or mute the thread https://github.com/notifications/unsubscribe-auth/ALkUZHNIupZQyYitim0-QyqCHufFNIU8ks5qsCajgaJpZM4JzmG9 .

y01s commented 8 years ago

@juniverse76 I'm having problems using it with Android. Can you please give an example of the configurations (client and server) where did you put them ?

Thanks a lot.

juniverse76 commented 8 years ago

@y01s There was nothing special about Android. I just followed the instruction in the document. Go in to google api, create project and all sort. Put the apiKey and projectNumber in the appropriate places. And all things seem to work. Sorry that I cannot be more specific, but that was all I did.

      1. 17:32에 "y01s" notifications@github.com님이 작성:

@juniverse76 https://github.com/juniverse76 I'm having problems using it with Android. Can you please give an example of the configurations (client and server) where did you put them ?

Thanks a lot.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/raix/push/issues/238#issuecomment-249353064, or mute the thread https://github.com/notifications/unsubscribe-auth/ALkUZAJYXJN0zPfRj6RHzBPxZTkM71c1ks5qtOA0gaJpZM4JzmG9 .

y01s commented 8 years ago

@juniverse76 It's okay, I solved the issue. Actually, I was running the app on an android emulator without google api, and when I changed, it worked.

Thanks for your help.

hridayeshgupta commented 6 years ago

for me even android is not working. I couldn't find document on how to ask for permission to enable push notification. Push.addListener('token', () => {}) callback never called, Probably because I didn't ask for token(dont know how). Push.enabled(true) doesnt fire token callback either, not ask for any permission on mobile. Any code sample on how it worked on android?