Skip to content
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

Merged
merged 5 commits into from
Aug 3, 2021

Conversation

rachelkang
Copy link
Contributor

No beta 3, 4 updates

@rachelkang rachelkang added the note-highlight Worth calling out specifically in release notes label Jul 29, 2021
@rachelkang rachelkang added this to the xcode13.0 milestone Jul 29, 2021
Comment on lines 227 to 234
[Mac (11,0)]
[Watch (3,0)]
[iOS (9,0)]
[Native]
public enum PKPaymentSummaryItemType : ulong
{
Final,
Pending
Copy link
Member

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?

Copy link
Contributor Author

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);
Copy link
Member

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);
Copy link
Member

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);
Copy link
Member

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)]
Copy link
Member

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)]
Copy link
Member

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.")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, MacCatalyst?

[Watch (3,0)]
[iOS (9,0)]
[Native]
public enum PKPaymentSummaryItemType : ulong
Copy link
Contributor

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

Copy link
Contributor Author

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);
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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)]
Copy link
Contributor

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)]
Copy link
Contributor

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

Copy link
Contributor Author

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)

Copy link
Member

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

Copy link
Contributor Author

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,
}
Copy link
Contributor

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)

Copy link
Contributor Author

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
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> GetPassProperties

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Tests passed on Build. ✅

Tests passed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)

GitHub pages

Results 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'
Merge 45c09b5 into 448cc6e

src/passkit.cs Outdated
NSDate DeferredDate { get; set; }
}

[Watch (8,0), Mac (12,0), iOS (15,0)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mac Catalyst?

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

Test results

1 tests failed, 88 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug [dotnet]: Failed (Tests run: 2629 Passed: 2490 Inconclusive: 35 Failed: 1 Ignored: 138)

Pipeline on Agent XAMBOT-1098.BigSur'
Merge 8ee31cc into 3766cf8

@mandel-macaque
Copy link
Member

Issue is unrelated: https://github.com/xamarin/maccore/issues/2443

@mandel-macaque mandel-macaque merged commit 3d0ac38 into xamarin:main Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
note-highlight Worth calling out specifically in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants