Skip to content

Latest commit

 

History

History
83 lines (67 loc) · 3.25 KB

README.md

File metadata and controls

83 lines (67 loc) · 3.25 KB

WalletPassGenerator

Swift Package to generate a pass for Apple Wallet. This package is essentially an automated swift script of creating a wallet pass using the process described in this awesome Ray Wenderlich Article

Notice that this package at the moment only supports macOS and Linux (when using a framework such as Vapor). Running this package on iOS is not supported.

Installation:

In your Package.swift:

package.dependencies.append(
    .package(url: "https://github.com/ljw980105/WalletPassGenerator.git", from: "1.0.0")
)
  • When running on linux, make sure the command line tools openssl and zip are installed.

Usage Guide

Creating a class representing the pass:

import Foundation
import WalletPassGenerator

let pass = Pass(
    formatVersion: 1,
    passTypeIdentifier: ".......", // the same identifier used to create the certificate
    serialNumber: "abcdefg",
    teamIdentifier: ".......", // TeamID of your apple developer account,
    organizationName: "My Organization",
    description: "Description",
    logoText: "",
    foregroundColor: .rgb(r: 0, g: 0, b: 0),
    backgroundColor: .rgb(r: 255, g