-
Notifications
You must be signed in to change notification settings - Fork 511
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
[StoreKit] Update bindings for Xcode 11.4 beta 3 #8104
[StoreKit] Update bindings for Xcode 11.4 beta 3 #8104
Conversation
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.
Some minor details.
src/storekit.cs
Outdated
@@ -76,21 +82,23 @@ partial interface SKDownload { | |||
void DeleteContentForProduct (string productId); | |||
#endif | |||
|
|||
[Mac (10,14)] | |||
[Mac (10, 14)] |
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.
Not needed space change.
src/storekit.cs
Outdated
[Field ("SKDownloadTimeRemainingUnknown")] | ||
double TimeRemainingUnknown { get; } | ||
|
||
[Mac (10,11)] | ||
[Mac (10, 11)] |
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.
Not needed space change.
src/storekit.cs
Outdated
[NullAllowed] // by default this property is null | ||
[Export ("applicationUsername", ArgumentSemantic.Copy)][New] | ||
string ApplicationUsername { get; set; } | ||
|
||
[iOS (8,3), Mac (10,14)] | ||
[Watch (6, 2), iOS (8,3), Mac (10,14)] |
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.
We should be consistent between [Watch (6, 2)] and [Watch (6,2)]. I know we are not very, but in this case you are using both in the same PR.
src/frameworks.sources
Outdated
@@ -2029,6 +2029,7 @@ WATCHOS_FRAMEWORKS = \ | |||
PassKit \ | |||
PushKit \ | |||
Security \ | |||
StoreKit \ |
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.
Looking at the complete file, StoreKit is present in all platforms, Mac, iOS, tvOS and watchOS. At this point will should remove it f rom all the subsets and add it to COMMON_FRAMEWORKS
Build failure ✅ Build succeeded |
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.
please double check that every public type either
- has a
[Watch(6,2)]
attribute - has a
[NoWatch]
attribute, or - is under a
#if !WATCH
block
src/storekit.cs
Outdated
@@ -132,34 +140,39 @@ interface SKMutablePayment { | |||
[Availability (Deprecated = Platform.iOS_5_0, Message = "Use 'PaymentWithProduct (SKProduct)' after fetching the list of available products from 'SKProductRequest' instead.")] | |||
SKMutablePayment PaymentWithProduct (string identifier); | |||
|
|||
[Watch (6, 2)] |
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.
those should be on the type
because without a [Watch] on the type we'll assume it's been there since watchOS 2.0 (and that's not correct)
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.
Ah, got it. I will go through all the APIs and mark them as appropriate :)
src/storekit.cs
Outdated
@@ -24,6 +27,7 @@ partial interface SKDownload { | |||
|
|||
[iOS (12,0)] | |||
[TV (12,0)] | |||
[Watch (6, 2)] |
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.
move to type (see other message)
Build failure Test results3 tests failed, 91 tests passed.Failed tests
|
@@ -393,12 +419,14 @@ interface SKRequestDelegate { | |||
[Mac (10,9)] | |||
[BaseType (typeof (SKRequest))] |
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.
As @spouliot mentioned with others, move the [Watch (6,2)] to the top, just need to add one and the wraps should not need any attr decoration.
@whitneyschmidt looks like there is a introspection issue with SKProductStorePromotionController, looking at the docs, is not present in the watchos |
src/storekit.cs
Outdated
@@ -27,18 +31,22 @@ partial interface SKDownload { | |||
[Export ("state")] | |||
SKDownloadState State { get; } | |||
#if MONOMAC | |||
[NoWatch] // not necessary b/c #if MONOMAC, so this will not even compile for ios/watch/tvos? |
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.
It seems like this is not necessary because we have #if MONOMAC
and it was not marked as [NoTV][NoiOS]
before?
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.
no, it's not required
it would tell, in Xamarin.Mac.dll, that this is not available on watchOS - but that's not very useful
src/storekit.cs
Outdated
[Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'IsDownloadable' instead.")] | ||
[Export ("downloadable")] | ||
bool Downloadable { get; } | ||
#elif !XAMCORE_4_0 | ||
[NoWatch] // IS THIS RIGHT? |
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.
Not sure about this one, but since it is Obsolete
it seems like we would not want users to have access to it starting in [Watch (6, 2)]
?
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.
no, it's not needed
some times when Apple enable an existing framework in a new platform then bring everything, including deprecated API :(
Since this is replaced by something newer/better, that is always available on the new platform, then we can reduce warnings and let intellisense provide better choice to the developers
if xtro complains (because it's in the header) then add a line in watchOS-StoreKit.ignore
Build failure Test results1 tests failed, 93 tests passed.Failed tests
|
src/storekit.cs
Outdated
@@ -6,7 +6,7 @@ | |||
// Miguel de Icaza | |||
// | |||
// Copyright 2009, Novell, Inc. | |||
// Copyright 2012 Xamarin Inc. | |||
// Copyright 2020 Xamarin Inc. |
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.
don't remove, replace - just append
in this case it should be a new line for 2020 / Microsoft
src/storekit.cs
Outdated
@@ -27,18 +31,22 @@ partial interface SKDownload { | |||
[Export ("state")] | |||
SKDownloadState State { get; } | |||
#if MONOMAC | |||
[NoWatch] // not necessary b/c #if MONOMAC, so this will not even compile for ios/watch/tvos? |
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.
no, it's not required
it would tell, in Xamarin.Mac.dll, that this is not available on watchOS - but that's not very useful
src/storekit.cs
Outdated
[Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'IsDownloadable' instead.")] | ||
[Export ("downloadable")] | ||
bool Downloadable { get; } | ||
#elif !XAMCORE_4_0 | ||
[NoWatch] // IS THIS RIGHT? |
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.
no, it's not needed
some times when Apple enable an existing framework in a new platform then bring everything, including deprecated API :(
Since this is replaced by something newer/better, that is always available on the new platform, then we can reduce warnings and let intellisense provide better choice to the developers
if xtro complains (because it's in the header) then add a line in watchOS-StoreKit.ignore
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.
Approving taking into account that @spouliot are taken care of.
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.
LGTM 👍 after Sebastien's comments are addressed
Build failure Test results1 tests failed, 93 tests passed.Failed tests
|
build |
@whitneyschmidt please don't issue a new |
Build success |
Original PR against
xcode11.4
branch can be found here: #8081