Closed
Description
Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!
For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
- You've met the prerequisites.
- You're running the latest version of Parse Server.
- You've searched through existing issues. Chances are that your issue has been reported or resolved before.
Environment Setup
Every thing okay, except push notification.
Steps to reproduce
main.js -->
Parse.Cloud.define("sendPush", function(request, response) {
var sendUserId = request.params.userId;
var msg = request.params.message;
var query = new Parse.Query(Parse.Installation);
query.equalTo('userId', sendUserId);
Parse.Push.send({
query: query,
data: {
alert: msg,
sound: 'default'
}
}, {
success: function() {
// Push was successful
response.success("Push sent");
},
error: function(error) {
// Handle error
response.error(error);
},
useMasterKey: true
});
});
index.js -->
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 || '',
masterKey: process.env.MASTER_KEY || '',
serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse',
push: {
android: {
senderId: 'my id',
apiKey: 'my apiKey'
},
ios: [{
pfx: '/push/Certificates_Dev.p12', // Dev PFX or P12
bundleId: 'my_bundle_id',
production: false // Dev
},
{
pfx: '/push/Certificates_Prod.p12', // prod PFX or P12
bundleId: 'my_bundle_id',
production: true // Prod
}]
}
});
Logs/Trace
Please help...
Metadata
Metadata
Assignees
Labels
No labels