Skip to content

Instantly share code, notes, and snippets.

@klodio
Created June 13, 2015 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klodio/2e07252a9a9d4a1d683f to your computer and use it in GitHub Desktop.
Save klodio/2e07252a9a9d4a1d683f to your computer and use it in GitHub Desktop.
(:import '[com.notnoop.apns APNS])
(defn send-push [dtoken message]
(let [service (.build (.withSandboxDestination
(.withCert (com.notnoop.apns.APNS/newService) "resources/certificate.p12" "password")))
payload (.build (.alertBody (com.notnoop.apns.APNS/newPayload) message))]
(.push service dtoken payload)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment