hi i have written a
java class to send push notification to APNS.
But i am getting Caused by: java.net.ConnectException: Connection refused: connect exception. Please help me ti fix this. I have given the certificates, password correctly.
ApnsService service = APNS.newService().withCert("D:/iOS/Certificates.p12", "Karthik123")
.withSandboxDestination().build();
System.out.println("Service Created : "+service);
service.start();
System.out.println("Service started");
service.testConnection();
System.out.println("Connection success");
String payload = APNS.newPayload().alertBody(
"This is a sample Notification Message!").build();
System.out.println("Payload Created : "+payload);
String token = "b7ae2ef781d2b4406c9ebf6011ac733c95b59867";
service.push(token, payload);