[catalyst] Remove some framework that are not available on catalyst (#10658)

Those show up with only `!unknown-*` inside extrospection tests.

There's a few more frameworks to disable but they require some changes
inside `src/generate-type-forwarders/Program.cs` and are better done in
separate pull-requests.
This commit is contained in:
Sebastien Pouliot 2021-02-21 10:04:09 -05:00 коммит произвёл GitHub
Родитель 60d002d75e
Коммит a56960b023
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
24 изменённых файлов: 49 добавлений и 156 удалений

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

@ -4,12 +4,12 @@ using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Foundation; using Foundation;
using ObjCRuntime; using ObjCRuntime;
#if IOS #if HAS_IAD
using iAd; using iAd;
#endif #endif
namespace AVKit { namespace AVKit {
#if IOS #if HAS_IAD
public partial class AVPlayerViewController { public partial class AVPlayerViewController {
// This is a [Category] -> C# extension method (see adlib.cs) but it targets on static selector // This is a [Category] -> C# extension method (see adlib.cs) but it targets on static selector

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

@ -4,13 +4,13 @@ using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Foundation; using Foundation;
using ObjCRuntime; using ObjCRuntime;
#if IOS #if HAS_IAD
using iAd; using iAd;
#endif #endif
namespace MediaPlayer { namespace MediaPlayer {
#if IOS #if HAS_IAD
public partial class MPMoviePlayerController { public partial class MPMoviePlayerController {
// This is a [Category] -> C# extension method (see adlib.cs) but it targets on static selector // This is a [Category] -> C# extension method (see adlib.cs) but it targets on static selector
// the resulting syntax does not look good in user code so we provide a better looking API // the resulting syntax does not look good in user code so we provide a better looking API

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

@ -2468,9 +2468,11 @@ namespace UIKit {
[Field ("UIWindowSceneSessionRoleExternalDisplay")] [Field ("UIWindowSceneSessionRoleExternalDisplay")]
ExternalDisplay, ExternalDisplay,
#if HAS_CARPLAY
[NoTV][NoWatch] [NoTV][NoWatch]
[Field ("CPTemplateApplicationSceneSessionRoleApplication", "CarPlay")] [Field ("CPTemplateApplicationSceneSessionRoleApplication", "CarPlay")]
CarTemplateApplication, CarTemplateApplication,
#endif
} }
[iOS (13,0), TV (13,0), NoWatch] [iOS (13,0), TV (13,0), NoWatch]

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

@ -14,7 +14,7 @@ using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Foundation; using Foundation;
#if IOS #if HAS_IAD
using iAd; using iAd;
#endif #endif
using ObjCRuntime; using ObjCRuntime;
@ -62,7 +62,7 @@ namespace UIKit {
yield return uiv; yield return uiv;
} }
#if IOS #if HAS_IAD
// This is a [Category] -> C# extension method (see adlib.cs) but it targets on static selector // This is a [Category] -> C# extension method (see adlib.cs) but it targets on static selector
// the resulting syntax does not look good in user code so we provide a better looking API // the resulting syntax does not look good in user code so we provide a better looking API
// https://trello.com/c/iQpXOxCd/227-category-and-static-methods-selectors // https://trello.com/c/iQpXOxCd/227-category-and-static-methods-selectors

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

@ -37,8 +37,10 @@ using CoreData;
using CoreFoundation; using CoreFoundation;
using Foundation; using Foundation;
using CoreGraphics; using CoreGraphics;
#if IOS #if HAS_APPCLIP
using AppClip; using AppClip;
#endif
#if IOS
using QuickLook; using QuickLook;
#endif #endif
#if !TVOS #if !TVOS
@ -5426,11 +5428,13 @@ namespace Foundation
[NullAllowed, Export ("targetContentIdentifier")] [NullAllowed, Export ("targetContentIdentifier")]
string TargetContentIdentifier { get; set; } string TargetContentIdentifier { get; set; }
#if HAS_APPCLIP
// Inlined from NSUserActivity (AppClip) // Inlined from NSUserActivity (AppClip)
[iOS (14,0)][NoTV][NoMac][NoWatch] [iOS (14,0)][NoTV][NoMac][NoWatch]
[Export ("appClipActivationPayload", ArgumentSemantic.Strong)] [Export ("appClipActivationPayload", ArgumentSemantic.Strong)]
[NullAllowed] [NullAllowed]
APActivationPayload AppClipActivationPayload { get; } APActivationPayload AppClipActivationPayload { get; }
#endif
} }
[iOS (8,0)][Mac (10,10)] // same as NSUserActivity [iOS (8,0)][Mac (10,10)] // same as NSUserActivity

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

@ -2184,10 +2184,8 @@ MACCATALYST_FRAMEWORKS = \
AdSupport \ AdSupport \
AddressBook \ AddressBook \
AddressBookUI \ AddressBookUI \
AppClip \
AppTrackingTransparency \ AppTrackingTransparency \
ARKit \ ARKit \
AssetsLibrary \
AudioToolbox \ AudioToolbox \
AudioUnit \ AudioUnit \
AutomaticAssessmentConfiguration \ AutomaticAssessmentConfiguration \
@ -2210,20 +2208,16 @@ MACCATALYST_FRAMEWORKS = \
CoreMotion \ CoreMotion \
CoreNFC \ CoreNFC \
CoreSpotlight \ CoreSpotlight \
CoreTelephony \
CoreText \ CoreText \
DeviceCheck \ DeviceCheck \
EventKit \ EventKit \
EventKitUI \
ExternalAccessory \ ExternalAccessory \
FileProvider \ FileProvider \
GameController \ GameController \
GameplayKit \ GameplayKit \
HealthKit \ HealthKit \
HealthKitUI \
HomeKit \ HomeKit \
IdentityLookup \ IdentityLookup \
IdentityLookupUI \
ImageIO \ ImageIO \
Intents \ Intents \
IntentsUI \ IntentsUI \
@ -2236,7 +2230,6 @@ MACCATALYST_FRAMEWORKS = \
MediaPlayer \ MediaPlayer \
MediaToolbox \ MediaToolbox \
Messages \ Messages \
MessageUI \
Metal \ Metal \
MetalKit \ MetalKit \
MetalPerformanceShaders \ MetalPerformanceShaders \
@ -2270,9 +2263,7 @@ MACCATALYST_FRAMEWORKS = \
VideoSubscriberAccount \ VideoSubscriberAccount \
Vision \ Vision \
VisionKit \ VisionKit \
WatchConnectivity \
WKWebKit \ WKWebKit \
iAd \
# #
# Compute the SOURCES variables. # Compute the SOURCES variables.

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

@ -7,7 +7,7 @@
// Copyright 2014 Xamarin Inc. All rights reserved. // Copyright 2014 Xamarin Inc. All rights reserved.
// //
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_IAD
using System; using System;
using AVKit; using AVKit;
@ -33,4 +33,4 @@ namespace MonoTouchFixtures.AVKit {
} }
} }
#endif // !__TVOS__ && !__WATCHOS__ #endif // HAS_IAD

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

@ -7,7 +7,7 @@
// Copyright 2017 Xamarin Inc. All rights reserved. // Copyright 2017 Xamarin Inc. All rights reserved.
// //
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_EVENTKITUI
using System; using System;
using EventKitUI; using EventKitUI;
@ -31,4 +31,4 @@ namespace MonoTouchFixtures.EventKitUI {
} }
} }
} }
#endif #endif // HAS_EVENTKITUI

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

