What's New / Privacy, Security & Identity

What's new in PassKit

+12 NewiOS · macOS · watchOS

PassKit covers Apple Wallet passes and Apple Pay, including payment requests, provisioning cards to Wallet, and identity documents such as IDs and licenses.

12 new APIs, no deprecations or removals. Most additions cover Apple Pay merchandising: ApplePayMerchandisingAction, ApplePayMerchandisingPartnerConfiguration, ApplePayMerchandisingStyle, and the ApplePayMerchandisingView struct with its Body type. PKIdentityDocumentDescriptor gains issuerIdentifiers, name, unsupportedPrimaryAccountIdentifiers, and isProvisioningAvailable.

New

12
struct

ApplePayMerchandisingAction

NewiOS
public struct ApplePayMerchandisingAction : Equatable, RawRepresentable

Type of action taken when the button is tapped on the ApplePayMerchandisingView

Declaration
public struct ApplePayMerchandisingAction : Equatable, RawRepresentable {

    /// Displays a simple info sheet on the learn more details
    public static var learnMore: ApplePayMerchandisingAction

    /// Instantiates a particular action
    public init(rawValue: String)

    /// The string representation of the action
    public let rawValue: String

    /// The raw type that can be used to represent all values of the conforming
    /// type.
    ///
    /// Every distinct value of the conforming type has a corresponding unique
    /// value of the `RawValue` type, but there may be values of the `RawValue`
    /// type that don't have a corresponding value of the conforming type.
    @available(iOS 27.0, *)
    @available(macOS, unavailable)
    @available(tvOS, unavailable)
    @available(watchOS, unavailable)
    @available(macCatalyst, unavailable)
    @available(visionOS, unavailable)
    public typealias RawValue = String
}
struct

ApplePayMerchandisingPartnerConfiguration

NewiOS
public struct ApplePayMerchandisingPartnerConfiguration : Equatable

Defines the partner configuration for the ApplePayMerchandisingView

Declaration
public struct ApplePayMerchandisingPartnerConfiguration : Equatable {

    /// Show no partners
    public static let none: ApplePayMerchandisingPartnerConfiguration

    /// Show a limited number of specified partners
    public static func limited(partnerIdentifiers: [String]) -> ApplePayMerchandisingPartnerConfiguration

    /// Show all possible partners
    public static let all: ApplePayMerchandisingPartnerConfiguration

    /// Returns a Boolean value indicating whether two values are equal.
    ///
    /// Equality is the inverse of inequality. For any values `a` and `b`,
    /// `a == b` implies that `a != b` is `false`.
    ///
    /// - Parameters:
    ///   - lhs: A value to compare.
    ///   - rhs: Another value to compare.
    public static func == (a: ApplePayMerchandisingPartnerConfiguration, b: ApplePayMerchandisingPartnerConfiguration) -> Bool
}
struct

ApplePayMerchandisingStyle

NewiOS
public struct ApplePayMerchandisingStyle : Equatable, RawRepresentable

Styling layout of the ApplePayMerchandisingView

Declaration
public struct ApplePayMerchandisingStyle : Equatable, RawRepresentable {

    /// The Standard Promotional Widget
    public static var standard: ApplePayMerchandisingStyle

    /// Instantiates a particular style
    public init(rawValue: String)

    /// The string representation of the style
    public let rawValue: String

    /// The raw type that can be used to represent all values of the conforming
    /// type.
    ///
    /// Every distinct value of the conforming type has a corresponding unique
    /// value of the `RawValue` type, but there may be values of the `RawValue`
    /// type that don't have a corresponding value of the conforming type.
    @available(iOS 27.0, *)
    @available(macOS, unavailable)
    @available(tvOS, unavailable)
    @available(watchOS, unavailable)
    @available(macCatalyst, unavailable)
    @available(visionOS, unavailable)
    public typealias RawValue = String
}
struct

ApplePayMerchandisingView

NewiOS
public struct ApplePayMerchandisingView<Fallback> : View where Fallback : View
Declaration
@MainActor @preconcurrency public struct ApplePayMerchandisingView<Fallback> : View where Fallback : View {

    /// Constructs a view displaying Pay Later Promotional information given a configuration
    /// - Parameters:
    ///   - amount: The users bag price or item pricing
    ///   - currency: The ISO 4217 code for the country or region of the merchant’s principle place of business.
    ///   - region: The merchant's ISO 3166 country code.
    ///   - action: The type of action that is taken when the user taps on the call to action in the view
    ///   - style: The style of view that should be shown. This dictates the strings / image content
    ///   - partners: List of partners the view should show if they are supported.
    ///   - fallback: The fallback view will be shown when the contents cannot rendered
    nonisolated public init(amount: Decimal, currency: Locale.Currency, region: Locale.Region, action: ApplePayMerchandisingAction = .learnMore, style: ApplePayMerchandisingStyle = .standard, partners: ApplePayMerchandisingPartnerConfiguration = .all, @ViewBuilder fallback: () -> Fallback = { EmptyView() })

    /// The content and behavior of the view.
    ///
    /// When you implement a custom view, you must implement a computed
    /// `body` property to provide the content for your view. Return a view
    /// that's composed of built-in views that SwiftUI provides, plus other
    /// composite views that you've already defined:
    ///
    ///     struct MyView: View {
    ///         var body: some View {
    ///             Text("Hello, World!")
    ///         }
    ///     }
    ///
    /// For more information about composing views and a view hierarchy,
    /// see <doc:Declaring-a-Custom-View>.
    @MainActor @preconcurrency public var body: some View { get }

    /// The type of view representing the body of this view.
    ///
    /// When you create a custom view, Swift infers this type from your
    /// implementation of the required ``View/body-swift.property`` property.
    @available(iOS 27.0, *)
    @available(macOS, unavailable)
    @available(tvOS, unavailable)
    @available(watchOS, unavailable)
    @available(macCatalyst, unavailable)
    @available(visionOS, unavailable)
    public typealias Body = some View
}
extension

ApplePayMerchandisingView

NewiOS
extension ApplePayMerchandisingView : Sendable
Declaration
extension ApplePayMerchandisingView : Sendable {
}
var

isProvisioningAvailable

NewiOSmacOSwatchOS
open var isProvisioningAvailable: Bool { get }

A Boolean value indicating whether provisioning is available for this pass.

This property is YES when the pass is in a pre-provisioned state and the issuer app can guide the user to complete provisioning. Check this property when passActivationState returns PKSecureElementPassActivationStateDeactivated to determine if provisioning is available.

var

name

NewiOS
open class var name: PKIdentityElement { get }

The user's full name.

For National ID and other identity documents, requesting this element returns the user's full name as a single properly formatted string. The response may also include given name and family name when available.

For Driver's License documents, requesting this element returns the given name and family name as separate fields, but does not return a full name field. This limitation exists because the mDL (mobile Driver's License) standard does not currently include a full name field in its specification.

var

unsupportedPrimaryAccountIdentifiers

NewiOSmacOSwatchOS
open var unsupportedPrimaryAccountIdentifiers: [String]
typealias

ApplePayMerchandisingAction.RawValue

NewiOS
public typealias RawValue = String

The raw type that can be used to represent all values of the conforming type.

Every distinct value of the conforming type has a corresponding unique value of the RawValue type, but there may be values of the RawValue type that don't have a corresponding value of the conforming type.

typealias

ApplePayMerchandisingStyle.RawValue

NewiOS
public typealias RawValue = String

The raw type that can be used to represent all values of the conforming type.

Every distinct value of the conforming type has a corresponding unique value of the RawValue type, but there may be values of the RawValue type that don't have a corresponding value of the conforming type.

typealias

ApplePayMerchandisingView.Body

NewiOS
public typealias Body = some View

The type of view representing the body of this view.

When you create a custom view, Swift infers this type from your implementation of the required body-swift.property property.

var

PKIdentityDocumentDescriptor.issuerIdentifiers

NewiOS
var issuerIdentifiers: [Data] { get set }

A list of X.509 authority key identifiers which are accepted by the relying party.

An empty list means any document signer certificate is acceptable.

Warning: The number of issuer identifiers must not exceed 1,000 and the size of each identifier must not exceed 64 bytes. Your app will terminate if these conditions are not met.

No APIs match your filter.

← More in Privacy, Security & Identity