Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

A command-line utility for generating Apple Wallet passes for ACLU Voter

License

Notifications You must be signed in to change notification settings

aclu-national/voter-apple-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voter-apple-wallet

A command-line utility for generating Apple Wallet passes for ACLU Voter.

Installation

The script relies on a fork of node-passbook to generate .pkpass files. It expects to run on Node v10 on Ubuntu 16.04.

$ npm install

ImageMagick is used to add a pin icon to the map.

$ sudo apt update
$ sudo apt install -y imagemagick

Mapbox API key

The map on the pass comes from the Mapbox Static API. You'll need to create an API token and define it as an environment variable.

$ export MAPBOX_API_KEY="..."

Apple Developer setup

You will need an active Apple Developer account to generate passes.

  1. Create a Pass Type Identifier
  2. Set the teamIdentifier and passTypeIdentifier in template/pass.json
  3. Get your certificates and place a [Pass Type ID].pem file into the template folder (e.g., template/org.aclu.voter.pem)

Usage

Use the included shell script to invoke the pass generator.

$ pkpass.sh [address] [hours] [lat] [lng]

That will generate a new file called pass.pkpass that you can drag and drop onto the iOS Simulator app to view.

Template

The template folder contains all the files used to generate the pass. Edit pass.json to experiment with alternate pass types and default content:

"eventTicket": {
	"primaryFields": [],
	"secondaryFields": [],
	"auxiliaryFields": []
}

See also

About

A command-line utility for generating Apple Wallet passes for ACLU Voter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published