WalletPasses.Apple.Builder (wallet_passes v0.8.0)

Copy Markdown View Source

Builds Apple Wallet .pkpass bundles.

Constructs pass.json, generates SHA1 manifests, signs with PKCS#7, and zips everything into a .pkpass file.

Summary

Functions

Builds the pass.json map from pass data, visual config, and auth token.

Builds a complete .pkpass ZIP bundle.

Generates a SHA1 manifest map from a map of %{filename => binary_content}.

Functions

build_pass_json(pass_data, visual, auth_token)

Builds the pass.json map from pass data, visual config, and auth token.

build_pkpass(pass_data, visual, auth_token, opts \\ [])

Builds a complete .pkpass ZIP bundle.

Options

  • :translations%{locale_tag => %{source_string => translated_string}}. Each locale becomes a <locale>.lproj/pass.strings entry inside the ZIP. See the Localization guide for details.
  • :localized_images%{locale_tag => %{filename => path_on_disk}}. Each entry becomes <locale>.lproj/<filename> in the ZIP. Missing files are silently skipped.

Returns {:ok, pkpass_binary} or {:error, reason}.

Emits [:wallet_passes, :apple, :build_pass, :start|:stop|:exception] telemetry events with %{serial_number: pass_data.serial_number} metadata.

generate_manifest(files)

Generates a SHA1 manifest map from a map of %{filename => binary_content}.