Documentation Archive Developer
Search

PassKit Changes for Swift

PassKit

Removed PKAddressField.init(_: UInt)
Removed PKMerchantCapability.init(_: UInt)
Added PKContact
Added PKPaymentMethodType.init(rawValue: UInt)
Declaration
From
class PKAddPassesViewController : UIViewController {
    init!(pass pass: AnyObject!)
    init!(passes passes: [AnyObject]!)
    class func canAddPasses() -> Bool
    unowned(unsafe) var delegate: PKAddPassesViewControllerDelegate!
}
To
class PKAddPassesViewController : UIViewController {
    init(pass pass: PKPass)
    init(passes passes: [PKPass])
    class func canAddPasses() -> Bool
    unowned(unsafe) var delegate: PKAddPassesViewControllerDelegate?
}

Declaration
From
unowned(unsafe) var delegate: PKAddPassesViewControllerDelegate!
To
unowned(unsafe) var delegate: PKAddPassesViewControllerDelegate?

Declaration
From
init!(pass pass: AnyObject!)
To
init(pass pass: PKPass)

Declaration
From
init!(passes passes: [AnyObject]!)
To
init(passes passes: [PKPass])

Declaration
From
protocol PKAddPassesViewControllerDelegate : NSObjectProtocol {
    optional func addPassesViewControllerDidFinish(_ controller: PKAddPassesViewController!)
}
To
protocol PKAddPassesViewControllerDelegate : NSObjectProtocol {
    optional func addPassesViewControllerDidFinish(_ controller: PKAddPassesViewController)
}

DeclarationIntroduction
From
optional func addPassesViewControllerDidFinish(_ controller: PKAddPassesViewController!)
iOS 8.0
To
optional func addPassesViewControllerDidFinish(_ controller: PKAddPassesViewController)
iOS 6.0

DeclarationProtocols
From
struct PKAddressField : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var None: PKAddressField { get }
    static var PostalAddress: PKAddressField { get }
    static var Phone: PKAddressField { get }
    static var Email: PKAddressField { get }
    static var Name: PKAddressField { get }
    static var All: PKAddressField { get }
}
RawOptionSetType
To
struct PKAddressField : OptionSetType {
    init(rawValue rawValue: UInt)
    static var None: PKAddressField { get }
    static var PostalAddress: PKAddressField { get }
    static var Phone: PKAddressField { get }
    static var Email: PKAddressField { get }
    static var Name: PKAddressField { get }
    static var All: PKAddressField { get }
}
OptionSetType

DeclarationProtocols
From
struct PKMerchantCapability : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var Capability3DS: PKMerchantCapability { get }
    static var CapabilityEMV: PKMerchantCapability { get }
}
RawOptionSetType
To
struct PKMerchantCapability : OptionSetType {
    init(rawValue rawValue: UInt)
    static var Capability3DS: PKMerchantCapability { get }
    static var CapabilityEMV: PKMerchantCapability { get }
    static var CapabilityCredit: PKMerchantCapability { get }
    static var CapabilityDebit: PKMerchantCapability { get }
}
OptionSetType

Modified PKPass
Declaration
From
class PKPass : PKObject {
    init!(data data: NSData!, error error: NSErrorPointer)
    var passType: PKPassType { get }
    unowned(unsafe) var paymentPass: PKPaymentPass! { get }
    var serialNumber: String! { get }
    var passTypeIdentifier: String! { get }
    @NSCopying var webServiceURL: NSURL! { get }
    var authenticationToken: String! { get }
    @NSCopying var icon: UIImage! { get }
    var localizedName: String! { get }
    var localizedDescription: String! { get }
    var organizationName: String! { get }
    @NSCopying var relevantDate: NSDate! { get }
    var userInfo: [NSObject : AnyObject]! { get }
    @NSCopying var passURL: NSURL! { get }
    func localizedValueForFieldKey(_ key: String!) -> AnyObject!
}
To
class PKPass : PKObject {
    init(data data: NSData, error error: NSErrorPointer)
    var passType: PKPassType { get }
    unowned(unsafe) var paymentPass: PKPaymentPass? { get }
    var serialNumber: String { get }
    var passTypeIdentifier: String { get }
    @NSCopying var webServiceURL: NSURL? { get }
    var authenticationToken: String? { get }
    @NSCopying var icon: UIImage { get }
    var localizedName: String { get }
    var localizedDescription: String { get }
    var organizationName: String { get }
    @NSCopying var relevantDate: NSDate? { get }
    var userInfo: [NSObject : AnyObject]? { get }
    @NSCopying var passURL: NSURL { get }
    var remotePass: Bool { get }
    var deviceName: String { get }
    func localizedValueForFieldKey(_ key: String) -> AnyObject?
}

