Packages
pigeon
2.0.0-rc.2
2.0.1
2.0.0
2.0.0-rc.3
2.0.0-rc.2
2.0.0-rc.1
2.0.0-rc.0
1.6.3
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.1.0-rc.1
1.1.0-rc.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.13.1
0.13.0
0.12.1
0.12.0
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
iOS (APNS), Android (FCM), and Amazon Android (ADM) push notifications for Elixir.
Current section
57 Versions
Jump to
Current section
57 Versions
Compare versions
15
files changed
+101
additions
-87
deletions
| @@ -1,4 +1,4 @@ | |
| 1 | - Copyright (c) 2015-2022 Codedge LLC (https://www.codedge.io/) |
| 1 | + Copyright (c) 2015-2023 Codedge LLC (https://www.codedge.io/) |
| 2 2 | |
| 3 3 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 4 | of this software and associated documentation files (the "Software"), to deal |
| @@ -16,7 +16,7 @@ Add `:pigeon` and as a `mix.exs` dependency: | |
| 16 16 | ```elixir |
| 17 17 | def deps do |
| 18 18 | [ |
| 19 | - {:pigeon, "~> 2.0.0-rc.1"} |
| 19 | + {:pigeon, "~> 2.0.0-rc.2"} |
| 20 20 | ] |
| 21 21 | end |
| 22 22 | ``` |
| @@ -25,34 +25,37 @@ end | |
| 25 25 | |
| 26 26 | Check the module documentation for your push notification service. |
| 27 27 | |
| 28 | - - [Pigeon.ADM](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.ADM.html) - Amazon Android. |
| 29 | - - [Pigeon.APNS](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.APNS.html) - Apple iOS. |
| 30 | - - [Pigeon.FCM](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.FCM.html) - Firebase Cloud Messaging v1 API. |
| 31 | - - [Pigeon.LegacyFCM](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.LegacyFCM.html) - Firebase Cloud Messaging Legacy API. |
| 28 | + - [Pigeon.ADM](https://hexdocs.pm/pigeon/2.0.0-rc.2/Pigeon.ADM.html) - Amazon Android. |
| 29 | + - [Pigeon.APNS](https://hexdocs.pm/pigeon/2.0.0-rc.2/Pigeon.APNS.html) - Apple iOS. |
| 30 | + - [Pigeon.FCM](https://hexdocs.pm/pigeon/2.0.0-rc.2/Pigeon.FCM.html) - Firebase Cloud Messaging v1 API. |
| 31 | + - [Pigeon.LegacyFCM](https://hexdocs.pm/pigeon/2.0.0-rc.2/Pigeon.LegacyFCM.html) - Firebase Cloud Messaging Legacy API. |
| 32 32 | |
| 33 33 | ### Creating Dynamic Runtime Dispatchers |
| 34 34 | |
| 35 35 | Pigeon can spin up dynamic dispatchers for a variety of advanced use-cases, such as |
| 36 36 | supporting dozens of dispatcher configurations or custom connection pools. |
| 37 37 | |
| 38 | - See [Pigeon.Dispatcher](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.Dispatcher.html) for instructions. |
| 38 | + See [Pigeon.Dispatcher](https://hexdocs.pm/pigeon/2.0.0-rc.1/Pigeon.Dispatcher.html) for instructions. |
| 39 39 | |
| 40 40 | ### Writing a Custom Dispatcher Adapter |
| 41 41 | |
| 42 42 | Want to write a Pigeon adapter for an unsupported push notification service? |
| 43 43 | |
| 44 | - See [Pigeon.Adapter](https://hexdocs.pm/pigeon/2.0.0-rc.0/Pigeon.Adapter.html) for instructions. |
| 44 | + See [Pigeon.Adapter](https://hexdocs.pm/pigeon/2.0.0-rc.1/Pigeon.Adapter.html) for instructions. |
| 45 45 | |
| 46 46 | ## Contributing |
| 47 47 | |
| 48 48 | ### Testing |
| 49 49 | |
| 50 | - Unit tests can be run with `mix test` or `mix coveralls.html`. |
| 50 | + Unit tests can be run with `mix test` or `mix coveralls.html`. Environment variables will need to be set for |
| 51 | + various credentials. See [config/test.exs](https://github.com/codedge-llc/pigeon/blob/master/config/test.exs) |
| 52 | + for the full list. |
| 51 53 | |
| 52 54 | ### Formatting |
| 53 55 | |
| 54 | - This project uses Elixir's `mix format` for formatting. Add a hook in your editor of choice to |
| 55 | - run it after a save. Be sure it respects this project's `.formatter.exs`. |
| 56 | + This project uses Elixir's `mix format` and [Prettier](https://prettier.io) for formatting. |
| 57 | + Add hooks in your editor of choice to run it after a save. Be sure it respects this project's |
| 58 | + `.formatter.exs`. |
| 56 59 | |
| 57 60 | ### Commits |
| 58 61 | |
| @@ -60,6 +63,6 @@ Git commit subjects use the [Karma style](http://karma-runner.github.io/5.0/dev/ | |
| 60 63 | |
| 61 64 | ## License |
| 62 65 | |
| 63 | - Copyright (c) 2015-2022 Codedge LLC (https://www.codedge.io/) |
| 66 | + Copyright (c) 2015-2023 Codedge LLC (https://www.codedge.io/) |
| 64 67 | |
| 65 68 | This library is MIT licensed. See the [LICENSE](https://github.com/codedge-llc/pigeon/blob/master/LICENSE) for details. |
| @@ -1,8 +1,12 @@ | |
| 1 | - {<<"app">>,<<"pigeon">>}. |
| 2 | - {<<"build_tools">>,[<<"mix">>]}. |
| 1 | + {<<"links">>, |
| 2 | + [{<<"Changelog">>,<<"https://hexdocs.pm/pigeon/changelog.html">>}, |
| 3 | + {<<"GitHub">>,<<"https://github.com/codedge-llc/pigeon">>}]}. |
| 4 | + {<<"name">>,<<"pigeon">>}. |
| 5 | + {<<"version">>,<<"2.0.0-rc.2">>}. |
| 3 6 | {<<"description">>, |
| 4 7 | <<"HTTP2-compliant wrapper for sending iOS (APNS), Android (FCM),\nand Amazon Android (ADM) push notifications.">>}. |
| 5 8 | {<<"elixir">>,<<"~> 1.7">>}. |
| 9 | + {<<"app">>,<<"pigeon">>}. |
| 6 10 | {<<"files">>, |
| 7 11 | [<<"lib">>,<<"lib/pigeon">>,<<"lib/pigeon/adapter.ex">>, |
| 8 12 | <<"lib/pigeon/registry.ex">>,<<"lib/pigeon/config_error.ex">>, |
| @@ -27,34 +31,30 @@ | |
| 27 31 | <<"lib/pigeon/legacy_fcm/config.ex">>,<<"lib/pigeon/apns.ex">>, |
| 28 32 | <<"lib/pigeon.ex">>,<<"mix.exs">>,<<"README.md">>,<<"LICENSE">>]}. |
| 29 33 | {<<"licenses">>,[<<"MIT">>]}. |
| 30 | - {<<"links">>, |
| 31 | - [{<<"Changelog">>,<<"https://hexdocs.pm/pigeon/changelog.html">>}, |
| 32 | - {<<"GitHub">>,<<"https://github.com/codedge-llc/pigeon">>}]}. |
| 33 | - {<<"name">>,<<"pigeon">>}. |
| 34 34 | {<<"requirements">>, |
| 35 | - [[{<<"app">>,<<"goth">>}, |
| 36 | - {<<"name">>,<<"goth">>}, |
| 35 | + [[{<<"name">>,<<"goth">>}, |
| 36 | + {<<"app">>,<<"goth">>}, |
| 37 37 | {<<"optional">>,false}, |
| 38 | - {<<"repository">>,<<"hexpm">>}, |
| 39 | - {<<"requirement">>,<<"~> 1.3.0">>}], |
| 40 | - [{<<"app">>,<<"httpoison">>}, |
| 41 | - {<<"name">>,<<"httpoison">>}, |
| 38 | + {<<"requirement">>,<<"~> 1.3.0">>}, |
| 39 | + {<<"repository">>,<<"hexpm">>}], |
| 40 | + [{<<"name">>,<<"httpoison">>}, |
| 41 | + {<<"app">>,<<"httpoison">>}, |
| 42 42 | {<<"optional">>,false}, |
| 43 | - {<<"repository">>,<<"hexpm">>}, |
| 44 | - {<<"requirement">>,<<"~> 0.7 or ~> 1.0">>}], |
| 45 | - [{<<"app">>,<<"jason">>}, |
| 46 | - {<<"name">>,<<"jason">>}, |
| 43 | + {<<"requirement">>,<<"~> 1.0 or ~> 2.0">>}, |
| 44 | + {<<"repository">>,<<"hexpm">>}], |
| 45 | + [{<<"name">>,<<"jason">>}, |
| 46 | + {<<"app">>,<<"jason">>}, |
| 47 47 | {<<"optional">>,true}, |
| 48 | - {<<"repository">>,<<"hexpm">>}, |
| 49 | - {<<"requirement">>,<<"~> 1.0">>}], |
| 50 | - [{<<"app">>,<<"joken">>}, |
| 51 | - {<<"name">>,<<"joken">>}, |
| 48 | + {<<"requirement">>,<<"~> 1.0">>}, |
| 49 | + {<<"repository">>,<<"hexpm">>}], |
| 50 | + [{<<"name">>,<<"joken">>}, |
| 51 | + {<<"app">>,<<"joken">>}, |
| 52 52 | {<<"optional">>,false}, |
| 53 | - {<<"repository">>,<<"hexpm">>}, |
| 54 | - {<<"requirement">>,<<"~> 2.1">>}], |
| 55 | - [{<<"app">>,<<"kadabra">>}, |
| 56 | - {<<"name">>,<<"kadabra">>}, |
| 53 | + {<<"requirement">>,<<"~> 2.1">>}, |
| 54 | + {<<"repository">>,<<"hexpm">>}], |
| 55 | + [{<<"name">>,<<"kadabra">>}, |
| 56 | + {<<"app">>,<<"kadabra">>}, |
| 57 57 | {<<"optional">>,false}, |
| 58 | - {<<"repository">>,<<"hexpm">>}, |
| 59 | - {<<"requirement">>,<<"~> 0.6.0">>}]]}. |
| 60 | - {<<"version">>,<<"2.0.0-rc.1">>}. |
| 58 | + {<<"requirement">>,<<"~> 0.6.0">>}, |
| 59 | + {<<"repository">>,<<"hexpm">>}]]}. |
| 60 | + {<<"build_tools">>,[<<"mix">>]}. |
| @@ -154,8 +154,7 @@ defmodule Pigeon.ADM.Notification do | |
| 154 154 | data |
| 155 155 | |> Map.keys() |
| 156 156 | |> Enum.sort() |
| 157 | - |> Enum.map(fn key -> "#{key}:#{data[key]}" end) |
| 158 | - |> Enum.join(",") |
| 157 | + |> Enum.map_join(",", fn key -> "#{key}:#{data[key]}" end) |
| 159 158 | |
| 160 159 | md5 = :md5 |> :crypto.hash(concat) |> Base.encode64() |
| @@ -130,7 +130,7 @@ defmodule Pigeon.APNS do | |
| 130 130 | 5. From a shell, convert the certificate. |
| 131 131 | |
| 132 132 | ``` |
| 133 | - openssl pkcs12 -clcerts -nokeys -out cert.pem -in cert.p12 |
| 133 | + openssl pkcs12 -legacy -clcerts -nokeys -out cert.pem -in cert.p12 |
| 134 134 | ``` |
| 135 135 | |
| 136 136 | 6. Convert the key. Be sure to set a PEM pass phrase here. The pass phrase must be 4 or |
| @@ -138,7 +138,7 @@ defmodule Pigeon.APNS do | |
| 138 138 | here in order to remove it in the next step. |
| 139 139 | |
| 140 140 | ``` |
| 141 | - openssl pkcs12 -nocerts -out key.pem -in key.p12 |
| 141 | + openssl pkcs12 -legacy -nocerts -out key.pem -in key.p12 |
| 142 142 | ``` |
| 143 143 | |
| 144 144 | 7. Remove the PEM pass phrase from the key. |
Loading more files…