📱 An Ecto type for storing, validating and generating Apple APNS Tokens
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.gitignore
README.md
mix.exs
mix.lock

README.md

EctoApnsToken

An Ecto type for storing, validating and generating Apple APNS Tokens

Installation

If available in Hex, the package can be installed by adding ecto_apns_token to your list of dependencies in mix.exs:

def deps do
  [{:ecto_apns_token, "~> 0.1.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ecto_apns_token.

Usage

As a Ecto Model field type

schema "devices" do
  field :id, EctoApnsToken, required: true
end

Generating a random 64 character APNS token

EctoApnsToken.generate()
"8108f10c539f54d9e07471adbe3910802b135970f81da7dec740f65396f8f468"