-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PassKit] Update bindings for Xcode 13.0 beta 1, 2 #12299
Changes from 2 commits
7d4fd1c
e6ad561
45c09b5
5f8ea1f
8ee31cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,6 +174,8 @@ public enum PKPaymentButtonType : long { | |
Contribute = 14, | ||
[iOS (14,0)] | ||
Tip = 15, | ||
[Mac (12,0), iOS (15,0), Watch (8,0)] | ||
Continue = 16, | ||
} | ||
|
||
[Mac (11,0)] | ||
|
@@ -221,17 +223,8 @@ public enum PKPaymentMethodType : ulong | |
Debit, | ||
Credit, | ||
Prepaid, | ||
Store | ||
} | ||
|
||
[Mac (11,0)] | ||
[Watch (3,0)] | ||
[iOS (9,0)] | ||
[Native] | ||
public enum PKPaymentSummaryItemType : ulong | ||
{ | ||
Final, | ||
Pending | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did we add these in this cycle? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry, confusing diffs threw me off-course here! fixing |
||
Store, | ||
EMoney, | ||
} | ||
|
||
[NoWatch] | ||
|
@@ -252,6 +245,8 @@ public enum PKPaymentErrorCode : long { | |
ShippingContactInvalid = 1, | ||
BillingContactInvalid, | ||
ShippingAddressUnserviceable, | ||
CouponCodeInvalid, | ||
CouponCodeExpired, | ||
} | ||
|
||
[iOS (12,0)] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,6 +207,11 @@ interface PKPassLibrary { | |
[Watch (6,2), iOS (13,4)] | ||
[Export ("signData:withSecureElementPass:completion:")] | ||
void SignData (NSData signData, PKSecureElementPass secureElementPass, PKPassLibrarySignDataCompletionHandler completion); | ||
|
||
[Async (ResultTypeName = "PKServiceProviderDataCompletionResult")] | ||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[Export ("serviceProviderDataForSecureElementPass:completion:")] | ||
void ServiceProviderData (PKSecureElementPass secureElementPass, Action<NSData, NSError> completion); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing a verb, right? CreateServiceProviderData maybe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method needs a verb/action, prefix with
|
||
} | ||
|
||
[Static] | ||
|
@@ -345,6 +350,11 @@ interface PKPaymentAuthorizationViewControllerDelegate { | |
[Export ("paymentAuthorizationViewController:didRequestMerchantSessionUpdate:")] | ||
[EventArgs ("PKPaymentRequestMerchantSessionUpdate")] | ||
void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationViewController controller, Action<PKPaymentRequestMerchantSessionUpdate> updateHandler); | ||
|
||
[NoWatch, Mac (12,0), iOS (15,0)] | ||
[Export ("paymentAuthorizationViewController:didChangeCouponCode:handler:")] | ||
[EventArgs ("PKPaymentRequestCouponCodeUpdate")] | ||
void DidChangeCouponCode (PKPaymentAuthorizationViewController controller, string couponCode, Action<PKPaymentRequestCouponCodeUpdate> completion); | ||
} | ||
|
||
[Mac (11,0)] | ||
|
@@ -416,6 +426,11 @@ interface PKShippingMethod { | |
[NullAllowed] // by default this property is null | ||
[Export ("detail")] | ||
string Detail { get; set; } | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[NullAllowed] | ||
[Export ("dateComponentsRange", ArgumentSemantic.Copy)] | ||
PKDateComponentsRange DateComponentsRange { get; set; } | ||
} | ||
|
||
[Watch (3,0)] | ||
|
@@ -446,6 +461,19 @@ interface PKPaymentRequest { | |
[Export ("currencyCode")] | ||
string CurrencyCode { get; set; } | ||
|
||
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[Export ("supportsCouponCode")] | ||
bool SupportsCouponCode { get; set; } | ||
|
||
[NullAllowed] | ||
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[Export ("couponCode")] | ||
string CouponCode { get; set; } | ||
|
||
[Watch (8,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[Export ("shippingContactEditingMode", ArgumentSemantic.Assign)] | ||
PKShippingContactEditingMode ShippingContactEditingMode { get; set; } | ||
|
||
[NoMac] | ||
[Deprecated (PlatformName.WatchOS, 4,0, message: "Use 'RequiredBillingContactFields' instead.")] | ||
[Deprecated (PlatformName.iOS, 11,0, message: "Use 'RequiredBillingContactFields' instead.")] | ||
|
@@ -548,6 +576,16 @@ interface PKPaymentRequest { | |
[Static] | ||
[Export ("paymentShippingAddressUnserviceableErrorWithLocalizedDescription:")] | ||
NSError CreatePaymentShippingAddressUnserviceableError ([NullAllowed] string localizedDescription); | ||
|
||
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[Static] | ||
[Export ("paymentCouponCodeInvalidErrorWithLocalizedDescription:")] | ||
NSError CouponCodeInvalidError ([NullAllowed] string localizedDescription); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, Is this starting with a verb? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefix with |
||
|
||
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[Static] | ||
[Export ("paymentCouponCodeExpiredErrorWithLocalizedDescription:")] | ||
NSError CouponCodeExpiredError ([NullAllowed] string localizedDescription); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefix with |
||
} | ||
|
||
[Mac (11,0)] | ||
|
@@ -1140,7 +1178,11 @@ interface PKPaymentAuthorizationControllerDelegate { | |
[MacCatalyst (14,0)] | ||
[Export ("paymentAuthorizationController:didRequestMerchantSessionUpdate:")] | ||
void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationController controller, Action<PKPaymentRequestMerchantSessionUpdate> handler); | ||
|
||
|
||
[NoWatch, Mac (12,0), iOS (15,0)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
[Export ("paymentAuthorizationController:didChangeCouponCode:handler:")] | ||
void DidChangeCouponCode (PKPaymentAuthorizationController controller, string couponCode, Action<PKPaymentRequestCouponCodeUpdate> completion); | ||
|
||
[Watch (7,0)][iOS (14,0)] | ||
[MacCatalyst (14,0)] | ||
[Export ("presentationWindowForPaymentAuthorizationController:")] | ||
|
@@ -1171,27 +1213,29 @@ interface PKLabeledValue | |
|
||
[Mac (11,0)] | ||
[Watch (4,3), iOS (11,3)] | ||
[BaseType (typeof (NSObject))] | ||
[BaseType (typeof (PKStoredValuePassProperties))] | ||
[DisableDefaultCtor] | ||
interface PKTransitPassProperties { | ||
|
||
[Static] | ||
[Export ("passPropertiesForPass:")] | ||
[return: NullAllowed] | ||
PKTransitPassProperties GetPassProperties (PKPass pass); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's a breaking change to remove this API There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I see diffs like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need more context + (nullable instancetype)passPropertiesForPass:(PKPass *)pass; looks identical to what we already have. I could be because the header moved the definition or duplicated a member in a subclass... In any case we must find a way to expose new API without breaking changes |
||
|
||
[Deprecated (PlatformName.iOS, 15, 0)] | ||
[Deprecated (PlatformName.WatchOS, 8, 0)] | ||
[Deprecated (PlatformName.MacOSX, 12, 0)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MacCatalyst? |
||
[Export ("transitBalance", ArgumentSemantic.Copy)] | ||
NSDecimalNumber TransitBalance { get; } | ||
|
||
[Deprecated (PlatformName.iOS, 15, 0)] | ||
[Deprecated (PlatformName.WatchOS, 8, 0)] | ||
[Deprecated (PlatformName.MacOSX, 12, 0)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, MacCatalyst? |
||
[Export ("transitBalanceCurrencyCode")] | ||
string TransitBalanceCurrencyCode { get; } | ||
|
||
[Export ("inStation")] | ||
bool InStation { [Bind ("isInStation")] get; } | ||
|
||
[Deprecated (PlatformName.iOS, 14,5, message: "Use 'Blocked' instead.")] | ||
[Deprecated (PlatformName.MacCatalyst, 14,5, message: "Use 'Blocked' instead.")] | ||
[Deprecated (PlatformName.WatchOS, 7,4, message: "Use 'Blocked' instead.")] | ||
[Deprecated (PlatformName.iOS, 15, 0, message: "Use 'Blocked' instead.")] | ||
[Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'Blocked' instead.")] | ||
[Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'Blocked' instead.")] | ||
[Deprecated (PlatformName.MacOSX, 12, 0, message: "Use 'Blocked' instead.")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, looks like I got confused with a different blocked - thanks for catching! |
||
[Export ("blacklisted")] | ||
bool Blacklisted { [Bind ("isBlacklisted")] get; } | ||
|
||
|
@@ -1242,8 +1286,8 @@ interface PKSuicaPassProperties | |
bool GreenCarTicketUsed { [Bind ("isGreenCarTicketUsed")] get; } | ||
|
||
[Export ("blacklisted")] | ||
[Deprecated (PlatformName.iOS, 14,5, message: "Use 'Blocked' instead.")] // exists in base class | ||
[Deprecated (PlatformName.WatchOS, 7,4, message: "Use 'Blocked' instead.")] | ||
[Deprecated (PlatformName.iOS, 15, 0, message: "Use 'Blocked' instead.")] // exists in base class | ||
[Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'Blocked' instead.")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, MacCatalyst? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same, the version should be the one where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! just to confirm, are the web docs misleading about this one? clicking on the hyperlink goes to the |
||
bool Blacklisted { [Bind ("isBlacklisted")] get; } | ||
} | ||
|
||
|
@@ -1278,6 +1322,10 @@ interface PKPaymentRequestUpdate { | |
|
||
[Export ("paymentSummaryItems", ArgumentSemantic.Copy)] | ||
PKPaymentSummaryItem[] PaymentSummaryItems { get; set; } | ||
|
||
[Watch (8,0), Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[Export ("shippingMethods", ArgumentSemantic.Copy)] | ||
PKShippingMethod[] ShippingMethods { get; set; } | ||
} | ||
|
||
[Mac (11,0)] | ||
|
@@ -1569,6 +1617,10 @@ interface PKShareablePassMetadata { | |
[Export ("initWithProvisioningCredentialIdentifier:cardConfigurationIdentifier:sharingInstanceIdentifier:passThumbnailImage:ownerDisplayName:localizedDescription:")] | ||
IntPtr Constructor (string credentialIdentifier, string cardConfigurationIdentifier, string sharingInstanceIdentifier, CGImage passThumbnailImage, string ownerDisplayName, string localizedDescription); | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[Export ("initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:passThumbnailImage:ownerDisplayName:localizedDescription:accountHash:templateIdentifier:relyingPartyIdentifier:requiresUnifiedAccessCapableDevice:")] | ||
IntPtr Constructor (string credentialIdentifier, string sharingInstanceIdentifier, CGImage passThumbnailImage, string ownerDisplayName, string localizedDescription, string accountHash, string templateIdentifier, string relyingPartyIdentifier, bool requiresUnifiedAccessCapableDevice); | ||
|
||
[Export ("credentialIdentifier", ArgumentSemantic.Strong)] | ||
string CredentialIdentifier { get; } | ||
|
||
|
@@ -1586,6 +1638,22 @@ interface PKShareablePassMetadata { | |
|
||
[Export ("ownerDisplayName", ArgumentSemantic.Strong)] | ||
string OwnerDisplayName { get; } | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[Export ("accountHash", ArgumentSemantic.Strong)] | ||
string AccountHash { get; } | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[Export ("templateIdentifier", ArgumentSemantic.Strong)] | ||
string TemplateIdentifier { get; } | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[Export ("relyingPartyIdentifier", ArgumentSemantic.Strong)] | ||
string RelyingPartyIdentifier { get; } | ||
|
||
[iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how do I determine the availability when the docs don't indicate them and I can't find the relevant header file? (I'm assuming in this case that it's Watch (8, 0) but can never be too sure) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rachelkang if it does, look at the diff:
So, iOS 15 and watch 8 :) From https://github.com/xamarin/xamarin-macios/wiki/PassKit-iOS-xcode13.0-beta2 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, I totally missed that... they are so inconsistent!!! thanks 😆 |
||
[Export ("requiresUnifiedAccessCapableDevice")] | ||
bool RequiresUnifiedAccessCapableDevice { get; } | ||
} | ||
|
||
[NoWatch, NoTV] | ||
|
@@ -1858,6 +1926,23 @@ interface PKPaymentRequestMerchantSessionUpdate { | |
PKPaymentMerchantSession Session { get; set; } | ||
} | ||
|
||
[NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[BaseType (typeof(PKPaymentRequestUpdate))] | ||
[DisableDefaultCtor] | ||
interface PKPaymentRequestCouponCodeUpdate | ||
{ | ||
[Export ("initWithPaymentSummaryItems:")] | ||
[DesignatedInitializer] | ||
IntPtr Constructor (PKPaymentSummaryItem[] paymentSummaryItems); | ||
|
||
[Export ("initWithErrors:paymentSummaryItems:shippingMethods:")] | ||
[DesignatedInitializer] | ||
IntPtr Constructor ([NullAllowed] NSError[] errors, PKPaymentSummaryItem[] paymentSummaryItems, PKShippingMethod[] shippingMethods); | ||
|
||
[NullAllowed, Export ("errors", ArgumentSemantic.Copy)] | ||
NSError[] Errors { get; set; } | ||
} | ||
|
||
[Watch (7,0)][Mac (11,0)][iOS (14,0)] | ||
[MacCatalyst (14,0)] | ||
[BaseType (typeof (NSObject))] | ||
|
@@ -1873,4 +1958,113 @@ enum PKRadioTechnology : ulong { | |
Nfc = 1 << 0, | ||
Bluetooth = 1 << 1, | ||
} | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface PKDateComponentsRange : NSCopying, NSSecureCoding | ||
{ | ||
[Export ("initWithStartDateComponents:endDateComponents:")] | ||
[return: NullAllowed] | ||
IntPtr Constructor (NSDateComponents startDateComponents, NSDateComponents endDateComponents); | ||
|
||
[Export ("startDateComponents", ArgumentSemantic.Copy)] | ||
NSDateComponents StartDateComponents { get; } | ||
|
||
[Export ("endDateComponents", ArgumentSemantic.Copy)] | ||
NSDateComponents EndDateComponents { get; } | ||
} | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[BaseType (typeof(PKPaymentSummaryItem))] | ||
[DisableDefaultCtor] | ||
interface PKDeferredPaymentSummaryItem | ||
{ | ||
[Export ("deferredDate", ArgumentSemantic.Copy)] | ||
NSDate DeferredDate { get; set; } | ||
} | ||
|
||
[Watch (8,0), Mac (12,0), iOS (15,0)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mac Catalyst? |
||
[Native] | ||
public enum PKShippingContactEditingMode : ulong | ||
{ | ||
Enabled = 1, | ||
StorePickup, | ||
} | ||
|
||
[Watch (3,0), iOS (9,0)] | ||
[Native] | ||
public enum PKPaymentSummaryItemType : ulong | ||
{ | ||
Final, | ||
Pending, | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ ideally avoid moving types - it makes reviewing harder (and my earlier comment about a breaking change likely incorrect) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops! sorry - as mentioned in the other comment, the diffs removed and re-added them later which threw me off-course here |
||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[BaseType (typeof(PKPaymentSummaryItem))] | ||
[DisableDefaultCtor] | ||
interface PKRecurringPaymentSummaryItem | ||
{ | ||
[NullAllowed, Export ("startDate", ArgumentSemantic.Copy)] | ||
NSDate StartDate { get; set; } | ||
|
||
[Export ("intervalUnit", ArgumentSemantic.Assign)] | ||
NSCalendarUnit IntervalUnit { get; set; } | ||
|
||
[Export ("intervalCount")] | ||
nint IntervalCount { get; set; } | ||
|
||
[NullAllowed, Export ("endDate", ArgumentSemantic.Copy)] | ||
NSDate EndDate { get; set; } | ||
} | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
public enum PKStoredValuePassBalanceType : ulong | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can remove the |
||
{ | ||
[Field ("PKStoredValuePassBalanceTypeCash")] | ||
Cash, | ||
[Field ("PKStoredValuePassBalanceTypeLoyaltyPoints")] | ||
LoyaltyPoints, | ||
} | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface PKStoredValuePassBalance | ||
{ | ||
[Export ("amount", ArgumentSemantic.Strong)] | ||
NSDecimalNumber Amount { get; } | ||
|
||
[NullAllowed, Export ("currencyCode")] | ||
string CurrencyCode { get; } | ||
|
||
[Export ("balanceType")] | ||
string BalanceType { get; } | ||
|
||
[NullAllowed, Export ("expiryDate", ArgumentSemantic.Strong)] | ||
NSDate ExpiryDate { get; } | ||
|
||
[Export ("isEqualToBalance:")] | ||
bool IsEqualToBalance (PKStoredValuePassBalance balance); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -> |
||
} | ||
|
||
[Watch (8,0), iOS (15,0), Mac (12,0), MacCatalyst (15,0)] | ||
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface PKStoredValuePassProperties | ||
{ | ||
[Static] | ||
[Export ("passPropertiesForPass:")] | ||
[return: NullAllowed] | ||
PKStoredValuePassProperties PassPropertiesForPass (PKPass pass); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -> |
||
|
||
[Export ("blocked")] | ||
bool Blocked { [Bind ("isBlocked")] get; } | ||
|
||
[NullAllowed, Export ("expirationDate", ArgumentSemantic.Copy)] | ||
NSDate ExpirationDate { get; } | ||
|
||
[Export ("balances", ArgumentSemantic.Copy)] | ||
PKStoredValuePassBalance[] Balances { get; } | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a breaking change to remove this enum type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh oops! thanks for catching that - diffs removed and added back and I totally missed it