Skip to content

Commit

Permalink
feat(apple): add template v3 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
aahna-ashina committed Sep 10, 2022
1 parent 7e0beaf commit 4991d07
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 0 deletions.
18 changes: 18 additions & 0 deletions server/TEMPLATE_UPDATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Template Update

This document explains, step-by-step, how to update the template of a pass.

## Apple Templates

1. Copy the the current template version to a new folder, e.g. `cp -r template-versions/apple/2 template-versions/apple/3`
1. Commit the changes
1. Make your changes in the new folder
1. Commit the changes
1. Change the `appleTemplateVersion` in `utils/Config.ts`
1. Test that the new pass is successfully generated by making a request to `http://localhost:3000/api/downloadPass` (see full request example in `cypress/e2e/api/apple/downloadPass.cy.ts`)
1. Test that it works to open the generated `.pkpass` file on an iOS device
1. Commit the changes

## Google Templates

`// TO DO`
Binary file added server/template-versions/apple/3/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added server/template-versions/apple/3/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions server/template-versions/apple/3/pass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"organizationName": "Nation3",
"passTypeIdentifier": "pass.org.passport.nation3",
"serialNumber": "not yet :)",
"webServiceURL": "<webServiceURL>",
"authenticationToken": "<authenticationToken>",
"description": "Nation3 passports for Nation3 citizens.",
"teamIdentifier": "6GU2F645A4",
"backgroundColor": "rgb(255,255,255)",
"foregroundColor": "rgb(34, 64, 89)",
"labelColor": "rgb(115, 149, 178)",
"formatVersion": 2,
"storeCard": {
"headerFields": [
{
"key": "id",
"value": "not yet :)",
"label": "Number"
}
],
"primaryFields": [],
"secondaryFields": [
{
"key": "holder",
"label": "Passport Holder",
"value": "luisc.eth"
},
{
"key": "issueDate",
"label": "Issue Date",
"value": "2022-05-30"
},
{
"key": "type",
"label": "Type",
"value": "GENESIS"
}
],
"backFields": [
{
"key": "backAbout",
"label": "About Nation3 Genesis Passports",
"value": "Nation3 is a sovereign cloud nation. We are building a community of like-minded people creating a nation on the cloud. Only 420 Nation3 Genesis Passports will ever exist, and they mark a unique collective of the first ever Nation3 citizens."
},
{
"key": "backIssueDate",
"label": "Passport Issue Date",
"value": "2022-05-30"
},
{
"key": "backId",
"value": "not yet :)",
"label": "Passport Number"
},
{
"key": "backHolder",
"label": "Passport Holder",
"value": "luisc.eth"
},
{
"key": "backIssuer",
"label": "Passport Issuer",
"value": "Nation3"
}
]
},
"barcodes": [
{
"message": "https://nation3.org",
"format": "PKBarcodeFormatQR",
"messageEncoding": "iso-8859-1"
}
]
}
Binary file added server/template-versions/apple/3/strip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4991d07

Please sign in to comment.