-
Notifications
You must be signed in to change notification settings - Fork 515
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
[PassKit] Update bindings for Xcode 13.0 beta 1, 2 #12299
Conversation
src/PassKit/PKEnums.cs
Outdated
[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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, confusing diffs threw me off-course here! fixing
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a verb, right? CreateServiceProviderData maybe?
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
Same, Is this starting with a verb?
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
|
||
[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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Same, MacCatalyst?
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
Same, MacCatalyst?
src/PassKit/PKEnums.cs
Outdated
[Watch (3,0)] | ||
[iOS (9,0)] | ||
[Native] | ||
public enum PKPaymentSummaryItemType : ulong |
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
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
Method needs a verb/action, prefix with Get
Calls a completion handler that returns the custom data for a Secure Element pass
https://developer.apple.com/documentation/passkit/pkpasslibrary/3747078-serviceproviderdataforsecureelem
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
prefix with Get
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
prefix with Get
src/passkit.cs
Outdated
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
[MacCatalyst (15,0)]
?
otherwise it's implied it existed in 13.0 (the original release)
src/passkit.cs
Outdated
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
missing [Watch]
this implies it was available in watchOS 2.0
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
@rachelkang if it does, look at the diff:
+ requiresUnifiedAccessCapableDevice:(BOOL)requiresUnifiedAccessCapableDevice
API_AVAILABLE(ios(15.0), watchos(8.0));
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 comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I totally missed that... they are so inconsistent!!! thanks 😆
src/passkit.cs
Outdated
{ | ||
Final, | ||
Pending, | ||
} |
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.
^ 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 comment
The 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
src/passkit.cs
Outdated
} | ||
|
||
[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 comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove the : ulong
since it's not [Native]
anymore
src/passkit.cs
Outdated
NSDate ExpiryDate { get; } | ||
|
||
[Export ("isEqualToBalance:")] | ||
bool IsEqualToBalance (PKStoredValuePassBalance balance); |
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.
-> IsEqual
since Balance:
is the argument part of the selector
src/passkit.cs
Outdated
[Static] | ||
[Export ("passPropertiesForPass:")] | ||
[return: NullAllowed] | ||
PKStoredValuePassProperties PassPropertiesForPass (PKPass pass); |
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.
-> GetPassProperties
✅ [PR Build] Tests passed on Build. ✅Tests passed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diffℹ️ API Diff (from PR only) (please review changes) GitHub pagesResults can be found in the following github pages (it might take some time to publish): 🎉 All 89 tests passed 🎉Pipeline on Agent XAMBOT-1104.BigSur' |
src/passkit.cs
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Mac Catalyst?
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View API diffAPI & Generator diffℹ️ API Diff (from PR only) (please review changes) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results1 tests failed, 88 tests passed.Failed tests
Pipeline on Agent XAMBOT-1098.BigSur' |
Issue is unrelated: https://github.com/xamarin/maccore/issues/2443 |
No beta 3, 4 updates