Description
Below is my code to send push notification , though it's success it doesnt get delivered to device.
Parse.Push.send({
where: {
"deviceType": {"$in": ["ios"]}
}, data: {
"title": "Registration",
"alert": "Push Notification working"
}
}, {
useMasterKey: true,
success: function() {
console.log("Push was Successful");
res.json("true")
},
error: function(error){
console.log(error)
}
});
Configuration:
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'XXXX',
masterKey: process.env.MASTER_KEY || 'XXXX', //Add your master key here. Keep it secret!
serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed
clientKey: process.env.CLIENT_KEY || 'XXXX',
liveQuery: {
classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions
},
restAPIKey:"skillz",
verbose: true,
push: {
ios: {
pfx:'certs/services.p12',
topic: 'com.XXX.Skillz',
production:false,
passPhrase:'push'
}
}
});
Verbose Logs attached screenshot.
Any help is really appreciated.