Skip to content


Subversion checkout URL

You can clone with
Download ZIP


froh42 edited this page · 5 revisions
Clone this wiki locally

java-apns is a Java client for Apple’s Push Notification Service (APNS). The library aims to provide a highly scalable interface to the Apple server, while still being simple and modular.

The interface aims to require very minimal code to achieve the most common cases, but have it be reconfigurable so you can even use your own networking connections or JSON library if necessary.


  • Easy to use, high performance APNS Service API
  • Supports Apple Feedback service
  • Easy to use with Apple’s certificates
  • Easy to extend and reuse
  • Easy to integrate with dependency injection frameworks
  • Easy to setup custom notification payloads

Known Issues

  • The library does not verify the correctness of deviceToken or the length of the sent notification message (needs to be less 255 in total)
  • The Feedback servers use public certificates that are not verified by major SSL companies. Connecting to the Feedback servers would cause an Exception similar to the following:
Caused by: PKIX path building failed: unable to find valid certification path to requested target

This is a known issue. The work around is to mark the public certificates as trusted by Java. The Downloads page contains jssecacerts file, that can be placed in $JAVA_HOME/lib/security/jssecacerts. jssecacerts is a keystore that contains the public certificate of Apple Feedback sandbox and production servers.

The file is generated using Sun’s Andreas Sterbenz’ blog instruction using using his :

% wget
% javac
% java InstallCert
# [ ... press 1 when asked to ...]
% java InstallCert
# [ ... press 1 when asked to ...]
% cp jssecacerts $JAVA_HOME/lib/security
Something went wrong with that request. Please try again.