Meteor-Community-Packages / raix-push

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

iso notification not delivered / up-to-date demo? #350

Closed twentyfortysix closed 5 years ago

twentyfortysix commented 5 years ago

Hello,

after more than 2 weeks of fixing error here, error there and making many test I decided to post a question here, with one proposal.

The problem.

I was able to set it up in a way that it send notifications to Android, but never to IOS.

Setup

Compiled on/with:

cordova plugins:

Certificates work and have been tested based on: https://medium.com/@acarabott/meteor-native-ios-push-notifications-heroku-raix-push-cordova-213f486c4e6d

Xcode:

server log after notification push:

I20181001-20:54:58.147(2)? Push: Send message "Hello World" via query {}
I20181001-20:54:58.148(2)? send to token { apn: 'c78c10dcffd1830872002f08a8b1988648b5fa8148428bc941c32895b68ad48e' }
I20181001-20:54:58.148(2)? Push: Sent message "Hello World" to 1 ios apps 0 android apps
I20181001-20:54:58.149(2)? Push, GUIDE: The "Push.appCollection" - No GCM clients have registred on the server yet...

The push notifications are not delivered on iso device (I have not tested the Android in this test version)

The app runs on localhost and on remote ios device in developement mode. The app correctly asks for notification permission. Server is able to send notification but the notification is never delivered to ios device (even to unfocused app).


After many combinations of cordova plugins, npm modules and all I created this test https://github.com/twentyfortysix/raix-push-demo (Certificates are not part of the test package, you have to use yours)

The demo

The demo is an updated version of the outdated demo from official readme https://github.com/elvismercado/meteor-raix-push-demo The "new demo" is able to send notifications to ios but they are never delivered.. (I have also bit different combination of the packages in my project with the same result ./ )

Can anybody try/look at my demo and tell me what I do wrong? As if we possibly update this test and make it a working demo it might serve others as a starting point as well.

da314pc commented 5 years ago

@twentyfortysix are you running this on a device or simulator?

da314pc commented 5 years ago

@twentyfortysix Push notifications will not be sent to the ios device when the code signing is set to development. 1) Make sure you have the push settings for development. 2) IOS has in-flight testing, which will have the right provisions setup. Then you should see the notifications.

But if you check the database and the tokens are being successfully registered & messages are sent to the device, a good indicator that everything is set up correctly

twentyfortysix commented 5 years ago

Thanks for help.. I left Raix and have set it all up thanks to Paul and his implementation.. (which is based on Raix) https://github.com/activitree/meteor-push I have both Android and iOS fully covered.. it was hell to set up, all the keys and android versions and Pods and all, but we managed to set it all up.

da314pc commented 5 years ago

Yea the initial setup is rough, But iOS can be troublesome, I think now that gcm supports APN's we should just use firebase for the ios side.