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.
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
andzip
are installed.
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