@ -7,7 +7,7 @@
// Copyright 2014 Xamarin Inc. All rights reserved. // Copyright 2014 Xamarin Inc. All rights reserved.
// //
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_IAD
using System; using System;
using Foundation; using Foundation;
@ -37,4 +37,4 @@ namespace MonoTouchFixtures.MediaPlayer {
} }
} }
#endif // !__TVOS__ && !__WATCHOS__ #endif // HAS_IAD

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

@ -7,7 +7,7 @@
// Copyright 2012 Xamarin Inc. All rights reserved. // Copyright 2012 Xamarin Inc. All rights reserved.
// //
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_MESSAGEUI
using System; using System;
using System.Drawing; using System.Drawing;
@ -57,4 +57,4 @@ namespace MonoTouchFixtures.MessageUI {
} }
} }
#endif // !__TVOS__ && !__WATCHOS__ #endif // HAS_MESSAGEUI

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

@ -7,7 +7,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved. // Copyright 2016 Xamarin Inc. All rights reserved.
// //
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_MESSAGE
using System; using System;
using System.Drawing; using System.Drawing;
@ -38,5 +38,5 @@ namespace MonoTouchFixtures.MessageUI {
} }
} }
#endif // !__TVOS__ && !__WATCHOS__ #endif // HAS_MESSAGE

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

