java - AWS (Windows 2012) unable to connect to APNS (Apple Push Notification Server) -


i trying connect apns server via java using com.notnoop.apns.apns.jar.

public class applepushnotification {           static apnsservice apns = apns.newservice().withcert(constants.cert_path, constants.cert_password).withsandboxdestination().build();     public static void pushmsg(string msg, string token) {       try{           string payload=apns.newpayload().sound("default").alertbody(msg).build();           apns.push(token,payload);       }       catch(networkioexception ex) {           ex.printstacktrace();       }    } } 

i have downloaded apns production certificate , converted .p12 format , placed in server aws windows 2012 machine. however, no push notifications sent.

the same setup works on local machine, windows 8 pc.

static apnsservice apns = apns.newservice()                               .withcert(constants.cert_path, constants.cert_password)                               .withproductiondestination()                               .build() 

i changed sandbox production working....


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -