parse-community / parse-server-push-adapter

A push notification adapter for Parse Server
https://parseplatform.org
MIT License
85 stars 100 forks source link

Adapter is pulling buggy version while installing 2.5.3 #94

Closed JoeyBodnar closed 6 years ago

JoeyBodnar commented 6 years ago

I saw that the error with push notifications not being sent to iOS was fixed (and dug through the source code to verify), but parse server is still pulling the buggy version of this when I try to update to 2.5.3. My package.json has

 "parse-server": "2.5.3",
 "parse-server-push-adapter": "^2.0.0"

The file loaded into my node_modules still has:

  notification.setAlertTitle(coreData.title);

How can I be sure to pull the fixed version?

flovilmart commented 6 years ago

parse-server will still use the pinned version, not the 2.0.0. You need to pass it as a custom adapter ex:

const { ParsePushAdapter } = require('parse-server-push-adapter');
const pushOptions = {
  'ios': [...],
};

const server = new ParseServer({
   appId: ....,
   masterKey: ....
   push: {
     adapter: new ParsePushAdapter(pushOptions)
   }
});
MBontekoning commented 6 years ago

I did this, but it doesn't help. The problem is that npm installs a version in which the code still has

notification.setAlertTitle(coreData.title);

Why is npm not installing the fixed version?