@ -7,7 +7,7 @@
// Copyright 2013 Xamarin Inc. All rights reserved. // Copyright 2013 Xamarin Inc. All rights reserved.
// //
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_PHOTOS && !__TVOS__
using System; using System;
using System.Linq; using System.Linq;
@ -16,7 +16,9 @@ using UIKit;
using ObjCRuntime; using ObjCRuntime;
using Photos; using Photos;
using CoreGraphics; using CoreGraphics;
#if HAS_ASSETSLIBRARY
using AssetsLibrary; using AssetsLibrary;
#endif
using NUnit.Framework; using NUnit.Framework;
namespace MonoTouchFixtures.Photos { namespace MonoTouchFixtures.Photos {
@ -25,14 +27,25 @@ namespace MonoTouchFixtures.Photos {
[Preserve (AllMembers = true)] [Preserve (AllMembers = true)]
public class FetchResultTest { public class FetchResultTest {
[SetUp]
public void Setup ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
#if HAS_ASSETSLIBRARY
if (ALAssetsLibrary.AuthorizationStatus != ALAuthorizationStatus.Authorized)
Assert.Inconclusive ("Requires access to the photo library");
#elif __MACCATALYST__
TestRuntime.AssertSystemVersion (PlatformName.MacCatalyst, 14, 0, throwIfOtherPlatform: false);
if (PHPhotoLibrary.GetAuthorizationStatus (PHAccessLevel.ReadWrite) != PHAuthorizationStatus.Authorized)
Assert.Inconclusive ("Requires access to the photo library");
#else
#error Add authorization check for the platform
#endif
}
[Test] [Test]
public void FetchResultToArray () public void FetchResultToArray ()
{ {
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
if (ALAssetsLibrary.AuthorizationStatus != ALAuthorizationStatus.Authorized)
Assert.Inconclusive ("Requires access to the photo library");
var collection = PHAsset.FetchAssets (PHAssetMediaType.Image, null); var collection = PHAsset.FetchAssets (PHAssetMediaType.Image, null);
if (collection.Count == 0) { if (collection.Count == 0) {
XamagramImage.Image.SaveToPhotosAlbum (null); XamagramImage.Image.SaveToPhotosAlbum (null);
@ -47,11 +60,6 @@ namespace MonoTouchFixtures.Photos {
[Test] [Test]
public void FetchResultIndex () public void FetchResultIndex ()
{ {
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
if (ALAssetsLibrary.AuthorizationStatus != ALAuthorizationStatus.Authorized)
Assert.Inconclusive ("Requires access to the photo library");
var collection = PHAsset.FetchAssets (PHAssetMediaType.Image, null); var collection = PHAsset.FetchAssets (PHAssetMediaType.Image, null);
if (collection.Count == 0) { if (collection.Count == 0) {
XamagramImage.Image.SaveToPhotosAlbum (null); XamagramImage.Image.SaveToPhotosAlbum (null);
@ -66,11 +74,6 @@ namespace MonoTouchFixtures.Photos {
[Test] [Test]
public void FetchResultObjectsAt () public void FetchResultObjectsAt ()
{ {
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
if (ALAssetsLibrary.AuthorizationStatus != ALAuthorizationStatus.Authorized)
Assert.Inconclusive ("Requires access to the photo library");
var collection = PHAsset.FetchAssets (PHAssetMediaType.Image, null); var collection = PHAsset.FetchAssets (PHAssetMediaType.Image, null);
if (collection.Count == 0) { if (collection.Count == 0) {
XamagramImage.Image.SaveToPhotosAlbum (null); XamagramImage.Image.SaveToPhotosAlbum (null);
@ -137,4 +140,4 @@ namespace MonoTouchFixtures.Photos {
} }
} }
#endif // !__TVOS__ && !__WATCHOS__ #endif // HAS_PHOTOS && !__TVOS__

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

@ -14,7 +14,7 @@ using System.Reflection;
using Foundation; using Foundation;
using UIKit; using UIKit;
using ObjCRuntime; using ObjCRuntime;
#if !__TVOS__ #if HAS_IAD
using iAd; using iAd;
#endif #endif
using NUnit.Framework; using NUnit.Framework;
@ -172,7 +172,7 @@ namespace MonoTouchFixtures.UIKit {
} }
} }
#if !__TVOS__ #if HAS_IAD
[Test] [Test]
public void InterstitialAds_New () public void InterstitialAds_New ()
{ {
@ -180,7 +180,7 @@ namespace MonoTouchFixtures.UIKit {
UIViewController.PrepareForInterstitialAds (); UIViewController.PrepareForInterstitialAds ();
} }
#endif // !__TVOS__ #endif // HAS_IAD
} }
} }

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

@ -1,13 +1,11 @@
// Copyright 2011 Xamarin Inc. All rights reserved // Copyright 2011 Xamarin Inc. All rights reserved
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_IAD
using System; using System;
using CoreGraphics; using CoreGraphics;
using Foundation; using Foundation;
#if !__WATCHOS__
using iAd; using iAd;
#endif
using NUnit.Framework; using NUnit.Framework;
namespace MonoTouchFixtures.iAd { namespace MonoTouchFixtures.iAd {
@ -37,4 +35,4 @@ namespace MonoTouchFixtures.iAd {
} }
} }
#endif // !__TVOS__ && !__WATCHOS__ #endif // HAS_IAD

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

@ -7,7 +7,7 @@
// Copyright 2013 Xamarin Inc. All rights reserved. // Copyright 2013 Xamarin Inc. All rights reserved.
// //
#if !__TVOS__ && !__WATCHOS__ && !MONOMAC #if HAS_IAD
using System; using System;

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

@ -1,3 +0,0 @@
!unknown-field! APActivationPayloadErrorDomain bound
!unknown-native-enum! APActivationPayloadErrorCode bound
!unknown-type! APActivationPayload bound

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

@ -1,29 +0,0 @@
!unknown-field! ALAssetLibraryDeletedAssetGroupsKey bound
!unknown-field! ALAssetLibraryInsertedAssetGroupsKey bound
!unknown-field! ALAssetLibraryUpdatedAssetGroupsKey bound
!unknown-field! ALAssetLibraryUpdatedAssetsKey bound
!unknown-field! ALAssetPropertyAssetURL bound
!unknown-field! ALAssetPropertyDate bound
!unknown-field! ALAssetPropertyDuration bound
!unknown-field! ALAssetPropertyLocation bound
!unknown-field! ALAssetPropertyOrientation bound
!unknown-field! ALAssetPropertyRepresentations bound
!unknown-field! ALAssetPropertyType bound
!unknown-field! ALAssetPropertyURLs bound
!unknown-field! ALAssetsGroupPropertyName bound
!unknown-field! ALAssetsGroupPropertyPersistentID bound
!unknown-field! ALAssetsGroupPropertyType bound
!unknown-field! ALAssetsGroupPropertyURL bound
!unknown-field! ALAssetsLibraryChangedNotification bound
!unknown-field! ALAssetsLibraryErrorDomain bound
!unknown-field! ALAssetTypePhoto bound
!unknown-field! ALAssetTypeUnknown bound
!unknown-field! ALAssetTypeVideo bound
!unknown-native-enum! ALAssetOrientation bound
!unknown-native-enum! ALAssetsGroupType bound
!unknown-native-enum! ALAuthorizationStatus bound
!unknown-type! ALAsset bound
!unknown-type! ALAssetRepresentation bound
!unknown-type! ALAssetsFilter bound
!unknown-type! ALAssetsGroup bound
!unknown-type! ALAssetsLibrary bound

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

@ -1,27 +0,0 @@
!unknown-field! CTRadioAccessTechnologyCDMA1x bound
!unknown-field! CTRadioAccessTechnologyCDMAEVDORev0 bound
!unknown-field! CTRadioAccessTechnologyCDMAEVDORevA bound
!unknown-field! CTRadioAccessTechnologyCDMAEVDORevB bound
!unknown-field! CTRadioAccessTechnologyEdge bound
!unknown-field! CTRadioAccessTechnologyeHRPD bound
!unknown-field! CTRadioAccessTechnologyGPRS bound
!unknown-field! CTRadioAccessTechnologyHSDPA bound
!unknown-field! CTRadioAccessTechnologyHSUPA bound
!unknown-field! CTRadioAccessTechnologyLTE bound
!unknown-field! CTRadioAccessTechnologyNR bound
!unknown-field! CTRadioAccessTechnologyNRNSA bound
!unknown-field! CTRadioAccessTechnologyWCDMA bound
!unknown-field! CTServiceRadioAccessTechnologyDidChangeNotification bound
!unknown-native-enum! CTCellularDataRestrictedState bound
!unknown-native-enum! CTCellularPlanProvisioningAddPlanResult bound
!unknown-protocol! CTSubscriberDelegate bound
!unknown-protocol! CTTelephonyNetworkInfoDelegate bound
!unknown-type! CTCall bound
!unknown-type! CTCallCenter bound
!unknown-type! CTCarrier bound
!unknown-type! CTCellularData bound
!unknown-type! CTCellularPlanProvisioning bound
!unknown-type! CTCellularPlanProvisioningRequest bound
!unknown-type! CTSubscriber bound
!unknown-type! CTSubscriberInfo bound
!unknown-type! CTTelephonyNetworkInfo bound

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

@ -1,11 +0,0 @@
!unknown-native-enum! EKCalendarChooserDisplayStyle bound
!unknown-native-enum! EKCalendarChooserSelectionStyle bound
!unknown-native-enum! EKEventEditViewAction bound
!unknown-native-enum! EKEventViewAction bound
!unknown-pinvoke! EventKitUIBundle bound
!unknown-protocol! EKCalendarChooserDelegate bound
!unknown-protocol! EKEventEditViewDelegate bound
!unknown-protocol! EKEventViewDelegate bound
!unknown-type! EKCalendarChooser bound
!unknown-type! EKEventEditViewController bound
!unknown-type! EKEventViewController bound

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

@ -1 +0,0 @@
!unknown-type! HKActivityRingView bound

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

@ -1,2 +0,0 @@
!unknown-type! ILClassificationUIExtensionContext bound
!unknown-type! ILClassificationUIExtensionViewController bound

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

@ -1,9 +0,0 @@
!unknown-field! MFMailComposeErrorDomain bound
!unknown-field! MFMessageComposeViewControllerAttachmentAlternateFilename bound
!unknown-field! MFMessageComposeViewControllerAttachmentURL bound
!unknown-field! MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification bound
!unknown-field! MFMessageComposeViewControllerTextMessageAvailabilityKey bound
!unknown-protocol! MFMailComposeViewControllerDelegate bound
!unknown-protocol! MFMessageComposeViewControllerDelegate bound
!unknown-type! MFMailComposeViewController bound
!unknown-type! MFMessageComposeViewController bound

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

@ -1,8 +0,0 @@
!unknown-field! WCErrorDomain bound
!unknown-native-enum! WCErrorCode bound
!unknown-native-enum! WCSessionActivationState bound
!unknown-protocol! WCSessionDelegate bound
!unknown-type! WCSession bound
!unknown-type! WCSessionFile bound
!unknown-type! WCSessionFileTransfer bound
!unknown-type! WCSessionUserInfoTransfer bound

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

@ -1,15 +0,0 @@
!unknown-field! ADBannerContentSizeIdentifierLandscape bound
!unknown-field! ADBannerContentSizeIdentifierPortrait bound
!unknown-field! ADClientErrorDomain bound
!unknown-field! ADErrorDomain bound
!unknown-native-enum! ADAdType bound
!unknown-native-enum! ADClientError bound
!unknown-native-enum! ADError bound
!unknown-native-enum! ADInterstitialPresentationPolicy bound
!unknown-pinvoke! ADClampedBannerSize bound
!unknown-protocol! ADBannerViewDelegate bound
!unknown-protocol! ADInterstitialAdDelegate bound
!unknown-type! ADBannerView bound
!unknown-type! ADClient bound
!unknown-type! ADInterstitialAd bound
!unknown-type! ADInterstitialAdPresentationViewController bound