final InputStream certificate = Thread.currentThread().getContextClassLoader() .getResourceAsStream("aps_dev_credentials.p12"); final char[] passwd = {'1','2','3','4'}; final ApnsService apnsService = com.notnoop.apns.APNS.newService() .withCert(certificate, new String(passwd)) .withSandboxDestination().build(); apnsService.testConnection();
public void testConnection() throws NetworkIOException { service.testConnection(); }