-
-
Save klodio/2e07252a9a9d4a1d683f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: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