{"id":18724817,"url":"https://github.com/obsidiansystems/push-notifications","last_synced_at":"2026-03-13T18:24:20.734Z","repository":{"id":56875708,"uuid":"179354442","full_name":"obsidiansystems/push-notifications","owner":"obsidiansystems","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-11T21:53:20.000Z","size":30,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-03-26T10:11:37.657Z","etag":null,"topics":["apns","firebase","haskell","push-notifications"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/obsidiansystems.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-03T19:15:36.000Z","updated_at":"2024-06-10T14:10:42.000Z","dependencies_parsed_at":"2022-08-20T11:30:41.998Z","dependency_job_id":null,"html_url":"https://github.com/obsidiansystems/push-notifications","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsidiansystems%2Fpush-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsidiansystems%2Fpush-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsidiansystems%2Fpush-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obsidiansystems%2Fpush-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obsidiansystems","download_url":"https://codeload.github.com/obsidiansystems/push-notifications/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248477089,"owners_count":21110433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apns","firebase","haskell","push-notifications"],"created_at":"2024-11-07T14:08:05.526Z","updated_at":"2026-03-13T18:24:15.684Z","avatar_url":"https://github.com/obsidiansystems.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# push-notifications\n\nServer-side push messaging from Haskell to various platforms (currently supporting iOS and Android).\n\n## Android\n\nPush notifications to android devices are sent via Google's [Firebase](https://firebase.google.com) service. To send push notifications via Firebase, you'll need to create a project and acquire a \"server key.\"\n\nTo get your server key, go to the [Firebase console](https://console.firebase.google.com/) and create or open a project. On the project settings page, there is a \"Cloud Messaging\" section. On that page you should be able to retrieve or create a \"server key.\"\n\nThe server key should be passed to `Network.PushNotification.Android.sendAndroidPushMessage`.\n\nTo construct an android push message payload, have a look at `Network.PushNotification.Android.Payload` which provides a haskell datatype and JSON instances for Firebase Cloud Messaging payloads (as documented [here](https://firebase.google.com/docs/cloud-messaging/http-server-ref)).\n\n## IOS\n\nSending push notifications requires an \"Apple Push Services\" certificate and an Apple-provided device token.\n\n### Getting an APS Certificate\nThe APS certificate is produced in the iOS Provisioning Portal. Once you've generated the certificate, you can download it from the Provisioning Portal.  It is usually named `aps_production.cer` or `aps_development.cer`.\n\nThe private key for the certificate can be extracted from Apple's Keychain utility as a `.p12` file.\n\nOnce you have both the certificate and private key, the following commands can be used to convert the certificate and private key files into the format required by this library.\n\n```bash\nopenssl x509 -in aps_development.cer -inform DER -outform PEM -out cert.pem\nopenssl pkcs12 -in key.p12 -out key.pem -nodes\n```\n\n### Getting a Device Token\n\nDevice tokens are retrieved on the device itself by calling the @registerForRemoteNotifications@ method of the @UIApplication@ object.\n\nFor more information, please see [Apple's documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1).\n\n## Credits\n\nOriginally based on a blog post by Teemu Ikonen, available [here](https://bravenewmethod.com/2012/11/08/apple-push-notifications-with-haskell/) and packaged by David Fendrich as the \"phone-push\" library on hackage. That library was forked and updated and, eventually, became this one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobsidiansystems%2Fpush-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobsidiansystems%2Fpush-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobsidiansystems%2Fpush-notifications/lists"}