Documentation Archive Developer
Search

PassKit Changes for Objective-C

PassKit

PKAddPassButton.h (Added)

PKAddPassesViewController.h

Declaration
From
- (instancetype)initWithPass:(id)pass
To
- (instancetype _Nonnull)initWithPass:(PKPass * _Nonnull)pass

Declaration
From
- (instancetype)initWithPasses:(NSArray *)passes
To
- (instancetype _Nonnull)initWithPasses:(NSArray<PKPass *> * _Nonnull)passes

PKAddPaymentPassViewController.h (Added)

PKConstants.h (Added)

Header
FromPassKit/PKPaymentRequest.h
ToPassKit/PKConstants.h

Header
FromPassKit/PKPaymentRequest.h
ToPassKit/PKConstants.h

Header
FromPassKit/PKPaymentRequest.h
ToPassKit/PKConstants.h

PKContact.h (Added)

PKPass.h

PKPassLibrary.h

Deprecation
From--
ToiOS 9.0

Declaration
From
- (void)addPasses:(NSArray *)passes withCompletionHandler:(void (^)(PKPassLibraryAddPassesStatus status))completion
To
- (void)addPasses:(NSArray<PKPass *> * _Nonnull)passes withCompletionHandler:(void (^ _Nullable)(PKPassLibraryAddPassesStatus status))completion

Deprecation
From--
ToiOS 9.0

Declaration
From
- (NSArray *)passes
To
- (NSArray<PKPass *> * _Nonnull)passes

Declaration
From
- (NSArray *)passesOfType:(PKPassType)passType
To
- (NSArray<PKPass *> * _Nonnull)passesOfType:(PKPassType)passType

PKPayment.h

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

PKPaymentAuthorizationViewController.h

Declaration
From
+ (BOOL)canMakePaymentsUsingNetworks:(NSArray *)supportedNetworks
To
+ (BOOL)canMakePaymentsUsingNetworks:(NSArray<NSString *> * _Nonnull)supportedNetworks

DeclarationDeprecation
From
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingAddress:(ABRecordRef)address completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray *shippingMethods, NSArray *summaryItems))completion
--
To
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController * _Nonnull)controller didSelectShippingAddress:(ABRecordRef _Nonnull)address completion:(void (^ _Nonnull)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> * _Nonnull shippingMethods, NSArray<PKPaymentSummaryItem *> * _Nonnull summaryItems))completion
iOS 9.0

Declaration
From
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingMethod:(PKShippingMethod *)shippingMethod completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray *summaryItems))completion
To
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController * _Nonnull)controller didSelectShippingMethod:(PKShippingMethod * _Nonnull)shippingMethod completion:(void (^ _Nonnull)(PKPaymentAuthorizationStatus status, NSArray<PKPaymentSummaryItem *> * _Nonnull summaryItems))completion

PKPaymentButton.h

PKPaymentMethod.h (Added)

PKPaymentRequest.h

Deprecation
From--
ToiOS 9.0

Declaration
From
@property(nonatomic, copy) NSArray *paymentSummaryItems
To
@property(nonatomic, copy, nonnull) NSArray<PKPaymentSummaryItem *> *paymentSummaryItems

Deprecation
From--
ToiOS 9.0

Declaration
From
@property(nonatomic, copy) NSArray *shippingMethods
To
@property(nonatomic, copy, nullable) NSArray<PKShippingMethod *> *shippingMethods

Declaration
From
@property(nonatomic, copy) NSArray *supportedNetworks
To
@property(nonatomic, copy, nonnull) NSArray<NSString *> *supportedNetworks

Header
FromPassKit/PKPaymentRequest.h
ToPassKit/PKConstants.h

Header
FromPassKit/PKPaymentRequest.h
ToPassKit/PKConstants.h

Header
FromPassKit/PKPaymentRequest.h
ToPassKit/PKConstants.h

PKPaymentToken.h

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0