PassSigner

public struct PassSigner

A singleton class used to sign PassKit passes.

  • The shared instance of PassSigner.

    Declaration

    Swift

    static let shared: PassSigner
  • The local URL of the Apple Worldwide Developer Relations Root Certificate Authority (required to sign passes).

    Declaration

    Swift

    public var appleWWDRCertURL: URL?
  • The URL to your OpenSSL binary. Set it if yours is in a different location than /usr/bin/openssl.

    Declaration

    Swift

    public var openSSLURL: URL
  • Sign the provided pass manifest data.

    Note

    This method will fail and crash your program if you haven’t set appleWWDRCertURL.

    Declaration

    Swift

    public func signPassManifest(at url: URL, toSignatureAt signatureURL: URL, info: SigningInfo) -> Bool

    Parameters

    url

    The URL of the pass’s manifest.json file.

    signatureURL

    The signature URL to write to.

    info

    The signing info to sign this pass manifest with.

    Return Value

    Whether or not the operation was successful.

  • A tuple representing a certificate URL (expected .pem) and password.

    Declaration

    Swift

    public typealias SigningInfo = (certificate: URL, password: String)