Does this package work for push notifications to native iOS and Android apps? (not cordova)
Does this package work for push notifications to native iOS and Android apps? (not cordova)
you would have to connect via ddp and report in the client push id - but if so then yes.
@raix How about push from server to native iOS? I guess it did work just asking to be sure. Because title for this repos is mislead somehow so people keep asking (yeah me too).
Thanks
The server uses apples/googles push servers so it should not care to much about the client - that said you need to add the client token on to the server. https://github.com/raix/push/blob/master/lib/server/server.js#L14
You can also create a rest point via the webapp package and have the app hit that, and just:
WebApp.connectHandlers.use('update_token', function(req, res, next) {
if (req.method === 'POST') {
// Not sure if we are running in a fiber here, if not then add that
// Could perhaps just pass in req.query directly to the meteor call...
Meteor.call('raix:push-update', {
id: 'myUniqClientId', // If not supplied the server will generate
token: 'xxxxxxxxxxxxxx',
appName: 'myNativeApp',
userId: null,
});
} else {
next();
}
});
@raix can you please suggest me how to get notification on native android device using this package. As I have installed the package and made appropriate changes but I am not getting notification on my device though it is giving
The "Push.appCollection" is empty - No clients have registred on the server yet... please suggest