Declaration
From
var authenticationToken: String! { get }
To
var authenticationToken: String? { get }

Modified PKPass.icon
Declaration
From
@NSCopying var icon: UIImage! { get }
To
@NSCopying var icon: UIImage { get }

Declaration
From
init!(data data: NSData!, error error: NSErrorPointer)
To
init(data data: NSData, error error: NSErrorPointer)

Declaration
From
var localizedDescription: String! { get }
To
var localizedDescription: String { get }

Declaration
From
var localizedName: String! { get }
To
var localizedName: String { get }

Declaration
From
func localizedValueForFieldKey(_ key: String!) -> AnyObject!
To
func localizedValueForFieldKey(_ key: String) -> AnyObject?

Declaration
From
var organizationName: String! { get }
To
var organizationName: String { get }

Declaration
From
var passTypeIdentifier: String! { get }
To
var passTypeIdentifier: String { get }

Declaration
From
@NSCopying var passURL: NSURL! { get }
To
@NSCopying var passURL: NSURL { get }

Declaration
From
unowned(unsafe) var paymentPass: PKPaymentPass! { get }
To
unowned(unsafe) var paymentPass: PKPaymentPass? { get }

Declaration
From
@NSCopying var relevantDate: NSDate! { get }
To
@NSCopying var relevantDate: NSDate? { get }

Declaration
From
var serialNumber: String! { get }
To
var serialNumber: String { get }

Declaration
From
var userInfo: [NSObject : AnyObject]! { get }
To
var userInfo: [NSObject : AnyObject]? { get }

Declaration
From
@NSCopying var webServiceURL: NSURL! { get }
To
@NSCopying var webServiceURL: NSURL? { get }

DeclarationProtocolsRaw Value Type
From
enum PKPassKitErrorCode : Int {
    case UnknownError
    case InvalidDataError
    case UnsupportedVersionError
    case InvalidSignature
    case NotEntitledError
}
Equatable, Hashable, RawRepresentable--
To
enum PKPassKitErrorCode : Int {
    case UnknownError
    case InvalidDataError
    case UnsupportedVersionError
    case InvalidSignature
    case NotEntitledError
}
extension PKPassKitErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
extension PKPassKitErrorCode : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError {
}
Equatable, ErrorType, Hashable, RawRepresentableInt

Modified PKPassLibrary
Declaration
From
class PKPassLibrary : NSObject {
    class func isPassLibraryAvailable() -> Bool
    func passes() -> [AnyObject]!
    func passWithPassTypeIdentifier(_ identifier: String!, serialNumber serialNumber: String!) -> PKPass!
    func passesOfType(_ passType: PKPassType) -> [AnyObject]!
    func removePass(_ pass: PKPass!)
    func containsPass(_ pass: PKPass!) -> Bool
    func replacePassWithPass(_ pass: PKPass!) -> Bool
    func addPasses(_ passes: [AnyObject]!, withCompletionHandler completion: ((PKPassLibraryAddPassesStatus) -> Void)!)
    class func isPaymentPassActivationAvailable() -> Bool
    func openPaymentSetup()
    func activatePaymentPass(_ paymentPass: PKPaymentPass!, withActivationData activationData: NSData!, completion completion: ((Bool, NSError!) -> Void)!)
    func activatePaymentPass(_ paymentPass: PKPaymentPass!, withActivationCode activationCode: String!, completion completion: ((Bool, NSError!) -> Void)!)
}
To
class PKPassLibrary : NSObject {
    class func isPassLibraryAvailable() -> Bool
    class func requestAutomaticPassPresentationSuppressionWithResponseHandler(_ responseHandler: (PKAutomaticPassPresentationSuppressionResult) -> Void) -> PKSuppressionRequestToken
    class func endAutomaticPassPresentationSuppressionWithRequestToken(_ requestToken: PKSuppressionRequestToken)
    class func isSuppressingAutomaticPassPresentation() -> Bool
    class func isPaymentPassActivationAvailable() -> Bool
    func isPaymentPassActivationAvailable() -> Bool
    func passes() -> [PKPass]
    func passWithPassTypeIdentifier(_ identifier: String, serialNumber serialNumber: String) -> PKPass?
    func passesOfType(_ passType: PKPassType) -> [PKPass]
    func remotePaymentPasses() -> [PKPaymentPass]
    func removePass(_ pass: PKPass)
    func containsPass(_ pass: PKPass) -> Bool
    func replacePassWithPass(_ pass: PKPass) -> Bool
    func addPasses(_ passes: [PKPass], withCompletionHandler completion: ((PKPassLibraryAddPassesStatus) -> Void)?)
    func openPaymentSetup()
    func canAddPaymentPassWithPrimaryAccountIdentifier(_ primaryAccountIdentifier: String) -> Bool
    func activatePaymentPass(_ paymentPass: PKPaymentPass, withActivationData activationData: NSData, completion completion: ((Bool, NSError) -> Void)?)
    func activatePaymentPass(_ paymentPass: PKPaymentPass, withActivationCode activationCode: String, completion completion: ((Bool, NSError) -> Void)?)
}

DeclarationDeprecation
From
func activatePaymentPass(_ paymentPass: PKPaymentPass!, withActivationCode activationCode: String!, completion completion: ((Bool, NSError!) -> Void)!)
--
To
func activatePaymentPass(_ paymentPass: PKPaymentPass, withActivationCode activationCode: String, completion completion: ((Bool, NSError) -> Void)?)
iOS 9.0

Declaration
From
func activatePaymentPass(_ paymentPass: PKPaymentPass!, withActivationData activationData: NSData!, completion completion: ((Bool, NSError!) -> Void)!)
To
func activatePaymentPass(_ paymentPass: PKPaymentPass, withActivationData activationData: NSData, completion completion: ((Bool, NSError) -> Void)?)

Declaration
From
func addPasses(_ passes: [AnyObject]!, withCompletionHandler completion: ((PKPassLibraryAddPassesStatus) -> Void)!)
To
func addPasses(_ passes: [PKPass], withCompletionHandler completion: ((PKPassLibraryAddPassesStatus) -> Void)?)

Declaration
From
func containsPass(_ pass: PKPass!) -> Bool
To
func containsPass(_ pass: PKPass) -> Bool

Introduction
FromiOS 8.0
ToiOS 6.0

Deprecation
From--
ToiOS 9.0

Declaration
From
func passes() -> [AnyObject]!
To
func passes() -> [PKPass]

Declaration
From
func passesOfType(_ passType: PKPassType) -> [AnyObject]!
To
func passesOfType(_ passType: PKPassType) -> [PKPass]

Declaration
From
func passWithPassTypeIdentifier(_ identifier: String!, serialNumber serialNumber: String!) -> PKPass!
To
func passWithPassTypeIdentifier(_ identifier: String, serialNumber serialNumber: String) -> PKPass?

Declaration
From
func removePass(_ pass: PKPass!)
To
func removePass(_ pass: PKPass)

Declaration
From
func replacePassWithPass(_ pass: PKPass!) -> Bool
To
func replacePassWithPass(_ pass: PKPass) -> Bool

Raw Value Type
From--
ToInt

Raw Value Type
From--
ToUInt

Modified PKPayment
Declaration
From
class PKPayment : NSObject {
    var token: PKPaymentToken! { get }
    var billingAddress: ABRecord! { get }
    var shippingAddress: ABRecord! { get }
    var shippingMethod: PKShippingMethod! { get }
}
To
class PKPayment : NSObject {
    var token: PKPaymentToken { get }
    var billingAddress: ABRecord? { get }
    var billingContact: PKContact? { get }
    var shippingAddress: ABRecord? { get }
    var shippingContact: PKContact? { get }
    var shippingMethod: PKShippingMethod? { get }
}

DeclarationDeprecation
From
var billingAddress: ABRecord! { get }
--
To
var billingAddress: ABRecord? { get }
iOS 9.0

