diff --git a/src/CoreFoundation/CFBundle.cs b/src/CoreFoundation/CFBundle.cs index ebb38da48a..b1982c34ea 100644 --- a/src/CoreFoundation/CFBundle.cs +++ b/src/CoreFoundation/CFBundle.cs @@ -3,6 +3,7 @@ // using System; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using ObjCRuntime; using CoreFoundation; @@ -603,13 +604,23 @@ namespace CoreFoundation { } } -#if MONOMAC +#if MONOMAC || __MACCATALYST__ +#if !NET [Introduced (PlatformName.MacOSX, 11, 0)] + [MacCatalyst (15,0)] +#else + [SupportedOSPlatform ("macos11.0"), SupportedOSPlatform ("maccatalyst15.0")] +#endif [DllImport (Constants.CoreFoundationLibrary)] [return: MarshalAs (UnmanagedType.I1)] extern static bool CFBundleIsExecutableLoadable (IntPtr bundle); +#if !NET [Introduced (PlatformName.MacOSX, 11, 0)] + [MacCatalyst (15,0)] +#else + [UnsupportedOSPlatform ("ios"), UnsupportedOSPlatform ("tvos"), SupportedOSPlatform ("macos11.0"), SupportedOSPlatform ("maccatalyst15.0")] +#endif public static bool IsExecutableLoadable (CFBundle bundle) { if (bundle == null) @@ -620,12 +631,22 @@ namespace CoreFoundation { return CFBundleIsExecutableLoadable (bundle.Handle); } +#if !NET [Introduced (PlatformName.MacOSX, 11, 0)] + [MacCatalyst (15,0)] +#else + [SupportedOSPlatform ("macos11.0"), SupportedOSPlatform ("maccatalyst15.0")] +#endif [DllImport (Constants.CoreFoundationLibrary)] [return: MarshalAs (UnmanagedType.I1)] extern static bool CFBundleIsExecutableLoadableForURL (IntPtr bundle); +#if !NET [Introduced (PlatformName.MacOSX, 11, 0)] + [MacCatalyst (15,0)] +#else + [UnsupportedOSPlatform ("ios"), UnsupportedOSPlatform ("tvos"), SupportedOSPlatform ("macos11.0"), SupportedOSPlatform ("maccatalyst15.0")] +#endif public static bool IsExecutableLoadable (NSUrl url) { if (url == null) @@ -634,12 +655,22 @@ namespace CoreFoundation { return CFBundleIsExecutableLoadableForURL (url.Handle); } +#if !NET [Introduced (PlatformName.MacOSX, 11, 0)] + [MacCatalyst (15,0)] +#else + [SupportedOSPlatform ("macos11.0"), SupportedOSPlatform ("maccatalyst15.0")] +#endif [DllImport (Constants.CoreFoundationLibrary)] [return: MarshalAs (UnmanagedType.I1)] extern static bool CFBundleIsArchitectureLoadable (/*cpu_type_t => integer_t => int*/ Architecture architecture); +#if !NET [Introduced (PlatformName.MacOSX, 11, 0)] + [MacCatalyst (15,0)] +#else + [UnsupportedOSPlatform ("ios"), UnsupportedOSPlatform ("tvos"), SupportedOSPlatform ("macos11.0"), SupportedOSPlatform ("maccatalyst15.0")] +#endif public static bool IsArchitectureLoadable (Architecture architecture) => CFBundleIsArchitectureLoadable (architecture); #endif diff --git a/tests/xtro-sharpie/MacCatalyst-CoreFoundation.todo b/tests/xtro-sharpie/MacCatalyst-CoreFoundation.ignore similarity index 85% rename from tests/xtro-sharpie/MacCatalyst-CoreFoundation.todo rename to tests/xtro-sharpie/MacCatalyst-CoreFoundation.ignore index f0debe3d7c..0ec5273567 100644 --- a/tests/xtro-sharpie/MacCatalyst-CoreFoundation.todo +++ b/tests/xtro-sharpie/MacCatalyst-CoreFoundation.ignore @@ -1,8 +1,7 @@ +# all of the are ignored on mac os x. !missing-field! kCFURLApplicationIsScriptableKey not bound !missing-field! kCFURLQuarantinePropertiesKey not bound !missing-field! kCFURLTagNamesKey not bound -!missing-field! kCFURLVolumeAvailableCapacityForImportantUsageKey not bound -!missing-field! kCFURLVolumeAvailableCapacityForOpportunisticUsageKey not bound !missing-field! kCFUserNotificationAlertHeaderKey not bound !missing-field! kCFUserNotificationAlertMessageKey not bound !missing-field! kCFUserNotificationAlertTopMostKey not bound @@ -20,9 +19,6 @@ !missing-field! kCFUserNotificationTextFieldTitlesKey not bound !missing-field! kCFUserNotificationTextFieldValuesKey not bound !missing-pinvoke! CFBundleCloseBundleResourceMap is not bound -!missing-pinvoke! CFBundleIsArchitectureLoadable is not bound -!missing-pinvoke! CFBundleIsExecutableLoadable is not bound -!missing-pinvoke! CFBundleIsExecutableLoadableForURL is not bound !missing-pinvoke! CFBundleOpenBundleResourceFiles is not bound !missing-pinvoke! CFBundleOpenBundleResourceMap is not bound !missing-pinvoke! CFURLCreateBookmarkDataFromAliasRecord is not bound diff --git a/tests/xtro-sharpie/common-CoreFoundation.ignore b/tests/xtro-sharpie/common-CoreFoundation.ignore index b5a977d8ef..28aa503c49 100644 --- a/tests/xtro-sharpie/common-CoreFoundation.ignore +++ b/tests/xtro-sharpie/common-CoreFoundation.ignore @@ -5,6 +5,8 @@ !missing-field! kCFURLFileProtectionKey not bound !missing-field! kCFURLFileProtectionNone not bound !missing-field! kCFURLVolumeSupportsFileProtectionKey not bound +!missing-field! kCFURLVolumeAvailableCapacityForImportantUsageKey not bound +!missing-field! kCFURLVolumeAvailableCapacityForOpportunisticUsageKey not bound @@ -980,6 +982,7 @@ !unknown-pinvoke! dispatch_write bound !unknown-pinvoke! open bound !unknown-pinvoke! write bound +!unknown-pinvoke! uname bound !missing-field! kCFStreamErrorDomainSOCKS not bound !missing-field! kCFStreamErrorDomainSSL not bound !missing-field! kCFStreamPropertyShouldCloseNativeSocket not bound diff --git a/tests/xtro-sharpie/iOS-CoreFoundation.ignore b/tests/xtro-sharpie/iOS-CoreFoundation.ignore deleted file mode 100644 index e088b37c08..0000000000 --- a/tests/xtro-sharpie/iOS-CoreFoundation.ignore +++ /dev/null @@ -1,3 +0,0 @@ -!missing-field! kCFURLVolumeAvailableCapacityForImportantUsageKey not bound -!missing-field! kCFURLVolumeAvailableCapacityForOpportunisticUsageKey not bound -!unknown-pinvoke! uname bound diff --git a/tests/xtro-sharpie/macOS-CoreFoundation.ignore b/tests/xtro-sharpie/macOS-CoreFoundation.ignore index 732af966c9..145254fc2b 100644 --- a/tests/xtro-sharpie/macOS-CoreFoundation.ignore +++ b/tests/xtro-sharpie/macOS-CoreFoundation.ignore @@ -18,8 +18,6 @@ !missing-field! kCFURLApplicationIsScriptableKey not bound !missing-field! kCFURLQuarantinePropertiesKey not bound !missing-field! kCFURLTagNamesKey not bound -!missing-field! kCFURLVolumeAvailableCapacityForImportantUsageKey not bound -!missing-field! kCFURLVolumeAvailableCapacityForOpportunisticUsageKey not bound !missing-field! kCFUserNotificationAlertHeaderKey not bound !missing-field! kCFUserNotificationAlertMessageKey not bound !missing-field! kCFUserNotificationAlternateButtonTitleKey not bound diff --git a/tests/xtro-sharpie/tvOS-CoreFoundation.ignore b/tests/xtro-sharpie/tvOS-CoreFoundation.ignore deleted file mode 100644 index 4aee78c11b..0000000000 --- a/tests/xtro-sharpie/tvOS-CoreFoundation.ignore +++ /dev/null @@ -1 +0,0 @@ -!unknown-pinvoke! uname bound