Issue Description
My two apps (a free app and a pro app) point to the same parse database.
Expected Results
I want Push Notifications working in both two apps.
Actual Outcome
While for now, only one app can send push notification successfully.
Steps to reproduce
Besides sending notifications by my apps, I also tried to send push by dashboard. The result is same, only one app works, another fails to get the notification.
Environment Setup
I'm trying the way in Github #2188. I also refer to following two links: https://www.parse.com/questions/push-to-multiple-apps Multiple apps in a single parse server
But all didn't work.
Thanks so much for helping out.
My cloud code in index.js are:
{ }
push: { ios: [
{ pfx: __dirname+'/push_certs/DevPushLoveAgainPro.p12', // Dev PFX or P12 bundleId: 'com.app1', production: false // Dev },
{ pfx: __dirname+'/push_certs/ApplePushLoveAgainPro.p12', // Prod PFX or P12 bundleId: 'com.app1', production: true // Prod }, { pfx: __dirname+'/push_certs/DevPushLoveAgainFree.p12', // Prod PFX or P12 bundleId: 'com.app2', production: false // Prod },
{ pfx: __dirname+'/push_certs/ApplePushLoveAgainFree.p12', // Prod PFX or P12 bundleId: 'com.app2', production: true // Prod } ] }Parse.Cloud.define("push", function(request, response) { var id = request.params.toUser; getUser(id).then (
function(user) {
var query = new Parse.Query(Parse.Installation); query.equalTo("user", user); Parse.Push.send({ where: query, data: request.params.data }, { useMasterKey: true, success: function() { response.success('Success!!!!!!!!!!!'); }, error: function(error) { response.error('Error!!!!!!!!!!!!!! ' + error.message); } });} , function(error) { response.error(error); });});function getUser(userId){ var userQuery = new Parse.Query(Parse.User); userQuery.equalTo("objectId", userId); return userQuery.first ({ useMasterKey: true, success: function(userRetrieved) { return userRetrieved; }, error: function(error) { return error; } }); };