DeclarationDeprecation
From
var shippingAddress: ABRecord! { get }
--
To
var shippingAddress: ABRecord? { get }
iOS 9.0

Declaration
From
var shippingMethod: PKShippingMethod! { get }
To
var shippingMethod: PKShippingMethod? { get }

Declaration
From
var token: PKPaymentToken! { get }
To
var token: PKPaymentToken { get }

Raw Value Type
From--
ToInt

Declaration
From
class PKPaymentAuthorizationViewController : UIViewController {
    class func canMakePayments() -> Bool
    class func canMakePaymentsUsingNetworks(_ supportedNetworks: [AnyObject]!) -> Bool
    unowned(unsafe) var delegate: PKPaymentAuthorizationViewControllerDelegate!
    init!(paymentRequest request: PKPaymentRequest!)
}
To
class PKPaymentAuthorizationViewController : UIViewController {
    class func canMakePayments() -> Bool
    class func canMakePaymentsUsingNetworks(_ supportedNetworks: [String]) -> Bool
    class func canMakePaymentsUsingNetworks(_ supportedNetworks: [String], capabilities capabilties: PKMerchantCapability) -> Bool
    unowned(unsafe) var delegate: PKPaymentAuthorizationViewControllerDelegate?
    init(paymentRequest request: PKPaymentRequest)
}

Declaration
From
class func canMakePaymentsUsingNetworks(_ supportedNetworks: [AnyObject]!) -> Bool
To
class func canMakePaymentsUsingNetworks(_ supportedNetworks: [String]) -> Bool

Declaration
From
unowned(unsafe) var delegate: PKPaymentAuthorizationViewControllerDelegate!
To
unowned(unsafe) var delegate: PKPaymentAuthorizationViewControllerDelegate?

Declaration
From
init!(paymentRequest request: PKPaymentRequest!)
To
init(paymentRequest request: PKPaymentRequest)

Declaration
From
protocol PKPaymentAuthorizationViewControllerDelegate : NSObjectProtocol {
    func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController!, didAuthorizePayment payment: PKPayment!, completion completion: ((PKPaymentAuthorizationStatus) -> Void)!)
    func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController!)
    optional func paymentAuthorizationViewControllerWillAuthorizePayment(_ controller: PKPaymentAuthorizationViewController!)
    optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController!, didSelectShippingMethod shippingMethod: PKShippingMethod!, completion completion: ((PKPaymentAuthorizationStatus, [AnyObject]!) -> Void)!)
    optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController!, didSelectShippingAddress address: ABRecord!, completion completion: ((PKPaymentAuthorizationStatus, [AnyObject]!, [AnyObject]!) -> Void)!)
}
To
protocol PKPaymentAuthorizationViewControllerDelegate : NSObjectProtocol {
    func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion completion: (PKPaymentAuthorizationStatus) -> Void)
    func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController)
    optional func paymentAuthorizationViewControllerWillAuthorizePayment(_ controller: PKPaymentAuthorizationViewController)
    optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectShippingMethod shippingMethod: PKShippingMethod, completion completion: (PKPaymentAuthorizationStatus, [PKPaymentSummaryItem]) -> Void)
    optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectShippingAddress address: ABRecord, completion completion: (PKPaymentAuthorizationStatus, [PKShippingMethod], [PKPaymentSummaryItem]) -> Void)
    optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectShippingContact contact: PKContact, completion completion: (PKPaymentAuthorizationStatus, [PKShippingMethod], [PKPaymentSummaryItem]) -> Void)
    optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectPaymentMethod paymentMethod: PKPaymentMethod, completion completion: ([PKPaymentSummaryItem]) -> Void)
}

Declaration
From
func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController!, didAuthorizePayment payment: PKPayment!, completion completion: ((PKPaymentAuthorizationStatus) -> Void)!)
To
func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didAuthorizePayment payment: PKPayment, completion completion: (PKPaymentAuthorizationStatus) -> Void)

DeclarationDeprecation
From
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController!, didSelectShippingAddress address: ABRecord!, completion completion: ((PKPaymentAuthorizationStatus, [AnyObject]!, [AnyObject]!) -> Void)!)
--
To
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectShippingAddress address: ABRecord, completion completion: (PKPaymentAuthorizationStatus, [PKShippingMethod], [PKPaymentSummaryItem]) -> Void)
iOS 9.0

