Meteor-Community-Packages / Meteor-Community-Packages/raix-push

Notifications not working for IOS

Open
#305 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
505
Forks
191
PR merge metrics
No merged PRs in 30d

Description

I followed the steps carefully but after deploying my app with Heroku; the app slows down and does not get any notifications. Maybe someone get tell me what I did wrong.
My push-server code

```
import { Meteor } from 'meteor/meteor';

Meteor.startup(function () {

if( !Meteor.settings.fcm.serverKey || !Meteor.settings.public.fcm.senderId ){
return;
}

Push.Configure({
apn: {
certData: Assets.getText('fbdev.pem'),
keyData: Assets.getText('fbkeydev.pem'),
passphrase: '********',
production: true,
},
gcm: {
apiKey: Meteor.settings.fcm.serverKey,
senderID: Meteor.settings.public.fcm.senderId
},
production: true,
badge: true,
sound: true,
alert: true,
vibrate: true,
sendInterval: 3000,
sendBatchSize: 1
});
});

Meteor.methods({
'sendNotification': function(user) {
check(user, String);

if( !Meteor.settings.fcm.serverKey || !Meteor.settings.public.fcm.senderId ){
if( Meteor.isDevelopment ){
console.log('Push Notifications are not enabled. Please enter your API keys for Google FCM.')
}
return;
}

Push.send({
from: 'FleaBrocante',
title: 'FleaBrocante',
text: 'Vous avez un nouveau message',
badge: 1,
query: {
userId: user
}
});
}
});
```

And my push-client code
```
import { Meteor } from 'meteor/meteor';

Meteor.startup(function () {

if( !Meteor.settings.public.fcm.senderId ){
return;
}

Push.Configure({
android: {
senderID: Meteor.settings.public.fcm.senderId,
iconColor: '#0C431B',
icon: 'pushicon',
badge: true,
sound: true,
alert: true,
vibrate: true,
},
ios: {
alert: true,
badge: true,
sound: true
}
});
});
```

I have the .pem files inside /private; I get notifications on Android but nothing and IOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the push-server and push-client Meteor.startup configuration and the Heroku deployment settings, then verify how the referenced .pem files and production APNs configuration are loaded. Compare the working Android path with the iOS configuration; done means iOS notifications are delivered after deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.