diff --git a/src/storekit.cs b/src/storekit.cs index 2c234383fa8..bd0308d34a4 100644 --- a/src/storekit.cs +++ b/src/storekit.cs @@ -9,6 +9,9 @@ // Copyright 2012 Xamarin Inc. // Copyright 2020 Microsoft Corp. // + +using System.ComponentModel; + using ObjCRuntime; using Foundation; using CoreFoundation; @@ -34,6 +37,7 @@ namespace StoreKit { + [EditorBrowsable (EditorBrowsableState.Never)] [Internal] [BaseType (typeof (NSObject))] [DisableDefaultCtor] diff --git a/tests/cecil-tests/AttributeTest.cs b/tests/cecil-tests/AttributeTest.cs index 38c197e05cd..220bdf8a676 100644 --- a/tests/cecil-tests/AttributeTest.cs +++ b/tests/cecil-tests/AttributeTest.cs @@ -181,6 +181,9 @@ public void FindSupportedOnElementsThatDoNotExistInThatAssembly () // Walk every class/struct/enum/property/method/enum value/pinvoke/event foreach (var module in assembly.Modules) { foreach (var type in module.Types) { + if (!type.IsPubliclyVisible ()) + continue; + switch (type.Namespace) { case "AppKit": case "UIKit": @@ -289,10 +292,6 @@ static HashSet IgnoreElementsThatDoNotExistInThatAssembly { // These methods have different optional/required semantics between platforms. "PassKit.PKPaymentAuthorizationControllerDelegate_Extensions.GetPresentationWindow (PassKit.IPKPaymentAuthorizationControllerDelegate, PassKit.PKPaymentAuthorizationController)", - "Metal.MTLTextureWrapper.FirstMipmapInTail", - "Metal.MTLTextureWrapper.IsSparse", - "Metal.MTLTextureWrapper.TailSizeInBytes", - // HKSeriesBuilder doesn't implement the ISNCopying protocol on all platforms (and shouldn't on any according to the headers, so removed for XAMCORE_5_0). "HealthKit.HKSeriesBuilder.EncodeTo (Foundation.NSCoder)", @@ -325,6 +324,10 @@ static HashSet IgnoreElementsThatDoNotExistInThatAssembly { "Foundation.NSAttributedString.ReadableTypeIdentifiers", "Foundation.NSAttributedString.WritableTypeIdentifiers", "Foundation.NSAttributedString.WritableTypeIdentifiersForItemProvider", + + // Same method, but different arguments due to platform differences. We should treat this as the same method, so ignore this failure. + "StoreKit.AppStore.RequestReview (XKit.XWindowScene)", // iOS, MacCatalyst + "StoreKit.AppStore.RequestReview (XKit.XViewController)", // macOS }; } } diff --git a/tests/introspection/ApiProtocolTest.cs b/tests/introspection/ApiProtocolTest.cs index 80613da909a..7fa9cc29b31 100644 --- a/tests/introspection/ApiProtocolTest.cs +++ b/tests/introspection/ApiProtocolTest.cs @@ -34,6 +34,9 @@ static bool ConformTo (IntPtr klass, IntPtr protocol) protected virtual bool Skip (Type type) { + if (MemberHasEditorBrowsableNever (type)) + return true; + switch (type.Namespace) { // Xcode 15: case "MetalFX": diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs index 4704c66635b..567ff8e224e 100644 --- a/tests/introspection/ApiSelectorTest.cs +++ b/tests/introspection/ApiSelectorTest.cs @@ -38,6 +38,9 @@ public abstract class ApiSelectorTest : ApiBaseTest { protected virtual bool Skip (Type type) { + if (MemberHasEditorBrowsableNever (type)) + return true; + if (type.ContainsGenericParameters) return true; diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-StoreKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-StoreKit.ignore new file mode 100644 index 00000000000..1295a3d5801 --- /dev/null +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-StoreKit.ignore @@ -0,0 +1,2 @@ +# This is one of our own types. +!unknown-type! XamarinSwiftFunctions bound