How to use phonegap-push-phugin with IOS and GСM?

Trying to make the reception pushey via GCM. Registered the app here: https://developers.google.com/mobile/add?platform=...

downloaded developer/production certificates obtained put config in the root of the xcode project.

var params = {
 "android": {"senderID": APP.senderId},
 "ios": {"alert": "true", "badge": "true", "sound": "true", "senderID": APP.senderId},
 "windows": {}
};
var push = PushNotification.init(params);
push.on('registration', function(data) {
console.log(data);
...
});

push.on('notification', function(data) {
console.log(data);
...
});
push.on('error', function(data) {
console.log(data);
});


Registration normally takes place, registrationId assigned.

Trying to send a message from the server:

public boolean send(String recipient, notification, PushNotification) {
 LOG.info("sending a message to the recipient :" + recipient);
 Message message = new Message.Builder()
 .addData("title", notification.getTitle())
 .addData("message", notification.getMessage()) 
.priority(Message.Priority.HIGH)
.build();
 try {
 Result result = sender.send(message, recipient, RETRIES_COUNT);
 LOG.debug("sending Result :" + result);
 if (result.getSuccess() != null && result.getSuccess() > 0) {
 return true;
}
 if (result.getFailure() != null) {
 LOG.error("While sending a message an error occurred:" + result.getErrorCodeName());
}
 return false;
 } catch (Exception e) {
LOG.error(e);
 return false;
}
}
}


as a result, in the log appears the following:
16-06-06 20:28:32,868 INFO : [pool-2-thread-1] sending a message to the recipient :k3YUHDkEaR0:APA91bGSc9Wc3dvrS1-6EKBPL4Duu_xZDIujiUZjhkxaaHz3BS3n_zciuqzlffieszxax4knuu7oq0555ji3zzrgivenktd0p63fth6bpuhoxkck-ujHlBTi9gSPRXJ6ixd_kTyCfrwS
16-06-06 20:28:33,246 DEBUG: [pool-2-thread-1] the Result of sending : [ messageId=0:1465234217220513%ca70b4fbf9fd7ecd ]


However, before the phone nothing comes. What am I doing wrong?
July 8th 19 at 16:23
0 answer

Find more questions by tags PhoneGapApache CordovaPush-technology