[catalyst] Remove extraneous API detected by xtro (#10872)

This fixes almost [1] all `extra` API detected from the extrospection
(header-based) tests for MacCatalyst. This is needed to complete the
introspection fixes (without having _too large PR).

[1] except `!extra-null-allowed!` since those are still in progress for
all platforms
This commit is contained in:
Sebastien Pouliot 2021-03-16 16:04:01 -04:00 коммит произвёл GitHub
Родитель 13e458ebff
Коммит 584b45a25e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
18 изменённых файлов: 39 добавлений и 65 удалений

Просмотреть файл

@ -200,7 +200,7 @@ namespace Foundation {
[Native]
public enum NSDateFormatterBehavior : ulong {
Default = 0,
[NoiOS][NoTV][NoWatch]
[NoiOS][NoTV][NoWatch][NoMacCatalyst]
Mode_10_0 = 1000,
Mode_10_4 = 1040,
}
@ -659,11 +659,11 @@ namespace Foundation {
public enum NSStringDrawingOptions : ulong {
UsesLineFragmentOrigin = (1 << 0),
UsesFontLeading = (1 << 1),
[NoiOS][NoTV][NoWatch]
[NoiOS][NoTV][NoWatch][NoMacCatalyst]
[Deprecated (PlatformName.MacOSX, 10,11)]
DisableScreenFontSubstitution = (1 << 2),
UsesDeviceMetrics = (1 << 3),
[NoiOS][NoTV][NoWatch]
[NoiOS][NoTV][NoWatch][NoMacCatalyst]
[Deprecated (PlatformName.MacOSX, 10,11)]
OneShot = (1 << 4),
TruncatesLastVisibleLine = (1 << 5)
@ -690,7 +690,7 @@ namespace Foundation {
[Native]
public enum NSNumberFormatterBehavior : ulong {
Default = 0,
[NoiOS][NoTV][NoWatch]
[NoiOS][NoTV][NoWatch][NoMacCatalyst]
Version_10_0 = 1000,
Version_10_4 = 1040
}

Просмотреть файл

@ -321,12 +321,14 @@ namespace CoreBluetooth {
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_8_4)] // Available in iOS 5.0 through iOS 8.4. Deprecated in iOS 7.0.
[NoMacCatalyst]
[Export ("centralManager:didRetrievePeripherals:"), EventArgs ("CBPeripherals")]
void RetrievedPeripherals (CBCentralManager central, CBPeripheral [] peripherals);
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_8_4)] // Available in iOS 5.0 through iOS 8.4. Deprecated in iOS 7.0.
[NoMacCatalyst]
[Export ("centralManager:didRetrieveConnectedPeripherals:"), EventArgs ("CBPeripherals")]
void RetrievedConnectedPeripherals (CBCentralManager central, CBPeripheral [] peripherals);
@ -611,6 +613,7 @@ namespace CoreBluetooth {
[NoTV]
[NoWatch]
[Availability (Deprecated = Platform.iOS_7_0, Obsoleted = Platform.iOS_8_4)]
[NoMacCatalyst]
[Export ("peripheralDidInvalidateServices:")]
void InvalidatedService (CBPeripheral peripheral);

Просмотреть файл

@ -3034,6 +3034,7 @@ namespace SceneKit {
#else
[Obsoleted (PlatformName.WatchOS, 6, 0, message: "API removed, please do not use.")]
#endif
[NoMacCatalyst]
[Export ("context")]
IntPtr Context { get; }

Просмотреть файл

@ -1498,6 +1498,7 @@ namespace UIKit {
[Export ("accessibilityPerformEscape")]
bool AccessibilityPerformEscape ();
[NoMacCatalyst]
[Export ("accessibilityPerformMagicTap")]
bool AccessibilityPerformMagicTap ();
@ -3362,6 +3363,7 @@ namespace UIKit {
// appropriate to implement the accessibilityPerformMagicTap method in your app delegate."
// ref: http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/Accessibility/AccessibilityfromtheViewControllersPerspective.html
[NoTV]
[NoMacCatalyst]
[Export ("accessibilityPerformMagicTap")]
bool AccessibilityPerformMagicTap ();

Просмотреть файл

@ -19,7 +19,7 @@ namespace MonoTouchFixtures {
static UIWindow window;
TouchRunner runner;
#if !__TVOS__
#if __IOS__ && !__MACCATALYST__
public override bool AccessibilityPerformMagicTap ()
{
try {

Просмотреть файл

@ -0,0 +1,4 @@
## extra error values are fine and helps sharing code across platforms
!extra-enum-value! Managed value -1100 for AVKitError.ContentRatingUnknown not found in native headers
!extra-enum-value! Managed value -1101 for AVKitError.ContentDisallowedByPasscode not found in native headers
!extra-enum-value! Managed value -1102 for AVKitError.ContentDisallowedByProfile not found in native headers

Просмотреть файл

@ -1,6 +1,3 @@
!extra-enum-value! Managed value -1100 for AVKitError.ContentRatingUnknown not found in native headers
!extra-enum-value! Managed value -1101 for AVKitError.ContentDisallowedByPasscode not found in native headers
!extra-enum-value! Managed value -1102 for AVKitError.ContentDisallowedByProfile not found in native headers
!missing-enum! AVRoutePickerViewButtonStyle not bound
!missing-selector! AVPictureInPictureController::canStopPictureInPicture not bound
!missing-selector! AVRoutePickerView::routePickerButtonStyle not bound

Просмотреть файл

@ -0,0 +1,2 @@
## keep requirement since it will create code that is safer for cross-platform usage
!extra-requires-super! NSObject::awakeFromNib is incorrectly decorated with an [RequiresSuper] attribute

Просмотреть файл

@ -1,4 +1,3 @@
!extra-requires-super! NSObject::awakeFromNib is incorrectly decorated with an [RequiresSuper] attribute
!missing-enum! NSAccessibilityAnnotationPosition not bound
!missing-enum! NSAccessibilityCustomRotorSearchDirection not bound
!missing-enum! NSAccessibilityCustomRotorType not bound

Просмотреть файл

@ -1,3 +0,0 @@
!extra-protocol-member! unexpected selector CBCentralManagerDelegate::centralManager:didRetrieveConnectedPeripherals: found
!extra-protocol-member! unexpected selector CBCentralManagerDelegate::centralManager:didRetrievePeripherals: found
!extra-protocol-member! unexpected selector CBPeripheralDelegate::peripheralDidInvalidateServices: found

Просмотреть файл

@ -1 +0,0 @@
!extra-designated-initializer! EAWiFiUnconfiguredAccessoryBrowser::initWithDelegate:queue: is incorrectly decorated with an [DesignatedInitializer] attribute

Просмотреть файл

@ -1,5 +1,3 @@
!extra-enum-value! Managed value 1000 for NSDateFormatterBehavior.Mode_10_0 not found in native headers
!extra-enum-value! Managed value 1000 for NSNumberFormatterBehavior.Version_10_0 not found in native headers
!missing-enum! NSFileManagerUnmountOptions not bound
!missing-enum! NSRectEdge not bound
!missing-enum! NSURLHandleStatus not bound

Просмотреть файл

@ -1,4 +1,3 @@
!extra-protocol-member! unexpected selector SCNSceneRenderer::context found
!missing-enum-value! SCNAntialiasingMode native value SCNAntialiasingModeMultisampling16X = 4 not bound
!missing-enum-value! SCNAntialiasingMode native value SCNAntialiasingModeMultisampling8X = 3 not bound
!missing-protocol-member! SCNProgramDelegate::programIsOpaque: not found

Просмотреть файл

@ -1,5 +1,3 @@
!extra-enum-value! Managed value 16 for NSStringDrawingOptions.OneShot not found in native headers
!extra-enum-value! Managed value 4 for NSStringDrawingOptions.DisableScreenFontSubstitution not found in native headers
!extra-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewDataSource::GetIndexPath(UIKit.UICollectionView,System.String,System.nint)' has a extraneous [NullAllowed] on return type
!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #1
!extra-null-allowed! 'System.Boolean UIKit.NSLayoutManagerDelegate::ShouldSetLineFragmentRect(UIKit.NSLayoutManager,CoreGraphics.CGRect&,CoreGraphics.CGRect&,System.nfloat&,UIKit.NSTextContainer,Foundation.NSRange)' has a extraneous [NullAllowed] on parameter #2
@ -44,25 +42,6 @@
!extra-null-allowed! 'System.Void UIKit.UIView::set_MotionEffects(UIKit.UIMotionEffect[])' has a extraneous [NullAllowed] on parameter #0
!extra-null-allowed! 'UIKit.IUITextDocumentProxy UIKit.UIInputViewController::get_TextDocumentProxy()' has a extraneous [NullAllowed] on return type
!extra-null-allowed! 'UIKit.UIView UIKit.UIScreen::SnapshotView(System.Boolean)' has a extraneous [NullAllowed] on return type
!extra-protocol-member! unexpected selector UIApplicationDelegate::accessibilityPerformMagicTap found
!extra-ui-appearance-support! System.Void UIKit.UIBarItem::SetTitleTextAttributes(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UINavigationBar::SetTitleTextAttributes(UIKit.UITextAttributes) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISearchBar::SetScopeBarButtonTitle(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISegmentedControl::SetTitleTextAttributes(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::set_MaxValueImage(UIKit.UIImage) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::set_MinValueImage(UIKit.UIImage) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetMaxTrackImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetMinTrackImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetThumbImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::get_MaxValueImage() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::get_MinValueImage() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::MaxTrackImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::MinTrackImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::ThumbImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UIBarItem::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UISearchBar::GetScopeBarButtonTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UISegmentedControl::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UITextAttributes UIKit.UINavigationBar::GetTitleTextAttributes() should NOT be decorated with [Appearance]
!incorrect-protocol-member! UIDocumentMenuDelegate::documentMenuWasCancelled: is OPTIONAL and should NOT be abstract
!incorrect-protocol-member! UIDocumentPickerDelegate::documentPicker:didPickDocumentAtURL: is OPTIONAL and should NOT be abstract
!incorrect-protocol-member! UIFocusEnvironment::focusItemContainer is REQUIRED and should be abstract

Просмотреть файл

@ -191,6 +191,28 @@
!extra-ui-appearance-support! UIKit.UIImage UIKit.UIButton::ImageForState(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UIView::set_TintColor(UIKit.UIColor) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIColor UIKit.UIView::get_TintColor() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UIBarItem::SetTitleTextAttributes(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UINavigationBar::SetTitleTextAttributes(UIKit.UITextAttributes) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISearchBar::SetScopeBarButtonTitle(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISegmentedControl::SetTitleTextAttributes(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::set_MaxValueImage(UIKit.UIImage) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::set_MinValueImage(UIKit.UIImage) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetMaxTrackImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetMinTrackImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetThumbImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::get_MaxValueImage() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::get_MinValueImage() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::MaxTrackImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::MinTrackImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::ThumbImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UIBarItem::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UISearchBar::GetScopeBarButtonTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UISegmentedControl::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UITextAttributes UIKit.UINavigationBar::GetTitleTextAttributes() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UIBarItem::SetTitleTextAttributes(UIKit.UITextAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISegmentedControl::SetTitleTextAttributes(UIKit.UITextAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UITextAttributes UIKit.UIBarItem::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UITextAttributes UIKit.UISegmentedControl::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
## manually bound (better, stronger signature) on `[setS|s]copeBarButtonTitleTextAttributes:forState:` which is decorated with `UI_APPEARANCE_SELECTOR`
!extra-ui-appearance-support! System.Void UIKit.UISearchBar::SetScopeBarButtonTitle(UIKit.UITextAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]

Просмотреть файл

@ -509,23 +509,3 @@
## These are inlined by protocol adoption so you can't really add such decoration
!missing-requires-super! UIControl::contextMenuInteraction:willDisplayMenuForConfiguration:animator: is missing an [RequiresSuper] attribute
!missing-requires-super! UIControl::contextMenuInteraction:willEndForConfiguration:animator: is missing an [RequiresSuper] attribute
## manually bound (better, stronger signature) on `[setT|t]itleTextAttributes:forState:` which is decorated with `UI_APPEARANCE_SELECTOR`
!extra-ui-appearance-support! UIKit.UITextAttributes UIKit.UIBarItem::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UIBarItem::SetTitleTextAttributes(UIKit.UITextAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UITextAttributes UIKit.UINavigationBar::GetTitleTextAttributes() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UINavigationBar::SetTitleTextAttributes(UIKit.UITextAttributes) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UITextAttributes UIKit.UISegmentedControl::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISegmentedControl::SetTitleTextAttributes(UIKit.UITextAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
## there's no UI_APPEARANCE_SELECTOR in headers - but they can (unofficially) work, YYMV
!extra-ui-appearance-support! System.Void UIKit.UISlider::set_MaxValueImage(UIKit.UIImage) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::set_MinValueImage(UIKit.UIImage) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::get_MaxValueImage() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::get_MinValueImage() should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetMaxTrackImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetMinTrackImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISlider::SetThumbImage(UIKit.UIImage,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::MaxTrackImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::MinTrackImage(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIImage UIKit.UISlider::ThumbImage(UIKit.UIControlState) should NOT be decorated with [Appearance]

Просмотреть файл

@ -405,11 +405,3 @@
!missing-enum-value! UICollectionLayoutListAppearance native value UICollectionLayoutListAppearanceInsetGrouped = 2 not bound
!missing-enum-value! UICollectionLayoutListAppearance native value UICollectionLayoutListAppearanceSidebar = 3 not bound
!missing-enum-value! UICollectionLayoutListAppearance native value UICollectionLayoutListAppearanceSidebarPlain = 4 not bound
## same as iOS but we used the newer name if `UIStringAttributes` so it requires a different entry
!extra-ui-appearance-support! System.Void UIKit.UIBarItem::SetTitleTextAttributes(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISearchBar::SetScopeBarButtonTitle(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! System.Void UIKit.UISegmentedControl::SetTitleTextAttributes(UIKit.UIStringAttributes,UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UIBarItem::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UISearchBar::GetScopeBarButtonTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]
!extra-ui-appearance-support! UIKit.UIStringAttributes UIKit.UISegmentedControl::GetTitleTextAttributes(UIKit.UIControlState) should NOT be decorated with [Appearance]