-
Notifications
You must be signed in to change notification settings - Fork 517
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
[UIKit] Update bindings to Xcode 13 Beta 5 #12706
Conversation
❌ [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 results4 tests failed, 98 tests passed.Failed tests
Pipeline on Agent XAMBOT-1104.BigSur' |
❌ [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 results2 tests failed, 100 tests passed.Failed tests
Pipeline on Agent XAMBOT-1104.BigSur' |
src/xkit.cs
Outdated
@@ -1492,6 +1492,18 @@ interface NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType | |||
[Export ("sectionIdentifiers")] | |||
SectionIdentifierType [] SectionIdentifiers { get; } | |||
|
|||
[TV (15,0), iOS (15,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.
This type is available for macOS as well, so it looks like it's missing the availability attribute for macOS.
src/xkit.cs
Outdated
[TV (15,0), NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)] | ||
[Static] | ||
[Export ("registerTextAttachmentViewProviderClass:forFileType:")] | ||
void RegisterTextAttachmentViewProviderClass (Class textAttachmentViewProviderClass, string fileType); |
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.
This is the swift name:
void RegisterTextAttachmentViewProviderClass (Class textAttachmentViewProviderClass, string fileType); | |
void RegisterViewProviderClass (Class textAttachmentViewProviderClass, string fileType); |
@@ -31,3 +31,6 @@ | |||
!missing-selector! UISearchDisplayController::setSearchResultsTitle: not bound | |||
!missing-selector! UIViewController::searchDisplayController not bound | |||
!missing-type! UISearchDisplayController not bound | |||
|
|||
## Grouped nint constants | |||
!unknown-native-enum! UIFocusGroupPriority bound |
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 eol
src/uikit.cs
Outdated
[iOS (15,0), TV (15,0), MacCatalyst (15,0)] | ||
First = 1uL << 8, | ||
[iOS (15,0), TV (15,0), MacCatalyst (15,0)] | ||
Last = 1uL << 9 |
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.
Last = 1uL << 9 | |
Last = 1uL << 9, |
src/uikit.cs
Outdated
@@ -2047,6 +2120,7 @@ interface UIApplication { | |||
[Transient] | |||
UIWindow KeyWindow { get; } | |||
|
|||
[Deprecated (PlatformName.iOS, 15, 0, message: "Use 'UIWindowScene.Windows' the desired window scene 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.
The message here isn't grammatically correct, I'm not sure what it's supposed to be, but maybe something like this?
[Deprecated (PlatformName.iOS, 15, 0, message: "Use 'UIWindowScene.Windows' the desired window scene instead.")] | |
[Deprecated (PlatformName.iOS, 15, 0, message: "Use 'UIWindowScene.Windows' to get the desired window scene instead.")] |
src/uikit.cs
Outdated
@@ -3798,6 +3898,14 @@ interface UICollectionViewDelegate : UIScrollViewDelegate { | |||
[return: NullAllowed] | |||
NSIndexPath GetIndexPathForPreferredFocusedView (UICollectionView collectionView); | |||
|
|||
[NoWatch, NoTV, iOS (15,0), MacCatalyst (15,0)] | |||
[Export ("collectionView:selectionFollowsFocusForItemAtIndexPath:")] | |||
bool GetSelectionFollowsFocusForItemAtIndexPath (UICollectionView collectionView, NSIndexPath indexPath); |
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.
bool GetSelectionFollowsFocusForItemAtIndexPath (UICollectionView collectionView, NSIndexPath indexPath); | |
bool GetSelectionFollowsFocusForItem (UICollectionView collectionView, NSIndexPath indexPath); |
[Appearance] | ||
[Export ("contentEdgeInsets")] | ||
UIEdgeInsets ContentEdgeInsets {get;set;} | ||
|
||
[Deprecated (PlatformName.iOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] | ||
[Deprecated (PlatformName.TvOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] |
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's not deprecated on the watch?
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.
This type is not available on Watch
#if !WATCH
[BaseType (typeof (UIControl))]
interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting
#if IOS
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.
Then the [NoWatch] attribute on the other members added to this type is redundant.
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 members, a few lines down, are decorated [Watch (8,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.
And above there are a number of NoWatch too that are redundant. I think we could clean this up.
UILabel SubtitleLabel { get; } | ||
|
||
[Deprecated (PlatformName.iOS, 15, 0, message: "Ignored when 'Configuration' is used, override 'LayoutSubviews', call base, and set position views on your own.")] | ||
[Deprecated (PlatformName.TvOS, 15, 0, message: "Ignored when 'Configuration' is used, override 'LayoutSubviews', call base, and set position views on your own.")] |
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: not deprecated on the watch?
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.
This type is not available on Watch
#if !WATCH
[BaseType (typeof (UIControl))]
interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting
#if IOS
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.
There's am [Watch (8, 0)]
on the previous member which should be removed then, at best it's confusing.
@rolfbjarne feedback applied, thank you! |
[Appearance] | ||
[Export ("contentEdgeInsets")] | ||
UIEdgeInsets ContentEdgeInsets {get;set;} | ||
|
||
[Deprecated (PlatformName.iOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] | ||
[Deprecated (PlatformName.TvOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] |
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.
Then the [NoWatch] attribute on the other members added to this type is redundant.
UILabel SubtitleLabel { get; } | ||
|
||
[Deprecated (PlatformName.iOS, 15, 0, message: "Ignored when 'Configuration' is used, override 'LayoutSubviews', call base, and set position views on your own.")] | ||
[Deprecated (PlatformName.TvOS, 15, 0, message: "Ignored when 'Configuration' is used, override 'LayoutSubviews', call base, and set position views on your own.")] |
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.
There's am [Watch (8, 0)]
on the previous member which should be removed then, at best it's confusing.
src/uikit.cs
Outdated
|
||
[iOS (15,0), TV (15,0), Watch (8,0), MacCatalyst (15,0)] | ||
[Export ("applicationShouldAutomaticallyLocalizeKeyCommands:")] | ||
bool GetShouldAutomaticallyLocalizeKeyCommands (UIApplication application); |
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 the Get
is needed here, Should
is a verb
[Appearance] | ||
[Export ("contentEdgeInsets")] | ||
UIEdgeInsets ContentEdgeInsets {get;set;} | ||
|
||
[Deprecated (PlatformName.iOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] | ||
[Deprecated (PlatformName.TvOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] |
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 members, a few lines down, are decorated [Watch (8,0)]
src/uikit.cs
Outdated
[Appearance] | ||
[TV (15,0), iOS (15,0), MacCatalyst (15,0)] | ||
[NullAllowed, Export ("compactScrollEdgeAppearance", ArgumentSemantic.Copy)] | ||
UINavigationBarAppearance compactScrollEdgeAppearance { get; set; } |
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.
typo: compactScrollEdgeAppearance
needs a capital C
src/uikit.cs
Outdated
|
||
[TV (15,0), iOS (15,0), MacCatalyst (15,0)] | ||
[NullAllowed, Export ("compactScrollEdgeAppearance", ArgumentSemantic.Copy)] | ||
UINavigationBarAppearance compactScrollEdgeAppearance { get; set; } |
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, needs capital C
src/uikit.cs
Outdated
@@ -20822,6 +21414,11 @@ interface UIPointerRegion : NSCopying { | |||
[DisableDefaultCtor] | |||
interface UIPointerStyle : NSCopying { | |||
|
|||
// TODO: Enable with the UIPointerAccessory bindings |
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.
? forgotten or does it need a tracking issue ?
@spouliot Applied feedback! Also added |
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.Top), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.Top.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.Top.Angle, "Offset"); |
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.
minor: "Angle"
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.TopRight), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.TopRight.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.TopRight.Angle, "Offset"); |
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.
minor: "Angle"
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.Right), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.Right.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.Right.Angle, "Offset"); |
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.
minor: "Angle"
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.BottomRight), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.BottomRight.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.BottomRight.Angle, "Offset"); |
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.
minor: "Angle"
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.Bottom), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.Bottom.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.Bottom.Angle, "Offset"); |
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.
minor: "Angle"
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.BottomLeft), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.BottomLeft.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.BottomLeft.Angle, "Offset"); |
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.
minor: "Angle"
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.Left), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.Left.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.Left.Angle, "Offset"); |
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.
minor: "Angle"
Assert.DoesNotThrow (() => acc = UIPointerAccessory.CreateArrow (UIPointerAccessoryPosition.TopLeft), "Should not throw"); | ||
Assert.NotNull (acc, $"{nameof (acc)} was null"); | ||
Assert.AreEqual (acc.Position.Offset, UIPointerAccessoryPosition.TopLeft.Offset, "Offset"); | ||
Assert.AreEqual (acc.Position.Angle, UIPointerAccessoryPosition.TopLeft.Angle, "Offset"); |
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.
minor: "Angle"
❌ [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 results5 tests failed, 97 tests passed.Failed tests
Pipeline on Agent XAMBOT-1100.BigSur' |
❌ [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 results5 tests failed, 97 tests passed.Failed tests
Pipeline on Agent XAMBOT-1096.BigSur' |
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.
Needs some cleanup and tests.
@@ -150,7 +150,46 @@ public override int GetHashCode () | |||
public static UIFloatRange Infinite = new UIFloatRange (nfloat.NegativeInfinity, nfloat.PositiveInfinity); | |||
} | |||
#endif | |||
|
|||
|
|||
#if IOS |
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.
Availability is missing.
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.
mmm Availability is there too!
#if !NET
[Introduced (PlatformName.iOS, 15,0)]
#else
[SupportedOSPlatform ("ios15.0")]
#endif //!NET
Angle = angle; | ||
} | ||
|
||
#if !COREBUILD |
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.
Tests are missing for these manual code.
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.
src/uikit.cs
Outdated
@@ -7986,35 +8211,81 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting | |||
[Export ("buttonWithType:primaryAction:")] | |||
UIButton FromType (UIButtonType buttonType, [NullAllowed] UIAction primaryAction); | |||
|
|||
[TV (15,0), NoWatch, iOS (15,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.
NoWatch seems redundant since it is inside a #if !WATCH
[Appearance] | ||
[Export ("contentEdgeInsets")] | ||
UIEdgeInsets ContentEdgeInsets {get;set;} | ||
|
||
[Deprecated (PlatformName.iOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] | ||
[Deprecated (PlatformName.TvOS, 15, 0, message: "Ignored when 'UIButtonConfiguration' is used.")] |
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.
And above there are a number of NoWatch too that are redundant. I think we could clean this up.
❌ [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 results3 tests failed, 99 tests passed.Failed tests
Pipeline on Agent XAMBOT-1094.BigSur' |
Known unrelated issues. |
No description provided.