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

[StoreKit] Update bindings for Xcode 11.4 beta 3 #8104

Merged

Conversation

whitneyschmidt
Copy link
Contributor

Original PR against xcode11.4 branch can be found here: #8081

Copy link
Member

@mandel-macaque mandel-macaque left a 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)]
Copy link
Member

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

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

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.

@@ -2029,6 +2029,7 @@ WATCHOS_FRAMEWORKS = \
PassKit \
PushKit \
Security \
StoreKit \
Copy link
Member

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

@monojenkins
Copy link
Collaborator

Build failure
Build failed or was aborted

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

Copy link
Contributor

@spouliot spouliot left a 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)]
Copy link
Contributor

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)

Copy link
Contributor Author

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

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)

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)
🔥 Test run failed 🔥

Test results

3 tests failed, 91 tests passed.

Failed tests

  • Xtro/Mac: Failed (Test run failed.)
  • introspection/watchOS 32-bits - simulator/Debug: Failed
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 3.2): Failed

@@ -393,12 +419,14 @@ interface SKRequestDelegate {
[Mac (10,9)]
[BaseType (typeof (SKRequest))]
Copy link
Member

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.

@mandel-macaque
Copy link
Member

@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?
Copy link
Contributor Author

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?

Copy link
Contributor

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

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)]?

Copy link
Contributor

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

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)
🔥 Test run failed 🔥

Test results

1 tests failed, 93 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed

src/storekit.cs Outdated
@@ -6,7 +6,7 @@
// Miguel de Icaza
//
// Copyright 2009, Novell, Inc.
// Copyright 2012 Xamarin Inc.
// Copyright 2020 Xamarin Inc.
Copy link
Contributor

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

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

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

Copy link
Member

@mandel-macaque mandel-macaque left a 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.

Copy link
Member

@dalexsoto dalexsoto left a 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

@monojenkins
Copy link
Collaborator

Build failure
Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)
🔥 Test run failed 🔥

Test results

1 tests failed, 93 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed

@whitneyschmidt
Copy link
Contributor Author

build

@spouliot
Copy link
Contributor

@whitneyschmidt please don't issue a new build without checking the logs first. This was a known HE0038 issue so it could be merged (with a note).

@monojenkins
Copy link
Collaborator

Build success
Build succeeded
API Diff (from stable)
ℹ️ API Diff (from PR only) (please review changes)
ℹ️ Generator Diff (please review changes)
Test run succeeded

@whitneyschmidt whitneyschmidt merged commit e085125 into xamarin:d16-5-xcode11.4 Mar 16, 2020
@whitneyschmidt whitneyschmidt added the notes-mention Deserves a mention in release notes label Sep 9, 2020
@whitneyschmidt whitneyschmidt added this to the xcode11 milestone Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-mention Deserves a mention in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants