Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/PassCore/Barcode.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Barcode.swift
// Copyright (c) 2025 hiimtmac inc.

// https://developer.apple.com/documentation/walletpasses/pass/barcodes
// https://developer.apple.com/documentation/walletpasses/pass/barcodes-data.dictionary
extension Pass {
/// Information about a pass’s barcode
public struct Barcode: Codable, Equatable, Hashable, Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/PassCore/Beacon.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Beacon.swift
// Copyright (c) 2025 hiimtmac inc.

// https://developer.apple.com/documentation/walletpasses/pass/beacons
// https://developer.apple.com/documentation/walletpasses/pass/beacons-data.dictionary
extension Pass {
/// Information about a location beacon
public struct Beacon: Codable, Equatable, Hashable, Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/PassCore/Location.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Location.swift
// Copyright (c) 2025 hiimtmac inc.

// https://developer.apple.com/documentation/walletpasses/pass/locations
// https://developer.apple.com/documentation/walletpasses/pass/locations-data.dictionary
extension Pass {
/// Information about a location
public struct Location: Codable, Equatable, Hashable, Sendable {
Expand Down
2 changes: 1 addition & 1 deletion Sources/PassCore/NFC.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// NFC.swift
// Copyright (c) 2025 hiimtmac inc.

// hhttps://developer.apple.com/documentation/walletpasses/pass/nfc
// https://developer.apple.com/documentation/walletpasses/pass/nfc-data.dictionary
extension Pass {
/// Information about the NFC payload passed to an Apple Pay terminal.
public struct NFC: Codable, Equatable, Hashable, Sendable {
Expand Down
12 changes: 5 additions & 7 deletions Sources/PassCore/Pass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import FoundationEssentials
import Foundation
#endif

// https://developer.apple.com/library/archive/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/TopLevel.html
/// The following sections list the required and optional keys used in this dictionary
// https://developer.apple.com/documentation/walletpasses/pass
/// An object that represents a pass.
public struct Pass: Codable, Equatable, Hashable, Sendable {
// MARK: Required Keys

Expand All @@ -34,7 +34,7 @@ public struct Pass: Codable, Equatable, Hashable, Sendable {

// MARK: Optional Keys

/// A URL that links to your accessiblity content, or the venue’s.
/// A URL that links to your accessibility content, or the venue’s.
///
/// This key works only for poster event tickets.
public var accessibilityURL: URL?
Expand All @@ -55,8 +55,6 @@ public struct Pass: Codable, Equatable, Hashable, Sendable {
///
/// A link to launch the app is on the back of the pass. If the app isn’t installed, the link opens the App Store.
///
/// This key works only for payment passes.
///
/// This key isn’t supported for watchOS.
public var associatedStoreIdentifiers: [Int]?

Expand Down Expand Up @@ -119,7 +117,7 @@ public struct Pass: Codable, Equatable, Hashable, Sendable {

/// The text to display next to the logo on the pass.
///
/// This key works only for poster event tickets
/// This key works only for poster event tickets.
public var eventLogoText: String?

/// An object that contains the information for an event ticket.
Expand Down Expand Up @@ -296,7 +294,7 @@ public struct Pass: Codable, Equatable, Hashable, Sendable {
/// An ordered list of all upcoming pass information entries.
public var upcomingPassInformation: [UpcomingPassInformationEntry]?

/// A URL for management.
/// A URL that links out to ticket management options for the boarding pass.
public var managementURL: URL?

/// A URL for registering a service animal.
Expand Down
2 changes: 1 addition & 1 deletion Sources/PassCore/RelevantDate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension Pass {
/// Required when providing ``startDate``.
public var endDate: Date?

/// The date and time for the pass relevancy interval to begin
/// The date and time for the pass relevancy interval to begin.
public var startDate: Date?

public init(
Expand Down
20 changes: 11 additions & 9 deletions Sources/PassCore/SemanticTags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import Foundation

// https://developer.apple.com/documentation/walletpasses/semantictags

/// An object that contains machine-readable metadata the system uses to offer a pass and suggest related actions.
public struct SemanticTags: Codable, Equatable, Hashable, Sendable {
/// Additional ticket attributes that other tags or keys in the pass don’t include.
///
Expand Down Expand Up @@ -117,6 +117,8 @@ public struct SemanticTags: Codable, Equatable, Hashable, Sendable {
public var departureLocationSecurityPrograms: [TransitSecurityProgram]?

/// The time zone of the departure location, such as America/Chicago.
///
/// See the [IANA Time Zone Database](https://www.iana.org/time-zones) for the full list of supported time zones.
public var departureLocationTimeZone: String?

/// The name of the departure city to display on the boarding pass, such as “London” or “Shanghai”.
Expand Down Expand Up @@ -328,7 +330,7 @@ public struct SemanticTags: Codable, Equatable, Hashable, Sendable {
/// An array of airline-specific SSRs that apply to the ticketed passenger.
public var passengerAirlineSSRs: [String]?

/// A list of capabilties the passenger has. Only use this key for airline boarding passes.
/// A list of capabilities the passenger has. Only use this key for airline boarding passes.
public var passengerCapabilities: [PassengerCapability]?

/// A list of security programs the passenger is eligible for. This only shows in the UI if a program is in passengerEligibleSecurityPrograms and at least one of departureLocationSecurityPrograms or destinationLocationSecurityPrograms.
Expand All @@ -344,9 +346,9 @@ public struct SemanticTags: Codable, Equatable, Hashable, Sendable {
/// Use this key for any type of boarding pass.
public var passengerName: SemanticTagType.PersonNameComponents?

/// An array of IATA information SSRs that apply to the ticketed passenger.
/// An array of IATA SSRs that apply to the ticketed passenger.
///
/// A comprehensive list of service SSRs can be found in the [the IATA Airlines Developer Guide](https://guides.developer.iata.org/docs/21-1_ImplementationGuide.pdf) under A List of Service SSRs.
/// A comprehensive list of service SSRs can be found in [the IATA Airlines Developer Guide](https://guides.developer.iata.org/docs/21-1_ImplementationGuide.pdf) under A List of Service SSRs.
public var passengerServiceSSRs: [String]?

/// An array of the full names of the performers and opening acts at the event, in decreasing order of significance.
Expand Down Expand Up @@ -374,7 +376,7 @@ public struct SemanticTags: Codable, Equatable, Hashable, Sendable {
/// Use this key for any type of boarding pass.
public var securityScreening: String?

/// A Boolean value that determines whether the user’s device remains silent during an event or transit journey.
/// A Boolean value that determines whether the person’s device remains silent during an event or transit journey.
///
/// The system may override the key and determine the length of the period of silence.
///
Expand Down Expand Up @@ -500,7 +502,7 @@ public struct SemanticTags: Codable, Equatable, Hashable, Sendable {
/// Use this key for any type of event ticket.
public var venueParkingLotsOpenDate: Date?

/// The phone number for enquiries about the venue’s ticketed event.
/// The phone number for inquiries about the venue’s ticketed event.
///
/// Use this key for any type of event ticket.
public var venuePhoneNumber: String?
Expand Down Expand Up @@ -894,7 +896,7 @@ public enum SemanticTagType {
}
}

// https://developer.apple.com/documentation/walletpasses/semantictagtype/currencyamount
// https://developer.apple.com/documentation/walletpasses/semantictagtype/currencyamount-data.dictionary
/// An object that represents an amount of money and type of currency.
public struct CurrencyAmount: Codable, Equatable, Hashable, Sendable {
/// The amount of money.
Expand All @@ -912,7 +914,7 @@ public enum SemanticTagType {
}
}

// https://developer.apple.com/documentation/walletpasses/semantictagtype/location
// https://developer.apple.com/documentation/walletpasses/semantictagtype/location-data.dictionary
/// An object that represents the coordinates of a location.
public struct Location: Codable, Equatable, Hashable, Sendable {
/// The latitude, in degrees.
Expand All @@ -927,7 +929,7 @@ public enum SemanticTagType {
}
}

// https://developer.apple.com/documentation/walletpasses/semantictagtype/wifinetwork
// https://developer.apple.com/documentation/walletpasses/semantictagtype/wifinetwork-data.dictionary
/// An object that contains information required to connect to a WiFi network.
public struct WifiNetwork: Codable, Equatable, Hashable, Sendable {
/// The password for the WiFi network.
Expand Down
8 changes: 4 additions & 4 deletions Sources/PassCore/UpcomingPassInformationEntry.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SemanticTags.swift
// UpcomingPassInformationEntry.swift
// Copyright (c) 2025 hiimtmac inc.

import Foundation

// https://developer.apple.com/documentation/walletpasses/upcomingpassinformationentry

/// An object that represents the ordered list of all upcoming pass information entries.
public struct UpcomingPassInformationEntry: Codable, Equatable, Hashable, Sendable {
/// A collection of URLs used to populate UI elements in the details view.
public var URLs: URLs?
Expand Down Expand Up @@ -67,7 +67,7 @@ public struct UpcomingPassInformationEntry: Codable, Equatable, Hashable, Sendab

extension UpcomingPassInformationEntry {
public struct URLs: Codable, Equatable, Hashable, Sendable {
/// A URL that links to your or the venue’s accessiblity content.
/// A URL that links to your or the venue’s accessibility content.
public var accessibilityURL: URL?

/// A URL that links to experiences that you can add on to your ticket or that allows you to access your existing prepurchased or preloaded add-on experiences, including any necessary QR or barcode links to access the experience.
Expand Down Expand Up @@ -217,7 +217,7 @@ extension UpcomingPassInformationEntry {

public enum UpcomingPassInformationEntryType {
public struct Image: Codable, Equatable, Hashable, Sendable {
/// A list of URLs used to retreive an image.
/// A list of URLs used to retrieve an image.
///
/// The upcoming pass information entry uses the item that best matches the device’s scale.
public var URLs: [ImageURLEntry]?
Expand Down
Loading