Declaration
From
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController!, didSelectShippingMethod shippingMethod: PKShippingMethod!, completion completion: ((PKPaymentAuthorizationStatus, [AnyObject]!) -> Void)!)
To
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectShippingMethod shippingMethod: PKShippingMethod, completion completion: (PKPaymentAuthorizationStatus, [PKPaymentSummaryItem]) -> Void)

Declaration
From
func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController!)
To
func paymentAuthorizationViewControllerDidFinish(_ controller: PKPaymentAuthorizationViewController)

Declaration
From
optional func paymentAuthorizationViewControllerWillAuthorizePayment(_ controller: PKPaymentAuthorizationViewController!)
To
optional func paymentAuthorizationViewControllerWillAuthorizePayment(_ controller: PKPaymentAuthorizationViewController)

Declaration
From
class PKPaymentButton : UIButton {
    convenience init!(type buttonType: PKPaymentButtonType, style buttonStyle: PKPaymentButtonStyle)
    class func buttonWithType(_ buttonType: PKPaymentButtonType, style buttonStyle: PKPaymentButtonStyle) -> Self!
}
To
class PKPaymentButton : UIButton {
    convenience init(type buttonType: PKPaymentButtonType, style buttonStyle: PKPaymentButtonStyle)
    class func buttonWithType(_ buttonType: PKPaymentButtonType, style buttonStyle: PKPaymentButtonStyle) -> Self
    init(paymentButtonType type: PKPaymentButtonType, paymentButtonStyle style: PKPaymentButtonStyle)
}

Declaration
From
convenience init!(type buttonType: PKPaymentButtonType, style buttonStyle: PKPaymentButtonStyle)
To
convenience init(type buttonType: PKPaymentButtonType, style buttonStyle: PKPaymentButtonStyle)

Raw Value Type
From--
ToInt

DeclarationRaw Value Type
From
enum PKPaymentButtonType : Int {
    case Plain
    case Buy
}
--
To
enum PKPaymentButtonType : Int {
    case Plain
    case Buy
    case SetUp
}
Int

Modified PKPaymentPass
Declaration
From
class PKPaymentPass : PKPass {
    var primaryAccountIdentifier: String! { get }
    var primaryAccountNumberSuffix: String! { get }
    var deviceAccountIdentifier: String! { get }
    var deviceAccountNumberSuffix: String! { get }
    var activationState: PKPaymentPassActivationState { get }
}
To
class PKPaymentPass : PKPass {
    var primaryAccountIdentifier: String { get }
    var primaryAccountNumberSuffix: String { get }
    var deviceAccountIdentifier: String { get }
    var deviceAccountNumberSuffix: String { get }
    var activationState: PKPaymentPassActivationState { get }
}

Declaration
From
var deviceAccountIdentifier: String! { get }
To
var deviceAccountIdentifier: String { get }

Declaration
From
var deviceAccountNumberSuffix: String! { get }
To
var deviceAccountNumberSuffix: String { get }

Declaration
From
var primaryAccountIdentifier: String! { get }
To
var primaryAccountIdentifier: String { get }

Declaration
From
var primaryAccountNumberSuffix: String! { get }
To
var primaryAccountNumberSuffix: String { get }

Raw Value Type
From--
ToUInt

Declaration
From
class PKPaymentRequest : NSObject {
    var merchantIdentifier: String!
    var countryCode: String!
    var supportedNetworks: [AnyObject]!
    var merchantCapabilities: PKMerchantCapability
    var paymentSummaryItems: [AnyObject]!
    var currencyCode: String!
    var requiredBillingAddressFields: PKAddressField
    unowned(unsafe) var billingAddress: ABRecord!
    var requiredShippingAddressFields: PKAddressField
    unowned(unsafe) var shippingAddress: ABRecord!
    var shippingMethods: [AnyObject]!
    var shippingType: PKShippingType
    @NSCopying var applicationData: NSData!
}
To
class PKPaymentRequest : NSObject {
    var merchantIdentifier: String
    var countryCode: String
    var supportedNetworks: [String]
    var merchantCapabilities: PKMerchantCapability
    var paymentSummaryItems: [PKPaymentSummaryItem]
    var currencyCode: String
    var requiredBillingAddressFields: PKAddressField
    unowned(unsafe) var billingAddress: ABRecord?
    var billingContact: PKContact?
    var requiredShippingAddressFields: PKAddressField
    unowned(unsafe) var shippingAddress: ABRecord?
    var shippingContact: PKContact?
    var shippingMethods: [PKShippingMethod]?
    var shippingType: PKShippingType
    @NSCopying var applicationData: NSData?
}

Declaration
From
@NSCopying var applicationData: NSData!
To
@NSCopying var applicationData: NSData?

DeclarationDeprecation
From
unowned(unsafe) var billingAddress: ABRecord!
--
To
unowned(unsafe) var billingAddress: ABRecord?
iOS 9.0

Declaration
From
var countryCode: String!
To
var countryCode: String

Declaration
From
var currencyCode: String!
To
var currencyCode: String

Declaration
From
var merchantIdentifier: String!
To
var merchantIdentifier: String

Declaration
From
var paymentSummaryItems: [AnyObject]!
To
var paymentSummaryItems: [PKPaymentSummaryItem]

DeclarationDeprecation
From
unowned(unsafe) var shippingAddress: ABRecord!
--
To
unowned(unsafe) var shippingAddress: ABRecord?
iOS 9.0

Declaration
From
var shippingMethods: [AnyObject]!
To
var shippingMethods: [PKShippingMethod]?

Declaration
From
var supportedNetworks: [AnyObject]!
To
var supportedNetworks: [String]

Declaration
From
class PKPaymentSummaryItem : NSObject {
    convenience init!(label label: String!, amount amount: NSDecimalNumber!)
    class func summaryItemWithLabel(_ label: String!, amount amount: NSDecimalNumber!) -> Self!
    var label: String!
    @NSCopying var amount: NSDecimalNumber!
}
To
class PKPaymentSummaryItem : NSObject {
    convenience init(label label: String, amount amount: NSDecimalNumber)
    class func summaryItemWithLabel(_ label: String, amount amount: NSDecimalNumber) -> Self
    convenience init(label label: String, amount amount: NSDecimalNumber, type type: PKPaymentSummaryItemType)
    class func summaryItemWithLabel(_ label: String, amount amount: NSDecimalNumber, type type: PKPaymentSummaryItemType) -> Self
    var label: String
    @NSCopying var amount: NSDecimalNumber
    var type: PKPaymentSummaryItemType
}

Declaration
From
@NSCopying var amount: NSDecimalNumber!
To
@NSCopying var amount: NSDecimalNumber

Declaration
From
convenience init!(label label: String!, amount amount: NSDecimalNumber!)
To
convenience init(label label: String, amount amount: NSDecimalNumber)

Declaration
From
var label: String!
To
var label: String

Declaration
From
class PKPaymentToken : NSObject {
    var paymentInstrumentName: String! { get }
    var paymentNetwork: String! { get }
    var transactionIdentifier: String! { get }
    var paymentData: NSData! { get }
}
To
class PKPaymentToken : NSObject {
    var paymentMethod: PKPaymentMethod { get }
    var paymentInstrumentName: String { get }
    var paymentNetwork: String { get }
    var transactionIdentifier: String { get }
    var paymentData: NSData { get }
}

Declaration
From
var paymentData: NSData! { get }
To
var paymentData: NSData { get }

DeclarationDeprecation
From
var paymentInstrumentName: String! { get }
--
To
var paymentInstrumentName: String { get }
iOS 9.0

DeclarationDeprecation
From
var paymentNetwork: String! { get }
--
To
var paymentNetwork: String { get }
iOS 9.0

Declaration
From
var transactionIdentifier: String! { get }
To
var transactionIdentifier: String { get }

Declaration
From
class PKShippingMethod : PKPaymentSummaryItem {
    var identifier: String!
    var detail: String!
}
To
class PKShippingMethod : PKPaymentSummaryItem {
    var identifier: String?
    var detail: String?
}

Declaration
From
var detail: String!
To
var detail: String?

Declaration
From
var identifier: String!
To
var identifier: String?

Raw Value Type
From--
ToUInt