diff --git a/.editorconfig b/.editorconfig index bb07c60e0b77..def608da89c3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,8 @@ +# EditorConfig is awesome: https://editorconfig.org + +# top-most EditorConfig file +root = true + [*.{props,targets}] indent_style = tab indent_size = 4 diff --git a/.gitmodules b/.gitmodules index bd127fc70c8b..57191e1e749f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,5 @@ -[submodule "external/Touch.Unit"] - path = external/Touch.Unit - url = ../../xamarin/Touch.Unit.git - branch = main [submodule "external/Xamarin.MacDev"] path = external/Xamarin.MacDev url = ../../xamarin/Xamarin.MacDev branch = main -[submodule "external/MonoTouch.Dialog"] - path = external/MonoTouch.Dialog - url = ../../xamarin/MonoTouch.Dialog - branch = dotnet + diff --git a/CODEOWNERS b/CODEOWNERS index 4370212a3e0f..7cf1f9d5cc95 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -95,7 +95,6 @@ /src/HomeKit /src/homekit.cs /src/iad.cs -/src/iAd.framework /src/identitylookup.cs @dalexsoto /src/identitylookupui.cs @dalexsoto /src/ituneslibrary.cs @mandel-macaque @@ -184,8 +183,6 @@ /src/vision.cs @dalexsoto /src/WatchConnectivity @rolfbjarne /src/watchconnectivity.cs @rolfbjarne -/src/WatchKit @rolfbjarne -/src/watchkit.cs @rolfbjarne /src/WebKit /src/webkit.cs diff --git a/Directory.Build.props b/Directory.Build.props index cac120f8d9d2..345afdc19754 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,6 +8,7 @@ $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) $(MicrosoftBuildPackageVersion) + 3.1.15 diff --git a/Make.config b/Make.config index 9f97b75ab0de..de0e4007d4f8 100644 --- a/Make.config +++ b/Make.config @@ -44,10 +44,10 @@ include $(TOP)/Make.versions # The value is taken from the name + version of the Ref pack. # Example: given the Ref pack "Microsoft.iOS.Ref.net8.0_17.5" with the version "17.5.8030", the value # to write here would be the part after "Microsoft.iOS.Ref." + "/" + version: "net8.0_17.5/17.5.8030" -STABLE_NUGET_VERSION_iOS=net9.0_18.0/18.0.9617 -STABLE_NUGET_VERSION_tvOS=net9.0_18.0/18.0.9617 -STABLE_NUGET_VERSION_MacCatalyst=net9.0_18.0/18.0.9617 -STABLE_NUGET_VERSION_macOS=net9.0_15.0/15.0.9617 +STABLE_NUGET_VERSION_iOS=net9.0_18.2/18.2.9170 +STABLE_NUGET_VERSION_tvOS=net9.0_18.2/18.2.9170 +STABLE_NUGET_VERSION_MacCatalyst=net9.0_18.2/18.2.9170 +STABLE_NUGET_VERSION_macOS=net9.0_15.2/15.2.9170 PACKAGE_HEAD_REV=$(shell git rev-parse HEAD) @@ -169,15 +169,6 @@ endif NUGET_BUILD_METADATA= -IOS_PRODUCT=Xamarin.iOS -IOS_PACKAGE_NAME=Xamarin.iOS -IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]") -IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION))) -IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION))) -IOS_PACKAGE_VERSION_REV:=$(word 3, $(subst ., ,$(IOS_PACKAGE_VERSION))) -IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE) -IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD)) - IOS_NUGET=Microsoft.iOS IOS_NUGET_VERSION=$(IOS_NUGET_OS_VERSION).$(IOS_NUGET_COMMIT_DISTANCE) IOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_NUGET_VERSION))) @@ -312,12 +303,11 @@ RANLIB=$(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranli # paths to the modules we depend on, as variables, so people can put # things in other places if they absolutely must. MONO_PATH=$(TOP)/external/mono -TOUCH_UNIT_PATH=$(TOP)/external/Touch.Unit XAMARIN_MACDEV_PATH=$(TOP)/external/Xamarin.MacDev MONOTOUCH_DIALOG_PATH=$(TOP)/external/MonoTouch.Dialog API_TOOLS_PATH=$(TOP)/external/api-tools MACCORE_PATH=$(TOP)/../maccore -ADR_PATH=$(TOP)/../macios-adr +ADR_PATH:=$(abspath $(TOP)/../macios-adr) MONO_PREFIX ?= /Library/Frameworks/Mono.framework/Versions/Current SYSTEM_MONO=$(MONO_PREFIX)/bin/mono @@ -325,18 +315,6 @@ SYSTEM_MSBUILD=unset MSBuildExtensionsPath && $(MONO_PREFIX)/bin/msbuild /p:Feat PKG_CONFIG=$(MONO_PREFIX)/bin/pkg-config -MAC_PRODUCT=Xamarin.Mac -MAC_PACKAGE_NAME=xamarin.mac -MAC_PACKAGE_NAME_LOWER=$(shell echo $(MAC_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]") - -MAC_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(MAC_PACKAGE_VERSION))) -MAC_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(MAC_PACKAGE_VERSION))) -MAC_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(MAC_PACKAGE_VERSION))) -MAC_PACKAGE_VERSION_BUILD=$(word 4, $(subst ., ,$(MAC_PACKAGE_VERSION))) -MAC_PACKAGE_VERSION_MAJOR_MINOR=$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR) -MAC_PACKAGE_UPDATE_ID=$(shell echo $(subst ., ,$(MAC_PACKAGE_VERSION).$(MAC_PACKAGE_VERSION_BUILD)) | awk '{printf "2%02d%02d%02d%03d",$$1,$$2,$$3,$$4}') -MAC_PACKAGE_TITLE=Xamarin $(MAC_PACKAGE_NAME) $(MAC_PACKAGE_VERSION) - MACOS_NUGET=Microsoft.macOS MACOS_NUGET_VERSION=$(MACOS_NUGET_OS_VERSION).$(MACOS_NUGET_COMMIT_DISTANCE) MACOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(MACOS_NUGET_VERSION))) @@ -345,11 +323,6 @@ MACOS_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(MACOS_NUGET_VERSION))) MACOS_NUGET_VERSION_NO_METADATA=$(MACOS_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER) MACOS_NUGET_VERSION_FULL=$(MACOS_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA) -MAC_PACKAGE_FILENAME=$(MAC_PACKAGE_NAME_LOWER)-$(MAC_PACKAGE_VERSION).pkg -MAC_PACKAGE_DMG_FILENAME=$(MAC_PACKAGE_NAME_LOWER)-$(MAC_PACKAGE_VERSION).dmg -MAC_PACKAGE_DMG_DIRNAME="$(MAC_PACKAGE_TITLE)" -MAC_PACKAGE_UTI=com.$(MAC_PACKAGE_NAME_LOWER).pkg - TT = $(DOTNET) tool restore && $(DOTNET) t4 PRODUCT_KEY_PATH?=$(TOP)/product.snk @@ -600,28 +573,28 @@ DOTNET_maccatalyst_PLATFORM=maccatalyst DOTNET_macos_PLATFORM=macos # XCFRAMEWORK -> clang argument for min OS version -CLANG_iossimulator-x64_VERSION_MIN=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -CLANG_iossimulator-arm64_VERSION_MIN=-mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -CLANG_ios-arm64_VERSION_MIN=-miphoneos-version-min=$(MIN_IOS_SDK_VERSION) -CLANG_tvossimulator-x64_VERSION_MIN=-mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION) -CLANG_tvossimulator-arm64_VERSION_MIN=-mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION) -CLANG_tvos-arm64_VERSION_MIN=-mtvos-version-min=$(MIN_TVOS_SDK_VERSION) -CLANG_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -arch x86_64 -CLANG_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -arch arm64 -CLANG_osx-x64_VERSION_MIN=-mmacosx-version-min=$(MIN_MACOS_SDK_VERSION) -CLANG_osx-arm64_VERSION_MIN=-mmacosx-version-min=$(MIN_MACOS_SDK_VERSION) +CLANG_iossimulator-x64_VERSION_MIN=-mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION) +CLANG_iossimulator-arm64_VERSION_MIN=-mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION) +CLANG_ios-arm64_VERSION_MIN=-miphoneos-version-min=$(DOTNET_MIN_IOS_SDK_VERSION) +CLANG_tvossimulator-x64_VERSION_MIN=-mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION) +CLANG_tvossimulator-arm64_VERSION_MIN=-mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION) +CLANG_tvos-arm64_VERSION_MIN=-mtvos-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION) +CLANG_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi -arch x86_64 +CLANG_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi -arch arm64 +CLANG_osx-x64_VERSION_MIN=-mmacosx-version-min=$(DOTNET_MIN_MACOS_SDK_VERSION) +CLANG_osx-arm64_VERSION_MIN=-mmacosx-version-min=$(DOTNET_MIN_MACOS_SDK_VERSION) # RUNTIMEIDENTIFIER -> swiftc argument(s) for min OS version -SWIFTC_iossimulator-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_IOS_SDK_VERSION)-simulator -SWIFTC_iossimulator-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_IOS_SDK_VERSION)-simulator -SWIFTC_ios-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_IOS_SDK_VERSION) -SWIFTC_tvossimulator-x64_VERSION_MIN=-target x86_64-apple-tvos$(MIN_TVOS_SDK_VERSION)-simulator -SWIFTC_tvossimulator-arm64_VERSION_MIN=-target arm64-apple-tvos$(MIN_TVOS_SDK_VERSION)-simulator -SWIFTC_tvos-arm64_VERSION_MIN=-target arm64-apple-tvos$(MIN_TVOS_SDK_VERSION) -SWIFTC_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -SWIFTC_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi -SWIFTC_osx-x64_VERSION_MIN=-target x86_64-apple-macos$(MIN_MACOS_SDK_VERSION) -SWIFTC_osx-arm64_VERSION_MIN=-target arm64-apple-macos$(MIN_MACOS_SDK_VERSION) +SWIFTC_iossimulator-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)-simulator +SWIFTC_iossimulator-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION)-simulator +SWIFTC_ios-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_IOS_SDK_VERSION) +SWIFTC_tvossimulator-x64_VERSION_MIN=-target x86_64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)-simulator +SWIFTC_tvossimulator-arm64_VERSION_MIN=-target arm64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION)-simulator +SWIFTC_tvos-arm64_VERSION_MIN=-target arm64-apple-tvos$(DOTNET_MIN_TVOS_SDK_VERSION) +SWIFTC_maccatalyst-x64_VERSION_MIN=-target x86_64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi +SWIFTC_maccatalyst-arm64_VERSION_MIN=-target arm64-apple-ios$(DOTNET_MIN_MACCATALYST_SDK_VERSION)-macabi +SWIFTC_osx-x64_VERSION_MIN=-target x86_64-apple-macos$(DOTNET_MIN_MACOS_SDK_VERSION) +SWIFTC_osx-arm64_VERSION_MIN=-target arm64-apple-macos$(DOTNET_MIN_MACOS_SDK_VERSION) # Misc other computed variables diff --git a/Make.versions b/Make.versions index 4bbe071e0dc1..8331bff9c758 100644 --- a/Make.versions +++ b/Make.versions @@ -1,8 +1,5 @@ # -# A release branch requires updating the following six variables at the bottom of this file: -# -# IOS_PACKAGE_VERSION (major/minor/revision #) -# MAC_PACKAGE_VERSION (major/minor/revision #) +# A release branch requires updating the following four variables further down in this file: # # IOS_NUGET_VERSION (major/minor/patch #) # TVOS_NUGET_VERSION (major/minor/patch #) @@ -12,45 +9,6 @@ # Update version numbers on main as well, to the next version # -# -# ** Version numbers ** -# -# Versions are defined as: Major.Minor.Revison.Build -# -# Major/minor (first/second numbers - max 2 digits each): -# - Bump for major/minor releases. -# -# Revision (third number - max 2 digits): -# - Reset to 0 after a major or minor bump (do not use 99 for Xcode preview -# branches (use 0 instead), because otherwise we can't bump it further if -# needed). -# - Bump for service releases and previews. -# - Bump if commit distance becomes > 999. -# - Can also be bumped for other reasons (in particular there's no correlation -# between Preview/Service Release #X and Revision #Y). -# - Bumping revision to a high enough number to make it clear that there's -# no correlation is a valid reason to bump. -# - The revision must be bumped at the same time for both iOS and Mac -# (otherwise the commit distance will differ). -# - Also bump if the [IOS|MAC]_PACKAGE_VERSION lines change for any other -# reason (otherwise we end up with repeating version numbers, since the -# commit distance would restart at 0, while the other numbers wouldn't -# change). -# - Any other problem can also usually be solved by bumping the revision. -# - Do not refactor the revision to a separate variable, because the reason -# bumping the revision is a general solution for many problems is that it -# also resets the commit distance (which wouldn't happen if the revision was -# refactored to a separate variable). -# -# Build (fourth number - max 3 digits): -# - Automatically calculated as the number of commits since the last time any -# of the other three numbers changed (technically since the corresponding -# line changed in git). -# - -IOS_PACKAGE_VERSION=17.99.0.$(IOS_COMMIT_DISTANCE) -MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE) - # # ** NuGet package version numbers ** # @@ -63,8 +21,6 @@ MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE) # IMPORTANT: There must be *no* managed API differences unless the two first # numbers (major.minor) changes. -# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705) - IOS_NUGET_OS_VERSION=18.2 TVOS_NUGET_OS_VERSION=18.2 MACOS_NUGET_OS_VERSION=15.2 diff --git a/Makefile b/Makefile index 93926911ee2a..b5b6eeadebdf 100644 --- a/Makefile +++ b/Makefile @@ -20,21 +20,6 @@ world: check-system .PHONY: check-system check-system: -ifdef INCLUDE_MAC -ifdef INCLUDE_IOS - @if [[ "x$(IOS_COMMIT_DISTANCE)" != "x$(MAC_COMMIT_DISTANCE)" ]]; then \ - echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are different.$(COLOR_CLEAR)"; \ - echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \ - echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \ - exit 1; \ - elif (( $(IOS_COMMIT_DISTANCE) > 999 || $(MAC_COMMIT_DISTANCE) > 999 )); then \ - echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and/or Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are > 999.$(COLOR_CLEAR)"; \ - echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \ - echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \ - exit 1; \ - fi -endif -endif @./system-dependencies.sh $(Q) $(MAKE) show-versions diff --git a/create-make-config.sh b/create-make-config.sh index 4ed2856c500d..d6a48409b225 100755 --- a/create-make-config.sh +++ b/create-make-config.sh @@ -12,9 +12,6 @@ LANG=C export LANG # Compute commit distances -printf "IOS_COMMIT_DISTANCE:=$(git log $(git blame -- ./Make.versions HEAD | grep IOS_PACKAGE_VERSION= | sed 's/ .*//' )..HEAD --oneline | wc -l | sed 's/ //g')\n" >> "$OUTPUT_FILE" -printf "MAC_COMMIT_DISTANCE:=$(git log $(git blame -- ./Make.versions HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' )..HEAD --oneline | wc -l | sed 's/ //g')\n" >> "$OUTPUT_FILE" - for platform in $ALL_DOTNET_PLATFORMS; do PLATFORM=$(echo "$platform" | tr '[:lower:]' '[:upper:]') COMMIT=$(git blame -- ./Make.versions HEAD | grep "${PLATFORM}_NUGET_OS_VERSION=" | sed 's/ .*//') diff --git a/docs/api/UIKit/UIAlertView.xml b/docs/api/UIKit/UIAlertView.xml index 00726d4b347f..ab8b1646927d 100644 --- a/docs/api/UIKit/UIAlertView.xml +++ b/docs/api/UIKit/UIAlertView.xml @@ -1,36 +1,55 @@ - A that displays a dialog message with one or more buttons. (As of iOS 8, devs should use rather than this class.) + + A that displays a dialog message with one or more buttons. + (As of iOS 8, devs should use rather than this class.) + - As of iOS 8, app devs should use rather than this class. Extensions may not use this class at all. - The allows the application user to choose among alternative actions. The following code and image, taken from the "AlertViews" section of the "ios Standard Controls" sample illustrates the simplest use-case: + As of iOS 8, app devs should use rather than this class. + Extensions may not use this class at all. + + + The allows the application user to choose among alternative actions. + The following code and image, taken from the "AlertViews" section of the "ios Standard Controls" + sample illustrates the simplest use-case: - Screenshot showing the alert view + An alternative to the is the . - An alternative to the is the . - The application developer can use s such as or to allow the application user to enter values. - The Xamarin API supports two styles of event notification: the Objective-C style that uses a delegate class or the C# style using event notifications. - + The application developer can use s such as + or to allow the application user to enter values. + + + The managed API supports two styles of event notification: the Objective-C style that uses a delegate class or the C# style using event notifications. + - The C# style allows the user to add or remove event handlers at runtime by assigning to the events of properties of this class. Event handlers can be anyone of a method, an anonymous methods or a lambda expression. Using the C# style events or properties will override any manual settings to the Objective-C Delegate or WeakDelegate settings. - - The Objective-C style requires the user to create a new class derived from class and assign it to the P:UIKit.Delegate property. Alternatively, for low-level control, by creating a class derived from which has every entry point properly decorated with an [Export] attribute. The instance of this object can then be assigned to the property. + The C# style allows the user to add or remove event handlers at runtime by assigning to the + events of properties of this class. Event handlers can be anyone of a method, an anonymous method + or a lambda expression. Using the C# style events or properties will override any manual settings + to the Objective-C Delegate or WeakDelegate settings. - + + The Objective-C style requires the user to create a new class derived from + class and assign it to the property. Alternatively, for low-level control, by creating + a class derived from which has every entry point properly decorated with an + attribute and assigning an instance of this class to the + property. + + This class should not be subclassed. - + Apple documentation for UIAlertView diff --git a/docs/api/UIKit/UIAppearance.xml b/docs/api/UIKit/UIAppearance.xml index ecc9f18b1991..bb55a632ed3d 100644 --- a/docs/api/UIKit/UIAppearance.xml +++ b/docs/api/UIKit/UIAppearance.xml @@ -28,7 +28,7 @@ - , , , , , , , , T:CarPlay.CPWindow, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + , , , , , , , T:CarPlay.CPWindow, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . Apple documentation for UIAppearance diff --git a/docs/api/UIKit/UIDocument.xml b/docs/api/UIKit/UIDocument.xml index cc80ffcb4eae..7f4815374aeb 100644 --- a/docs/api/UIKit/UIDocument.xml +++ b/docs/api/UIKit/UIDocument.xml @@ -2,14 +2,24 @@ Abstract base class providing local and cloud-based management of Model data. - Application developers can subclass to create objects that are "Model-Controllers" and relate to Model (domain) objects analogously to how relate to s. iOS provides a number of functions, including background asynchronous reading and writing of application data, automatic and safe data-saving, storage that is automatically coordinated between the application sandbox and cloud services, etc. - - At a minimum, application developers need to implement (for storage) and (for retrieval). Additionally, application developers need to manage the lifecyle of the and this requires the application developer to set the preferred storage location, create a file URL, and discover, open, and close the file. Application developers should also track changes and resolve conflicts between document versions. - - The members of this class can be used from a background thread. + + Application developers can subclass to create objects that are "Model-Controllers" and + relate to Model (domain) objects analogously to how relate to s. + UIKit provides a number of functions, including background asynchronous reading and writing of application data, + automatic and safe data-saving, storage that is automatically coordinated between the application sandbox and cloud services, etc. + + + At a minimum, application developers need to implement (for storage) and + (for retrieval). Additionally, application developers need to + manage the lifecyle of the and this requires the application developer to set the preferred storage + location, create a file URL, and discover, open, and close the file. Application developers should also track changes and resolve + conflicts between document versions. + + + The members of this class can be used from a background thread. + TaskCloud - Apple documentation for UIDocument \ No newline at end of file diff --git a/docs/building-apps/build-properties.md b/docs/building-apps/build-properties.md index fb9ce9032b37..9c79ea400004 100644 --- a/docs/building-apps/build-properties.md +++ b/docs/building-apps/build-properties.md @@ -125,6 +125,31 @@ Only applicable to iOS and tvOS projects. See [CreatePackage](#createpackage) for macOS and Mac Catalyst projects. +## BundleOriginalResources + +This property determines whether resources are compiled before being embedded +into library projects, or if the original (uncompiled) version is embedded. + +Historically resources have been compiled before being embedded into library +projects, but this requires having Xcode available, which has a few drawbacks: + +* It slows down remote builds on Windows. +* It won't work when building locally on Windows, and neither on any other + platform except macOS. +* Resources are compiled using the current available Xcode, which may not have + the same features as a potentially newer Xcode available when the library in + question is consumed. +* It makes it impossible to have a whole-program view of all the resources + when building an app, which is necessary to detect clashing resources. + +As such, we've added supported for embedding the original resources into +libraries. This will be opt-in in .NET 9, but opt-out starting in .NET 10. + +Default value: `false` in .NET 9, `true` in .NET 10+. + +Note: please file an issue if you find that you need to disable this feature, +as it's possible we'll remove the option to disable it at some point. + ## CodesignAllocate The path to the `codesign_allocate` tool. @@ -442,6 +467,40 @@ Default: automatically detected according to the default version shipped with th See also [MtouchSdkVersion](#mtouchsdkversion). +## MarshalManagedExceptionMode + +Choose how managed exceptions are handled when encountering a native frame +during stack unwinding while processing the managed exception. + +Valid values: + +* `default`: Currently, this is `throwobjectivecexception`. +* `unwindnativecode`: This is not available when using the CoreCLR runtime. +* `throwobjectivecexception`: Catch the managed exception, and convert it into an Objective-C exception. +* `abort`: Abort the process. +* `disable`: Disable intercepting any managed exceptions. For MonoVM this is equivalent to `unwindnativecode`, for CoreCLR this is equivalent to `abort`. + +For more information see the article about [Exception marshaling](todo) + +See also [MarshalObjectiveCExceptionMode](#marshalobjectivecexceptionmode) + +## MarshalObjectiveCExceptionMode + +Choose how Objective-C exceptions are handled when encountering a managed frame +during stack unwinding while processing the Objective-C exception. + +Valid values: + +* `default`: Currently, this is `throwmanagedexception`. +* `unwindmanagedcode`: This is not available when using the CoreCLR runtime. +* `throwmanagedexception`: Catch the Objective-C exception, and convert it into a managed exception. +* `abort`: Abort the process. +* `disable`: Disable intercepting any Objective-C exceptions. + +For more information see the article about [Exception marshaling](todo) + +See also [MarshalManagedExceptionMode](#marshalmanagedexceptionmode) + ## MdimportPath The full path to the `mdimport` tool. @@ -838,6 +897,30 @@ only scan libraries with the `[LinkWith]` attribute for Objective-C classes: ``` +## SkipStaticLibraryValidation + +Hot Restart doesn't support linking with static libraries, so by default we'll +show an error if the project tries to link with any static libraries when +using Hot Restart. + +However, in some cases it might be useful to ignore such errors (for instance if testing a code path in the app that doesn't require the static library in question), so it's possible to ignore them. + +The valid values are: + +* "true", "disable": Completely disable the validation. +* "false", "error", empty string: Enable the validation (this is the default) +* "warn": Validate, but show warnings instead of errors. + +Example: + +```xml + + warn + +``` + +This will show warnings instead of errors if the project tries to link with a static library. + ## StripPath The full path to the `strip` command-line tool. @@ -940,6 +1023,20 @@ Whether the native http handler should be the default http handler or not. Default: true for all platforms except macOS. +## ValidateEntitlements + +Choose whether entitlements the app requests should be validated. + +Valid values for this property: + +* `disable`: Validation is disabled. +* `warn`: Any validation failures are shown as warnings. +* `error`: Any validation failures are shown as errors. This is the default. + +The validation process may not validate every entitlement, nor is it guaranteed to not be overeager. + +If the validation fails for entitlements that actually work, please file a new issue. + ## XamMacResourcePrefix The directory where resources are stored (this prefix will be removed when copying resources to the app bundle). diff --git a/dotnet/.gitignore b/dotnet/.gitignore index d0a1e7772629..1f1afad09d9c 100644 --- a/dotnet/.gitignore +++ b/dotnet/.gitignore @@ -1,6 +1,7 @@ tmpdir WorkloadManifest.json WorkloadManifest.targets +WorkloadDependencies.json nupkgs Microsoft.*.Sdk/targets/Microsoft.*.Sdk.ImplicitNamespaceImports.props Microsoft.*.Sdk/targets/Microsoft.*.Sdk.SupportedTargetPlatforms.props diff --git a/dotnet/Makefile b/dotnet/Makefile index baf46cec555c..9875de128e00 100644 --- a/dotnet/Makefile +++ b/dotnet/Makefile @@ -183,6 +183,7 @@ $(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call SupportedTargetPlatforms,$( include $(TOP)/scripts/generate-workloadmanifest-json/fragment.mk include $(TOP)/scripts/generate-workloadmanifest-targets/fragment.mk +include $(TOP)/scripts/generate-workloaddependencies-json/fragment.mk define WorkloadTargets Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.json: Makefile $(TOP)/Make.config.inc $(GIT_DIRECTORY)/HEAD $(GIT_DIRECTORY)/index Makefile $(GENERATE_WORKLOADMANIFEST_JSON) | Workloads/Microsoft.NET.Sdk.$(1) $$(Q) rm -f $$@.tmp @@ -194,12 +195,18 @@ Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.targets: Makefile $(TOP)/Make. $$(Q_GEN) $(GENERATE_WORKLOADMANIFEST_TARGETS_EXEC) "$(1)" "$$@.tmp" "$$(DOTNET_WINDOWS_PLATFORMS)" "$(DOTNET_TFM)_$$($(4)_NUGET_OS_VERSION)" "$(SUPPORTED_API_VERSIONS_$(4))" $$(Q) mv $$@.tmp $$@ +Workloads/Microsoft.NET.Sdk.$(1)/WorkloadDependencies.json: Makefile $(TOP)/Make.config.inc $(GIT_DIRECTORY)/HEAD $(GIT_DIRECTORY)/index Makefile $(GENERATE_WORKLOADDEPENDENCIES_JSON) | Workloads/Microsoft.NET.Sdk.$(1) + $$(Q) rm -f $$@.tmp + $$(Q_GEN) $(GENERATE_WORKLOADDEPENDENCIES_JSON_EXEC) "$(1)" "$$($(4)_NUGET_VERSION_NO_METADATA)" "$(XCODE_VERSION)" "$$($(4)_NUGET_OS_VERSION)" "$$@.tmp" + $$(Q) mv $$@.tmp $$@ WORKLOAD_TARGETS += Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.json WORKLOAD_TARGETS += Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.targets +WORKLOAD_TARGETS += Workloads/Microsoft.NET.Sdk.$(1)/WorkloadDependencies.json LOCAL_WORKLOAD_TARGETS += Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.json LOCAL_WORKLOAD_TARGETS += Workloads/Microsoft.NET.Sdk.$(1)/WorkloadManifest.targets +LOCAL_WORKLOAD_TARGETS += Workloads/Microsoft.NET.Sdk.$(1)/WorkloadDependencies.json endef $(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call WorkloadTargets,$(platform),$(shell echo $(platform) | tr A-Z a-z),$($(platform)_NUGET_VERSION_NO_METADATA),$(shell echo $(platform) | tr a-z A-Z),$(NET8_$(platform)_NUGET_VERSION_NO_METADATA)))) diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.cs.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.de.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.en.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.es.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.fr.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.it.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ja.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ko.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.pl.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.pt-BR.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ru.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.tr.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.zh-Hans.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.zh-Hant.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..13f5043cb6c2 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,9 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/template.json new file mode 100644 index 000000000000..f4a50160bb18 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/.template.config/template.json @@ -0,0 +1,51 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "iOS", "Mobile" ], + "groupIdentity": "Microsoft.iOS.iOSNotificationContentExtension", + "identity": "Microsoft.iOS.iOSNotificationContentExtension.CSharp", + "name": "iOS Notification Content Extension", + "description": "A project for creating a Notification Content Extension for a .NET iOS application", + "shortName": "ios-notification-content-extension", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "iOSNotificationContentExtension1", + "sources": [ + { + "source": "./", + "target": "./" + } + ], + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "iOSNotificationContentExtension1.csproj" } + ], + "postActions": [{ + "id": "addProjectReference", + "actionId": "AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C", + "description": "Add project reference in main app's project file", + "sourceName": "iOSNotificationContentExtension1.csproj", + "applyFileRenamesToManualInstructions": true, + "manualInstructions": [{ + "text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n" + }] + }], + "symbols": { + "bundleId": { + "type": "parameter", + "description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "datatype": "string", + "replaces": "com.companyname.iOSApp1" + }, + "minOSVersion": { + "type": "parameter", + "description": "Overrides SupportedOSPlatformVersion in the project file", + "replaces": "minOSVersion", + "datatype": "string", + "defaultValue": "13.0" + } + }, + "defaultName": "iOSNotificationContentExtension1" +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/Info.plist b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/Info.plist new file mode 100644 index 000000000000..f4d76214ba34 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDisplayName + iOSNotificationContentExtension1 + CFBundleName + iOSNotificationContentExtension1 + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + NSExtension + + NSExtensionAttributes + + UNNotificationExtensionCategory + myNotificationCategory + UNNotificationExtensionInitialContentSizeRatio + 1 + + NSExtensionMainStoryboard + MainInterface + NSExtensionPointIdentifier + com.apple.usernotifications.content-extension + + + diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/MainInterface.storyboard b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/MainInterface.storyboard new file mode 100644 index 000000000000..d56db208791a --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/MainInterface.storyboard @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/NotificationViewController.cs b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/NotificationViewController.cs new file mode 100644 index 000000000000..55ce10c53222 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/NotificationViewController.cs @@ -0,0 +1,52 @@ +using System; + +using Foundation; +using ObjCRuntime; +using UIKit; +using UserNotifications; +using UserNotificationsUI; + +namespace NotificationContentExtension { + [Register ("NotificationViewController")] + public class NotificationViewController : UIViewController, IUNNotificationContentExtension { + const int LabelHeight = 88; + UILabel? notificationLabel; + + protected NotificationViewController (NativeHandle handle) : base (handle) + { + // Note: this .ctor should not contain any initialization logic, + // it only exists so that the OS can instantiate an instance of this class. + } + + public override void ViewDidLoad () + { + base.ViewDidLoad (); + + // Do any required initialization here + + View!.BackgroundColor = UIColor.Clear; + + notificationLabel = new UILabel () { + TranslatesAutoresizingMaskIntoConstraints = false, + Lines = 0, + TextAlignment = UITextAlignment.Center, + }; + View.AddSubview (notificationLabel); + + notificationLabel.TopAnchor.ConstraintEqualTo (View.TopAnchor).Active = true; + notificationLabel.LeadingAnchor.ConstraintEqualTo (View.LeadingAnchor).Active = true; + notificationLabel.TrailingAnchor.ConstraintEqualTo (View.TrailingAnchor).Active = true; + notificationLabel.HeightAnchor.ConstraintEqualTo (LabelHeight).Active = true; + } + + public void DidReceiveNotification (UNNotification notification) + { + if (notificationLabel is not null) { + notificationLabel.Text = + $"➡️ {notification.Request.Content.Title}\n" + + $"↪️ {notification.Request.Content.Subtitle}\n" + + $"⏩ {notification.Request.Content.Body}"; + } + } + } +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/iOSNotificationContentExtension1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/iOSNotificationContentExtension1.csproj new file mode 100644 index 000000000000..f7e2995a0622 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-content-extension/csharp/iOSNotificationContentExtension1.csproj @@ -0,0 +1,19 @@ + + + net9.0-ios + Library + iOSNotificationContentExtension1 + enable + true + minOSVersion + True + + + com.companyname.iOSApp1.notificationcontentextension + + + + + + + diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.cs.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.cs.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.cs.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.de.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.de.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.de.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.en.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.en.json new file mode 100644 index 000000000000..3ccd7c5f10ab --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.en.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.es.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.es.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.es.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.fr.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.fr.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.fr.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.it.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.it.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.it.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ja.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ja.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ja.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ko.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ko.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ko.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.pl.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.pl.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.pl.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.pt-BR.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.pt-BR.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.pt-BR.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ru.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ru.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.ru.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.tr.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.tr.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.tr.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.zh-Hans.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.zh-Hans.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.zh-Hans.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.zh-Hant.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.zh-Hant.json new file mode 100644 index 000000000000..f6e40b31c0bd --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/localize/templatestrings.zh-Hant.json @@ -0,0 +1,10 @@ +{ + "author": "Microsoft", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "postActions/addProjectReference/description": "Add project reference in main app's project file", + "postActions/addProjectReference/manualInstructions/default/text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n", + "symbols/bundleId/description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "symbols/minOSVersion/description": "Overrides SupportedOSPlatformVersion in the project file", + "symbols/extensionClassName/description": "The name of the notification service extension class" +} \ No newline at end of file diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/template.json b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/template.json new file mode 100644 index 000000000000..a06d8310337e --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/.template.config/template.json @@ -0,0 +1,58 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "iOS", "Mobile" ], + "groupIdentity": "Microsoft.iOS.iOSNotificationServiceExtension", + "identity": "Microsoft.iOS.iOSNotificationServiceExtension.CSharp", + "name": "iOS Notification Service Extension", + "description": "A project for creating a Notification Service Extension for a .NET iOS application", + "shortName": "ios-notification-service-extension", + "tags": { + "language": "C#", + "type": "project" + }, + "sourceName": "iOSNotificationServiceExtension1", + "sources": [ + { + "source": "./", + "target": "./" + } + ], + "preferNameDirectory": true, + "primaryOutputs": [ + { "path": "iOSNotificationServiceExtension1.csproj" } + ], + "postActions": [{ + "id": "addProjectReference", + "actionId": "AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C", + "description": "Add project reference in main app's project file", + "sourceName": "iOSNotificationServiceExtension1.csproj", + "applyFileRenamesToManualInstructions": true, + "manualInstructions": [{ + "text": "The final step is to add a reference to this newly created project in the main app's project file, like this:\n\n\t\n\t\t\n\t\t\ttrue\n\t\t\n\t\n" + }] + }], + "symbols": { + "bundleId": { + "type": "parameter", + "description": "The bundle identifier (CFBundleIdentifier from the Info.plist, or ApplicationId from the project file) for the parent iOS project", + "datatype": "string", + "replaces": "com.companyname.iOSApp1" + }, + "minOSVersion": { + "type": "parameter", + "description": "Overrides SupportedOSPlatformVersion in the project file", + "replaces": "minOSVersion", + "datatype": "string", + "defaultValue": "13.0" + }, + "extensionClassName": { + "type": "parameter", + "description": "The name of the notification service extension class", + "replaces": "NotificationServiceClass", + "datatype": "string", + "defaultValue": "NotificationService" + } + }, + "defaultName": "iOSNotificationServiceExtension1" +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/Info.plist b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/Info.plist new file mode 100644 index 000000000000..c085edb60558 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/Info.plist @@ -0,0 +1,27 @@ + + + + + CFBundleDisplayName + iOSNotificationServiceExtension1 + CFBundleName + iOSNotificationServiceExtension1 + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + NSExtension + + NSExtensionPointIdentifier + com.apple.usernotifications.service + NSExtensionPrincipalClass + NotificationServiceClass + + UIBackgroundModes + + remote-notification + + + diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/NotificationServiceClass.cs b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/NotificationServiceClass.cs new file mode 100644 index 000000000000..8006bff99ca0 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/NotificationServiceClass.cs @@ -0,0 +1,37 @@ +using System; + +using Foundation; +using ObjCRuntime; +using UIKit; +using UserNotifications; + +namespace NotificationServiceExtension { + [Register ("NotificationServiceClass")] + public class NotificationServiceClass : UNNotificationServiceExtension { + protected NotificationServiceClass (NativeHandle handle) : base (handle) + { + // Note: this .ctor should not contain any initialization logic, + // it only exists so that the OS can instantiate an instance of this class. + } + + public override void DidReceiveNotificationRequest (UNNotificationRequest request, Action contentHandler) + { + // Called when the OS receives a notification that can be muteated + + // Create a mutable copy of the notification + var mutableRequest = (UNMutableNotificationContent) request.Content.MutableCopy (); + + // Modify the notification content here... + mutableRequest.Title = $"[modified] {mutableRequest.Title}"; + + // Call the contentHandler callback to let the OS know about the modified notification. + contentHandler (mutableRequest); + } + + public override void TimeWillExpire () + { + // Called just before the extension will be terminated by the system. + // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. + } + } +} diff --git a/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/iOSNotificationServiceExtension1.csproj b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/iOSNotificationServiceExtension1.csproj new file mode 100644 index 000000000000..1a80a8f32dd7 --- /dev/null +++ b/dotnet/Templates/Microsoft.iOS.Templates/ios-notification-service-extension/csharp/iOSNotificationServiceExtension1.csproj @@ -0,0 +1,19 @@ + + + net9.0-ios + Library + iOSNotificationServiceExtension1 + enable + true + minOSVersion + True + + + com.companyname.iOSApp1.notificationserviceextension + + + + + + + diff --git a/dotnet/Workloads/SignList.xml b/dotnet/Workloads/SignList.xml index fae12d42c701..81d34b5fb630 100644 --- a/dotnet/Workloads/SignList.xml +++ b/dotnet/Workloads/SignList.xml @@ -16,8 +16,7 @@ - - + diff --git a/dotnet/package/microsoft.workloads.csproj b/dotnet/package/microsoft.workloads.csproj index 901fe5b1a8c7..0d288b8ec87f 100644 --- a/dotnet/package/microsoft.workloads.csproj +++ b/dotnet/package/microsoft.workloads.csproj @@ -9,5 +9,6 @@ + diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index 94eba3a754a3..319adce9d9ea 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -224,6 +224,7 @@ _ErrorRuntimeIdentifiersClash; + BuildOnlySettings; _CollectBundleResources; _RunRidSpecificBuild; _DetectAppManifest; @@ -509,13 +510,13 @@ - ios/tvos device builds in all configurations - macOS/MacCatalyst builds in release configuration - Set 'partial-static' for: - - when no assemblies are trimmed and when _MarshalManagedExceptionMode is default (or not set) + - when no assemblies are trimmed and when MarshalManagedExceptionMode is default (or not set) - Otherwise set 'dynamic' --> managed-static managed-static managed-static - partial-static + partial-static dynamic @@ -592,8 +593,8 @@ IsSimulatorBuild=$(_SdkIsSimulator) LibMonoLinkMode=$(_LibMonoLinkMode) LibXamarinLinkMode=$(_LibXamarinLinkMode) - MarshalManagedExceptionMode=$(_MarshalManagedExceptionMode) - MarshalObjectiveCExceptionMode=$(_MarshalObjectiveCExceptionMode) + MarshalManagedExceptionMode=$(MarshalManagedExceptionMode) + MarshalObjectiveCExceptionMode=$(MarshalObjectiveCExceptionMode) @(_MonoLibrary -> 'MonoLibrary=%(Identity)') MtouchFloat32=$(MtouchFloat32) NoWarn=$(_BundlerNoWarn) @@ -1113,7 +1114,7 @@ In such setup, during runtime, AOT images are loaded but marked as unusuable as they are compiled with `full` compiler switch and the code falls back to interpreter. Dedup AOT image is specially handled by the AOT runtime and it is not allowed to have it marked as unusuable. --> - <_IsDedupEnabled Condition="'$(_IsDedupEnabled)' == '' And '$(_RunAotCompiler)' == 'true' And '$(IsMacEnabled)' == 'true' And '$(TargetArchitectures)' == 'ARM64'">true + <_IsDedupEnabled Condition="'$(_IsDedupEnabled)' == '' And '$(_RunAotCompiler)' == 'true' And '$(IsMacEnabled)' == 'true' And '$(TargetArchitectures)' == 'ARM64' And '$(MtouchInterpreter)' != 'all'">true <_DedupAssembly Condition="'$(_IsDedupEnabled)' == 'true'">$(IntermediateOutputPath)aot-instances.dll diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1d9a4bf701c8..04dc81e001d7 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -87,9 +87,9 @@ - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 https://github.com/dotnet/templating @@ -99,5 +99,10 @@ https://github.com/dotnet/xharness 8c6d5afd99c713777165f4378462085a5679c223 + + https://github.com/dotnet/arcade + 8cc6ecd76c24ef6665579a5c5e386a211a1e7c54 + + diff --git a/eng/Versions.props b/eng/Versions.props index 146c90db2d50..9fc9e3486310 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -5,14 +5,15 @@ 10.0.100-alpha.1.25066.37 10.0.0-alpha.1.25063.12 9.0.0-alpha.1.23556.4 - 9.0.0-beta.24408.2 + 9.0.0-beta.25058.5 8.0.0-beta.24413.2 10.0.0-alpha.1.25063.12 8.0.0-rtm.23511.3 9.0.0-rc.2.24462.10 7.0.100-alpha.1.21601.1 0.11.5-alpha.24627.1 - 10.0.0-prerelease.24604.1 + 10.0.0-prerelease.24610.1 + 9.0.0-beta.25058.5 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version) $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version) diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 9a4e285a5ae3..9a7ecfbd42c5 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -81,7 +81,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") else() set(TOOLCHAIN "riscv64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu/13.1.0") + set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu") endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") @@ -98,7 +98,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -115,7 +115,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") @@ -127,30 +127,25 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "riscv64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/riscv64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() if(ANDROID) @@ -272,21 +267,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") add_toolchain_linker_flag("--target=${TOOLCHAIN}") @@ -297,10 +292,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index aa94fb174596..a46b6deb7598 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -320,7 +320,7 @@ function InstallDotNet([string] $dotnetRoot, $variations += @($installParameters) $dotnetBuilds = $installParameters.Clone() - $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public" + $dotnetbuilds.AzureFeed = "https://ci.dot.net/public" $variations += @($dotnetBuilds) if ($runtimeSourceFeed) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 00473c9f918d..1159726a10fd 100644 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -232,7 +232,7 @@ function InstallDotNet { local public_location=("${installParameters[@]}") variations+=(public_location) - local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public") + local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public") variations+=(dotnetbuilds) if [[ -n "${6:-}" ]]; then diff --git a/external/MonoTouch.Dialog b/external/MonoTouch.Dialog deleted file mode 160000 index d157950b6e6e..000000000000 --- a/external/MonoTouch.Dialog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d157950b6e6ed32cf53d4074fe19223dc1f1e8fe diff --git a/external/Touch.Unit b/external/Touch.Unit deleted file mode 160000 index 957facad80e7..000000000000 --- a/external/Touch.Unit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 957facad80e753310f52fcbb8cf85219d9d6d887 diff --git a/external/Xamarin.MacDev b/external/Xamarin.MacDev index 3e70ebedf657..5b7cf7c1a99f 160000 --- a/external/Xamarin.MacDev +++ b/external/Xamarin.MacDev @@ -1 +1 @@ -Subproject commit 3e70ebedf6573f8a56af32e3534b055e13e5e294 +Subproject commit 5b7cf7c1a99fd3b12c7235d2778990023e84eb9c diff --git a/global.json b/global.json index 4e339f4173dd..618a0288ce93 100644 --- a/global.json +++ b/global.json @@ -6,6 +6,6 @@ "dotnet": "10.0.100-alpha.1.25066.37" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "" + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25058.5" } } diff --git a/mk/versions.mk b/mk/versions.mk index b696bc4e08d1..ac12996c6591 100644 --- a/mk/versions.mk +++ b/mk/versions.mk @@ -64,9 +64,8 @@ endef $(shell rm -f .check-versions-failure) -$(eval $(call CheckSubmoduleTemplate,Touch.Unit,TOUCH_UNIT)) $(eval $(call CheckSubmoduleTemplate,Xamarin.MacDev,XAMARIN_MACDEV)) -$(eval $(call CheckSubmoduleTemplate,MonoTouch.Dialog,MONOTOUCH_DIALOG)) + include $(TOP)/mk/xamarin.mk diff --git a/mk/xamarin-reset.sh b/mk/xamarin-reset.sh index 24bbff6d448c..101620eab156 100755 --- a/mk/xamarin-reset.sh +++ b/mk/xamarin-reset.sh @@ -5,6 +5,7 @@ if test -n "$V"; then set -x; fi DEPENDENCY_NAME="$1" # Calculate the remote from the format: git@github.com:/.git +DEPENDENCY_AUTH=() if [[ $DEPENDENCY_MODULE =~ git@github.com ]]; then # git@ url DEPENDENCY_REMOTE=${DEPENDENCY_MODULE/git@github.com:/} @@ -16,10 +17,13 @@ elif [[ $DEPENDENCY_MODULE =~ https://github.com ]]; then elif [[ $DEPENDENCY_MODULE =~ devdiv@dev.azure.com ]]; then DEPENDENCY_REMOTE=${DEPENDENCY_MODULE/https:\/\/devdiv@dev.azure.com\/devdiv\/} DEPENDENCY_REMOTE=${DEPENDENCY_REMOTE%%/_git*} - DEPENDENCY_AUTH="-c http.extraheader=\"AUTHORIZATION: bearer $SYSTEM_ACCESSTOKEN\"" + if test -n "$SYSTEM_ACCESSTOKEN"; then + DEPENDENCY_AUTH+=("-c") + DEPENDENCY_AUTH+=("http.extraheader='AUTHORIZATION: bearer $SYSTEM_ACCESSTOKEN'") + fi fi -echo "*** [$DEPENDENCY_NAME] testing fot git repo in $DEPENDENCY_PATH" +echo "*** [$DEPENDENCY_NAME] testing for git repo in $DEPENDENCY_PATH" if test -d "$DEPENDENCY_PATH"; then cd "$DEPENDENCY_PATH" # Check if we have the remote we need @@ -39,10 +43,10 @@ if test -d "$DEPENDENCY_PATH"; then fi else - echo "*** [$DEPENDENCY_NAME] git" "${DEPENDENCY_AUTH[@]}" "clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE" + echo "*** [$DEPENDENCY_NAME] git ${DEPENDENCY_AUTH[*]} clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE" mkdir -p "$(dirname "$DEPENDENCY_PATH")" cd "$(dirname "$DEPENDENCY_PATH")" - git "$DEPENDENCY_AUTH" "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE" + git "${DEPENDENCY_AUTH[@]}" clone "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE" cd "$DEPENDENCY_DIRECTORY" fi diff --git a/msbuild/Directory.Build.props b/msbuild/Directory.Build.props index 328f0b3a5edd..20876e7a029e 100644 --- a/msbuild/Directory.Build.props +++ b/msbuild/Directory.Build.props @@ -15,7 +15,7 @@ https://dev.azure.com/azure-public/vside/_artifacts/feed/xamarin-impl/NuGet/Xamarin.Messaging.Client/ --> - [2.2.10] + [3.0.13] [1.1.7] diff --git a/msbuild/ILMerge.targets b/msbuild/ILMerge.targets index 98fe656bdb0e..008e23d82201 100644 --- a/msbuild/ILMerge.targets +++ b/msbuild/ILMerge.targets @@ -40,8 +40,7 @@ - - + diff --git a/msbuild/Makefile b/msbuild/Makefile index c0d518c40e7c..8ce64128f360 100644 --- a/msbuild/Makefile +++ b/msbuild/Makefile @@ -164,11 +164,9 @@ clean-local:: git clean -xfdq cd $(XAMARIN_MACDEV_PATH) && git clean -xfdq -# We use the legacy Xamarin versions for the .NET assemblies as well. Versions.g.cs: Makefile $(TOP)/Make.config.inc $(Q) printf "public static class VersionConstants {\\n" > $@.tmp - $(Q) printf "\\tpublic const string XamarinMacVersion = \"$(MAC_PACKAGE_VERSION)\";\\n" >> $@.tmp - $(Q) printf "\\tpublic const string XamarinIOSVersion = \"$(IOS_PACKAGE_VERSION)\";\\n" >> $@.tmp + $(Q) printf "\\tpublic const string NuGetVersion = \"$($(shell echo $(firstword $(DOTNET_PLATFORMS)) | tr 'a-z' 'A-Z')_NUGET_VERSION)\";\\n" >> $@.tmp $(Q) echo $(foreach platform,$(ALL_DOTNET_PLATFORMS),"\\tpublic const string Microsoft_$(platform)_Version = \"$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_FULL)\";\\n") >> $@.tmp $(Q) echo $(foreach platform,$(ALL_DOTNET_PLATFORMS),"\\tpublic const string Microsoft_$(platform)_Standard_Version = \"$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_MAJOR).$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_MINOR).0.$($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_PATCH)\";\\n") >> $@.tmp $(Q) printf "\\tpublic const string NuGetPrereleaseIdentifier = \"$(NUGET_PRERELEASE_IDENTIFIER)\";\\n" >> $@.tmp diff --git a/msbuild/Messaging/Xamarin.Messaging.Build/App.config b/msbuild/Messaging/Xamarin.Messaging.Build/App.config index 04a1c4219dcd..700cfc31ddba 100644 --- a/msbuild/Messaging/Xamarin.Messaging.Build/App.config +++ b/msbuild/Messaging/Xamarin.Messaging.Build/App.config @@ -16,10 +16,6 @@ - - - - \ No newline at end of file diff --git a/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx b/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx index c0222395246d..c5e2d698a91f 100644 --- a/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx +++ b/msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx @@ -1654,4 +1654,64 @@ {1}: the exit code of a process + + + Unknown resource type: {1}. + + + + Unknown resource type: {1}. + + + + The app requests the entitlement '{0}' with the value '{1}', but the provisioning profile '{2}' grants it for the value '{3}'. + + This may be either a warning or an error, depending on build configuration. + + + + + Invalid value '{0}' for the 'ValidateEntitlements' property. Valid values are: 'disable', 'warn' or 'error'. + + The following are literal names and should not be translated: ValidateEntitlements, disable, warn, error + + + + + The app requests the entitlement '{0}', but no provisioning profile has been specified. Please specify the name of the provisioning profile to use with the 'CodesignProvision' property in the project file. + + This may be either a warning or an error, depending on build configuration. + The following are literal names and should not be translated: CodesignProvision + + + + + The app requests the entitlement '{0}', but the provisioning profile '{1}' does not contain this entitlement. + + This may be either a warning or an error, depending on build configuration. + + + + + The library {0} is a static library, and static libraries are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error. + + The following are literal names and should not be translated: SkipStaticLibraryValidation, true + {0}: the path to a file + + + + + Unknown value for 'SkipStaticLibraryValidation': {0}. Valid values are: 'true', 'false', 'warn'. + + The following are literal names and should not be translated: SkipStaticLibraryValidation + + + + + The file {0} is an object file, and object files are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error. + + The following are literal names and should not be translated: SkipStaticLibraryValidation, true + {0}: the path to a file + + diff --git a/msbuild/Xamarin.Localization.MSBuild/Properties/AssemblyInfo.cs b/msbuild/Xamarin.Localization.MSBuild/Properties/AssemblyInfo.cs index df2253be9ec7..aca43be8fdd3 100644 --- a/msbuild/Xamarin.Localization.MSBuild/Properties/AssemblyInfo.cs +++ b/msbuild/Xamarin.Localization.MSBuild/Properties/AssemblyInfo.cs @@ -3,8 +3,8 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCompanyAttribute ("Microsoft Corp.")] -[assembly: AssemblyFileVersionAttribute (VersionConstants.XamarinIOSVersion)] -[assembly: AssemblyInformationalVersionAttribute (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] +[assembly: AssemblyFileVersionAttribute (VersionConstants.NuGetVersion + ".0")] +[assembly: AssemblyInformationalVersionAttribute (VersionConstants.NuGetVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] [assembly: AssemblyProductAttribute ("Xamarin.Localization.MSBuild")] [assembly: AssemblyTitleAttribute ("Xamarin.Localization.MSBuild")] -[assembly: AssemblyVersionAttribute (VersionConstants.XamarinIOSVersion)] +[assembly: AssemblyVersionAttribute (VersionConstants.NuGetVersion + ".0")] diff --git a/msbuild/Xamarin.MacDev.Tasks/BundleResource.cs b/msbuild/Xamarin.MacDev.Tasks/BundleResource.cs index 5d8485d766ed..dfdc1bc19b29 100644 --- a/msbuild/Xamarin.MacDev.Tasks/BundleResource.cs +++ b/msbuild/Xamarin.MacDev.Tasks/BundleResource.cs @@ -1,4 +1,4 @@ -// #define TRACE +// #define TRACE_TASK using System; using System.Diagnostics; @@ -67,7 +67,7 @@ public static IList SplitResourcePrefixes (string? prefix) .ToList (); } - [Conditional ("TRACE")] + [Conditional ("TRACE_TASK")] static void Trace (Task task, string msg) { task.Log.LogMessage (MessageImportance.Low, msg); diff --git a/msbuild/Xamarin.MacDev.Tasks/LoggingExtensions.cs b/msbuild/Xamarin.MacDev.Tasks/LoggingExtensions.cs index 83a1f1d1ca9d..367f3f5bd46a 100644 --- a/msbuild/Xamarin.MacDev.Tasks/LoggingExtensions.cs +++ b/msbuild/Xamarin.MacDev.Tasks/LoggingExtensions.cs @@ -4,6 +4,8 @@ using Microsoft.Build.Framework; using Microsoft.Build.Utilities; +#nullable enable + namespace Xamarin.MacDev.Tasks { public static class LoggingExtensions { const MessageImportance TaskPropertyImportance = MessageImportance.Normal; @@ -79,12 +81,12 @@ public static void LogTaskProperty (this TaskLoggingHelper log, string propertyN /// In the 7xxx range for MSBuild error. /// The error's message to be displayed in the error pad. /// Path to the known guilty file or null. - public static void LogError (this TaskLoggingHelper log, int errorCode, string? fileName, string message, params object [] args) + public static void LogError (this TaskLoggingHelper log, int errorCode, string? fileName, string message, params object? [] args) { log.LogError (null, $"{ErrorPrefix}{errorCode}", null, fileName ?? "MSBuild", 0, 0, 0, 0, message, args); } - public static void LogWarning (this TaskLoggingHelper log, int errorCode, string? fileName, string message, params object [] args) + public static void LogWarning (this TaskLoggingHelper log, int errorCode, string? fileName, string message, params object? [] args) { log.LogWarning (null, $"{ErrorPrefix}{errorCode}", null, fileName ?? "MSBuild", 0, 0, 0, 0, message, args); } diff --git a/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Exec.cs b/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Exec.cs index 10b0966ce40e..9ed626126d16 100644 --- a/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Exec.cs +++ b/msbuild/Xamarin.MacDev.Tasks/MsBuildTasks/Exec.cs @@ -7,6 +7,7 @@ using Xamarin.Messaging.Build.Client; using System.Security; using System.Reactive.Linq; +using Xamarin.Messaging.Ssh; // Disable until we get around to enable + fix any issues. #nullable disable diff --git a/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs b/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs index 96ec1eed3bc3..a5b17f0e4223 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Properties/AssemblyInfo.cs @@ -42,11 +42,9 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -// We use the iOS version on all platforms (this way we only have to compile the tasks once) - -[assembly: AssemblyVersion (VersionConstants.XamarinIOSVersion)] -[assembly: AssemblyFileVersion (VersionConstants.XamarinIOSVersion)] -[assembly: AssemblyInformationalVersion (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] +[assembly: AssemblyVersion (VersionConstants.NuGetVersion + ".0")] +[assembly: AssemblyFileVersion (VersionConstants.NuGetVersion + ".0")] +[assembly: AssemblyInformationalVersion (VersionConstants.NuGetVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/CollectBundleResources.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/CollectBundleResources.cs index 6efcb5dfa9d3..a6fab5c485c3 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/CollectBundleResources.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/CollectBundleResources.cs @@ -32,6 +32,8 @@ public class CollectBundleResources : XamarinTask, ICancelableTask, IHasProjectD [Output] public ITaskItem [] BundleResourcesWithLogicalNames { get; set; } = Array.Empty (); + public ITaskItem [] UnpackedResources { get; set; } = Array.Empty (); + #endregion static bool CanOptimize (string path) @@ -68,37 +70,8 @@ bool ExecuteImpl () var bundleResources = new List (); foreach (var item in BundleResources) { - // Skip anything with the PublishFolderType metadata, these are copied directly to the ResolvedFileToPublish item group instead. - var publishFolderType = item.GetMetadata ("PublishFolderType"); - if (!string.IsNullOrEmpty (publishFolderType)) - continue; - - var logicalName = BundleResource.GetLogicalName (this, item); - // We need a physical path here, ignore the Link element - var path = item.GetMetadata ("FullPath"); - - if (!File.Exists (path)) { - Log.LogError (MSBStrings.E0099, logicalName, path); - continue; - } - - if (logicalName.StartsWith (".." + Path.DirectorySeparatorChar, StringComparison.Ordinal)) { - Log.LogError (null, null, null, item.ItemSpec, 0, 0, 0, 0, MSBStrings.E0100, logicalName); - continue; - } - - if (logicalName == "Info.plist") { - Log.LogWarning (null, null, null, item.ItemSpec, 0, 0, 0, 0, MSBStrings.E0101); + if (!TryCreateItemWithLogicalName (this, item, out var bundleResource)) continue; - } - - if (BundleResource.IsIllegalName (logicalName, out var illegal)) { - Log.LogError (null, null, null, item.ItemSpec, 0, 0, 0, 0, MSBStrings.E0102, illegal); - continue; - } - - var bundleResource = new TaskItem (item); - bundleResource.SetMetadata ("LogicalName", logicalName); bool optimize = false; @@ -122,11 +95,51 @@ bool ExecuteImpl () bundleResources.Add (bundleResource); } + bundleResources.AddRange (UnpackedResources); + BundleResourcesWithLogicalNames = bundleResources.ToArray (); return !Log.HasLoggedErrors; } + public static bool TryCreateItemWithLogicalName (T task, ITaskItem item, [NotNullWhen (true)] out TaskItem? itemWithLogicalName) where T : Task, IHasProjectDir, IHasResourcePrefix, IHasSessionId + { + itemWithLogicalName = null; + + // Skip anything with the PublishFolderType metadata, these are copied directly to the ResolvedFileToPublish item group instead. + var publishFolderType = item.GetMetadata ("PublishFolderType"); + if (!string.IsNullOrEmpty (publishFolderType)) + return false; + + var logicalName = BundleResource.GetLogicalName (task, item); + // We need a physical path here, ignore the Link element + var path = item.GetMetadata ("FullPath"); + + if (!File.Exists (path)) { + task.Log.LogError (MSBStrings.E0099, logicalName, path); + return false; + } + + if (logicalName.StartsWith (".." + Path.DirectorySeparatorChar, StringComparison.Ordinal)) { + task.Log.LogError (null, null, null, item.ItemSpec, 0, 0, 0, 0, MSBStrings.E0100, logicalName); + return false; + } + + if (logicalName == "Info.plist") { + task.Log.LogWarning (null, null, null, item.ItemSpec, 0, 0, 0, 0, MSBStrings.E0101); + return false; + } + + if (BundleResource.IsIllegalName (logicalName, out var illegal)) { + task.Log.LogError (null, null, null, item.ItemSpec, 0, 0, 0, 0, MSBStrings.E0102, illegal); + return false; + } + + itemWithLogicalName = new TaskItem (item); + itemWithLogicalName.SetMetadata ("LogicalName", logicalName); + return true; + } + public void Cancel () { if (ShouldExecuteRemotely ()) diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/CollectPackLibraryResources.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/CollectPackLibraryResources.cs new file mode 100644 index 000000000000..b88bcdb32914 --- /dev/null +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/CollectPackLibraryResources.cs @@ -0,0 +1,86 @@ +using System; +using System.IO; +using System.Collections.Generic; + +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; +using Xamarin.Localization.MSBuild; +using Xamarin.Messaging.Build.Client; + +namespace Xamarin.MacDev.Tasks { + // This task will collect several item groups with various types of assets/resources, + // add/compute the LogicalName value for each of them, and then add them to the + // ItemsWithLogicalNames item group. The items in this item group will have the + // 'OriginalItemGroup' metadata set indicating where they came from. + public class CollectPackLibraryResources : XamarinTask, IHasProjectDir, IHasResourcePrefix { + #region Inputs + + public ITaskItem [] AtlasTextures { get; set; } = Array.Empty (); + + public ITaskItem [] BundleResources { get; set; } = Array.Empty (); + + public ITaskItem [] ImageAssets { get; set; } = Array.Empty (); + + public ITaskItem [] InterfaceDefinitions { get; set; } = Array.Empty (); + + public ITaskItem [] ColladaAssets { get; set; } = Array.Empty (); + + public ITaskItem [] CoreMLModels { get; set; } = Array.Empty (); + + public ITaskItem [] PartialAppManifests { get; set; } = Array.Empty (); + + public ITaskItem [] SceneKitAssets { get; set; } = Array.Empty (); + + [Required] + public string ProjectDir { get; set; } = string.Empty; + + [Required] + public string ResourcePrefix { get; set; } = string.Empty; + + #endregion + + #region Outputs + + // These items will have the following metadata set: + // * LogicalName + // * OriginalItemGroup: the name of the originating item group + [Output] + public ITaskItem [] ItemsWithLogicalNames { get; set; } = Array.Empty (); + + #endregion + + public override bool Execute () + { + var prefixes = BundleResource.SplitResourcePrefixes (ResourcePrefix); + var rv = new List (); + + var resources = new [] { + new { Name = "AtlasTexture", Items = AtlasTextures }, + new { Name = "BundleResource", Items = BundleResources }, + new { Name = "Collada", Items = ColladaAssets }, + new { Name = "CoreMLModel", Items = CoreMLModels }, + new { Name = "ImageAsset", Items = ImageAssets }, + new { Name = "InterfaceDefinition", Items = InterfaceDefinitions }, + new { Name = "PartialAppManifest", Items = PartialAppManifests }, + new { Name = "SceneKitAsset", Items = SceneKitAssets }, + }; + + foreach (var kvp in resources) { + var itemName = kvp.Name; + var items = kvp.Items; + + foreach (var item in items) { + if (!CollectBundleResources.TryCreateItemWithLogicalName (this, item, out var itemWithLogicalName)) + continue; + + itemWithLogicalName.SetMetadata ("OriginalItemGroup", itemName); + rv.Add (itemWithLogicalName); + } + } + + ItemsWithLogicalNames = rv.ToArray (); + + return !Log.HasLoggedErrors; + } + } +} diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileEntitlements.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileEntitlements.cs index d0e08651c7b0..90091fe2d5dc 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileEntitlements.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileEntitlements.cs @@ -79,6 +79,7 @@ public class CompileEntitlements : XamarinTask, ITaskCallback, ICancelableTask { [Output] public ITaskItem? EntitlementsInSignature { get; set; } + public string ValidateEntitlements { get; set; } = string.Empty; #endregion protected string ApplicationIdentifierKey { @@ -510,6 +511,9 @@ public override bool Execute () } compiled = GetCompiledEntitlements (profile, template); + + ValidateAppEntitlements (profile, compiled); + archived = GetArchivedExpandedEntitlements (template, compiled); try { @@ -568,6 +572,63 @@ bool SaveArchivedExpandedEntitlements (PDictionary archived) return true; } + void ValidateAppEntitlements (MobileProvision? profile, PDictionary requestedEntitlements) + { + var onlyWarn = false; + switch (ValidateEntitlements?.ToLowerInvariant ()) { + case "disable": + return; + case "warn": + onlyWarn = true; + break; + case null: // default to 'error' + case "": + case "error": + onlyWarn = false; + break; + default: + Log.LogError (7138, null, MSBStrings.E7138, ValidateEntitlements); // Invalid value '{0}' for the 'ValidateEntitlements' property. Valid values are: 'disable', 'warn' or 'error'. + return; + } + + if (requestedEntitlements is null || requestedEntitlements.Count == 0) { + // Everything is OK if the app doesn't request any entitlements. + return; + } + + var provisioningEntitlements = profile?.Entitlements; + var provisioningProfileName = profile?.Name; + foreach (var kvp in requestedEntitlements) { + var key = kvp.Key; + switch (key) { + case "aps-environment": + var requestedApsEnvironment = (kvp.Value as PString)?.Value; + if (profile is null) { + LogEntitlementValidationFailure (onlyWarn, 7139, MSBStrings.E7139, key); // "The app requests the entitlement '{0}', but no provisioning profile has been specified. Please specify the name of the provisioning profile to use with the 'CodesignProvision' property in the project file. + } else if (provisioningEntitlements is null || !provisioningEntitlements.TryGetValue (key, out var provisioningApsEnvironment)) { + LogEntitlementValidationFailure (onlyWarn, 7140, MSBStrings.E7140, key, provisioningProfileName); // The app requests the entitlement '{0}', but the provisioning profile '{1}' does not contain this entitlement. + } else if (requestedApsEnvironment != provisioningApsEnvironment.Value) { + LogEntitlementValidationFailure (onlyWarn, 7137, MSBStrings.E7137, key, requestedApsEnvironment, provisioningProfileName, provisioningApsEnvironment.Value); // The app requests the entitlement '{0}' with the value '{1}', but the provisioning profile '{2}' grants it for the value '{3}'." + } else { + Log.LogMessage (MessageImportance.Low, $"The app requests the entitlement '{key}' with the value '{requestedApsEnvironment}', which the provisioning profile '{provisioningProfileName}' grants."); + } + break; + default: + Log.LogMessage (MessageImportance.Low, $"The app requests entitlement '{key}', but no validation has been implemented for this entitlement. Assuming everything is OK."); + break; + } + } + } + + void LogEntitlementValidationFailure (bool onlyWarn, int code, string message, params object? [] args) + { + if (onlyWarn) { + Log.LogWarning (code, Entitlements, message, args); + } else { + Log.LogError (code, Entitlements, message, args); + } + } + public bool ShouldCopyToBuildServer (ITaskItem item) => true; public bool ShouldCreateOutputFile (ITaskItem item) diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileSceneKitAssets.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileSceneKitAssets.cs index 7b4adf3adb9f..a16483592ad6 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileSceneKitAssets.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/CompileSceneKitAssets.cs @@ -118,6 +118,14 @@ Task CopySceneKitAssets (string scnassets, string output, string intermediate) return ExecuteAsync (GetFullPathToTool (), args, sdkDevPath: SdkDevPath, environment: environment, showErrorIfFailure: true); } + static bool TryGetScnAssetsPath (string file, out string scnassets) + { + scnassets = file; + while (scnassets.Length > 0 && Path.GetExtension (scnassets).ToLowerInvariant () != ".scnassets") + scnassets = Path.GetDirectoryName (scnassets); + return scnassets.Length > 0; + } + public override bool Execute () { if (ShouldExecuteRemotely ()) { @@ -140,15 +148,9 @@ public override bool Execute () continue; // get the .scnassets directory path - var scnassets = Path.GetDirectoryName (asset.ItemSpec); - while (scnassets.Length > 0 && Path.GetExtension (scnassets).ToLowerInvariant () != ".scnassets") - scnassets = Path.GetDirectoryName (scnassets); - - if (scnassets.Length == 0) + if (!TryGetScnAssetsPath (asset.ItemSpec, out var scnassets)) continue; - asset.RemoveMetadata ("LogicalName"); - var bundleName = BundleResource.GetLogicalName (this, asset); var output = new TaskItem (Path.Combine (intermediate, bundleName)); @@ -159,6 +161,13 @@ public override bool Execute () // .. but we really want it to be for @scnassets, so set ItemSpec accordingly scnassetsItem.ItemSpec = scnassets; + // .. and set LogicalName, the original one is for @asset + if (!TryGetScnAssetsPath (bundleName, out var logicalScnAssetsPath)) { + Log.LogError (null, null, null, asset.ItemSpec, MSBStrings.E7136 /* Unable to compute the path of the *.scnassets path from the item's LogicalName '{0}'. */ , bundleName); + continue; + } + scnassetsItem.SetMetadata ("LogicalName", logicalScnAssetsPath); + // .. and remove the @OriginalItemSpec which is for @asset scnassetsItem.RemoveMetadata ("OriginalItemSpec"); diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateEmbeddedResources.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateEmbeddedResources.cs index e550c47af9b4..c1da950e5fb7 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateEmbeddedResources.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateEmbeddedResources.cs @@ -19,17 +19,6 @@ public class CreateEmbeddedResources : XamarinTask { public override bool Execute () { - if (ShouldExecuteRemotely ()) { - foreach (var bundleResource in this.BundleResources) { - var logicalName = bundleResource.GetMetadata ("LogicalName"); - - if (!string.IsNullOrEmpty (logicalName)) { - logicalName = logicalName.Replace ("\\", "/"); - bundleResource.SetMetadata ("LogicalName", logicalName); - } - } - } - EmbeddedResources = new ITaskItem [BundleResources.Length]; for (int i = 0; i < BundleResources.Length; i++) { diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocationCore.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocation.cs similarity index 97% rename from msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocationCore.cs rename to msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocation.cs index 420a0fdc3783..31b1626bc8a2 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocationCore.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocation.cs @@ -184,6 +184,17 @@ void EnsureXamarinSdkRoot () } public override bool Execute () + { + try { + LoggingService.SetCustomLogger (this); + ExecuteImpl (); + return !Log.HasLoggedErrors; + } finally { + LoggingService.SetCustomLogger (null); + } + } + + bool ExecuteImpl () { if (ShouldExecuteRemotely ()) { // The new targets do not support the "default" value for the MtouchSdkVersion diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs index 953bf1cfdfea..19e8c1e37ac6 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSigningIdentity.cs @@ -17,6 +17,8 @@ namespace Xamarin.MacDev.Tasks { public class DetectSigningIdentity : XamarinTask, ITaskCallback, ICancelableTask { + CodeSignIdentity detectedIdentity; + const string AutomaticProvision = "Automatic"; const string AutomaticAdHocProvision = "Automatic:AdHoc"; const string AutomaticAppStoreProvision = "Automatic:AppStore"; @@ -284,8 +286,17 @@ void ReportDetectedCodesignInfo () Log.LogMessage (MessageImportance.High, MSBStrings.M0125); if (codesignCommonName is not null || !string.IsNullOrEmpty (DetectedCodeSigningKey)) Log.LogMessage (MessageImportance.High, " Code Signing Key: \"{0}\" ({1})", codesignCommonName, DetectedCodeSigningKey); - if (provisioningProfileName is not null) - Log.LogMessage (MessageImportance.High, " Provisioning Profile: \"{0}\" ({1})", provisioningProfileName, DetectedProvisioningProfile); + if (provisioningProfileName is not null) { + var profileEntitlements = detectedIdentity.Profile?.Entitlements; + var entitlements = profileEntitlements?.ToXml ().TrimEnd ().Replace ("\n", "\n "); + if (string.IsNullOrEmpty (entitlements)) { + Log.LogMessage (MessageImportance.High, " Provisioning Profile: \"{0}\" ({1}) - no entitlements", provisioningProfileName, DetectedProvisioningProfile); + } else { + Log.LogMessage (MessageImportance.High, " Provisioning Profile: \"{0}\" ({1}) - {2} entitlements", provisioningProfileName, DetectedProvisioningProfile, profileEntitlements?.Count ?? 0); + Log.LogMessage (MessageImportance.Low, $" Entitlements granted by the provisioning profile:"); + Log.LogMessage (MessageImportance.Low, $" {entitlements}"); + } + } Log.LogMessage (MessageImportance.High, " Bundle Id: {0}", BundleIdentifier); Log.LogMessage (MessageImportance.High, " App Id: {0}", DetectedAppId); } @@ -547,6 +558,8 @@ bool ExecuteImpl () IList certs; List pairs; + detectedIdentity = identity; + switch (SdkPlatform) { case "AppleTVSimulator": case "AppleTVOS": diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/PackLibraryResources.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/PackLibraryResources.cs index 163a08b432cd..2c8cca4505ba 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/PackLibraryResources.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/PackLibraryResources.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Collections.Generic; @@ -6,10 +7,9 @@ using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Xamarin.Localization.MSBuild; -using Xamarin.Messaging.Build.Client; namespace Xamarin.MacDev.Tasks { - public class PackLibraryResources : XamarinTask, ITaskCallback, ICancelableTask { + public class PackLibraryResources : XamarinTask, ICancelableTask { #region Inputs [Required] @@ -17,6 +17,8 @@ public class PackLibraryResources : XamarinTask, ITaskCallback, ICancelableTask public ITaskItem [] BundleResourcesWithLogicalNames { get; set; } = Array.Empty (); + public ITaskItem [] BundleOriginalResourcesWithLogicalNames { get; set; } = Array.Empty (); + #endregion #region Outputs @@ -43,43 +45,8 @@ public static string EscapeMangledResource (string name) return mangled.ToString (); } - bool ExecuteRemotely () - { - // Fix LogicalName path for the Mac - foreach (var resource in BundleResourcesWithLogicalNames) { - var logicalName = resource.GetMetadata ("LogicalName"); - - if (!string.IsNullOrEmpty (logicalName)) { - resource.SetMetadata ("LogicalName", logicalName.Replace ("\\", "/")); - } - } - - var runner = new TaskRunner (SessionId, BuildEngine4); - - try { - var result = runner.RunAsync (this).Result; - - if (result && EmbeddedResources is not null) { - // We must get the "real" file that will be embedded in the - // compiled assembly in Windows - foreach (var embeddedResource in EmbeddedResources.Where (x => runner.ShouldCopyItemAsync (task: this, item: x).Result)) { - runner.GetFileAsync (this, embeddedResource.ItemSpec).Wait (); - } - } - - return result; - } catch (Exception ex) { - Log.LogErrorFromException (ex); - - return false; - } - } - public override bool Execute () { - if (ShouldExecuteRemotely ()) - return ExecuteRemotely (); - var results = new List (); foreach (var item in BundleResourcesWithLogicalNames) { @@ -97,21 +64,34 @@ public override bool Execute () results.Add (embedded); } + foreach (var item in BundleOriginalResourcesWithLogicalNames) { + var originalItemGroup = item.GetMetadata ("OriginalItemGroup"); + if (!TryGetMangledLogicalName (item, originalItemGroup, out var mangledLogicalName)) + continue; + var embedded = new TaskItem (item); + embedded.SetMetadata ("LogicalName", mangledLogicalName); + results.Add (embedded); + } + EmbeddedResources = results.ToArray (); return !Log.HasLoggedErrors; } - public void Cancel () + bool TryGetMangledLogicalName (ITaskItem item, string itemName, [NotNullWhen (true)] out string? mangled) { - if (ShouldExecuteRemotely ()) - BuildConnection.CancelAsync (BuildEngine4).Wait (); + var logicalName = item.GetMetadata ("LogicalName"); + if (string.IsNullOrEmpty (logicalName)) { + Log.LogError (null, null, null, item.ItemSpec, 0, 0, 0, 0, MSBStrings.E0161); + mangled = null; + return false; + } + mangled = "__" + Prefix + "_item_" + itemName + "_" + EscapeMangledResource (logicalName); + return true; } - public bool ShouldCopyToBuildServer (ITaskItem item) => false; - - public bool ShouldCreateOutputFile (ITaskItem item) => false; - - public IEnumerable GetAdditionalItemsToBeCopied () => Enumerable.Empty (); + public void Cancel () + { + } } } diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/UnpackLibraryResources.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/UnpackLibraryResources.cs index 558c27d52b3c..d0081325f780 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Tasks/UnpackLibraryResources.cs +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/UnpackLibraryResources.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.IO; using System.Linq; using System.Reflection; @@ -11,12 +12,11 @@ using Microsoft.Build.Utilities; using Xamarin.Localization.MSBuild; -using Xamarin.Messaging.Build.Client; #nullable enable namespace Xamarin.MacDev.Tasks { - public class UnpackLibraryResources : XamarinTask, ITaskCallback, ICancelableTask { + public class UnpackLibraryResources : XamarinTask, ICancelableTask { List unpackedResources = new List (); #region Inputs @@ -47,27 +47,50 @@ public class UnpackLibraryResources : XamarinTask, ITaskCallback, ICancelableTas [Output] public ITaskItem [] UnpackedResources { get; set; } = Array.Empty (); - #endregion + [Output] + public ITaskItem [] AtlasTextures { get; set; } = Array.Empty (); - public override bool Execute () - { - if (ShouldExecuteRemotely ()) { - var result = new TaskRunner (SessionId, BuildEngine4).RunAsync (this).Result; + [Output] + public ITaskItem [] ColladaAssets { get; set; } = Array.Empty (); - if (result && BundleResourcesWithLogicalNames is not null) { - // Fix LogicalName path for Windows - foreach (var resource in BundleResourcesWithLogicalNames) { - var logicalName = resource.GetMetadata ("LogicalName"); + [Output] + public ITaskItem [] CoreMLModels { get; set; } = Array.Empty (); - if (!string.IsNullOrEmpty (logicalName)) { - resource.SetMetadata ("LogicalName", logicalName.Replace ("/", "\\")); - } - } - } - return result; - } + [Output] + public ITaskItem [] ImageAssets { get; set; } = Array.Empty (); - var results = new List (); + [Output] + public ITaskItem [] InterfaceDefinitions { get; set; } = Array.Empty (); + + [Output] + public ITaskItem [] PartialAppManifests { get; set; } = Array.Empty (); + + [Output] + public ITaskItem [] SceneKitAssets { get; set; } = Array.Empty (); + + #endregion + + enum ResourceType { + AtlasTexture, + BundleResource, + ColladaAsset, + CoreMLModel, + ImageAsset, + InterfaceDefinition, + PartialAppManifest, + SceneKitAsset, + } + + public override bool Execute () + { + var bundleResources = new List (); + var atlasTextures = new List (); + var colladaAssets = new List (); + var coreMLModels = new List (); + var imageAssets = new List (); + var interfaceDefinitions = new List (); + var partialAppManifests = new List (); + var sceneKitAssets = new List (); foreach (var asm in ReferencedLibraries) { // mscorlib.dll was not coming out with ResolvedFrom == {TargetFrameworkDirectory} @@ -78,15 +101,50 @@ public override bool Execute () var perAssemblyOutputPath = Path.Combine (IntermediateOutputPath, "unpack", asm.GetMetadata ("Filename")); var extracted = ExtractContentAssembly (asm.ItemSpec, perAssemblyOutputPath); - results.AddRange (extracted); - - var itemsFile = asm.GetMetadata ("ItemsFile"); - itemsFile = itemsFile.Replace ('\\', Path.DirectorySeparatorChar); - WriteItemsToFile.Write (this, itemsFile, extracted, "_BundleResourceWithLogicalName", true, true); + foreach (var tuple in extracted) { + var resourceType = tuple.Type; + var item = tuple.Item; + switch (resourceType) { + case ResourceType.AtlasTexture: + atlasTextures.Add (item); + break; + case ResourceType.BundleResource: + bundleResources.Add (item); + break; + case ResourceType.ColladaAsset: + colladaAssets.Add (item); + break; + case ResourceType.CoreMLModel: + coreMLModels.Add (item); + break; + case ResourceType.ImageAsset: + imageAssets.Add (item); + break; + case ResourceType.InterfaceDefinition: + interfaceDefinitions.Add (item); + break; + case ResourceType.PartialAppManifest: + partialAppManifests.Add (item); + break; + case ResourceType.SceneKitAsset: + sceneKitAssets.Add (item); + break; + default: + Log.LogError (MSBStrings.E7135 /* Unknown resource type: {1}. */, resourceType); + break; + } + } } } - BundleResourcesWithLogicalNames = results.ToArray (); + BundleResourcesWithLogicalNames = bundleResources.ToArray (); + AtlasTextures = atlasTextures.ToArray (); + ColladaAssets = colladaAssets.ToArray (); + CoreMLModels = coreMLModels.ToArray (); + ImageAssets = imageAssets.ToArray (); + InterfaceDefinitions = interfaceDefinitions.ToArray (); + PartialAppManifests = partialAppManifests.ToArray (); + SceneKitAssets = sceneKitAssets.ToArray (); UnpackedResources = unpackedResources.ToArray (); return !Log.HasLoggedErrors; @@ -102,22 +160,89 @@ bool IsFrameworkAssembly (ITaskItem asm) return false; } - List ExtractContentAssembly (string assembly, string intermediatePath) - { - var rv = new List (); + class AssemblyResource { + ResourceExtractor Extractor; + public ManifestResource ManifestResource; + public string Name; + public AssemblyResource (ResourceExtractor extractor, ManifestResource manifestResource, string name) + { + Extractor = extractor; + ManifestResource = manifestResource; + Name = name; + } + } - if (!File.Exists (assembly)) { - Log.LogMessage (MessageImportance.Low, $"Not inspecting assembly because it doesn't exist: {assembly}"); - return rv; + class ResourceExtractor : IDisposable, IEnumerable { + string assembly; + FileStream? peStream; + PEReader? peReader; + MetadataReader? metadataReader; + TaskLoggingHelper log; + + public ResourceExtractor (TaskLoggingHelper log, string assembly) + { + this.log = log; + this.assembly = assembly; } - try { - var asmWriteTime = File.GetLastWriteTimeUtc (assembly); - using var peStream = File.OpenRead (assembly); - using var peReader = new PEReader (peStream); - var metadataReader = PEReaderExtensions.GetMetadataReader (peReader); - Log.LogMessage (MessageImportance.Low, $"Inspecting resources in assembly {assembly}"); - foreach (var manifestResourceHandle in metadataReader.ManifestResources) { + public void Dispose () + { + peReader?.Dispose (); + peReader = null; + peStream?.Dispose (); + peStream = null; + } + + public void WriteResourceTo (AssemblyResource resource, string path) + { + if (peReader is null) + throw new ObjectDisposedException ("this"); + + Directory.CreateDirectory (Path.GetDirectoryName (path)); + + var manifestResource = resource.ManifestResource; + var resourceDirectory = peReader.GetSectionData (peReader.PEHeaders.CorHeader!.ResourcesDirectory.RelativeVirtualAddress); + var reader = resourceDirectory.GetReader ((int) manifestResource.Offset, resourceDirectory.Length - (int) manifestResource.Offset); + var length = reader.ReadUInt32 (); + if (length > reader.RemainingBytes) + throw new BadImageFormatException (); +#if NET + using var fs = new FileStream (path, FileMode.Create, FileAccess.Write, FileShare.Read); + unsafe { + var span = new ReadOnlySpan (reader.CurrentPointer, (int) length); + fs.Write (span); + } +#else + var buffer = new byte [4096]; + using var fs = new FileStream (path, FileMode.Create, FileAccess.Write, FileShare.Read, buffer.Length); + var left = (int) length; + while (left > 0) { + var read = Math.Min (left, buffer.Length); + reader.ReadBytes (read, buffer, 0); + fs.Write (buffer, 0, read); + left -= read; + } +#endif + } + + IEnumerator IEnumerable.GetEnumerator () + { + return ((IEnumerable) this).GetEnumerator (); + } + + IEnumerator IEnumerable.GetEnumerator () + { + if (!File.Exists (assembly)) + yield break; + + if (peStream is null) { + peStream = File.OpenRead (assembly); + peReader = new PEReader (peStream); + metadataReader = PEReaderExtensions.GetMetadataReader (peReader); + log.LogMessage (MessageImportance.Low, $"Inspecting resources in assembly {assembly}"); + } + + foreach (var manifestResourceHandle in metadataReader!.ManifestResources) { var manifestResource = metadataReader.GetManifestResource (manifestResourceHandle); if (!manifestResource.Implementation.IsNil) continue; // embedded resources have Implementation.IsNil = true, and those are the ones we care about @@ -126,62 +251,125 @@ List ExtractContentAssembly (string assembly, string intermediatePath if (string.IsNullOrEmpty (name)) continue; + yield return new AssemblyResource (this, manifestResource, name); + } + } + } + + class AssemblyContentResource { + public ResourceType Type; + public ITaskItem Item; + public AssemblyContentResource (ResourceType type, ITaskItem item) + { + Type = type; + Item = item; + } + } + + List ExtractContentAssembly (string assembly, string intermediatePath) + { + var rv = new List (); + + if (!File.Exists (assembly)) { + Log.LogMessage (MessageImportance.Low, $"Not inspecting assembly because it doesn't exist: {assembly}"); + return rv; + } + + var asmWriteTime = File.GetLastWriteTimeUtc (assembly); + using var extractor = new ResourceExtractor (Log, assembly); + + try { + // Log.LogMessage (MessageImportance.Low, " Searching resources in assembly: {0}", assembly); + foreach (var embedded in extractor) { string rpath; - if (name.StartsWith ("__" + Prefix + "_content_", StringComparison.Ordinal)) { - var mangled = name.Substring (("__" + Prefix + "_content_").Length); - rpath = UnmangleResource (mangled); - } else if (name.StartsWith ("__" + Prefix + "_page_", StringComparison.Ordinal)) { - var mangled = name.Substring (("__" + Prefix + "_page_").Length); - rpath = UnmangleResource (mangled); - } else { + var resourceName = embedded.Name; + var startsWith = "__" + Prefix + "_"; + if (!resourceName.StartsWith (startsWith, StringComparison.Ordinal)) { + Log.LogMessage (MessageImportance.Low, $" Not applicable resource (does not match prefix '{startsWith}'): {resourceName}"); continue; } - var path = Path.Combine (intermediatePath, rpath); + var underscoreIndex = resourceName.IndexOf ('_', startsWith.Length); + if (underscoreIndex == -1) { + Log.LogMessage (MessageImportance.Low, $" Not applicable resource (no content type found): {resourceName}"); + continue; + } + var contentType = resourceName.Substring (startsWith.Length, underscoreIndex - startsWith.Length); + var contentValue = resourceName.Substring (underscoreIndex + 1); + ResourceType resourceType; + string itemType; + switch (contentType) { + case "content": + case "page": + rpath = UnmangleResource (contentValue); + resourceType = ResourceType.BundleResource; + itemType = contentType; + break; + case "item": + var itemUnderscoreIndex = contentValue.IndexOf ('_'); + if (itemUnderscoreIndex == -1) { + Log.LogMessage (MessageImportance.Low, $" Not applicable resource (no item type in '{contentValue}'): {resourceName}"); + continue; + } + itemType = contentValue.Substring (0, itemUnderscoreIndex); + var itemValue = contentValue.Substring (itemUnderscoreIndex + 1); + rpath = UnmangleResource (itemValue); + switch (itemType) { + case "AtlasTexture": + resourceType = ResourceType.AtlasTexture; + break; + case "BundleResource": + resourceType = ResourceType.BundleResource; + break; + case "Collada": + resourceType = ResourceType.ColladaAsset; + break; + case "CoreMLModel": + resourceType = ResourceType.CoreMLModel; + break; + case "ImageAsset": + resourceType = ResourceType.ImageAsset; + break; + case "InterfaceDefinition": + resourceType = ResourceType.InterfaceDefinition; + break; + case "PartialAppManifest": + resourceType = ResourceType.PartialAppManifest; + break; + case "SceneKitAsset": + resourceType = ResourceType.SceneKitAsset; + break; + default: + Log.LogMessage (MessageImportance.Low, $" Not applicable resource (unknown item type in '{itemType}'): {resourceName}"); + continue; + } + break; + default: + Log.LogMessage (MessageImportance.Low, $" Not applicable resource (unknown content type '{contentType}'): {resourceName}"); + continue; + } + + var path = Path.Combine (intermediatePath, itemType, rpath); var file = new FileInfo (path); var item = new TaskItem (path); item.SetMetadata ("LogicalName", rpath); item.SetMetadata ("Optimize", "false"); + item.SetMetadata ("BundledInAssembly", assembly); if (file.Exists && file.LastWriteTimeUtc >= asmWriteTime) { - Log.LogMessage (" Up to date: {0}", rpath); + Log.LogMessage ($" Up to date (contentType: {contentType} resourceType: {resourceType} resourceName: {resourceName}): {path}"); } else { - Log.LogMessage (" Unpacking: {0}", rpath); - - Directory.CreateDirectory (Path.GetDirectoryName (path)); - - var resourceDirectory = peReader.GetSectionData (peReader.PEHeaders.CorHeader!.ResourcesDirectory.RelativeVirtualAddress); - var reader = resourceDirectory.GetReader ((int) manifestResource.Offset, resourceDirectory.Length - (int) manifestResource.Offset); - var length = reader.ReadUInt32 (); - if (length > reader.RemainingBytes) - throw new BadImageFormatException (); -#if NET - using var fs = new FileStream (path, FileMode.Create, FileAccess.Write, FileShare.Read); - unsafe { - var span = new ReadOnlySpan (reader.CurrentPointer, (int) length); - fs.Write (span); - } -#else - var buffer = new byte [4096]; - using var fs = new FileStream (path, FileMode.Create, FileAccess.Write, FileShare.Read, buffer.Length); - var left = (int) length; - while (left > 0) { - var read = Math.Min (left, buffer.Length); - reader.ReadBytes (read, buffer, 0); - fs.Write (buffer, 0, read); - left -= read; - } -#endif + extractor.WriteResourceTo (embedded, path); unpackedResources.Add (item); + Log.LogMessage ($" Unpacked (contentType: {contentType} resourceType: {resourceType} resourceName: {resourceName}): {path}"); } - - rv.Add (item); + rv.Add (new AssemblyContentResource (resourceType, item)); } } catch (Exception e) { Log.LogMessage (MessageImportance.Low, $"Unable to load the resources from the assembly '{assembly}': {e}"); - return new List (); + return new List (); } return rv; } @@ -221,42 +409,9 @@ static string UnmangleResource (string mangled) return unmangled.ToString (); } - public class ManifestResource { - readonly Func callback; - - public ManifestResource (string name, Func streamCallback) - { - callback = streamCallback; - Name = name; - } - - public string Name { - get; private set; - } - - public Stream Open () - { - return callback (); - } - } - public void Cancel () { - if (ShouldExecuteRemotely ()) - BuildConnection.CancelAsync (BuildEngine4).Wait (); } - public bool ShouldCopyToBuildServer (ITaskItem item) - { - if (item.IsFrameworkItem ()) - return false; - - return true; - } - - public bool ShouldCreateOutputFile (ITaskItem item) => UnpackedResources.Contains (item) == true; - - public IEnumerable GetAdditionalItemsToBeCopied () => ItemsFiles; - } } diff --git a/msbuild/Xamarin.MacDev.Tasks/Tasks/ValidateNoStaticLibraries.cs b/msbuild/Xamarin.MacDev.Tasks/Tasks/ValidateNoStaticLibraries.cs new file mode 100644 index 000000000000..99a98f94b21d --- /dev/null +++ b/msbuild/Xamarin.MacDev.Tasks/Tasks/ValidateNoStaticLibraries.cs @@ -0,0 +1,75 @@ +#nullable enable + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +using Xamarin.Localization.MSBuild; +using Xamarin.Messaging.Build.Client; +using Xamarin.Utils; + +namespace Xamarin.MacDev.Tasks { + public class ValidateNoStaticLibraries : Task { + public string SkipStaticLibraryValidation { get; set; } = string.Empty; + public ITaskItem [] ValidateItems { get; set; } = Array.Empty (); + + public override bool Execute () + { + bool onlyWarn = false; + switch (SkipStaticLibraryValidation.ToLowerInvariant ()) { + case "true": + case "disable": + return true; + case "": + case "error": + case "false": + onlyWarn = false; + break; + case "warn": + onlyWarn = true; + break; + default: + Log.LogError (7142, null, MSBStrings.E7142, SkipStaticLibraryValidation); // Unknown value for 'SkipStaticLibraryValidation': {0}. Valid values are: 'true', 'false', 'warn'. + return false; + } + + foreach (var item in ValidateItems) { + var path = item.ItemSpec; + if (Directory.Exists (path)) + continue; // directories are neither static libraries nor object files. + + if (!File.Exists (path)) { + if (onlyWarn) { + Log.LogWarning (158, path, MSBStrings.E0158 /* The file '{0}' does not exist. */, path); + } else { + Log.LogError (158, path, MSBStrings.E0158 /* The file '{0}' does not exist. */, path); + } + continue; + } + + if (!MachO.IsStaticLibraryOrObjectFile (path, throw_if_error: false, out var objectFile)) + continue; + + if (objectFile) { + if (onlyWarn) { + Log.LogWarning (7143, item.ItemSpec, MSBStrings.E7143, path); // The file {0} is an object file, and an object files are not supported with Hot Restart. + } else { + Log.LogError (7143, item.ItemSpec, MSBStrings.E7143, path); // The file {0} is an object file, and an object files are not supported with Hot Restart. + } + } else { + if (onlyWarn) { + Log.LogWarning (7141, item.ItemSpec, MSBStrings.E7141, path); // The library {0} is a static library, and static libraries are not supported with Hot Restart. + } else { + Log.LogError (7141, item.ItemSpec, MSBStrings.E7141, path); // The library {0} is a static library, and static libraries are not supported with Hot Restart. + } + } + } + + return !Log.HasLoggedErrors; + } + } +} diff --git a/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj b/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj index 06adde4c7fc1..1d3d42362bbe 100644 --- a/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj +++ b/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj @@ -48,21 +48,15 @@ - - - - - - + - diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets index c1d1fc9408d1..6d467ab74dbc 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding.targets @@ -85,7 +85,6 @@ Copyright (C) 2020 Microsoft. All rights reserved. diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.props b/msbuild/Xamarin.Shared/Xamarin.Shared.props index b49c25e93ff8..fcee4cf09aa7 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.props +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.props @@ -286,6 +286,12 @@ Copyright (C) 2020 Microsoft. All rights reserved. all <_AppBundleName>$(AssemblyName) + + + true + + + <_BundleOriginalResources Condition="'$(OutputType)' == 'Library' And '$(IsAppExtension)' != 'true' And '$(BundleOriginalResources)' == 'true'">true diff --git a/msbuild/Xamarin.Shared/Xamarin.Shared.targets b/msbuild/Xamarin.Shared/Xamarin.Shared.targets index 0de60c406da0..1b9126d20524 100644 --- a/msbuild/Xamarin.Shared/Xamarin.Shared.targets +++ b/msbuild/Xamarin.Shared/Xamarin.Shared.targets @@ -45,6 +45,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. + @@ -103,6 +104,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. + @@ -121,6 +123,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. False False + False @@ -427,6 +430,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. $(CollectBundleResourcesDependsOn); + _UnpackLibraryResources; _CompileImageAssets; _CompileInterfaceDefinitions; _CompileSceneKitAssets; @@ -455,13 +459,14 @@ Copyright (C) 2018 Microsoft. All rights reserved. @@ -534,6 +539,25 @@ Copyright (C) 2018 Microsoft. All rights reserved. + + + + + + + + @@ -636,7 +661,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. @@ -769,7 +795,10 @@ Copyright (C) 2018 Microsoft. All rights reserved. - + - + - + + + + + + + + + + + + + $(_MarshalManagedExceptionMode) + $(_MarshalObjectiveCExceptionMode) + + - - + + diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Properties/AssemblyInfo.cs b/msbuild/Xamarin.iOS.Tasks.Windows/Properties/AssemblyInfo.cs index b2bee70d6bae..da3a65b40574 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Properties/AssemblyInfo.cs +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Properties/AssemblyInfo.cs @@ -3,8 +3,8 @@ using System.Runtime.CompilerServices; [assembly: AssemblyCompanyAttribute ("Microsoft Corp.")] -[assembly: AssemblyFileVersionAttribute (VersionConstants.XamarinIOSVersion)] -[assembly: AssemblyInformationalVersionAttribute (VersionConstants.XamarinIOSVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] +[assembly: AssemblyFileVersionAttribute (VersionConstants.NuGetVersion + ".0")] +[assembly: AssemblyInformationalVersionAttribute (VersionConstants.NuGetVersion + "." + VersionConstants.NuGetPrereleaseIdentifier + "+" + VersionConstants.NuGetBuildMetadata)] [assembly: AssemblyProductAttribute ("Xamarin.iOS.Tasks.Windows")] [assembly: AssemblyTitleAttribute ("Xamarin.iOS.Tasks.Windows")] -[assembly: AssemblyVersionAttribute (VersionConstants.XamarinIOSVersion)] +[assembly: AssemblyVersionAttribute (VersionConstants.NuGetVersion + ".0")] diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.Messaging.Apple.targets b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.Messaging.Apple.targets index b2f8693b7813..4d4fce86e5f0 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.Messaging.Apple.targets +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.Messaging.Apple.targets @@ -21,6 +21,7 @@ True False + False diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets index 79aba691267c..d9e963f75caa 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets @@ -35,7 +35,7 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved. - + <_BundleResourceWithLogicalName> @@ -201,7 +201,7 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved. - diff --git a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets index f543eaef3935..04dcb57661cf 100644 --- a/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets +++ b/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.HotRestart.targets @@ -52,7 +52,14 @@ - + + + + + $@ - -Version.rev: - $(Q) echo "$(IOS_PACKAGE_VERSION_BUILD)" > $@ - diff --git a/scripts/generate-frameworks/generate-frameworks.cs b/scripts/generate-frameworks/generate-frameworks.cs index e3d23815bb42..500135365f1d 100755 --- a/scripts/generate-frameworks/generate-frameworks.cs +++ b/scripts/generate-frameworks/generate-frameworks.cs @@ -2,7 +2,7 @@ using System.Text; try { - var actualArgumentCount = 6; + var actualArgumentCount = 5; if (args.Length != actualArgumentCount) { Console.WriteLine ($"Need {actualArgumentCount} arguments, got {args.Length} arguments"); return 1; @@ -12,22 +12,20 @@ args = args.Skip (1).ToArray (); - var iosframeworks = args [0].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - var macosframeworks = args [1].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - var watchosframeworks = args [2].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - var tvosframeworks = args [3].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - var maccatalystframeworks = args [4].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + var idx = 0; + var iosframeworks = args [idx++].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + var macosframeworks = args [idx++].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + var tvosframeworks = args [idx++].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + var maccatalystframeworks = args [idx++].Split (new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var allframeworks = new string [] [] { iosframeworks, macosframeworks, - watchosframeworks, tvosframeworks, maccatalystframeworks, }; var names = new string [] { "iosframeworks", "macosframeworks", - "watchosframeworks", "tvosframeworks", "maccatalystframeworks", }; diff --git a/scripts/generate-workloaddependencies-json/README.md b/scripts/generate-workloaddependencies-json/README.md new file mode 100644 index 000000000000..7f65c098f983 --- /dev/null +++ b/scripts/generate-workloaddependencies-json/README.md @@ -0,0 +1 @@ +# generate-workload-dependencies diff --git a/scripts/generate-workloaddependencies-json/fragment.mk b/scripts/generate-workloaddependencies-json/fragment.mk new file mode 100644 index 000000000000..dc98042c5e22 --- /dev/null +++ b/scripts/generate-workloaddependencies-json/fragment.mk @@ -0,0 +1,2 @@ +include $(TOP)/scripts/template.mk +$(eval $(call TemplateScript,GENERATE_WORKLOADDEPENDENCIES_JSON,generate-workloaddependencies-json)) diff --git a/scripts/generate-workloaddependencies-json/generate-workloaddependencies-json.cs b/scripts/generate-workloaddependencies-json/generate-workloaddependencies-json.cs new file mode 100644 index 000000000000..0b18f22d0572 --- /dev/null +++ b/scripts/generate-workloaddependencies-json/generate-workloaddependencies-json.cs @@ -0,0 +1,39 @@ +// arguments are: + +using System.IO; +using System.Xml; + +var expectedArgumentCount = 5; +if (args.Length != expectedArgumentCount) { + Console.WriteLine ($"Need {expectedArgumentCount} arguments, got {args.Length}"); + return 1; +} + +var argumentIndex = 0; +var platform = args [argumentIndex++]; +var version = args [argumentIndex++]; +var xcodeVersion = args [argumentIndex++]; +var sdkVersion = args [argumentIndex++]; +var outputPath = args [argumentIndex++]; + +var platformLowerCase = platform.ToLowerInvariant (); + +using (var writer = new StreamWriter (outputPath)) { + writer.WriteLine ($"{{"); + writer.WriteLine ($" \"microsoft.net.sdk.{platformLowerCase}\": {{"); + writer.WriteLine ($" \"workload\": {{"); + writer.WriteLine ($" \"alias\": [ \"{platformLowerCase}\" ],"); + writer.WriteLine ($" \"version\": \"{version}\""); + writer.WriteLine ($" }},"); + writer.WriteLine ($" \"xcode\": {{"); + writer.WriteLine ($" \"version\": \"[{xcodeVersion},)\","); + writer.WriteLine ($" \"recommendedVersion\": \"{xcodeVersion}\""); + writer.WriteLine ($" }},"); + writer.WriteLine ($" \"sdk\": {{"); + writer.WriteLine ($" \"version\": \"{sdkVersion}\""); + writer.WriteLine ($" }}"); + writer.WriteLine ($" }}"); + writer.WriteLine ($"}}"); +} + +return 0; diff --git a/scripts/generate-workloaddependencies-json/generate-workloaddependencies-json.csproj b/scripts/generate-workloaddependencies-json/generate-workloaddependencies-json.csproj new file mode 100644 index 000000000000..036ee45034c7 --- /dev/null +++ b/scripts/generate-workloaddependencies-json/generate-workloaddependencies-json.csproj @@ -0,0 +1,5 @@ + + + net$(BundledNETCoreAppTargetFrameworkVersion) + + diff --git a/scripts/rsp-to-csproj/README.md b/scripts/rsp-to-csproj/README.md new file mode 100644 index 000000000000..a656ae1b88a8 --- /dev/null +++ b/scripts/rsp-to-csproj/README.md @@ -0,0 +1,3 @@ +# rsp-to-csproj + +This script takes a csc response file (rsp) and creates a csproj from it. diff --git a/scripts/rsp-to-csproj/fragment.mk b/scripts/rsp-to-csproj/fragment.mk new file mode 100644 index 000000000000..93af7c3e1131 --- /dev/null +++ b/scripts/rsp-to-csproj/fragment.mk @@ -0,0 +1,2 @@ +include $(TOP)/scripts/template.mk +$(eval $(call TemplateScript,RSP_TO_CSPROJ,rsp-to-csproj)) diff --git a/scripts/rsp-to-csproj/rsp-to-csproj.cs b/scripts/rsp-to-csproj/rsp-to-csproj.cs new file mode 100644 index 000000000000..0e3ce7e2c7e0 --- /dev/null +++ b/scripts/rsp-to-csproj/rsp-to-csproj.cs @@ -0,0 +1,212 @@ +using System.IO; +using System.Text; + +using Mono.Options; + +var output = string.Empty; +var rspFiles = new List (); +var workingDirectory = string.Empty; +var targetFramework = string.Empty; +var verbose = false; +var fullPaths = true; + +var options = new OptionSet { + { "output=", (v) => output = v }, + { "rsp=", (v) => rspFiles.Add (v) }, + { "working-directory=", (v) => workingDirectory = v }, + { "target-framework=", (v) => targetFramework = v }, + { "v|verbose", (v) => verbose = true }, +}; + +int exitCode = 0; + +void ReportError (string message) +{ + Console.Error.WriteLine ($"rsp-to-csproj: {message}"); + exitCode = 1; +} + +var unhandled = options.Parse (args); +if (unhandled.Any ()) { + ReportError ($"Didn't understand these arguments:"); + foreach (var u in unhandled) + ReportError ($" {u}"); + return exitCode; +} + +if (string.IsNullOrEmpty (output)) { + ReportError ($"No output file specified"); + return exitCode; +} + +var sourceFiles = new List (); +var arguments = new List (); + +foreach (var file in rspFiles) + ProcessFile (file); + +string GetFullPath (string path) +{ + if (!fullPaths) + return path; + return Path.GetFullPath (path); +} + +void ProcessFile (string file) +{ + if (verbose) + Console.WriteLine ($"Reading {file}..."); + var lines = File.ReadAllLines (file); + foreach (var line in lines) { + var elements = line.Split (' '); // at this moment we don't need to handle arguments or files with spaces, so make it simple + foreach (var element in elements) { + if (string.IsNullOrEmpty (element)) + continue; + if (element [0] == '@') { + ProcessFile (element [1..]); + continue; + } else if (element [0] == '/') { + arguments.Add (element [1..]); + } else if (element [0] == '-') { + if (element.Length > 1 && element [1] == '-') { + arguments.Add (element [2..]); + } else { + arguments.Add (element [1..]); + } + } else { + sourceFiles.Add (element); + } + } + } +} + +var properties = new List<(string Name, string Value)> (); +var items = new List<(string Name, string Include)> (); + +if (verbose) + Console.WriteLine ($"Found {arguments.Count} arguments and {sourceFiles.Count} files."); + +foreach (var a in arguments) { + var splitIndex = a.IndexOfAny (new char [] { ':', '=' }); + var name = a; + var value = string.Empty; + if (splitIndex >= 0) { + name = a [..splitIndex]; + value = a [(splitIndex + 1)..]; + } + switch (name) { + case "D": + case "d": + case "define": + properties.Add (new ("DefineConstants", $"$(DefineConstants);{value}")); + break; + case "unsafe": + properties.Add (new ("AllowUnsafeBlocks", "true")); + break; + case "deterministic": + properties.Add (new ("Deterministic", "true")); + break; + case "nologo": + properties.Add (new ("NoLogo", "true")); + break; + case "nostdlib+": + properties.Add (new ("NoCompilerStandardLib", "true")); + break; + case "embed": + foreach (var e in value.Split (',')) + items.Add (new ("EmbeddedFiles", GetFullPath (e))); + break; + case "features": + properties.Add (new ("Features", "strict")); + break; + case "target": + properties.Add (new ("OutputType", "Library")); + break; + case "optimize": + properties.Add (new ("Optimize", "true")); + break; + case "keyfile": + properties.Add (new ("KeyOriginatorFile", GetFullPath (value))); + break; + case "publicsign": + properties.Add (new ("PublicSign", "true")); + break; + case "refout": + properties.Add (new ("IntermediateRefAssembly", GetFullPath (value))); + break; + case "out": + properties.Add (new ("IntermediateAssembly", GetFullPath (value))); + break; + case "debug": + properties.Add (new ("DebugSymbols", "true")); + break; + case "nowarn": + properties.Add (new ("NoWarn", $"$(NoWarn);{value}")); + break; + case "res": + items.Add (new ("EmbeddedResource", GetFullPath (value))); + break; + case "warnaserror": + properties.Add (new ("WarningsAsErrors", value)); + break; + case "warnaserror+": + properties.Add (new ("TreatWarningsAsErrors", "true")); + break; + case "doc": + properties.Add (new ("DocumentationFile", GetFullPath (value))); + break; + case "sourcelink": + properties.Add (new ("SourceLink", GetFullPath (value))); + break; + case "nullable+": + properties.Add (new ("Nullable", "enable")); + break; + case "r": + items.Add (new ("ReferencePathWithRefAssemblies", GetFullPath (value))); + break; + case "nostdlib": + items.Add (new ("NoStdLib", "true")); + break; + case "analyzer": + items.Add (new ("Analyzer", GetFullPath (value))); + break; + case "generatedfilesout": + properties.Add (new ("GeneratedFilesOutputPath", GetFullPath (value))); + break; + case "noconfig": // this is already passed to csc by default + break; + default: + ReportError ($"Didn't understand argument '{a}'"); + break; + } +} + +foreach (var file in sourceFiles) { + items.Add (new ("Compile", GetFullPath (file))); +} + +var sb = new StringBuilder (); +sb.AppendLine ($""); +sb.AppendLine ($" "); +sb.AppendLine ($" {targetFramework}"); +sb.AppendLine ($" false"); +sb.AppendLine ($" false"); +sb.AppendLine ($" false"); +sb.AppendLine ($" false"); +foreach (var prop in properties) { + sb.AppendLine ($" <{prop.Name}>{prop.Value}"); +} +sb.AppendLine ($" "); +sb.AppendLine ($" "); +foreach (var item in items) { + sb.AppendLine ($" <{item.Name} Include=\"{item.Include}\" />"); +} +sb.AppendLine ($" "); +sb.AppendLine ($""); +if (string.IsNullOrEmpty (output)) { + Console.WriteLine (sb); +} else { + File.WriteAllText (output, sb.ToString ()); +} + +return exitCode; diff --git a/scripts/rsp-to-csproj/rsp-to-csproj.csproj b/scripts/rsp-to-csproj/rsp-to-csproj.csproj new file mode 100644 index 000000000000..d6b52d01cd9f --- /dev/null +++ b/scripts/rsp-to-csproj/rsp-to-csproj.csproj @@ -0,0 +1,8 @@ + + + net$(BundledNETCoreAppTargetFrameworkVersion) + + + + + diff --git a/src/AVFoundation/AVAssetDownloadTask.cs b/src/AVFoundation/AVAssetDownloadTask.cs index 4f1808fbc3e4..486f7d89188d 100644 --- a/src/AVFoundation/AVAssetDownloadTask.cs +++ b/src/AVFoundation/AVAssetDownloadTask.cs @@ -13,7 +13,7 @@ #nullable enable namespace AVFoundation { -#if !MONOMAC && !WATCH && !TVOS +#if !MONOMAC && !TVOS public partial class AVAssetDownloadTask : NSUrlSessionTask { // NSURLRequest and NSURLResponse objects are not available for AVAssetDownloadTask diff --git a/src/AVFoundation/AVAssetDownloadUrlSession.cs b/src/AVFoundation/AVAssetDownloadUrlSession.cs index a1d6a29d83e5..4e22e6493907 100644 --- a/src/AVFoundation/AVAssetDownloadUrlSession.cs +++ b/src/AVFoundation/AVAssetDownloadUrlSession.cs @@ -6,7 +6,7 @@ // // Copyright 2015 Xamarin Inc. // -#if !TVOS && !WATCH +#if !TVOS using System; using Foundation; using ObjCRuntime; diff --git a/src/AVFoundation/AVAssetImageGenerator.cs b/src/AVFoundation/AVAssetImageGenerator.cs deleted file mode 100644 index a2714c672518..000000000000 --- a/src/AVFoundation/AVAssetImageGenerator.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2012, 2014 Xamarin Inc -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#nullable enable - -#if !NET && WATCH // This empty partial class was accidentally included in our watchOS bindings. -namespace AVFoundation { - public partial class AVAssetImageGenerator { - } -} -#endif diff --git a/src/AVFoundation/AVAssetReaderVideoCompositionOutput.cs b/src/AVFoundation/AVAssetReaderVideoCompositionOutput.cs deleted file mode 100644 index bec31d41ca7b..000000000000 --- a/src/AVFoundation/AVAssetReaderVideoCompositionOutput.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// AVAssetReaderVideoCompositionOutput.cs: Extra support methods -// -// Authors: -// Miguel de Icaza -// -// Copyright 2011, 2014 Novell, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#nullable enable - -#if !NET && WATCH // This empty partial class was accidentally included in our watchOS bindings. -namespace AVFoundation { - public partial class AVAssetReaderVideoCompositionOutput { - } -} -#endif diff --git a/src/AVFoundation/AVAssetResourceLoadingDataRequest.cs b/src/AVFoundation/AVAssetResourceLoadingDataRequest.cs index 758e126001d3..fe67024cf2ee 100644 --- a/src/AVFoundation/AVAssetResourceLoadingDataRequest.cs +++ b/src/AVFoundation/AVAssetResourceLoadingDataRequest.cs @@ -7,8 +7,6 @@ // Copyright 2012, 2014 Xamarin Inc // -#if !WATCH - using System; using Foundation; @@ -22,5 +20,3 @@ public override string ToString () } } } - -#endif diff --git a/src/AVFoundation/AVAudioBuffer.cs b/src/AVFoundation/AVAudioBuffer.cs index dfbcbaef28eb..10bea97fba25 100644 --- a/src/AVFoundation/AVAudioBuffer.cs +++ b/src/AVFoundation/AVAudioBuffer.cs @@ -5,8 +5,6 @@ // Miguel de Icaza // -#if !WATCH - using Foundation; using System; using AudioToolbox; @@ -28,5 +26,3 @@ public AudioBuffers MutableAudioBufferList { } } } - -#endif diff --git a/src/AVFoundation/AVAudioPlayer.cs b/src/AVFoundation/AVAudioPlayer.cs index c24c47f09fad..20eccabdea21 100644 --- a/src/AVFoundation/AVAudioPlayer.cs +++ b/src/AVFoundation/AVAudioPlayer.cs @@ -29,52 +29,103 @@ #nullable enable namespace AVFoundation { -#if !WATCH public partial class AVAudioPlayer { + /// Create a new from the specified url and hint for the file type. + /// The url of a local audio file. + /// The uniform type identifier for the audio format. + /// An object describing the error in case an error occurs, null otherwise. + /// A new instance if successful, null otherwise. + public static AVAudioPlayer? FromUrl (NSUrl url, NSString? fileTypeHint, out NSError? error) + { + var rv = new AVAudioPlayer (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithContentsOfUrl (url, fileTypeHint, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); + return null; + } + return rv; + } - [DllImport (Constants.ObjectiveCLibrary, EntryPoint = "objc_msgSend")] - unsafe static extern IntPtr objc_msgSend (IntPtr receiver, IntPtr selector, IntPtr arg1, IntPtr* arg2); + /// Create a new from the specified url and hint for the file type. + /// The url of a local audio file. + /// The uniform type identifier for the audio format. + /// An object describing the error in case an error occurs, null otherwise. + /// A new instance if successful, null otherwise. + public static AVAudioPlayer? FromUrl (NSUrl url, AVFileTypes fileTypeHint, out NSError? error) + { + return FromUrl (url, fileTypeHint.GetConstant (), out error); + } + /// Create a new from the specified url. + /// The url of a local audio file. + /// An object describing the error in case an error occurs, null otherwise. + /// A new instance if successful, null otherwise. public static AVAudioPlayer? FromUrl (NSUrl url, out NSError? error) { - error = null; - IntPtr url__handle__ = url!.GetNonNullHandle (nameof (url)); - IntPtr handle = Messaging.IntPtr_objc_msgSend (class_ptr, Selector.GetHandle ("alloc")); - IntPtr errorptr = IntPtr.Zero; - if (handle == IntPtr.Zero) + var rv = new AVAudioPlayer (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithContentsOfUrl (url, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); return null; - unsafe { - handle = objc_msgSend (handle, Selector.GetHandle ("initWithContentsOfURL:error:"), url__handle__, &errorptr); } - error = Runtime.GetNSObject (errorptr); - return Runtime.GetNSObject (handle, owns: true); + return rv; } + /// Create a new from the specified url. + /// The url of a local audio file. + /// A new instance if successful, null otherwise. public static AVAudioPlayer? FromUrl (NSUrl url) { return FromUrl (url, out _); } - public static AVAudioPlayer? FromData (NSData data, out NSError? error) + /// Create a new from the specified data and hint for the file type. + /// The audio data to play. + /// The uniform type identifier for the audio format. + /// An object describing the error in case an error occurs, null otherwise. + /// A new instance if successful, null otherwise. + public static AVAudioPlayer? FromData (NSData data, AVFileTypes fileTypeHint, out NSError? error) { - error = null; - IntPtr data__handle__ = data!.GetNonNullHandle (nameof (data)); - IntPtr errorptr = IntPtr.Zero; - IntPtr handle = Messaging.IntPtr_objc_msgSend (class_ptr, Selector.GetHandle ("alloc")); + return FromData (data, fileTypeHint.GetConstant (), out error); + } - if (handle == IntPtr.Zero) + /// Create a new from the specified data and hint for the file type. + /// The audio data to play. + /// The uniform type identifier for the audio format. + /// An object describing the error in case an error occurs, null otherwise. + /// A new instance if successful, null otherwise. + public static AVAudioPlayer? FromData (NSData data, NSString? fileTypeHint, out NSError? error) + { + var rv = new AVAudioPlayer (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithData (data, fileTypeHint, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); + return null; + } + return rv; + } + + /// Create a new from the specified data. + /// The audio data to play. + /// An object describing the error in case an error occurs, null otherwise. + /// A new instance if successful, null otherwise. + public static AVAudioPlayer? FromData (NSData data, out NSError? error) + { + var rv = new AVAudioPlayer (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithData (data, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); return null; - unsafe { - handle = objc_msgSend (handle, Selector.GetHandle ("initWithData:error:"), data__handle__, &errorptr); } - error = Runtime.GetNSObject (errorptr); - return Runtime.GetNSObject (handle, owns: true); + return rv; } + /// Create a new from the specified data. + /// The audio data to play. + /// A new instance if successful, null otherwise. public static AVAudioPlayer? FromData (NSData data) { return FromData (data, out _); } } -#endif // !WATCH } diff --git a/src/AVFoundation/AVAudioRecorder.cs b/src/AVFoundation/AVAudioRecorder.cs index 62efd2148d40..3b21b7a3c5e4 100644 --- a/src/AVFoundation/AVAudioRecorder.cs +++ b/src/AVFoundation/AVAudioRecorder.cs @@ -22,8 +22,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !WATCH - using Foundation; using CoreFoundation; using AudioToolbox; @@ -92,5 +90,3 @@ public partial class AVAudioRecorder { } #endif // !TVOS } - -#endif // !WATCH diff --git a/src/AVFoundation/AVAudioSessionDataSourceDescription.cs b/src/AVFoundation/AVAudioSessionDataSourceDescription.cs index cb51e5fe1f01..853d2591cc4a 100644 --- a/src/AVFoundation/AVAudioSessionDataSourceDescription.cs +++ b/src/AVFoundation/AVAudioSessionDataSourceDescription.cs @@ -13,15 +13,26 @@ namespace AVFoundation { public enum AVAudioDataSourceLocation { - Unknown, Upper, Lower + Unknown, + Upper, + Lower, } public enum AVAudioDataSourceOrientation { - Unknown, Top, Bottom, Front, Back, Left, Right + Unknown, + Top, + Bottom, + Front, + Back, + Left, + Right, } public enum AVAudioDataSourcePolarPattern { - Unknown, Omnidirectional, Cardioid, Subcardioid + Unknown, + Omnidirectional, + Cardioid, + Subcardioid, } public partial class AVAudioSessionDataSourceDescription { @@ -85,7 +96,6 @@ public AVAudioDataSourceOrientation Orientation { } } -#if !WATCH public AVAudioDataSourcePolarPattern []? SupportedPolarPatterns { get { var x = SupportedPolarPatterns_; @@ -116,7 +126,6 @@ public bool SetPreferredPolarPattern (AVAudioDataSourcePolarPattern pattern, out { return SetPreferredPolarPattern_ (ToToken (pattern), out outError); } -#endif } } #endif diff --git a/src/AVFoundation/AVAudioVoiceProcessingOtherAudioDuckingConfiguration.cs b/src/AVFoundation/AVAudioVoiceProcessingOtherAudioDuckingConfiguration.cs new file mode 100644 index 000000000000..04306170bafa --- /dev/null +++ b/src/AVFoundation/AVAudioVoiceProcessingOtherAudioDuckingConfiguration.cs @@ -0,0 +1,31 @@ +using System; +using System.Runtime.InteropServices; +using ObjCRuntime; + +#if !TVOS + +namespace AVFoundation { + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("macos14.0")] + [UnsupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("maccatalyst17.0")] + public struct AVAudioVoiceProcessingOtherAudioDuckingConfiguration { + byte enableAdvancedDucking; +#pragma warning disable CS0169 // The field 'AVAudioVoiceProcessingOtherAudioDuckingConfiguration.duckingLevel' is never used + nint duckingLevel; +#pragma warning restore CS0169 + + public bool EnableAdvancedDucking { + get => enableAdvancedDucking != 0; + set => enableAdvancedDucking = value.AsByte (); + } + +#if !COREBUILD + public AVAudioVoiceProcessingOtherAudioDuckingLevel DuckingLevel { + get => (AVAudioVoiceProcessingOtherAudioDuckingLevel) (long) duckingLevel; + set => duckingLevel = (nint) (long) value; + } +#endif + } +} +#endif diff --git a/src/AVFoundation/AVCaptureConnection.cs b/src/AVFoundation/AVCaptureConnection.cs index 57bf9ddc0639..bc42ae6d88f9 100644 --- a/src/AVFoundation/AVCaptureConnection.cs +++ b/src/AVFoundation/AVCaptureConnection.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !TVOS && !WATCH +#if !TVOS using System; using ObjCRuntime; diff --git a/src/AVFoundation/AVCaptureDeviceInput.cs b/src/AVFoundation/AVCaptureDeviceInput.cs index 4946b46efd60..123f730115d9 100644 --- a/src/AVFoundation/AVCaptureDeviceInput.cs +++ b/src/AVFoundation/AVCaptureDeviceInput.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !TVOS && !WATCH +#if !TVOS using System; using Foundation; diff --git a/src/AVFoundation/AVCaptureFileOutput.cs b/src/AVFoundation/AVCaptureFileOutput.cs index 7bc72ece5d3f..4277ade9daad 100644 --- a/src/AVFoundation/AVCaptureFileOutput.cs +++ b/src/AVFoundation/AVCaptureFileOutput.cs @@ -7,7 +7,7 @@ // Copyright 2014 Xamarin Inc (http://www.xamarin.com) // -#if !TVOS && !WATCH +#if !TVOS using System; using Foundation; @@ -46,4 +46,4 @@ public void StartRecordingToOutputFile (NSUrl outputFileUrl, Action } } -#endif // !TVOS && !WATCH +#endif // !TVOS diff --git a/src/AVFoundation/AVCaptureReactionType.rgen.cs b/src/AVFoundation/AVCaptureReactionType.rgen.cs index bec948caf11e..eda4c046827f 100644 --- a/src/AVFoundation/AVCaptureReactionType.rgen.cs +++ b/src/AVFoundation/AVCaptureReactionType.rgen.cs @@ -1,7 +1,9 @@ #pragma warning disable APL0003 using System; +using System.Runtime.InteropServices; using System.Runtime.Versioning; +using CoreFoundation; using ObjCRuntime; using ObjCBindings; @@ -39,5 +41,28 @@ public enum AVCaptureReactionType { [Field ("AVCaptureReactionTypeLasers")] Lasers, } + + public static class AVCaptureReactionType_Extensions { + [DllImport (Constants.AVFoundationLibrary)] + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("tvos17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + static extern IntPtr AVCaptureReactionSystemImageNameForType (IntPtr reactionType); + + /// Get the name of the system image that is the recommended iconography for the specified reaction type. + /// The reaction type whose system image should be returned. + /// The name of the system image that is the recommended iconography for the specified reaction type. + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("tvos17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + public static string GetSystemImage (this AVCaptureReactionType reactionType) + { + var constant = reactionType.GetConstant (); + var image = AVCaptureReactionSystemImageNameForType (constant.GetHandle ()); + return CFString.FromHandle (image, false)!; + } + } } #pragma warning restore APL0003 diff --git a/src/AVFoundation/AVCaptureVideoPreviewLayer.cs b/src/AVFoundation/AVCaptureVideoPreviewLayer.cs index 7435367ef867..6386ad9e7c14 100644 --- a/src/AVFoundation/AVCaptureVideoPreviewLayer.cs +++ b/src/AVFoundation/AVCaptureVideoPreviewLayer.cs @@ -1,4 +1,4 @@ -#if !WATCH && !TVOS +#if !TVOS using System; diff --git a/src/AVFoundation/AVCompat.cs b/src/AVFoundation/AVCompat.cs index 6a4d9d0e3c67..5de7be02a6c2 100644 --- a/src/AVFoundation/AVCompat.cs +++ b/src/AVFoundation/AVCompat.cs @@ -33,7 +33,6 @@ public AVAudioSourceNode (AVAudioFormat format, AVAudioSourceNodeRenderHandler r throw new InvalidOperationException ("Do not use this constructor. Use the 'AVAudioSourceNode (AVAudioFormat, AVAudioSourceNodeRenderHandler2)' constructor instead."); } } -#if !WATCH #if MONOMAC [Obsolete ("This API is not available on this platform.")] public partial class AVCaptureDataOutputSynchronizer : NSObject @@ -471,7 +470,6 @@ public AVAssetDownloadTask GetAssetDownloadTask (AVUrlAsset urlAsset, string tit } #endif // TVOS -#endif // !WATCH #if IOS // includes __MACCATALYST__ public partial class AVCaptureManualExposureBracketedStillImageSettings { @@ -521,7 +519,6 @@ public virtual AVPlayerItem [] InterstitialTemplateItems { [Deprecated (PlatformName.MacOSX, 12, 0, PlatformArchitecture.All)] [Deprecated (PlatformName.iOS, 15, 0, PlatformArchitecture.All)] [Deprecated (PlatformName.MacCatalyst, 15, 0, PlatformArchitecture.All)] - [Deprecated (PlatformName.WatchOS, 8, 0, PlatformArchitecture.All)] public partial class AVPlayerInterstitialEventObserver : NSObject { public virtual AVPlayerInterstitialEvent [] InterstitialEvents => throw new NotImplementedException (); diff --git a/src/AVFoundation/AVContentKeyResponse.cs b/src/AVFoundation/AVContentKeyResponse.cs index 53c4138f71be..2beca91911a6 100644 --- a/src/AVFoundation/AVContentKeyResponse.cs +++ b/src/AVFoundation/AVContentKeyResponse.cs @@ -15,14 +15,10 @@ namespace AVFoundation { -#if !WATCH public partial class AVContentKeyResponse { public static AVContentKeyResponse Create (NSData fairPlayStreamingKeyResponseData) => Create (fairPlayStreamingKeyResponseData, AVContentKeyResponseDataType.FairPlayStreamingKeyResponseData); -#if !NET - [NoWatch] -#endif public static AVContentKeyResponse Create (NSData data, AVContentKeyResponseDataType dataType = AVContentKeyResponseDataType.FairPlayStreamingKeyResponseData) { switch (dataType) { @@ -33,5 +29,4 @@ public static AVContentKeyResponse Create (NSData data, AVContentKeyResponseData } } } -#endif } diff --git a/src/AVFoundation/AVDepthData.cs b/src/AVFoundation/AVDepthData.cs index 3a4357ebd2a3..0a7b2a11f954 100644 --- a/src/AVFoundation/AVDepthData.cs +++ b/src/AVFoundation/AVDepthData.cs @@ -7,7 +7,6 @@ // Copyright 2017 Xamarin Inc. // -#if !WATCH using System; using Foundation; using ObjCRuntime; @@ -40,4 +39,3 @@ public CVPixelFormatType []? AvailableDepthDataTypes { } } } -#endif diff --git a/src/AVFoundation/AVLayerVideoGravity.cs b/src/AVFoundation/AVLayerVideoGravity.cs index 797b30e8355e..bc27ee44e35f 100644 --- a/src/AVFoundation/AVLayerVideoGravity.cs +++ b/src/AVFoundation/AVLayerVideoGravity.cs @@ -25,8 +25,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !WATCH - using System; using Foundation; @@ -111,5 +109,3 @@ public AVLayerVideoGravity? ExternalPlaybackVideoGravity { } } } - -#endif diff --git a/src/AVFoundation/AVMetadataItemFilter.cs b/src/AVFoundation/AVMetadataItemFilter.cs deleted file mode 100644 index 99c589f662e2..000000000000 --- a/src/AVFoundation/AVMetadataItemFilter.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// AVMetadataItemFilter.cs: -// -// Copyright 2014 Xamarin Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -#nullable enable - -#if !NET && WATCH // This empty partial class was accidentally included in our watchOS bindings. -namespace AVFoundation { - public partial class AVMetadataItemFilter { - } -} -#endif diff --git a/src/AVFoundation/AVPlayerItem.cs b/src/AVFoundation/AVPlayerItem.cs index 60c221426449..f735a7afc926 100644 --- a/src/AVFoundation/AVPlayerItem.cs +++ b/src/AVFoundation/AVPlayerItem.cs @@ -1,5 +1,3 @@ -#if !WATCH - using System; using Foundation; @@ -15,8 +13,6 @@ public partial class AVPlayerItem { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif public AVVideoApertureMode VideoApertureMode { get { return AVVideoApertureModeExtensions.GetValue (_VideoApertureMode); } @@ -28,5 +24,3 @@ public AVVideoApertureMode VideoApertureMode { } } } - -#endif diff --git a/src/AVFoundation/AVPlayerItemVideoOutput.cs b/src/AVFoundation/AVPlayerItemVideoOutput.cs index 425669b8f9b8..2e8eb918cd4e 100644 --- a/src/AVFoundation/AVPlayerItemVideoOutput.cs +++ b/src/AVFoundation/AVPlayerItemVideoOutput.cs @@ -1,5 +1,3 @@ -#if !WATCH - using System; using Foundation; @@ -36,5 +34,3 @@ enum InitMode { protected AVPlayerItemVideoOutput (NSDictionary pixelBufferAttributes) : this (pixelBufferAttributes, InitMode.PixelAttributes) { } } } - -#endif diff --git a/src/AVFoundation/AVPlayerLayer.cs b/src/AVFoundation/AVPlayerLayer.cs index 0d9cfd5a7409..1925f98af913 100644 --- a/src/AVFoundation/AVPlayerLayer.cs +++ b/src/AVFoundation/AVPlayerLayer.cs @@ -7,8 +7,6 @@ // Copyright 2015 Xamarin Inc. // -#if !WATCH - using ObjCRuntime; using CoreVideo; @@ -36,5 +34,3 @@ public CVPixelBufferAttributes? PixelBufferAttributes { } } } - -#endif diff --git a/src/AVFoundation/AVPlayerLooper.cs b/src/AVFoundation/AVPlayerLooper.cs index 42385e8ccc7c..d00319dbac8a 100644 --- a/src/AVFoundation/AVPlayerLooper.cs +++ b/src/AVFoundation/AVPlayerLooper.cs @@ -18,8 +18,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !WATCH - using Foundation; using CoreFoundation; using AudioToolbox; @@ -45,4 +43,3 @@ public virtual bool LoopingEnabled { #endif } } -#endif // !WATCH diff --git a/src/AVFoundation/AVPlayerViewController.cs b/src/AVFoundation/AVPlayerViewController.cs deleted file mode 100644 index ff1f6495f696..000000000000 --- a/src/AVFoundation/AVPlayerViewController.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2014 Xamarin, Inc. - -using System; -using System.Runtime.InteropServices; -using Foundation; -using ObjCRuntime; -#if HAS_IAD && !NET -using iAd; -#endif - -#nullable enable - -namespace AVKit { -#if HAS_IAD && !NET - public partial class AVPlayerViewController { - - // 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 - // https://trello.com/c/iQpXOxCd/227-category-and-static-methods-selectors - // note: we cannot reuse the same method name - as it would break compilation of existing apps - [Obsoleted (PlatformName.iOS, 15,0, PlatformArchitecture.None, Constants.iAdRemoved)] - static public void PrepareForPrerollAds () - { - } - } -#endif -} diff --git a/src/AVFoundation/AVSampleBufferExtensions.cs b/src/AVFoundation/AVSampleBufferExtensions.cs index 6cd12d8ae2fa..940567ff9704 100644 --- a/src/AVFoundation/AVSampleBufferExtensions.cs +++ b/src/AVFoundation/AVSampleBufferExtensions.cs @@ -21,14 +21,14 @@ namespace AVFoundation { public static class AVSampleBufferExtensions { - [iOS (14, 5), TV (14, 5), Watch (7,4)] + [iOS (14, 5), TV (14, 5)] [DllImport (Constants.AVFoundationLibrary)] unsafe static extern /* BOOL */ byte AVSampleBufferAttachContentKey ( /* CMSampleBufferRef */ CMSampleBufferRef sbuf, /* AVContentKey */ AVContentKey contentKey, /* NSError * _Nullable * _Nullable */ IntPtr* outError); - [iOS (14, 5), TV (14, 5), Watch (7,4)] + [iOS (14, 5), TV (14, 5)] public static bool AttachContentKey (this CMSampleBuffer sampleBuffer, AVContentKey contentKey, out NSError error) { if (sampleBuffer is null) diff --git a/src/AVFoundation/AVSpeechSynthesisMarker.cs b/src/AVFoundation/AVSpeechSynthesisMarker.cs new file mode 100644 index 000000000000..65a7db4d082a --- /dev/null +++ b/src/AVFoundation/AVSpeechSynthesisMarker.cs @@ -0,0 +1,81 @@ +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.Versioning; +using System.Threading.Tasks; + +using Foundation; +using ObjCRuntime; + +#nullable enable + +namespace AVFoundation { + /// This enum is used to select how to initialize a new instance. + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] + public enum AVSpeechSynthesisMarkerRangeOption { + /// The range parameter passed to the constructor is a word range. + Word, + /// The range parameter passed to the constructor is a sentence range. + Sentence, + /// The range parameter passed to the constructor is a paragraph range. + Paragraph, + } + + /// This enum is used to select how to initialize a new instance. + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] + public enum AVSpeechSynthesisMarkerStringOption { + /// The value parameter passed to the constructor is a phoneme. + Phoneme, + /// The value parameter passed to the constructor is a bookmark name. + Bookmark, + } + + public partial class AVSpeechSynthesisMarker { + /// Create a new instance for the specified range and byte offset. + /// The range of the marker. + /// The byte offset into the audio buffer. + /// Use this option to specify how to interpret the parameter. + public AVSpeechSynthesisMarker (NSRange range, nint byteSampleOffset, AVSpeechSynthesisMarkerRangeOption option) + : base (NSObjectFlag.Empty) + { + switch (option) { + case AVSpeechSynthesisMarkerRangeOption.Word: + InitializeHandle (_InitWithWordRange (range, byteSampleOffset)); + break; + case AVSpeechSynthesisMarkerRangeOption.Sentence: + InitializeHandle (_InitWithSentenceRange (range, byteSampleOffset)); + break; + case AVSpeechSynthesisMarkerRangeOption.Paragraph: + InitializeHandle (_InitWithParagraphRange (range, byteSampleOffset)); + break; + default: + throw new ArgumentOutOfRangeException (nameof (option), option, "Invalid enum value."); + } + } + + /// Create a new instance for the specified string value. + /// The phoneme or bookmark name of the marker. + /// The byte offset into the audio buffer. + /// Use this option to specify how to interpret the parameter. + public AVSpeechSynthesisMarker (string value, nint byteSampleOffset, AVSpeechSynthesisMarkerStringOption option) + : base (NSObjectFlag.Empty) + { + switch (option) { + case AVSpeechSynthesisMarkerStringOption.Phoneme: + InitializeHandle (_InitWithPhonemeString (value, byteSampleOffset)); + break; + case AVSpeechSynthesisMarkerStringOption.Bookmark: + InitializeHandle (_InitWithBookmarkName (value, byteSampleOffset)); + break; + default: + throw new ArgumentOutOfRangeException (nameof (option), option, "Invalid enum value."); + } + } + } +} diff --git a/src/AVFoundation/AVSpeechSynthesisProviderAudioUnit.cs b/src/AVFoundation/AVSpeechSynthesisProviderAudioUnit.cs new file mode 100644 index 000000000000..e6e5756d0a30 --- /dev/null +++ b/src/AVFoundation/AVSpeechSynthesisProviderAudioUnit.cs @@ -0,0 +1,31 @@ +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.Versioning; +using System.Threading.Tasks; + +using AudioUnit; +using Foundation; +using ObjCRuntime; + +#nullable enable + +namespace AVFoundation { + public partial class AVSpeechSynthesisProviderAudioUnit { + /// Create a new instance. + /// A description of the component to create. + /// Any options for the returned audio unit. + /// The error if an error occurred, null otherwise. + /// A new instance if successful, null otherwise. + public static AVSpeechSynthesisProviderAudioUnit? Create (AudioComponentDescription componentDescription, AudioComponentInstantiationOptions options, out NSError? error) + { + var rv = new AVSpeechSynthesisProviderAudioUnit (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithComponentDescription (componentDescription, options, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); + return null; + } + return rv; + } + } +} diff --git a/src/AVFoundation/AVSpeechUtterance.cs b/src/AVFoundation/AVSpeechUtterance.cs new file mode 100644 index 000000000000..982a05ab4341 --- /dev/null +++ b/src/AVFoundation/AVSpeechUtterance.cs @@ -0,0 +1,51 @@ +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.Versioning; +using System.Threading.Tasks; + +using Foundation; +using ObjCRuntime; + +#nullable enable + +namespace AVFoundation { + /// This enum is used to select how to initialize a new instance. + public enum AVSpeechUtteranceInitializationOption { + /// The string parameter passed to the constructor is a plain text string. + PlainText, + /// The string parameter passed to the constructor is an SSML (Speech Synthesis Markup Language) string. + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("tvos16.0")] + SsmlRepresentation, + } + + public partial class AVSpeechUtterance { + /// Create a new instance for the specified string. + /// The text to speak. + public AVSpeechUtterance (string speechString) + : this (speechString, AVSpeechUtteranceInitializationOption.PlainText) + { + } + + /// Create a new instance for the specified string. + /// The text to speak. + /// Use this option to specify how to interpret the parameter. + public AVSpeechUtterance (string @string, AVSpeechUtteranceInitializationOption option) + : base (NSObjectFlag.Empty) + { + switch (option) { + case AVSpeechUtteranceInitializationOption.PlainText: + InitializeHandle (_InitWithString (@string)); + break; + case AVSpeechUtteranceInitializationOption.SsmlRepresentation: + InitializeHandle (_InitWithSsmlRepresentation (@string)); + break; + default: + throw new ArgumentOutOfRangeException (nameof (option), option, "Invalid enum value."); + } + } + } +} diff --git a/src/AVFoundation/AVTypes.cs b/src/AVFoundation/AVTypes.cs index 0fe166c82878..696c43ac4c72 100644 --- a/src/AVFoundation/AVTypes.cs +++ b/src/AVFoundation/AVTypes.cs @@ -291,7 +291,6 @@ public static partial class AVMetadataIdentifiers { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] #endif -#if !WATCH public static class AVUtilities { [DllImport (Constants.AVFoundationLibrary)] @@ -302,7 +301,6 @@ public static CGRect WithAspectRatio (this CGRect self, CGSize aspectRatio) return AVMakeRectWithAspectRatioInsideRect (aspectRatio, self); } } -#endif #if NET [SupportedOSPlatform ("macos")] @@ -311,7 +309,6 @@ public static CGRect WithAspectRatio (this CGRect self, CGSize aspectRatio) [SupportedOSPlatform ("tvos15.0")] #else [iOS (15, 0)] - [Watch (8, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] #endif @@ -391,7 +388,6 @@ public AVSampleCursorSyncInfo ToAVSampleCursorSyncInfo () [SupportedOSPlatform ("tvos15.0")] #else [iOS (15, 0)] - [Watch (8, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] #endif @@ -520,7 +516,6 @@ public AVSampleCursorDependencyInfo ToAVSampleCursorDependencyInfo () [SupportedOSPlatform ("tvos15.0")] #else [iOS (15, 0)] - [Watch (8, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] #endif @@ -537,7 +532,6 @@ public struct AVSampleCursorStorageRange { [SupportedOSPlatform ("tvos15.0")] #else [iOS (15, 0)] - [Watch (8, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] #endif @@ -630,7 +624,6 @@ public AVSampleCursorChunkInfo ToAVSampleCursorChunkInfo () [SupportedOSPlatform ("tvos15.0")] #else [iOS (15, 0)] - [Watch (8, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] #endif @@ -674,37 +667,24 @@ public AVSampleCursorAudioDependencyInfo ToAVSampleCursorAudioDependencyInfo () } #endif // !XAMCORE_5_0 && !__IOS__ && !__TVOS__ -#if MONOMAC - -#if NET +#if !__TVOS__ [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("tvos")] - [UnsupportedOSPlatform ("ios")] - [UnsupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] - [NoTV] - [NoiOS] - [NoMacCatalyst] -#endif + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] [Native] public enum AVCaptionUnitsType : long { Unspecified = 0, Cells, Percent, } +#endif // __TVOS__ -#if NET +#if !__TVOS__ [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("tvos")] - [UnsupportedOSPlatform ("ios")] - [UnsupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] - [NoTV] - [NoiOS] - [NoMacCatalyst] -#endif + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] [StructLayout (LayoutKind.Sequential)] public struct AVCaptionDimension { public nfloat Value; @@ -719,20 +699,15 @@ public AVCaptionUnitsType Units { static extern AVCaptionDimension AVCaptionDimensionMake (nfloat dimension, /* AVCaptionUnitsType */ nuint units); public static AVCaptionDimension Create (nfloat dimension, AVCaptionUnitsType units) - => AVCaptionDimensionMake (dimension, (nuint) (long)units); + => AVCaptionDimensionMake (dimension, (nuint) (long) units); } +#endif // __TVOS__ -#if NET +#if !__TVOS__ [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("tvos")] - [UnsupportedOSPlatform ("ios")] - [UnsupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] - [NoTV] - [NoiOS] - [NoMacCatalyst] -#endif + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] [StructLayout (LayoutKind.Sequential)] public struct AVCaptionPoint { public AVCaptionDimension X; @@ -742,20 +717,15 @@ public struct AVCaptionPoint { static extern AVCaptionPoint AVCaptionPointMake (AVCaptionDimension x, AVCaptionDimension y); public static AVCaptionPoint Create (AVCaptionDimension x, AVCaptionDimension y) - => AVCaptionPointMake (x,y); + => AVCaptionPointMake (x, y); } +#endif // __TVOS__ -#if NET +#if !__TVOS__ [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("tvos")] - [UnsupportedOSPlatform ("ios")] - [UnsupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] - [NoTV] - [NoiOS] - [NoMacCatalyst] -#endif + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] [StructLayout (LayoutKind.Sequential)] public struct AVCaptionSize { public AVCaptionDimension Width; @@ -767,7 +737,5 @@ public struct AVCaptionSize { public static AVCaptionSize Create (AVCaptionDimension width, AVCaptionDimension height) => AVCaptionSizeMake (width, height); } - -#endif - +#endif // __TVOS__ } diff --git a/src/AVFoundation/AVUrlAssetOptions.cs b/src/AVFoundation/AVUrlAssetOptions.cs index 3e421e0e22c0..8bd912e602f8 100644 --- a/src/AVFoundation/AVUrlAssetOptions.cs +++ b/src/AVFoundation/AVUrlAssetOptions.cs @@ -40,8 +40,6 @@ namespace AVFoundation { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class AVUrlAssetOptions : DictionaryContainer { #if !COREBUILD @@ -54,7 +52,6 @@ public AVUrlAssetOptions (NSDictionary dictionary) : base (dictionary) { } -#if !WATCH public bool? PreferPreciseDurationAndTiming { set { SetBooleanValue (AVUrlAsset.PreferPreciseDurationAndTimingKey, value); @@ -72,7 +69,6 @@ public AVAssetReferenceRestrictions? ReferenceRestrictions { return (AVAssetReferenceRestrictions?) (ulong?) GetNUIntValue (AVUrlAsset.ReferenceRestrictionsKey); } } -#endif #endif } } diff --git a/src/AVFoundation/AVVideoSettings.cs b/src/AVFoundation/AVVideoSettings.cs index cc3525568ed4..f933c3b7fd2c 100644 --- a/src/AVFoundation/AVVideoSettings.cs +++ b/src/AVFoundation/AVVideoSettings.cs @@ -66,7 +66,6 @@ public enum AVVideoProfileLevelH264 : int { HighAutoLevel, } -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -630,5 +629,4 @@ public int? VerticalOffset { } #endif } -#endif // !WATCH } diff --git a/src/AVFoundation/AudioRendererWasFlushedAutomaticallyEventArgs.cs b/src/AVFoundation/AudioRendererWasFlushedAutomaticallyEventArgs.cs index 35436d97b2c7..74858c91a77d 100644 --- a/src/AVFoundation/AudioRendererWasFlushedAutomaticallyEventArgs.cs +++ b/src/AVFoundation/AudioRendererWasFlushedAutomaticallyEventArgs.cs @@ -1,4 +1,3 @@ -#if !WATCH using Foundation; using CoreMedia; using ObjCRuntime; @@ -12,8 +11,6 @@ namespace AVFoundation { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif public partial class AudioRendererWasFlushedAutomaticallyEventArgs { public CMTime AudioRendererFlushTime { @@ -23,4 +20,3 @@ public CMTime AudioRendererFlushTime { } } } -#endif diff --git a/src/AVFoundation/CMTagCollectionVideoOutputPreset.cs b/src/AVFoundation/CMTagCollectionVideoOutputPreset.cs new file mode 100644 index 000000000000..d58454818b3c --- /dev/null +++ b/src/AVFoundation/CMTagCollectionVideoOutputPreset.cs @@ -0,0 +1,39 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +using CoreMedia; +using ObjCRuntime; + +namespace AVFoundation { + // Yes, CMTagCollectionCreateWithVideoOutputPreset is in AVFoundation, not CoreMedia. + public static class CMTagCollectionVideoOutputPreset_Extensions { + + [SupportedOSPlatform ("ios17.2")] + [SupportedOSPlatform ("maccatalyst17.2")] + [SupportedOSPlatform ("macos14.2")] + [SupportedOSPlatform ("tvos17.2")] + [DllImport (Constants.AVFoundationLibrary)] + static extern unsafe CMTagCollectionError /* OSStatus */ CMTagCollectionCreateWithVideoOutputPreset ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + CMTagCollectionVideoOutputPreset /* CMTagCollectionVideoOutputPreset */ preset, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ newCollection); + + /// Create a new with the tags that describes the specified video output requirements. + /// The requested video output preset to create tags for. + /// An error code in case of failure, otherwise. + /// A new with the tags that describes the specified video output requirements, or null in case of failure. + [SupportedOSPlatform ("ios17.2")] + [SupportedOSPlatform ("maccatalyst17.2")] + [SupportedOSPlatform ("macos14.2")] + [SupportedOSPlatform ("tvos17.2")] + public static CMTagCollection? Create (this CMTagCollectionVideoOutputPreset value, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateWithVideoOutputPreset (IntPtr.Zero, value, &handle); + } + return CMTagCollection.Create (handle, true); + } + } +} diff --git a/src/AVFoundation/Enums.cs b/src/AVFoundation/Enums.cs index d43742250f0f..2151aa192370 100644 --- a/src/AVFoundation/Enums.cs +++ b/src/AVFoundation/Enums.cs @@ -37,10 +37,9 @@ public enum AVAudioQuality : long { Low = 0x20, Medium = 0x40, High = 0x60, - Max = 0x7F + Max = 0x7F, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVAssetExportSession.h @@ -50,10 +49,9 @@ public enum AVAssetExportSessionStatus : long { Exporting, Completed, Failed, - Cancelled + Cancelled, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVAssetReader.h @@ -65,7 +63,6 @@ public enum AVAssetReaderStatus : long { Cancelled, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVAssetWriter.h @@ -79,7 +76,6 @@ public enum AVAssetWriterStatus : long { [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [Native] // NSInteger - AVCaptureSession.h public enum AVCaptureVideoOrientation : long { @@ -90,34 +86,36 @@ public enum AVCaptureVideoOrientation : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureFlashMode : long { - Off, On, Auto + Off, + On, + Auto, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureTorchMode : long { - Off, On, Auto + Off, + On, + Auto, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureFocusMode : long { - Locked, AutoFocus, ContinuousAutoFocus, + Locked, + AutoFocus, + ContinuousAutoFocus, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h @@ -128,8 +126,7 @@ public enum AVCaptureDevicePosition : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureExposureMode : long { @@ -141,12 +138,13 @@ public enum AVCaptureExposureMode : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureWhiteBalanceMode : long { - Locked, AutoWhiteBalance, ContinuousAutoWhiteBalance + Locked, + AutoWhiteBalance, + ContinuousAutoWhiteBalance, } #if !NET @@ -155,13 +153,12 @@ public enum AVCaptureWhiteBalanceMode : long { [Native] // NSUInteger - AVAudioSession.h public enum AVAudioSessionInterruptionFlags : ulong { - ShouldResume = 1 + ShouldResume = 1, } #endif // Populated in NSError.Code, an NSInteger // anonymous enum - AVError.h - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] public enum AVError : long { @@ -245,24 +242,33 @@ public enum AVError : long { RosettaNotInstalled = -11877, OperationCancelled = -11878, RequestCancelled = -11879, + + InvalidSampleCursor = -11880, + FailedToLoadSampleData = -11881, + AirPlayReceiverTemporarilyUnavailable = -11882, + EncodeFailed = -11883, + SandboxExtensionDenied = -11884, + ToneMappingFailed = -11885, + MediaExtensionDisabled = -11886, + MediaExtensionConflict = -11887, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVPlayer.h public enum AVPlayerActionAtItemEnd : long { Advance, Pause, - None + None, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVPlayerItem.h public enum AVPlayerItemStatus : long { - Unknown, ReadyToPlay, Failed + Unknown, + ReadyToPlay, + Failed, } #if !NET @@ -272,29 +278,30 @@ public enum AVPlayerItemStatus : long { [Native] // declared as AVAudioSessionSetActiveOptions (NSUInteger) - AVAudioSession.h public enum AVAudioSessionFlags : ulong { - NotifyOthersOnDeactivation = 1 + NotifyOthersOnDeactivation = 1, } #endif - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVAsynchronousKeyValueLoading.h public enum AVKeyValueStatus : long { - Unknown, Loading, Loaded, Failed, Cancelled + Unknown, + Loading, + Loaded, + Failed, + Cancelled, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVPlayer.h public enum AVPlayerStatus : long { Unknown, ReadyToPlay, - Failed + Failed, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Flags] [Native] @@ -308,23 +315,24 @@ public enum AVAssetReferenceRestrictions : ulong { ForbidAll = 0xFFFF, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] // NSInteger - AVAssetImageGenerator.h public enum AVAssetImageGeneratorResult : long { - Succeeded, Failed, Cancelled + Succeeded, + Failed, + Cancelled, } /// An enumeration whose values specify whether a is playing or not. [NoiOS] - [NoWatch] [Unavailable (PlatformName.MacCatalyst)] [NoTV] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureDeviceTransportControlsPlaybackMode : long { - NotPlaying, Playing + NotPlaying, + Playing, } /// An enumeration whose values specify how interlaced fields should be dealt with. @@ -333,32 +341,31 @@ public enum AVCaptureDeviceTransportControlsPlaybackMode : long { [NoiOS] [Unavailable (PlatformName.MacCatalyst)] [NoTV] - [NoWatch] [Native] // NSInteger - AVCaptureSession.h public enum AVVideoFieldMode : long { - Both, TopOnly, BottomOnly, Deinterlace + Both, + TopOnly, + BottomOnly, + Deinterlace, } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Flags] [Native] // NSUInteger - AVAudioSession.h public enum AVAudioSessionInterruptionOptions : ulong { - ShouldResume = 1 + ShouldResume = 1, } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Flags] [Native] // NSUInteger - AVAudioSession.h public enum AVAudioSessionSetActiveOptions : ulong { - NotifyOthersOnDeactivation = 1 + NotifyOthersOnDeactivation = 1, } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] // NSUInteger - AVAudioSession.h @@ -366,12 +373,10 @@ public enum AVAudioSessionPortOverride : ulong { None = 0, [NoTV] [NoMac] // Removed in Xcode 12 GM - [NoWatch] // Removed in Xcode 12 GM [MacCatalyst (13, 1)] - Speaker = 0x73706b72 // 'spkr' + Speaker = 0x73706b72, // 'spkr' } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] // NSUInteger - AVAudioSession.h @@ -383,7 +388,7 @@ public enum AVAudioSessionRouteChangeReason : ulong { Override, WakeFromSleep = 6, NoSuitableRouteForCategory = 7, - RouteConfigurationChange = 8 + RouteConfigurationChange = 8, } [Flags] @@ -393,12 +398,10 @@ public enum AVAudioSessionCategoryOptions : ulong { MixWithOthers = 1, DuckOthers = 2, [NoMac] // Removed in Xcode 12 GM - [NoWatch] // Removed in Xcode 12 GM [NoTV] [MacCatalyst (13, 1)] AllowBluetooth = 4, [NoMac] // Removed in Xcode 12 GM - [NoWatch] // Removed in Xcode 12 GM [NoTV] [MacCatalyst (13, 1)] DefaultToSpeaker = 8, @@ -410,23 +413,21 @@ public enum AVAudioSessionCategoryOptions : ulong { [MacCatalyst (13, 1)] AllowBluetoothA2DP = 32, [NoMac] // Removed in Xcode 12 GM - [NoWatch] [MacCatalyst (13, 1)] AllowAirPlay = 64, [NoMac] [NoTV] [iOS (14, 5)] - [Watch (7, 3)] [MacCatalyst (14, 5)] OverrideMutedMicrophoneInterruption = 128, } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] // NSUInteger - AVAudioSession.h public enum AVAudioSessionInterruptionType : ulong { - Ended, Began + Ended, + Began, } [MacCatalyst (13, 1)] @@ -456,14 +457,13 @@ public enum AVAudioSessionErrorCode : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h public enum AVCaptureAutoFocusRangeRestriction : long { None = 0, Near = 1, - Far = 2 + Far = 2, } // Convenience enum for native strings (defined in AVAudioSettings.h) @@ -471,22 +471,24 @@ public enum AVAudioBitRateStrategy : int { Constant, LongTermAverage, VariableConstrained, - Variable + Variable, } // Convenience enum for native strings (defined in AVAudioSettings.h) public enum AVSampleRateConverterAlgorithm : int { Normal, - Mastering + Mastering, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Native] // NSInteger - AVCaptureDevice.h public enum AVAuthorizationStatus : long { - NotDetermined, Restricted, Denied, Authorized + NotDetermined, + Restricted, + Denied, + Authorized, } [MacCatalyst (13, 1)] @@ -494,7 +496,7 @@ public enum AVAuthorizationStatus : long { // NSInteger - AVSpeechSynthesis.h public enum AVSpeechBoundary : long { Immediate, - Word + Word, } [MacCatalyst (13, 1)] @@ -504,7 +506,7 @@ public enum AVAudioCommonFormat : ulong { PCMFloat32 = 1, PCMFloat64 = 2, PCMInt16 = 3, - PCMInt32 = 4 + PCMInt32 = 4, } [Native] @@ -518,26 +520,30 @@ public enum AVAudio3DMixingRenderingAlgorithm : long { HrtfHQ = 6, [iOS (13, 0)] [TV (13, 0)] - [NoWatch] [MacCatalyst (13, 1)] Auto = 7, } - [Watch (7, 0)] +#if XAMCORE_5_0 + [NoTV, NoMac] +#endif + [Deprecated (PlatformName.iOS, 17, 0, message: "Use 'AVAudioApplicationRecordPermission' instead.")] + [Deprecated (PlatformName.TvOS, 17, 0, message: "Use 'AVAudioApplicationRecordPermission' instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use 'AVAudioApplicationRecordPermission' instead.")] + [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'AVAudioApplicationRecordPermission' instead.")] [MacCatalyst (13, 1)] [Native] public enum AVAudioSessionRecordPermission : ulong { Undetermined = 1970168948 /*'undt'*/, Denied = 1684369017 /*'deny'*/, - Granted = 1735552628 /*'grnt'*/ + Granted = 1735552628 /*'grnt'*/, } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] public enum AVAudioSessionSilenceSecondaryAudioHintType : ulong { Begin = 1, - End = 0 + End = 0, } [Flags] @@ -545,7 +551,7 @@ public enum AVAudioSessionSilenceSecondaryAudioHintType : ulong { public enum AVAudioPlayerNodeBufferOptions : ulong { Loops = 0x01, Interrupts = 0x02, - InterruptsAtLoop = 0x04 + InterruptsAtLoop = 0x04, } [Native] @@ -560,7 +566,7 @@ public enum AVAudioUnitEQFilterType : long { LowShelf = 7, HighShelf = 8, ResonantLowShelf = 9, - ResonantHighShelf = 10 + ResonantHighShelf = 10, } [Native] @@ -577,7 +583,7 @@ public enum AVAudioUnitReverbPreset : long { LargeRoom2 = 9, MediumHall2 = 10, MediumHall3 = 11, - LargeHall2 = 12 + LargeHall2 = 12, } [Native] @@ -603,25 +609,25 @@ public enum AVAudioUnitDistortionPreset : long { SpeechCosmicInterference = 18, SpeechGoldenPi = 19, SpeechRadioTower = 20, - SpeechWaves = 21 + SpeechWaves = 21, } [Native] public enum AVAudioEnvironmentDistanceAttenuationModel : long { Exponential = 1, Inverse = 2, - Linear = 3 + Linear = 3, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] public enum AVQueuedSampleBufferRenderingStatus : long { - Unknown, Rendering, Failed + Unknown, + Rendering, + Failed, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [Native] public enum AVCaptureVideoStabilizationMode : long { @@ -639,19 +645,16 @@ public enum AVCaptureVideoStabilizationMode : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [Native] public enum AVCaptureAutoFocusSystem : long { None, ContrastDetection, - PhaseDetection + PhaseDetection, } -#if !MONOMAC [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [Native] [NoMac] public enum AVCaptureSessionInterruptionReason : long { @@ -662,13 +665,14 @@ public enum AVCaptureSessionInterruptionReason : long { [MacCatalyst (14, 0)] VideoDeviceNotAvailableDueToSystemPressure = 5, } -#endif [MacCatalyst (13, 1)] [Native] public enum AVSpeechSynthesisVoiceQuality : long { Default = 1, - Enhanced + Enhanced = 2, + [iOS (16, 0), MacCatalyst (16, 0), TV (16, 0), Mac (13, 0)] + Premium = 3, } [MacCatalyst (13, 1)] @@ -676,7 +680,7 @@ public enum AVSpeechSynthesisVoiceQuality : long { public enum AVAudioConverterPrimeMethod : long { Pre = 0, Normal = 1, - None = 2 + None = 2, } [MacCatalyst (13, 1)] @@ -684,7 +688,7 @@ public enum AVAudioConverterPrimeMethod : long { public enum AVAudioConverterInputStatus : long { HaveData = 0, NoDataNow = 1, - EndOfStream = 2 + EndOfStream = 2, } [MacCatalyst (13, 1)] @@ -693,7 +697,7 @@ public enum AVAudioConverterOutputStatus : long { HaveData = 0, InputRanDry = 1, EndOfStream = 2, - Error = 3 + Error = 3, } [MacCatalyst (13, 1)] @@ -701,23 +705,21 @@ public enum AVAudioConverterOutputStatus : long { [Native] public enum AVMusicSequenceLoadOptions : ulong { PreserveTracks = 0, - ChannelsToTracks = (1 << 0) + ChannelsToTracks = (1 << 0), } [NoTV] [iOS (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Flags] [Native] public enum AVMovieWritingOptions : ulong { AddMovieHeaderToDestination = 0, - TruncateDestinationToMovieHeaderOnly = (1 << 0) + TruncateDestinationToMovieHeaderOnly = (1 << 0), } [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Native] public enum AVContentAuthorizationStatus : long { @@ -732,7 +734,6 @@ public enum AVContentAuthorizationStatus : long { [iOS (15, 0)] [TV (15, 0)] - [Watch (8, 0)] [MacCatalyst (15, 0)] [Native] public enum AVSampleBufferRequestDirection : long { @@ -743,7 +744,6 @@ public enum AVSampleBufferRequestDirection : long { [iOS (15, 0)] [TV (15, 0)] - [Watch (8, 0)] [MacCatalyst (15, 0)] [Native] public enum AVSampleBufferRequestMode : long { @@ -754,8 +754,7 @@ public enum AVSampleBufferRequestMode : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [Native] public enum AVCaptureColorSpace : long { Srgb = 0, @@ -764,24 +763,24 @@ public enum AVCaptureColorSpace : long { [iOS (14, 1)] [NoMac] HlgBT2020 = 2, + [NoMac, NoiOS, NoMacCatalyst] + AppleLog = 3, } [MacCatalyst (13, 1)] [Native] public enum AVMusicTrackLoopCount : long { - Forever = -1 + Forever = -1, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] public enum AVPlayerTimeControlStatus : long { Paused, WaitingToPlayAtSpecifiedRate, - Playing + Playing, } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -790,38 +789,34 @@ public enum AVAudioSessionIOType : long { Aggregated = 1, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] public enum AVPlayerLooperStatus : long { Unknown, Ready, Failed, - Cancelled + Cancelled, } [NoiOS] - [NoWatch] [NoMac] [NoMacCatalyst] [Native] public enum AVContentProposalAction : long { Accept, Reject, - Defer + Defer, } [NoiOS] - [NoWatch] [NoMac] [NoMacCatalyst] [Native] public enum AVPlayerViewControllerSkippingBehavior : long { Default = 0, - SkipItem + SkipItem, } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] public enum AVContentKeyRequestStatus : long { @@ -830,10 +825,9 @@ public enum AVContentKeyRequestStatus : long { Renewed, Retried, Cancelled, - Failed + Failed, } - [Watch (7, 0)] [MacCatalyst (13, 1)] public enum AVContentKeyRequestRetryReason { [Field ("AVContentKeyRequestRetryReasonTimedOut")] @@ -844,7 +838,6 @@ public enum AVContentKeyRequestRetryReason { ReceivedObsoleteContentKey, } - [Watch (7, 0)] [MacCatalyst (13, 1)] public enum AVContentKeySystem { [Field ("AVContentKeySystemFairPlayStreaming")] @@ -854,7 +847,6 @@ public enum AVContentKeySystem { [Field ("AVContentKeySystemClearKey")] ClearKey = 1, - [NoWatch] [MacCatalyst (13, 1)] [Obsolete ("Use 'AVContentKeySystem.SystemClearKey' instead.")] AVContentKeySystemClearKey = ClearKey, @@ -867,7 +859,6 @@ public enum AVContentKeySystem { } // Convience enum for native string values - [NoWatch] [MacCatalyst (13, 1)] public enum AVAssetExportSessionPreset { [MacCatalyst (13, 1)] @@ -908,7 +899,6 @@ public enum AVAssetExportSessionPreset { PresetHevc3840x2160 = 12, } - [NoWatch] [MacCatalyst (13, 1)] public enum AVOutputSettingsPreset { [Field ("AVOutputSettingsPreset640x480")] @@ -936,30 +926,34 @@ public enum AVOutputSettingsPreset { PresetHevc3840x2160 = 12, // we added the wrong value in the export enum, we use the same so that they can be swap [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVOutputSettingsPresetHEVC1920x1080WithAlpha")] PresetHevc1920x1080WithAlpha = 13, [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVOutputSettingsPresetHEVC3840x2160WithAlpha")] PresetHevc3840x2160WithAlpha = 14, [NoTV] - [NoWatch] [Mac (12, 1)] [NoiOS] [NoMacCatalyst] [Field ("AVOutputSettingsPresetHEVC7680x4320")] PresetHevc7680x4320 = 15, + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVOutputSettingsPresetMVHEVC960x960")] + PresetMvHevc960x960 = 16, + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVOutputSettingsPresetMVHEVC1440x1440")] + PresetMvHevc1440x1440 = 17, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [Native] public enum AVDepthDataAccuracy : long { Relative = 0, @@ -970,7 +964,7 @@ public enum AVDepthDataAccuracy : long { [Native] public enum AVAudioEngineManualRenderingMode : long { Offline = 0, - Realtime = 1 + Realtime = 1, } [MacCatalyst (13, 1)] @@ -979,18 +973,23 @@ public enum AVAudioEngineManualRenderingStatus : long { Error = -1, Success = 0, InsufficientDataFromInputNode = 1, - CannotDoInCurrentContext = 2 + CannotDoInCurrentContext = 2, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum AVAudioSessionRouteSharingPolicy : ulong { Default = 0, +#if !XAMCORE_5_0 + [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'LongFormAudio' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'LongFormAudio' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'LongFormAudio' instead.")] + [Deprecated (PlatformName.MacCatalyst, 13, 11, message: "Use 'LongFormAudio' instead.")] LongForm = 1, +#endif + LongFormAudio = 1, Independent = 2, - [iOS (14, 0)] - [NoWatch] + [iOS (13, 0)] [NoTV] [NoMac] [MacCatalyst (14, 0)] @@ -1002,7 +1001,7 @@ public enum AVAudioSessionRouteSharingPolicy : ulong { public enum AVAudioPlayerNodeCompletionCallbackType : long { Consumed = 0, Rendered = 1, - PlayedBack = 2 + PlayedBack = 2, } [MacCatalyst (13, 1)] @@ -1013,8 +1012,7 @@ public enum AVAudioEngineManualRenderingError { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [Native] public enum AVCaptureLensStabilizationStatus : long { Unsupported = 0, @@ -1025,7 +1023,6 @@ public enum AVCaptureLensStabilizationStatus : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [Native] public enum AVCaptureOutputDataDroppedReason : long { @@ -1035,7 +1032,6 @@ public enum AVCaptureOutputDataDroppedReason : long { Discontinuity = 3, } - [NoWatch] [MacCatalyst (13, 1)] public enum AVVideoApertureMode { [Field ("AVVideoApertureModeCleanAperture")] @@ -1047,7 +1043,6 @@ public enum AVVideoApertureMode { [Field ("AVVideoApertureModeEncodedPixels")] EncodedPixels = 2, } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] public enum AVAssetDownloadedAssetEvictionPriority { @@ -1058,7 +1053,6 @@ public enum AVAssetDownloadedAssetEvictionPriority { Important = 1, } - [NoWatch] [MacCatalyst (13, 1)] public enum AVAssetWriterInputMediaDataLocation { [Field ("AVAssetWriterInputMediaDataLocationInterleavedWithMainMediaData")] @@ -1068,7 +1062,6 @@ public enum AVAssetWriterInputMediaDataLocation { BeforeMainMediaDataNotInterleaved = 1, } - [NoWatch] [MacCatalyst (15, 0)] public enum AVVideoCodecType { [Field ("AVVideoCodecTypeH264")] @@ -1087,45 +1080,47 @@ public enum AVVideoCodecType { Hevc = 5, [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (15, 0)] [Field ("AVVideoCodecTypeAppleProRes422HQ")] AppleProRes422HQ = 6, [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (15, 0)] [Field ("AVVideoCodecTypeAppleProRes422LT")] AppleProRes422LT = 7, [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (15, 0)] [Field ("AVVideoCodecTypeAppleProRes422Proxy")] AppleProRes422Proxy = 8, [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (15, 0)] [Field ("AVVideoCodecTypeHEVCWithAlpha")] HevcWithAlpha = 9, + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVVideoCodecTypeAppleProRes4444XQ")] + AppleProRes4444XQ = 10, + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVVideoCodecTypeJPEGXL")] + JpegXl = 11, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [Native] public enum AVDepthDataQuality : long { Low = 0, - High = 1 + High = 1, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [NoMac] [Flags] [Native] @@ -1133,10 +1128,11 @@ public enum AVCaptureSystemPressureFactors : ulong { None = 0, SystemTemperature = (1 << 0), PeakPower = (1 << 1), - DepthModuleTemperature = (1 << 2) + DepthModuleTemperature = (1 << 2), + [iOS (17, 0), MacCatalyst (17, 0)] + CameraTemperature = (1uL << 3), } - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [Native] @@ -1147,7 +1143,6 @@ public enum AVPlayerHdrMode : long { DolbyVision = 0x4, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Flags] [Native] @@ -1162,7 +1157,6 @@ public enum AVAudioSessionPromptStyle : ulong { Normal = 0x6e726d6c, //1852992876 - 'nrml' } - [Watch (6, 0)] [iOS (13, 0)] [TV (13, 0)] [MacCatalyst (13, 1)] @@ -1173,9 +1167,8 @@ public enum AVSpeechSynthesisVoiceGender : long { Female, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] - [NoMac] + [TV (17, 0)] + [Mac (13, 0)] [iOS (13, 0)] [Native] public enum AVCapturePhotoQualityPrioritization : long { @@ -1185,7 +1178,6 @@ public enum AVCapturePhotoQualityPrioritization : long { } [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (13, 1)] [Native] @@ -1197,7 +1189,6 @@ public enum AVAudioEnvironmentOutputType : long { } [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (13, 1)] [Native] @@ -1209,7 +1200,6 @@ public enum AVAudio3DMixingSourceMode : long { } [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (13, 1)] [Native] @@ -1219,7 +1209,6 @@ public enum AVAudio3DMixingPointSourceInHeadMode : long { } [TV (14, 0)] - [NoWatch] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -1229,7 +1218,6 @@ public enum AVAssetSegmentType : long { } [TV (14, 0)] - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Flags] @@ -1242,7 +1230,6 @@ public enum AVAudioSpatializationFormats : ulong { } [TV (14, 0)] - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -1255,7 +1242,6 @@ public enum AVAudioStereoOrientation : long { } [TV (14, 0)] - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] public enum AVFileTypeProfile { @@ -1268,7 +1254,6 @@ public enum AVFileTypeProfile { } [TV (15, 0)] - [Watch (8, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] [Native] @@ -1278,22 +1263,17 @@ public enum AVAudioRoutingArbitrationCategory : long { PlayAndRecordVoice = 2, } -#if !WATCH - [NoWatch] [MacCatalyst (13, 1)] public enum AVContentKeyResponseDataType { FairPlayStreamingKeyResponseData, [TV (13, 0)] - [NoWatch] [iOS (13, 0)] [MacCatalyst (13, 1)] AuthorizationTokenData, } -#endif [TV (15, 0)] [iOS (15, 0)] - [Watch (8, 0)] [MacCatalyst (15, 0)] [Flags] [Native] @@ -1304,7 +1284,6 @@ public enum AVDelegatingPlaybackCoordinatorRateChangeOptions : ulong { [TV (15, 0)] [iOS (15, 0)] - [Watch (8, 0)] [MacCatalyst (15, 0)] [Flags] [Native] @@ -1313,8 +1292,7 @@ public enum AVDelegatingPlaybackCoordinatorSeekOptions : ulong { ResumeImmediately = (1uL << 0), } - [NoWatch] - [NoTV] + [TV (17, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] [Native] @@ -1324,8 +1302,7 @@ public enum AVCaptureMicrophoneMode : long { VoiceIsolation = 2, } - [NoWatch] - [NoTV] + [TV (17, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] [Native] @@ -1334,7 +1311,6 @@ public enum AVCaptureSystemUserInterface : long { MicrophoneModes = 2, } - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -1346,7 +1322,6 @@ public enum AVPlayerAudiovisualBackgroundPlaybackPolicy : long { } [TV (15, 0)] - [NoWatch] [iOS (15, 0)] [MacCatalyst (15, 0)] public enum AVCoordinatedPlaybackSuspensionReason { @@ -1370,20 +1345,16 @@ public enum AVCoordinatedPlaybackSuspensionReason { UserIsChangingCurrentTime, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionAnimation : long { None = 0, CharacterReveal = 1, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionFontWeight : long { Unknown = 0, @@ -1391,10 +1362,8 @@ public enum AVCaptionFontWeight : long { Bold = 2, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionFontStyle : long { Unknown = 0, @@ -1402,10 +1371,8 @@ public enum AVCaptionFontStyle : long { Italic = 2, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Flags] [Native] public enum AVCaptionDecoration : ulong { @@ -1415,10 +1382,8 @@ public enum AVCaptionDecoration : ulong { Overline = 1uL << 2, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionTextCombine : long { All = -1, @@ -1429,10 +1394,8 @@ public enum AVCaptionTextCombine : long { FourDigits = 4, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionTextAlignment : long { Start = 0, @@ -1442,30 +1405,24 @@ public enum AVCaptionTextAlignment : long { Right = 4, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionRegionWritingMode : long { LeftToRightAndTopToBottom = 0, TopToBottomAndRightToLeft = 2, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionRegionScroll : long { None = 0, RollUp = 1, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionRegionDisplayAlignment : long { Before = 0, @@ -1473,20 +1430,16 @@ public enum AVCaptionRegionDisplayAlignment : long { After = 2, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionRubyPosition : long { Before = 0, After = 1, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionRubyAlignment : long { Start = 0, @@ -1495,10 +1448,8 @@ public enum AVCaptionRubyAlignment : long { DistributeSpaceAround = 3, } - [NoWatch] + [iOS (18, 0), MacCatalyst (18, 0)] [NoTV] - [NoiOS] - [NoMacCatalyst] [Native] public enum AVCaptionConversionValidatorStatus : long { Unknown = 0, @@ -1507,8 +1458,7 @@ public enum AVCaptionConversionValidatorStatus : long { Stopped = 3, } - [NoWatch] - [NoTV] + [TV (17, 0)] [MacCatalyst (15, 0)] [iOS (15, 0)] [Native] @@ -1519,8 +1469,7 @@ public enum AVCapturePrimaryConstituentDeviceSwitchingBehavior : long { Locked = 3, } - [NoWatch] - [NoTV] + [TV (17, 0)] [MacCatalyst (15, 0)] [iOS (15, 0)] [Flags] @@ -1532,7 +1481,7 @@ public enum AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditio ExposureModeChanged = 1uL << 2, } - [TV (17, 2), NoWatch, NoMac, iOS (17, 2), NoMacCatalyst] + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [Native] public enum AVAudioSessionRenderingMode : long { NotApplicable = 0, @@ -1543,4 +1492,188 @@ public enum AVAudioSessionRenderingMode : long { DolbyAtmos = 5, } + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Native] + [NativeName ("AVMIDIControlChangeMessageType")] + public enum AVMidiControlChangeMessageType : long { + BankSelect = 0, + ModWheel = 1, + Breath = 2, + Foot = 4, + PortamentoTime = 5, + DataEntry = 6, + Volume = 7, + Balance = 8, + Pan = 10, + Expression = 11, + Sustain = 64, + Portamento = 65, + Sostenuto = 66, + Soft = 67, + LegatoPedal = 68, + Hold2Pedal = 69, + FilterResonance = 71, + ReleaseTime = 72, + AttackTime = 73, + Brightness = 74, + DecayTime = 75, + VibratoRate = 76, + VibratoDepth = 77, + VibratoDelay = 78, + ReverbLevel = 91, + ChorusLevel = 93, + RpnLsb = 100, + RpnMsb = 101, + AllSoundOff = 120, + ResetAllControllers = 121, + AllNotesOff = 123, + OmniModeOff = 124, + OmniModeOn = 125, + MonoModeOn = 126, + MonoModeOff = 127, + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Native] + [NativeName ("AVMIDIMetaEventType")] + public enum AVMidiMetaEventType : long { + SequenceNumber = 0, + Text = 1, + Copyright = 2, + TrackName = 3, + Instrument = 4, + Lyric = 5, + Marker = 6, + CuePoint = 7, + MidiChannel = 32, + MidiPort = 33, + EndOfTrack = 47, + Tempo = 81, + SmpteOffset = 84, + TimeSignature = 88, + KeySignature = 89, + ProprietaryEvent = 127, + } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Native] + public enum AVAudioVoiceProcessingSpeechActivityEvent : long { + Started = 0, + Ended = 1, + } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Native] + public enum AVSpeechSynthesisPersonalVoiceAuthorizationStatus : ulong { + NotDetermined, + Denied, + Unsupported, + Authorized, + } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Native] + public enum AVSpeechSynthesisVoiceTraits : ulong { + None = 0x0, + IsNoveltyVoice = 1uL << 0, + IsPersonalVoice = 1uL << 1, + } + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Native, Flags] + public enum AVAssetTrackGroupOutputHandling : ulong { + None = 0x0, + PreserveAlternateTracks = (1uL << 0), + DefaultPolicy = None, + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Native] + public enum AVSpeechSynthesisMarkerMark : long { + Phoneme, + Word, + Sentence, + Paragraph, + Bookmark, + } + + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Native] + public enum AVAudioVoiceProcessingOtherAudioDuckingLevel : long { + Default = 0, + Min = 10, + Mid = 20, + Max = 30, + } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Native] + public enum AVCapturePhotoOutputCaptureReadiness : long { + SessionNotRunning = 0, + Ready = 1, + NotReadyMomentarily = 2, + NotReadyWaitingForCapture = 3, + NotReadyWaitingForProcessing = 4, + } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Native] + public enum AVPlayerLooperItemOrdering : long { + PrecedeExistingItems = 0, + FollowExistingItems = 1, + } + + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [Native] + public enum AVExternalContentProtectionStatus : long { + Pending = 0, + Sufficient = 1, + Insufficient = 2, + } + + [TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [Native] + public enum AVPlayerInterstitialEventAssetListResponseStatus : long { + Available = 0, + Cleared = 1, + Unavailable = 2, + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + enum AVAssetPlaybackConfigurationOption { + [Field ("AVAssetPlaybackConfigurationOptionStereoVideo")] + StereoVideo, + + [Field ("AVAssetPlaybackConfigurationOptionStereoMultiviewVideo")] + StereoMultiviewVideo, + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVAssetPlaybackConfigurationOptionSpatialVideo")] + SpatialVideo, + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + enum AVPlayerInterstitialEventCue { + [Field ("AVPlayerInterstitialEventNoCue")] + NoCue, + + [Field ("AVPlayerInterstitialEventJoinCue")] + JoinCue, + + [Field ("AVPlayerInterstitialEventLeaveCue")] + LeaveCue, + } + + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [Native] + public enum AVPlayerInterstitialEventTimelineOccupancy : long { + SinglePoint = 0, + Fill = 1, + } + + // Yes, this type is in AVFoundation, not CoreMedia + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + public enum CMTagCollectionVideoOutputPreset : uint { + Monoscopic, + Stereoscopic, + } } diff --git a/src/AVFoundation/Events.cs b/src/AVFoundation/Events.cs index 0b1f85719fd3..83fc58bee0e3 100644 --- a/src/AVFoundation/Events.cs +++ b/src/AVFoundation/Events.cs @@ -28,8 +28,6 @@ // // -#if !WATCH - using System; using Foundation; using ObjCRuntime; @@ -505,5 +503,3 @@ public event EventHandler OutputChannelsChanged { } #endif } - -#endif diff --git a/src/AVKit/Enums.cs b/src/AVKit/Enums.cs index d8ba0c052201..41a7f676dbcb 100644 --- a/src/AVKit/Enums.cs +++ b/src/AVKit/Enums.cs @@ -23,7 +23,6 @@ public enum AVPlayerViewControlsStyle : long { [TV (13, 0)] #if NET [NoMac] - [NoWatch] [MacCatalyst (13, 1)] #endif [Native] @@ -38,7 +37,6 @@ public enum AVKitError : long { RecordingFailed = -1200, } - [NoWatch] [NoTV] [NoMac] [iOS (13, 0)] @@ -51,7 +49,6 @@ public enum AVAudioSessionRouteSelection : long { } [NoiOS] - [NoWatch] [NoTV] [NoMacCatalyst] [Native] diff --git a/src/Accessibility/AXHearingUtilities.cs b/src/Accessibility/AXHearingUtilities.cs index 39e19d3c3301..c0cc645fc8b0 100644 --- a/src/Accessibility/AXHearingUtilities.cs +++ b/src/Accessibility/AXHearingUtilities.cs @@ -18,7 +18,7 @@ namespace Accessibility { // accessibility.cs already provide the following attributes on the type - // [iOS (15,0), NoMac, NoTV, Watch (8,0), MacCatalyst (15,0)] + // [iOS (15,0), NoMac, NoTV, MacCatalyst (15,0)] public static partial class AXHearingUtilities { [DllImport (Constants.AccessibilityLibrary)] diff --git a/src/Accessibility/AXPrefers.cs b/src/Accessibility/AXPrefers.cs index 13a137694f69..c65656a94663 100644 --- a/src/Accessibility/AXPrefers.cs +++ b/src/Accessibility/AXPrefers.cs @@ -9,7 +9,7 @@ namespace Accessibility { // accessibility.cs already provide the following attributes on the type - // [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + // [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] public static partial class AXPrefers { [DllImport (Constants.AccessibilityLibrary)] diff --git a/src/Accounts/Enums.cs b/src/Accounts/Enums.cs index 1f3a59da84ee..0dac7a11c9fa 100644 --- a/src/Accounts/Enums.cs +++ b/src/Accounts/Enums.cs @@ -40,6 +40,8 @@ public enum ACErrorCode { /// An enumeration whose values indicate the result of a credential renewal request (see ). [Native] public enum ACAccountCredentialRenewResult : long { - Renewed, Rejected, Failed + Renewed, + Rejected, + Failed, } } diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index 8489dd41abb4..b178cae88586 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -35,7 +35,7 @@ namespace AppKit { public enum NSRunResponse : long { Stopped = -1000, Aborted = -1001, - Continues = -1002 + Continues = -1002, } [NoMacCatalyst] @@ -43,13 +43,15 @@ public enum NSRunResponse : long { public enum NSApplicationActivationOptions : ulong { Default = 0, ActivateAllWindows = 1, - ActivateIgnoringOtherWindows = 2 + ActivateIgnoringOtherWindows = 2, } [NoMacCatalyst] [Native] public enum NSApplicationActivationPolicy : long { - Regular, Accessory, Prohibited + Regular, + Accessory, + Prohibited, } [NoMacCatalyst] @@ -80,26 +82,31 @@ public enum NSApplicationPresentationOptions : ulong { public enum NSApplicationDelegateReply : ulong { Success, Cancel, - Failure + Failure, } [NoMacCatalyst] [Native] public enum NSRequestUserAttentionType : ulong { CriticalRequest = 0, - InformationalRequest = 10 + InformationalRequest = 10, } [NoMacCatalyst] [Native] public enum NSApplicationTerminateReply : ulong { - Cancel, Now, Later + Cancel, + Now, + Later, } [NoMacCatalyst] [Native] public enum NSApplicationPrintReply : ulong { - Cancelled, Success, Failure, ReplyLater + Cancelled, + Success, + Failure, + ReplyLater, } #if !NET @@ -107,14 +114,18 @@ public enum NSApplicationPrintReply : ulong { [Native] public enum NSApplicationLayoutDirection : long { LeftToRight = 0, - RightToLeft = 1 + RightToLeft = 1, } #endif [NoMacCatalyst] [Native] public enum NSImageInterpolation : ulong { - Default, None, Low, Medium, High + Default, + None, + Low, + Medium, + High, } [NoMacCatalyst] @@ -149,7 +160,7 @@ public enum NSComposite : ulong { Hue, Saturation, Color, - Luminosity + Luminosity, } [NoMacCatalyst] @@ -165,19 +176,25 @@ public enum NSBackingStore : ulong { [NoMacCatalyst] [Native] public enum NSWindowOrderingMode : long { - Below = -1, Out, Above, + Below = -1, + Out, + Above, } [NoMacCatalyst] [Native] public enum NSFocusRingPlacement : ulong { - RingOnly, RingBelow, RingAbove, + RingOnly, + RingBelow, + RingAbove, } [NoMacCatalyst] [Native] public enum NSFocusRingType : ulong { - Default, None, Exterior + Default, + None, + Exterior, } [NoMacCatalyst] @@ -187,20 +204,24 @@ public enum NSColorRenderingIntent : long { AbsoluteColorimetric, RelativeColorimetric, Perceptual, - Saturation + Saturation, } [MacCatalyst (13, 1)] [Native] public enum NSRectEdge : ulong { - MinXEdge, MinYEdge, MaxXEdge, MaxYEdge + MinXEdge, + MinYEdge, + MaxXEdge, + MaxYEdge, } [NoMacCatalyst] [Native] public enum NSUserInterfaceLayoutDirection : long { - LeftToRight, RightToLeft + LeftToRight, + RightToLeft, } #region NSColorSpace @@ -214,7 +235,7 @@ public enum NSColorSpaceModel : long { LAB, DeviceN, Indexed, - Pattern + Pattern, } #endregion @@ -225,7 +246,10 @@ public enum NSColorSpaceModel : long { [NoMacCatalyst] [Native] public enum NSTextTabType : ulong { - Left, Right, Center, Decimal + Left, + Right, + Center, + Decimal, } [Native] @@ -236,7 +260,7 @@ public enum NSLineBreakMode : ulong { Clipping, TruncatingHead, TruncatingTail, - TruncatingMiddle + TruncatingMiddle, } #endregion @@ -254,7 +278,7 @@ public enum NSType : ulong { Float = 3, PositiveFloat = 4, Double = 6, - PositiveDouble = 7 + PositiveDouble = 7, } #endif @@ -263,7 +287,7 @@ public enum NSType : ulong { public enum NSCellType : ulong { Null, Text, - Image + Image, } [NoMacCatalyst] @@ -308,7 +332,7 @@ public enum NSImageScale : ulong { ProportionallyDown = 0, AxesIndependently, None, - ProportionallyUpOrDown + ProportionallyUpOrDown, } [NoMacCatalyst] @@ -316,7 +340,7 @@ public enum NSImageScale : ulong { public enum NSCellStateValue : long { Mixed = -1, Off, - On + On, } [NoMacCatalyst] @@ -327,7 +351,7 @@ public enum NSCellStyleMask : ulong { ContentsCell = 1 << 0, PushInCell = 1 << 1, ChangeGrayCell = 1 << 2, - ChangeBackgroundCell = 1 << 3 + ChangeBackgroundCell = 1 << 3, } [NoMacCatalyst] @@ -337,7 +361,7 @@ public enum NSCellHit : ulong { None, ContentArea = 1, EditableTextArea = 2, - TrackableArae = 4 + TrackableArae = 4, } [NoMacCatalyst] @@ -346,7 +370,7 @@ public enum NSControlTint : ulong { Default = 0, // system 'default' Blue = 1, Graphite = 6, - Clear = 7 + Clear = 7, } [NoMacCatalyst] @@ -381,7 +405,7 @@ public enum NSImageLoadStatus : ulong { Cancelled, InvalidData, UnexpectedEOF, - ReadError + ReadError, } [NoMacCatalyst] @@ -390,14 +414,14 @@ public enum NSImageCacheMode : ulong { Default, Always, BySize, - Never + Never, } [NoMacCatalyst] [Native (ConvertToNative = "NSImageResizingModeExtensions.ToNative", ConvertToManaged = "NSImageResizingModeExtensions.ToManaged")] public enum NSImageResizingMode : long { Stretch, - Tile + Tile, } #endregion @@ -406,7 +430,9 @@ public enum NSImageResizingMode : long { [NoMacCatalyst] [Native] public enum NSAlertStyle : ulong { - Warning, Informational, Critical + Warning, + Informational, + Critical, } [NoMacCatalyst] @@ -416,7 +442,7 @@ public enum NSModalResponse : long { Cancel = 0, Stop = -1000, Abort = -1001, - Continue = -1002 + Continue = -1002, } #endregion @@ -501,7 +527,7 @@ public enum NSEventMask : ulong { Pressure = 1UL << (int) NSEventType.Pressure, // 10.10.3, 64-bit-only DirectTouch = 1UL << (int) NSEventType.DirectTouch, // 10.10 ChangeMode = 1UL << (int) NSEventType.ChangeMode, - AnyEvent = unchecked((ulong) UInt64.MaxValue) + AnyEvent = unchecked((ulong) UInt64.MaxValue), } [NoMacCatalyst] @@ -516,20 +542,25 @@ public enum NSEventModifierMask : ulong { NumericPadKeyMask = 1 << 21, HelpKeyMask = 1 << 22, FunctionKeyMask = 1 << 23, - DeviceIndependentModifierFlagsMask = 0xffff0000 + DeviceIndependentModifierFlagsMask = 0xffff0000, } [NoMacCatalyst] [Native] public enum NSPointingDeviceType : ulong { - Unknown, Pen, Cursor, Eraser + Unknown, + Pen, + Cursor, + Eraser, } [NoMacCatalyst] [Flags] [Native] public enum NSEventButtonMask : ulong { - Pen = 1, PenLower = 2, PenUpper = 4 + Pen = 1, + PenLower = 2, + PenUpper = 4, } // This enum is defined as an untyped enum in MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h @@ -659,7 +690,7 @@ public enum NSKey : ulong { LeftArrow = 0x7B, RightArrow = 0x7C, DownArrow = 0x7D, - UpArrow = 0x7E + UpArrow = 0x7E, } // This is an untyped enum in AppKit's NSEvent.h @@ -741,7 +772,7 @@ public enum NSFunctionKey : int { Redo = 0xF744, Find = 0xF745, Help = 0xF746, - ModeSwitch = 0xF747 + ModeSwitch = 0xF747, } [NoMacCatalyst] @@ -778,7 +809,7 @@ public enum NSEventSubtype : short { [Native] public enum NSSystemDefinedEvents : ulong { [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'NSEventSubtype.PowerOff' instead.")] - NSPowerOffEventType = 1 + NSPowerOffEventType = 1, } #endif // !NET @@ -810,19 +841,23 @@ public enum NSViewResizingMask : ulong { MaxXMargin = 4, MinYMargin = 8, HeightSizable = 16, - MaxYMargin = 32 + MaxYMargin = 32, } [NoMacCatalyst] [Native] public enum NSBorderType : ulong { - NoBorder, LineBorder, BezelBorder, GrooveBorder + NoBorder, + LineBorder, + BezelBorder, + GrooveBorder, } [NoMacCatalyst] [Native] public enum NSTextFieldBezelStyle : ulong { - Square, Rounded + Square, + Rounded, } [NoMacCatalyst] @@ -876,7 +911,7 @@ public enum NSWindowStyle : ulong { UnifiedTitleAndToolbar = 1 << 12, Hud = 1 << 13, FullScreenWindow = 1 << 14, - FullSizeContentView = 1 << 15 + FullSizeContentView = 1 << 15, } [NoMacCatalyst] @@ -891,7 +926,9 @@ public enum NSWindowSharingType : ulong { [NoMacCatalyst] [Native] public enum NSWindowBackingLocation : ulong { - Default, VideoMemory, MainMemory, + Default, + VideoMemory, + MainMemory, } [NoMacCatalyst] @@ -921,7 +958,7 @@ public enum NSWindowCollectionBehavior : ulong { [Native] public enum NSWindowNumberListOptions : ulong { AllApplication = 1 << 0, - AllSpaces = 1 << 4 + AllSpaces = 1 << 4, } [NoMacCatalyst] @@ -929,15 +966,20 @@ public enum NSWindowNumberListOptions : ulong { public enum NSSelectionDirection : ulong { Direct = 0, Next, - Previous + Previous, } [NoMacCatalyst] [Native] public enum NSWindowButton : ulong { - CloseButton, MiniaturizeButton, ZoomButton, ToolbarButton, DocumentIconButton, DocumentVersionsButton = 6, + CloseButton, + MiniaturizeButton, + ZoomButton, + ToolbarButton, + DocumentIconButton, + DocumentVersionsButton = 6, [Deprecated (PlatformName.MacOSX, 10, 12, message: "The standard window button for FullScreenButton is always null; use ZoomButton instead.")] - FullScreenButton + FullScreenButton, } [NoMacCatalyst] @@ -951,7 +993,7 @@ public enum NSTouchPhase : ulong { Cancelled = 1 << 4, Touching = Began | Moved | Stationary, - Any = unchecked((ulong) UInt64.MaxValue) + Any = unchecked((ulong) UInt64.MaxValue), } #endregion #region NSAnimation @@ -962,7 +1004,7 @@ public enum NSAnimationCurve : ulong { EaseInOut, EaseIn, EaseOut, - Linear + Linear, }; [NoMacCatalyst] @@ -970,7 +1012,7 @@ public enum NSAnimationCurve : ulong { public enum NSAnimationBlockingMode : ulong { Blocking, Nonblocking, - NonblockingThreaded + NonblockingThreaded, }; #endregion @@ -985,7 +1027,7 @@ public enum NSTitlePosition : ulong { BelowTop, AboveBottom, AtBottom, - BelowBottom + BelowBottom, }; [NoMacCatalyst] @@ -997,7 +1039,7 @@ public enum NSBoxType : ulong { NSBoxSeparator, [Obsoleted (PlatformName.MacOSX, 10, 15, message: "'NSBoxOldStyle' is discouraged. Use 'NSBoxPrimary' or 'NSBoxCustom'.")] NSBoxOldStyle, - NSBoxCustom + NSBoxCustom, }; #endregion @@ -1014,7 +1056,7 @@ public enum NSButtonType : ulong { OnOff, MomentaryPushIn, Accelerator, // 10.10.3 - MultiLevelAccelerator // 10.10.3 + MultiLevelAccelerator, // 10.10.3 } [NoMacCatalyst] @@ -1066,7 +1108,7 @@ public enum NSGradientType : ulong { ConcaveWeak, ConcaveStrong, ConvexWeak, - ConvexStrong + ConvexStrong, } #endregion @@ -1077,7 +1119,7 @@ public enum NSGradientType : ulong { public enum NSWindowDepth : int { TwentyfourBitRgb = 0x208, SixtyfourBitRgb = 0x210, - OneHundredTwentyEightBitRgb = 0x220 + OneHundredTwentyEightBitRgb = 0x220, } [NoMacCatalyst] @@ -1112,14 +1154,14 @@ public enum NSCompositingOperation : ulong { Hue, Saturation, Color, - Luminosity + Luminosity, } [NoMacCatalyst] [Native] public enum NSAnimationEffect : ulong { DissapearingItemDefault = 0, - EffectPoof = 10 + EffectPoof = 10, } #endregion @@ -1127,7 +1169,10 @@ public enum NSAnimationEffect : ulong { [NoMacCatalyst] [Native] public enum NSMatrixMode : ulong { - Radio, Highlight, List, Track + Radio, + Highlight, + List, + Track, } #endregion @@ -1135,13 +1180,16 @@ public enum NSMatrixMode : ulong { [NoMacCatalyst] [Native] public enum NSBrowserColumnResizingType : ulong { - None, Auto, User + None, + Auto, + User, } [NoMacCatalyst] [Native] public enum NSBrowserDropOperation : ulong { - On, Above + On, + Above, } #endregion @@ -1157,7 +1205,7 @@ public enum NSColorPanelMode : long { CustomPalette, ColorList, Wheel, - Crayon + Crayon, }; [NoMacCatalyst] @@ -1172,7 +1220,7 @@ public enum NSColorPanelFlags : ulong { ColorList = 0x00000020, Wheel = 0x00000040, Crayon = 0x00000080, - All = 0x0000ffff + All = 0x0000ffff, } @@ -1182,18 +1230,25 @@ public enum NSColorPanelFlags : ulong { [NoMacCatalyst] [Native] public enum NSDocumentChangeType : ulong { - Done, Undone, Cleared, ReadOtherContents, Autosaved, Redone, - Discardable = 256 /* New in Lion */ + Done, + Undone, + Cleared, + ReadOtherContents, + Autosaved, + Redone, + Discardable = 256, /* New in Lion */ } [NoMacCatalyst] [Native] public enum NSSaveOperationType : ulong { - Save, SaveAs, SaveTo, + Save, + SaveAs, + SaveTo, Autosave = 3, /* Deprecated name in Lion */ Elsewhere = 3, /* New Lion name */ InPlace = 4, /* New in Lion */ - AutoSaveAs = 5 /* New in Mountain Lion */ + AutoSaveAs = 5, /* New in Mountain Lion */ } #endregion @@ -1203,19 +1258,24 @@ public enum NSSaveOperationType : ulong { [NoMacCatalyst] [Native] public enum NSLineCapStyle : ulong { - Butt, Round, Square + Butt, + Round, + Square, } [NoMacCatalyst] [Native] public enum NSLineJoinStyle : ulong { - Miter, Round, Bevel + Miter, + Round, + Bevel, } [NoMacCatalyst] [Native] public enum NSWindingRule : ulong { - NonZero, EvenOdd + NonZero, + EvenOdd, } [NoMacCatalyst] @@ -1234,7 +1294,8 @@ public enum NSBezierPathElement : ulong { [NoMacCatalyst] [Native] public enum NSRulerOrientation : ulong { - Horizontal, Vertical + Horizontal, + Vertical, } #endregion @@ -1248,7 +1309,7 @@ public enum NSGestureRecognizerState : long { Ended, Cancelled, Failed, - Recognized = NSGestureRecognizerState.Ended + Recognized = NSGestureRecognizerState.Ended, } #endregion @@ -1257,7 +1318,7 @@ public enum NSGestureRecognizerState : long { [Native] public enum NSUserInterfaceLayoutOrientation : long { Horizontal = 0, - Vertical = 1 + Vertical = 1, } // NSStackView.h:typedef float NSStackViewVisibilityPriority @@ -1269,7 +1330,7 @@ public enum NSStackViewVisibilityPriority : int { Musthold = MustHold, #endif DetachOnlyIfNecessary = 900, - NotVisible = 0 + NotVisible = 0, } [NoMacCatalyst] @@ -1279,7 +1340,7 @@ public enum NSStackViewGravity : long { Leading = 1, Center = 2, Bottom = 3, - Trailing = 3 + Trailing = 3, } #endregion @@ -1291,7 +1352,7 @@ public enum NSStackViewDistribution : long { FillEqually, FillProportionally, EqualSpacing, - EqualCentering + EqualCentering, } [NoMacCatalyst] @@ -1316,7 +1377,7 @@ public enum NSTextAlignment : ulong { Right = 1, Center = 2, Justified = 3, - Natural = 4 + Natural = 4, } #if !NET && MONOMAC @@ -1344,7 +1405,7 @@ public enum NSTextMovement : long { Right = 0x14, Up = 0x15, Down = 0x16, - Cancel = 0x17 + Cancel = 0x17, } [NoMacCatalyst] @@ -1356,13 +1417,16 @@ public enum NSMenuProperty : ulong { KeyEquivalent = 1 << 2, Image = 1 << 3, Enabled = 1 << 4, - AccessibilityDescription = 1 << 5 + AccessibilityDescription = 1 << 5, } [NoMacCatalyst] [Native] public enum NSFontRenderingMode : ulong { - Default, Antialiased, IntegerAdvancements, AntialiasedIntegerAdvancements + Default, + Antialiased, + IntegerAdvancements, + AntialiasedIntegerAdvancements, } [NoMacCatalyst] @@ -1372,7 +1436,7 @@ public enum NSPasteboardReadingOptions : ulong { AsData = 0, AsString = 1, AsPropertyList = 2, - AsKeyedArchive = 4 + AsKeyedArchive = 4, } #if !NET && MONOMAC // Use the one in Foundation instead, only keep this in macOS until .NET. @@ -1387,7 +1451,7 @@ public enum NSUnderlineStyle : long { PatternDash = 0x0200, PatternDashDot = 0x0300, PatternDashDotDot = 0x0400, - ByWord = 0x8000 + ByWord = 0x8000, } #endif @@ -1398,19 +1462,22 @@ public enum NSUnderlinePattern : int { Dot = 0x0100, Dash = 0x0200, DashDot = 0x0300, - DashDotDot = 0x0400 + DashDotDot = 0x0400, } [NoMacCatalyst] [Native] public enum NSSelectionAffinity : ulong { - Upstream, Downstream + Upstream, + Downstream, } [NoMacCatalyst] [Native] public enum NSSelectionGranularity : ulong { - Character, Word, Paragraph + Character, + Word, + Paragraph, } #region NSTrackingArea @@ -1427,7 +1494,7 @@ public enum NSTrackingAreaOptions : ulong { ActiveAlways = 0x80, AssumeInside = 0x100, InVisibleRect = 0x200, - EnabledDuringMouseDrag = 0x400 + EnabledDuringMouseDrag = 0x400, } #endregion @@ -1437,13 +1504,17 @@ public enum NSLineSweepDirection : ulong { NSLineSweepLeft, NSLineSweepRight, NSLineSweepDown, - NSLineSweepUp + NSLineSweepUp, } [NoMacCatalyst] [Native] public enum NSLineMovementDirection : ulong { - None, Left, Right, Down, Up + None, + Left, + Right, + Down, + Up, } [NoMacCatalyst] @@ -1460,7 +1531,7 @@ public enum NSTiffCompression : ulong { PackBits = 32773, [Deprecated (PlatformName.MacOSX, 10, 7)] - OldJpeg = 32865 + OldJpeg = 32865, } [NoMacCatalyst] @@ -1471,7 +1542,7 @@ public enum NSBitmapImageFileType : ulong { Gif, Jpeg, Png, - Jpeg2000 + Jpeg2000, } [NoMacCatalyst] @@ -1482,7 +1553,7 @@ public enum NSImageRepLoadStatus : long { WillNeedAllData = -3, InvalidData = -4, UnexpectedEOF = -5, - Completed = -6 + Completed = -6, } [NoMacCatalyst] @@ -1496,19 +1567,22 @@ public enum NSBitmapFormat : ulong { LittleEndian16Bit = 1 << 8, LittleEndian32Bit = 1 << 9, BigEndian16Bit = 1 << 10, - BigEndian32Bit = 1 << 11 + BigEndian32Bit = 1 << 11, } [NoMacCatalyst] [Native] public enum NSPrintingOrientation : ulong { - Portrait, Landscape + Portrait, + Landscape, } [NoMacCatalyst] [Native] public enum NSPrintingPaginationMode : ulong { - Auto, Fit, Clip + Auto, + Fit, + Clip, } #if !NET @@ -1519,7 +1593,7 @@ public enum NSPrintingPaginationMode : ulong { public enum NSGlyphStorageOptions : ulong { ShowControlGlyphs = 1, ShowInvisibleGlyphs = 2, - WantsBidiLevels = 4 + WantsBidiLevels = 4, } #endif // !NET @@ -1530,14 +1604,16 @@ public enum NSGlyphStorageOptions : ulong { [Native] public enum NSTextStorageEditedFlags : ulong { EditedAttributed = 1, - EditedCharacters = 2 + EditedCharacters = 2, } #endif [NoMacCatalyst] [Native] public enum NSPrinterTableStatus : ulong { - Ok, NotFound, Error + Ok, + NotFound, + Error, } [NoMacCatalyst] @@ -1577,7 +1653,8 @@ public enum NSScrollerPart : ulong { [Native] [Deprecated (PlatformName.MacOSX, 10, 14)] public enum NSScrollerArrow : ulong { - IncrementArrow, DecrementArrow + IncrementArrow, + DecrementArrow, } [NoMacCatalyst] @@ -1586,7 +1663,7 @@ public enum NSPrintingPageOrder : long { Descending = -1, Special, Ascending, - Unknown + Unknown, } [NoMacCatalyst] @@ -1600,13 +1677,14 @@ public enum NSPrintPanelOptions : long { ShowsScaling = 16, ShowsPrintSelection = 32, ShowsPageSetupAccessory = 256, - ShowsPreview = 131072 + ShowsPreview = 131072, } [NoMacCatalyst] [Native] public enum NSTextBlockValueType : ulong { - Absolute, Percentage + Absolute, + Percentage, } [NoMacCatalyst] @@ -1623,19 +1701,25 @@ public enum NSTextBlockDimension : ulong { [NoMacCatalyst] [Native] public enum NSTextBlockLayer : long { - Padding = -1, Border, Margin + Padding = -1, + Border, + Margin, } [NoMacCatalyst] [Native] public enum NSTextBlockVerticalAlignment : ulong { - Top, Middle, Bottom, Baseline + Top, + Middle, + Bottom, + Baseline, } [NoMacCatalyst] [Native] public enum NSTextTableLayoutAlgorithm : ulong { - Automatic, Fixed + Automatic, + Fixed, } [NoMacCatalyst] @@ -1681,26 +1765,31 @@ public enum NSFontTraitMask : ulong { Poster = 0x100, Compressed = 0x200, FixedPitch = 0x400, - Unitalic = 0x1000000 + Unitalic = 0x1000000, } [NoMacCatalyst] [Flags] [Native] public enum NSPasteboardWritingOptions : ulong { - WritingPromised = 1 << 9 + WritingPromised = 1 << 9, } [MacCatalyst (13, 1)] [Native] public enum NSToolbarDisplayMode : ulong { - Default, IconAndLabel, Icon, Label + Default, + IconAndLabel, + Icon, + Label, } [MacCatalyst (13, 1)] [Native] public enum NSToolbarSizeMode : ulong { - Default, Regular, Small + Default, + Regular, + Small, } #if !NET @@ -1711,7 +1800,7 @@ public enum NSAlertType : long { ErrorReturn = -2, OtherReturn, AlternateReturn, - DefaultReturn + DefaultReturn, } #endif // !NET @@ -1720,7 +1809,8 @@ public enum NSAlertType : long { [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use NSModalResponse instead.")] [Native] public enum NSPanelButtonType : long { - Cancel, Ok + Cancel, + Ok, } #endif @@ -1732,7 +1822,7 @@ public enum NSTableViewColumnAutoresizingStyle : ulong { Sequential, ReverseSequential, LastColumnOnly, - FirstColumnOnly + FirstColumnOnly, } [NoMacCatalyst] @@ -1757,7 +1847,7 @@ public enum NSTableViewDraggingDestinationFeedbackStyle : long { [Native] public enum NSTableViewDropOperation : ulong { On, - Above + Above, } [NoMacCatalyst] @@ -1766,7 +1856,7 @@ public enum NSTableViewDropOperation : ulong { public enum NSTableColumnResizing : long { None = -1, Autoresizing = (1 << 0), - UserResizingMask = (1 << 1) + UserResizingMask = (1 << 1), } [NoMacCatalyst] @@ -1776,7 +1866,7 @@ public enum NSTableViewGridStyle : ulong { None = 0, SolidVerticalLine = 1 << 0, SolidHorizontalLine = 1 << 1, - DashedHorizontalGridLine = 1 << 3 + DashedHorizontalGridLine = 1 << 3, } [NoMacCatalyst] @@ -1785,7 +1875,7 @@ public enum NSTableViewGridStyle : ulong { public enum NSGradientDrawingOptions : ulong { None = 0, BeforeStartingLocation = (1 << 0), - AfterEndingLocation = (1 << 1) + AfterEndingLocation = (1 << 1), } [NoMacCatalyst] @@ -1799,7 +1889,7 @@ public enum NSImageAlignment : ulong { Bottom, BottomLeft, BottomRight, - Right + Right, } [NoMacCatalyst] @@ -1809,7 +1899,7 @@ public enum NSImageFrameStyle : ulong { Photo, GrayBezel, Groove, - Button + Button, } [NoMacCatalyst] @@ -1821,7 +1911,7 @@ public enum NSSpeechBoundary : ulong { hWord, #endif Word = 1, - Sentence + Sentence, } [NoMacCatalyst] @@ -1829,7 +1919,7 @@ public enum NSSpeechBoundary : ulong { public enum NSSplitViewDividerStyle : long { Thick = 1, Thin = 2, - PaneSplitter = 3 + PaneSplitter = 3, } [NoMacCatalyst] @@ -1848,7 +1938,7 @@ public enum NSImageScaling : ulong { ProportionallyDown = 0, AxesIndependently, None, - ProportionallyUpOrDown + ProportionallyUpOrDown, } [NoMacCatalyst] @@ -1861,7 +1951,7 @@ public enum NSSegmentStyle : long { TexturedSquare = 4, Capsule = 5, SmallSquare = 6, - Separated = 8 + Separated = 8, } [NoMacCatalyst] @@ -1870,7 +1960,7 @@ public enum NSSegmentSwitchTracking : ulong { SelectOne = 0, SelectAny = 1, Momentary = 2, - MomentaryAccelerator // 10.10.3 + MomentaryAccelerator, // 10.10.3 } [NoMacCatalyst] @@ -1881,14 +1971,14 @@ public enum NSTickMarkPosition : ulong { Left, Right, Leading = Left, - Trailing = Right + Trailing = Right, } [NoMacCatalyst] [Native] public enum NSSliderType : ulong { Linear = 0, - Circular = 1 + Circular = 1, } [NoMacCatalyst] @@ -1917,7 +2007,7 @@ public enum NSWorkspaceLaunchOptions : ulong { NewInstance = 0x80000, Hide = 0x100000, HideOthers = 0x200000, - Default = Async | AllowingClassicStartup + Default = Async | AllowingClassicStartup, } [NoMacCatalyst] @@ -1925,7 +2015,7 @@ public enum NSWorkspaceLaunchOptions : ulong { [Native] public enum NSWorkspaceIconCreationOptions : ulong { NSExcludeQuickDrawElements = 1 << 1, - NSExclude10_4Elements = 1 << 2 + NSExclude10_4Elements = 1 << 2, } [NoMacCatalyst] @@ -1934,7 +2024,7 @@ public enum NSPathStyle : long { Standard, [Deprecated (PlatformName.MacOSX, 10, 7)] NavigationBar, - PopUp + PopUp, } [NoMacCatalyst] @@ -1952,7 +2042,9 @@ public enum NSTabViewType : ulong { [NoMacCatalyst] [Native] public enum NSTabState : ulong { - Selected, Background, Pressed + Selected, + Background, + Pressed, } [NoMacCatalyst] @@ -1961,20 +2053,23 @@ public enum NSTabViewControllerTabStyle : long { SegmentedControlOnTop = 0, SegmentedControlOnBottom, Toolbar, - Unspecified = -1 + Unspecified = -1, } [NoMacCatalyst] [Native] public enum NSLevelIndicatorStyle : ulong { - Relevancy, ContinuousCapacity, DiscreteCapacity, RatingLevel + Relevancy, + ContinuousCapacity, + DiscreteCapacity, + RatingLevel, } [NoMacCatalyst] [Flags] [Native] public enum NSFontCollectionOptions : long { - ApplicationOnlyMask = 1 + ApplicationOnlyMask = 1, } #if XAMCORE_5_0 @@ -1988,7 +2083,8 @@ public enum NSFontCollectionOptions : long { #endif [Native] public enum NSCollectionViewDropOperation : long { - On = 0, Before = 1 + On = 0, + Before = 1, } #if XAMCORE_5_0 @@ -2005,7 +2101,7 @@ public enum NSCollectionViewItemHighlightState : long { None = 0, ForSelection = 1, ForDeselection = 2, - AsDropTarget = 3 + AsDropTarget = 3, } #if XAMCORE_5_0 @@ -2030,7 +2126,7 @@ public enum NSCollectionViewScrollPosition : ulong { Right = 1 << 5, LeadingEdge = 1 << 6, TrailingEdge = 1 << 7, - NearestVerticalEdge = 1 << 8 + NearestVerticalEdge = 1 << 8, } [MacCatalyst (13, 1)] @@ -2039,7 +2135,7 @@ public enum NSCollectionElementCategory : long { Item, SupplementaryView, DecorationView, - InterItemGap + InterItemGap, } [NoMacCatalyst] @@ -2049,14 +2145,14 @@ public enum NSCollectionUpdateAction : long { Delete, Reload, Move, - None + None, } [MacCatalyst (13, 1)] [Native] public enum NSCollectionViewScrollDirection : long { Vertical, - Horizontal + Horizontal, } [NoMacCatalyst] @@ -2064,13 +2160,14 @@ public enum NSCollectionViewScrollDirection : long { public enum NSDatePickerStyle : ulong { TextFieldAndStepper, ClockAndCalendar, - TextField + TextField, } [NoMacCatalyst] [Native] public enum NSDatePickerMode : ulong { - Single, Range + Single, + Range, } [NoMacCatalyst] @@ -2083,7 +2180,7 @@ public enum NSDatePickerElementFlags : ulong { YearMonthDate = 0xc0, YearMonthDateDay = 0xe0, - Era = 0x100 + Era = 0x100, } [NoMacCatalyst] @@ -2111,13 +2208,13 @@ public enum NSOpenGLContextParameter : ulong { GpuVertexProcessing = 310, GpuFragmentProcessing = 311, HasDrawable = 314, - MpsSwapsInFlight = 315 + MpsSwapsInFlight = 315, } [NoMacCatalyst] public enum NSSurfaceOrder { AboveWindow = 1, - BelowWindow = -1 + BelowWindow = -1, } [NoMacCatalyst] @@ -2178,7 +2275,7 @@ public enum NSOpenGLPixelFormatAttribute : uint { // uint32_t NSOpenGLPixelForma [Deprecated (PlatformName.MacOSX, 10, 5)] MPSafe = 78, [Deprecated (PlatformName.MacOSX, 10, 5)] - MultiScreen = 81 + MultiScreen = 81, } [NoMacCatalyst] @@ -2186,7 +2283,7 @@ public enum NSOpenGLPixelFormatAttribute : uint { // uint32_t NSOpenGLPixelForma public enum NSOpenGLProfile : int { VersionLegacy = 0x1000, // Legacy Version3_2Core = 0x3200, // 3.2 or better - Version4_1Core = 0x4100 + Version4_1Core = 0x4100, } [NoMacCatalyst] @@ -2205,7 +2302,7 @@ public enum NSOpenGLGlobalOption : uint { RetainRenderers = 503, UseBuildCache = 506, [Deprecated (PlatformName.MacOSX, 10, 4)] - ResetLibrary = 504 + ResetLibrary = 504, } [NoMacCatalyst] @@ -2233,7 +2330,7 @@ public enum NSGLTextureCubeMap : uint { PositiveZ = 0x8519, NegativeX = 0x8516, NegativeY = 0x8517, - NegativeZ = 0x851A + NegativeZ = 0x851A, } [NoMacCatalyst] @@ -2241,7 +2338,7 @@ public enum NSGLTextureCubeMap : uint { public enum NSGLColorBuffer : uint { Front = 0x0404, Back = 0x0405, - Aux0 = 0x0409 + Aux0 = 0x0409, } [NoMacCatalyst] @@ -2251,13 +2348,14 @@ public enum NSProgressIndicatorThickness : ulong { Small = 10, Regular = 14, Aqua = 12, - Large = 18 + Large = 18, } [NoMacCatalyst] [Native] public enum NSProgressIndicatorStyle : ulong { - Bar, Spinning + Bar, + Spinning, } [NoMacCatalyst] @@ -2265,7 +2363,7 @@ public enum NSProgressIndicatorStyle : ulong { public enum NSPopUpArrowPosition : ulong { None, Center, - Bottom + Bottom, } // FileType 4cc values to use with NSFileTypeForHFSTypeCode. @@ -2467,7 +2565,7 @@ public enum NSDrawerState : ulong { Closed = 0, Opening = 1, Open = 2, - Closing = 3 + Closing = 3, } [NoMacCatalyst] @@ -2483,14 +2581,14 @@ public enum NSWindowLevel : long { ScreenSaver = 1000, Status = 25, Submenu = 3, - TornOffMenu = 3 + TornOffMenu = 3, } [NoMacCatalyst] [Native] public enum NSRuleEditorRowType : ulong { Simple = 0, - Compound + Compound, } [NoMacCatalyst] @@ -2499,14 +2597,18 @@ public enum NSRuleEditorNestingMode : ulong { Single, List, Compound, - Simple + Simple, } [NoMacCatalyst] [Native] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSGlyphProperty' instead.")] public enum NSGlyphInscription : ulong { - Base, Below, Above, Overstrike, OverBelow + Base, + Below, + Above, + Overstrike, + OverBelow, } [NoMacCatalyst] @@ -2528,7 +2630,7 @@ public enum NSRemoteNotificationType : ulong { None = 0, Badge = 1 << 0, Sound = 1 << 1, - Alert = 1 << 2 + Alert = 1 << 2, } [NoMacCatalyst] @@ -2536,14 +2638,14 @@ public enum NSRemoteNotificationType : ulong { public enum NSScrollViewFindBarPosition : long { AboveHorizontalRuler = 0, AboveContent, - BelowContent + BelowContent, } [NoMacCatalyst] [Native] public enum NSScrollerStyle : long { Legacy = 0, - Overlay + Overlay, } [NoMacCatalyst] @@ -2551,7 +2653,7 @@ public enum NSScrollerStyle : long { public enum NSScrollElasticity : long { Automatic = 0, None, - Allowed + Allowed, } [NoMacCatalyst] @@ -2559,7 +2661,7 @@ public enum NSScrollElasticity : long { public enum NSScrollerKnobStyle : long { Default = 0, Dark = 1, - Light = 2 + Light = 2, } [NoMacCatalyst] @@ -2572,7 +2674,7 @@ public enum NSEventPhase : ulong { Changed = 4, Ended = 8, Cancelled = 16, - MayBegin = 32 + MayBegin = 32, } [NoMacCatalyst] @@ -2580,19 +2682,22 @@ public enum NSEventPhase : ulong { [Native] public enum NSEventSwipeTrackingOptions : ulong { LockDirection = 1, - ClampGestureAmount = 2 + ClampGestureAmount = 2, } [NoMacCatalyst] [Native] public enum NSEventGestureAxis : long { - None, Horizontal, Vertical + None, + Horizontal, + Vertical, } [NoMacCatalyst] [Native] public enum NSLayoutConstraintOrientation : long { - Horizontal, Vertical + Horizontal, + Vertical, } [NoMacCatalyst] @@ -2609,13 +2714,16 @@ public enum NSLayoutPriority : int /*float*/ { [NoMacCatalyst] [Native] public enum NSPopoverAppearance : long { - Minimal, HUD + Minimal, + HUD, } [NoMacCatalyst] [Native] public enum NSPopoverBehavior : long { - ApplicationDefined, Transient, Semitransient + ApplicationDefined, + Transient, + Semitransient, } [NoMacCatalyst] @@ -2623,29 +2731,36 @@ public enum NSPopoverBehavior : long { public enum NSTableViewRowSizeStyle : long { Default = -1, Custom = 0, - Small, Medium, Large + Small, + Medium, + Large, } [NoMacCatalyst] [Native] public enum NSTableRowActionEdge : long { Leading, - Trailing + Trailing, } [NoMacCatalyst] [Native] public enum NSTableViewRowActionStyle : long { Regular, - Destructive + Destructive, } [NoMacCatalyst] [Flags] [Native] public enum NSTableViewAnimation : ulong { - None, Fade = 1, Gap = 2, - SlideUp = 0x10, SlideDown = 0x20, SlideLeft = 0x30, SlideRight = 0x40 + None, + Fade = 1, + Gap = 2, + SlideUp = 0x10, + SlideDown = 0x20, + SlideLeft = 0x30, + SlideRight = 0x40, } [NoMacCatalyst] @@ -2653,25 +2768,34 @@ public enum NSTableViewAnimation : ulong { [Native] public enum NSDraggingItemEnumerationOptions : ulong { Concurrent = 1 << 0, - ClearNonenumeratedImages = 1 << 16 + ClearNonenumeratedImages = 1 << 16, } [NoMacCatalyst] [Native] public enum NSDraggingFormation : long { - Default, None, Pile, List, Stack + Default, + None, + Pile, + List, + Stack, } [NoMacCatalyst] [Native] public enum NSDraggingContext : long { - OutsideApplication, WithinApplication + OutsideApplication, + WithinApplication, } [NoMacCatalyst] [Native] public enum NSWindowAnimationBehavior : long { - Default = 0, None = 2, DocumentWindow, UtilityWindow, AlertPanel + Default = 0, + None = 2, + DocumentWindow, + UtilityWindow, + AlertPanel, } [NoMacCatalyst] @@ -2689,7 +2813,7 @@ public enum NSTextFinderAction : long { SelectAllInSelection = 10, HideFindInterface = 11, ShowReplaceInterface = 12, - HideReplaceInterface = 13 + HideReplaceInterface = 13, } [NoMacCatalyst] @@ -2706,7 +2830,7 @@ public enum NSFontPanelMode : ulong { ShadowEffectMask = 1 << 12, AllEffectsMask = 0XFFF00, StandardMask = 0xFFFF, - AllModesMask = unchecked((ulong) UInt32.MaxValue) + AllModesMask = unchecked((ulong) UInt32.MaxValue), } [NoMacCatalyst] @@ -2723,7 +2847,7 @@ public enum NSFontCollectionVisibility : ulong { public enum NSSharingContentScope : long { Item, Partial, - Full + Full, } [NoMacCatalyst] @@ -2743,7 +2867,7 @@ public enum NSTypesetterControlCharacterAction : ulong { public enum NSPageControllerTransitionStyle : long { StackHistory, StackBook, - HorizontalStrip + HorizontalStrip, } [NoMacCatalyst] @@ -2769,21 +2893,21 @@ public enum NSViewControllerTransitionOptions : ulong { SlideRight = 0x80, SlideForward = 0x140, SlideBackward = 0x180, - AllowUserInteraction = 0x1000 + AllowUserInteraction = 0x1000, } [NoMacCatalyst] [Flags] [Native] public enum NSApplicationOcclusionState : ulong { - Visible = 1 << 1 + Visible = 1 << 1, } [NoMacCatalyst] [Flags] [Native] public enum NSWindowOcclusionState : ulong { - Visible = 1 << 1 + Visible = 1 << 1, } @@ -2822,7 +2946,7 @@ public enum NSVisualEffectMaterial : long { [Native] public enum NSVisualEffectBlendingMode : long { BehindWindow, - WithinWindow + WithinWindow, } [NoMacCatalyst] @@ -2830,7 +2954,7 @@ public enum NSVisualEffectBlendingMode : long { public enum NSVisualEffectState : long { FollowsWindowActiveState, Active, - Inactive + Inactive, } #endregion @@ -2843,7 +2967,7 @@ public enum NSPressureBehavior : long { PrimaryGeneric = 2, PrimaryAccelerator = 3, PrimaryDeepClick = 5, - PrimaryDeepDrag = 6 + PrimaryDeepDrag = 6, } [NoMacCatalyst] @@ -2851,7 +2975,7 @@ public enum NSPressureBehavior : long { public enum NSHapticFeedbackPattern : long { Generic = 0, Alignment, - LevelChange + LevelChange, } [NoMacCatalyst] @@ -2859,7 +2983,7 @@ public enum NSHapticFeedbackPattern : long { public enum NSHapticFeedbackPerformanceTime : ulong { Default = 0, Now, - DrawCompleted + DrawCompleted, } [NoMacCatalyst] @@ -2867,7 +2991,7 @@ public enum NSHapticFeedbackPerformanceTime : ulong { public enum NSSpringLoadingHighlight : long { None = 0, Standard, - Emphasized + Emphasized, } [NoMacCatalyst] @@ -2877,21 +3001,21 @@ public enum NSSpringLoadingOptions : ulong { Disabled = 0, Enabled = 1 << 0, ContinuousActivation = 1 << 1, - NoHover = 1 << 3 + NoHover = 1 << 3, } [NoMacCatalyst] [Flags] [Native] public enum NSWindowListOptions : long { - OrderedFrontToBack = (1 << 0) + OrderedFrontToBack = (1 << 0), } [NoMacCatalyst] [Native] public enum NSStatusItemBehavior : ulong { RemovalAllowed = (1 << 1), - TerminationOnRemoval = (1 << 2) + TerminationOnRemoval = (1 << 2), } [NoMacCatalyst] @@ -2899,7 +3023,7 @@ public enum NSStatusItemBehavior : ulong { public enum NSWindowTabbingMode : long { Automatic, Preferred, - Disallowed + Disallowed, } [NoMacCatalyst] @@ -2907,7 +3031,7 @@ public enum NSWindowTabbingMode : long { public enum NSWindowUserTabbingPreference : long { Manual, Always, - InFullScreen + InFullScreen, } [NoMacCatalyst] @@ -2920,7 +3044,7 @@ public enum NSGridCellPlacement : long { Trailing, Bottom = Trailing, Center, - Fill + Fill, } [NoMacCatalyst] @@ -2929,7 +3053,7 @@ public enum NSGridRowAlignment : long { Inherited = 0, None, FirstBaseline, - LastBaseline + LastBaseline, } [NoMacCatalyst] @@ -2937,7 +3061,7 @@ public enum NSGridRowAlignment : long { public enum NSImageLayoutDirection : long { Unspecified = -1, LeftToRight = 2, - RightToLeft = 3 + RightToLeft = 3, } [NoMacCatalyst] @@ -2948,7 +3072,7 @@ public enum NSCloudKitSharingServiceOptions : ulong { AllowPublic = 1 << 0, AllowPrivate = 1 << 1, AllowReadOnly = 1 << 4, - AllowReadWrite = 1 << 5 + AllowReadWrite = 1 << 5, } [NoMacCatalyst] @@ -2986,7 +3110,7 @@ public enum NSPasteboardContentsOptions : ulong { [Native] public enum NSTouchType : long { Direct, - Indirect + Indirect, } [NoMacCatalyst] @@ -2994,14 +3118,14 @@ public enum NSTouchType : long { [Flags] public enum NSTouchTypeMask : ulong { Direct = (1 << (int) NSTouchType.Direct), - Indirect = (1 << (int) NSTouchType.Indirect) + Indirect = (1 << (int) NSTouchType.Indirect), } [NoMacCatalyst] [Native] public enum NSScrubberMode : long { Fixed = 0, - Free + Free, } [NoMacCatalyst] @@ -3010,7 +3134,7 @@ public enum NSScrubberAlignment : long { None = 0, Leading, Trailing, - Center + Center, } [NoMacCatalyst] diff --git a/src/AppKit/NSLayoutManager.cs b/src/AppKit/NSLayoutManager.cs index 5e7f03879024..e23bbef40209 100644 --- a/src/AppKit/NSLayoutManager.cs +++ b/src/AppKit/NSLayoutManager.cs @@ -1,6 +1,4 @@ // Copyright 2015 Xamarin, Inc. -#if !WATCH - #if !MONOMAC using NSFont = UIKit.UIFont; #endif @@ -49,5 +47,3 @@ public virtual nint IntAttributeforGlyphAtIndex (nint attributeTag, nint glyphIn #endif // !NET && MONOMAC } } - -#endif // !WATCH diff --git a/src/AudioToolbox/AudioConverter.cs b/src/AudioToolbox/AudioConverter.cs index d9a544234dbc..4a672adc6b86 100644 --- a/src/AudioToolbox/AudioConverter.cs +++ b/src/AudioToolbox/AudioConverter.cs @@ -89,7 +89,7 @@ public enum AudioConverterPrimeMethod // typedef UInt32 AudioConverterPropertyID [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public enum AudioConverterOptions : uint { None = 0, @@ -467,7 +467,7 @@ public bool CanResumeFromInterruption { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public static AudioConverter? Create (AudioStreamBasicDescription sourceFormat, AudioStreamBasicDescription destinationFormat, AudioConverterOptions options, out AudioConverterError error) { @@ -491,7 +491,7 @@ public bool CanResumeFromInterruption { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public static AudioConverter? Create (AudioStreamBasicDescription sourceFormat, AudioStreamBasicDescription destinationFormat, AudioConverterOptions options) { @@ -849,7 +849,7 @@ unsafe static extern AudioConverterError AudioConverterNewSpecific (AudioStreamB [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.AudioToolboxLibrary)] unsafe static extern void AudioConverterPrepare (uint inFlags, IntPtr ioReserved, BlockLiteral* block); @@ -860,7 +860,7 @@ unsafe static extern AudioConverterError AudioConverterNewSpecific (AudioStreamB [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.AudioToolboxLibrary)] unsafe static extern /* OSStatus */ AudioConverterError AudioConverterNewWithOptions ( diff --git a/src/AudioToolbox/AudioFile.cs b/src/AudioToolbox/AudioFile.cs index e9b91260e2b6..71130c797555 100644 --- a/src/AudioToolbox/AudioFile.cs +++ b/src/AudioToolbox/AudioFile.cs @@ -41,7 +41,6 @@ using CoreFoundation; using Foundation; -using OSStatus = System.Int32; using AudioFileID = System.IntPtr; #if !NET @@ -59,8 +58,6 @@ public enum AudioFileType { // UInt32 AudioFileTypeID [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif RF64 = 0x52463634, // RF64 SoundDesigner2 = 0x53643266, // Sd2f @@ -82,8 +79,6 @@ public enum AudioFileType { // UInt32 AudioFileTypeID [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif FLAC = 0x666c6163, // flac #if NET @@ -92,7 +87,6 @@ public enum AudioFileType { // UInt32 AudioFileTypeID [SupportedOSPlatform ("tvos13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [iOS (13, 0)] [TV (13, 0)] #endif @@ -262,7 +256,6 @@ public string? Name { [SupportedOSPlatform ("tvos13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [iOS (13, 0)] [TV (13, 0)] #endif @@ -279,7 +272,6 @@ public struct AudioPacketRangeByteCountTranslation { [SupportedOSPlatform ("tvos13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [iOS (13, 0)] [TV (13, 0)] #endif @@ -295,7 +287,6 @@ public struct AudioPacketRollDistanceTranslation { [SupportedOSPlatform ("tvos13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [iOS (13, 0)] [TV (13, 0)] #endif @@ -311,7 +302,6 @@ public struct AudioIndependentPacketTranslation { [SupportedOSPlatform ("tvos13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [iOS (13, 0)] [TV (13, 0)] #endif diff --git a/src/AudioToolbox/AudioFileStream.cs b/src/AudioToolbox/AudioFileStream.cs index 5405c0976fc0..5c6395deb45a 100644 --- a/src/AudioToolbox/AudioFileStream.cs +++ b/src/AudioToolbox/AudioFileStream.cs @@ -40,7 +40,6 @@ using CoreFoundation; using Foundation; -using OSStatus = System.Int32; using AudioFileStreamID = System.IntPtr; using System.Runtime.Versioning; diff --git a/src/AudioToolbox/AudioFormat.cs b/src/AudioToolbox/AudioFormat.cs index 4f408e1617d4..f1111b23fe7c 100644 --- a/src/AudioToolbox/AudioFormat.cs +++ b/src/AudioToolbox/AudioFormat.cs @@ -37,7 +37,6 @@ using Foundation; using ObjCRuntime; -using OSStatus = System.Int32; using AudioFileID = System.IntPtr; namespace AudioToolbox { @@ -48,15 +47,12 @@ namespace AudioToolbox { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif [StructLayout (LayoutKind.Sequential)] public struct AudioFormat { public AudioStreamBasicDescription AudioStreamBasicDescription; public AudioChannelLayoutTag AudioChannelLayoutTag; -#if !WATCH public unsafe static AudioFormat? GetFirstPlayableFormat (AudioFormat [] formatList) { if (formatList is null) @@ -73,7 +69,6 @@ public struct AudioFormat { return formatList [index]; } } -#endif public override string ToString () { @@ -81,8 +76,6 @@ public override string ToString () } } -#if !WATCH - public enum AudioFormatError : int // Implictly cast to OSType { None = 0, @@ -421,5 +414,4 @@ enum AudioFormatProperty : uint // UInt32 AudioFormatPropertyID HardwareCodecCapabilities = 0x68776363, // 'hwcc' #endif } -#endif // !WATCH } diff --git a/src/AudioToolbox/AudioQueue.cs b/src/AudioToolbox/AudioQueue.cs index 861adfb17a66..3d2a248651d8 100644 --- a/src/AudioToolbox/AudioQueue.cs +++ b/src/AudioToolbox/AudioQueue.cs @@ -41,7 +41,6 @@ using Foundation; using ObjCRuntime; -using OSStatus = System.Int32; using AudioQueueParameterValue = System.Single; using AudioQueueRef = System.IntPtr; using AudioQueueTimelineRef = System.IntPtr; diff --git a/src/AudioToolbox/AudioToolbox.cs b/src/AudioToolbox/AudioToolbox.cs index 621e863476cb..61680bc4c4e0 100644 --- a/src/AudioToolbox/AudioToolbox.cs +++ b/src/AudioToolbox/AudioToolbox.cs @@ -13,8 +13,6 @@ using ObjCRuntime; using Foundation; -using OSStatus = System.Int32; - namespace AudioToolbox { #if NET diff --git a/src/AudioToolbox/AudioType.cs b/src/AudioToolbox/AudioType.cs index ec80abfe996a..88801bfc0702 100644 --- a/src/AudioToolbox/AudioType.cs +++ b/src/AudioToolbox/AudioType.cs @@ -96,7 +96,6 @@ public enum AudioFormatType : uint { // UInt32 in AudioStreamBasicDescription -- [SupportedOSPlatform ("tvos13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [iOS (13, 0)] [TV (13, 0)] #endif @@ -109,7 +108,7 @@ public enum AudioFormatType : uint { // UInt32 in AudioStreamBasicDescription -- [SupportedOSPlatform ("tvos18.0")] [SupportedOSPlatform ("maccatalyst18.0")] #else - [NoWatch, iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Mac (15, 0)] + [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Mac (15, 0)] #endif Apac = 0x61706163, // 'apac' } @@ -147,14 +146,12 @@ public enum AudioFormatFlags : uint // UInt32 in AudioStreamBasicDescription CafIsLittleEndian = (1 << 1) } -#if !WATCH [StructLayout (LayoutKind.Sequential)] unsafe struct AudioFormatInfo { public AudioStreamBasicDescription AudioStreamBasicDescription; public byte* MagicCookieWeak; public int MagicCookieSize; } -#endif #if NET [SupportedOSPlatform ("ios")] @@ -223,7 +220,6 @@ public static AudioStreamBasicDescription CreateLinearPCM (double sampleRate = 4 return desc; } -#if !WATCH public unsafe static AudioChannelLayoutTag []? GetAvailableEncodeChannelLayoutTags (AudioStreamBasicDescription format) { var type_size = sizeof (AudioStreamBasicDescription); @@ -374,7 +370,6 @@ public unsafe bool IsVariableBitrate { return data != 0; } } -#endif // !WATCH public override string ToString () { @@ -607,7 +602,6 @@ public float [] Coords { } } -#if !WATCH public unsafe string? Name { get { IntPtr sptr; @@ -639,7 +633,6 @@ public unsafe string? ShortName { return new CFString (sptr, true); } } -#endif internal unsafe IntPtr ToPointer () { @@ -866,7 +859,6 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("maccatalyst17.0")] #else [Mac (14, 0)] - [Watch (10, 0)] [iOS (17, 0)] [TV (17, 0)] [MacCatalyst (17, 0)] @@ -879,7 +871,6 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("maccatalyst17.0")] #else [Mac (14, 0)] - [Watch (10, 0)] [iOS (17, 0)] [TV (17, 0)] [MacCatalyst (17, 0)] @@ -892,7 +883,6 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("maccatalyst17.0")] #else [Mac (14, 0)] - [Watch (10, 0)] [iOS (17, 0)] [TV (17, 0)] [MacCatalyst (17, 0)] @@ -905,7 +895,6 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("maccatalyst17.0")] #else [Mac (14, 0)] - [Watch (10, 0)] [iOS (17, 0)] [TV (17, 0)] [MacCatalyst (17, 0)] @@ -918,7 +907,6 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("maccatalyst17.0")] #else [Mac (14, 0)] - [Watch (10, 0)] [iOS (17, 0)] [TV (17, 0)] [MacCatalyst (17, 0)] @@ -931,7 +919,6 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("maccatalyst17.0")] #else [Mac (14, 0)] - [Watch (10, 0)] [iOS (17, 0)] [TV (17, 0)] [MacCatalyst (17, 0)] @@ -944,7 +931,7 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif MPEG_5_0_E = (216U << 16) | 5, @@ -954,7 +941,7 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif MPEG_5_1_E = (217U << 16) | 6, @@ -964,7 +951,7 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif MPEG_6_1_B = (218U << 16) | 7, @@ -974,14 +961,14 @@ public enum AudioChannelLayoutTag : uint { // UInt32 AudioChannelLayoutTag [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif MPEG_7_1_D = (219U << 16) | 8, Unknown = 0xFFFF0000 // needs to be ORed with the actual number of channels } -#if !COREBUILD && !WATCH +#if !COREBUILD #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -1041,7 +1028,6 @@ internal unsafe AudioChannelLayout (IntPtr h) } } -#if !WATCH [Advice ("Use the strongly typed 'AudioTag' instead.")] public int Tag { get { @@ -1061,13 +1047,11 @@ public int Bitmap { ChannelUsage = (AudioChannelBit) value; } } -#endif public AudioChannelLayoutTag AudioTag; public AudioChannelBit ChannelUsage; public AudioChannelDescription []? Channels; -#if !WATCH public unsafe string? Name { get { IntPtr sptr; @@ -1132,7 +1116,6 @@ public unsafe string? SimpleName { Marshal.FreeHGlobal (ptr); return layout; } -#endif // !WATCH internal static AudioChannelLayout? FromHandle (IntPtr handle) { @@ -1170,7 +1153,6 @@ internal unsafe IntPtr ToBlock (out int size) return buffer; } -#if !WATCH public static AudioFormatError Validate (AudioChannelLayout layout) { if (layout is null) @@ -1307,7 +1289,6 @@ public static AudioFormatError Validate (AudioChannelLayout layout) return data; } } -#endif // !WATCH public NSData AsData () { diff --git a/src/AudioToolbox/Enums.cs b/src/AudioToolbox/Enums.cs index 944e3f55d770..e481636bbac2 100644 --- a/src/AudioToolbox/Enums.cs +++ b/src/AudioToolbox/Enums.cs @@ -5,7 +5,6 @@ #nullable enable namespace AudioToolbox { - [NoWatch] [MacCatalyst (13, 1)] [Flags] public enum AudioSettingsFlags : uint { @@ -15,7 +14,6 @@ public enum AudioSettingsFlags : uint { UserInterfaceParameter = (1u << 3), } - [NoWatch] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -25,7 +23,6 @@ public enum AUSpatialMixerOutputType : uint { ExternalSpeakers = 3, } - [NoWatch] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -34,7 +31,6 @@ public enum AUSpatialMixerPointSourceInHeadMode : uint { Bypass = 1, } - [NoWatch] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -45,7 +41,6 @@ public enum AUSpatialMixerSourceMode : uint { AmbienceBed = 3, } - [NoWatch] [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] diff --git a/src/AudioToolbox/MusicPlayer.cs b/src/AudioToolbox/MusicPlayer.cs index 456c785f2b01..95895ef3677c 100644 --- a/src/AudioToolbox/MusicPlayer.cs +++ b/src/AudioToolbox/MusicPlayer.cs @@ -10,8 +10,6 @@ #nullable enable -#if !WATCH - using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -270,5 +268,3 @@ public MusicSequence? MusicSequence { #endif } } - -#endif // IOS || TVOS diff --git a/src/AudioToolbox/MusicSequence.cs b/src/AudioToolbox/MusicSequence.cs index 9aa73b7c5e3e..515d90e20ea8 100644 --- a/src/AudioToolbox/MusicSequence.cs +++ b/src/AudioToolbox/MusicSequence.cs @@ -9,8 +9,6 @@ #nullable enable -#if !WATCH - using System; using System.Collections.Generic; using System.Runtime.CompilerServices; @@ -438,5 +436,3 @@ public enum MusicSequenceType : uint { Samples = 0x73616d70 // 'samp' } } - -#endif // IOS || TVOS diff --git a/src/AudioToolbox/MusicTrack.cs b/src/AudioToolbox/MusicTrack.cs index 0f0945613bc1..53d36bafc3cf 100644 --- a/src/AudioToolbox/MusicTrack.cs +++ b/src/AudioToolbox/MusicTrack.cs @@ -13,8 +13,6 @@ #nullable enable -#if !WATCH - using System; using System.Runtime.InteropServices; @@ -518,5 +516,3 @@ public MusicPlayerStatus Merge (double sourceStartTime, double sourceEndTime, Mu #endif // !COREBUILD } } - -#endif // IOS || TVOS diff --git a/src/AudioUnit/AUEnums.cs b/src/AudioUnit/AUEnums.cs index 73596c8bd7e4..9eb7acba5f32 100644 --- a/src/AudioUnit/AUEnums.cs +++ b/src/AudioUnit/AUEnums.cs @@ -184,7 +184,7 @@ public enum AudioUnitClumpID // UInt32 in AudioUnitParameterInfo } [MacCatalyst (13, 1)] - [NoTV, NoWatch] + [NoTV] #if NET [NoiOS] #endif @@ -214,7 +214,7 @@ public enum AudioObjectPropertySelector : uint { ProcessIsMaster = 1835103092, // 'mast' #endif // !XAMCORE_5_0 [NoiOS] - [MacCatalyst (15, 0), NoTV, NoWatch] + [MacCatalyst (15, 0), NoTV] ProcessIsMain = 1835100526, // 'main' IsInitingOrExiting = 1768845172, // 'inot' UserIDChanged = 1702193508, // 'euid' @@ -229,14 +229,14 @@ public enum AudioObjectPropertySelector : uint { ClockDevice = 1634755428, // 'apcd', IOThreadOSWorkgroup = 1869838183, // 'oswg' [NoiOS] - [MacCatalyst (15, 0), NoTV, NoWatch] + [MacCatalyst (15, 0), NoTV] ProcessMute = 1634758765, // 'appm' - [MacCatalyst (17, 0), Mac (14, 0), NoTV, NoWatch] + [MacCatalyst (17, 0), Mac (14, 0), NoTV] InputMute = 1852403056, //pmin } [MacCatalyst (13, 1)] - [NoTV, NoWatch] + [NoTV] #if NET [NoiOS] #endif @@ -248,7 +248,7 @@ public enum AudioObjectPropertyScope : uint { } [MacCatalyst (13, 1)] - [NoTV, NoWatch] + [NoTV] #if NET [NoiOS] #endif @@ -392,7 +392,7 @@ enum AudioUnitPropertyIDType { // UInt32 AudioUnitPropertyID BypassVoiceProcessing = 2100, VoiceProcessingEnableAGC = 2101, MuteOutput = 2104, - [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoWatch, NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV] MutedSpeechActivityEventListener = 2106, // AUNBandEQ unit @@ -432,11 +432,11 @@ enum AudioUnitPropertyIDType { // UInt32 AudioUnitPropertyID SpatialMixerAttenuationCurve = 3013, SpatialMixerOutputType = 3100, SpatialMixerPointSourceInHeadMode = 3103, - [Mac (12, 3), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (12, 3), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0)] SpatialMixerEnableHeadTracking = 3111, - [Mac (13, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (13, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0)] SpatialMixerPersonalizedHrtfMode = 3113, - [Mac (14, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (14, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0)] SpatialMixerAnyInputIsUsingPersonalizedHrtf = 3116, // AUScheduledSoundPlayer @@ -990,7 +990,7 @@ public enum AudioUnitSubType : uint { #endif } - [MacCatalyst (17, 0), Mac (14, 0), NoTV, NoWatch, NoiOS] + [MacCatalyst (17, 0), Mac (14, 0), NoTV, NoiOS] public enum AudioAggregateDriftCompensation : uint { MinQuality = 0, LowQuality = 0x20, diff --git a/src/AudioUnit/AudioComponent.cs b/src/AudioUnit/AudioComponent.cs index b5e89ec0e04a..f5a073cc670c 100644 --- a/src/AudioUnit/AudioComponent.cs +++ b/src/AudioUnit/AudioComponent.cs @@ -55,7 +55,7 @@ namespace AudioUnit { #if !COREBUILD -#if (!WATCH && !TVOS) || ((WATCH || TVOS) && !NET) +#if !TVOS || (TVOS && !NET) // keys are not constants and had to be found in AudioToolbox.framework/Headers/AudioComponent.h #if NET @@ -64,10 +64,9 @@ namespace AudioUnit { [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] #endif -#if ((WATCH || TVOS) && !NET) +#if TVOS && !NET [Obsolete ("This API is not available on this platform.")] #endif public partial class ResourceUsageInfo : DictionaryContainer { @@ -130,10 +129,9 @@ public bool? TemporaryExceptionReadWrite { [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] #endif -#if ((WATCH || TVOS) && !NET) +#if TVOS && !NET [Obsolete ("This API is not available on this platform.")] #endif public partial class AudioComponentInfo : DictionaryContainer { @@ -235,7 +233,7 @@ public string []? Tags { } } } -#endif // (!WATCH && !TVOS) || ((WATCH || TVOS) && !NET) +#endif // !TVOS || (TVOS && !NET) #endif // !COREBUILD @@ -368,7 +366,6 @@ public Version? Version { [SupportedOSPlatform ("ios14.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -382,7 +379,6 @@ public Version? Version { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -499,7 +495,6 @@ public double LastActiveTime { [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -513,7 +508,6 @@ public double LastActiveTime { [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -535,7 +529,6 @@ public double LastActiveTime { [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -548,7 +541,6 @@ public double LastActiveTime { [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -564,7 +556,6 @@ unsafe static extern int AudioComponentValidate (IntPtr /* AudioComponent* */ in [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -586,7 +577,6 @@ public AudioComponentValidationResult Validate (NSDictionary? validationParamete [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -616,7 +606,6 @@ static void TrampolineAction (IntPtr blockPtr, AudioComponentValidationResult re [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -630,7 +619,6 @@ static void TrampolineAction (IntPtr blockPtr, AudioComponentValidationResult re [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -659,7 +647,6 @@ public void ValidateAsync (NSDictionary? validationParameters, [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -673,7 +660,6 @@ public void ValidateAsync (NSDictionary? validationParameters, [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [Mac (13,0)] [iOS (16,0)] @@ -686,7 +672,6 @@ public void ValidateAsync (NSDictionary? validationParameters, [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] #endif [DllImport (Constants.AudioUnitLibrary)] @@ -698,7 +683,6 @@ public void ValidateAsync (NSDictionary? validationParameters, [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] #endif [DllImport (Constants.AudioUnitLibrary)] @@ -710,7 +694,6 @@ public void ValidateAsync (NSDictionary? validationParameters, [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] #endif public AudioComponentInfo[]? ComponentList { diff --git a/src/AudioUnit/AudioComponentDescription.cs b/src/AudioUnit/AudioComponentDescription.cs index eca86afab0ad..48b801c68c16 100644 --- a/src/AudioUnit/AudioComponentDescription.cs +++ b/src/AudioUnit/AudioComponentDescription.cs @@ -150,7 +150,6 @@ public enum AudioTypeConverter { // OSType in AudioComponentDescription #else [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'AudioTypeConverter.NewTimePitch' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'AudioTypeConverter.NewTimePitch' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AudioTypeConverter.NewTimePitch' instead.")] #endif AUiPodTime = 0x6970746d, // 'iptm' #endif @@ -208,7 +207,6 @@ public enum AudioTypeEffect { // OSType in AudioComponentDescription [Unavailable (PlatformName.MacCatalyst)] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'AudioTypeEffect.GraphicEQ' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'AudioTypeEffect.GraphicEQ' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AudioTypeEffect.GraphicEQ' instead.")] #endif AUiPodEQ = 0x69706571, // 'ipeq' #endif diff --git a/src/AuthenticationServices/PublicPrivateKeyAuthentication.cs b/src/AuthenticationServices/PublicPrivateKeyAuthentication.cs index 1e30c0e317da..54acbe25c87c 100644 --- a/src/AuthenticationServices/PublicPrivateKeyAuthentication.cs +++ b/src/AuthenticationServices/PublicPrivateKeyAuthentication.cs @@ -7,7 +7,7 @@ // Copyright 2021 Microsoft Corporation // -#if !TVOS && !WATCH +#if !TVOS using System; using System.Runtime.InteropServices; @@ -26,7 +26,6 @@ namespace AuthenticationServices { [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/BackgroundTasks/Enums.cs b/src/BackgroundTasks/Enums.cs index 009d3e8ee801..f021edd837d5 100644 --- a/src/BackgroundTasks/Enums.cs +++ b/src/BackgroundTasks/Enums.cs @@ -14,7 +14,7 @@ namespace BackgroundTasks { - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] [ErrorDomain ("BGTaskSchedulerErrorDomain")] diff --git a/src/CFNetwork/CFHTTPStream.cs b/src/CFNetwork/CFHTTPStream.cs index d54662e5b347..572503a473a8 100644 --- a/src/CFNetwork/CFHTTPStream.cs +++ b/src/CFNetwork/CFHTTPStream.cs @@ -142,7 +142,6 @@ internal CFDictionary Proxy { } } -#if !WATCHOS public void SetProxy (CFProxySettings proxySettings) { if (proxySettings is null) @@ -150,6 +149,5 @@ public void SetProxy (CFProxySettings proxySettings) SetProperty (_Proxy, proxySettings.Dictionary); } -#endif // !WATCHOS } } diff --git a/src/CFNetwork/CFHost.cs b/src/CFNetwork/CFHost.cs index 70eb8b04dbef..50ee2ba1e05d 100644 --- a/src/CFNetwork/CFHost.cs +++ b/src/CFNetwork/CFHost.cs @@ -37,7 +37,6 @@ namespace CoreServices { [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] diff --git a/src/CarPlay/CPEnums.cs b/src/CarPlay/CPEnums.cs index a423ce7bc526..c7cce9a69667 100644 --- a/src/CarPlay/CPEnums.cs +++ b/src/CarPlay/CPEnums.cs @@ -16,7 +16,7 @@ namespace CarPlay { - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] public enum CPMessageListItemType { Identifier, FullName, diff --git a/src/Chip/ChipCompat.cs b/src/Chip/ChipCompat.cs deleted file mode 100644 index e343ee34b54e..000000000000 --- a/src/Chip/ChipCompat.cs +++ /dev/null @@ -1,494 +0,0 @@ -// -// ChipCompat.cs -// -// Authors: -// Rachel Kang -// -// Copyright (C) Microsoft Corporation. All rights reserved. -// - -using System; -using System.ComponentModel; -using System.Threading.Tasks; -using Foundation; -using CoreFoundation; -using ObjCRuntime; - -#nullable enable - -#if !NET -namespace Chip { - -#if !MONOMAC - public partial class ChipReadAttributeResult { } -#endif // !MONOMAC - - [Obsolete ("This class is removed.")] - [Register ("CHIPError", SkipRegistration = true)] - public class ChipError : NSObject { - - public override IntPtr ClassHandle => throw new InvalidOperationException (Constants.RemovedFromChip); - - protected ChipError (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromChip); - protected ChipError (IntPtr handle) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public static int ConvertToChipErrorCode (NSError errorCode) => throw new InvalidOperationException (Constants.RemovedFromChip); - public static NSError? Create (int errorCode) => throw new InvalidOperationException (Constants.RemovedFromChip); - - } /* class ChipError */ - -#if !MONOMAC - [Obsolete ("This class is removed, use 'ChipContentLauncher' instead.")] - [Register ("CHIPContentLaunch", SkipRegistration = true)] - public class ChipContentLaunch : NSObject { - - public override IntPtr ClassHandle => throw new InvalidOperationException (Constants.RemovedFromChip); - - protected ChipContentLaunch (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromChip); - protected ChipContentLaunch (IntPtr handle) => throw new InvalidOperationException (Constants.RemovedFromChip); - public ChipContentLaunch (ChipDevice device, byte endpoint, DispatchQueue queue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void LaunchContent (byte autoPlay, string data, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task LaunchContentAsync (byte autoPlay, string data) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual void LaunchUrl (string contentUrl, string displayString, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task LaunchUrlAsync (string contentUrl, string displayString) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual void ReadAttributeAcceptsHeaderList (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task ReadAttributeAcceptsHeaderListAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual void ReadAttributeSupportedStreamingTypes (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task ReadAttributeSupportedStreamingTypesAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual void ReadAttributeClusterRevision (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task ReadAttributeClusterRevisionAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - } /* class ChipContentLaunch */ -#endif // !MONOMAC - -#if !MONOMAC - [Obsolete ("This class is removed.")] - [Register ("CHIPTrustedRootCertificates", SkipRegistration = true)] - public class ChipTrustedRootCertificates : NSObject { - public override IntPtr ClassHandle => throw new InvalidOperationException (Constants.RemovedFromChip); - - protected ChipTrustedRootCertificates (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromChip); - protected ChipTrustedRootCertificates (IntPtr handle) => throw new InvalidOperationException (Constants.RemovedFromChip); - public ChipTrustedRootCertificates (ChipDevice device, byte endpoint, DispatchQueue queue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void AddTrustedRootCertificate (NSData rootCertificate, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task AddTrustedRootCertificateAsync (NSData rootCertificate) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual void RemoveTrustedRootCertificate (NSData trustedRootIdentifier, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task RemoveTrustedRootCertificateAsync (NSData trustedRootIdentifier) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual void ReadAttributeClusterRevision (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task ReadAttributeClusterRevisionAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - } -#endif // !MONOMAC - - public partial class ChipWindowCovering { - -#if !MONOMAC - static bool CheckSystemVersion () - { -#if NET || IOS || __MACCATALYST__ || TVOS - return SystemVersion.CheckiOS (15, 2); -#elif WATCH - return SystemVersion.CheckwatchOS (8, 3); -#else -#error Unknown platform -#endif - } -#endif - -#if !MONOMAC - public virtual void GoToLiftValue (ushort liftValue, ChipResponseHandler responseHandler) - { - if (CheckSystemVersion ()) - _OldGoToLiftValue (liftValue, responseHandler); - else - _NewGoToLiftValue (liftValue, responseHandler); - } -#endif - -#if !MONOMAC - public virtual Task GoToLiftValueAsync (ushort liftValue) - { - if (CheckSystemVersion ()) - return _OldGoToLiftValueAsync (liftValue); - else - return _NewGoToLiftValueAsync (liftValue); - } -#endif - -#if !MONOMAC - public virtual void GoToTiltValue (ushort tiltValue, ChipResponseHandler responseHandler) - { - if (CheckSystemVersion ()) - _OldGoToTiltValue (tiltValue, responseHandler); - else - _NewGoToTiltValue (tiltValue, responseHandler); - } -#endif - -#if !MONOMAC - public virtual Task GoToTiltValueAsync (ushort tiltValue) - { - if (CheckSystemVersion ()) - return _OldGoToTiltValueAsync (tiltValue); - else - return _NewGoToTiltValueAsync (tiltValue); - } -#endif - - } - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - public delegate void ChipDeviceConnectionCallback (ChipDevice device, NSError error); - - [Obsolete ("This class is removed.")] - [Register ("CHIPDeviceController", true)] - public partial class ChipDeviceController : NSObject { - public override IntPtr ClassHandle { get { throw new InvalidOperationException (Constants.RemovedFromChip); } } - - protected ChipDeviceController (NSObjectFlag t) : base (t) => throw new InvalidOperationException (Constants.RemovedFromChip); - - protected internal ChipDeviceController (IntPtr handle) : base (handle) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool GetConnectedDevice (ulong deviceID, global::CoreFoundation.DispatchQueue queue, ChipDeviceConnectionCallback completionHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task GetConnectedDeviceAsync (ulong deviceID, global::CoreFoundation.DispatchQueue queue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task GetConnectedDeviceAsync (ulong deviceID, global::CoreFoundation.DispatchQueue queue, out bool result) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual ChipDevice? GetPairedDevice (ulong deviceId, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool IsDevicePaired (ulong deviceID, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); - -#if !NET && !__MACOS__ - [Obsolete ("This method is removed.", false)] - public virtual bool PairDevice (ulong deviceId, ushort discriminator, uint setupPinCode, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); -#endif - -#if !__MACOS__ - public virtual bool PairDevice (ulong deviceID, ushort discriminator, uint setupPINCode, NSData? csrNonce, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); -#endif - - public virtual bool PairDevice (ulong deviceId, string address, ushort port, ushort discriminator, uint setupPinCode, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool PairDevice (ulong deviceId, string onboardingPayload, ChipOnboardingPayloadType onboardingPayloadType, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool PairDeviceWithoutSecurity (ulong deviceId, string address, ushort port, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void SetListenPort (ushort port) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void SetPairingDelegate (IChipDevicePairingDelegate @delegate, global::CoreFoundation.DispatchQueue queue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool Shutdown () => throw new InvalidOperationException (Constants.RemovedFromChip); - - [Obsolete ("This method is removed.", false)] - public virtual bool Startup (IChipPersistentStorageDelegate? storageDelegate) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool Startup (IChipPersistentStorageDelegate? storageDelegate, ushort vendorId, IChipKeypair? nocSigner) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool StopDevicePairing (ulong deviceId, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual bool UnpairDevice (ulong deviceId, out NSError? error) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void UpdateDevice (ulong deviceId, ulong fabricId) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual NSNumber ControllerNodeId => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual bool IsRunning => throw new InvalidOperationException (Constants.RemovedFromChip); - public static ChipDeviceController SharedController => throw new InvalidOperationException (Constants.RemovedFromChip); - } - - [Obsolete ("This class is removed.")] - [Register ("CHIPLowPower", true)] - public partial class ChipLowPower : ChipCluster { - public override IntPtr ClassHandle { get { throw new InvalidOperationException (Constants.RemovedFromChip); } } - - protected ChipLowPower (NSObjectFlag t) : base (t) => throw new InvalidOperationException (Constants.RemovedFromChip); - - protected internal ChipLowPower (IntPtr handle) : base (handle) => throw new InvalidOperationException (Constants.RemovedFromChip); - - [DesignatedInitializer] - public ChipLowPower (ChipDevice device, ushort endpoint, global::CoreFoundation.DispatchQueue queue) - : base (NSObjectFlag.Empty) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public ChipLowPower (ChipDevice device, byte endpoint, global::CoreFoundation.DispatchQueue queue) - : this (device, (ushort) endpoint, queue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeClusterRevision (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeClusterRevisionAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void Sleep (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - public virtual Task SleepAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - } - - [Obsolete ("This class is removed.")] - [Register ("CHIPTestCluster", true)] - public partial class ChipTestCluster : ChipCluster { - public override IntPtr ClassHandle { get { throw new InvalidOperationException (Constants.RemovedFromChip); } } - - protected ChipTestCluster (NSObjectFlag t) : base (t) => throw new InvalidOperationException (Constants.RemovedFromChip); - - protected internal ChipTestCluster (IntPtr handle) : base (handle) => throw new InvalidOperationException (Constants.RemovedFromChip); - - [DesignatedInitializer] - public ChipTestCluster (ChipDevice device, ushort endpoint, global::CoreFoundation.DispatchQueue queue) - : base (NSObjectFlag.Empty) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public ChipTestCluster (ChipDevice device, byte endpoint, global::CoreFoundation.DispatchQueue queue) - : this (device, (ushort) endpoint, queue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeBitmap16 (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeBitmap16Async () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeBitmap32 (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeBitmap32Async () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeBitmap64 (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeBitmap64Async () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeBitmap8 (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeBitmap8Async () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeBoolean (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeBooleanAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeCharString (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeCharStringAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeClusterRevision (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeClusterRevisionAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeEnum16 (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeEnum16Async () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeEnum8 (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeEnum8Async () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt16s (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt16sAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt16u (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt16uAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt32s (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt32sAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt32u (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt32uAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt64s (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt64sAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt64u (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt64uAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt8s (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt8sAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeInt8u (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeInt8uAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeListInt8u (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeListInt8uAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeListOctetString (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeListOctetStringAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeListStructOctetString (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeListStructOctetStringAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeLongCharString (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeLongCharStringAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeLongOctetString (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeLongOctetStringAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeOctetString (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeOctetStringAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeUnsupported (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeUnsupportedAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void Test (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task TestAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void TestAddArguments (byte arg1, byte arg2, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task TestAddArgumentsAsync (byte arg1, byte arg2) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void TestNotHandled (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task TestNotHandledAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void TestSpecific (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task TestSpecificAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void TestUnknownCommand (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task TestUnknownCommandAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeBitmap16 (ushort value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeBitmap16Async (ushort value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeBitmap32 (uint value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeBitmap32Async (uint value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeBitmap64 (ulong value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeBitmap64Async (ulong value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeBitmap8 (byte value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeBitmap8Async (byte value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeBoolean (byte value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeBooleanAsync (byte value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeBoolean (bool boolValue, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeBooleanAsync (bool boolValue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeCharString (string value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeCharStringAsync (string value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeEnum16 (ushort value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeEnum16Async (ushort value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeEnum8 (byte value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeEnum8Async (byte value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt16s (short value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt16sAsync (short value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt16u (ushort value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt16uAsync (ushort value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt32s (int value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt32sAsync (int value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt32u (uint value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt32uAsync (uint value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt64s (long value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt64sAsync (long value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt64u (ulong value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt64uAsync (ulong value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt8s (sbyte value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt8sAsync (sbyte value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeInt8u (byte value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeInt8uAsync (byte value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeLongCharString (string value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeLongCharStringAsync (string value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeLongOctetString (NSData value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeLongOctetStringAsync (NSData value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeOctetString (NSData value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeOctetStringAsync (NSData value) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeUnsupported (bool boolValue, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeUnsupportedAsync (bool boolValue) => throw new InvalidOperationException (Constants.RemovedFromChip); - } - - [Obsolete ("This class is removed.")] - [Register ("CHIPGeneralCommissioning", true)] - public partial class ChipGeneralCommissioning : ChipCluster { - public override IntPtr ClassHandle { get { throw new InvalidOperationException (Constants.RemovedFromChip); } } - - protected ChipGeneralCommissioning (NSObjectFlag t) : base (t) => throw new InvalidOperationException (Constants.RemovedFromChip); - - protected internal ChipGeneralCommissioning (IntPtr handle) : base (handle) => throw new InvalidOperationException (Constants.RemovedFromChip); - - [DesignatedInitializer] - public ChipGeneralCommissioning (ChipDevice device, ushort endpoint, global::CoreFoundation.DispatchQueue queue) - : base (NSObjectFlag.Empty) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public ChipGeneralCommissioning (ChipDevice device, byte endpoint, global::CoreFoundation.DispatchQueue queue) - : this (device, (ushort) endpoint, queue) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ArmFailSafe (ushort expiryLengthSeconds, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ArmFailSafeAsync (ushort expiryLengthSeconds, ulong breadcrumb, uint timeoutMs) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void CommissioningComplete (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task CommissioningCompleteAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeBasicCommissioningInfoList (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeBasicCommissioningInfoListAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeBreadcrumb (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeBreadcrumbAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void ReadAttributeClusterRevision (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task ReadAttributeClusterRevisionAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - [Obsolete ("This method is removed.", false)] - public virtual void ReadAttributeFabricId (ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - [Obsolete ("This method is removed.", false)] - public virtual Task ReadAttributeFabricIdAsync () => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void SetRegulatoryConfig (byte location, string countryCode, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task SetRegulatoryConfigAsync (byte location, string countryCode, ulong breadcrumb, uint timeoutMs) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual void WriteAttributeBreadcrumb (ulong value, ChipResponseHandler responseHandler) => throw new InvalidOperationException (Constants.RemovedFromChip); - - public virtual Task WriteAttributeBreadcrumbAsync (ulong value) - => throw new InvalidOperationException (Constants.RemovedFromChip); - } -} -#endif // !NET diff --git a/src/Cinematic/CNDecision.cs b/src/Cinematic/CNDecision.cs index dc7a1d64f4a4..c6ed917b28a4 100644 --- a/src/Cinematic/CNDecision.cs +++ b/src/Cinematic/CNDecision.cs @@ -5,7 +5,7 @@ #nullable enable -#if !WATCH && !__MACCATALYST__ +#if !__MACCATALYST__ namespace Cinematic { @@ -15,7 +15,7 @@ namespace Cinematic { [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [NoWatch, TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public enum CNDecisionIdentifierType { Single, diff --git a/src/ClockKit/CLKComplication.cs b/src/ClockKit/CLKComplication.cs index 2534d3024ad6..40aabc6e9388 100644 --- a/src/ClockKit/CLKComplication.cs +++ b/src/ClockKit/CLKComplication.cs @@ -8,11 +8,9 @@ namespace ClockKit { public partial class CLKComplication { - [Watch (7, 0)] [DllImport (Constants.ClockKitLibrary)] static extern IntPtr CLKAllComplicationFamilies (); - [Watch (7, 0)] public static CLKComplicationFamily [] GetAllComplicationFamilies () { using (var nsArray = new NSArray (CLKAllComplicationFamilies ())) { diff --git a/src/ClockKit/CLKEnums.cs b/src/ClockKit/CLKEnums.cs index 02b5466f0920..368a1c383d59 100644 --- a/src/ClockKit/CLKEnums.cs +++ b/src/ClockKit/CLKEnums.cs @@ -14,7 +14,6 @@ namespace ClockKit { - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Native] public enum CLKComplicationFamily : long { ModularSmall, @@ -25,15 +24,10 @@ public enum CLKComplicationFamily : long { // nothing has the value of 5 UtilitarianSmallFlat = 6, ExtraLarge = 7, - [Watch (5, 0)] GraphicCorner, - [Watch (5, 0)] GraphicBezel, - [Watch (5, 0)] GraphicCircular, - [Watch (5, 0)] GraphicRectangular, - [Watch (7, 0)] GraphicExtraLarge = 12, } @@ -75,15 +69,11 @@ public enum CLKRelativeDateStyle : long { Natural, Offset, Timer, - [Watch (5, 0)] NaturalAbbreviated, - [Watch (6, 0)] OffsetShort, - [Watch (6, 0)] NaturalFull, } - [Watch (5, 0)] [Native] public enum CLKGaugeProviderStyle : long { Ring, diff --git a/src/CloudKit/CKCompat.cs b/src/CloudKit/CKCompat.cs index efb6bdcef65a..b5cee828f48f 100644 --- a/src/CloudKit/CKCompat.cs +++ b/src/CloudKit/CKCompat.cs @@ -28,7 +28,7 @@ public partial class CKQueryNotification { } #endif -#if !NET && !WATCH +#if !NET public partial class CKOperation { [Obsoleted (PlatformName.iOS, 9, 3, message: "Do not use; this API was removed and will always return 0.")] @@ -88,7 +88,6 @@ public partial class CKDiscoverAllContactsOperation { public delegate void CKDiscoverUserInfosCompletionHandler (NSDictionary emailsToUserInfos, NSDictionary userRecordIdsToUserInfos, NSError operationError); -#if !WATCH [Obsoleted (PlatformName.iOS, 14, 0, message: "Use 'CKDiscoverUserIdentitiesOperation' instead.")] public partial class CKDiscoverUserInfosOperation : CKOperation { @@ -120,7 +119,6 @@ public CKDiscoverUserInfosOperation (string [] emailAddresses, CKRecordID [] use public override NativeHandle ClassHandle { get; } #pragma warning restore CS0809 } -#endif public partial class CKSubscription { [Obsolete ("Always throws 'NotSupportedException' (not a public API). Use 'CKRecordZoneSubscription' instead.")] @@ -130,10 +128,8 @@ public CKSubscription (CKRecordZoneID zoneId, CKSubscriptionOptions subscription [Obsolete ("Always throws 'NotSupportedException' (not a public API). Use 'CKRecordZoneSubscription' instead.")] public CKSubscription (CKRecordZoneID zoneId, string subscriptionId, CKSubscriptionOptions subscriptionOptions) => throw new NotSupportedException (); -#if !WATCH [Obsolete ("Empty stub (not a public API). Use 'CKRecordZoneSubscription' intead.")] public virtual CKSubscriptionOptions SubscriptionOptions { get; } -#endif } #if MONOMAC || IOS @@ -160,24 +156,6 @@ public virtual string? LastName { #endif #endif - -#if WATCH - public partial class CKModifyRecordZonesOperation { - - // `init` does not work on watchOS but we can keep compatibility with a different init - public CKModifyRecordZonesOperation () : this (null, null) - { - } - } - - public partial class CKModifyRecordsOperation { - - // `init` does not work on watchOS but we can keep compatibility with a different init - public CKModifyRecordsOperation () : this (null, null) - { - } - } -#endif } #endif diff --git a/src/CloudKit/CKModifyBadgeOperation.cs b/src/CloudKit/CKModifyBadgeOperation.cs index c20549aa732c..10cdf1f7db46 100644 --- a/src/CloudKit/CKModifyBadgeOperation.cs +++ b/src/CloudKit/CKModifyBadgeOperation.cs @@ -24,7 +24,6 @@ namespace CloudKit { #else [Deprecated (PlatformName.MacOSX, 15, 0, message: "Modifying badge counts is no longer supported.")] [Deprecated (PlatformName.iOS, 18, 0, message: "Modifying badge counts is no longer supported.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Modifying badge counts is no longer supported.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Modifying badge counts is no longer supported.")] #endif [EditorBrowsable (EditorBrowsableState.Never)] diff --git a/src/CloudKit/Enums.cs b/src/CloudKit/Enums.cs index 9f76a6397dfa..9e91fc442302 100644 --- a/src/CloudKit/Enums.cs +++ b/src/CloudKit/Enums.cs @@ -143,7 +143,6 @@ public enum CKReferenceAction : ulong { // NSInteger -> CKSubscription.h /// Enumerates subscription types. - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] public enum CKSubscriptionType : long { @@ -156,7 +155,6 @@ public enum CKSubscriptionType : long { // NSInteger -> CKSubscription.h #if !NET - [NoWatch] [Obsoleted (PlatformName.iOS, 14, 0, message: "Use 'CKQuerySubscriptionOptions' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKQuerySubscriptionOptions' instead.")] [Obsoleted (PlatformName.MacOSX, 10, 16, message: "Use 'CKQuerySubscriptionOptions' instead.")] @@ -203,7 +201,6 @@ public enum CKShareParticipantPermission : long { /// Enumerates share participant types. [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'CKShareParticipantRole' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'CKShareParticipantRole' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'CKShareParticipantRole' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'CKShareParticipantRole' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKShareParticipantRole' instead.")] @@ -216,7 +213,6 @@ public enum CKShareParticipantType : long { } /// Enumerates the time or times when a fires a notification. - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] public enum CKQuerySubscriptionOptions : ulong { @@ -239,7 +235,6 @@ public enum CKOperationGroupTransferSize : long { HundredsOfGigabytes, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum CKShareParticipantRole : long { @@ -249,7 +244,7 @@ public enum CKShareParticipantRole : long { PublicUser = 4, } - [NoTV, NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native, Flags] public enum CKSharingParticipantAccessOption : ulong { AnyoneWithLink = 1uL << 0, @@ -257,7 +252,7 @@ public enum CKSharingParticipantAccessOption : ulong { Any = AnyoneWithLink | SpecifiedRecipientsOnly, } - [NoTV, NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native, Flags] public enum CKSharingParticipantPermissionOption : ulong { ReadOnly = 1uL << 0, @@ -266,7 +261,7 @@ public enum CKSharingParticipantPermissionOption : ulong { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum CKSyncEngineAccountChangeType : long { SignIn, @@ -274,14 +269,14 @@ public enum CKSyncEngineAccountChangeType : long { SwitchAccounts, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum CKSyncEngineSyncReason : long { Scheduled, Manual, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum CKSyncEngineEventType : long { StateUpdate, @@ -298,14 +293,14 @@ public enum CKSyncEngineEventType : long { DidSendChanges, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum CKSyncEnginePendingRecordZoneChangeType : long { SaveRecord, DeleteRecord, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum CKSyncEngineZoneDeletionReason : long { Deleted, @@ -313,7 +308,7 @@ public enum CKSyncEngineZoneDeletionReason : long { EncryptedDataReset, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum CKSyncEnginePendingDatabaseChangeType : long { SaveZone, diff --git a/src/Compression/Enums.cs b/src/Compression/Enums.cs index 52ef7cd1d4fb..ae34f70b9e0e 100644 --- a/src/Compression/Enums.cs +++ b/src/Compression/Enums.cs @@ -29,7 +29,7 @@ public enum CompressionAlgorithm { #if NET [iOS (15, 0), Mac (12, 0), TV (15, 0), MacCatalyst (15, 0)] #else - [iOS (15, 0), Mac (12, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), Mac (12, 0), TV (15, 0)] #endif LZBitmap = 0x702, } diff --git a/src/Constants.iOS.cs.in b/src/Constants.iOS.cs.in index ad220f0ba13a..67799cd59213 100644 --- a/src/Constants.iOS.cs.in +++ b/src/Constants.iOS.cs.in @@ -11,12 +11,6 @@ namespace ObjCRuntime { public const string AccelerateImageLibrary = "/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage"; public const string QuartzLibrary = "/System/Library/Frameworks/QuartzCore.framework/QuartzCore"; - // iOS 8.2 -#if !NET - // Apple removed the WatchKit framework from iOS - public const string WatchKitLibrary = "/System/Library/Frameworks/WatchKit.framework/WatchKit"; -#endif - // iOS 9 public const string libcompressionLibrary = "/usr/lib/libcompression.dylib"; diff --git a/src/Contacts/CNEnums.cs b/src/Contacts/CNEnums.cs index 97f0e5c19124..9d2adc7abcb1 100644 --- a/src/Contacts/CNEnums.cs +++ b/src/Contacts/CNEnums.cs @@ -71,7 +71,7 @@ public enum CNAuthorizationStatus : long { Restricted, Denied, Authorized, - [iOS (18, 0), NoMacCatalyst, Watch (11, 0), NoMac] + [iOS (18, 0), NoMacCatalyst, NoMac] Limited, } diff --git a/src/CoreAnimation/CAEnums.cs b/src/CoreAnimation/CAEnums.cs index a19e9c67001b..d306243d697b 100644 --- a/src/CoreAnimation/CAEnums.cs +++ b/src/CoreAnimation/CAEnums.cs @@ -51,7 +51,6 @@ public enum CAEdgeAntialiasingMask : uint { TopBottomEdges = TopEdge | BottomEdge } - [NoWatch] // headers not updated [MacCatalyst (13, 1)] [Native] [Flags] @@ -67,7 +66,6 @@ public enum CACornerMask : ulong { [Flags] [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum CAAutoresizingMask : uint { NotSizable = 0, @@ -82,7 +80,6 @@ public enum CAAutoresizingMask : uint { // typedef int -> CAConstraintLayoutManager.h [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum CAConstraintAttribute { MinX, diff --git a/src/CoreAnimation/CAFrameRateRange.cs b/src/CoreAnimation/CAFrameRateRange.cs index 564d09b1cca2..8ae6a045b9ed 100644 --- a/src/CoreAnimation/CAFrameRateRange.cs +++ b/src/CoreAnimation/CAFrameRateRange.cs @@ -14,7 +14,6 @@ namespace CoreAnimation { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/CoreBluetooth/CBManager.cs b/src/CoreBluetooth/CBManager.cs index 1b1fd55d7c83..dbf5e28d85b1 100644 --- a/src/CoreBluetooth/CBManager.cs +++ b/src/CoreBluetooth/CBManager.cs @@ -1,4 +1,4 @@ -#if IOS || WATCH +#if IOS using System; using ObjCRuntime; @@ -14,15 +14,12 @@ public partial class CBManager { [SupportedOSPlatform ("tvos")] #else [iOS (13,0)] - [Watch (6,0)] #endif public static CBManagerAuthorization Authorization { get { // in iOS 13.1 / Watch 6.1 this is a static property, like other [tv|mac]OS #if IOS if (SystemVersion.CheckiOS (13, 1)) { -#elif WATCH - if (SystemVersion.CheckwatchOS (6, 1)) { #endif return _SAuthorization; } else { diff --git a/src/CoreBluetooth/CoreBluetooth.cs b/src/CoreBluetooth/CoreBluetooth.cs index 738dec0c38a9..7640b0539a5e 100644 --- a/src/CoreBluetooth/CoreBluetooth.cs +++ b/src/CoreBluetooth/CoreBluetooth.cs @@ -21,7 +21,7 @@ public CBCentralManager (DispatchQueue dispatchQueue) : this (new _CBCentralMana } } -#if !WATCH && !NET +#if !NET public partial class CBCentralManager { public new virtual CBCentralManagerState State { diff --git a/src/CoreBluetooth/Enums.cs b/src/CoreBluetooth/Enums.cs index 3e2b6bd26614..562023623139 100644 --- a/src/CoreBluetooth/Enums.cs +++ b/src/CoreBluetooth/Enums.cs @@ -29,7 +29,6 @@ public enum CBManagerState : long { // NSInteger -> CBCentralManager.h /// Enumerates possible states of a . [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CBManagerState' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CBManagerState' instead.")] [Native] @@ -45,7 +44,6 @@ public enum CBCentralManagerState : long { // NSInteger -> CBPeripheralManager.h /// Enumerates the possible states of the . [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CBManagerState' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CBManagerState' instead.")] [Native] @@ -184,7 +182,7 @@ public enum CBPeripheralManagerConnectionLatency : long { High } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Native] public enum CBConnectionEvent : long { @@ -192,14 +190,14 @@ public enum CBConnectionEvent : long { Connected = 1, } - [Flags, iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [Flags, iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Native] public enum CBCentralManagerFeature : ulong { ExtendedScanAndConnect = 1uL << 0, } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Native] public enum CBManagerAuthorization : long { diff --git a/src/CoreBluetooth/GuidWrapper.cs b/src/CoreBluetooth/GuidWrapper.cs index f0e7ce7dc441..be40482e58d0 100644 --- a/src/CoreBluetooth/GuidWrapper.cs +++ b/src/CoreBluetooth/GuidWrapper.cs @@ -30,7 +30,7 @@ public void ConnectPeripheral (CBPeripheral peripheral, PeripheralConnectionOpti { ConnectPeripheral (peripheral, options?.Dictionary); } -#if !NET && !TVOS && !WATCH +#if !NET && !TVOS [Obsolete ("Always throws 'NotSupportedException' (not a public API).")] public void RetrievePeripherals (CBUUID [] peripheralUuids) => throw new NotSupportedException (); diff --git a/src/CoreData/Enums.cs b/src/CoreData/Enums.cs index ab8f48efc652..18469c4a6e4d 100644 --- a/src/CoreData/Enums.cs +++ b/src/CoreData/Enums.cs @@ -37,7 +37,7 @@ public enum NSEntityMappingType : ulong { Add = 0x02, Remove = 0x03, Copy = 0x04, - Transform = 0x05 + Transform = 0x05, } // NUInteger -> NSAttributeDescription.h @@ -61,7 +61,7 @@ public enum NSAttributeType : ulong { Uri = 1200, Transformable = 1800, ObjectID = 2000, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] CompositeAttributeType = 2100, } @@ -73,7 +73,7 @@ public enum NSFetchRequestResultType : ulong { ManagedObject = 0x00, ManagedObjectID = 0x01, DictionaryResultType = 0x02, - NSCountResultType = 0x04 + NSCountResultType = 0x04, } // NUInteger -> NSRelationshipDescription.h @@ -83,7 +83,7 @@ public enum NSDeleteRule : ulong { NoAction, Nullify, Cascade, - Deny + Deny, } // NUInteger -> NSPersistentStoreRequest.h @@ -94,25 +94,30 @@ public enum NSPersistentStoreRequestType : ulong { Save, [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] BatchInsert = 5, BatchUpdate = 6, - BatchDelete = 7 + BatchDelete = 7, } // NUInteger -> NSManagedObjectContext.h /// Enumerates types of concurrenty patterns that can be used by a . [Native] public enum NSManagedObjectContextConcurrencyType : ulong { - Confinement, PrivateQueue, MainQueue + Confinement, + PrivateQueue, + MainQueue, } // NUInteger -> NSManagedObjectContext.h /// Enumerates policies for merging. [Native] public enum NSMergePolicyType : ulong { - Error, PropertyStoreTrump, PropertyObjectTrump, Overwrite, RollbackMerge + Error, + PropertyStoreTrump, + PropertyObjectTrump, + Overwrite, + RollbackMerge, } // NUInteger -> NSFetchedResultsController.h @@ -122,7 +127,7 @@ public enum NSFetchedResultsChangeType : ulong { Insert = 1, Delete = 2, Move = 3, - Update = 4 + Update = 4, } /// Enumerates the kind of results that can be returned from a batched update request. @@ -130,7 +135,7 @@ public enum NSFetchedResultsChangeType : ulong { public enum NSBatchUpdateRequestResultType : ulong { StatusOnly = 0, UpdatedObjectIDs = 1, - UpdatedObjectsCount = 2 + UpdatedObjectsCount = 2, } /// Enumerates the form of the result of a . @@ -139,7 +144,7 @@ public enum NSBatchUpdateRequestResultType : ulong { public enum NSBatchDeleteRequestResultType : ulong { StatusOnly = 0, ObjectIDs = 1, - Count = 2 + Count = 2, } /// Enumerates errors that can be encountered during validation. @@ -170,7 +175,7 @@ public enum ObjectGraphManagementErrorType : ulong { PersistentStoreCoordinatorLocking = 132010, ManagedObjectReferentialIntegrity = 133000, ManagedObjectExternalRelationship = 133010, - ManagedObjectMerge = 133020 + ManagedObjectMerge = 133020, } /// Enumerates error codes that can be encountered while working with persistent stores. @@ -185,7 +190,7 @@ public enum PersistentStoreErrorType : ulong { Operation = 134070, Open = 134080, Timeout = 134090, - IncompatibleVersionHash = 134100 + IncompatibleVersionHash = 134100, } /// Enumerates error codes that can be encountered while migrating stores. @@ -209,7 +214,7 @@ public enum MigrationErrorType { [Native] public enum NSFetchIndexElementType : ulong { Binary, - RTree + RTree, } [MacCatalyst (13, 1)] @@ -217,7 +222,7 @@ public enum NSFetchIndexElementType : ulong { public enum NSPersistentHistoryChangeType : long { Insert, Update, - Delete + Delete, } [MacCatalyst (13, 1)] @@ -231,7 +236,7 @@ public enum NSPersistentHistoryResultType : long { TransactionsAndChanges = 5 } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum NSBatchInsertRequestResultType : ulong { @@ -240,7 +245,7 @@ public enum NSBatchInsertRequestResultType : ulong { Count = 2, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Flags] [Native] @@ -250,7 +255,7 @@ public enum NSPersistentCloudKitContainerSchemaInitializationOptions : ulong { PrintSchema = 1 << 2, } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum NSPersistentCloudKitContainerEventResultType : long { @@ -258,7 +263,7 @@ public enum NSPersistentCloudKitContainerEventResultType : long { CountEvents, } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum NSPersistentCloudKitContainerEventType : long { diff --git a/src/CoreFoundation/CFArray.cs b/src/CoreFoundation/CFArray.cs index 6aa954ca868d..3f0ec3c5bf08 100644 --- a/src/CoreFoundation/CFArray.cs +++ b/src/CoreFoundation/CFArray.cs @@ -93,6 +93,13 @@ internal static CFArray FromNativeObjects (params INativeObject [] values) return new CFArray (Create (values), true); } + internal static CFArray? FromNullableNativeObjects (params INativeObject []? values) + { + if (values is null) + return null; + return new CFArray (Create (values), true); + } + public nint Count { get { return GetCount (GetCheckedHandle ()); } } diff --git a/src/CoreFoundation/CFComparisonResult.cs b/src/CoreFoundation/CFComparisonResult.cs new file mode 100644 index 000000000000..c077b46575e0 --- /dev/null +++ b/src/CoreFoundation/CFComparisonResult.cs @@ -0,0 +1,11 @@ +using Foundation; +using ObjCRuntime; + +namespace CoreFoundation { + [Native] + public enum CFComparisonResult : long { + LessThan = -1, + EqualTo = 0, + GreaterThan = 1, + } +} diff --git a/src/CoreFoundation/CFProxySupport.cs b/src/CoreFoundation/CFProxySupport.cs index 2e9bd1f3eb94..24cdf7178f35 100644 --- a/src/CoreFoundation/CFProxySupport.cs +++ b/src/CoreFoundation/CFProxySupport.cs @@ -27,8 +27,6 @@ #nullable enable -#if !WATCH - using System; using System.Net; using System.Runtime.CompilerServices; @@ -1094,5 +1092,3 @@ public static IWebProxy GetDefaultProxy () } } } - -#endif // !WATCH diff --git a/src/CoreFoundation/CFStream.cs b/src/CoreFoundation/CFStream.cs index 459d0c1c6a21..e957312e4418 100644 --- a/src/CoreFoundation/CFStream.cs +++ b/src/CoreFoundation/CFStream.cs @@ -39,7 +39,7 @@ using System.Runtime.InteropServices; #if NET using CFNetwork; -#elif !WATCH +#else using CoreServices; #endif using ObjCRuntime; @@ -190,7 +190,6 @@ public abstract class CFStream : CFType { [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -210,7 +209,6 @@ internal unsafe extern static void CFStreamCreatePairWithSocket (/* CFAllocatorR [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -240,7 +238,6 @@ public static void CreatePairWithSocket (CFSocket socket, out CFReadStream readS [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -261,7 +258,6 @@ internal unsafe extern static void CFStreamCreatePairWithPeerSocketSignature (/* [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -283,7 +279,6 @@ public static void CreatePairWithPeerSocketSignature (AddressFamily family, Sock } } -#if !WATCH // CFSocketStream.h in CFNetwork.framework (not CoreFoundation) #if NET [SupportedOSPlatform ("ios")] @@ -295,7 +290,6 @@ public static void CreatePairWithPeerSocketSignature (AddressFamily family, Sock [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -318,7 +312,6 @@ internal unsafe extern static void CFStreamCreatePairWithSocketToCFHost ( [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -338,7 +331,6 @@ public static void CreatePairWithSocketToHost (IPEndPoint endpoint, writeStream = write == IntPtr.Zero ? null : new CFWriteStream (write, true); } } -#endif #if NET [SupportedOSPlatform ("ios")] @@ -350,7 +342,6 @@ public static void CreatePairWithSocketToHost (IPEndPoint endpoint, [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -371,7 +362,6 @@ unsafe extern static void CFStreamCreatePairWithSocketToHost (/* CFAllocatorRef [ObsoletedOSPlatform ("macos12.0", Constants.UseNetworkInstead)] [ObsoletedOSPlatform ("ios15.0", Constants.UseNetworkInstead)] #else - [Deprecated (PlatformName.WatchOS, 8, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 15, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: Constants.UseNetworkInstead)] @@ -391,7 +381,6 @@ public static void CreatePairWithSocketToHost (string host, int port, writeStream = write == IntPtr.Zero ? null : new CFWriteStream (write, true); } } -#if !WATCH // CFHTTPStream.h in CFNetwork.framework (not CoreFoundation) #if NET [SupportedOSPlatform ("ios")] @@ -485,7 +474,6 @@ public static CFHTTPStream CreateForStreamedHTTPRequest (CFHTTPMessage request, var handle = CFReadStreamCreateForStreamedHTTPRequest (IntPtr.Zero, request.Handle, body.Handle); return new CFHTTPStream (handle, true); } -#endif [DllImport (Constants.CoreFoundationLibrary)] unsafe internal extern static void CFStreamCreateBoundPair (/* CFAllocatorRef */ IntPtr alloc, diff --git a/src/CoreFoundation/DispatchSource.cs b/src/CoreFoundation/DispatchSource.cs index 730404cc35ab..5962bd1813b6 100644 --- a/src/CoreFoundation/DispatchSource.cs +++ b/src/CoreFoundation/DispatchSource.cs @@ -29,7 +29,9 @@ namespace CoreFoundation { [Flags] public enum MemoryPressureFlags { - Normal = 1, Warn = 2, Critical = 4 + Normal = 1, + Warn = 2, + Critical = 4, } [Flags] @@ -37,7 +39,7 @@ public enum ProcessMonitorFlags : uint { Exit = 0x80000000, Fork = 0x40000000, Exec = 0x20000000, - Signal = 0x08000000 + Signal = 0x08000000, } [Flags] @@ -48,7 +50,7 @@ public enum VnodeMonitorKind : uint { Attrib = 8, Link = 0x10, Rename = 0x20, - Revoke = 0x40 + Revoke = 0x40, } #if NET diff --git a/src/CoreGraphics/CGAffineTransform.cs b/src/CoreGraphics/CGAffineTransform.cs index f56e4341233a..620b85fdd7d7 100644 --- a/src/CoreGraphics/CGAffineTransform.cs +++ b/src/CoreGraphics/CGAffineTransform.cs @@ -463,7 +463,7 @@ public CGAffineTransform Invert () [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern CGAffineTransformComponents CGAffineTransformDecompose (CGAffineTransform transform); @@ -479,7 +479,7 @@ public CGAffineTransformComponents Decompose () [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern CGAffineTransform CGAffineTransformMakeWithComponents (CGAffineTransformComponents components); diff --git a/src/CoreGraphics/CGColor.cs b/src/CoreGraphics/CGColor.cs index 8f0dfa6c1a6c..68d896b124cc 100644 --- a/src/CoreGraphics/CGColor.cs +++ b/src/CoreGraphics/CGColor.cs @@ -162,7 +162,6 @@ static IntPtr Create (CGConstantColor color) #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public CGColor (CGConstantColor color) @@ -338,7 +337,6 @@ public CGPattern? Pattern { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern /* CGColorRef* */ IntPtr CGColorCreateSRGB (nfloat red, nfloat green, nfloat blue, nfloat alpha); @@ -351,7 +349,6 @@ public CGPattern? Pattern { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif static public CGColor? CreateSrgb (nfloat red, nfloat green, nfloat blue, nfloat alpha) { @@ -367,7 +364,6 @@ public CGPattern? Pattern { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern /* CGColorRef* */ IntPtr CGColorCreateGenericGrayGamma2_2 (nfloat gray, nfloat alpha); @@ -380,7 +376,6 @@ public CGPattern? Pattern { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif static public CGColor? CreateGenericGrayGamma2_2 (nfloat gray, nfloat alpha) { @@ -396,7 +391,6 @@ public CGPattern? Pattern { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] @@ -410,7 +404,6 @@ public CGPattern? Pattern { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif static public CGColor? CreateCmyk (nfloat cyan, nfloat magenta, nfloat yellow, nfloat black, nfloat alpha) @@ -427,7 +420,6 @@ public CGPattern? Pattern { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.AccessibilityLibrary)] @@ -441,7 +433,6 @@ public CGPattern? Pattern { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public string? AXName => CFString.FromHandle (AXNameFromColor (Handle)); diff --git a/src/CoreGraphics/CGColorConversionInfo.cs b/src/CoreGraphics/CGColorConversionInfo.cs index 9f08e97665c7..5251ef727a0d 100644 --- a/src/CoreGraphics/CGColorConversionInfo.cs +++ b/src/CoreGraphics/CGColorConversionInfo.cs @@ -138,7 +138,6 @@ public CGColorConversionInfo (CGColorSpace source, CGColorSpace destination) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern /* CGColorConversionInfoRef* */ IntPtr CGColorConversionInfoCreateWithOptions (/* CGColorSpaceRef* */ IntPtr src, /* CGColorSpaceRef* */ IntPtr dst, /* CFDictionaryRef _Nullable */ IntPtr options); @@ -161,7 +160,6 @@ static IntPtr Create (CGColorSpace source, CGColorSpace destination, NSDictionar #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public CGColorConversionInfo (CGColorSpace source, CGColorSpace destination, NSDictionary? options) : base (Create (source, destination, options), true, verify: true) @@ -176,7 +174,6 @@ public CGColorConversionInfo (CGColorSpace source, CGColorSpace destination, NSD #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public CGColorConversionInfo (CGColorSpace source, CGColorSpace destination, CGColorConversionOptions? options) : this (source, destination, options?.Dictionary) diff --git a/src/CoreGraphics/CGColorConverter.cs b/src/CoreGraphics/CGColorConverter.cs index c89f5f2194e4..9e8c7e36589b 100644 --- a/src/CoreGraphics/CGColorConverter.cs +++ b/src/CoreGraphics/CGColorConverter.cs @@ -8,7 +8,7 @@ #nullable enable -#if !MONOMAC && !WATCH +#if !MONOMAC using System; using System.Runtime.InteropServices; @@ -45,4 +45,4 @@ public CGColorConverter (NSDictionary options, params CGColorConverterTriple [] #endif // !NET } -#endif // !MONOMAC && !WATCH +#endif // !MONOMAC diff --git a/src/CoreGraphics/CGColorSpace.cs b/src/CoreGraphics/CGColorSpace.cs index ec5bcaa1a88a..c0eb87cfa104 100644 --- a/src/CoreGraphics/CGColorSpace.cs +++ b/src/CoreGraphics/CGColorSpace.cs @@ -441,7 +441,6 @@ public byte [] GetColorTable () [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CreateIDCCData' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CreateIDCCData' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CreateIDCCData' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CreateIDCCData' instead.")] #endif [DllImport (Constants.CoreGraphicsLibrary)] extern static /* CGColorSpaceRef */ IntPtr CGColorSpaceCreateWithICCProfile (/* CFDataRef */ IntPtr data); @@ -467,7 +466,6 @@ public byte [] GetColorTable () [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CreateIDCCData' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CreateIDCCData' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CreateIDCCData' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CreateIDCCData' instead.")] #endif #if NET public static CGColorSpace? CreateIccProfile (NSData? data) @@ -540,7 +538,6 @@ public byte [] GetColorTable () [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GetICCData' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GetICCData' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'GetICCData' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'GetICCData' instead.")] #endif [DllImport (Constants.CoreGraphicsLibrary)] extern static /* CFDataRef */ IntPtr CGColorSpaceCopyICCProfile (/* CGColorSpaceRef */ IntPtr space); @@ -557,7 +554,6 @@ public byte [] GetColorTable () [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GetICCData' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GetICCData' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'GetICCData' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'GetICCData' instead.")] #endif #if NET public NSData? GetIccProfile () @@ -658,8 +654,6 @@ public bool SupportsOutput { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGColorSpaceCopyPropertyList (IntPtr space); @@ -669,8 +663,6 @@ public bool SupportsOutput { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGColorSpaceCreateWithPropertyList (IntPtr plist); @@ -680,8 +672,6 @@ public bool SupportsOutput { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public CFPropertyList? ToPropertyList () { @@ -702,11 +692,9 @@ public bool SupportsOutput { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [Deprecated (PlatformName.MacOSX, 10, 15, 4)] [Deprecated (PlatformName.iOS, 13, 4)] [Deprecated (PlatformName.TvOS, 13, 4)] - [Deprecated (PlatformName.WatchOS, 6, 2)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern byte CGColorSpaceIsHDR (/* CGColorSpaceRef */ IntPtr space); @@ -722,11 +710,9 @@ public bool SupportsOutput { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [Deprecated (PlatformName.MacOSX, 10, 15, 4)] [Deprecated (PlatformName.iOS, 13, 4)] [Deprecated (PlatformName.TvOS, 13, 4)] - [Deprecated (PlatformName.WatchOS, 6, 2)] #endif public bool IsHdr { get { @@ -742,7 +728,6 @@ public bool IsHdr { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] @@ -756,7 +741,6 @@ public bool IsHdr { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public bool UsesExtendedRange { @@ -773,7 +757,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] @@ -787,7 +770,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif public bool UsesItur2100TF => CGColorSpaceUsesITUR_2100TF (Handle) != 0; @@ -800,7 +782,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] @@ -814,7 +795,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif public CGColorSpace? CreateLinearized () => Runtime.GetINativeObject (CGColorSpaceCreateLinearized (Handle), owns: true); @@ -827,7 +807,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] @@ -841,7 +820,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif public CGColorSpace? CreateExtended () => Runtime.GetINativeObject (CGColorSpaceCreateExtended (Handle), owns: true); @@ -854,7 +832,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] @@ -868,7 +845,6 @@ public bool UsesExtendedRange { #else [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 0)] #endif public CGColorSpace? CreateExtendedLinearized () => Runtime.GetINativeObject (CGColorSpaceCreateExtendedLinearized (Handle), owns: true); @@ -883,7 +859,6 @@ public bool UsesExtendedRange { [TV (16, 0)] [Mac (13, 0)] [MacCatalyst (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGColorSpaceCreateCopyWithStandardRange (/* CGColorSpaceRef */ IntPtr s); @@ -898,7 +873,6 @@ public bool UsesExtendedRange { [TV (16, 0)] [Mac (13, 0)] [MacCatalyst (16, 0)] - [Watch (9, 0)] #endif public CGColorSpace? CreateCopyWithStandardRange () => Runtime.GetINativeObject (CGColorSpaceCreateCopyWithStandardRange (Handle), owns: true); @@ -911,7 +885,6 @@ public bool UsesExtendedRange { [iOS (15, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] - [Watch (8, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern byte CGColorSpaceIsHLGBased (/* CGColorSpace */ IntPtr space); @@ -925,7 +898,6 @@ public bool UsesExtendedRange { [iOS (15, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] - [Watch (8, 0)] #endif public bool IsHlgBased => CGColorSpaceIsHLGBased (Handle) != 0; @@ -938,7 +910,6 @@ public bool UsesExtendedRange { [iOS (15, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] - [Watch (8, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern byte CGColorSpaceIsPQBased (/* CGColorSpace */ IntPtr space); @@ -952,7 +923,6 @@ public bool UsesExtendedRange { [iOS (15, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] - [Watch (8, 0)] #endif public bool IsPQBased => CGColorSpaceIsPQBased (Handle) != 0; @@ -966,7 +936,6 @@ public bool UsesExtendedRange { [iOS (18, 0)] [TV (18, 0)] [MacCatalyst (18, 0)] - [Watch (11, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] extern static /* CGColorSpaceRef */ IntPtr CGColorSpaceCopyBaseColorSpace (/* CGColorSpaceRef */ IntPtr space); @@ -983,7 +952,6 @@ public bool UsesExtendedRange { [iOS (18, 0)] [TV (18, 0)] [MacCatalyst (18, 0)] - [Watch (11, 0)] #endif public CGColorSpace? CopyBaseColorSpace () { diff --git a/src/CoreGraphics/CGContext.cs b/src/CoreGraphics/CGContext.cs index 5d35a01e0cf0..af5248c560ee 100644 --- a/src/CoreGraphics/CGContext.cs +++ b/src/CoreGraphics/CGContext.cs @@ -1425,7 +1425,7 @@ public CGBitmapContext AsBitmapContext () [SupportedOSPlatform ("macos14.0")] [SupportedOSPlatform ("tvos17.0")] #else - [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Watch (10, 0)] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern void CGContextDrawConicGradient (/* CGContext */ IntPtr context, /*[NullAllowed] CGGradient*/ IntPtr gradient, CGPoint center, nfloat angle); @@ -1439,7 +1439,7 @@ public void DrawConicGradient (CGGradient? gradient, CGPoint point, nfloat angle [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern byte CGContextSetEDRTargetHeadroom (/* CGContextRef __nonnull */ IntPtr context, /* float */ float headroom); @@ -1450,7 +1450,7 @@ public void DrawConicGradient (CGGradient? gradient, CGPoint point, nfloat angle [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern float CGContextGetEDRTargetHeadroom (/* CGContextRef __nonnull */ IntPtr context); @@ -1463,7 +1463,7 @@ public void DrawConicGradient (CGGradient? gradient, CGPoint point, nfloat angle [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public float GetEdrTargetHeadroom () { @@ -1479,7 +1479,7 @@ public float GetEdrTargetHeadroom () [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public bool SetEdrTargetHeadroom (float value) { @@ -1492,7 +1492,7 @@ public bool SetEdrTargetHeadroom (float value) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern /* bool */ byte CGContextDrawImageApplyingToneMapping (/* CGContextRef __nonnull */ IntPtr context, CGRect r, /* CGImageRef */ IntPtr image, CGToneMapping method, /* CFDictionaryRef __nullable */ IntPtr options); @@ -1509,7 +1509,7 @@ public bool SetEdrTargetHeadroom (float value) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public bool DrawImageApplyingToneMapping (CGRect rect, CGImage image, CGToneMapping method, NSDictionary? options) { @@ -1529,7 +1529,7 @@ public bool DrawImageApplyingToneMapping (CGRect rect, CGImage image, CGToneMapp [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public bool DrawImageApplyingToneMapping (CGRect rect, CGImage image, CGToneMapping method, CGToneMappingOptions? options) { diff --git a/src/CoreGraphics/CGContextPDF.cs b/src/CoreGraphics/CGContextPDF.cs index 77018f0f1808..6b197c8cc3a7 100644 --- a/src/CoreGraphics/CGContextPDF.cs +++ b/src/CoreGraphics/CGContextPDF.cs @@ -92,7 +92,6 @@ public partial class CGPDFInfo : CGPDFPageInfo { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] #endif public bool? CreateLinearizedPdf { get; set; } #if NET @@ -103,7 +102,6 @@ public partial class CGPDFInfo : CGPDFPageInfo { #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] #endif public bool? CreatePdfA2u { get; set; } @@ -312,7 +310,6 @@ public void SetDestination (string name, CGRect rect) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern void CGPDFContextBeginTag (/* CGContextRef* */ IntPtr context, CGPdfTagType tagType, /* CFDictionaryRef* _Nullable */ IntPtr tagProperties); @@ -325,7 +322,6 @@ public void SetDestination (string name, CGRect rect) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public void BeginTag (CGPdfTagType tagType, NSDictionary tagProperties) { @@ -340,7 +336,6 @@ public void BeginTag (CGPdfTagType tagType, NSDictionary tagProperties) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public void BeginTag (CGPdfTagType tagType, CGPdfTagProperties tagProperties) { @@ -356,7 +351,6 @@ public void BeginTag (CGPdfTagType tagType, CGPdfTagProperties tagProperties) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern void CGPDFContextEndTag (/* CGContextRef* */ IntPtr context); @@ -369,7 +363,6 @@ public void BeginTag (CGPdfTagType tagType, CGPdfTagProperties tagProperties) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public void EndTag () { @@ -382,7 +375,7 @@ public void EndTag () [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern void CGPDFContextSetParentTree (/* CGContextRef cg_nullable */ IntPtr context, /* CGPDFDictionaryRef */ IntPtr parentTreeDictionary); @@ -393,7 +386,7 @@ public void EndTag () [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public void SetParentTree (CGPDFDictionary parentTreeDictionary) { @@ -406,7 +399,7 @@ public void SetParentTree (CGPDFDictionary parentTreeDictionary) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern void CGPDFContextSetIDTree (/* CGContextRef cg_nullable */ IntPtr context, /* CGPDFDictionaryRef */ IntPtr IDTreeDictionary); @@ -417,7 +410,7 @@ public void SetParentTree (CGPDFDictionary parentTreeDictionary) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public void SetIdTree (CGPDFDictionary idTreeDictionary) { @@ -430,7 +423,7 @@ public void SetIdTree (CGPDFDictionary idTreeDictionary) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern void CGPDFContextSetPageTagStructureTree (/* CGContextRef cg_nullable */ IntPtr context, /* CFDictionaryRef */ IntPtr pageTagStructureTreeDictionary); @@ -441,7 +434,7 @@ public void SetIdTree (CGPDFDictionary idTreeDictionary) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public void SetPageTagStructureTree (NSDictionary pageTagStructureTreeDictionary) { diff --git a/src/CoreGraphics/CGEnums.cs b/src/CoreGraphics/CGEnums.cs index 7a3768b19a1f..915ae133a92e 100644 --- a/src/CoreGraphics/CGEnums.cs +++ b/src/CoreGraphics/CGEnums.cs @@ -168,7 +168,7 @@ public enum CGPdfTagType /* int32_t */ { Figure = 700, Formula, Form, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] Object = 800, } @@ -203,7 +203,6 @@ public enum CGPDFAccessPermissions : uint { // this enum does not exist in the headers anymore [Obsoleted (PlatformName.TvOS, 10, 0, message: "Replaced by 'CGColorConversionInfoTransformType'.")] [Obsoleted (PlatformName.iOS, 10, 0, message: "Replaced by 'CGColorConversionInfoTransformType'.")] - [NoWatch] [NoMac] public enum CGColorConverterTransformType : uint { FromSpace, diff --git a/src/CoreGraphics/CGEventTypes.cs b/src/CoreGraphics/CGEventTypes.cs index 6b11c06a8997..0dfe9dccc45e 100644 --- a/src/CoreGraphics/CGEventTypes.cs +++ b/src/CoreGraphics/CGEventTypes.cs @@ -33,7 +33,7 @@ namespace CoreGraphics { public enum CGEventTapLocation : int { HID, Session, - AnnotatedSession + AnnotatedSession, } // CGEventTypes.h:typedef uint32_t CGEventTapPlacement; @@ -45,7 +45,7 @@ public enum CGEventTapLocation : int { #endif public enum CGEventTapPlacement : uint { HeadInsert, - TailAppend + TailAppend, } // CGEventTypes.h:typedef uint32_t CGEventTapOptions; @@ -57,7 +57,7 @@ public enum CGEventTapPlacement : uint { #endif public enum CGEventTapOptions : uint { Default, - ListenOnly + ListenOnly, } // CGEventTypes.h:typedef uint32_t CGMouseButton; @@ -68,7 +68,9 @@ public enum CGEventTapOptions : uint { [MacCatalyst (13,1)] #endif public enum CGMouseButton : uint { - Left, Right, Center + Left, + Right, + Center, } // CGEventTypes.h:typedef uint32_t CGScrollEventUnit; @@ -79,7 +81,8 @@ public enum CGMouseButton : uint { [MacCatalyst (13,1)] #endif public enum CGScrollEventUnit : uint { - Pixel, Line + Pixel, + Line, } // CGEventTypes.h:typedef uint64_t CGEventMask; @@ -395,7 +398,7 @@ public enum CGEventField : int { // no documentation for this value in the header file. /// A value that represents the raw delta value for axis 2. - ScrollWheelEventRawDeltaAxis2 = 177 + ScrollWheelEventRawDeltaAxis2 = 177, } // CGEventTypes.h:typedef uint32_t CGEventType; @@ -435,7 +438,9 @@ public enum CGEventType : uint { [MacCatalyst (13,1)] #endif public enum CGEventMouseSubtype : uint { - Default, TabletPoint, TabletProximity + Default, + TabletPoint, + TabletProximity, } // CGEventTypes.h:typedef uint32_t CGEventSourceStateID; @@ -446,7 +451,9 @@ public enum CGEventMouseSubtype : uint { [MacCatalyst (13,1)] #endif public enum CGEventSourceStateID : int { - Private = -1, CombinedSession = 0, HidSystem = 1 + Private = -1, + CombinedSession = 0, + HidSystem = 1, } // CGRemoteOperation.h:typedef uint32_t CGEventFilterMask; @@ -460,7 +467,7 @@ public enum CGEventSourceStateID : int { public enum CGEventFilterMask : uint { PermitLocalMouseEvents = 1, PermitLocalKeyboardEvents = 2, - PermitSystemDefinedEvents = 4 + PermitSystemDefinedEvents = 4, } // CGRemoteOperation.h:typedef uint32_t CGEventSuppressionState; diff --git a/src/CoreGraphics/CGImage.cs b/src/CoreGraphics/CGImage.cs index 1e5a1615bf9f..bb0ce4fde487 100644 --- a/src/CoreGraphics/CGImage.cs +++ b/src/CoreGraphics/CGImage.cs @@ -300,7 +300,7 @@ public CGImage (int width, int height, int bitsPerComponent, int bitsPerPixel, i imageOption); return FromHandle (imageRef, true); } -#elif !WATCH +#else public static CGImage? ScreenImage { get { return UIKit.UIScreen.MainScreen.Capture ().CGImage; @@ -308,7 +308,6 @@ public static CGImage? ScreenImage { } #endif - [DllImport (Constants.CoreGraphicsLibrary)] extern static unsafe /* CGImageRef */ IntPtr CGImageCreateWithJPEGDataProvider (/* CGDataProviderRef */ IntPtr source, /* CGFloat[] */ nfloat* decode, byte shouldInterpolate, CGColorRenderingIntent intent); @@ -561,8 +560,6 @@ public NSString? UTType { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern CGImagePixelFormatInfo CGImageGetPixelFormatInfo (/* __nullable CGImageRef */ IntPtr handle); @@ -572,8 +569,6 @@ public NSString? UTType { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public CGImagePixelFormatInfo PixelFormatInfo => CGImageGetPixelFormatInfo (Handle); @@ -582,8 +577,6 @@ public NSString? UTType { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern CGImageByteOrderInfo CGImageGetByteOrderInfo (/* __nullable CGImageRef */ IntPtr handle); @@ -593,8 +586,6 @@ public NSString? UTType { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public CGImageByteOrderInfo ByteOrderInfo => CGImageGetByteOrderInfo (Handle); @@ -604,7 +595,7 @@ public NSString? UTType { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] unsafe static extern /* CGImageRef __nullable */ IntPtr CGImageCreateWithContentHeadroom ( @@ -641,7 +632,7 @@ public NSString? UTType { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public CGImage (float headroom, int width, int height, int bitsPerComponent, int bitsPerPixel, int bytesPerRow, CGColorSpace? colorSpace, CGBitmapFlags bitmapFlags, CGDataProvider? provider, @@ -656,7 +647,7 @@ public CGImage (float headroom, int width, int height, int bitsPerComponent, int [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif static IntPtr Create (float headroom, int width, int height, int bitsPerComponent, int bitsPerPixel, int bytesPerRow, CGColorSpace? colorSpace, CGBitmapFlags bitmapFlags, CGDataProvider? provider, @@ -690,7 +681,7 @@ static IntPtr Create (float headroom, int width, int height, int bitsPerComponen [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] unsafe static extern /* CGImageRef __nullable */ IntPtr CGImageCreateCopyWithContentHeadroom ( @@ -705,7 +696,7 @@ static IntPtr Create (float headroom, int width, int height, int bitsPerComponen [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public CGImage? Copy (float headroom) { @@ -723,7 +714,7 @@ static IntPtr Create (float headroom, int width, int height, int bitsPerComponen [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public static float DefaultHdrImageContentHeadroom { get => CoreGraphicsFields.DefaultHdrImageContentHeadroom; @@ -735,7 +726,7 @@ public static float DefaultHdrImageContentHeadroom { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern float CGImageGetContentHeadroom (/* __nullable CGImageRef */ IntPtr handle); @@ -747,7 +738,7 @@ public static float DefaultHdrImageContentHeadroom { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public float ContentHeadroom => CGImageGetContentHeadroom (Handle); @@ -757,7 +748,7 @@ public static float DefaultHdrImageContentHeadroom { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern /* bool */ byte CGImageShouldToneMap (/* __nullable CGImageRef */ IntPtr handle); @@ -769,7 +760,7 @@ public static float DefaultHdrImageContentHeadroom { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public bool ShouldToneMap => CGImageShouldToneMap (Handle) != 0; @@ -779,7 +770,7 @@ public static float DefaultHdrImageContentHeadroom { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern /* bool */ byte CGImageContainsImageSpecificToneMappingMetadata (/* __nullable CGImageRef */ IntPtr handle); @@ -791,7 +782,7 @@ public static float DefaultHdrImageContentHeadroom { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public bool ContainsImageSpecificToneMappingMetadata => CGImageContainsImageSpecificToneMappingMetadata (Handle) != 0; #endif // !COREBUILD diff --git a/src/CoreGraphics/CGImageProperties.cs b/src/CoreGraphics/CGImageProperties.cs index 31d2dfe60981..45cdf9427fa0 100644 --- a/src/CoreGraphics/CGImageProperties.cs +++ b/src/CoreGraphics/CGImageProperties.cs @@ -33,9 +33,7 @@ using Foundation; using CoreFoundation; using ObjCRuntime; -#if !WATCH using CoreImage; -#endif #if !COREBUILD using Keys = ImageIO.CGImageProperties; #endif @@ -168,7 +166,6 @@ public bool? IsIndexed { } } -#if !WATCH public CIImageOrientation? Orientation { get { return (CIImageOrientation?) GetInt32Value (Keys.Orientation); @@ -177,7 +174,6 @@ public CIImageOrientation? Orientation { SetNumberValue (Keys.Orientation, (int?) value); } } -#endif public int? PixelHeight { get { @@ -457,7 +453,6 @@ public CGImagePropertiesTiff (NSDictionary dictionary) { } -#if !WATCH public CIImageOrientation? Orientation { get { return (CIImageOrientation?) GetInt32Value (Keys.TIFFOrientation); @@ -466,7 +461,6 @@ public CIImageOrientation? Orientation { SetNumberValue (Keys.TIFFOrientation, (int?) value); } } -#endif public int? XResolution { get { diff --git a/src/CoreGraphics/CGPDFArray.cs b/src/CoreGraphics/CGPDFArray.cs index e006417903d2..0757cd688087 100644 --- a/src/CoreGraphics/CGPDFArray.cs +++ b/src/CoreGraphics/CGPDFArray.cs @@ -267,8 +267,6 @@ static byte ApplyBlockHandler (IntPtr block, nint index, IntPtr value, IntPtr in [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] unsafe extern static byte CGPDFArrayApplyBlock (/* CGPDFArrayRef */ IntPtr array, /* CGPDFArrayApplierBlock */ BlockLiteral* block, /* void* */ IntPtr info); @@ -278,8 +276,6 @@ static byte ApplyBlockHandler (IntPtr block, nint index, IntPtr value, IntPtr in [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [BindingImpl (BindingImplOptions.Optimizable)] public bool Apply (ApplyCallback callback, object? info = null) diff --git a/src/CoreGraphics/CGPDFScanner.cs b/src/CoreGraphics/CGPDFScanner.cs index 416062796ecb..afd0c247b925 100644 --- a/src/CoreGraphics/CGPDFScanner.cs +++ b/src/CoreGraphics/CGPDFScanner.cs @@ -231,7 +231,7 @@ public bool TryPop (out CGPDFStream? value) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] extern static void CGPDFScannerStop (/* CGPDFScannerRef */ IntPtr scanner); @@ -242,7 +242,7 @@ public bool TryPop (out CGPDFStream? value) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif public void Stop () { diff --git a/src/CoreGraphics/CGPath.cs b/src/CoreGraphics/CGPath.cs index ced5e16217b4..c82619db8395 100644 --- a/src/CoreGraphics/CGPath.cs +++ b/src/CoreGraphics/CGPath.cs @@ -551,7 +551,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyByNormalizing (IntPtr path, byte evenOddFillRule); @@ -567,7 +567,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyByUnioningPath (IntPtr path, IntPtr maskPath, byte evenOddFillRule); @@ -583,7 +583,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyByIntersectingPath (IntPtr path, IntPtr maskPath, byte evenOddFillRule); @@ -599,7 +599,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyBySubtractingPath (IntPtr path, IntPtr maskPath, byte evenOddFillRule); @@ -615,7 +615,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyBySymmetricDifferenceOfPath (IntPtr path, IntPtr maskPath, byte evenOddFillRule); @@ -631,7 +631,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyOfLineBySubtractingPath (IntPtr path, IntPtr maskPath, byte evenOddFillRule); @@ -647,7 +647,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyOfLineByIntersectingPath (IntPtr path, IntPtr maskPath, byte evenOddFillRule); @@ -663,7 +663,7 @@ public void Apply (ApplierFunction func) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern unsafe /* CFArrayRef __nullable */ IntPtr CGPathCreateSeparateComponents (IntPtr path, byte evenOddFillRule); @@ -682,7 +682,7 @@ public CGPath [] GetSeparateComponents (bool evenOddFillRule) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern IntPtr CGPathCreateCopyByFlattening (IntPtr path, nfloat flatteningThreshold); @@ -698,7 +698,7 @@ public CGPath [] GetSeparateComponents (bool evenOddFillRule) [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [DllImport (Constants.CoreGraphicsLibrary)] static extern byte CGPathIntersectsPath (IntPtr path1, IntPtr path2, byte evenOddFillRule); diff --git a/src/CoreGraphics/CGPdfTagType.cs b/src/CoreGraphics/CGPdfTagType.cs index f60a1c6dc55c..c36e5c273769 100644 --- a/src/CoreGraphics/CGPdfTagType.cs +++ b/src/CoreGraphics/CGPdfTagType.cs @@ -23,7 +23,6 @@ namespace CoreGraphics { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public static class CGPdfTagType_Extensions { diff --git a/src/CoreImage/CISampler.cs b/src/CoreImage/CISampler.cs index bc62262306ec..3ffb7ba72c04 100644 --- a/src/CoreImage/CISampler.cs +++ b/src/CoreImage/CISampler.cs @@ -39,12 +39,13 @@ namespace CoreImage { // convenience enum on kCISamplerWrap[Black|Clamp] fields -> CISampler.h (headers hidden under QuartzCore.framework) public enum CIWrapMode { Black, - Clamp + Clamp, } // convenience enum on kCISamplerFilter[Nearest|Linear] fields -> CISampler.h (headers hidden under QuartzCore.framework) public enum CIFilterMode { - Nearest, Linear + Nearest, + Linear, } #if NET diff --git a/src/CoreLocation/CLCompat.cs b/src/CoreLocation/CLCompat.cs index f058f0c665e2..2f988fcd27e7 100644 --- a/src/CoreLocation/CLCompat.cs +++ b/src/CoreLocation/CLCompat.cs @@ -9,7 +9,7 @@ namespace CoreLocation { #nullable enable -#if !NET && !WATCH +#if !NET #if !TVOS public partial class CLHeading { @@ -30,9 +30,9 @@ public partial class CLLocation { return base.Description; } } -#endif // !NET && !WATCH +#endif // !NET -#if !NET && (WATCH || TVOS || MONOMAC) +#if !NET && (TVOS || MONOMAC) // Symbol in Xcode 13.2 from watchOS and tvOS @@ -61,5 +61,5 @@ public static partial class CLLocationPushServiceExtension_Extensions { public static void ServiceExtensionWillTerminate (this ICLLocationPushServiceExtension This) => throw new PlatformNotSupportedException (Constants.UnavailableOnThisPlatform); } -#endif // !NET && (WATCH || TVOS) +#endif // !NET && TVOS } diff --git a/src/CoreLocation/CLEnums.cs b/src/CoreLocation/CLEnums.cs index 4ab6c6955692..8286809a7ddd 100644 --- a/src/CoreLocation/CLEnums.cs +++ b/src/CoreLocation/CLEnums.cs @@ -113,13 +113,12 @@ public enum CLActivityType : long { AutomotiveNavigation, Fitness, OtherNavigation, - [Watch (5, 0)] [MacCatalyst (13, 1)] Airborne, } [Native] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] public enum CLAccuracyAuthorization : long { FullAccuracy, diff --git a/src/CoreML/MLModel.cs b/src/CoreML/MLModel.cs index b3cf5522dfaf..bf64a98ceea3 100644 --- a/src/CoreML/MLModel.cs +++ b/src/CoreML/MLModel.cs @@ -14,7 +14,7 @@ public partial class MLModel { [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif [DllImport (Constants.CoreMLLibrary)] static extern /* MLComputeDeviceProtocol[] */ IntPtr MLAllComputeDevices (); @@ -25,7 +25,7 @@ public partial class MLModel { [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public static IMLComputeDeviceProtocol [] AllComputeDevices { get { diff --git a/src/CoreMedia/CMAttachmentBearer.cs b/src/CoreMedia/CMAttachmentBearer.cs index 26dbbc62c57f..e601ed93c090 100644 --- a/src/CoreMedia/CMAttachmentBearer.cs +++ b/src/CoreMedia/CMAttachmentBearer.cs @@ -15,8 +15,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public static class CMAttachmentBearer { @@ -69,12 +67,10 @@ public static class CMAttachmentBearer { return Runtime.GetINativeObject (attchm, false); return default (T); } -#if !WATCH public static T? GetAttachment (this ICMAttachmentBearer target, CMSampleBufferAttachmentKey key, out CMAttachmentMode attachmentModeOut) where T : class, INativeObject { return GetAttachment (target, key.GetConstant (), out attachmentModeOut); } -#endif [DllImport (Constants.CoreMediaLibrary)] extern static void CMPropagateAttachments (/* CMAttachmentBearerRef */ IntPtr source, /* CMAttachmentBearerRef */ IntPtr destination); diff --git a/src/CoreMedia/CMBlockBuffer.cs b/src/CoreMedia/CMBlockBuffer.cs index 0b80c790a8d2..4b51e2dcd5bd 100644 --- a/src/CoreMedia/CMBlockBuffer.cs +++ b/src/CoreMedia/CMBlockBuffer.cs @@ -30,8 +30,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMBlockBuffer : NativeObject, ICMAttachmentBearer { CMCustomBlockAllocator? customAllocator; diff --git a/src/CoreMedia/CMBufferQueue.cs b/src/CoreMedia/CMBufferQueue.cs index addc8b65ff01..6ad5cae24bdd 100644 --- a/src/CoreMedia/CMBufferQueue.cs +++ b/src/CoreMedia/CMBufferQueue.cs @@ -17,7 +17,6 @@ using Foundation; using CoreFoundation; using ObjCRuntime; -using OSStatus = System.Int32; namespace CoreMedia { @@ -27,8 +26,6 @@ namespace CoreMedia { #if NET // [SupportedOSPlatform ("ios")] - SupportedOSPlatform is not valid on this declaration type "delegate" -#else - [Watch (6, 0)] #endif public delegate nint CMBufferGetSize (INativeObject buffer); @@ -453,9 +450,6 @@ static nint GetTotalSize (IntPtr buffer, IntPtr refcon) } #endif // !COREBUILD -#if !NET - [Watch (6, 0)] -#endif public enum TriggerCondition { WhenDurationBecomesLessThan = 1, WhenDurationBecomesLessThanOrEqualTo = 2, diff --git a/src/CoreMedia/CMCustomBlockAllocator.cs b/src/CoreMedia/CMCustomBlockAllocator.cs index dae8b317f330..aca2023cf094 100644 --- a/src/CoreMedia/CMCustomBlockAllocator.cs +++ b/src/CoreMedia/CMCustomBlockAllocator.cs @@ -23,8 +23,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMCustomBlockAllocator : IDisposable { @@ -133,9 +131,6 @@ protected virtual void Dispose (bool disposing) // This class is used internally by a couple of CMBlockBuffer methods // that take a managed array as input parameter -#if !NET - [Watch (6, 0)] -#endif internal class CMManagedArrayBlockAllocator : CMCustomBlockAllocator { GCHandle dataHandle; diff --git a/src/CoreMedia/CMEnums.cs b/src/CoreMedia/CMEnums.cs index 5a520254c5dd..040f16ccabc1 100644 --- a/src/CoreMedia/CMEnums.cs +++ b/src/CoreMedia/CMEnums.cs @@ -18,7 +18,6 @@ namespace CoreMedia { // FourCharCode -> CMFormatDescription.h /// An enumeration whose values specify valid types of media. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMMediaType : uint { Video = 1986618469, // 'vide' @@ -30,11 +29,12 @@ public enum CMMediaType : uint { TimeCode = 1953325924, // 'tmcd' // note: the 4CC was obsoleted, i.e. Metadata is a new 4CC Metadata = 0x6D657461, // 'meta' + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + TaggedBufferGroup = ('t' << 24) + ('b' << 16) + ('g' << 8) + 'r', // 'tbgr', } // FourCharCode -> CMFormatDescription.h /// An enumeration whose values specify a closed-captioning standard. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMClosedCaptionFormatType : uint { CEA608 = 0x63363038, // 'c608', @@ -44,7 +44,6 @@ public enum CMClosedCaptionFormatType : uint { // FourCharCode -> CMFormatDescription.h /// An enumeration whose values specify valid types of multiplexed media. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMMuxedStreamType : uint { MPEG1System = 0x6D703173, // 'mp1s', @@ -55,7 +54,6 @@ public enum CMMuxedStreamType : uint { // FourCharCode -> CMFormatDescription.h /// An enumeration whose values specify a subtitling standard. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMSubtitleFormatType : uint { Text3G = 0x74783367, // 'tx3g' @@ -64,7 +62,6 @@ public enum CMSubtitleFormatType : uint { // FourCharCode -> CMFormatDescription.h /// An enumeration whose values specify types of timed metadata. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMMetadataFormatType : uint { ICY = 0x69637920, // 'icy ' @@ -75,7 +72,6 @@ public enum CMMetadataFormatType : uint { // FourCharCode -> CMFormatDescription.h /// An enumeration whose values specify the type of a time code. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMTimeCodeFormatType : uint { TimeCode32 = 0x746D6364, // 'tmcd', @@ -86,7 +82,6 @@ public enum CMTimeCodeFormatType : uint { // uint32_t -> CMTime.h /// An enumeration whose values specify the rounding method to be used with a . - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMTimeRoundingMethod : uint { RoundHalfAwayFromZero = 1, @@ -100,7 +95,6 @@ public enum CMTimeRoundingMethod : uint { // FourCharCode -> CMFormatDescription.h /// An enumeration whose values specify types of video codecs. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMVideoCodecType : uint { YUV422YpCbCr8 = 0x32767579, @@ -116,7 +110,7 @@ public enum CMVideoCodecType : uint { Mpeg4Video = 0x6d703476, Mpeg2Video = 0x6d703276, Mpeg1Video = 0x6d703176, - [iOS (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), TV (14, 0)] [MacCatalyst (14, 0)] VP9 = 0x76703039, DvcNtsc = 0x64766320, @@ -138,7 +132,6 @@ public enum CMVideoCodecType : uint { Hevc = 0x68766331, [iOS (14, 5)] [TV (14, 5)] - [Watch (7, 4)] [MacCatalyst (14, 5)] DolbyVisionHevc = 0x64766831, DisparityHevc = 0x64697368, @@ -147,7 +140,6 @@ public enum CMVideoCodecType : uint { // UInt32 enum => CMFormatDescription.h /// Enumerates pixel formats. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMPixelFormat : uint { AlphaRedGreenBlue32bits = 32, @@ -170,7 +162,6 @@ public enum CMPixelFormat : uint { /// Enumerates attachment propagation policies. /// This setting controls whether will propagate a given attachment. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMAttachmentMode : uint { ShouldNotPropagate = 0, @@ -179,7 +170,6 @@ public enum CMAttachmentMode : uint { // untyped enum (used as OSStatus) -> CMBlockBuffer.h /// An enumeration whose values specify errors relating to s. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMBlockBufferError : int { None = 0, @@ -197,7 +187,6 @@ public enum CMBlockBufferError : int { // uint32_t -> CMBlockBuffer.h /// An enumeration of flags to be used with . [Flags] - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMBlockBufferFlags : uint { AssureMemoryNow = (1 << 0), @@ -208,7 +197,6 @@ public enum CMBlockBufferFlags : uint { // untyped enum (uses as OSStatus) -> CMFormatDescription.h /// An enumeration whose values specify errors relating to s. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMFormatDescriptionError : int { None = 0, @@ -219,7 +207,6 @@ public enum CMFormatDescriptionError : int { // untyped enum (used as an OSStatus) -> CMSampleBuffer.h /// An enumeration whose values specify errors relating to s. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMSampleBufferError : int { None = 0, @@ -240,7 +227,6 @@ public enum CMSampleBufferError : int { Invalidated = -12744, } -#if !WATCH public enum LensStabilizationStatus { Active, OutOfRange, @@ -248,11 +234,9 @@ public enum LensStabilizationStatus { Off, None, } -#endif // untyped enum (used as OSStatus) -> CMSync.h /// An enumeration whose values specify errors relating to s. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMClockError : int { None = 0, @@ -264,7 +248,6 @@ public enum CMClockError : int { // untyped enum (used as OSStatus) -> CMSync.h /// An enumeration whose values specify errors relating to s. - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMTimebaseError : int { None = 0, @@ -277,7 +260,6 @@ public enum CMTimebaseError : int { // untyped enum (used as OSStatus) -> CMSync.h /// An enumeration whose values specify errors returned by . - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum CMSyncError : int { None = 0, diff --git a/src/CoreMedia/CMFormatDescription.cs b/src/CoreMedia/CMFormatDescription.cs index 984645d3e0ef..8ca3cd9819d6 100644 --- a/src/CoreMedia/CMFormatDescription.cs +++ b/src/CoreMedia/CMFormatDescription.cs @@ -36,8 +36,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMFormatDescription : NativeObject { [Preserve (Conditional = true)] @@ -122,6 +120,15 @@ public CMTimeCodeFormatType TimeCodeFormatType { } } + /// Gets the property as a . + /// The property as a , if this format descripton's is , otherwise 0. + /// Only applicable if this format descripton's is , otherwise 0 is returned. + public CMTaggedBufferGroupFormatType TaggedBufferGroupFormatType { + get { + return MediaType == CMMediaType.TaggedBufferGroup ? (CMTaggedBufferGroupFormatType) MediaSubType : 0; + } + } + [DllImport (Constants.CoreMediaLibrary)] extern static CMMediaType CMFormatDescriptionGetMediaType (/* CMFormatDescriptionRef */ IntPtr desc); @@ -305,8 +312,6 @@ public AudioFormat AudioRichestDecodableFormat { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMAudioFormatDescription : CMFormatDescription { [Preserve (Conditional = true)] @@ -323,8 +328,6 @@ internal CMAudioFormatDescription (NativeHandle handle, bool owns) [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public partial class CMVideoFormatDescription : CMFormatDescription { [Preserve (Conditional = true)] diff --git a/src/CoreMedia/CMSampleBuffer.cs b/src/CoreMedia/CMSampleBuffer.cs index 5f36e9c6f09e..dd2cd47b4d63 100644 --- a/src/CoreMedia/CMSampleBuffer.cs +++ b/src/CoreMedia/CMSampleBuffer.cs @@ -14,17 +14,12 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Collections.Generic; +using System.ComponentModel; using Foundation; using CoreFoundation; using ObjCRuntime; -#if NET -using OSStatus = System.IntPtr; -#else -using OSStatus = System.nint; -#endif - #if !COREBUILD using AudioToolbox; using CoreVideo; @@ -44,8 +39,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMSampleBuffer : NativeObject, ICMAttachmentBearer { #if !COREBUILD @@ -57,6 +50,13 @@ internal CMSampleBuffer (NativeHandle handle, bool owns) { } + internal static CMSampleBuffer? Create (IntPtr handle, bool owns) + { + if (handle == IntPtr.Zero) + return null; + return new CMSampleBuffer (handle, owns); + } + protected override void Dispose (bool disposing) { if (invalidate.IsAllocated) @@ -65,6 +65,16 @@ protected override void Dispose (bool disposing) base.Dispose (disposing); } + /// Get this sample buffer's tagged buffer group. + /// The tagged buffer group for this sample buffer, or null in case of failure or if this sample buffer doesn't contain a tagged buffer group. + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] + public CMTaggedBufferGroup? TaggedBufferGroup { + get => CMTaggedBufferGroup.GetTaggedBufferGroup (this); + } + [DllImport (Constants.CoreMediaLibrary)] unsafe extern static CMSampleBufferError CMAudioSampleBufferCreateWithPacketDescriptions ( /* CFAllocatorRef */ IntPtr allocator, @@ -121,6 +131,19 @@ unsafe static extern OSStatus CMSampleBufferCreateCopyWithNewTiming ( return CreateWithNewTiming (original, timing, out status); } +#if !XAMCORE_5_0 + // OSStatus was incorrectly defined as IntPtr in this file, so providing this overload to keep compatibility, + // while at the same time highly discourage using this overload. + [EditorBrowsable (EditorBrowsableState.Never)] + [OverloadResolutionPriorityAttribute (-1)] + public static CMSampleBuffer? CreateWithNewTiming (CMSampleBuffer original, CMSampleTimingInfo []? timing, out nint status) + { + var rv = CreateWithNewTiming (original, timing, out var actualStatus); + status = (nint) actualStatus; + return rv; + } +#endif // XAMCORE_5_0 + public unsafe static CMSampleBuffer? CreateWithNewTiming (CMSampleBuffer original, CMSampleTimingInfo []? timing, out OSStatus status) { if (original is null) @@ -475,6 +498,19 @@ unsafe static extern OSStatus CMSampleBufferGetSampleTimingInfoArray ( return GetSampleTimingInfo (out status); } +#if !XAMCORE_5_0 + // OSStatus was incorrectly defined as IntPtr in this file, so providing this overload to keep compatibility, + // while at the same time highly discourage using this overload. + [EditorBrowsable (EditorBrowsableState.Never)] + [OverloadResolutionPriorityAttribute (-1)] + public CMSampleTimingInfo []? GetSampleTimingInfo (out nint status) + { + var rv = GetSampleTimingInfo (out OSStatus actualStatus); + status = actualStatus; + return rv; + } +#endif // XAMCORE_5_0 + public unsafe CMSampleTimingInfo []? GetSampleTimingInfo (out OSStatus status) { nint count; @@ -807,7 +843,6 @@ public CMSampleBufferError CopyPCMDataIntoAudioBufferList (int frameOffset, int /* CMSampleBufferRef* */ IntPtr* sBufOut); #if !NET -#if !WATCH [Obsolete ("Use the 'CreateReadyWithImageBuffer' overload with a single ref, not array, 'CMSampleTimingInfo' parameter.")] public static CMSampleBuffer CreateReadyWithImageBuffer (CVImageBuffer imageBuffer, CMFormatDescription formatDescription, CMSampleTimingInfo [] sampleTiming, out CMSampleBufferError error) @@ -818,7 +853,6 @@ public static CMSampleBuffer CreateReadyWithImageBuffer (CVImageBuffer imageBuff ObjCRuntime.ThrowHelper.ThrowArgumentException (nameof (sampleTiming), "Only a single sample is allowed."); return CreateReadyWithImageBuffer (imageBuffer, formatDescription, sampleTiming, out error); } -#endif // !WATCH #endif // !NET #if NET [SupportedOSPlatform ("ios")] @@ -1011,7 +1045,6 @@ public string? DroppedFrameReason { } } -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -1036,7 +1069,6 @@ public LensStabilizationStatus StillImageLensStabilizationStatus { return LensStabilizationStatus.None; } } -#endif // !WATCH #endif // !MONOMAC } #endif diff --git a/src/CoreMedia/CMSync.cs b/src/CoreMedia/CMSync.cs index 317cd50a5501..15197044350f 100644 --- a/src/CoreMedia/CMSync.cs +++ b/src/CoreMedia/CMSync.cs @@ -28,8 +28,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMClock : CMClockOrTimebase { #if !NET @@ -128,8 +126,6 @@ public void Invalidate () [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMTimebase : CMClockOrTimebase { #if !NET @@ -159,7 +155,6 @@ private CMTimebase (NativeHandle handle, bool owns) [Deprecated (PlatformName.iOS, 8, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.WatchOS, 6, 0)] #endif [DllImport (Constants.CoreMediaLibrary)] unsafe extern static /* OSStatus */ CMTimebaseError CMTimebaseCreateWithMasterClock (/* CFAllocatorRef */ IntPtr allocator, /* CMClockRef */ IntPtr masterClock, /* CMTimebaseRef* */ IntPtr* timebaseOut); @@ -197,7 +192,6 @@ public CMTimebase (CMClock masterClock) [Deprecated (PlatformName.iOS, 8, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.WatchOS, 6, 0)] #endif [DllImport (Constants.CoreMediaLibrary)] unsafe extern static /* OSStatus */ CMTimebaseError CMTimebaseCreateWithMasterTimebase (/* CFAllocatorRef */ IntPtr allocator, /* CMTimebaseRef */ IntPtr masterTimebase, /* CMTimebaseRef* */ IntPtr* timebaseOut); @@ -228,7 +222,6 @@ public CMTimebase (CMTimebase masterTimebase) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -257,7 +250,6 @@ static IntPtr Create (CFAllocator? allocator, CMClock sourceClock) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -273,7 +265,6 @@ public CMTimebase (CFAllocator? allocator, CMClock sourceClock) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -302,7 +293,6 @@ static IntPtr Create (CFAllocator? allocator, CMTimebase sourceTimebase) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -355,7 +345,6 @@ public double Rate { } } -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -511,7 +500,6 @@ public double Rate { return new CMClock (ptr, false); } -#endif [DllImport (Constants.CoreMediaLibrary)] extern static CMTime CMTimebaseGetTimeWithTimeScale (/* CMTimebaseRef */ IntPtr timebase, CMTimeScale timescale, CMTimeRoundingMethod method); @@ -620,7 +608,6 @@ public CMTimebaseError SetTimerToFireImmediately (NSTimer timer) [Deprecated (PlatformName.iOS, 8, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.WatchOS, 6, 0)] #endif [DllImport (Constants.CoreMediaLibrary)] extern static CMTimebaseError CMTimebaseSetMasterTimebase (/* CMTimebaseRef* */ IntPtr timebase, /* CMTimebaseRef* */ IntPtr newMasterTimebase); @@ -638,7 +625,6 @@ public CMTimebaseError SetTimerToFireImmediately (NSTimer timer) [Deprecated (PlatformName.iOS, 8, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.WatchOS, 6, 0)] #endif public CMTimebaseError SetMasterTimebase (CMTimebase newMasterTimebase) { @@ -661,7 +647,6 @@ public CMTimebaseError SetMasterTimebase (CMTimebase newMasterTimebase) [Deprecated (PlatformName.iOS, 8, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.WatchOS, 6, 0)] #endif [DllImport (Constants.CoreMediaLibrary)] extern static CMTimebaseError CMTimebaseSetMasterClock (/* CMTimebaseRef* */ IntPtr timebase, /* CMClockRef* */ IntPtr newMasterClock); @@ -679,7 +664,6 @@ public CMTimebaseError SetMasterTimebase (CMTimebase newMasterTimebase) [Deprecated (PlatformName.iOS, 8, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.WatchOS, 6, 0)] #endif public CMTimebaseError SetMasterClock (CMClock newMasterClock) { @@ -699,7 +683,7 @@ bool IsDeprecated () return SystemVersion.CheckiOS (9, 0); #elif MONOMAC return SystemVersion.CheckmacOS (10, 11); -#elif TVOS || WATCH +#elif TVOS return true; #endif } @@ -710,10 +694,8 @@ bool IsDeprecated () bool deprecated = IsDeprecated (); if (deprecated) ptr = CMTimebaseCopyMasterTimebase (Handle); -#if !WATCH else ptr = CMTimebaseGetMasterTimebase (Handle); -#endif if (ptr == IntPtr.Zero) return null; @@ -727,10 +709,8 @@ bool IsDeprecated () bool deprecated = IsDeprecated (); if (deprecated) ptr = CMTimebaseCopyMasterClock (Handle); -#if !WATCH else ptr = CMTimebaseGetMasterClock (Handle); -#endif if (ptr == IntPtr.Zero) return null; @@ -744,10 +724,8 @@ bool IsDeprecated () bool deprecated = IsDeprecated (); if (deprecated) ptr = CMTimebaseCopyMaster (Handle); -#if !WATCH else ptr = CMTimebaseGetMaster (Handle); -#endif if (ptr == IntPtr.Zero) return null; @@ -761,10 +739,8 @@ bool IsDeprecated () bool deprecated = IsDeprecated (); if (deprecated) ptr = CMTimebaseCopyUltimateMasterClock (Handle); -#if !WATCH else ptr = CMTimebaseGetUltimateMasterClock (Handle); -#endif if (ptr == IntPtr.Zero) return null; @@ -785,7 +761,6 @@ bool IsDeprecated () [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'CMTimebaseGetMasterTimebase' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'CMTimebaseGetMasterTimebase' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'CMTimebaseGetMasterTimebase' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'CMTimebaseGetMasterTimebase' instead.")] #endif [DllImport (Constants.CoreMediaLibrary)] static extern unsafe /* CMTimebaseRef */ IntPtr CMTimebaseCopyMasterTimebase (/* CMTimebaseRef */ IntPtr timebase); @@ -803,7 +778,6 @@ bool IsDeprecated () [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'CMTimebaseGetMasterClock' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'CMTimebaseGetMasterClock' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'CMTimebaseGetMasterClock' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'CMTimebaseGetMasterClock' instead.")] #endif [DllImport (Constants.CoreMediaLibrary)] static extern unsafe /* CMClockRef */ IntPtr CMTimebaseCopyMasterClock (/* CMTimebaseRef */ IntPtr timebase); @@ -821,7 +795,6 @@ bool IsDeprecated () [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'CMTimebaseGetMaster' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'CMTimebaseGetMaster' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'CMTimebaseGetMaster' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'CMTimebaseGetMaster' instead.")] #endif [DllImport (Constants.CoreMediaLibrary)] static extern unsafe IntPtr /* void* */ CMTimebaseCopyMaster (/* CMTimebaseRef */ IntPtr timebase); @@ -839,7 +812,6 @@ bool IsDeprecated () [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'CMTimebaseGetUltimateMasterClock' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'CMTimebaseGetUltimateMasterClock' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'CMTimebaseGetUltimateMasterClock' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'CMTimebaseGetUltimateMasterClock' instead.")] #endif [DllImport (Constants.CoreMediaLibrary)] static extern unsafe /* CMClockRef */ IntPtr CMTimebaseCopyUltimateMasterClock (/* CMTimebaseRef */ IntPtr timebase); @@ -859,8 +831,6 @@ bool IsDeprecated () [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMClockOrTimebase : NativeObject { #if !NET @@ -962,7 +932,6 @@ public static bool MightDrift (CMClockOrTimebase clockOrTimebaseA, CMClockOrTime [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -976,7 +945,6 @@ public static bool MightDrift (CMClockOrTimebase clockOrTimebaseA, CMClockOrTime [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -990,7 +958,6 @@ public static bool MightDrift (CMClockOrTimebase clockOrTimebaseA, CMClockOrTime [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -1011,7 +978,6 @@ public CMTimebase? SourceTimebase { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -1025,7 +991,6 @@ public CMTimebase? SourceTimebase { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -1039,7 +1004,6 @@ public CMTimebase? SourceTimebase { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -1060,7 +1024,6 @@ public CMClock? SourceClock { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -1074,7 +1037,6 @@ public CMClock? SourceClock { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/CoreMedia/CMTag.cs b/src/CoreMedia/CMTag.cs new file mode 100644 index 000000000000..e448ee067582 --- /dev/null +++ b/src/CoreMedia/CMTag.cs @@ -0,0 +1,318 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +using CoreFoundation; +using Foundation; +using ObjCRuntime; + +namespace CoreMedia { + /// A structure that is used to add additional data (tags) to a resource. + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] + public struct CMTag { +#if COREBUILD +#pragma warning disable CS0169 // The field 'CMTag.*' is never used + uint /* CMTagCategory */ category; + uint /* CMTagDataType */ dataType; + ulong /* CMTagValue */ value; +#pragma warning restore CS0169 +#else + CMTagCategory /* uint */ category; + CMTagDataType /* uint */ dataType; + ulong /* CMTagValue */ value; +#endif + +#if !COREBUILD + /// The category for this tag. + /// The category for this tag. + public CMTagCategory Category { + get => (CMTagCategory) category; + } + + /// The data type for this tag. + /// The data type for this tag. + public CMTagDataType DataType { + get => CMTagGetValueDataType (this); + } + + /// The raw 64-bit value of the data for this tag. + /// The raw 64-bit value of the data for this tag. + public ulong Value { + get => this.value; + } + + /// Checks if the tag is valid. + /// True if the tag is valid, false otherwise. + /// A tag is valid as long as DataType != CMTagDataType.Invalid. + public bool IsValid { + get => dataType != CMTagDataType.Invalid; + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern CMTagDataType CMTagGetValueDataType (CMTag tag); + + /// + public static CMTag Invalid { get => CMTagConstants.Invalid; } + + /// + public static CMTag MediaTypeVideo { get => CMTagConstants.MediaTypeVideo; } + + /// + public static CMTag MediaSubTypeMebx { get => CMTagConstants.MediaSubTypeMebx; } + + /// + public static CMTag MediaTypeAudio { get => CMTagConstants.MediaTypeAudio; } + + /// + public static CMTag MediaTypeMetadata { get => CMTagConstants.MediaTypeMetadata; } + + /// + public static CMTag StereoLeftEye { get => CMTagConstants.StereoLeftEye; } + + /// + public static CMTag StereoRightEye { get => CMTagConstants.StereoRightEye; } + + /// + public static CMTag StereoLeftAndRightEye { get => CMTagConstants.StereoLeftAndRightEye; } + + /// + public static CMTag StereoNone { get => CMTagConstants.StereoNone; } + + /// + public static CMTag StereoInterpretationOrderReversed { get => CMTagConstants.StereoInterpretationOrderReversed; } + + /// + public static CMTag ProjectionTypeRectangular { get => CMTagConstants.ProjectionTypeRectangular; } + + /// + public static CMTag ProjectionTypeEquirectangular { get => CMTagConstants.ProjectionTypeEquirectangular; } + + /// + public static CMTag ProjectionTypeHalfEquirectangular { get => CMTagConstants.ProjectionTypeHalfEquirectangular; } + + /// + public static CMTag ProjectionTypeFisheye { get => CMTagConstants.ProjectionTypeFisheye; } + + /// + public static CMTag PackingTypeNone { get => CMTagConstants.PackingTypeNone; } + + /// + public static CMTag PackingTypeSideBySide { get => CMTagConstants.PackingTypeSideBySide; } + + /// + public static CMTag PackingTypeOverUnder { get => CMTagConstants.PackingTypeOverUnder; } + + [DllImport (Constants.CoreMediaLibrary)] + static extern byte CMTagHasSInt64Value (CMTag tag); + + /// Checks whether the tag contains a signed 64-bit value. + /// True if the tag has a signed 64-bit value, false otherwise. + public bool HasInt64Value { + get => CMTagHasSInt64Value (this) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern long CMTagGetSInt64Value (CMTag tag); + + /// Gets the signed 64-bit value for this tag. + /// The signed 64-bit value for this tag. + /// The return value is undefined if the tag's data type isn't . + public long Int64Value { + get => CMTagGetSInt64Value (this); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern byte CMTagHasFloat64Value (CMTag tag); + + /// Checks whether the tag contains a 64-bit floating point value. + /// True if the tag has a 64-bit floating point value, false otherwise. + public bool HasFloat64Value { + get => CMTagHasFloat64Value (this) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern double CMTagGetFloat64Value (CMTag tag); + + /// Gets the 64-bit floating point value for this tag. + /// The 64-bit floating point value for this tag. + /// The return value is undefined if the tag's data type isn't . + public double Float64Value { + get => CMTagGetFloat64Value (this); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern byte CMTagHasOSTypeValue (CMTag tag); + + /// Checks whether the tag contains a 64-bit floating point value. + /// True if the tag has a 64-bit floating point value, false otherwise. + public bool HasOSTypeValue { + get => CMTagHasOSTypeValue (this) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern uint CMTagGetOSTypeValue (CMTag tag); + + /// Gets the OSType value for this tag. + /// The OSType value for this tag. + /// The return value is undefined if the tag's data type isn't . + public uint OSTypeValue { + get => CMTagGetOSTypeValue (this); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern byte CMTagHasFlagsValue (CMTag tag); + + /// Checks whether the tag contains a 64-bit floating point value. + /// True if the tag has a 64-bit floating point value, false otherwise. + public bool HasFlagsValue { + get => CMTagHasFlagsValue (this) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern ulong CMTagGetFlagsValue (CMTag tag); + + /// Gets the flags value for this tag. + /// The flags value for this tag. + /// The return value is undefined if the tag's data type isn't . + public ulong FlagsValue { + get => CMTagGetFlagsValue (this); + } + + + [DllImport (Constants.CoreMediaLibrary)] + static extern CMTag CMTagMakeWithSInt64Value (CMTagCategory category, long value); + + /// Create a new tag with the specified signed 64-bit value. + /// The category for the new tag. + /// The signed 64-bit value for the new tag. + /// A new tag with the specified tag and signed 64-bit value. + public static CMTag CreateWithSInt64Value (CMTagCategory category, long value) + { + return CMTagMakeWithSInt64Value (category, value); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern CMTag CMTagMakeWithFloat64Value (CMTagCategory category, double value); + + /// Create a new tag with the specified 64-bit floating point value. + /// The category for the new tag. + /// The 64-bit floating point value for the new tag. + /// A new tag with the specified tag and 64-bit floating point value. + public static CMTag CreateWithFloat64Value (CMTagCategory category, double value) + { + return CMTagMakeWithFloat64Value (category, value); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern CMTag CMTagMakeWithOSTypeValue (CMTagCategory category, uint value); + + /// Create a new tag with the specified OSType value. + /// The category for the new tag. + /// The OSType value for the new tag. + /// A new tag with the specified tag and OSType value. + public static CMTag CreateWithOSTypeValue (CMTagCategory category, uint osTypeValue) + { + return CMTagMakeWithOSTypeValue (category, osTypeValue); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern CMTag CMTagMakeWithFlagsValue (CMTagCategory category, ulong flagsForTag); + + /// Create a new tag with the specified flags. + /// The category for the new tag. + /// The flags for the new tag. + /// A new tag with the specified tag and flags. + public static CMTag CreateWithFlagsValue (CMTagCategory category, ulong flags) + { + return CMTagMakeWithFlagsValue (category, flags); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern byte CMTagEqualToTag (CMTag tag1, CMTag tag2); + + /// Checks if two tags are equal. + /// The first tag to compare for equality. + /// The second tag to compare for equality. + /// True if both tags are equal, false otherwise. + public static bool Equals (CMTag tag1, CMTag tag2) + { + return CMTagEqualToTag (tag1, tag2) != 0; + } + + /// + public override bool Equals (object? obj) + { + if (obj is CMTag tag) + return Equals (this, tag); + return false; + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern nint CMTagCompare (CMTag tag1, CMTag tag2); + + /// Compares two tags and returns a result suitable for ordering. + /// The first tag to compare. + /// The second tag to compare. + /// A value for the result of the comparison. + public static CFComparisonResult Compare (CMTag tag1, CMTag tag2) + { + return (CFComparisonResult) (long) CMTagCompare (tag1, tag2); + } + + [DllImport (Constants.CoreMediaLibrary)] + static extern nuint CMTagHash (CMTag tag); + + /// Gets a hash code for this tag. + /// A hash code for this tag. + public override int GetHashCode () + { + unchecked { + return (int) CMTagHash (this); + } + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static IntPtr /* CM_RETURNS_RETAINED CFStringRef */ CMTagCopyDescription ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + CMTag /* CMTag */ tag); + + /// Returns a description of the tag. + /// A description of the tag. + public override string? ToString () + { + var handle = CMTagCopyDescription (IntPtr.Zero, this); + return CFString.FromHandle (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static IntPtr /* CFDictionaryRef CM_NULLABLE */ CMTagCopyAsDictionary ( + CMTag /* CMTag */ tag, + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator); + + /// Serialize the tag to an instance. + /// An instance with the serialized tag if successful, or null in case of failure. + /// Deserialize the instance using . + public NSDictionary? ToDictionary () + { + var rv = CMTagCopyAsDictionary (this, IntPtr.Zero); + return Runtime.GetNSObject (rv, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTag CMTagMakeFromDictionary ( + IntPtr /* CFDictionaryRef CM_NONNULL */ dict); + + /// Deserialize a tag collection from the specified instance. + /// The instance of the data to use. + /// The deserialized tag, or in case of failure. + /// Create the instance using . + public static CMTag? Create (NSDictionary dictionary) + { + return CMTagMakeFromDictionary (dictionary.GetNonNullHandle (nameof (dictionary))); + } +#endif // COREBUILD + } +} diff --git a/src/CoreMedia/CMTagCollection.cs b/src/CoreMedia/CMTagCollection.cs new file mode 100644 index 000000000000..8f3a33c89080 --- /dev/null +++ b/src/CoreMedia/CMTagCollection.cs @@ -0,0 +1,773 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +using CoreFoundation; +using Foundation; +using ObjCRuntime; + +namespace CoreMedia { + /// A delegate that is used to iterate over a . + /// The tag to evaluate. + public delegate void CMTagCollectionApplyFunction (CMTag tag); + + /// A delegate that is used to filter when iterating over a . + /// The tag to evaluate. + /// True if the filter matches, false otherwise. + public delegate bool CMTagCollectionTagFilterFunction (CMTag tag); + + /// An unordered collection of zero or more values. + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] + public partial class CMTagCollection : NativeObject { +#if !COREBUILD + [Preserve (Conditional = true)] + internal CMTagCollection (NativeHandle handle, bool owns) + : base (handle, owns) + { + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static /* CFTypeID */ nint CMTagCollectionGetTypeID (); + + /// Get this type's CFTypeID. + public static nint GetTypeId () + { + return CMTagCollectionGetTypeID (); + } + + internal static CMTagCollection? Create (IntPtr handle, bool owns) + { + if (handle == IntPtr.Zero) + return null; + return new CMTagCollection (handle, owns); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreate ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + CMTag* /* const CMTag * CM_NULLABLE */ tags, + nint /* CMItemCount */ tagCount, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ newCollectionOut); + + /// Create a new tag collection for the specified tags. + /// An error code in case of failure, 0 in case of success. + /// The tags in the new tag collection. + /// A new tag collection with the specified tags, or null in case of failure. + public static CMTagCollection? Create (out CMTagCollectionError status, params CMTag [] tags) + { + IntPtr handle; + unsafe { + fixed (CMTag* tagPointer = tags) { + status = CMTagCollectionCreate (IntPtr.Zero, tagPointer, tags?.Length ?? 0, &handle); + } + } + return Create (handle, true); + } + + /// Create a new tag collection for the specified tags. + /// The tags in the new tag collection. + /// A new tag collection with the specified tags, or null in case of failure. + public static CMTagCollection? Create (params CMTag [] tags) + { + return Create (out var _, tags); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateMutable ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + nint /* CFIndex */ capacity, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMMutableTagCollectionRef CM_NULLABLE * CM_NONNULL */ newMutableCollectionOut); + + /// Create a mutable tag collection with the specified maximum capacity. + /// The maximum capacity for the new collection, or 0 to have an unlimited capacity. + /// An error code in case of failure, 0 in case of success. + /// A mutable tag collection with the specified maximum capacity. + public static CMTagCollection? CreateMutable (nint capacity, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateMutable (IntPtr.Zero, capacity, &handle); + } + return Create (handle, true); + } + + /// Create a mutable tag collection with an unlimited capacity. + /// An error code in case of failure, 0 in case of success. + /// A mutable tag collection with an unlimited capacity. + public static CMTagCollection? CreateMutable (out CMTagCollectionError status) + { + return CreateMutable (0, out status); + } + + /// Create a mutable tag collection with an unlimited capacity. + /// A mutable tag collection with an unlimited capacity. + public static CMTagCollection? CreateMutable () + { + return CreateMutable (0, out var _); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateCopy ( + IntPtr /* CMTagCollectionRef */ tagCollection, + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ newCollectionCopyOut); + + /// Create a copy of this tag collection. + /// An error code in case of failure, 0 in case of success. + /// A copy of this tag collection. + public CMTagCollection? Copy (out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateCopy (GetCheckedHandle (), IntPtr.Zero, &handle); + } + return Create (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateMutableCopy ( + IntPtr /* CMTagCollectionRef */ tagCollection, + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ newCollectionCopyOut); + + /// Create a copy of this tag collection. + /// An error code in case of failure, 0 in case of success. + /// A copy of this tag collection. + public CMTagCollection? CreateMutableCopy (out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateMutableCopy (GetCheckedHandle (), IntPtr.Zero, &handle); + } + return Create (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static IntPtr /* CM_RETURNS_RETAINED CFStringRef */ CMTagCollectionCopyDescription ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr /* CMTagCollectionRef */ tagCollection); + + /// Returns a description of the tag collection. + /// A description of the tag collection. + public override string? ToString () + { + if (Handle == IntPtr.Zero) + return null; + IntPtr handle = CMTagCollectionCopyDescription (IntPtr.Zero, this.GetHandle ()); + return CFString.FromHandle (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static nint /* CMItemCount */ CMTagCollectionGetCount ( + IntPtr /* CMTagCollectionRef */ tagCollection); + + /// Get the number of tags in this tag collection. + /// The number of tags in this tag collection. + public nint Count { + get => CMTagCollectionGetCount (GetCheckedHandle ()); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static byte /* Boolean */ CMTagCollectionContainsTag ( + IntPtr /* CMTagCollectionRef */ tagCollection, + CMTag tag); + + /// Checks if this tag collection contains the specified tag. + /// The tag to check for. + /// True if the tag collection contains the specified tag, false otherwise. + public bool ContainsTag (CMTag tag) + { + return CMTagCollectionContainsTag (GetCheckedHandle (), tag) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static byte /* Boolean */ CMTagCollectionContainsTagsOfCollection ( + IntPtr /* CMTagCollectionRef */ tagCollection, + IntPtr /* CMTagCollectionRef CM_NONNULL */ containedTagCollection); + + /// Checks if all the tags in another tag collection is contained in this tag collection. + /// The other tag collection whose tags should be checked for. + /// True if this tag collection contains all the tags in , false otherwise. + public bool ContainsTagCollection (CMTagCollection tagCollection) + { + return CMTagCollectionContainsTagsOfCollection (GetCheckedHandle (), tagCollection.GetNonNullHandle (nameof (tagCollection))) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static byte /* Boolean */ CMTagCollectionContainsSpecifiedTags ( + IntPtr /* CMTagCollectionRef */ tagCollection, + CMTag* /* const CMTag * CM_NONNULL */ containedTags, + nint /* CMItemCount */ containedTagCount); + + /// Checks if this tag collection contains all the specified tags. + /// The tags to check for. + /// True if the tag collection contains all the specified tags, false otherwise. + public bool ContainsTags (params CMTag [] tags) + { + if (tags is null) + ThrowHelper.ThrowArgumentNullException (nameof (tags)); + + unsafe { + fixed (CMTag* tagPtr = tags) + return CMTagCollectionContainsSpecifiedTags (GetCheckedHandle (), tagPtr, tags.Length) != 0; + } + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static byte /* Boolean */ CMTagCollectionContainsCategory ( + IntPtr /* CMTagCollectionRef */ tagCollection, + CMTagCategory category); + + /// Checks if this tag collection contains any tags with the specified tag category. + /// The tag category to check for. + /// True if the tag collection contains any tags with the specified tag category, false otherwise. + public bool ContainsCategory (CMTagCategory category) + { + return CMTagCollectionContainsCategory (GetCheckedHandle (), category) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static nint /* CMItemCount */ CMTagCollectionGetCountOfCategory ( + IntPtr /* CMTagCollectionRef */ tagCollection, + CMTagCategory category); + + /// Count the number of tags that contain the specified tag category. + /// The tag category to check for. + /// The number of tags that contain the specified tag category. + public nint GetCount (CMTagCategory category) + { + return CMTagCollectionGetCountOfCategory (GetCheckedHandle (), category); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionGetTags ( + IntPtr /* CMTagCollectionRef */ tagCollection, + CMTag* /* CMTag * CM_NONNULL */ tagBuffer, + nint /* CMItemCount */ tagBufferCount, + nint* /* CMItemCount * CM_NULLABLE */ numberOfTagsCopied); + + /// Get all the tags in the current tag collection. + /// All the tags in the current tag collection, or null in case of failure. + public CMTag []? Tags { + get => GetTags (out var _); + } + + /// Get all the tags in the current tag collection. + /// An error code in case of failure, 0 in case of success. + /// All the tags in the current tag collection, or null case of failure (and will contain an error code). + public CMTag []? GetTags (out CMTagCollectionError status) + { + var array = new CMTag [Count]; + status = GetTags (array, array.Length, out var _); + if (status != 0) + return null; + return array; + } + + /// Get all the tags in the current tag collection. + /// The array where the tags will be copied to. + /// The number of tags to copy. + /// The number of tags copied. + /// An error code in case of failure, 0 in case of success. is returned if the array isn't big enough for all the tags (but as many tags as the array could hold were copied to the array). + public CMTagCollectionError GetTags (CMTag [] tags, nint tagCount, out nint tagsCopied) + { + if (tags is null) + ThrowHelper.ThrowArgumentNullException (nameof (tags)); + + if (tagCount > tags.Length || tagCount < 0) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (tagCount), "Must not be higher than the length of the 'tags' array."); + + tagsCopied = 0; + + unsafe { + fixed (CMTag* tagPtr = tags) + return CMTagCollectionGetTags (GetCheckedHandle (), tagPtr, tagCount, (nint*) Unsafe.AsPointer (ref tagsCopied)); + } + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionGetTagsWithCategory ( + IntPtr /* CMTagCollectionRef */ tagCollection, + CMTagCategory category, + CMTag* /* CMTag * CM_NONNULL */ tagBuffer, + nint /* CMItemCount */ tagBufferCount, + nint* /* CMItemCount * CM_NULLABLE */ numberOfTagsCopied); + + /// Get all the tags in the current tag collection with the specified category. + /// The category of the tags to find. + /// An error code in case of failure, 0 in case of success. + /// All the tags in the current tag collection with the specified category, or null case of failure (and will contain an error code). + public CMTag []? GetTags (CMTagCategory category, out CMTagCollectionError status) + { + var array = new CMTag [GetCount (category)]; + status = GetTags (category, array, array.Length, out var _); + if (status != 0) + return null; + return array; + } + + /// Get all the tags in the current tag collection with the specified category. + /// The category of the tags to find. + /// The array where the tags will be copied to. + /// The number of tags to copy. + /// The number of tags copied. + /// An error code in case of failure, 0 in case of success. is returned if the array isn't big enough for all the tags (but as many tags as the array could hold were copied to the array). + public CMTagCollectionError GetTags (CMTagCategory category, CMTag [] tags, nint tagCount, out nint tagsCopied) + { + if (tags is null) + ThrowHelper.ThrowArgumentNullException (nameof (tags)); + + if (tagCount > tags.Length || tagCount < 0) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (tagCount), "Must not be higher than the length of the 'tags' array."); + + tagsCopied = 0; + + unsafe { + fixed (CMTag* tagPtr = tags) + return CMTagCollectionGetTagsWithCategory (GetCheckedHandle (), category, tagPtr, tagCount, (nint*) Unsafe.AsPointer (ref tagsCopied)); + } + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static nint /* CMItemCount */ CMTagCollectionCountTagsWithFilterFunction ( + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection, + delegate* unmanaged filterApplier, + IntPtr /* void * CM_NULLABLE */ context); + + [UnmanagedCallersOnly] + // Return type should be 'byte', but the interpreter does the wrong thing: https://github.com/dotnet/runtime/issues/110649 */ + static nint CMTagCollectionTagFilterFunction_Callback (CMTag tag, IntPtr context) + { + var callback = (CMTagCollectionTagFilterFunction) GCHandle.FromIntPtr (context).Target!; + var rv = callback (tag); + return rv.AsByte (); + } + + /// Count the number of tags that matches the specified filter. + /// The callback to call for each tag. + /// The number of tags that matches the specified filter. + public nint GetCount (CMTagCollectionTagFilterFunction filter) + { + var gchandle = GCHandle.Alloc (filter); + nint rv; + unsafe { + rv = CMTagCollectionCountTagsWithFilterFunction (GetCheckedHandle (), &CMTagCollectionTagFilterFunction_Callback, GCHandle.ToIntPtr (gchandle)); + } + gchandle.Free (); + return rv; + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionGetTagsWithFilterFunction ( + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection, + CMTag* /* CMTag * CM_NONNULL */ tagBuffer, + nint /* CMItemCount */ tagBufferCount, + nint* /* CMItemCount * CM_NULLABLE */ numberOfTagsCopied, + delegate* unmanaged filter, + IntPtr /* void * CM_NULLABLE */ context); + + + /// Count the number of tags that matches the specified filter. + /// The callback to call for each tag. + /// The number of tags that matches the specified filter. + /// This will call the function twice for each tag, once to count them, once again to return them. + public CMTag []? GetTags (CMTagCollectionTagFilterFunction filter) + { + var array = new CMTag [GetCount (filter)]; + var status = GetTags (filter, array, array.Length, out var _); + if (status != 0) + return null; + return array; + } + + /// Get all the tags in the current tag collection that matches the specified filter. + /// The filter to call for each tag. + /// The array where the tags will be copied to. + /// The number of tags to copy. + /// The number of tags copied. + /// An error code in case of failure, 0 in case of success. is returned if the array isn't big enough for all the tags (but as many tags as the array could hold were copied to the array). + public CMTagCollectionError GetTags (CMTagCollectionTagFilterFunction filter, CMTag [] tags, nint tagCount, out nint tagsCopied) + { + if (filter is null) + ThrowHelper.ThrowArgumentNullException (nameof (filter)); + + if (tags is null) + ThrowHelper.ThrowArgumentNullException (nameof (tags)); + + if (tagCount > tags.Length || tagCount < 0) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (tagCount), "Must not be higher than the length of the 'tags' array."); + + tagsCopied = 0; + + var gchandle = GCHandle.Alloc (filter); + CMTagCollectionError rv; + unsafe { + fixed (CMTag* tagPtr = tags) { + rv = CMTagCollectionGetTagsWithFilterFunction ( + GetCheckedHandle (), + tagPtr, + tagCount, + (nint*) Unsafe.AsPointer (ref tagsCopied), + &CMTagCollectionTagFilterFunction_Callback, + GCHandle.ToIntPtr (gchandle)); + } + } + gchandle.Free (); + return rv; + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCopyTagsOfCategories ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection, + CMTagCategory* /* CMTagCategory * CM_NONNULL */ categories, + nint /* CMItemCount */ categoriesCount, + IntPtr* /* M_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ collectionWithTagsOfCategories); + + /// Create a copy of this tag collection, copying all tags that match the specified categories. + /// The categories to match. + /// An error code in case of failure, 0 in case of success. + /// A new tag collection, with all the tags matching the specified categories from this tag collection, or null in case of failure. + public CMTagCollection? CreateWithCopyOfTags (out CMTagCollectionError status, params CMTagCategory [] categories) + { + if (categories is null) + ThrowHelper.ThrowArgumentNullException (nameof (categories)); + + IntPtr handle; + unsafe { + fixed (CMTagCategory* categoriesPtr = categories) { + status = CMTagCollectionCopyTagsOfCategories (IntPtr.Zero, GetCheckedHandle (), categoriesPtr, categories.Length, &handle); + } + } + return Create (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static void CMTagCollectionApply ( + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection, + delegate* unmanaged /* CMTagCollectionApplyFunction */ applier, + IntPtr /* void * CM_NULLABLE */ context); + + [UnmanagedCallersOnly] + static void CMTagCollectionApplyFunction_Callback (CMTag tag, IntPtr context) + { + var callback = (CMTagCollectionApplyFunction) GCHandle.FromIntPtr (context).Target!; + callback (tag); + } + + /// Iterate over all the tags in this tag collection, calling the provided callback function. + /// The callback function to call for each tag in this tag collection. + public void Apply (CMTagCollectionApplyFunction callback) + { + var gchandle = GCHandle.Alloc (callback); + unsafe { + CMTagCollectionApply (GetCheckedHandle (), &CMTagCollectionApplyFunction_Callback, GCHandle.ToIntPtr (gchandle)); + } + gchandle.Free (); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTag /* CMTag */ CMTagCollectionApplyUntil ( + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection, + delegate* unmanaged /* CMTagCollectionTagFilterFunction */ applier, + IntPtr /* void * CM_NULLABLE */ context); + + /// Iterate over all the tags in this tag collection, calling the provided callback function until the callback returns true. + /// The callback function to call for each tag in this tag collection (until the function returns true). + /// The tag that made the callback return true, or if the callback function never returned true. + public CMTag ApplyUntil (CMTagCollectionTagFilterFunction callback) + { + var gchandle = GCHandle.Alloc (callback); + CMTag rv; + unsafe { + rv = CMTagCollectionApplyUntil (GetCheckedHandle (), &CMTagCollectionTagFilterFunction_Callback, GCHandle.ToIntPtr (gchandle)); + } + gchandle.Free (); + return rv; + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static byte /* Boolean */ CMTagCollectionIsEmpty ( + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection); + + /// Returns true if the tag collection is empty. + /// True if the tag collection is empty. + /// This is equivalent to checking if Count is 0. + public bool IsEmpty { + get => CMTagCollectionIsEmpty (GetCheckedHandle ()) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateIntersection ( + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection1, + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection2, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ tagCollection); + + /// Create a new tag collection with the intersection of the tags from two other tag collections. + /// The first tag collection to get tags from. + /// The second tag collection to get tags from. + /// An error code in case of failure, 0 in case of success. + /// The intersection of all the tags from the first and the second tag collections. + public static CMTagCollection? Intersect (CMTagCollection? collection1, CMTagCollection? collection2, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateIntersection (collection1.GetHandle (), collection2.GetHandle (), &handle); + } + return Create (handle, true); + } + + /// Create a new tag collection with the intersection of the tags from this tag collection and another tag collection. + /// The other tag collection to get tags from. + /// An error code in case of failure, 0 in case of success. + /// The intersection of all the tags from this tag collection and the other tag collection. + public CMTagCollection? Intersect (CMTagCollection? collection, out CMTagCollectionError status) + { + return Intersect (this, collection, out status); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateUnion ( + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection1, + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection2, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ tagCollection); + + /// Create a new tag collection with the union of the tags from two other tag collections. + /// The first tag collection to get tags from. + /// The second tag collection to get tags from. + /// An error code in case of failure, 0 in case of success. + /// The union of all the tags from the first and the second tag collections. + public static CMTagCollection? Union (CMTagCollection? collection1, CMTagCollection? collection2, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateUnion (collection1.GetHandle (), collection2.GetHandle (), &handle); + } + return Create (handle, true); + } + + /// Create a new tag collection with the union of the tags from this tag collection and another tag collection. + /// The other tag collection to get tags from. + /// An error code in case of failure, 0 in case of success. + /// The union of all the tags from this tag collection and the other tag collection. + public CMTagCollection? Union (CMTagCollection? collection, out CMTagCollectionError status) + { + return Union (this, collection, out status); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateDifference ( + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection1, + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection2, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ tagCollection); + + /// Create a new tag collection with the all the tags from the first tag collection that are not in the second tag collections. + /// The tag collection to get tags from. + /// The tag collection whose tags not to include. + /// An error code in case of failure, 0 in case of success. + /// All the tags from the first tag collection, except any tags in the second tag collection. + public static CMTagCollection? Subtract (CMTagCollection? collection1, CMTagCollection? collection2, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateDifference (collection1.GetHandle (), collection2.GetHandle (), &handle); + } + return Create (handle, true); + } + + /// Create a new tag collection with all the tags from the current tag collection that are not in the specified tag collection. + /// The tags not to include. + /// An error code in case of failure, 0 in case of success. + /// All the tags from the current tag collection, except any tags in the specified tag collection. + public CMTagCollection? Subtract (CMTagCollection? collection, out CMTagCollectionError status) + { + return Subtract (this, collection, out status); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateExclusiveOr ( + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection1, + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection2, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ tagCollection); + + /// Create a new tag collection with the all the tags from the specified tag collections, except those tags in both collections. + /// The first tag collection to get tags from. + /// The second tag collection to get tags from. + /// An error code in case of failure, 0 in case of success. + /// All the tags from both tag collection, except those tags in both collections. + public static CMTagCollection? ExclusiveOr (CMTagCollection? collection1, CMTagCollection? collection2, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateExclusiveOr (collection1.GetHandle (), collection2.GetHandle (), &handle); + } + return Create (handle, true); + } + + /// Create a new tag collection with all the tags from the current tag collection and the tags from the specified tag collection, except those tags in both tag collections. + /// The other tag collection to get tags from. + /// An error code in case of failure, 0 in case of success. + /// All the tags from both tag collection, except those tags in both collections. + public CMTagCollection? ExclusiveOr (CMTagCollection? collection, out CMTagCollectionError status) + { + return ExclusiveOr (this, collection, out status); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionAddTag ( + IntPtr /* CMMutableTagCollectionRef CM_NULLABLE */ tagCollection, + CMTag /* CMTag */ tagToAdd); + + /// Add a tag to the current tag collection. + /// The tag to add. + /// An error code in case of failure, 0 in case of success. + /// The tag is not added if the tag collection already contains it. + public CMTagCollectionError Add (CMTag tag) + { + return CMTagCollectionAddTag (GetCheckedHandle (), tag); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionRemoveTag ( + IntPtr /* CMMutableTagCollectionRef CM_NULLABLE */ tagCollection, + CMTag /* CMTag */ tagToRemove); + + /// Remove a tag from the current tag collection. + /// The tag to remove. + /// An error code in case of failure, 0 in case of success. + /// If the tag doesn't exist, the returned value will be . + public CMTagCollectionError Remove (CMTag tag) + { + return CMTagCollectionRemoveTag (GetCheckedHandle (), tag); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionRemoveAllTags ( + IntPtr /* CMMutableTagCollectionRef CM_NULLABLE */ tagCollection); + + /// Remove all the tags from the current tag collection. + /// An error code in case of failure, 0 in case of success. + public CMTagCollectionError RemoveAllTags () + { + return CMTagCollectionRemoveAllTags (GetCheckedHandle ()); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionRemoveAllTagsOfCategory ( + IntPtr /* CMMutableTagCollectionRef CM_NULLABLE */ tagCollection, + CMTagCategory /* CMTagCategory */ category); + + /// Remove all the tags from the current tag collection with the specified category. + /// The category of tags to remove. + /// An error code in case of failure, 0 in case of success. + public CMTagCollectionError RemoveAllTags (CMTagCategory category) + { + return CMTagCollectionRemoveAllTagsOfCategory (GetCheckedHandle (), category); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionAddTagsFromCollection ( + IntPtr /* CMMutableTagCollectionRef CM_NULLABLE */ tagCollection, + IntPtr /* CMTagCollectionRef CM_NONNULL */ collectionWithTagsToAdd); + + /// Add all the tags from the specified tag collection to this tag collection. + /// The tag collection whose tags tags to add. + /// An error code in case of failure, 0 in case of success. + public CMTagCollectionError Add (CMTagCollection collection) + { + return CMTagCollectionAddTagsFromCollection (GetCheckedHandle (), collection.GetNonNullHandle (nameof (collection))); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionAddTagsFromArray ( + IntPtr /* CMMutableTagCollectionRef CM_NULLABLE */ tagCollection, + CMTag* /* CMTag * CM_NONNULL */ tags, + nint /* CMItemCount */ tagCount); + + /// Add all the specified tags this tag collection. + /// The tags to add. + /// An error code in case of failure, 0 in case of success. + public CMTagCollectionError Add (params CMTag [] tags) + { + if (tags is null) + ThrowHelper.ThrowArgumentNullException (nameof (tags)); + + unsafe { + fixed (CMTag* tagPtr = tags) + return CMTagCollectionAddTagsFromArray (GetCheckedHandle (), tagPtr, tags.Length); + } + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static IntPtr /* CM_RETURNS_RETAINED CFDictionaryRef CM_NULLABLE */ CMTagCollectionCopyAsDictionary ( + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection, + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator); + + /// Serialize the tag collection to an instance. + /// An instance with the serialized tag collection if successful, or null in case of failure. + /// Deserialize the instance using . + public NSDictionary? ToDictionary () + { + var rv = CMTagCollectionCopyAsDictionary (GetCheckedHandle (), IntPtr.Zero); + return Runtime.GetNSObject (rv, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateFromDictionary ( + IntPtr /* CFDictionaryRef CM_NONNULL */ dict, + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ newCollection); + + /// Deserialize a tag collection from the specified instance. + /// The instance of the data to use. + /// An error code in case of failure, 0 in case of success. + /// A new tag collection if successful, null in case of failure. + /// Create the instance using . + public static CMTagCollection? Create (NSDictionary dictionary, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateFromDictionary (dictionary.GetNonNullHandle (nameof (dictionary)), IntPtr.Zero, &handle); + } + return Create (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static IntPtr /* CM_RETURNS_RETAINED CFDataRef CM_NULLABLE */ CMTagCollectionCopyAsData ( + IntPtr /* CMTagCollectionRef CM_NULLABLE */ tagCollection, + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator); + + /// Serialize the tag collection to an instance. + /// An instance with the serialized tag collection if successful, or null in case of failure. + /// Deserialize the instance using . + public NSData? ToData () + { + var rv = CMTagCollectionCopyAsData (GetCheckedHandle (), IntPtr.Zero); + return Runtime.GetNSObject (rv, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTagCollectionError /* OSStatus */ CMTagCollectionCreateFromData ( + IntPtr /* CFDataRef CM_NONNULL */ dict, + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTagCollectionRef CM_NULLABLE * CM_NONNULL */ newCollection); + + /// Deserialize a tag collection from the specified instance. + /// The instance of the data to use. + /// An error code in case of failure, 0 in case of success. + /// A new tag collection if successful, null in case of failure. + /// Create the instance using . + public static CMTagCollection? Create (NSData data, out CMTagCollectionError status) + { + IntPtr handle; + unsafe { + status = CMTagCollectionCreateFromData (data.GetNonNullHandle (nameof (data)), IntPtr.Zero, &handle); + } + return Create (handle, true); + } +#endif // COREBUILD + } +} diff --git a/src/CoreMedia/CMTaggedBufferGroup.cs b/src/CoreMedia/CMTaggedBufferGroup.cs new file mode 100644 index 000000000000..1e0cd813cd2e --- /dev/null +++ b/src/CoreMedia/CMTaggedBufferGroup.cs @@ -0,0 +1,346 @@ +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; + +using CoreFoundation; +using CoreVideo; +using Foundation; +using ObjCRuntime; + +namespace CoreMedia { + /// This class contains a list of pixel buffers or sample buffers, where each buffer is associated with a . + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] + public class CMTaggedBufferGroup : NativeObject { +#if !COREBUILD + [Preserve (Conditional = true)] + internal CMTaggedBufferGroup (NativeHandle handle, bool owns) + : base (handle, owns) + { + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static /* CFTypeID */ nint CMTaggedBufferGroupGetTypeID (); + + /// Get this type's CFTypeID. + public static nint GetTypeId () + { + return CMTaggedBufferGroupGetTypeID (); + } + + internal static CMTaggedBufferGroup? Create (IntPtr handle, bool owns) + { + if (handle == IntPtr.Zero) + return null; + return new CMTaggedBufferGroup (handle, owns); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTaggedBufferGroupError /* OSStatus */ CMTaggedBufferGroupCreate ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr /* CFArrayRef CM_NONNULL */ tagCollections, + IntPtr /* CFArrayRef CM_NONNULL */ buffers, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTaggedBufferGroupRef CM_NULLABLE * CM_NONNULL */ group + ); + + /// Create a new instance. + /// An array of for this buffer group. + /// An array of pixel buffers. + /// An error code in case of failure, 0 in case of success. + /// A newly created instance if successful, otherwise null (and will contain an error code). + public static CMTaggedBufferGroup? Create (CMTagCollection [] tagCollections, CVPixelBuffer [] buffers, out CMTaggedBufferGroupError status) + { + return Create (tagCollections, (NativeObject []) buffers, out status); + } + + /// Create a new instance. + /// An array of for this buffer group. + /// An array of sample buffers. + /// An error code in case of failure, 0 in case of success. + /// A newly created instance if successful, otherwise null (and will contain an error code). + public static CMTaggedBufferGroup? Create (CMTagCollection [] tagCollections, CMSampleBuffer [] buffers, out CMTaggedBufferGroupError status) + { + return Create (tagCollections, (NativeObject []) buffers, out status); + } + + /// Create a new instance. + /// An array of for this buffer group. + /// An array of buffers, either or . + /// An error code in case of failure, 0 in case of success. + /// A newly created instance if successful, otherwise null (and will contain an error code). + public static CMTaggedBufferGroup? Create (CMTagCollection [] tagCollections, NativeObject [] buffers, out CMTaggedBufferGroupError status) + { + IntPtr handle; + + if (tagCollections is null) + ThrowHelper.ThrowArgumentNullException (nameof (tagCollections)); + + if (buffers is null) + ThrowHelper.ThrowArgumentNullException (nameof (buffers)); + + if (tagCollections.Length != buffers.Length) + throw new ArgumentException ($"The '{nameof (tagCollections)}' and '{nameof (buffers)}' arrays must both have the same number of elements."); + + for (var i = 0; i < buffers.Length; i++) { + if (buffers [i] is CMSampleBuffer || buffers [i] is CVPixelBuffer) + continue; + throw new ArgumentException (string.Format ($"The '{nameof (buffers)}' array must be an array of CMSampleBuffer or CVPixelBuffer. The object at index {{0}} is of type '{{1}}'", i, buffers [i]?.GetType ()), nameof (buffers)); + } + + using var tagCollectionsArray = CFArray.FromNullableNativeObjects (tagCollections); + using var buffersArray = CFArray.FromNullableNativeObjects (buffers); + unsafe { + status = CMTaggedBufferGroupCreate (IntPtr.Zero, tagCollectionsArray.GetHandle (), buffersArray.GetHandle (), &handle); + } + return Create (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTaggedBufferGroupError /* OSStatus */ CMTaggedBufferGroupCreateCombined ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr /* CFArrayRef CM_NONNULL */ taggedBufferGroups, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTaggedBufferGroupRef CM_NULLABLE * CM_NONNULL */ groupOut); + + /// Create a new by combining other tagged buffer groups. + /// An error code in case of failure, 0 in case of success. + /// The group of instances to combine. + /// A newly created instance if successful, otherwise null (and will contain an error code). + public static CMTaggedBufferGroup? Combine (out CMTaggedBufferGroupError status, params CMTaggedBufferGroup [] groups) + { + IntPtr handle; + + using var groupsArray = CFArray.FromNativeObjects (groups); + unsafe { + status = CMTaggedBufferGroupCreateCombined (IntPtr.Zero, groupsArray.GetHandle (), &handle); + } + return Create (handle, true); + } + + /// Create a new by combining other tagged buffer groups. + /// The group of instances to combine. + /// A newly created instance if successful, otherwise null. + public static CMTaggedBufferGroup? Combine (params CMTaggedBufferGroup [] groups) + { + return Combine (out var _, groups); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static nint /* CMItemCount */ CMTaggedBufferGroupGetCount ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group); + + /// Get the number of buffers in this tagged buffer group. + /// The number of buffers in this tagged buffer group. + public nint Count { + get { + return CMTaggedBufferGroupGetCount (GetCheckedHandle ()); + } + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static IntPtr /* CMTagCollectionRef CF_RETURNS_NOT_RETAINED CM_NULLABLE */ CMTaggedBufferGroupGetTagCollectionAtIndex ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + nint /* CFIndex */ index); + + /// Get the tag collection at the specified index. + /// The 0-based index of the tag collection to get. + /// The tag collection at the specified index, or null in case of failure. + public CMTagCollection? GetTagCollection (nint index) + { + if (index < 0) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (index), "Must be 0 or higher"); + if (index >= Count) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (index), "Must be less than Count"); + var rv = CMTaggedBufferGroupGetTagCollectionAtIndex (GetCheckedHandle (), index); + return CMTagCollection.Create (rv, false); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static IntPtr /* CVPixelBufferRef CF_RETURNS_NOT_RETAINED CM_NULLABLE */ CMTaggedBufferGroupGetCVPixelBufferAtIndex ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + nint /* CFIndex */ index); + + /// Get the pixel buffer at the specified index. + /// The 0-based index of the pixel buffer to get. + /// The pixel buffer at the specified index, or null in case of failure (including if the buffer at the specified index is not a ). + public CVPixelBuffer? GetPixelBuffer (nint index) + { + if (index < 0) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (index), "Must be 0 or higher"); + if (index >= Count) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (index), "Must be less than Count"); + var rv = CMTaggedBufferGroupGetCVPixelBufferAtIndex (GetCheckedHandle (), index); + return CVPixelBuffer.Create (rv, false); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static IntPtr /* CVPixelBufferRef CF_RETURNS_NOT_RETAINED CM_NULLABLE */ CMTaggedBufferGroupGetCVPixelBufferForTag ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + CMTag tag, + nint* /* CFIndex* */ index); + + /// Get the pixel buffer matching the specified tag. + /// The tag to search for. The search will fail if the tag is found in more than one buffer's tag collection. + /// The index of the matching pixel buffer. + /// The matching pixel buffer, or null in case of failure (including if the buffer at the specified index is not a ). + public unsafe CVPixelBuffer? GetPixelBuffer (CMTag tag, out nint index) + { + index = 0; + var rv = CMTaggedBufferGroupGetCVPixelBufferForTag (GetCheckedHandle (), tag, (nint*) Unsafe.AsPointer (ref index)); + return CVPixelBuffer.Create (rv, false); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static IntPtr /* CVPixelBufferRef CF_RETURNS_NOT_RETAINED CM_NULLABLE */ CMTaggedBufferGroupGetCVPixelBufferForTagCollection ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection, + IntPtr* /* CFIndex* */ index); + + /// Get the pixel buffer matching the specified tag collection. + /// The tag collection to match. The search will fail if the tag collection is found in more than one pixel buffer. + /// The index of the matching pixel buffer. + /// The matching pixel buffer, or null in case of failure (including if the buffer at the specified index is not a ). + public unsafe CVPixelBuffer? GetPixelBuffer (CMTagCollection tagCollection, out nint index) + { + index = 0; + var rv = CMTaggedBufferGroupGetCVPixelBufferForTagCollection (GetCheckedHandle (), tagCollection.GetCheckedHandle (), (nint*) Unsafe.AsPointer (ref index)); + return CVPixelBuffer.Create (rv, false); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static IntPtr /* CMSampleBufferRef CF_RETURNS_NOT_RETAINED CM_NULLABLE */ CMTaggedBufferGroupGetCMSampleBufferAtIndex ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + nint /* CFIndex */ index); + + /// Get the sample buffer at the specified index. + /// The 0-based index of the sample buffer to get. + /// The sample buffer at the specified index, or null in case of failure (including if the buffer at the specified index is not a ). + public CMSampleBuffer? GetSampleBuffer (nint index) + { + if (index < 0) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (index), "Must be 0 or higher"); + if (index >= Count) + ThrowHelper.ThrowArgumentOutOfRangeException (nameof (index), "Must be less than Count"); + var rv = CMTaggedBufferGroupGetCMSampleBufferAtIndex (GetCheckedHandle (), index); + return CMSampleBuffer.Create (rv, false); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static IntPtr /* CMSampleBufferRef CF_RETURNS_NOT_RETAINED CM_NULLABLE */ CMTaggedBufferGroupGetCMSampleBufferForTag ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + CMTag tag, + nint* /* CFIndex* */ index); + + /// Get the sample buffer at the specified index. + /// The tag to search for. The search will fail if the tag is found in more than one buffer's tag collection. + /// The index of the matching sample buffer. + /// The matching sample buffer, or null in case of failure (including if the buffer at the specified index is not a ). + public unsafe CMSampleBuffer? GetSampleBuffer (CMTag tag, out nint index) + { + index = 0; + var rv = CMTaggedBufferGroupGetCMSampleBufferForTag (GetCheckedHandle (), tag, (nint*) Unsafe.AsPointer (ref index)); + return CMSampleBuffer.Create (rv, false); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static IntPtr /* CMSampleBufferRef CF_RETURNS_NOT_RETAINED CM_NULLABLE */ CMTaggedBufferGroupGetCMSampleBufferForTagCollection ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection, + IntPtr* /* CFIndex* */ index); + + /// Get the sample buffer matching the specified tag collection. + /// The tag collection to match. The search will fail if the tag collection is found in more than one sample buffer. + /// The index of the matching sample buffer. + /// The matching sample buffer, or null in case of failure (including if the buffer at the specified index is not a ). + public unsafe CMSampleBuffer? GetSampleBuffer (CMTagCollection tagCollection, out nint index) + { + index = 0; + var rv = CMTaggedBufferGroupGetCMSampleBufferForTagCollection (GetCheckedHandle (), tagCollection.GetCheckedHandle (), (nint*) Unsafe.AsPointer (ref index)); + return CMSampleBuffer.Create (rv, false); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static nint /* CMItemCount */ CMTaggedBufferGroupGetNumberOfMatchesForTagCollection ( + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ group, + IntPtr /* CMTagCollectionRef CM_NONNULL */ tagCollection); + + /// Calculate the number of times a tag collection matches in this tagged buffer group. + /// The tag collection to use for the calculation. + /// The number of times a tag collection matches in this tagged buffer group. + /// Buffer lookups using a tag collection will fail unless there's exactly one match for the tag collection. + public nint GetNumberOfMatches (CMTagCollection tagCollection) + { + return CMTaggedBufferGroupGetNumberOfMatchesForTagCollection (GetCheckedHandle (), tagCollection.GetCheckedHandle ()); + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTaggedBufferGroupError /* OSStatus */ CMTaggedBufferGroupFormatDescriptionCreateForTaggedBufferGroup ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ taggedBufferGroup, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMTaggedBufferGroupFormatDescriptionRef CM_NULLABLE * CM_NONNULL */ formatDescription); + + /// Craete a for this tagged buffer group. + /// An error code in case of failure, 0 in case of success. + /// A for this tagged buffer group, or null in case of failure. + public CMFormatDescription? CreateFormatDescription (out CMTaggedBufferGroupError status) + { + IntPtr formatDescription; + unsafe { + status = CMTaggedBufferGroupFormatDescriptionCreateForTaggedBufferGroup (IntPtr.Zero, GetCheckedHandle (), &formatDescription); + } + return CMFormatDescription.Create (formatDescription, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static byte CMTaggedBufferGroupFormatDescriptionMatchesTaggedBufferGroup ( + IntPtr /* CMTaggedBufferGroupFormatDescriptionRef CM_NONNULL */ desc, + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ taggedBufferGroup); + + /// Checks if the specified format description matches this tagged buffer group. + /// The format description to match. + /// True if the format description matches, false otherwise. + public bool Matches (CMFormatDescription formatDescription) + { + return CMTaggedBufferGroupFormatDescriptionMatchesTaggedBufferGroup (formatDescription.GetCheckedHandle (), GetCheckedHandle ()) != 0; + } + + [DllImport (Constants.CoreMediaLibrary)] + unsafe extern static CMTaggedBufferGroupError /* OSStatus */ CMSampleBufferCreateForTaggedBufferGroup ( + IntPtr /* CFAllocatorRef CM_NULLABLE */ allocator, + IntPtr /* CMTaggedBufferGroupRef CM_NONNULL */ taggedBufferGroup, + CMTime sbufPTS, + CMTime sbufDuration, + IntPtr /* CMTaggedBufferGroupFormatDescriptionRef CM_NONNULL */ formatDescription, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CMSampleBufferRef CM_NULLABLE * CM_NONNULL */ sBufOut); + + /// Create a with this tagged buffer group. + /// The media time PTS of the sample buffer. + /// The media time duration of the sample buffer. + /// The format description describing this tagged buffer group. This format description may be created by calling . + /// An error code in case of failure, 0 in case of success. + /// A new sample buffer for this tagged buffer group, or null in case of failure. + public CMSampleBuffer? CreateSampleBuffer (CMTime sampleBufferPts, CMTime sampleBufferDuration, CMFormatDescription formatDescription, out CMTaggedBufferGroupError status) + { + IntPtr handle; + unsafe { + status = CMSampleBufferCreateForTaggedBufferGroup (IntPtr.Zero, GetCheckedHandle (), sampleBufferPts, sampleBufferDuration, formatDescription.GetCheckedHandle (), &handle); + } + return CMSampleBuffer.Create (handle, true); + } + + [DllImport (Constants.CoreMediaLibrary)] + extern static IntPtr /* CMTaggedBufferGroupRef CM_NULLABLE */ CMSampleBufferGetTaggedBufferGroup ( + IntPtr /* CMSampleBufferRef CM_NONNULL */ sbuf); + + /// Get a sample buffer's tagged buffer group. + /// The sample buffer whose tagged buffer group to get. + /// The tagged buffer group for the specified sample buffer, or null in case of failure or if the specified sample buffer doesn't contain a tagged buffer group. + public static CMTaggedBufferGroup? GetTaggedBufferGroup (CMSampleBuffer sampleBuffer) + { + var handle = CMSampleBufferGetTaggedBufferGroup (sampleBuffer.GetNonNullHandle (nameof (sampleBuffer))); + return Create (handle, false); + } +#endif // COREBUILD + } +} diff --git a/src/CoreMedia/CMTextMarkupAttributes.cs b/src/CoreMedia/CMTextMarkupAttributes.cs index cf80fe729a80..4f6618c210df 100644 --- a/src/CoreMedia/CMTextMarkupAttributes.cs +++ b/src/CoreMedia/CMTextMarkupAttributes.cs @@ -43,8 +43,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public struct TextMarkupColor { public TextMarkupColor (float red, float green, float blue, float alpha) @@ -76,8 +74,6 @@ public TextMarkupColor (float red, float green, float blue, float alpha) [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public class CMTextMarkupAttributes : DictionaryContainer { public CMTextMarkupAttributes () diff --git a/src/CoreMedia/CMTime.cs b/src/CoreMedia/CMTime.cs index c29c9dc7282e..ab1e9ddfb55f 100644 --- a/src/CoreMedia/CMTime.cs +++ b/src/CoreMedia/CMTime.cs @@ -22,8 +22,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif [StructLayout (LayoutKind.Sequential)] public partial struct CMTime { diff --git a/src/CoreMedia/CoreMedia.cs b/src/CoreMedia/CoreMedia.cs index 868c3b058437..727efb51e79d 100644 --- a/src/CoreMedia/CoreMedia.cs +++ b/src/CoreMedia/CoreMedia.cs @@ -24,8 +24,6 @@ namespace CoreMedia { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif [StructLayout (LayoutKind.Sequential)] public struct CMSampleTimingInfo { @@ -40,8 +38,6 @@ public struct CMSampleTimingInfo { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif [StructLayout (LayoutKind.Sequential)] public struct CMTimeRange { @@ -100,8 +96,6 @@ static CMTimeRange () [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif [StructLayout (LayoutKind.Sequential)] public struct CMTimeMapping { @@ -217,8 +211,6 @@ public string? Description { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif [StructLayout (LayoutKind.Sequential)] public struct CMTimeScale { @@ -243,8 +235,6 @@ public CMTimeScale (int value) [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] -#else - [Watch (6, 0)] #endif public struct CMVideoDimensions { public int Width; diff --git a/src/CoreMedia/Enums.cs b/src/CoreMedia/Enums.cs index 939ced53805d..848b1d3c2d01 100644 --- a/src/CoreMedia/Enums.cs +++ b/src/CoreMedia/Enums.cs @@ -7,7 +7,6 @@ namespace CoreMedia { // keys names got changed at some point, but they all refer to a CMSampleBuffer (there is not CMSample obj) - [Watch (6, 0)] [MacCatalyst (13, 1)] enum CMSampleBufferAttachmentKey { [Field ("kCMSampleAttachmentKey_NotSync")] @@ -87,7 +86,7 @@ enum CMSampleBufferAttachmentKey { [MacCatalyst (13, 1)] [Field ("kCMSampleBufferAttachmentKey_ForceKeyFrame")] ForceKeyFrame, - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Field ("kCMSampleAttachmentKey_HDR10PlusPerFrameData")] Hdr10PlusPerFrameData, diff --git a/src/CoreMedia/ICMAttachmentBearer.cs b/src/CoreMedia/ICMAttachmentBearer.cs index 227dd09ab58b..e06dd40a468d 100644 --- a/src/CoreMedia/ICMAttachmentBearer.cs +++ b/src/CoreMedia/ICMAttachmentBearer.cs @@ -5,9 +5,6 @@ namespace CoreMedia { // empty interface used as a marker to state which CM objects DO support the API -#if !NET - [Watch (6, 0)] -#endif public interface ICMAttachmentBearer : INativeObject { } } diff --git a/src/CoreMidi/MidiBluetoothDriver.cs b/src/CoreMidi/MidiBluetoothDriver.cs index b4b027fdcd7d..f74cc15aa2b7 100644 --- a/src/CoreMidi/MidiBluetoothDriver.cs +++ b/src/CoreMidi/MidiBluetoothDriver.cs @@ -28,7 +28,7 @@ namespace CoreMidi { [SupportedOSPlatform ("tvos16.0")] [SupportedOSPlatform ("macos13.0")] #else - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] #endif // NET public partial class MidiBluetoothDriver { [DllImport (Constants.CoreMidiLibrary)] diff --git a/src/CoreMidi/MidiCIDeviceIdentification.cs b/src/CoreMidi/MidiCIDeviceIdentification.cs index 41897c9ce477..a1a233c31e70 100644 --- a/src/CoreMidi/MidiCIDeviceIdentification.cs +++ b/src/CoreMidi/MidiCIDeviceIdentification.cs @@ -1,4 +1,4 @@ -#if !TVOS && !WATCH +#if !TVOS #nullable enable using System; @@ -17,7 +17,6 @@ namespace CoreMidi { [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] #endif [NativeName ("MIDICIDeviceIdentification")] @@ -42,7 +41,6 @@ public struct MidiCIDeviceIdentification { [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch] [NoTV] #endif [NativeName ("MIDICIDeviceIdentification")] diff --git a/src/CoreMidi/MidiCompat.cs b/src/CoreMidi/MidiCompat.cs index ad650810f58f..2e2a92a4a452 100644 --- a/src/CoreMidi/MidiCompat.cs +++ b/src/CoreMidi/MidiCompat.cs @@ -1,4 +1,4 @@ -#if !TVOS && !WATCH +#if !TVOS #if !NET using System; diff --git a/src/CoreMidi/MidiServices.cs b/src/CoreMidi/MidiServices.cs index 1cac2c4b1b79..3abb0a018065 100644 --- a/src/CoreMidi/MidiServices.cs +++ b/src/CoreMidi/MidiServices.cs @@ -1,4 +1,4 @@ -#if !TVOS && !WATCH +#if !TVOS // // MidiServices.cs: Implementation of the MidiObject base class and its derivates // @@ -74,14 +74,17 @@ public enum MidiError : int { WrongThread = -10841, ObjectNotFound = -10842, IDNotUnique = -10843, - NotPermitted = -10844 + NotPermitted = -10844, } [Flags] // SInt32 - MIDIServices.h enum MidiObjectType : int { Other = -1, - Device, Entity, Source, Destination, + Device, + Entity, + Source, + Destination, ExternalMask = 0x10, ExternalDevice = ExternalMask | Device, ExternalEntity = ExternalMask | Entity, @@ -1466,7 +1469,7 @@ public bool TransmitsProgramChanges { [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (14, 0)] + [NoTV, iOS (14, 0), MacCatalyst (14, 0)] #endif public MidiProtocolId ProtocolId { get { @@ -1483,7 +1486,7 @@ public MidiProtocolId ProtocolId { [SupportedOSPlatform ("macos14.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public ushort UmpActiveGroupBitmap { get { @@ -1500,7 +1503,7 @@ public ushort UmpActiveGroupBitmap { [SupportedOSPlatform ("macos14.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public bool UmpCanTransmitGroupless { get { @@ -2053,7 +2056,7 @@ public bool TransmitsProgramChanges { [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (14, 0)] + [NoTV, iOS (14, 0), MacCatalyst (14, 0)] #endif public MidiProtocolId ProtocolId { get { @@ -2500,7 +2503,7 @@ public int TransmitChannels { [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (14, 0)] + [NoTV, iOS (14, 0), MacCatalyst (14, 0)] #endif public MidiProtocolId ProtocolId { get { @@ -2517,7 +2520,7 @@ public MidiProtocolId ProtocolId { [SupportedOSPlatform ("macos14.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public ushort UmpActiveGroupBitmap { get { @@ -2534,7 +2537,7 @@ public ushort UmpActiveGroupBitmap { [SupportedOSPlatform ("macos14.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public bool UmpCanTransmitGroupless { get { @@ -2551,7 +2554,7 @@ public bool UmpCanTransmitGroupless { [SupportedOSPlatform ("macos15.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public int AssociatedEndpoint { get { diff --git a/src/CoreMidi/MidiStructs.cs b/src/CoreMidi/MidiStructs.cs index 0fe010153067..849db19633bc 100644 --- a/src/CoreMidi/MidiStructs.cs +++ b/src/CoreMidi/MidiStructs.cs @@ -1,4 +1,4 @@ -#if !TVOS && !WATCH +#if !TVOS #nullable enable using System; @@ -85,7 +85,7 @@ public byte [] RevisionLevel { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [NativeName ("MIDICIProfileIDStandard")] public struct MidiCIProfileIdStandard { @@ -102,7 +102,7 @@ public struct MidiCIProfileIdStandard { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [NativeName ("MIDICIProfileIDManufacturerSpecific")] public struct MidiCIProfileIdManufacturerSpecific { @@ -119,7 +119,7 @@ public struct MidiCIProfileIdManufacturerSpecific { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [NativeName ("MIDICIProfileID")] public struct MidiCIProfileId { diff --git a/src/CoreMidi/MidiThruConnection.cs b/src/CoreMidi/MidiThruConnection.cs index 6e5439508663..c340ef047f65 100644 --- a/src/CoreMidi/MidiThruConnection.cs +++ b/src/CoreMidi/MidiThruConnection.cs @@ -1,4 +1,4 @@ -#if !TVOS && !WATCH +#if !TVOS // // MidiThruConnection.cs // diff --git a/src/CoreMidi/MidiThruConnectionParams.cs b/src/CoreMidi/MidiThruConnectionParams.cs index e455bc2372c8..8249a5170366 100644 --- a/src/CoreMidi/MidiThruConnectionParams.cs +++ b/src/CoreMidi/MidiThruConnectionParams.cs @@ -1,4 +1,4 @@ -#if !TVOS && !WATCH +#if !TVOS // // MidiThruConnectionParams.cs: A C# wrapper around MidiThruConnectionParamsStruct // diff --git a/src/CoreMotion/Defs.cs b/src/CoreMotion/Defs.cs index 4c3d55ca6c16..d07f431f514e 100644 --- a/src/CoreMotion/Defs.cs +++ b/src/CoreMotion/Defs.cs @@ -111,6 +111,9 @@ public override string ToString () // untyped enum -> CMDeviceMotion.h public enum CMMagneticFieldCalibrationAccuracy { - Uncalibrated = -1, Low, Medium, High + Uncalibrated = -1, + Low, + Medium, + High, } } diff --git a/src/CoreText/CTFont.cs b/src/CoreText/CTFont.cs index 3e23c50ee15a..ce62f67d5115 100644 --- a/src/CoreText/CTFont.cs +++ b/src/CoreText/CTFont.cs @@ -60,7 +60,7 @@ public enum CTFontOptions : ulong { [SupportedOSPlatform ("ios16.0")] [SupportedOSPlatform ("maccatalyst16.0")] #else - [iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), Watch (9, 0)] + [iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Mac (13, 0)] #endif PreventAutoDownload = 1 << 1, PreferSystemFont = 1 << 2, @@ -193,7 +193,6 @@ public enum CTFontTableOptions : uint { [UnsupportedOSPlatform ("tvos")] #else [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] #endif ExcludeSynthetic = (1 << 0), } @@ -2102,7 +2101,6 @@ public CTFont (CTFontUIFontType uiType, nfloat size, string language) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.CoreTextLibrary)] static extern /* CTFontRef */ IntPtr CTFontCreateForStringWithLanguage ( @@ -2119,7 +2117,6 @@ public CTFont (CTFontUIFontType uiType, nfloat size, string language) #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public CTFont? ForString (string value, NSRange range, string? language) { @@ -2306,7 +2303,6 @@ public bool GetGlyphsForCharacters (char [] characters, CGGlyph [] glyphs) [SupportedOSPlatform ("ios14.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] #endif @@ -2319,7 +2315,6 @@ public bool GetGlyphsForCharacters (char [] characters, CGGlyph [] glyphs) [SupportedOSPlatform ("ios14.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] #endif @@ -2673,7 +2668,7 @@ public CTFontTable [] GetAvailableTables (CTFontTableOptions options) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreTextLibrary)] extern static /* CGRect */ CGRect CTFontGetTypographicBoundsForAdaptiveImageProvider ( @@ -2689,7 +2684,7 @@ public CTFontTable [] GetAvailableTables (CTFontTableOptions options) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public CGRect GetTypographicBoundsForAdaptiveImageProvider (ICTAdaptiveImageProviding? provider) { @@ -2702,7 +2697,7 @@ public CGRect GetTypographicBoundsForAdaptiveImageProvider (ICTAdaptiveImageProv [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.CoreTextLibrary)] extern static void CTFontDrawImageFromAdaptiveImageProviderAtPoint ( @@ -2721,7 +2716,7 @@ extern static void CTFontDrawImageFromAdaptiveImageProviderAtPoint ( [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public void DrawImage (ICTAdaptiveImageProviding provider, CGPoint point, CGContext context) { @@ -2734,7 +2729,7 @@ public void DrawImage (ICTAdaptiveImageProviding provider, CGPoint point, CGCont [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos13.0")] #else - [Watch (6, 0), TV (13, 0), iOS (13, 0), MacCatalyst (13, 0)] + [TV (13, 0), iOS (13, 0), MacCatalyst (13, 0)] #endif [DllImport (Constants.CoreTextLibrary)] extern static byte CTFontHasTable ( @@ -2751,7 +2746,7 @@ extern static byte CTFontHasTable ( [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos13.0")] #else - [Watch (6, 0), TV (13, 0), iOS (13, 0), MacCatalyst (13, 0)] + [TV (13, 0), iOS (13, 0), MacCatalyst (13, 0)] #endif public bool HasTable (CTFontTable tag) { diff --git a/src/CoreText/CTFontCollection.cs b/src/CoreText/CTFontCollection.cs index 75348ffe7430..89154017f8f4 100644 --- a/src/CoreText/CTFontCollection.cs +++ b/src/CoreText/CTFontCollection.cs @@ -170,8 +170,6 @@ public CTFontDescriptor [] GetMatchingFontDescriptors () [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.CoreTextLibrary)] static extern IntPtr CTFontCollectionCreateMatchingFontDescriptorsWithOptions (IntPtr collection, IntPtr options); @@ -181,8 +179,6 @@ public CTFontDescriptor [] GetMatchingFontDescriptors () [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] -#else - [Watch (5, 0)] #endif public CTFontDescriptor [] GetMatchingFontDescriptors (CTFontCollectionOptions? options) { diff --git a/src/CoreText/CTFontManager.cs b/src/CoreText/CTFontManager.cs index ae613d675c15..e9150b2970d3 100644 --- a/src/CoreText/CTFontManager.cs +++ b/src/CoreText/CTFontManager.cs @@ -56,7 +56,6 @@ public enum CTFontManagerScope : uint { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif Persistent = 2, #if NET @@ -67,20 +66,20 @@ public enum CTFontManagerScope : uint { #else [NoiOS] [NoTV] - [NoWatch] #endif Session = 3, #if !NET [NoiOS] [NoTV] - [NoWatch] // historically not available under the old name User = Persistent, #endif } // defined as uint32_t - /System/Library/Frameworks/CoreText.framework/Headers/CTFontManager.h public enum CTFontManagerAutoActivation : uint { - Default = 0, Disabled = 1, Enabled = 2, + Default = 0, + Disabled = 1, + Enabled = 2, #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -176,7 +175,6 @@ static NSArray EnsureNonNullArray (object [] items, string name) #else [Deprecated (PlatformName.MacOSX, 10, 15)] [Deprecated (PlatformName.iOS, 13, 0)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Deprecated (PlatformName.TvOS, 13, 0)] #endif [DllImport (Constants.CoreTextLibrary)] @@ -193,7 +191,6 @@ static NSArray EnsureNonNullArray (object [] items, string name) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'RegisterFonts' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'RegisterFonts' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'RegisterFonts' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'RegisterFonts' instead.")] #endif public static NSError []? RegisterFontsForUrl (NSUrl [] fontUrls, CTFontManagerScope scope) @@ -214,7 +211,6 @@ static NSArray EnsureNonNullArray (object [] items, string name) // [SupportedOSPlatform ("ios13.0")] // [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -244,7 +240,6 @@ static unsafe byte TrampolineRegistrationHandler (IntPtr block, /* NSArray */ In [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -257,7 +252,6 @@ static unsafe byte TrampolineRegistrationHandler (IntPtr block, /* NSArray */ In [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -320,7 +314,6 @@ public static void RegisterFonts (NSUrl [] fontUrls, CTFontManagerScope scope, b #else [Deprecated (PlatformName.MacOSX, 10, 15)] [Deprecated (PlatformName.iOS, 13, 0)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Deprecated (PlatformName.TvOS, 13, 0)] #endif [DllImport (Constants.CoreTextLibrary)] @@ -337,7 +330,6 @@ public static void RegisterFonts (NSUrl [] fontUrls, CTFontManagerScope scope, b #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'UnregisterFonts' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'UnregisterFonts' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'UnregisterFonts' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'UnregisterFonts' instead.")] #endif public static NSError []? UnregisterFontsForUrl (NSUrl [] fontUrls, CTFontManagerScope scope) @@ -358,7 +350,6 @@ public static void RegisterFonts (NSUrl [] fontUrls, CTFontManagerScope scope, b [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -371,7 +362,6 @@ public static void RegisterFonts (NSUrl [] fontUrls, CTFontManagerScope scope, b [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -441,7 +431,6 @@ public static CTFontDescriptor [] GetFonts (NSUrl url) [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] #endif [DllImport (Constants.CoreTextLibrary)] unsafe static extern byte CTFontManagerRegisterGraphicsFont (IntPtr cgfont, IntPtr* error); @@ -460,7 +449,6 @@ public static CTFontDescriptor [] GetFonts (NSUrl url) [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'CreateFontDescriptors' or 'RegisterFontsForUrl' instead.")] #endif public static bool RegisterGraphicsFont (CGFont font, [NotNullWhen (true)] out NSError? error) { @@ -497,7 +485,6 @@ public static bool RegisterGraphicsFont (CGFont font, [NotNullWhen (true)] out N [Deprecated (PlatformName.MacCatalyst, 18, 0)] [Deprecated (PlatformName.TvOS, 18, 0)] [Deprecated (PlatformName.MacOSX, 15, 0)] - [Deprecated (PlatformName.WatchOS, 11, 0)] #endif [DllImport (Constants.CoreTextLibrary)] unsafe static extern byte CTFontManagerUnregisterGraphicsFont (IntPtr cgfont, IntPtr* error); @@ -516,7 +503,6 @@ public static bool RegisterGraphicsFont (CGFont font, [NotNullWhen (true)] out N [Deprecated (PlatformName.MacCatalyst, 18, 0)] [Deprecated (PlatformName.TvOS, 18, 0)] [Deprecated (PlatformName.MacOSX, 15, 0)] - [Deprecated (PlatformName.WatchOS, 11, 0)] #endif public static bool UnregisterGraphicsFont (CGFont font, out NSError? error) { @@ -584,7 +570,6 @@ public static NSObject ObserveRegisteredFontsChanged (EventHandler CFDictionary.GetBooleanValue (Dictionary.Handle, CTTypesetterOptionKey.AllowUnboundedLayout.Handle); diff --git a/src/CoreVideo/CVBuffer.cs b/src/CoreVideo/CVBuffer.cs index 3a9df168be47..8eebf4912d78 100644 --- a/src/CoreVideo/CVBuffer.cs +++ b/src/CoreVideo/CVBuffer.cs @@ -107,7 +107,6 @@ public void RemoveAttachment (NSString key) [Deprecated (PlatformName.iOS, 15, 0)] [Deprecated (PlatformName.TvOS, 15, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] #endif [DllImport (Constants.CoreVideoLibrary)] unsafe extern static /* CFTypeRef */ IntPtr CVBufferGetAttachment (/* CVBufferRef */ IntPtr buffer, /* CFStringRef */ IntPtr key, CVAttachmentMode* attachmentMode); @@ -126,7 +125,6 @@ public void RemoveAttachment (NSString key) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -149,8 +147,6 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (key)); #if IOS || __MACCATALYST__ || TVOS if (SystemVersion.CheckiOS (15, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (8, 0)) #endif return Runtime.GetINativeObject (CVBufferCopyAttachment (Handle, key.Handle, out attachmentMode), true); return Runtime.GetINativeObject (CVBufferGetAttachment (Handle, key.Handle, out attachmentMode), false); @@ -181,7 +177,6 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt [Deprecated (PlatformName.iOS, 15, 0)] [Deprecated (PlatformName.TvOS, 15, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] #endif [DllImport (Constants.CoreVideoLibrary)] extern static /* CFDictionaryRef */ IntPtr CVBufferGetAttachments (/* CVBufferRef */ IntPtr buffer, CVAttachmentMode attachmentMode); @@ -192,7 +187,6 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -204,8 +198,6 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt { #if IOS || __MACCATALYST__ || TVOS if (SystemVersion.CheckiOS (15, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (8, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (12, 0)) #endif @@ -264,7 +256,6 @@ public void SetAttachments (NSDictionary theAttachments, CVAttachmentMode attach [iOS (15, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] - [Watch (8, 0)] #endif [DllImport (Constants.CoreVideoLibrary)] static extern byte CVBufferHasAttachment (/* CVBufferRef */ IntPtr buffer, /* CFStringRef */ IntPtr key); @@ -278,7 +269,6 @@ public void SetAttachments (NSDictionary theAttachments, CVAttachmentMode attach [iOS (15, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] - [Watch (8, 0)] #endif public bool HasAttachment (NSString key) { diff --git a/src/CoreVideo/CVEnums.cs b/src/CoreVideo/CVEnums.cs index 233a605aec84..32e8e9d96180 100644 --- a/src/CoreVideo/CVEnums.cs +++ b/src/CoreVideo/CVEnums.cs @@ -141,7 +141,6 @@ public enum CVPixelBufferPoolFlushFlags : ulong { FlushExcessBuffers = 1, } -#if !WATCH [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum CVImageBufferAlphaChannelMode { @@ -150,5 +149,4 @@ public enum CVImageBufferAlphaChannelMode { [Field ("kCVImageBufferAlphaChannelMode_PremultipliedAlpha")] Premultiplied, } -#endif } diff --git a/src/CoreVideo/CVMetalBuffer.cs b/src/CoreVideo/CVMetalBuffer.cs index 398ba2b5bef4..8c5651e52bb4 100644 --- a/src/CoreVideo/CVMetalBuffer.cs +++ b/src/CoreVideo/CVMetalBuffer.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using System.Runtime.InteropServices; @@ -24,7 +23,7 @@ namespace CoreVideo { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public class CVMetalBuffer : CVBuffer { #if !COREBUILD @@ -54,5 +53,3 @@ public static nint GetTypeId () #endif // !COREBUILD } } - -#endif // !WATCH diff --git a/src/CoreVideo/CVMetalBufferCache.cs b/src/CoreVideo/CVMetalBufferCache.cs index ecbb025b6f29..8c2d8c0547e7 100644 --- a/src/CoreVideo/CVMetalBufferCache.cs +++ b/src/CoreVideo/CVMetalBufferCache.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; @@ -26,7 +25,7 @@ namespace CoreVideo { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public class CVMetalBufferCache : NativeObject { #if !COREBUILD @@ -153,4 +152,3 @@ public void Flush (CVOptionFlags options) #endif // !COREBUILD } } -#endif // !WATCH diff --git a/src/CoreVideo/CVMetalTexture.cs b/src/CoreVideo/CVMetalTexture.cs index c22fee384cc2..42e8162a15cb 100644 --- a/src/CoreVideo/CVMetalTexture.cs +++ b/src/CoreVideo/CVMetalTexture.cs @@ -8,8 +8,6 @@ // // -#if !__WATCHOS__ - using System; using System.Runtime.InteropServices; @@ -80,5 +78,3 @@ public void GetCleanTexCoords (out float [] lowerLeft, out float [] lowerRight, } } } - -#endif // IOS || TVOS diff --git a/src/CoreVideo/CVMetalTextureAttributes.cs b/src/CoreVideo/CVMetalTextureAttributes.cs index c39cfc055e4a..eefabe154f77 100644 --- a/src/CoreVideo/CVMetalTextureAttributes.cs +++ b/src/CoreVideo/CVMetalTextureAttributes.cs @@ -6,7 +6,6 @@ // Copyright 2017 Xamarin Inc. // -#if !WATCH using System; using Foundation; using Metal; @@ -26,4 +25,3 @@ public MTLTextureUsage? Usage { } } } -#endif diff --git a/src/CoreVideo/CVMetalTextureCache.cs b/src/CoreVideo/CVMetalTextureCache.cs index 891ef156aca3..1e7579b34b8f 100644 --- a/src/CoreVideo/CVMetalTextureCache.cs +++ b/src/CoreVideo/CVMetalTextureCache.cs @@ -8,8 +8,6 @@ // // -#if !__WATCHOS__ - using System; using System.Runtime.InteropServices; using ObjCRuntime; @@ -156,5 +154,3 @@ unsafe extern static CVReturn CVMetalTextureCacheCreateTextureFromImage ( /* CVMetalTextureRef __nullable * __nonnull */ IntPtr* textureOut); } } - -#endif // __WATCHOS__ diff --git a/src/CoreVideo/CVPixelBuffer.cs b/src/CoreVideo/CVPixelBuffer.cs index b8c35e02de61..aeae3ddc1fae 100644 --- a/src/CoreVideo/CVPixelBuffer.cs +++ b/src/CoreVideo/CVPixelBuffer.cs @@ -58,6 +58,13 @@ public CVPixelBuffer (nint width, nint height, CVPixelFormatType pixelFormatType { } + internal static CVPixelBuffer? Create (NativeHandle handle, bool owns) + { + if (handle == IntPtr.Zero) + return null; + return new CVPixelBuffer (handle, owns); + } + static IntPtr Create (nint width, nint height, CVPixelFormatType pixelFormatType, NSDictionary? pixelBufferAttributes) { if (width <= 0) @@ -110,7 +117,6 @@ unsafe extern static CVReturn CVPixelBufferCreateResolvedAttributesDictionary ( [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [NoMacCatalyst] @@ -124,7 +130,6 @@ unsafe extern static CVReturn CVPixelBufferCreateResolvedAttributesDictionary ( [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [NoMacCatalyst] diff --git a/src/CoreVideo/CVPixelBufferAttributes.cs b/src/CoreVideo/CVPixelBufferAttributes.cs index 49903a9adbe7..3abb8e67b1ad 100644 --- a/src/CoreVideo/CVPixelBufferAttributes.cs +++ b/src/CoreVideo/CVPixelBufferAttributes.cs @@ -192,7 +192,6 @@ public bool? AllocateWithIOSurface { } } -#if !WATCH #if !__MACCATALYST__ public bool? OpenGLESCompatibility { set { @@ -218,7 +217,6 @@ public bool? MetalCompatibility { return GetBoolValue (CVPixelBuffer.MetalCompatibilityKey); } } -#endif // !WATCH #endif #endif } diff --git a/src/CoreVideo/CVPixelBufferIOSurface.cs b/src/CoreVideo/CVPixelBufferIOSurface.cs index c84104735418..18232190537c 100644 --- a/src/CoreVideo/CVPixelBufferIOSurface.cs +++ b/src/CoreVideo/CVPixelBufferIOSurface.cs @@ -6,7 +6,6 @@ // Copyright 2017 Xamarin Inc. // -#if !WATCH using System; using System.Runtime.InteropServices; using CoreFoundation; @@ -23,8 +22,6 @@ public partial class CVPixelBuffer : CVImageBuffer { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif [DllImport (Constants.CoreVideoLibrary)] extern static IntPtr /* IOSurfaceRef */ CVPixelBufferGetIOSurface ( @@ -36,8 +33,6 @@ public partial class CVPixelBuffer : CVImageBuffer { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif public IOSurface.IOSurface? GetIOSurface () { @@ -56,8 +51,6 @@ public partial class CVPixelBuffer : CVImageBuffer { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif [DllImport (Constants.CoreVideoLibrary)] unsafe extern static CVReturn /* IOSurfaceRef */ CVPixelBufferCreateWithIOSurface ( @@ -72,8 +65,6 @@ public partial class CVPixelBuffer : CVImageBuffer { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif public static CVPixelBuffer? Create (IOSurface.IOSurface surface, out CVReturn result, CVPixelBufferAttributes? pixelBufferAttributes = null) { @@ -101,8 +92,6 @@ public partial class CVPixelBuffer : CVImageBuffer { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif public static CVPixelBuffer? Create (IOSurface.IOSurface surface, CVPixelBufferAttributes? pixelBufferAttributes = null) { @@ -111,4 +100,3 @@ public partial class CVPixelBuffer : CVImageBuffer { } } } -#endif diff --git a/src/CoreVideo/CVPixelFormatDescription.cs b/src/CoreVideo/CVPixelFormatDescription.cs index 968c6540558d..2011de0dd91c 100644 --- a/src/CoreVideo/CVPixelFormatDescription.cs +++ b/src/CoreVideo/CVPixelFormatDescription.cs @@ -161,8 +161,6 @@ public partial class CVPixelFormatDescription { [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public static readonly NSString ContainsGrayscaleKey; @@ -296,7 +294,7 @@ public static void Register (CVPixelFormatDescription description, CVPixelFormat [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Mac (12, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Mac (12, 0)] #endif [DllImport (Constants.CoreVideoLibrary)] extern static byte CVIsCompressedPixelFormatAvailable (int /* OSType = int32_t */ pixelFormat); @@ -310,7 +308,7 @@ public static void Register (CVPixelFormatDescription description, CVPixelFormat [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Mac (12, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Mac (12, 0)] #endif public static bool IsPixelFormatAvailable (CVPixelFormatType pixelFormat) { diff --git a/src/CoreVideo/CVPixelFormatType.cs b/src/CoreVideo/CVPixelFormatType.cs index 4c03efe1f66a..286a7776bd54 100644 --- a/src/CoreVideo/CVPixelFormatType.cs +++ b/src/CoreVideo/CVPixelFormatType.cs @@ -192,7 +192,6 @@ public static class CVPixelFormatTypeExtensions { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -206,7 +205,6 @@ public static class CVPixelFormatTypeExtensions { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/CoreWlan/CWKeychain.cs b/src/CoreWlan/CWKeychain.cs index e4538798e60a..a09a3f894488 100644 --- a/src/CoreWlan/CWKeychain.cs +++ b/src/CoreWlan/CWKeychain.cs @@ -10,7 +10,6 @@ #nullable enable -using OSStatus = System.Int32; using SecIdentityRef = System.IntPtr; using CFArrayRef = System.IntPtr; using NSDataRef = System.IntPtr; diff --git a/src/Darwin/SystemLog.cs b/src/Darwin/SystemLog.cs index c42ab4f5339d..02dcc77443e1 100644 --- a/src/Darwin/SystemLog.cs +++ b/src/Darwin/SystemLog.cs @@ -53,7 +53,11 @@ public static SystemLog Default { } [Flags] - public enum Option { Stderr, NoDelay, NoRemote } + public enum Option { + Stderr, + NoDelay, + NoRemote, + } protected override void Dispose (bool disposing) { @@ -202,7 +206,10 @@ public IEnumerable Search (Message msg) } public class Message : DisposableObject { - public enum Kind { Message, Query } + public enum Kind { + Message, + Query, + } [Flags] public enum Op { @@ -218,7 +225,7 @@ public enum Op { Less = 4, LessEqual = 5, NotEqual = 6, - True = 7 + True = 7, } [Preserve (Conditional = true)] diff --git a/src/DeviceDiscoveryExtension/Enums.cs b/src/DeviceDiscoveryExtension/Enums.cs index 7df4ea109c46..a6fa50d7040b 100644 --- a/src/DeviceDiscoveryExtension/Enums.cs +++ b/src/DeviceDiscoveryExtension/Enums.cs @@ -15,14 +15,14 @@ namespace DeviceDiscoveryExtension { - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [Native] public enum DDDeviceProtocol : long { Invalid = 0, Dial = 1, } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [Native] public enum DDDeviceCategory : long { HiFiSpeaker = 0, @@ -35,7 +35,7 @@ public enum DDDeviceCategory : long { AccessorySetup = 6, } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [Native] public enum DDDeviceState : long { Invalid = 0, @@ -45,7 +45,7 @@ public enum DDDeviceState : long { Invalidating = 30, } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [Native] public enum DDDeviceMediaPlaybackState : long { NoContent = 0, @@ -53,7 +53,7 @@ public enum DDDeviceMediaPlaybackState : long { Playing = 2, } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [ErrorDomain ("DDErrorDomain")] [Native] public enum DDErrorCode : long { @@ -68,7 +68,7 @@ public enum DDErrorCode : long { // Next, // don't bind 'Next', it's not static and we'd have to break compat if it were ever to change } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [Native] public enum DDEventType : long { Unknown = 0, @@ -77,7 +77,7 @@ public enum DDEventType : long { DeviceChanged = 42, } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoTV] [Native] [Flags] public enum DDDeviceSupports : ulong { diff --git a/src/DotNetGlobals.cs b/src/DotNetGlobals.cs index 0652e51f8cd1..b9eab5baed82 100644 --- a/src/DotNetGlobals.cs +++ b/src/DotNetGlobals.cs @@ -1,4 +1,6 @@ #if NET global using System; global using System.Runtime.Versioning; // We need the SupportedOSPlatform/UnsupportedOSPlatform attributes pretty much everywhere + +global using OSStatus = System.Int32; #endif diff --git a/src/EventKit/EKEnums.cs b/src/EventKit/EKEnums.cs index 63615922577d..a4ec6e17f4cf 100644 --- a/src/EventKit/EKEnums.cs +++ b/src/EventKit/EKEnums.cs @@ -15,7 +15,11 @@ namespace EventKit { /// Specifies the type of a calendar. [Native] public enum EKCalendarType : long { - Local, CalDav, Exchange, Subscription, Birthday + Local, + CalDav, + Exchange, + Subscription, + Birthday, } // untyped enum -> EKTypes.h @@ -23,7 +27,11 @@ public enum EKCalendarType : long { /// The kind of participant to the event. [Native] public enum EKParticipantType : long { - Unknown, Person, Room, Resource, Group + Unknown, + Person, + Room, + Resource, + Group, } // untyped enum -> EKTypes.h @@ -31,7 +39,11 @@ public enum EKParticipantType : long { /// The role of an [Native] public enum EKParticipantRole : long { - Unknown, Required, Optional, Chair, NonParticipant + Unknown, + Required, + Optional, + Chair, + NonParticipant, } // untyped enum -> EKTypes.h @@ -39,8 +51,14 @@ public enum EKParticipantRole : long { /// The status of a participant. [Native] public enum EKParticipantStatus : long { - Unknown, Pending, Accepted, Declined, - Tentative, Delegated, Completed, InProcess + Unknown, + Pending, + Accepted, + Declined, + Tentative, + Delegated, + Completed, + InProcess, } // untyped enum -> EKError.h @@ -97,7 +115,12 @@ public enum EKErrorCode : long { public enum EKDay { NotSet = 0, Sunday = 1, - Monday, Tuesday, Wednesday, Thursday, Friday, Saturday + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday, } /// Enumerates the days of the week. @@ -119,7 +142,10 @@ public enum EKWeekday : long { /// The recurring frequency for the event. [Native] public enum EKRecurrenceFrequency : long { - Daily, Weekly, Monthly, Yearly + Daily, + Weekly, + Monthly, + Yearly, } // untyped enum -> EKEventStore.h @@ -127,7 +153,8 @@ public enum EKRecurrenceFrequency : long { /// Determines how changes to an event will be applied, either it affects a single instance or affects all instances. [Native] public enum EKSpan : long { - ThisEvent, FutureEvents + ThisEvent, + FutureEvents, } // NSUInteger -> EKTypes.h @@ -139,7 +166,7 @@ public enum EKCalendarEventAvailability : ulong { Busy = 1, Free = 2, Tentative = 4, - Unavailable = 8 + Unavailable = 8, } // untyped enum -> EKEvent.h @@ -148,7 +175,10 @@ public enum EKCalendarEventAvailability : ulong { [Native] public enum EKEventAvailability : long { NotSupported = -1, - Busy = 0, Free, Tentative, Unavailable, + Busy = 0, + Free, + Tentative, + Unavailable, } // untyped enum -> EKEvent.h @@ -156,7 +186,10 @@ public enum EKEventAvailability : long { /// The event status. [Native] public enum EKEventStatus : long { - None, Confirmed, Tentative, Cancelled + None, + Confirmed, + Tentative, + Cancelled, } // untyped enum -> EKTypes.h @@ -164,14 +197,21 @@ public enum EKEventStatus : long { /// An enumeration whose values indicate the type of a object. [Native] public enum EKSourceType : long { - Local, Exchange, CalDav, MobileMe, Subscribed, Birthdays + Local, + Exchange, + CalDav, + MobileMe, + Subscribed, + Birthdays, } // NSInteger -> EKTypes.h /// An enumeration whose values specify whether an event was raised by entering or leaving a region. [Native] public enum EKAlarmProximity : long { - None, Enter, Leave + None, + Enter, + Leave, } // NSUInteger -> EKTypes.h @@ -180,7 +220,7 @@ public enum EKAlarmProximity : long { [Flags] public enum EKEntityMask : ulong { Event = 1 << (int) EKEntityType.Event, - Reminder = 1 << (int) EKEntityType.Reminder + Reminder = 1 << (int) EKEntityType.Reminder, } // NSUInteger -> EKTypes.h @@ -188,15 +228,18 @@ public enum EKEntityMask : ulong { [Native] public enum EKEntityType : ulong { Event, - Reminder + Reminder, } -#if MONOMAC || WATCH +#if MONOMAC // untyped enum -> EKTypes.h (but not in the iOS SDK, only OSX) // turned into a typed (NSInteger) enum in El Capitan (and also an NSInteger in watchOS) [Native] public enum EKAlarmType : long { - Display, Audio, Procedure, Email + Display, + Audio, + Procedure, + Email, } #endif // NSInteger -> EKEventStore.h @@ -220,7 +263,7 @@ public enum EKParticipantScheduleStatus : long { NoPrivileges, DeliveryFailed, CannotDeliver, - RecipientNotAllowed + RecipientNotAllowed, } [Native] @@ -228,7 +271,7 @@ public enum EKReminderPriority : ulong { None = 0, High = 1, Medium = 5, - Low = 9 + Low = 9, } } diff --git a/src/EventKitUI/Defs.cs b/src/EventKitUI/Defs.cs index 9ad6bcbceecb..75ea3d08f059 100644 --- a/src/EventKitUI/Defs.cs +++ b/src/EventKitUI/Defs.cs @@ -17,27 +17,33 @@ namespace EventKitUI { // iOS 9 promoted this to an NSInteger - which breaks compatibility [Native] public enum EKCalendarChooserSelectionStyle : long { - Single, Multiple + Single, + Multiple, } // untyped enum -> EKCalendarChooser.h // iOS 9 promoted this to an NSInteger - which breaks compatibility [Native] public enum EKCalendarChooserDisplayStyle : long { - AllCalendars, WritableCalendarsOnly + AllCalendars, + WritableCalendarsOnly, } // untyped enum -> EKEventViewController.h // iOS 9 promoted this to an NSInteger - which breaks compatibility [Native] public enum EKEventViewAction : long { - Done, Responded, Deleted + Done, + Responded, + Deleted, } // untyped enum -> EKEventEditViewController.h // iOS 9 promoted this to an NSInteger - which breaks compatibility [Native] public enum EKEventEditViewAction : long { - Canceled, Saved, Deleted + Canceled, + Saved, + Deleted, } } diff --git a/src/Foundation/Additions.cs b/src/Foundation/Additions.cs index 897edab97112..cff332d52b64 100644 --- a/src/Foundation/Additions.cs +++ b/src/Foundation/Additions.cs @@ -1,6 +1,6 @@ // Copyright 2014 Xamarin Inc. All rights reserved. -#if !MONOMAC && !WATCH +#if !MONOMAC using System; @@ -24,4 +24,4 @@ public int Section { } } -#endif // !MONOMAC && !WATCH +#endif // !MONOMAC diff --git a/src/Foundation/Compat.cs b/src/Foundation/Compat.cs index ea35e074f5ed..d71b94b5c7d0 100644 --- a/src/Foundation/Compat.cs +++ b/src/Foundation/Compat.cs @@ -26,7 +26,6 @@ public static NSError GetFileProviderErrorForOutOfDateItem (FileProvider.INSFile } #endif -#if !WATCH public partial class NSUserActivity { [Obsolete ("Use the constructor that allows you to set an activity type.")] @@ -35,7 +34,6 @@ public NSUserActivity () { } } -#endif #endif // !NET #if !XAMCORE_5_0 diff --git a/src/Foundation/DictionaryContainer.cs b/src/Foundation/DictionaryContainer.cs index d8247bf5cb33..363501052412 100644 --- a/src/Foundation/DictionaryContainer.cs +++ b/src/Foundation/DictionaryContainer.cs @@ -36,9 +36,7 @@ using ObjCRuntime; using Foundation; using CoreGraphics; -#if !WATCH using CoreMedia; -#endif // !WATCH #endif #if HAS_UIKIT @@ -338,7 +336,6 @@ protected DictionaryContainer (NSDictionary? dictionary) return value; } -#if !WATCH protected CMTime? GetCMTimeValue (NSString key) { var dictValue = GetNSDictionary (key); @@ -350,7 +347,6 @@ protected DictionaryContainer (NSDictionary? dictionary) return value; } -#endif // !WATCH #if HAS_UIKIT protected UIEdgeInsets? GetUIEdgeInsets (NSString key) @@ -516,13 +512,11 @@ protected void SetCGPointValue (NSString key, CGPoint? value) Dictionary [key] = value!.Value.ToDictionary (); } -#if !WATCH protected void SetCMTimeValue (NSString key, CMTime? value) { if (NullCheckAndRemoveKey (key, !value.HasValue)) Dictionary [key] = value!.Value.ToDictionary (); } -#endif //!WATCH #if HAS_UIKIT protected void SetUIEdgeInsets (NSString key, UIEdgeInsets? value) diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index d28d5b430907..82ae2939c54f 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -72,7 +72,7 @@ public enum NSUrlCredentialPersistence : ulong { None, ForSession, Permanent, - Synchronizable + Synchronizable, } #if MONOMAC @@ -97,7 +97,7 @@ public enum NSBundleExecutableArchitecture { public enum NSComparisonResult : long { Ascending = -1, Same, - Descending + Descending, } [Native] @@ -115,7 +115,9 @@ public enum NSUrlRequestCachePolicy : ulong { [Native] public enum NSUrlCacheStoragePolicy : ulong { - Allowed, AllowedInMemoryOnly, NotAllowed + Allowed, + AllowedInMemoryOnly, + NotAllowed, } [Native] @@ -127,21 +129,21 @@ public enum NSStreamStatus : ulong { Writing = 4, AtEnd = 5, Closed = 6, - Error = 7 + Error = 7, } [Native] public enum NSPropertyListFormat : ulong { OpenStep = 1, Xml = 100, - Binary = 200 + Binary = 200, } [Native] public enum NSPropertyListMutabilityOptions : ulong { Immutable = 0, MutableContainers = 1, - MutableContainersAndLeaves = 2 + MutableContainersAndLeaves = 2, } // Should mirror NSPropertyListMutabilityOptions @@ -149,7 +151,7 @@ public enum NSPropertyListMutabilityOptions : ulong { public enum NSPropertyListWriteOptions : ulong { Immutable = 0, MutableContainers = 1, - MutableContainersAndLeaves = 2 + MutableContainersAndLeaves = 2, } // Should mirror NSPropertyListMutabilityOptions, but currently @@ -158,7 +160,7 @@ public enum NSPropertyListWriteOptions : ulong { public enum NSPropertyListReadOptions : ulong { Immutable = 0, MutableContainers = 1, - MutableContainersAndLeaves = 2 + MutableContainersAndLeaves = 2, } [Native] @@ -166,7 +168,7 @@ public enum NSPropertyListReadOptions : ulong { public enum NSMachPortRights : ulong { None = 0, SendRight = (1 << 0), - ReceiveRight = (1 << 1) + ReceiveRight = (1 << 1), } [Native] @@ -182,14 +184,11 @@ public enum NSNetServicesStatus : long { MissingRequiredConfigurationError = -72008, } -#if XAMCORE_5_0 - [NoWatch] -#endif [Flags] [Native] public enum NSNetServiceOptions : ulong { NoAutoRename = 1 << 0, - ListenForConnections = 1 << 1 + ListenForConnections = 1 << 1, } [Native] @@ -198,7 +197,7 @@ public enum NSDateFormatterStyle : ulong { Short, Medium, Long, - Full + Full, } [Native] @@ -206,7 +205,6 @@ public enum NSDateFormatterBehavior : ulong { Default = 0, [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] Mode_10_0 = 1000, Mode_10_4 = 1040, @@ -214,7 +212,9 @@ public enum NSDateFormatterBehavior : ulong { [Native] public enum NSHttpCookieAcceptPolicy : ulong { - Always, Never, OnlyFromMainDocumentDomain + Always, + Never, + OnlyFromMainDocumentDomain, } [Flags] @@ -256,7 +256,7 @@ public enum NSDataReadingOptions : ulong { [Obsolete ("This option is unavailable.")] Coordinated = 1 << 2, #endif - MappedAlways = 1 << 3 + MappedAlways = 1 << 3, } [Flags] @@ -275,7 +275,7 @@ public enum NSDataWritingOptions : ulong { FileProtectionCompleteUnlessOpen = 0x30000000, [MacCatalyst (13, 1)] FileProtectionCompleteUntilFirstUserAuthentication = 0x40000000, - [iOS (17, 0), NoMac, MacCatalyst (17, 0), TV (17, 0), Watch (10, 0)] + [iOS (17, 0), NoMac, MacCatalyst (17, 0), TV (17, 0)] FileProtectionCompleteWhenUserInactive = 0x50000000, } @@ -283,7 +283,11 @@ public enum NSDataWritingOptions : ulong { [Native] public enum NSOperationQueuePriority : long { - VeryLow = -8, Low = -4, Normal = 0, High = 4, VeryHigh = 8 + VeryLow = -8, + Low = -4, + Normal = 0, + High = 4, + VeryHigh = 8, } [Flags] @@ -291,19 +295,21 @@ public enum NSOperationQueuePriority : long { public enum NSNotificationCoalescing : ulong { NoCoalescing = 0, CoalescingOnName = 1, - CoalescingOnSender = 2 + CoalescingOnSender = 2, } [Native] public enum NSPostingStyle : ulong { - PostWhenIdle = 1, PostASAP = 2, Now = 3 + PostWhenIdle = 1, + PostASAP = 2, + Now = 3, } [Flags] [Native] public enum NSDataSearchOptions : ulong { SearchBackwards = 1, - SearchAnchored = 2 + SearchAnchored = 2, } [Native] @@ -320,7 +326,7 @@ public enum NSExpressionType : ulong { NSAggregate, AnyKey = 15, Block = 19, - Conditional = 20 + Conditional = 20, } public enum NSCocoaError : int { @@ -501,19 +507,25 @@ public enum NSKeyValueObservingOptions : ulong { [Native] public enum NSKeyValueChange : ulong { - Setting = 1, Insertion, Removal, Replacement + Setting = 1, + Insertion, + Removal, + Replacement, } [Native] public enum NSKeyValueSetMutationKind : ulong { - UnionSet = 1, MinusSet, IntersectSet, SetSet + UnionSet = 1, + MinusSet, + IntersectSet, + SetSet, } [Flags] [Native] public enum NSEnumerationOptions : ulong { SortConcurrent = 1, - Reverse = 2 + Reverse = 2, } [Flags] @@ -524,14 +536,14 @@ public enum NSStreamEvent : ulong { HasBytesAvailable = 1 << 1, HasSpaceAvailable = 1 << 2, ErrorOccurred = 1 << 3, - EndEncountered = 1 << 4 + EndEncountered = 1 << 4, } [Native] public enum NSComparisonPredicateModifier : ulong { Direct, All, - Any + Any, } [Native] @@ -549,7 +561,7 @@ public enum NSPredicateOperatorType : ulong { In, CustomSelector, Contains = 99, - Between + Between, } [Flags] @@ -558,14 +570,14 @@ public enum NSComparisonPredicateOptions : ulong { None = 0x00, CaseInsensitive = 1 << 0, DiacriticInsensitive = 1 << 1, - Normalized = 1 << 2 + Normalized = 1 << 2, } [Native] public enum NSCompoundPredicateType : ulong { Not, And, - Or + Or, } [Flags] @@ -588,10 +600,10 @@ public enum NSDirectoryEnumerationOptions : ulong { SkipsSubdirectoryDescendants = 1 << 0, SkipsPackageDescendants = 1 << 1, SkipsHiddenFiles = 1 << 2, - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] IncludesDirectoriesPostOrder = 1 << 3, - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] ProducesRelativePathUrls = 1 << 4, } @@ -628,7 +640,6 @@ public enum NSSearchPathDirectory : ulong { PrinterDescriptionDirectory = 20, SharedPublicDirectory = 21, PreferencePanesDirectory = 22, - [NoWatch] [NoiOS] [NoTV] [NoMacCatalyst] @@ -636,7 +647,7 @@ public enum NSSearchPathDirectory : ulong { ItemReplacementDirectory = 99, AllApplicationsDirectory = 100, AllLibrariesDirectory = 101, - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] TrashDirectory = 102, } @@ -654,12 +665,19 @@ public enum NSSearchPathDomain : ulong { [Native] public enum NSRoundingMode : ulong { - Plain, Down, Up, Bankers + Plain, + Down, + Up, + Bankers, } [Native] public enum NSCalculationError : ulong { - None, PrecisionLoss, Underflow, Overflow, DivideByZero + None, + PrecisionLoss, + Underflow, + Overflow, + DivideByZero, } [Flags] @@ -669,18 +687,16 @@ public enum NSStringDrawingOptions : ulong { UsesFontLeading = (1 << 1), [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 11)] DisableScreenFontSubstitution = (1 << 2), UsesDeviceMetrics = (1 << 3), [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 11)] OneShot = (1 << 4), - TruncatesLastVisibleLine = (1 << 5) + TruncatesLastVisibleLine = (1 << 5), } [Native] @@ -706,32 +722,40 @@ public enum NSNumberFormatterBehavior : ulong { Default = 0, [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] Version_10_0 = 1000, - Version_10_4 = 1040 + Version_10_4 = 1040, } [Native] public enum NSNumberFormatterPadPosition : ulong { - BeforePrefix, AfterPrefix, BeforeSuffix, AfterSuffix + BeforePrefix, + AfterPrefix, + BeforeSuffix, + AfterSuffix, } [Native] public enum NSNumberFormatterRoundingMode : ulong { - Ceiling, Floor, Down, Up, HalfEven, HalfDown, HalfUp + Ceiling, + Floor, + Down, + Up, + HalfEven, + HalfDown, + HalfUp, } [Flags] [Native] public enum NSFileVersionReplacingOptions : ulong { - ByMoving = 1 << 0 + ByMoving = 1 << 0, } [Flags] [Native] public enum NSFileVersionAddingOptions : ulong { - ByMoving = 1 << 0 + ByMoving = 1 << 0, } [Flags] @@ -742,7 +766,7 @@ public enum NSFileCoordinatorReadingOptions : ulong { [MacCatalyst (13, 1)] ImmediatelyAvailableMetadataOnly = 1 << 2, [MacCatalyst (13, 1)] - ForUploading = 1 << 3 + ForUploading = 1 << 3, } [Flags] @@ -763,12 +787,15 @@ public enum NSLinguisticTaggerOptions : ulong { OmitPunctuation = 2, OmitWhitespace = 4, OmitOther = 8, - JoinNames = 16 + JoinNames = 16, } [Native] public enum NSUbiquitousKeyValueStoreChangeReason : long { - ServerChange, InitialSyncChange, QuotaViolationChange, AccountChange + ServerChange, + InitialSyncChange, + QuotaViolationChange, + AccountChange, } [Flags] @@ -777,9 +804,9 @@ public enum NSJsonReadingOptions : ulong { MutableContainers = 1, MutableLeaves = 2, FragmentsAllowed = 4, - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] Json5Allowed = 8, - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] TopLevelDictionaryAssumed = 16, #if !NET [Obsolete ("Use 'FragmentsAllowed. instead.")] @@ -793,17 +820,21 @@ public enum NSJsonWritingOptions : ulong { PrettyPrinted = 1, [MacCatalyst (13, 1)] SortedKeys = (1 << 1), - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] FragmentsAllowed = (1 << 2), - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] WithoutEscapingSlashes = (1 << 3), } [Native] public enum NSLocaleLanguageDirection : ulong { - Unknown, LeftToRight, RightToLeft, TopToBottom, BottomToTop, + Unknown, + LeftToRight, + RightToLeft, + TopToBottom, + BottomToTop, } [Flags] @@ -840,14 +871,14 @@ public enum NSAlignmentOptions : long { [Native] public enum NSFileWrapperReadingOptions : ulong { Immediate = 1 << 0, - WithoutMapping = 1 << 1 + WithoutMapping = 1 << 1, } [Flags] [Native] public enum NSFileWrapperWritingOptions : ulong { Atomic = 1 << 0, - WithNameUpdating = 1 << 1 + WithNameUpdating = 1 << 1, } [Flags] @@ -855,7 +886,7 @@ public enum NSFileWrapperWritingOptions : ulong { public enum NSAttributedStringEnumeration : ulong { None = 0, Reverse = 1 << 1, - LongestEffectiveRangeNotRequired = 1 << 20 + LongestEffectiveRangeNotRequired = 1 << 20, } #if NET || !MONOMAC @@ -872,7 +903,7 @@ public enum NSUnderlineStyle : long { PatternDash = 0x0200, PatternDashDot = 0x0300, PatternDashDotDot = 0x0400, - ByWord = 0x8000 + ByWord = 0x8000, } #endif @@ -882,7 +913,9 @@ public enum NSUnderlineStyle : long { // See https://github.com/xamarin/xamarin-macios/issues/6573 [Native] public enum NSWritingDirection : long { - Natural = -1, LeftToRight = 0, RightToLeft = 1, + Natural = -1, + LeftToRight = 0, + RightToLeft = 1, } [Flags] @@ -898,12 +931,15 @@ public enum NSByteCountFormatterUnits : ulong { UseEB = 1 << 6, UseZB = 1 << 7, UseYBOrHigher = 0x0FF << 8, - UseAll = 0x0FFFF + UseAll = 0x0FFFF, } [Native] public enum NSByteCountFormatterCountStyle : long { - File, Memory, Decimal, Binary + File, + Memory, + Decimal, + Binary, } [Flags] @@ -912,13 +948,13 @@ public enum NSUrlBookmarkCreationOptions : ulong { PreferFileIDResolution = 1 << 8, MinimalBookmark = 1 << 9, SuitableForBookmarkFile = 1 << 10, - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] WithSecurityScope = 1 << 11, - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] SecurityScopeAllowOnlyReadAccess = 1 << 12, - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] CreationWithoutImplicitSecurityScope = 1 << 29, } @@ -927,16 +963,18 @@ public enum NSUrlBookmarkCreationOptions : ulong { public enum NSUrlBookmarkResolutionOptions : ulong { WithoutUI = 1 << 8, WithoutMounting = 1 << 9, - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] WithSecurityScope = 1 << 10, - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] WithoutImplicitStartAccessing = 1 << 15, } [Native] public enum NSLigatureType : long { - None, Default, All + None, + Default, + All, } #if !NET @@ -979,20 +1017,18 @@ public enum NSUrlRequestNetworkServiceType : ulong { Default, [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'PushKit' framework instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'PushKit' framework instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'PushKit' framework instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'PushKit' framework instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PushKit' framework instead.")] VoIP, Video, Background, Voice, - [Watch (5, 0)] [MacCatalyst (13, 1)] ResponsiveData = 6, - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] AVStreaming = 8, - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] ResponsiveAV = 9, [MacCatalyst (13, 1)] @@ -1003,14 +1039,14 @@ public enum NSUrlRequestNetworkServiceType : ulong { [Native] public enum NSSortOptions : ulong { Concurrent = 1 << 0, - Stable = 1 << 4 + Stable = 1 << 4, } [Flags] [Native] public enum NSDataBase64DecodingOptions : ulong { None = 0, - IgnoreUnknownCharacters = 1 + IgnoreUnknownCharacters = 1, } [Flags] @@ -1020,7 +1056,7 @@ public enum NSDataBase64EncodingOptions : ulong { SixtyFourCharacterLineLength = 1, SeventySixCharacterLineLength = 1 << 1, EndLineWithCarriageReturn = 1 << 4, - EndLineWithLineFeed = 1 << 5 + EndLineWithLineFeed = 1 << 5, } [Native] @@ -1028,7 +1064,7 @@ public enum NSUrlSessionAuthChallengeDisposition : long { UseCredential = 0, PerformDefaultHandling = 1, CancelAuthenticationChallenge = 2, - RejectProtectionSpace = 3 + RejectProtectionSpace = 3, } [Native] @@ -1036,7 +1072,7 @@ public enum NSUrlSessionTaskState : long { Running = 0, Suspended = 1, Canceling = 2, - Completed = 3 + Completed = 3, } [Native] @@ -1044,14 +1080,14 @@ public enum NSUrlSessionResponseDisposition : long { Cancel = 0, Allow = 1, BecomeDownload = 2, - BecomeStream = 3 + BecomeStream = 3, } [Native] public enum NSUrlErrorCancelledReason : long { UserForceQuitApplication, BackgroundUpdatesDisabled, - InsufficientSystemResources + InsufficientSystemResources, } [Flags] @@ -1076,7 +1112,7 @@ public enum NSTimeZoneNameStyle : long { DaylightSaving, ShortDaylightSaving, Generic, - ShortGeneric + ShortGeneric, } [MacCatalyst (13, 1)] @@ -1086,7 +1122,7 @@ public enum NSItemProviderErrorCode : long { None = 0, ItemUnavailable = -1000, UnexpectedValueClass = -1100, - UnavailableCoercion = -1200 + UnavailableCoercion = -1200, } [Native] @@ -1111,7 +1147,7 @@ public enum NSDateComponentsFormatterZeroFormattingBehavior : ulong { DropMiddle = (1 << 2), DropTrailing = (1 << 3), DropAll = (DropLeading | DropMiddle | DropTrailing), - Pad = (1 << 16) + Pad = (1 << 16), } [Native] @@ -1122,7 +1158,7 @@ public enum NSFormattingContext : long { Standalone = 2, ListItem = 3, BeginningOfSentence = 4, - MiddleOfSentence = 5 + MiddleOfSentence = 5, } [MacCatalyst (13, 1)] @@ -1132,7 +1168,7 @@ public enum NSDateIntervalFormatterStyle : ulong { Short = 1, Medium = 2, Long = 3, - Full = 4 + Full = 4, } [MacCatalyst (13, 1)] @@ -1141,7 +1177,7 @@ public enum NSEnergyFormatterUnit : long { Joule = 11, Kilojoule = 14, Calorie = (7 << 8) + 1, - Kilocalorie = (7 << 8) + 2 + Kilocalorie = (7 << 8) + 2, } [MacCatalyst (13, 1)] @@ -1149,7 +1185,7 @@ public enum NSEnergyFormatterUnit : long { public enum NSFormattingUnitStyle : long { Short = 1, Medium, - Long + Long, } [MacCatalyst (13, 1)] @@ -1159,7 +1195,7 @@ public enum NSMassFormatterUnit : long { Kilogram = 14, Ounce = (6 << 8) + 1, Pound = (6 << 8) + 2, - Stone = (6 << 8) + 3 + Stone = (6 << 8) + 3, } [MacCatalyst (13, 1)] @@ -1172,7 +1208,7 @@ public enum NSLengthFormatterUnit : long { Inch = (5 << 8) + 1, Foot = (5 << 8) + 2, Yard = (5 << 8) + 3, - Mile = (5 << 8) + 4 + Mile = (5 << 8) + 4, } [MacCatalyst (13, 1)] @@ -1182,18 +1218,23 @@ public enum NSQualityOfService : long { UserInitiated = 25, Utility = 17, Background = 9, - Default = -1 + Default = -1, } [MacCatalyst (13, 1)] [Native] public enum NSProcessInfoThermalState : long { - Nominal, Fair, Serious, Critical + Nominal, + Fair, + Serious, + Critical, } [Native] public enum NSUrlRelationship : long { - Contains, Same, Other + Contains, + Same, + Other, } // NSTextCheckingResult.h:typedef NS_OPTIONS(uint64_t, NSTextCheckingType) @@ -1218,7 +1259,7 @@ public enum NSTextCheckingType : ulong { public enum NSTextCheckingTypes : ulong { AllSystemTypes = 0xffffffff, AllCustomTypes = 0xffffffff00000000, - AllTypes = 0xffffffffffffffff + AllTypes = 0xffffffffffffffff, } [Native] @@ -1230,7 +1271,7 @@ public enum NSRegularExpressionOptions : ulong { DotMatchesLineSeparators = 1 << 3, AnchorsMatchLines = 1 << 4, UseUnixLineSeparators = 1 << 5, - UseUnicodeWordBoundaries = 1 << 6 + UseUnicodeWordBoundaries = 1 << 6, } [Native] @@ -1240,7 +1281,7 @@ public enum NSMatchingOptions : ulong { ReportCompletion = 1 << 1, Anchored = 1 << 2, WithTransparentBounds = 1 << 3, - WithoutAnchoringBounds = 1 << 4 + WithoutAnchoringBounds = 1 << 4, } [Native] @@ -1250,14 +1291,14 @@ public enum NSMatchingFlags : ulong { Completed = 1 << 1, HitEnd = 1 << 2, RequiredEnd = 1 << 3, - InternalError = 1 << 4 + InternalError = 1 << 4, } [MacCatalyst (13, 1)] [Native] [Flags] public enum NSPersonNameComponentsFormatterOptions : ulong { - Phonetic = (1 << 1) + Phonetic = (1 << 1), } [MacCatalyst (13, 1)] @@ -1267,14 +1308,14 @@ public enum NSPersonNameComponentsFormatterStyle : long { Short, Medium, Long, - Abbreviated + Abbreviated, } [MacCatalyst (13, 1)] [Native] public enum NSDecodingFailurePolicy : long { RaiseException, - SetErrorAndReturn + SetErrorAndReturn, } [MacCatalyst (13, 1)] @@ -1304,7 +1345,7 @@ public enum NSUrlSessionTaskMetricsResourceFetchType : long { Unknown, NetworkLoad, ServerPush, - LocalCache + LocalCache, } [MacCatalyst (13, 1)] @@ -1313,7 +1354,7 @@ public enum NSUrlSessionTaskMetricsResourceFetchType : long { public enum NSMeasurementFormatterUnitOptions : ulong { ProvidedUnit = (1 << 0), NaturalScale = (1 << 1), - TemperatureWithoutUnit = (1 << 2) + TemperatureWithoutUnit = (1 << 2), } @@ -1324,7 +1365,7 @@ public enum NSItemProviderRepresentationVisibility : long { [NoMac] [MacCatalyst (13, 1)] Team = 1, - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] Group = 2, OwnProcess = 3, @@ -1368,7 +1409,7 @@ public enum NSFileProtectionType { CompleteUntilFirstUserAuthentication, [Field ("NSFileProtectionNone")] None, - [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSFileProtectionCompleteWhenUserInactive")] CompleteWhenUserInactive, } diff --git a/src/Foundation/EnumDesktop.cs b/src/Foundation/EnumDesktop.cs index 143595edb5d3..68c9a588ee4d 100644 --- a/src/Foundation/EnumDesktop.cs +++ b/src/Foundation/EnumDesktop.cs @@ -28,7 +28,7 @@ using ObjCRuntime; namespace Foundation { - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Internal] internal enum NSAttributedStringDataType { RTF, @@ -39,14 +39,14 @@ internal enum NSAttributedStringDataType { // NSTask.h:typedef NS_ENUM(NSInteger, NSTaskTerminationReason) [Native] - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] public enum NSTaskTerminationReason : long { Exit = 1, UncaughtSignal = 2 } // The following constants where taken from MonoDevelop Carbon.cs MacInterop file - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [MacCatalyst (13, 1)] public enum AEEventID : uint { OpenApplication = 1868656752, // 'oapp' @@ -60,7 +60,7 @@ public enum AEEventID : uint { GetUrl = 1196773964, // 'GURL' } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [MacCatalyst (13, 1)] public enum AEEventClass : uint { Mouse = 1836021107, // 'mous' @@ -85,7 +85,7 @@ public enum AEEventClass : uint { } // Added from NSUserNotification.h - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Native] [Advice ("'NSUserNotification' usages should be replaced with 'UserNotifications' framework.")] public enum NSUserNotificationActivationType : long { @@ -96,7 +96,7 @@ public enum NSUserNotificationActivationType : long { AdditionalActionClicked = 4 } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Native] [Flags] public enum NSAppleEventSendOptions : ulong { diff --git a/src/Foundation/Enums.cs b/src/Foundation/Enums.cs index 3e21603f44a5..7da524b4cc53 100644 --- a/src/Foundation/Enums.cs +++ b/src/Foundation/Enums.cs @@ -12,17 +12,17 @@ public enum NSDocumentType { RTF, RTFD, HTML, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] MacSimpleText, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] DocFormat, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] WordML, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] OfficeOpenXml, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] WebArchive, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] OpenDocument, } #endif // !XAMCORE_5_0 @@ -54,7 +54,7 @@ public enum NSRunLoopMode { [Field ("NSEventTrackingRunLoopMode", "AppKit")] EventTracking, -#elif !WATCH +#else // iOS-specific Enums start in 100 to avoid conflicting with future extensions to MonoMac [Field ("UITrackingRunLoopMode", "UIKit")] UITracking = 100, @@ -131,7 +131,7 @@ public enum NSStringTransform { StripDiacritics, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Native] public enum NSUrlSessionMultipathServiceType : long { @@ -281,7 +281,7 @@ public enum NSStringEnumerationOptions : ulong { Localized = 1uL << 10, } - [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum NSAttributedStringFormattingOptions : ulong { @@ -289,7 +289,7 @@ public enum NSAttributedStringFormattingOptions : ulong { ApplyReplacementIndexAttribute = 1uL << 1, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSAttributedStringMarkdownInterpretedSyntax : long { Full = 0, @@ -297,14 +297,14 @@ public enum NSAttributedStringMarkdownInterpretedSyntax : long { InlineOnlyPreservingWhitespace = 2, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSAttributedStringMarkdownParsingFailurePolicy : long { Error = 0, PartiallyParsedIfPossible = 1, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSGrammaticalGender : long { NotSet = 0, @@ -313,7 +313,7 @@ public enum NSGrammaticalGender : long { Neuter, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSGrammaticalNumber : long { NotSet = 0, @@ -325,7 +325,7 @@ public enum NSGrammaticalNumber : long { PluralMany, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSGrammaticalPartOfSpeech : long { NotSet = 0, @@ -345,7 +345,7 @@ public enum NSGrammaticalPartOfSpeech : long { Abbreviation, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSInlinePresentationIntent : ulong { Emphasized = 1uL << 0, @@ -358,7 +358,7 @@ public enum NSInlinePresentationIntent : ulong { BlockHTML = 1uL << 9, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSPresentationIntentKind : long { Paragraph, @@ -375,7 +375,7 @@ public enum NSPresentationIntentKind : long { TableCell, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSPresentationIntentTableColumnAlignment : long { Left, @@ -383,7 +383,7 @@ public enum NSPresentationIntentTableColumnAlignment : long { Right, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSURLRequestAttribution : ulong { Developer = 0, diff --git a/src/Foundation/NSArray.cs b/src/Foundation/NSArray.cs index fc054c8fbff6..47e644bbb58f 100644 --- a/src/Foundation/NSArray.cs +++ b/src/Foundation/NSArray.cs @@ -533,7 +533,7 @@ static bool DiffEqualityHandler (IntPtr block, IntPtr first, IntPtr second) } #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSArray_1.cs b/src/Foundation/NSArray_1.cs index 0f5ab8886725..4754337a7e7e 100644 --- a/src/Foundation/NSArray_1.cs +++ b/src/Foundation/NSArray_1.cs @@ -106,7 +106,7 @@ public TKey this [nint idx] { #if false // https://github.com/xamarin/xamarin-macios/issues/15577 #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif @@ -114,7 +114,7 @@ public TKey this [nint idx] { => Runtime.GetNSObject > (_GetDifference (NSArray.FromNSObjects (other), options)); #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif @@ -122,7 +122,7 @@ public TKey this [nint idx] { => Runtime.GetNSObject > (_GetDifference (NSArray.FromNSObjects (other))); #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif @@ -143,7 +143,7 @@ static bool DiffEqualityHandlerGeneric (IntPtr block, IntPtr first, IntPtr secon } #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSAttributedString.cs b/src/Foundation/NSAttributedString.cs index e94e05f93aee..5c8de4d962f3 100644 --- a/src/Foundation/NSAttributedString.cs +++ b/src/Foundation/NSAttributedString.cs @@ -28,6 +28,8 @@ #nullable enable using System; +using System.ComponentModel; + using CoreFoundation; using CoreText; using ObjCRuntime; @@ -46,7 +48,7 @@ public partial class NSAttributedString { /// A dictionary of attributes that specifies how to interpret the document contents. /// Upon return, a dictionary of document-specific keys. /// The error if an error occurred. - public static NSAttributedString? Create (NSUrl url, NSDictionary options, out NSDictionary resultDocumentAttributes, out NSError error) + public static NSAttributedString? Create (NSUrl url, NSDictionary options, out NSDictionary resultDocumentAttributes, out NSError? error) { var rv = new NSAttributedString (NSObjectFlag.Empty); rv.InitializeHandle (rv._InitWithUrl (url, options, out resultDocumentAttributes, out error), string.Empty, false); @@ -62,17 +64,34 @@ public partial class NSAttributedString { /// A dictionary of attributes that specifies how to interpret the document contents. /// Upon return, a dictionary of document-specific keys. /// The error if an error occurred. - public static NSAttributedString? Create (NSUrl url, NSAttributedStringDocumentAttributes options, out NSDictionary resultDocumentAttributes, out NSError error) + public static NSAttributedString? Create (NSUrl url, NSAttributedStringDocumentAttributes options, out NSDictionary resultDocumentAttributes, out NSError? error) { return Create (url, options.Dictionary, out resultDocumentAttributes, out error); } + /// Create a new . + /// A url to the document to load. + /// A dictionary of attributes that specifies how to interpret the document contents. + /// The error if an error occurred. + public static NSAttributedString? Create (NSUrl url, NSAttributedStringDocumentAttributes options, out NSError? error) + { + return Create (url, options.Dictionary, out var _, out error); + } + + /// Create a new . + /// A url to the document to load. + /// The error if an error occurred. + public static NSAttributedString? Create (NSUrl url, out NSError? error) + { + return Create (url, new NSDictionary (), out var _, out error); + } + /// Create a new . /// The data to load. /// A dictionary of attributes that specifies how to interpret the document contents. /// Upon return, a dictionary of document-specific keys. /// The error if an error occurred. - public static NSAttributedString? Create (NSData data, NSDictionary options, out NSDictionary resultDocumentAttributes, out NSError error) + public static NSAttributedString? Create (NSData data, NSDictionary options, out NSDictionary resultDocumentAttributes, out NSError? error) { var rv = new NSAttributedString (NSObjectFlag.Empty); rv.InitializeHandle (rv._InitWithData (data, options, out resultDocumentAttributes, out error), string.Empty, false); @@ -88,33 +107,114 @@ public partial class NSAttributedString { /// A dictionary of attributes that specifies how to interpret the document contents. /// Upon return, a dictionary of document-specific keys. /// The error if an error occurred. - public static NSAttributedString? Create (NSData data, NSAttributedStringDocumentAttributes options, out NSDictionary resultDocumentAttributes, out NSError error) + public static NSAttributedString? Create (NSData data, NSAttributedStringDocumentAttributes options, out NSDictionary resultDocumentAttributes, out NSError? error) { return Create (data, options.Dictionary, out resultDocumentAttributes, out error); } + /// Create a new . + /// The data to load. + /// A dictionary of attributes that specifies how to interpret the document contents. + /// The error if an error occurred. + public static NSAttributedString? Create (NSData data, NSAttributedStringDocumentAttributes options, out NSError? error) + { + return Create (data, options.Dictionary, out var _, out error); + } + + /// Create a new . + /// The data to load. + /// The error if an error occurred. + public static NSAttributedString? Create (NSData data, out NSError? error) + { + return Create (data, new NSDictionary (), out var _, out error); + } + + /// Create a new from a markdown file. + /// The url of the file to load. + /// A dictionary of attributes that specifies how to interpret the document contents. + /// The base url to use when resolving markdown urls. + /// The error if an error occurred. + public static NSAttributedString? Create (NSUrl markdownFile, NSAttributedStringMarkdownParsingOptions? options, NSUrl? baseUrl, out NSError? error) + { + var rv = new NSAttributedString (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithContentsOfMarkdownFile (markdownFile, options, baseUrl, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); + return null; + } + return rv; + } + + /// Create a new from markdown data. + /// The markdown data to load. + /// A dictionary of attributes that specifies how to interpret the document contents. + /// The base url to use when resolving markdown urls. + /// The error if an error occurred. + public static NSAttributedString? Create (NSData markdown, NSAttributedStringMarkdownParsingOptions? options, NSUrl? baseUrl, out NSError? error) + { + var rv = new NSAttributedString (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithMarkdown (markdown, options, baseUrl, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); + return null; + } + return rv; + } + + /// Create a new from a string with markdown. + /// The markdown string to load. + /// A dictionary of attributes that specifies how to interpret the document contents. + /// The base url to use when resolving markdown urls. + /// The error if an error occurred. + public static NSAttributedString? Create (string markdownString, NSAttributedStringMarkdownParsingOptions? options, NSUrl? baseUrl, out NSError? error) + { + var rv = new NSAttributedString (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithMarkdownString (markdownString, options, baseUrl, out error), string.Empty, false); + if (rv.Handle == IntPtr.Zero) { + rv.Dispose (); + return null; + } + return rv; + } + #if __MACOS__ || XAMCORE_5_0 + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSUrl url, NSAttributedStringDocumentAttributes documentAttributes, out NSError error) : this (url, documentAttributes, out var _, out error) {} + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSData data, NSAttributedStringDocumentAttributes documentAttributes, out NSError error) : this (data, documentAttributes, out var _, out error) {} + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSUrl url, out NSError error) : this (url, new NSDictionary (), out var _, out error) {} + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSData data, out NSError error) : this (data, new NSDictionary (), out var _, out error) {} #else + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSUrl url, NSAttributedStringDocumentAttributes documentAttributes, ref NSError error) : this (url, documentAttributes, out var _, ref error) { } + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSData data, NSAttributedStringDocumentAttributes documentAttributes, ref NSError error) : this (data, documentAttributes, out var _, ref error) { } + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSUrl url, ref NSError error) : this (url, new NSDictionary (), out var _, ref error) { } + [EditorBrowsable (EditorBrowsableState.Never)] + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSData data, ref NSError error) : this (data, new NSDictionary (), out var _, ref error) { } #endif @@ -197,9 +297,7 @@ public NSAttributedString (string str, UIStringAttributes? attributes) NSLigatureType ligature, float kerning, NSUnderlineStyle underlineStyle, -#if !WATCH NSShadow? shadow, -#endif float strokeWidth, NSUnderlineStyle strikethroughStyle) { @@ -228,11 +326,9 @@ public NSAttributedString (string str, UIStringAttributes? attributes) if (underlineStyle != NSUnderlineStyle.None) { attr.UnderlineStyle = underlineStyle; } -#if !WATCH if (shadow is not null) { attr.Shadow = shadow; } -#endif if (strokeWidth != 0) { attr.StrokeWidth = strokeWidth; } @@ -252,15 +348,11 @@ public NSAttributedString (string str, NSLigatureType ligatures = NSLigatureType.Default, float kerning = 0, NSUnderlineStyle underlineStyle = NSUnderlineStyle.None, -#if !WATCH NSShadow? shadow = null, -#endif float strokeWidth = 0, NSUnderlineStyle strikethroughStyle = NSUnderlineStyle.None) : this (str, ToDictionary (font, foregroundColor, backgroundColor, strokeColor, paragraphStyle, ligatures, kerning, underlineStyle, -#if !WATCH shadow, -#endif strokeWidth, strikethroughStyle)) { } diff --git a/src/Foundation/NSAttributedStringDocumentAttributes.cs b/src/Foundation/NSAttributedStringDocumentAttributes.cs index 1f7812bf199f..df70ff9d546a 100644 --- a/src/Foundation/NSAttributedStringDocumentAttributes.cs +++ b/src/Foundation/NSAttributedStringDocumentAttributes.cs @@ -104,7 +104,7 @@ public bool ReadOnly { } #endif // XAMCORE_5_0 || __MACOS__ -#if !TVOS && !WATCH +#if !TVOS // documentation is unclear if an NSString or an NSUrl should be used... // but providing an `NSString` throws a `NSInvalidArgumentException Reason: (null) is not a file URL` #if NET @@ -123,7 +123,7 @@ public NSUrl? ReadAccessUrl { SetNativeValue (NSAttributedStringDocumentReadingOptionKey.ReadAccessUrlDocumentOption, value); } } -#endif // !TVOS && !WATCH +#endif // !TVOS #if __MACOS__ #if NET diff --git a/src/Foundation/NSCalendar.cs b/src/Foundation/NSCalendar.cs index 8713a1779e13..1480b4163d7e 100644 --- a/src/Foundation/NSCalendar.cs +++ b/src/Foundation/NSCalendar.cs @@ -32,9 +32,7 @@ using CoreFoundation; using Foundation; using CoreGraphics; -#if !WATCH using CoreMedia; -#endif namespace Foundation { public enum NSCalendarType { diff --git a/src/Foundation/NSError.cs b/src/Foundation/NSError.cs index 006589cfbf03..f55503747d08 100644 --- a/src/Foundation/NSError.cs +++ b/src/Foundation/NSError.cs @@ -69,15 +69,6 @@ public override string ToString () { return LocalizedDescription; } - -#if __IOS__ && !NET - [Obsolete (Constants.WatchKitRemoved)] - public static NSString WatchKitErrorDomain { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } -#endif // __IOS__ #endif } } diff --git a/src/Foundation/NSExpression.cs b/src/Foundation/NSExpression.cs index eea476067795..143e55f52137 100644 --- a/src/Foundation/NSExpression.cs +++ b/src/Foundation/NSExpression.cs @@ -175,7 +175,7 @@ public virtual NSExpression Operand { } } -#if !NET && !WATCH +#if !NET [Obsolete ("Use 'EvaluateWith' instead.")] public virtual NSExpression ExpressionValueWithObject (NSObject obj, NSMutableDictionary context) { diff --git a/src/Foundation/NSFileManager.cs b/src/Foundation/NSFileManager.cs index eb0eed75fac5..4c5fb422b4a7 100644 --- a/src/Foundation/NSFileManager.cs +++ b/src/Foundation/NSFileManager.cs @@ -39,7 +39,13 @@ namespace Foundation { // This is a convenience enum around a set of native strings. public enum NSFileType { - Directory, Regular, SymbolicLink, Socket, CharacterSpecial, BlockSpecial, Unknown + Directory, + Regular, + SymbolicLink, + Socket, + CharacterSpecial, + BlockSpecial, + Unknown, } #if !MONOMAC diff --git a/src/Foundation/NSLayoutConstraint.cs b/src/Foundation/NSLayoutConstraint.cs index 72c0a635cde4..9510057ab89d 100644 --- a/src/Foundation/NSLayoutConstraint.cs +++ b/src/Foundation/NSLayoutConstraint.cs @@ -7,8 +7,6 @@ // Copyright 2014 Xamarin INc // -#if !WATCH - using System; using Foundation; using ObjCRuntime; @@ -145,5 +143,3 @@ public NSLayoutAnchor SecondAnchor () where AnchorType : #endif // !MONOMAC || NET } } - -#endif // !WATCH diff --git a/src/Foundation/NSMetadataItem.cs b/src/Foundation/NSMetadataItem.cs index 9559a1ae854c..c331128f857c 100644 --- a/src/Foundation/NSMetadataItem.cs +++ b/src/Foundation/NSMetadataItem.cs @@ -324,7 +324,6 @@ public NSUrl? UbiquitousItemUrlInLocalContainer { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -340,7 +339,6 @@ public string? []? Keywords { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -356,7 +354,6 @@ public string? Title { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -372,7 +369,6 @@ public string? []? Authors { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -388,7 +384,6 @@ public string? []? Editors { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -404,7 +399,6 @@ public string? []? Participants { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -420,7 +414,6 @@ public string? []? Projects { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -436,7 +429,6 @@ public NSDate? DownloadedDate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -452,7 +444,6 @@ public string? []? WhereFroms { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -468,7 +459,6 @@ public string? Comment { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -484,7 +474,6 @@ public string? Copyright { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -500,7 +489,6 @@ public NSDate? LastUsedDate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -516,7 +504,6 @@ public NSDate? ContentCreationDate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -532,7 +519,6 @@ public NSDate? ContentModificationDate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -548,7 +534,6 @@ public NSDate? DateAdded { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -564,7 +549,6 @@ public double? DurationSeconds { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -580,7 +564,6 @@ public string? []? ContactKeywords { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -596,7 +579,6 @@ public string? Version { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -612,7 +594,6 @@ public nint? PixelHeight { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -628,7 +609,6 @@ public nint? PixelWidth { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -644,7 +624,6 @@ public nint? PixelCount { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -660,7 +639,6 @@ public string? ColorSpace { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -676,7 +654,6 @@ public nint? BitsPerSample { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -692,7 +669,6 @@ public bool? FlashOnOff { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -708,7 +684,6 @@ public double? FocalLength { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -724,7 +699,6 @@ public string? AcquisitionMake { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -740,7 +714,6 @@ public string? AcquisitionModel { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -756,7 +729,6 @@ public double? IsoSpeed { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -772,7 +744,6 @@ public nint? Orientation { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -788,7 +759,6 @@ public string? []? LayerNames { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -804,7 +774,6 @@ public double? WhiteBalance { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -820,7 +789,6 @@ public double? Aperture { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -836,7 +804,6 @@ public string? ProfileName { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -852,7 +819,6 @@ public nint? ResolutionWidthDpi { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -868,7 +834,6 @@ public nint? ResolutionHeightDpi { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -884,7 +849,6 @@ public nint? ExposureMode { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -900,7 +864,6 @@ public double? ExposureTimeSeconds { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -916,7 +879,6 @@ public string? ExifVersion { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -932,7 +894,6 @@ public string? CameraOwner { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -948,7 +909,6 @@ public nint? FocalLength35mm { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -964,7 +924,6 @@ public string? LensModel { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -980,7 +939,6 @@ public string? ExifGpsVersion { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -996,7 +954,6 @@ public double? Altitude { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1012,7 +969,6 @@ public double? Latitude { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1028,7 +984,6 @@ public double? Longitude { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1044,7 +999,6 @@ public double? Speed { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1060,7 +1014,6 @@ public NSDate? Timestamp { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1076,7 +1029,6 @@ public double? GpsTrack { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1092,7 +1044,6 @@ public double? ImageDirection { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1108,7 +1059,6 @@ public string? NamedLocation { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1124,7 +1074,6 @@ public string? GpsStatus { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1140,7 +1089,6 @@ public string? GpsMeasureMode { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1156,7 +1104,6 @@ public double? GpsDop { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1172,7 +1119,6 @@ public string? GpsMapDatum { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1188,7 +1134,6 @@ public double? GpsDestLatitude { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1204,7 +1149,6 @@ public double? GpsDestLongitude { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1220,7 +1164,6 @@ public double? GpsDestBearing { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1236,7 +1179,6 @@ public double? GpsDestDistance { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1252,7 +1194,6 @@ public string? GpsProcessingMethod { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1268,7 +1209,6 @@ public string? GpsAreaInformation { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1284,7 +1224,6 @@ public NSDate? GpsDateStamp { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1300,7 +1239,6 @@ public double? GpsDifferental { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1316,7 +1254,6 @@ public string? []? Codecs { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1332,7 +1269,6 @@ public string? []? MediaTypes { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1348,7 +1284,6 @@ public bool? Streamable { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1364,7 +1299,6 @@ public nint? TotalBitRate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1380,7 +1314,6 @@ public nint? VideoBitRate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1396,7 +1329,6 @@ public nint? AudioBitRate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1412,7 +1344,6 @@ public string? DeliveryType { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1428,7 +1359,6 @@ public string? Album { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1444,7 +1374,6 @@ public bool? HasAlphaChannel { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1460,7 +1389,6 @@ public bool? RedEyeOnOff { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1476,7 +1404,6 @@ public string? MeteringMode { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1492,7 +1419,6 @@ public double? MaxAperture { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1508,7 +1434,6 @@ public nint? FNumber { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1524,7 +1449,6 @@ public string? ExposureProgram { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1540,7 +1464,6 @@ public string? ExposureTimeString { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1556,7 +1479,6 @@ public string? Headline { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1572,7 +1494,6 @@ public string? Instructions { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1588,7 +1509,6 @@ public string? City { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1604,7 +1524,6 @@ public string? StateOrProvince { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1620,7 +1539,6 @@ public string? Country { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1636,7 +1554,6 @@ public string? TextContent { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1652,7 +1569,6 @@ public nint? AudioSampleRate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1668,7 +1584,6 @@ public nint? AudioChannelCount { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1684,7 +1599,6 @@ public double? Tempo { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1700,7 +1614,6 @@ public string? KeySignature { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1716,7 +1629,6 @@ public string? TimeSignature { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1732,7 +1644,6 @@ public string? AudioEncodingApplication { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1748,7 +1659,6 @@ public string? Composer { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1764,7 +1674,6 @@ public string? Lyricist { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1780,7 +1689,6 @@ public nint? AudioTrackNumber { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1796,7 +1704,6 @@ public NSDate? RecordingDate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1812,7 +1719,6 @@ public string? MusicalGenre { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1828,7 +1734,6 @@ public bool? IsGeneralMidiSequence { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1844,7 +1749,6 @@ public nint? RecordingYear { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1860,7 +1764,6 @@ public string? []? Organizations { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1876,7 +1779,6 @@ public string? []? Languages { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1892,7 +1794,6 @@ public string? Rights { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1908,7 +1809,6 @@ public string? []? Publishers { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1924,7 +1824,6 @@ public string? []? Contributors { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1940,7 +1839,6 @@ public string? []? Coverage { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1956,7 +1854,6 @@ public string? Subject { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1972,7 +1869,6 @@ public string? Theme { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -1988,7 +1884,6 @@ public string? Description { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2004,7 +1899,6 @@ public string? Identifier { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2020,7 +1914,6 @@ public string? []? Audiences { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2036,7 +1929,6 @@ public nint? NumberOfPages { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2052,7 +1944,6 @@ public double? PageWidth { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2068,7 +1959,6 @@ public double? PageHeight { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2084,7 +1974,6 @@ public string? SecurityMethod { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2100,7 +1989,6 @@ public string? Creator { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2116,7 +2004,6 @@ public string? []? EncodingApplications { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2132,7 +2019,6 @@ public NSDate? DueDate { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2148,7 +2034,6 @@ public double? StarRating { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2164,7 +2049,6 @@ public string? []? PhoneNumbers { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2180,7 +2064,6 @@ public string? []? EmailAddresses { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2196,7 +2079,6 @@ public string? []? InstantMessageAddresses { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2212,7 +2094,6 @@ public string? Kind { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2228,7 +2109,6 @@ public string? []? Recipients { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2244,7 +2124,6 @@ public string? FinderComment { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2260,7 +2139,6 @@ public string? []? Fonts { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2276,7 +2154,6 @@ public string? AppleLoopsRoot { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2292,7 +2169,6 @@ public string? AppleLoopsKeyFilterType { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2308,7 +2184,6 @@ public string? AppleLoopsLoopMode { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2324,7 +2199,6 @@ public string? []? AppleLoopDescriptors { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2340,7 +2214,6 @@ public string? MusicalInstrumentCategory { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2356,7 +2229,6 @@ public string? MusicalInstrumentName { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2372,7 +2244,6 @@ public string? CFBundleIdentifier { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2388,7 +2259,6 @@ public string? Information { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2404,7 +2274,6 @@ public string? Director { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2420,7 +2289,6 @@ public string? Producer { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2436,7 +2304,6 @@ public string? Genre { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2452,7 +2319,6 @@ public string? []? Performers { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2468,7 +2334,6 @@ public string? OriginalFormat { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2484,7 +2349,6 @@ public string? OriginalSource { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2500,7 +2364,6 @@ public string? []? AuthorEmailAddresses { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2516,7 +2379,6 @@ public string? []? RecipientEmailAddresses { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2532,7 +2394,6 @@ public string? []? AuthorAddresses { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2548,7 +2409,6 @@ public string? []? RecipientAddresses { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2564,7 +2424,6 @@ public bool? IsLikelyJunk { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2580,7 +2439,6 @@ public string? []? ExecutableArchitectures { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2596,7 +2454,6 @@ public string? ExecutablePlatform { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -2612,7 +2469,6 @@ public string? []? ApplicationCategories { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif diff --git a/src/Foundation/NSMutableArray_1.cs b/src/Foundation/NSMutableArray_1.cs index 2dff1e811196..2334220117dc 100644 --- a/src/Foundation/NSMutableArray_1.cs +++ b/src/Foundation/NSMutableArray_1.cs @@ -202,7 +202,7 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator () #if false // https://github.com/xamarin/xamarin-macios/issues/15577 #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSMutableAttributedString.cs b/src/Foundation/NSMutableAttributedString.cs index 60a3584e0c7e..5adf27350067 100644 --- a/src/Foundation/NSMutableAttributedString.cs +++ b/src/Foundation/NSMutableAttributedString.cs @@ -27,8 +27,6 @@ // // -#if !WATCH // This file needs some work before it can get included in WatchOS - using System; #if !MONOMAC using UIKit; @@ -103,5 +101,3 @@ public NSMutableAttributedString (string str, #endif } } - -#endif // !WATCH diff --git a/src/Foundation/NSMutableAttributedString.iOS.cs b/src/Foundation/NSMutableAttributedString.iOS.cs index e4a1052f04c2..7408b76141a4 100644 --- a/src/Foundation/NSMutableAttributedString.iOS.cs +++ b/src/Foundation/NSMutableAttributedString.iOS.cs @@ -6,7 +6,6 @@ // // -#if !WATCH // NSMutableAttributedString needs some work before it can be included in WatchOS #if !MONOMAC using UIKit; @@ -32,4 +31,3 @@ public void AddAttributes (UIStringAttributes attrs, NSRange range) } #endif // !MONOMAC -#endif // !WATCH diff --git a/src/Foundation/NSMutableOrderedSet_1.cs b/src/Foundation/NSMutableOrderedSet_1.cs index b4aeeac4e4a1..1a872f221ec6 100644 --- a/src/Foundation/NSMutableOrderedSet_1.cs +++ b/src/Foundation/NSMutableOrderedSet_1.cs @@ -240,7 +240,7 @@ IEnumerator IEnumerable.GetEnumerator () #if false // https://github.com/xamarin/xamarin-macios/issues/15577 #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSNetService.cs b/src/Foundation/NSNetService.cs index 4d4efb6b49df..65362045d903 100644 --- a/src/Foundation/NSNetService.cs +++ b/src/Foundation/NSNetService.cs @@ -21,8 +21,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !WATCH // __WATCHOS_PROHIBITED - using System; // Disable until we get around to enable + fix any issues. @@ -39,5 +37,3 @@ public virtual NSData TxtRecordData { } } } - -#endif // !WATCH diff --git a/src/Foundation/NSObject.iOS.cs b/src/Foundation/NSObject.iOS.cs index bdb5c390bfca..541843bc5cc0 100644 --- a/src/Foundation/NSObject.iOS.cs +++ b/src/Foundation/NSObject.iOS.cs @@ -8,7 +8,7 @@ namespace Foundation { public partial class NSObject { #if !COREBUILD -#if !NET && !WATCH +#if !NET [Obsolete ("Use 'PlatformAssembly' for easier code sharing across platforms.")] public readonly static Assembly MonoTouchAssembly = typeof (NSObject).Assembly; #endif diff --git a/src/Foundation/NSObject.mac.cs b/src/Foundation/NSObject.mac.cs index 937abf4a0837..0f92d00a4f34 100644 --- a/src/Foundation/NSObject.mac.cs +++ b/src/Foundation/NSObject.mac.cs @@ -42,9 +42,6 @@ public partial class NSObject { static IntPtr ct = Dlfcn.dlopen (Constants.CoreTextLibrary, 1); static IntPtr wl = Dlfcn.dlopen (Constants.WebKitLibrary, 1); static IntPtr zl = Dlfcn.dlopen (Constants.QuartzLibrary, 1); -#if !NET - static IntPtr ql = Dlfcn.dlopen (Constants.QTKitLibrary, 1); -#endif static IntPtr cl = Dlfcn.dlopen (Constants.CoreLocationLibrary, 1); static IntPtr ll = Dlfcn.dlopen (Constants.SecurityLibrary, 1); static IntPtr zc = Dlfcn.dlopen (Constants.QuartzComposerLibrary, 1); @@ -117,6 +114,7 @@ public partial class NSObject { // FSKit was removed from Xcode 16 RC, but keeping it commented, because it's likely to return in a later release // static IntPtr fk = Dlfcn.dlopen (Constants.FSKitLibrary, 1); static IntPtr be = Dlfcn.dlopen (Constants.BrowserEngineKitLibrary, 1); + static IntPtr ce = Dlfcn.dlopen (Constants.CoreHapticsLibrary, 1); #if !NET [Obsolete ("Use PlatformAssembly for easier code sharing across platforms.")] diff --git a/src/Foundation/NSObject2.cs b/src/Foundation/NSObject2.cs index 3c976d19de92..83e42eb6d954 100644 --- a/src/Foundation/NSObject2.cs +++ b/src/Foundation/NSObject2.cs @@ -42,10 +42,8 @@ using Xamarin.Bundler; #if MONOTOUCH using UIKit; -#if !WATCH using CoreAnimation; #endif -#endif using CoreGraphics; #endif @@ -569,12 +567,17 @@ bool DynamicConformsToProtocol (NativeHandle protocol) return false; } + /// Calls the 'release' selector on this object. [EditorBrowsable (EditorBrowsableState.Advanced)] public void DangerousRelease () { DangerousRelease (handle); } + /// Calls the 'release' selector on an Objective-C object. + /// The Objective-C object to release. + /// It's safe to call this function with . + [EditorBrowsable (EditorBrowsableState.Never)] internal static void DangerousRelease (NativeHandle handle) { if (handle == IntPtr.Zero) @@ -586,6 +589,10 @@ internal static void DangerousRelease (NativeHandle handle) #endif } + /// Calls the 'retain' selector on an Objective-C object. + /// The Objective-C object to retain. + /// It's safe to call this function with . + [EditorBrowsable (EditorBrowsableState.Never)] internal static void DangerousRetain (NativeHandle handle) { if (handle == IntPtr.Zero) @@ -597,6 +604,9 @@ internal static void DangerousRetain (NativeHandle handle) #endif } + /// Calls the 'autorelease' selector on an Objective-C object. + /// The Objective-C object to autorelease. + /// It's safe to call this function with . internal static void DangerousAutorelease (NativeHandle handle) { #if MONOMAC @@ -606,25 +616,21 @@ internal static void DangerousAutorelease (NativeHandle handle) #endif } + /// Calls the 'retain' selector on this object. + /// This object. [EditorBrowsable (EditorBrowsableState.Advanced)] public NSObject DangerousRetain () { -#if MONOMAC - Messaging.void_objc_msgSend (handle, Selector.RetainHandle); -#else - Messaging.void_objc_msgSend (handle, Selector.GetHandle (Selector.Retain)); -#endif + DangerousRetain (handle); return this; } + /// Calls the 'autorelease' selector on this object. + /// This object. [EditorBrowsable (EditorBrowsableState.Advanced)] public NSObject DangerousAutorelease () { -#if MONOMAC - Messaging.void_objc_msgSend (handle, Selector.AutoreleaseHandle); -#else - Messaging.void_objc_msgSend (handle, Selector.GetHandle (Selector.Autorelease)); -#endif + DangerousAutorelease (handle); return this; } @@ -861,10 +867,8 @@ public static NSObject FromObject (object obj) return NSValue.FromCGAffineTransform ((CGAffineTransform) obj); else if (t == typeof (UIEdgeInsets)) return NSValue.FromUIEdgeInsets ((UIEdgeInsets) obj); -#if !WATCH else if (t == typeof (CATransform3D)) return NSValue.FromCATransform3D ((CATransform3D) obj); -#endif #endif // last chance for types like CGPath, CGColor... that are not NSObject but are CFObject // see https://bugzilla.xamarin.com/show_bug.cgi?id=8458 diff --git a/src/Foundation/NSOrderedCollectionChange.cs b/src/Foundation/NSOrderedCollectionChange.cs index cf56c4aabf15..7b9860df6920 100644 --- a/src/Foundation/NSOrderedCollectionChange.cs +++ b/src/Foundation/NSOrderedCollectionChange.cs @@ -11,7 +11,7 @@ namespace Foundation { #if false // https://github.com/xamarin/xamarin-macios/issues/15577 #if !NET - [iOS (13,0), TV (13,0), Watch (6,0)] + [iOS (13,0), TV (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSOrderedCollectionChange_1.cs b/src/Foundation/NSOrderedCollectionChange_1.cs index b0f5817a7058..cf6ffb51060c 100644 --- a/src/Foundation/NSOrderedCollectionChange_1.cs +++ b/src/Foundation/NSOrderedCollectionChange_1.cs @@ -11,7 +11,7 @@ namespace Foundation { #if false // https://github.com/xamarin/xamarin-macios/issues/15577 #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSOrderedCollectionDifference.cs b/src/Foundation/NSOrderedCollectionDifference.cs index 05348930476d..2d97759d47d3 100644 --- a/src/Foundation/NSOrderedCollectionDifference.cs +++ b/src/Foundation/NSOrderedCollectionDifference.cs @@ -12,7 +12,7 @@ namespace Foundation { public delegate NSOrderedCollectionDifference? NSOrderedCollectionDifferenceGetDifferenceHandler (NSOrderedCollectionChange? collectionChange); #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSOrderedCollectionDifference_1.cs b/src/Foundation/NSOrderedCollectionDifference_1.cs index 68be9b9ef1cc..99dd765f924b 100644 --- a/src/Foundation/NSOrderedCollectionDifference_1.cs +++ b/src/Foundation/NSOrderedCollectionDifference_1.cs @@ -13,7 +13,7 @@ namespace Foundation { #if false // https://github.com/xamarin/xamarin-macios/issues/15577 #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSOrderedSet.cs b/src/Foundation/NSOrderedSet.cs index f1874f4a3f04..6346dac26c6f 100644 --- a/src/Foundation/NSOrderedSet.cs +++ b/src/Foundation/NSOrderedSet.cs @@ -217,7 +217,7 @@ static bool DiffEqualityHandler (IntPtr block, IntPtr first, IntPtr second) } #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSOrderedSet_1.cs b/src/Foundation/NSOrderedSet_1.cs index 62e8bbc4eab6..947e6b72b234 100644 --- a/src/Foundation/NSOrderedSet_1.cs +++ b/src/Foundation/NSOrderedSet_1.cs @@ -210,7 +210,7 @@ public override int GetHashCode () #if false // https://github.com/xamarin/xamarin-macios/issues/15577 #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif @@ -218,7 +218,7 @@ public NSOrderedCollectionDifference GetDifference (NSOrderedSet oth => new NSOrderedCollectionDifference (_GetDifference (other, options)); #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif @@ -226,7 +226,7 @@ public NSOrderedCollectionDifference GetDifference (NSOrderedSet other) => new NSOrderedCollectionDifference (_GetDifference (other)); #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif @@ -251,7 +251,7 @@ static bool DiffEqualityHandlerGeneric (IntPtr block, IntPtr first, IntPtr secon } #if !NET - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] #else [SupportedOSPlatform ("ios13.0"), SupportedOSPlatform ("tvos13.0"), SupportedOSPlatform ("macos")] #endif diff --git a/src/Foundation/NSStream.cs b/src/Foundation/NSStream.cs index 70db33f68e1f..bae93f568a57 100644 --- a/src/Foundation/NSStream.cs +++ b/src/Foundation/NSStream.cs @@ -34,24 +34,31 @@ using System.Net; using System.Net.Sockets; using ObjCRuntime; -#if !WATCH #if NET using CFNetwork; #else using CoreServices; #endif -#endif // Disable until we get around to enable + fix any issues. #nullable disable namespace Foundation { public enum NSStreamSocketSecurityLevel { - None, SslV2, SslV3, TlsV1, NegotiatedSsl, Unknown + None, + SslV2, + SslV3, + TlsV1, + NegotiatedSsl, + Unknown, } public enum NSStreamServiceType { - Default, VoIP, Video, Background, Voice + Default, + VoIP, + Video, + Background, + Voice, } #if NET @@ -245,7 +252,6 @@ public static void CreatePairWithPeerSocketSignature (AddressFamily family, Sock } } -#if !WATCH // There's no CFStreamCreatePairWithSocketToCFHost in WatchOS public static void CreatePairWithSocketToHost (IPEndPoint endpoint, out NSInputStream readStream, out NSOutputStream writeStream) @@ -258,7 +264,6 @@ public static void CreatePairWithSocketToHost (IPEndPoint endpoint, AssignStreams (read, write, out readStream, out writeStream); } } -#endif public static void CreateBoundPair (out NSInputStream readStream, out NSOutputStream writeStream, nint bufferSize) { diff --git a/src/Foundation/NSUrlConnection.cs b/src/Foundation/NSUrlConnection.cs deleted file mode 100644 index 9db4813ca24a..000000000000 --- a/src/Foundation/NSUrlConnection.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -// NSUrlConnection.cs: -// Author: -// Miguel de Icaza -// Copyright 2011, 2012 Xamarin Inc -// - -using System; -using System.ComponentModel; -using System.Collections; -using System.Runtime.InteropServices; - -using ObjCRuntime; - -#nullable enable - -namespace Foundation { -#if !XAMCORE_5_0 && __WATCHOS__ - public partial class NSUrlConnection { - [EditorBrowsable (EditorBrowsableState.Never)] - [Obsolete ("This API is not available on this platform.")] - public static NSData? SendSynchronousRequest (NSUrlRequest request, out NSUrlResponse? response, out NSError? error) - { - // This method was added to watchOS by mistake, the corresponding native API does not exist on watchOS. - throw new PlatformNotSupportedException (); - } - } -#endif // !XAMCORE_5_0 && __WATCHOS__ -} diff --git a/src/Foundation/NSUrlSessionConfiguration.cs b/src/Foundation/NSUrlSessionConfiguration.cs index e3f399502beb..1b2efc8c3303 100644 --- a/src/Foundation/NSUrlSessionConfiguration.cs +++ b/src/Foundation/NSUrlSessionConfiguration.cs @@ -71,7 +71,7 @@ public static NSUrlSessionConfiguration CreateBackgroundSessionConfiguration (st [SupportedOSPlatform ("maccatalyst17.0")] [SupportedOSPlatform ("tvos17.0")] #else - [TV (17, 0), Watch (10, 0), iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0)] #endif public NWProxyConfig [] ProxyConfigurations { get => NSArray.ArrayFromHandleFunc (_ProxyConfigurations, handle => new NWProxyConfig (handle, owns: false)); diff --git a/src/Foundation/NSUrlSessionHandler.cs b/src/Foundation/NSUrlSessionHandler.cs index 6e7788210a48..571e69c12de9 100644 --- a/src/Foundation/NSUrlSessionHandler.cs +++ b/src/Foundation/NSUrlSessionHandler.cs @@ -127,7 +127,7 @@ public partial class NSUrlSessionHandler : HttpMessageHandler { readonly Dictionary inflightRequests; readonly object inflightRequestsLock = new object (); readonly NSUrlSessionConfiguration.SessionConfigurationType sessionType; -#if !MONOMAC && !__WATCHOS__ +#if !MONOMAC NSObject? notificationToken; // needed to make sure we do not hang if not using a background session readonly object notificationTokenLock = new object (); // need to make sure that threads do no step on each other with a dispose and a remove inflight data #endif @@ -178,7 +178,7 @@ public NSUrlSessionHandler (NSUrlSessionConfiguration configuration) inflightRequests = new Dictionary (); } -#if !MONOMAC && !__WATCHOS__ && !NET8_0 +#if !MONOMAC && !NET8_0 void AddNotification () { @@ -227,7 +227,7 @@ void RemoveInflightData (NSUrlSessionTask task, bool cancel = true) data.CancellationTokenSource.Cancel (); inflightRequests.Remove (task); } -#if !MONOMAC && !__WATCHOS__ && !NET8_0 +#if !MONOMAC && !NET8_0 // do we need to be notified? If we have not inflightData, we do not if (inflightRequests.Count == 0) RemoveNotification (); @@ -243,7 +243,7 @@ void RemoveInflightData (NSUrlSessionTask task, bool cancel = true) protected override void Dispose (bool disposing) { lock (inflightRequestsLock) { -#if !MONOMAC && !__WATCHOS__ && !NET8_0 +#if !MONOMAC && !NET8_0 // remove the notification if present, method checks against null RemoveNotification (); #endif @@ -422,19 +422,13 @@ static Exception createExceptionForNSError (NSError error) // errors that exists in both share the same error code, so we can use a single switch/case // this also ease watchOS integration as if does not expose CFNetwork but (I would not be // surprised if it)could return some of it's error codes -#if __WATCHOS__ - if (error.Domain == NSError.NSUrlErrorDomain) { -#else if ((error.Domain == NSError.NSUrlErrorDomain) || (error.Domain == NSError.CFNetworkErrorDomain)) { -#endif // Apple docs: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/index.html#//apple_ref/doc/constant_group/URL_Loading_System_Error_Codes // .NET docs: http://msdn.microsoft.com/en-us/library/system.net.webexceptionstatus(v=vs.110).aspx switch ((NSUrlError) (long) error.Code) { case NSUrlError.Cancelled: case NSUrlError.UserCancelledAuthentication: -#if !__WATCHOS__ case (NSUrlError) NSNetServicesStatus.CancelledError: -#endif // No more processing is required so just return. return new OperationCanceledException (error.LocalizedDescription, innerException); } @@ -521,7 +515,7 @@ protected override async Task SendAsync (HttpRequestMessage var inflightData = new InflightData (request.RequestUri?.AbsoluteUri!, cancellationToken, request); lock (inflightRequestsLock) { -#if !MONOMAC && !__WATCHOS__ && !NET8_0 +#if !MONOMAC && !NET8_0 // Add the notification whenever needed AddNotification (); #endif @@ -743,8 +737,6 @@ static bool IsSecTrustGetCertificateChainSupported { if (!isSecTrustGetCertificateChainSupported.HasValue) { #if MONOMAC isSecTrustGetCertificateChainSupported = ObjCRuntime.SystemVersion.CheckmacOS (12, 0); -#elif WATCH - isSecTrustGetCertificateChainSupported = ObjCRuntime.SystemVersion.CheckWatchOS (8, 0); #elif IOS || TVOS || MACCATALYST isSecTrustGetCertificateChainSupported = ObjCRuntime.SystemVersion.CheckiOS (15, 0); #else diff --git a/src/Foundation/RegisterAttribute.cs b/src/Foundation/RegisterAttribute.cs index 91f7e3d36632..219274ce8b5a 100644 --- a/src/Foundation/RegisterAttribute.cs +++ b/src/Foundation/RegisterAttribute.cs @@ -55,5 +55,22 @@ public bool IsWrapper { } public bool SkipRegistration { get; set; } + + /// + /// Specifies whether the Objective-C class is a stub class. + /// Objective-C stub classes are sometimes used when bridging Swift to Objective-C. + /// + /// + /// Stub classes can be identified because they include SWIFT_RESILIENT_CLASS in the generated Objective-C header. + /// Example Objective-C type declaration: + /// + /// + /// + /// + public bool IsStubClass { get; set; } } } diff --git a/src/Foundation/XpcInterfaceAttribute.cs b/src/Foundation/XpcInterfaceAttribute.cs index 14c1f7726809..2364f588a64d 100644 --- a/src/Foundation/XpcInterfaceAttribute.cs +++ b/src/Foundation/XpcInterfaceAttribute.cs @@ -25,12 +25,14 @@ using ObjCRuntime; namespace Foundation { +#if !COREBUILD /// /// Specifies that the decorated interface (which must also be /// decorated with ) is intended /// to be used with . This enables /// mmp optimizations required for the XPC subsystem to work properly. /// +#endif [AttributeUsage (AttributeTargets.Interface)] public sealed class XpcInterfaceAttribute : Attribute { public XpcInterfaceAttribute () { } diff --git a/src/GLKit/Defs.cs b/src/GLKit/Defs.cs index 355c9918fe04..e95a58c453d5 100644 --- a/src/GLKit/Defs.cs +++ b/src/GLKit/Defs.cs @@ -38,66 +38,78 @@ namespace GLKit { // GLint (32 bits on 64 bit hardware) -> GLKEffects.h public enum GLKVertexAttrib { - Position, Normal, Color, TexCoord0, TexCoord1 + Position, + Normal, + Color, + TexCoord0, + TexCoord1, } // GLint (32 bits on 64 bit hardware) -> GLKEffectPropertyLight.h public enum GLKLightingType { PerVertex, - PerPixel + PerPixel, } // GLint (32 bits on 64 bit hardware) -> GLKEffectPropertyTexture.h public enum GLKTextureEnvMode { - Replace, Modulate, Decal + Replace, + Modulate, + Decal, } // GLenum (32 bits on 64 bit hardware) -> GLKEffectPropertyTexture.h public enum GLKTextureTarget { Texture2D = 0x0DE1, // GL_TEXTURE_2D CubeMap = 0x8513, // GL_TEXTURE_CUBE_MAP - TargetCt = 2 + TargetCt = 2, } // GLint (32 bits on 64 bit hardware) -> GLKEffectPropertyFog.h public enum GLKFogMode { Exp = 0, Exp2, - Linear + Linear, } // GLint (32 bits on 64 bit hardware) -> GLKView.h public enum GLKViewDrawableColorFormat { RGBA8888 = 0, RGB565, - SRGBA8888 + SRGBA8888, } // GLint (32 bits on 64 bit hardware) -> GLKView.h public enum GLKViewDrawableDepthFormat { - None, Format16, Format24, + None, + Format16, + Format24, } // GLint (32 bits on 64 bit hardware) -> GLKView.h public enum GLKViewDrawableStencilFormat { - FormatNone, Format8 + FormatNone, + Format8, } // GLint (32 bits on 64 bit hardware) -> GLKView.h public enum GLKViewDrawableMultisample { - None, Sample4x + None, + Sample4x, } // GLint (32 bits on 64 bit hardware) -> GLKTextureLoader.h public enum GLKTextureInfoAlphaState { - None, NonPremultiplied, Premultiplied + None, + NonPremultiplied, + Premultiplied, } // GLint (32 bits on 64 bit hardware) -> GLKTextureLoader.h public enum GLKTextureInfoOrigin { Unknown = 0, TopLeft, - BottomLeft + BottomLeft, } // GLuint (we'll keep `int` for compatibility) -> GLKTextureLoader.h diff --git a/src/GameController/Enums.cs b/src/GameController/Enums.cs index 64c4bbcfda7b..1d5d8bb38c0a 100644 --- a/src/GameController/Enums.cs +++ b/src/GameController/Enums.cs @@ -67,7 +67,7 @@ public enum GCControllerPlayerIndex : long { Index4, } - [iOS (16, 0), Mac (13, 0), NoWatch, TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] [Native] public enum GCDevicePhysicalInputElementChange : long { UnknownChange = -1, diff --git a/src/GameController/GCMicroGamepadSnapshot.cs b/src/GameController/GCMicroGamepadSnapshot.cs index 796bec348031..8ef6b57a62f6 100644 --- a/src/GameController/GCMicroGamepadSnapshot.cs +++ b/src/GameController/GCMicroGamepadSnapshot.cs @@ -2,8 +2,6 @@ #nullable enable -#if !WATCHOS - using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -211,5 +209,3 @@ public static bool TryGetSnapshotData (NSData? data, out GCMicroGamepadSnapshotD } } - -#endif diff --git a/src/GameKit/GKCompat.cs b/src/GameKit/GKCompat.cs index d6ff49a42b02..0f2cadd8d4be 100644 --- a/src/GameKit/GKCompat.cs +++ b/src/GameKit/GKCompat.cs @@ -12,16 +12,7 @@ #endif namespace GameKit { -#if WATCH && !NET - [Unavailable (PlatformName.WatchOS)] - [Obsolete ("This API is not available on this platform.")] - public static class GKGameSessionErrorCodeExtensions { - [Obsolete ("Always returns null.")] - public static NSString? GetDomain (this GKGameSessionErrorCode self) => null; - } -#endif - -#if !NET && !WATCH +#if !NET public partial class GKGameSession { [Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")] @@ -55,9 +46,7 @@ public static void DidSaveData (GKGameSession session, GKCloudPlayer player, Fou [UnsupportedOSPlatform ("maccatalyst")] #else [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] - [Unavailable (PlatformName.WatchOS)] #endif public interface IGKPeerPickerControllerDelegate : INativeObject, IDisposable { @@ -72,9 +61,7 @@ public interface IGKPeerPickerControllerDelegate : INativeObject, IDisposable [UnsupportedOSPlatform ("maccatalyst")] #else [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] - [Unavailable (PlatformName.WatchOS)] #endif public static class GKPeerPickerControllerDelegate_Extensions { public static void ConnectionTypeSelected (this IGKPeerPickerControllerDelegate This, GKPeerPickerController picker, GKPeerPickerConnectionType type) @@ -107,9 +94,7 @@ public static void ControllerCancelled (this IGKPeerPickerControllerDelegate Thi [UnsupportedOSPlatform ("maccatalyst")] #else [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] - [Unavailable (PlatformName.WatchOS)] #endif public unsafe class GKPeerPickerControllerDelegate : NSObject, IGKPeerPickerControllerDelegate { public GKPeerPickerControllerDelegate () : base (NSObjectFlag.Empty) @@ -157,9 +142,7 @@ public virtual void PeerConnected (GKPeerPickerController picker, string peerId, [UnsupportedOSPlatform ("maccatalyst")] #else [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] - [Unavailable (PlatformName.WatchOS)] #endif public class GKPeerPickerController : NSObject { public override NativeHandle ClassHandle { get { throw new PlatformNotSupportedException (Constants.TypeUnavailable); } } diff --git a/src/GameKit/GKGameCenterViewController.cs b/src/GameKit/GKGameCenterViewController.cs index 2f3d736c7f15..a60178f4cc85 100644 --- a/src/GameKit/GKGameCenterViewController.cs +++ b/src/GameKit/GKGameCenterViewController.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using Foundation; @@ -56,4 +55,3 @@ public GKGameCenterViewController (string id, GKGameCenterViewControllerInitiali } } } -#endif // !WATCH diff --git a/src/GameKit/GKLocalPlayerListener.cs b/src/GameKit/GKLocalPlayerListener.cs index c60f61ac8c49..243f41af53ad 100644 --- a/src/GameKit/GKLocalPlayerListener.cs +++ b/src/GameKit/GKLocalPlayerListener.cs @@ -1,4 +1,4 @@ -#if !MONOMAC && !WATCH && !NET +#if !MONOMAC && !NET using System; using Foundation; using ObjCRuntime; diff --git a/src/GameKit/GKScore.cs b/src/GameKit/GKScore.cs index a8ea927dda81..ed8b6dfd922f 100644 --- a/src/GameKit/GKScore.cs +++ b/src/GameKit/GKScore.cs @@ -56,14 +56,10 @@ public GKScore (string categoryOrIdentifier) if (categoryOrIdentifier is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (categoryOrIdentifier)); -#if WATCH - Handle = InitWithLeaderboardIdentifier (categoryOrIdentifier); -#else if (SystemVersion.CheckiOS (7, 0)) Handle = InitWithLeaderboardIdentifier (categoryOrIdentifier); else Handle = InitWithCategory (categoryOrIdentifier); -#endif } } } diff --git a/src/GameKit/GameKit.cs b/src/GameKit/GameKit.cs index c3f6280fae1a..9b1037faa745 100644 --- a/src/GameKit/GameKit.cs +++ b/src/GameKit/GameKit.cs @@ -21,7 +21,6 @@ namespace GameKit { // NSUInteger -> GKPeerPickerController.h /// An enumeration whose values specify acceptable ping for peer-to-peer connections. [NoMac] - [NoWatch] #if NET [NoTV] #endif @@ -31,7 +30,7 @@ namespace GameKit { [Native] public enum GKPeerPickerConnectionType : ulong { Online = 1 << 0, - Nearby = 1 << 1 + Nearby = 1 << 1, } // untyped enum -> GKPublicConstants.h @@ -58,7 +57,7 @@ public enum GKVoiceChatServiceError { NetworkConfiguration = 32013, UnsupportedRemoteVersion = 32014, OutOfMemory = 32015, - InvalidParameter = 32016 + InvalidParameter = 32016, } // untyped enum -> GKPublicConstants.h @@ -99,13 +98,16 @@ public enum GKPeerConnectionState { // NSInteger -> GKLeaderboard.h [Native] public enum GKLeaderboardTimeScope : long { - Today, Week, AllTime + Today, + Week, + AllTime, } // NSInteger -> GKLeaderboard.h [Native] public enum GKLeaderboardPlayerScope : long { - Global, FriendsOnly + Global, + FriendsOnly, } // NSInteger -> GKError.h @@ -178,14 +180,8 @@ public enum GKTransportType : long { [Deprecated (PlatformName.TvOS, 12, 0)] [Deprecated (PlatformName.iOS, 12, 0)] [Native] -#if WATCH - // removed in Xcode 10 but a breaking change (for us) to remove - [Obsolete ("Not used in watchOS.")] -#else - [Unavailable (PlatformName.WatchOS)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [ErrorDomain ("GKGameSessionErrorDomain")] -#endif public enum GKGameSessionErrorCode : long { Unknown = 1, NotAuthenticated = 2, @@ -212,13 +208,16 @@ public enum GKGameSessionErrorCode : long { [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Native] public enum GKMatchSendDataMode : long { - Reliable, Unreliable + Reliable, + Unreliable, } // NSInteger -> GKMatch.h [Native] public enum GKPlayerConnectionState : long { - Unknown, Connected, Disconnected + Unknown, + Connected, + Disconnected, } // NSInteger -> GKVoiceChat.h @@ -232,32 +231,50 @@ public enum GKVoiceChatPlayerState : long { Disconnected, Speaking, Silent, - Connecting + Connecting, } // NSInteger -> GKPlayer.h [Native] public enum GKPhotoSize : long { - Small, Normal + Small, + Normal, } // NSInteger -> GKTurnBasedMatch.h [Native] public enum GKTurnBasedMatchStatus : long { - Unknown, Open, Ended, Matching + Unknown, + Open, + Ended, + Matching, } // NSInteger -> GKTurnBasedMatch.h [Native] public enum GKTurnBasedParticipantStatus : long { - Unknown, Invited, Declined, Matching, Active, Done + Unknown, + Invited, + Declined, + Matching, + Active, + Done, } // NSInteger -> GKTurnBasedMatch.h [Native] public enum GKTurnBasedMatchOutcome : long { - None, Quit, Won, Lost, Tied, TimeExpired, - First, Second, Third, Fourth, CustomRange = 0xff0000 + None, + Quit, + Won, + Lost, + Tied, + TimeExpired, + First, + Second, + Third, + Fourth, + CustomRange = 0xff0000, } // NSInteger -> GKChallenge.h @@ -267,11 +284,10 @@ public enum GKChallengeState : long { Invalid = 0, Pending, Completed, - Declined + Declined, } // NSInteger -> GKGameCenterViewController.h - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum GKGameCenterViewControllerState : long { @@ -290,7 +306,6 @@ public enum GKGameCenterViewControllerState : long { [iOS (15, 0)] [MacCatalyst (15, 0)] [TV (15, 0)] - [NoWatch] LocalPlayerFriendsList = 5, } @@ -310,7 +325,7 @@ public enum GKInviteeResponse : long { public enum GKMatchType : ulong { PeerToPeer, Hosted, - TurnBased + TurnBased, } // uint8_t -> GKTurnBasedMatch.h @@ -319,7 +334,7 @@ public enum GKTurnBasedExchangeStatus : sbyte { Active, Complete, Resolved, - Canceled + Canceled, } [Native] @@ -346,7 +361,6 @@ public enum GKAuthenticationType : ulong { [TV (14, 0)] [iOS (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [Native] public enum GKAccessPointLocation : long { @@ -358,7 +372,6 @@ public enum GKAccessPointLocation : long { [TV (14, 0)] [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Native] public enum GKLeaderboardType : long { @@ -368,7 +381,6 @@ public enum GKLeaderboardType : long { [TV (14, 0)] [iOS (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [Native] public enum GKMatchmakingMode : long { @@ -381,7 +393,6 @@ public enum GKMatchmakingMode : long { InviteOnly = 3, } - [Watch (7, 4)] [TV (14, 5)] [iOS (14, 5)] [MacCatalyst (14, 5)] diff --git a/src/GameKit/GameKit2.cs b/src/GameKit/GameKit2.cs index 71ce8ea0d5ea..4279cb11219c 100644 --- a/src/GameKit/GameKit2.cs +++ b/src/GameKit/GameKit2.cs @@ -16,7 +16,7 @@ #nullable enable namespace GameKit { -#if !MONOMAC && !TVOS && !WATCH +#if !MONOMAC && !TVOS public class GKDataReceivedEventArgs : EventArgs { public GKDataReceivedEventArgs (NSData data, string peer, GKSession session) { @@ -29,7 +29,7 @@ public GKDataReceivedEventArgs (NSData data, string peer, GKSession session) public GKSession Session { get; private set; } } -#if !TVOS && !WATCH +#if !TVOS public partial class GKSession { [Register ("MonoTouch_GKSession_ReceivedObject")] internal class ReceiverObject : NSObject { diff --git a/src/HealthKit/Enums.cs b/src/HealthKit/Enums.cs index ccca1e3337d5..d39ba8bd969e 100644 --- a/src/HealthKit/Enums.cs +++ b/src/HealthKit/Enums.cs @@ -99,17 +99,16 @@ public enum HKHeartRateSensorLocation : long { [Native] public enum HKQuantityAggregationStyle : long { Cumulative = 0, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] DiscreteArithmetic, - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'HKQuantityAggregationStyle.DiscreteArithmetic'.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'HKQuantityAggregationStyle.DiscreteArithmetic'.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'HKQuantityAggregationStyle.DiscreteArithmetic'.")] Discrete = DiscreteArithmetic, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] DiscreteTemporallyWeighted, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] DiscreteEquivalentContinuousLevel, } @@ -124,11 +123,11 @@ public enum HKCategoryValueSleepAnalysis : long { Asleep, [MacCatalyst (13, 1)] Awake, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] AsleepCore = 3, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] AsleepDeep = 4, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] AsleepREM = 5, } @@ -157,10 +156,10 @@ public enum HKStatisticsOptions : ulong { DiscreteMin = 1 << 2, DiscreteMax = 1 << 3, CumulativeSum = 1 << 4, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] MostRecent = 1 << 5, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] Duration = 1 << 6, } @@ -184,7 +183,7 @@ public enum HKMetricPrefix : long { Mega, Giga, Tera, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] Femto, } @@ -208,7 +207,6 @@ public enum HKWorkoutActivityType : ulong { Curling, Cycling, Dance, - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'HKWorkoutActivityType.Dance', 'HKWorkoutActivityType.Barre', or 'HKWorkoutActivityType.Pilates'.")] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'HKWorkoutActivityType.Dance', 'HKWorkoutActivityType.Barre', or 'HKWorkoutActivityType.Pilates'.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'HKWorkoutActivityType.Dance', 'HKWorkoutActivityType.Barre', or 'HKWorkoutActivityType.Pilates'.")] DanceInspiredTraining, @@ -227,7 +225,6 @@ public enum HKWorkoutActivityType : ulong { MartialArts, MindAndBody, [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'MixedCardio' or 'HighIntensityIntervalTraining' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'MixedCardio' or 'HighIntensityIntervalTraining' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'MixedCardio' or 'HighIntensityIntervalTraining' instead.")] MixedMetabolicCardioTraining, PaddleSports, @@ -291,33 +288,29 @@ public enum HKWorkoutActivityType : ulong { MixedCardio, [MacCatalyst (13, 1)] HandCycling, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] DiscSports, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] FitnessGaming, [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] CardioDance = 77, [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] SocialDance = 78, [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] Pickleball = 79, [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] Cooldown = 80, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] SwimBikeRun = 82, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] Transition = 83, - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0), NoTV] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0), NoTV] UnderwaterDiving, [MacCatalyst (13, 1)] Other = 3000 @@ -372,7 +365,6 @@ public enum HKCategoryValueCervicalMucusQuality : long { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'HKCategoryValueVaginalBleeding' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'HKCategoryValueVaginalBleeding' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'HKCategoryValueVaginalBleeding' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'HKCategoryValueVaginalBleeding' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'HKCategoryValueVaginalBleeding' instead.")] public enum HKCategoryValueMenstrualFlow : long { NotApplicable = 0, @@ -380,12 +372,11 @@ public enum HKCategoryValueMenstrualFlow : long { Light, Medium, Heavy, - [Watch (5, 0)] [MacCatalyst (13, 1)] None, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HKCategoryValueVaginalBleeding : long { Unspecified = 1, @@ -402,15 +393,14 @@ public enum HKCategoryValueVaginalBleeding : long { public enum HKCategoryValueOvulationTestResult : long { NotApplicable = 0, Negative = 1, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] LuteinizingHormoneSurge = 2, [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'HKCategoryValueOvulationTestResult.LuteinizingHormoneSurge' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'HKCategoryValueOvulationTestResult.LuteinizingHormoneSurge' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'HKCategoryValueOvulationTestResult.LuteinizingHormoneSurge' instead.")] Positive = LuteinizingHormoneSurge, Indeterminate = 3, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] EstrogenSurge = 4, } @@ -425,7 +415,6 @@ public enum HKCategoryValueAppleStandHour : long { } [iOS (13, 0)] - [Watch (6, 0)] [Mac (13, 0)] [MacCatalyst (13, 1)] [Native] @@ -511,7 +500,7 @@ public enum HKSwimmingStrokeStyle : long { Backstroke, Breaststroke, Butterfly, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] Kickboard = 6, } @@ -556,7 +545,7 @@ public enum HKVO2MaxTestType : long { } /// Enumerates Fast Healthcare Interoperability Resources (FHIR) types. - [NoWatch, Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] public enum HKFhirResourceType { [Field ("HKFHIRResourceTypeAllergyIntolerance")] @@ -592,7 +581,7 @@ public enum HKFhirResourceType { } /// Enumerates clinical record type identifiers. - [Watch (5, 0), Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] public enum HKClinicalTypeIdentifier { @@ -610,18 +599,18 @@ public enum HKClinicalTypeIdentifier { ProcedureRecord, [Field ("HKClinicalTypeIdentifierVitalSignRecord")] VitalSignRecord, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKClinicalTypeIdentifierCoverageRecord")] CoverageRecord, - [Watch (9, 4), iOS (16, 4), Mac (13, 3)] + [iOS (16, 4), Mac (13, 3)] [MacCatalyst (16, 4)] [Field ("HKClinicalTypeIdentifierClinicalNoteRecord")] ClinicalNoteRecord, } /// Enumerates values that tell when an app should request user permission for access. - [Watch (5, 0), Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [Native] public enum HKAuthorizationRequestStatus : long { @@ -630,7 +619,7 @@ public enum HKAuthorizationRequestStatus : long { Unnecessary, } - [Watch (7, 0), iOS (13, 6), Mac (13, 0)] + [iOS (13, 6), Mac (13, 0)] [MacCatalyst (13, 1)] [Native] public enum HKCategoryValueAppetiteChanges : long { @@ -640,7 +629,7 @@ public enum HKCategoryValueAppetiteChanges : long { Increased, } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [Native] public enum HKAppleEcgAlgorithmVersion : long { @@ -648,14 +637,14 @@ public enum HKAppleEcgAlgorithmVersion : long { Version2 = 2, } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [Native] public enum HKCategoryValueEnvironmentalAudioExposureEvent : long { MomentaryLimit = 1, } - [Watch (7, 0), iOS (13, 6), Mac (13, 0)] + [iOS (13, 6), Mac (13, 0)] [MacCatalyst (13, 1)] [Native] public enum HKCategoryValuePresence : long { @@ -663,7 +652,7 @@ public enum HKCategoryValuePresence : long { NotPresent, } - [Watch (7, 0), iOS (13, 6), Mac (13, 0)] + [iOS (13, 6), Mac (13, 0)] [MacCatalyst (13, 1)] [Native] public enum HKCategoryValueSeverity : long { @@ -674,7 +663,7 @@ public enum HKCategoryValueSeverity : long { Severe, } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [Native] public enum HKDevicePlacementSide : long { @@ -684,7 +673,7 @@ public enum HKDevicePlacementSide : long { Central, } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [Native] public enum HKElectrocardiogramClassification : long { @@ -698,14 +687,14 @@ public enum HKElectrocardiogramClassification : long { Unrecognized = 100, } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [Native] public enum HKElectrocardiogramLead : long { AppleWatchSimilarToLeadI = 1, } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [Native] public enum HKElectrocardiogramSymptomsStatus : long { @@ -714,7 +703,7 @@ public enum HKElectrocardiogramSymptomsStatus : long { Present = 2, } - [NoWatch, iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] public enum HKFhirRelease { [Field ("HKFHIRReleaseDSTU2")] @@ -725,7 +714,7 @@ public enum HKFhirRelease { Unknown, } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] public enum HKHeartRateRecoveryTestType : long { MaxExercise = 1, @@ -733,7 +722,7 @@ public enum HKHeartRateRecoveryTestType : long { PredictionNonExercise, } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] public enum HKPrismBase : long { None = 0, @@ -743,7 +732,7 @@ public enum HKPrismBase : long { Out, } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] public enum HKUserMotionContext : long { NotSet = 0, @@ -751,21 +740,21 @@ public enum HKUserMotionContext : long { Active, } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] public enum HKVisionEye : long { Left = 1, Right, } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] public enum HKVisionPrescriptionType : ulong { Glasses = 1, Contacts, } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Native] public enum HKCyclingFunctionalThresholdPowerTestType : long { MaxExercise60Minute = 1, @@ -774,21 +763,21 @@ public enum HKCyclingFunctionalThresholdPowerTestType : long { PredictionExercise, } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Native] public enum HKPhysicalEffortEstimationType : long { ActivityLookup = 1, DeviceSensed, } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Native] public enum HKWaterSalinity : long { FreshWater = 1, SaltWater, } - [Watch (10, 0), iOS (17, 0)] + [iOS (17, 0)] [Native] public enum HKWorkoutSessionType : long { Primary = 0, diff --git a/src/HealthKit/EnumsCompat.cs b/src/HealthKit/EnumsCompat.cs index e0a7a9a7c0a5..04f14064569c 100644 --- a/src/HealthKit/EnumsCompat.cs +++ b/src/HealthKit/EnumsCompat.cs @@ -1,6 +1,6 @@ #nullable enable -#if !NET && (IOS || WATCHOS) +#if !NET && IOS using System; using Foundation; @@ -321,7 +321,6 @@ public static NSString? DistanceCycling { } } - [Introduced (PlatformName.WatchOS, 4,2, PlatformArchitecture.All)] public static NSString? DistanceDownhillSnowSports { get { return HKQuantityTypeIdentifierExtensions.GetConstant (HKQuantityTypeIdentifier.DistanceDownhillSnowSports); diff --git a/src/HealthKit/HKAppleWalkingSteadiness.cs b/src/HealthKit/HKAppleWalkingSteadiness.cs index 433c0055d7c4..7db48e74f03b 100644 --- a/src/HealthKit/HKAppleWalkingSteadiness.cs +++ b/src/HealthKit/HKAppleWalkingSteadiness.cs @@ -14,7 +14,6 @@ namespace HealthKit { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos13.0")] #else - [Watch (8, 0)] [iOS (15, 0)] [Mac (13, 0)] #endif diff --git a/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs b/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs index 48c391d9f9a1..e0fc30ff9f78 100644 --- a/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs +++ b/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs @@ -32,7 +32,7 @@ public partial class HKCategoryValueSleepAnalysisAsleep { [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] #endif // NET [DllImport (Constants.HealthKitLibrary)] static extern NativeHandle HKCategoryValueSleepAnalysisAsleepValues (); @@ -43,7 +43,7 @@ public partial class HKCategoryValueSleepAnalysisAsleep { [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] #endif // NET public static HashSet GetAsleepValues () { diff --git a/src/HealthKit/HKObjectType.cs b/src/HealthKit/HKObjectType.cs index a25dd4adbc78..51afb4bc912b 100644 --- a/src/HealthKit/HKObjectType.cs +++ b/src/HealthKit/HKObjectType.cs @@ -45,8 +45,6 @@ public partial class HKCorrelationType { } #pragma warning restore CS0618 // Type or member is obsolete - -#if !WATCH public partial class HKDocumentType { public static HKDocumentType? Create (HKDocumentTypeIdentifier kind) { @@ -56,5 +54,4 @@ public partial class HKDocumentType { return null; } } -#endif } diff --git a/src/HealthKit/HKSupportFunctions.cs b/src/HealthKit/HKSupportFunctions.cs index c16608697d39..ba29c88bc0b8 100644 --- a/src/HealthKit/HKSupportFunctions.cs +++ b/src/HealthKit/HKSupportFunctions.cs @@ -14,7 +14,7 @@ namespace HealthKit { [SupportedOSPlatform ("macos15.0")] [UnsupportedOSPlatform ("tvos")] #else - [Watch (11, 0), NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public static class HKStateOfMindValence { [DllImport (Constants.HealthKitLibrary)] diff --git a/src/HomeKit/HMEnums.cs b/src/HomeKit/HMEnums.cs index 2393400ff283..bcf07ecb3780 100644 --- a/src/HomeKit/HMEnums.cs +++ b/src/HomeKit/HMEnums.cs @@ -185,21 +185,18 @@ public enum HMCharacteristicType { Name, [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'HMAccessory.Manufacturer' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'HMAccessory.Manufacturer' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HMAccessory.Manufacturer' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'HMAccessory.Manufacturer' instead.")] [Field ("HMCharacteristicTypeManufacturer")] Manufacturer, [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'HMAccessory.Model' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'HMAccessory.Model' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HMAccessory.Model' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'HMAccessory.Model' instead.")] [Field ("HMCharacteristicTypeModel")] Model, [Deprecated (PlatformName.TvOS, 11, 0, message: "No longer supported.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "No longer supported.")] [Deprecated (PlatformName.iOS, 11, 0, message: "No longer supported.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "No longer supported.")] [Field ("HMCharacteristicTypeSerialNumber")] @@ -316,7 +313,6 @@ public enum HMCharacteristicType { CurrentVerticalTilt, [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'HMAccessory.FirmwareVersion' instead.")] @@ -447,137 +443,110 @@ public enum HMCharacteristicType { [Field ("HMCharacteristicTypeImageMirroring")] ImageMirroring, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeActive")] Active, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeCurrentAirPurifierState")] CurrentAirPurifierState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeTargetAirPurifierState")] TargetAirPurifierState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeCurrentFanState")] CurrentFanState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeCurrentHeaterCoolerState")] CurrentHeaterCoolerState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeCurrentHumidifierDehumidifierState")] CurrentHumidifierDehumidifierState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeCurrentSlatState")] CurrentSlatState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeWaterLevel")] WaterLevel, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeFilterChangeIndication")] FilterChangeIndication, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeFilterLifeLevel")] FilterLifeLevel, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeFilterResetChangeIndication")] FilterResetChangeIndication, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeLockPhysicalControls")] LockPhysicalControls, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeSwingMode")] SwingMode, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeTargetHeaterCoolerState")] TargetHeaterCoolerState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeTargetHumidifierDehumidifierState")] TargetHumidifierDehumidifierState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeTargetFanState")] TargetFanState, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeSlatType")] SlatType, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeCurrentTilt")] CurrentTilt, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeTargetTilt")] TargetTilt, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeOzoneDensity")] OzoneDensity, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeNitrogenDioxideDensity")] NitrogenDioxideDensity, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeSulphurDioxideDensity")] SulphurDioxideDensity, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypePM2_5Density")] PM2_5Density, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypePM10Density")] PM10Density, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeVolatileOrganicCompoundDensity")] VolatileOrganicCompoundDensity, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeDehumidifierThreshold")] DehumidifierThreshold, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeHumidifierThreshold")] HumidifierThreshold, @@ -598,105 +567,99 @@ public enum HMCharacteristicType { [Field ("HMCharacteristicTypeColorTemperature")] ColorTemperature, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeProgramMode")] ProgramMode, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeInUse")] InUse, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeSetDuration")] SetDuration, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeRemainingDuration")] RemainingDuration, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeValveType")] ValveType, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMCharacteristicTypeIsConfigured")] IsConfigured, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeInputSourceType")] InputSourceType, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeInputDeviceType")] InputDeviceType, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeClosedCaptions")] ClosedCaptions, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypePowerModeSelection")] PowerModeSelection, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeCurrentMediaState")] CurrentMediaState, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeRemoteKey")] RemoteKey, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypePictureMode")] PictureMode, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeConfiguredName")] ConfiguredName, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeIdentifier")] Identifier, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeActiveIdentifier")] ActiveIdentifier, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeTargetVisibilityState")] TargetVisibilityState, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeCurrentVisibilityState")] CurrentVisibilityState, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeRouterStatus")] RouterStatus, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeWANStatusList")] WanStatusList, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeWiFiSatelliteStatus")] WiFiSatelliteStatus, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeVolumeControlType")] VolumeControlType, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeVolumeSelector")] VolumeSelector, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMCharacteristicTypeTargetMediaState")] TargetMediaState, } @@ -846,32 +809,26 @@ public enum HMServiceType { [Field ("HMServiceTypeDoorbell")] Doorbell, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeAirPurifier")] AirPurifier, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeVentilationFan")] VentilationFan, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeFilterMaintenance")] FilterMaintenance, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeHeaterCooler")] HeaterCooler, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeHumidifierDehumidifier")] HumidifierDehumidifier, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeSlats")] Slats, @@ -880,34 +837,31 @@ public enum HMServiceType { [Field ("HMServiceTypeLabel")] Label, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeIrrigationSystem")] IrrigationSystem, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeValve")] Valve, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMServiceTypeFaucet")] Faucet, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMServiceTypeTelevision")] Television, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMServiceTypeInputSource")] InputSource, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMServiceTypeWiFiRouter")] WiFiRouter, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMServiceTypeWiFiSatellite")] WiFiSatellite, } @@ -1080,7 +1034,6 @@ public enum HMCharacteristicValueSmokeDetectionStatus : long { public enum HMCharacteristicValueChargingState : long { None = 0, InProgress, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] NotChargeable, } @@ -1172,7 +1125,7 @@ public enum HMAccessoryCategoryType { [Field ("HMAccessoryCategoryTypeGarageDoorOpener")] GarageDoorOpener, -#if !WATCH && !TVOS +#if !TVOS [Obsolete ("Use 'GarageDoorOpener' instead.")] [NoTV] [MacCatalyst (13, 1)] @@ -1215,71 +1168,63 @@ public enum HMAccessoryCategoryType { [Field ("HMAccessoryCategoryTypeVideoDoorbell")] VideoDoorbell, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeAirPurifier")] AirPurifier, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeAirHeater")] AirHeater, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeAirConditioner")] AirConditioner, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeAirHumidifier")] AirHumidifier, - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeAirDehumidifier")] AirDehumidifier, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeSprinkler")] Sprinkler, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeFaucet")] Faucet, - [Watch (4, 2)] [MacCatalyst (14, 0)] [Field ("HMAccessoryCategoryTypeShowerHead")] ShowerHead, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMAccessoryCategoryTypeTelevision")] Television, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMAccessoryCategoryTypeTelevisionSetTopBox")] TelevisionSetTopBox, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMAccessoryCategoryTypeTelevisionStreamingStick")] TelevisionStreamingStick, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMAccessoryCategoryTypeWiFiRouter")] WiFiRouter, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMAccessoryCategoryTypeSpeaker")] Speaker, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMAccessoryCategoryTypeAudioReceiver")] AudioReceiver, - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Field ("HMAccessoryCategoryTypeAirPort")] AirPort, } @@ -1295,7 +1240,7 @@ public enum HMSignificantEvent { Sunset, } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac, MacCatalyst (14, 0)] + [iOS (13, 0), TV (13, 0), NoMac, MacCatalyst (14, 0)] [Flags] [Native] public enum HMHomeManagerAuthorizationStatus : ulong { @@ -1336,7 +1281,6 @@ public enum HMCameraAudioStreamSetting : ulong { } /// Enumerates the possible values of a that may either be locked or unlocked. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueLockPhysicalControlsState : long { @@ -1345,7 +1289,6 @@ public enum HMCharacteristicValueLockPhysicalControlsState : long { } /// Enumerates the possible values of a that describes the states of an air purifier. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentAirPurifierState : long { @@ -1355,7 +1298,6 @@ public enum HMCharacteristicValueCurrentAirPurifierState : long { } /// Enumerates the possible values of a of an air purifier. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetAirPurifierState : long { @@ -1364,7 +1306,6 @@ public enum HMCharacteristicValueTargetAirPurifierState : long { } /// Enumerates the possible values of a that describes the states of an oscillating slat. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentSlatState : long { @@ -1374,7 +1315,6 @@ public enum HMCharacteristicValueCurrentSlatState : long { } /// Enumerates the possible values of a that describe a vertical or horizontal slat. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueSlatType : long { @@ -1383,7 +1323,6 @@ public enum HMCharacteristicValueSlatType : long { } /// Enumerates the possible values of a that describes the states of a filter that must be periodically changed. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueFilterChange : long { @@ -1392,7 +1331,6 @@ public enum HMCharacteristicValueFilterChange : long { } /// Enumerates the possible values of a that describes the states of a fan. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentFanState : long { @@ -1402,7 +1340,6 @@ public enum HMCharacteristicValueCurrentFanState : long { } /// Enumerates the possible states of a of a fan. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetFanState : long { @@ -1411,7 +1348,6 @@ public enum HMCharacteristicValueTargetFanState : long { } /// Enumerates the possible values of a that describes the states of a heat exchanger. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentHeaterCoolerState : long { @@ -1422,7 +1358,6 @@ public enum HMCharacteristicValueCurrentHeaterCoolerState : long { } /// Enumerates the possible states of a of a heater / cooler. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetHeaterCoolerState : long { @@ -1432,7 +1367,6 @@ public enum HMCharacteristicValueTargetHeaterCoolerState : long { } /// Enumerates the possible values of a that describes the states of a humidifier or dehumidifier. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentHumidifierDehumidifierState : long { @@ -1443,7 +1377,6 @@ public enum HMCharacteristicValueCurrentHumidifierDehumidifierState : long { } /// Enumerates the possible states of a of a humidifier or dehumidifier. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetHumidifierDehumidifierState : long { @@ -1453,7 +1386,6 @@ public enum HMCharacteristicValueTargetHumidifierDehumidifierState : long { } /// Enumerates the possible values of a that describe a swing that can be enabled or disabled. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueSwingMode : long { @@ -1462,7 +1394,6 @@ public enum HMCharacteristicValueSwingMode : long { } /// Enumerates the possible values of a that can be active or inactive. - [Watch (3, 1, 1)] [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueActivationState : long { @@ -1529,7 +1460,7 @@ public enum HMPresenceEventUserType : ulong { } /// Enumerates the possible values of a that can be scheduled or manually overriden. - [Watch (4, 2), MacCatalyst (14, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueProgramMode : long { NotScheduled = 0, @@ -1538,7 +1469,7 @@ public enum HMCharacteristicValueProgramMode : long { } /// Enumerates the possible states of a of a device that can be in use or out of use. - [Watch (4, 2), MacCatalyst (14, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueUsageState : long { NotInUse = 0, @@ -1546,7 +1477,7 @@ public enum HMCharacteristicValueUsageState : long { } /// Enumerates the known types of valve. - [Watch (4, 2), MacCatalyst (14, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueValveType : long { GenericValve = 0, @@ -1556,7 +1487,7 @@ public enum HMCharacteristicValueValveType : long { } /// Enumerates the possible values of a that can be configured or not. - [Watch (4, 2), MacCatalyst (14, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueConfigurationState : long { NotConfigured = 0, @@ -1588,7 +1519,7 @@ public enum HMCharacteristicValueTargetLockMechanismState : long { Secured = 1, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueInputSourceType : long { Other = 0, @@ -1604,7 +1535,7 @@ public enum HMCharacteristicValueInputSourceType : long { Application = 10, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueInputDeviceType : long { Other = 0, @@ -1616,21 +1547,21 @@ public enum HMCharacteristicValueInputDeviceType : long { None = 6, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueClosedCaptions : long { Disabled = 0, Enabled = 1, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValuePowerModeSelection : long { Show = 0, Hide = 1, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueCurrentMediaState : long { Playing = 0, @@ -1641,7 +1572,7 @@ public enum HMCharacteristicValueCurrentMediaState : long { Interrupted = 5, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueRemoteKey : long { Rewind = 0, @@ -1663,7 +1594,7 @@ public enum HMCharacteristicValueRemoteKey : long { Home = 16, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValuePictureMode : long { Standard = 0, @@ -1682,14 +1613,14 @@ public enum HMCharacteristicValuePictureMode : long { Custom3 = 13, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueTargetVisibilityState : long { Show = 0, Hide = 1, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueCurrentVisibilityState : long { Shown = 0, @@ -1698,14 +1629,14 @@ public enum HMCharacteristicValueCurrentVisibilityState : long { AlwaysShown = 3, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueRouterStatus : long { Ready = 0, NotReady = 1, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueWiFiSatelliteStatus : long { Unknown = 0, @@ -1713,7 +1644,7 @@ public enum HMCharacteristicValueWiFiSatelliteStatus : long { NotConnected = 2, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueVolumeControlType : long { None = 0, @@ -1722,14 +1653,14 @@ public enum HMCharacteristicValueVolumeControlType : long { Absolute, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueVolumeSelector : long { VolumeIncrement = 0, VolumeDecrement, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HMCharacteristicValueTargetMediaState : long { Play = 0, diff --git a/src/HomeKit/HMEventTrigger.cs b/src/HomeKit/HMEventTrigger.cs index dc0a56fa845d..78256d1972d0 100644 --- a/src/HomeKit/HMEventTrigger.cs +++ b/src/HomeKit/HMEventTrigger.cs @@ -17,7 +17,6 @@ partial class HMEventTrigger { #else [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantTimeEvent)' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantTimeEvent)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantTimeEvent)' instead.")] #endif static public NSPredicate CreatePredicateForEvaluatingTriggerOccurringBeforeSignificantEvent (HMSignificantEvent significantEvent, NSDateComponents offset) { @@ -36,7 +35,6 @@ static public NSPredicate CreatePredicateForEvaluatingTriggerOccurringBeforeSign #else [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantTimeEvent)' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantTimeEvent)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantTimeEvent)' instead.")] #endif static public NSPredicate CreatePredicateForEvaluatingTriggerOccurringAfterSignificantEvent (HMSignificantEvent significantEvent, NSDateComponents offset) { diff --git a/src/HomeKit/HMHome.cs b/src/HomeKit/HMHome.cs index 61421db1e282..fccb3b5bdfd6 100644 --- a/src/HomeKit/HMHome.cs +++ b/src/HomeKit/HMHome.cs @@ -16,10 +16,9 @@ public partial class HMHome { #if !NET [NoTV] - [NoWatch] -#if (WATCH || TVOS) +#if TVOS [Obsolete ("This API is not available on this platform.")] -#endif // WATCH || TVOS +#endif // TVOS [Obsoleted (PlatformName.iOS, 9, 0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")] public virtual void RemoveUser (HMUser user, Action completion) { @@ -27,10 +26,9 @@ public virtual void RemoveUser (HMUser user, Action completion) } [NoTV] - [NoWatch] -#if (WATCH || TVOS) +#if TVOS [Obsolete ("This API is not available on this platform.")] -#endif // WATCH || TVOS +#endif // TVOS [Obsoleted (PlatformName.iOS, 9, 0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")] public virtual Task RemoveUserAsync (HMUser user) { diff --git a/src/HomeKit/HMService.cs b/src/HomeKit/HMService.cs index 9b1ffc371506..5923e74cd1ee 100644 --- a/src/HomeKit/HMService.cs +++ b/src/HomeKit/HMService.cs @@ -10,7 +10,7 @@ namespace HomeKit { public partial class HMService { -#if !WATCH && !TVOS +#if !TVOS public void UpdateAssociatedServiceType (HMServiceType serviceType, Action completion) { UpdateAssociatedServiceType (serviceType.GetConstant (), completion); diff --git a/src/ImageIO/CGImageAnimation.cs b/src/ImageIO/CGImageAnimation.cs index c9158e71847c..954888f9622c 100644 --- a/src/ImageIO/CGImageAnimation.cs +++ b/src/ImageIO/CGImageAnimation.cs @@ -36,7 +36,6 @@ public static class CGImageAnimation { #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] - [Introduced (PlatformName.WatchOS, 6, 0, PlatformArchitecture.All)] #endif [DllImport (Constants.ImageIOLibrary)] unsafe static extern /* OSStatus */ CGImageAnimationStatus CGAnimateImageAtURLWithBlock ( /* CFURLRef */ IntPtr url, /* CFDictionaryRef _iio_Nullable */ IntPtr options, /* CGImageSourceAnimationHandler */ BlockLiteral* block); @@ -49,7 +48,6 @@ public static class CGImageAnimation { #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] - [Introduced (PlatformName.WatchOS, 6, 0, PlatformArchitecture.All)] #endif [DllImport (Constants.ImageIOLibrary)] unsafe static extern /* OSStatus */ CGImageAnimationStatus CGAnimateImageDataWithBlock ( /* CFDataRef _Nonnull */ IntPtr data, /* CFDictionaryRef _Nullable */ IntPtr options, /* CGImageSourceAnimationHandler _Nonnull */ BlockLiteral* block); @@ -62,7 +60,6 @@ public static class CGImageAnimation { #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] - [Introduced (PlatformName.WatchOS, 6, 0, PlatformArchitecture.All)] #endif [BindingImpl (BindingImplOptions.Optimizable)] public static CGImageAnimationStatus AnimateImage (NSUrl url, CGImageAnimationOptions options, CGImageSourceAnimationHandler handler) @@ -92,7 +89,6 @@ public static CGImageAnimationStatus AnimateImage (NSUrl url, CGImageAnimationOp #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] - [Introduced (PlatformName.WatchOS, 6, 0, PlatformArchitecture.All)] #endif [BindingImpl (BindingImplOptions.Optimizable)] public static CGImageAnimationStatus AnimateImage (NSData data, CGImageAnimationOptions options, CGImageSourceAnimationHandler handler) diff --git a/src/ImageIO/CGImageSource.cs b/src/ImageIO/CGImageSource.cs index 96f2c0bfe0d9..9195e6a26a4c 100644 --- a/src/ImageIO/CGImageSource.cs +++ b/src/ImageIO/CGImageSource.cs @@ -41,8 +41,6 @@ using NativeHandle = System.IntPtr; #endif -using OSStatus = System.Int32; - namespace ImageIO { #if !COREBUILD @@ -394,8 +392,6 @@ public CGImageSourceStatus GetStatus (int index) [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.ImageIOLibrary)] extern static nuint CGImageSourceGetPrimaryImageIndex (IntPtr /* CGImageSource */ src); @@ -405,8 +401,6 @@ public CGImageSourceStatus GetStatus (int index) [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public nuint GetPrimaryImageIndex () { @@ -421,7 +415,7 @@ public nuint GetPrimaryImageIndex () [SupportedOSPlatform ("tvos17.4")] [SupportedOSPlatform ("maccatalyst17.4")] #else - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4)] #endif [DllImport (Constants.ImageIOLibrary)] static extern OSStatus CGImageSourceSetAllowableTypes (IntPtr allowableTypes); @@ -432,7 +426,7 @@ public nuint GetPrimaryImageIndex () [SupportedOSPlatform ("tvos17.4")] [SupportedOSPlatform ("maccatalyst17.4")] #else - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4)] #endif public static void SetAllowableTypes (string [] allowableTypes) { diff --git a/src/ImageIO/Enums.cs b/src/ImageIO/Enums.cs index 6d8d718001be..f03e15376ff0 100644 --- a/src/ImageIO/Enums.cs +++ b/src/ImageIO/Enums.cs @@ -64,7 +64,7 @@ public enum CGImagePropertyPngFilters { Paeth = 0x80 } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] public enum CGImageAnimationStatus { Ok = 0, @@ -76,7 +76,7 @@ public enum CGImageAnimationStatus { } // Yes, no [Native] here - [iOS (14, 1), TV (14, 2), Watch (7, 1)] + [iOS (14, 1), TV (14, 2)] [MacCatalyst (14, 1)] public enum CGImagePropertyTgaCompression : uint { None = 0, diff --git a/src/Intents/INBillTypeResolutionResult.cs b/src/Intents/INBillTypeResolutionResult.cs index 818336441522..ea6e7a3a7e48 100644 --- a/src/Intents/INBillTypeResolutionResult.cs +++ b/src/Intents/INBillTypeResolutionResult.cs @@ -19,8 +19,6 @@ public static INBillTypeResolutionResult GetSuccess (INBillType resolvedValue) { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return SuccessWithResolvedBillType (resolvedValue); else @@ -31,8 +29,6 @@ public static INBillTypeResolutionResult GetConfirmationRequired (INBillType val { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return ConfirmationRequiredWithBillTypeToConfirm (valueToConfirm); else diff --git a/src/Intents/INCallRecordTypeResolutionResult.cs b/src/Intents/INCallRecordTypeResolutionResult.cs index eddbd72c4eea..9246df1f7567 100644 --- a/src/Intents/INCallRecordTypeResolutionResult.cs +++ b/src/Intents/INCallRecordTypeResolutionResult.cs @@ -19,8 +19,6 @@ public static INCallRecordTypeResolutionResult GetSuccess (INCallRecordType reso { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif @@ -33,8 +31,6 @@ public static INCallRecordTypeResolutionResult GetConfirmationRequired (INCallRe { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif diff --git a/src/Intents/INCarAirCirculationModeResolutionResult.cs b/src/Intents/INCarAirCirculationModeResolutionResult.cs index 3247a525cb39..8aa11697ff70 100644 --- a/src/Intents/INCarAirCirculationModeResolutionResult.cs +++ b/src/Intents/INCarAirCirculationModeResolutionResult.cs @@ -17,9 +17,7 @@ public partial class INCarAirCirculationModeResolutionResult { public static INCarAirCirculationModeResolutionResult GetSuccess (INCarAirCirculationMode resolvedValue) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return SuccessWithResolvedCarAirCirculationMode (resolvedValue); else @@ -30,9 +28,7 @@ public static INCarAirCirculationModeResolutionResult GetSuccess (INCarAirCircul public static INCarAirCirculationModeResolutionResult GetConfirmationRequired (INCarAirCirculationMode valueToConfirm) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return ConfirmationRequiredWithCarAirCirculationModeToConfirm (valueToConfirm); else diff --git a/src/Intents/INCarAirCirculationModeResolutionResult.watchOS.cs b/src/Intents/INCarAirCirculationModeResolutionResult.watchOS.cs index 531549eeec63..758ad7939291 100644 --- a/src/Intents/INCarAirCirculationModeResolutionResult.watchOS.cs +++ b/src/Intents/INCarAirCirculationModeResolutionResult.watchOS.cs @@ -1,4 +1,4 @@ -#if __WATCHOS__ && !NET +#if !NET using System; using System.Drawing; using System.Diagnostics; @@ -18,7 +18,7 @@ using CoreFoundation; namespace Intents { - [Register("INCarAirCirculationModeResolutionResult", true)] + [Register ("INCarAirCirculationModeResolutionResult", true)] [Obsolete (Constants.UnavailableOnWatchOS)] public unsafe partial class INCarAirCirculationModeResolutionResult : INIntentResolutionResult { public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); } } @@ -57,4 +57,4 @@ public static INCarAirCirculationModeResolutionResult ConfirmationRequiredWithCa } } /* class INCarAirCirculationModeResolutionResult */ } -#endif // __WATCHOS__ && !NET +#endif // !NET diff --git a/src/Intents/INCarAudioSourceResolutionResult.cs b/src/Intents/INCarAudioSourceResolutionResult.cs index 33e78a26e88a..993740760199 100644 --- a/src/Intents/INCarAudioSourceResolutionResult.cs +++ b/src/Intents/INCarAudioSourceResolutionResult.cs @@ -17,9 +17,7 @@ public partial class INCarAudioSourceResolutionResult { public static INCarAudioSourceResolutionResult GetSuccess (INCarAudioSource resolvedValue) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return SuccessWithResolvedCarAudioSource (resolvedValue); else @@ -29,9 +27,7 @@ public static INCarAudioSourceResolutionResult GetSuccess (INCarAudioSource reso public static INCarAudioSourceResolutionResult GetConfirmationRequired (INCarAudioSource valueToConfirm) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return ConfirmationRequiredWithCarAudioSourceToConfirm (valueToConfirm); else diff --git a/src/Intents/INCarAudioSourceResolutionResult.watchOS.cs b/src/Intents/INCarAudioSourceResolutionResult.watchOS.cs index c1817e04ddfd..803304ccc37a 100644 --- a/src/Intents/INCarAudioSourceResolutionResult.watchOS.cs +++ b/src/Intents/INCarAudioSourceResolutionResult.watchOS.cs @@ -1,4 +1,4 @@ -#if __WATCHOS__ && !NET +#if !NET using System; using System.Drawing; @@ -19,7 +19,7 @@ using CoreFoundation; namespace Intents { - [Register("INCarAudioSourceResolutionResult", true)] + [Register ("INCarAudioSourceResolutionResult", true)] [Obsolete (Constants.UnavailableOnWatchOS)] public unsafe partial class INCarAudioSourceResolutionResult : INIntentResolutionResult { public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); } } @@ -53,4 +53,4 @@ protected internal INCarAudioSourceResolutionResult (IntPtr handle) : base (hand } } /* class INCarAudioSourceResolutionResult */ } -#endif // __WATCHOS__ && !NET +#endif // !NET diff --git a/src/Intents/INCarDefrosterResolutionResult.cs b/src/Intents/INCarDefrosterResolutionResult.cs index d6c2ddc96f5a..3a38cb8e4e01 100644 --- a/src/Intents/INCarDefrosterResolutionResult.cs +++ b/src/Intents/INCarDefrosterResolutionResult.cs @@ -17,9 +17,7 @@ public partial class INCarDefrosterResolutionResult { public static INCarDefrosterResolutionResult GetSuccess (INCarDefroster resolvedValue) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return SuccessWithResolvedCarDefroster (resolvedValue); else @@ -29,9 +27,7 @@ public static INCarDefrosterResolutionResult GetSuccess (INCarDefroster resolved public static INCarDefrosterResolutionResult GetConfirmationRequired (INCarDefroster valueToConfirm) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return ConfirmationRequiredWithCarDefrosterToConfirm (valueToConfirm); else diff --git a/src/Intents/INCarDefrosterResolutionResult.watchOS.cs b/src/Intents/INCarDefrosterResolutionResult.watchOS.cs index f6f1c4fd56e0..8e73226d3770 100644 --- a/src/Intents/INCarDefrosterResolutionResult.watchOS.cs +++ b/src/Intents/INCarDefrosterResolutionResult.watchOS.cs @@ -1,4 +1,4 @@ -#if __WATCHOS__ && !NET +#if !NET using System; using System.Drawing; using System.Diagnostics; @@ -18,7 +18,7 @@ using CoreFoundation; namespace Intents { - [Register("INCarDefrosterResolutionResult", true)] + [Register ("INCarDefrosterResolutionResult", true)] [Obsolete (Constants.UnavailableOnWatchOS)] public unsafe partial class INCarDefrosterResolutionResult : INIntentResolutionResult { public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); } } @@ -52,4 +52,4 @@ protected internal INCarDefrosterResolutionResult (IntPtr handle) : base (handle } } /* class INCarDefrosterResolutionResult */ } -#endif // __WATCHOS__ && !NET +#endif // !NET diff --git a/src/Intents/INCarSeatResolutionResult.cs b/src/Intents/INCarSeatResolutionResult.cs index c726857a9650..c6f1d8931445 100644 --- a/src/Intents/INCarSeatResolutionResult.cs +++ b/src/Intents/INCarSeatResolutionResult.cs @@ -16,9 +16,7 @@ namespace Intents { public partial class INCarSeatResolutionResult { public static INCarSeatResolutionResult GetSuccess (INCarSeat resolvedValue) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return SuccessWithResolvedCarSeat (resolvedValue); else @@ -28,9 +26,7 @@ public static INCarSeatResolutionResult GetSuccess (INCarSeat resolvedValue) public static INCarSeatResolutionResult GetConfirmationRequired (INCarSeat valueToConfirm) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return ConfirmationRequiredWithCarSeatToConfirm (valueToConfirm); else diff --git a/src/Intents/INCarSeatResolutionResult.watchOS.cs b/src/Intents/INCarSeatResolutionResult.watchOS.cs index 06c65991e166..0fe90458f0f4 100644 --- a/src/Intents/INCarSeatResolutionResult.watchOS.cs +++ b/src/Intents/INCarSeatResolutionResult.watchOS.cs @@ -1,4 +1,4 @@ -#if __WATCHOS__ && !NET +#if !NET using System; using System.Drawing; using System.Diagnostics; @@ -18,7 +18,7 @@ using CoreFoundation; namespace Intents { - [Register("INCarSeatResolutionResult", true)] + [Register ("INCarSeatResolutionResult", true)] [Obsolete (Constants.UnavailableOnWatchOS)] public unsafe partial class INCarSeatResolutionResult : INIntentResolutionResult { public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); } } @@ -52,4 +52,4 @@ protected internal INCarSeatResolutionResult (IntPtr handle) : base (handle) } } /* class INCarSeatResolutionResult */ } -#endif // __WATCHOS__ && !NET +#endif // !NET diff --git a/src/Intents/INCarSignalOptionsResolutionResult.cs b/src/Intents/INCarSignalOptionsResolutionResult.cs index a8073ea747a1..bcdc2196ffc8 100644 --- a/src/Intents/INCarSignalOptionsResolutionResult.cs +++ b/src/Intents/INCarSignalOptionsResolutionResult.cs @@ -19,8 +19,6 @@ public static INCarSignalOptionsResolutionResult GetSuccess (INCarSignalOptions { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return SuccessWithResolvedCarSignalOptions (resolvedValue); else @@ -31,8 +29,6 @@ public static INCarSignalOptionsResolutionResult GetConfirmationRequired (INCarS { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return ConfirmationRequiredWithCarSignalOptionsToConfirm (valueToConfirm); else diff --git a/src/Intents/INIntentResolutionResult.cs b/src/Intents/INIntentResolutionResult.cs index 5a6d4eb2ca57..bc1efb975987 100644 --- a/src/Intents/INIntentResolutionResult.cs +++ b/src/Intents/INIntentResolutionResult.cs @@ -59,7 +59,6 @@ public static INIntentResolutionResult Unsupported { [SupportedOSPlatform ("tvos14.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [iOS (13, 0)] #endif public static INIntentResolutionResult GetUnsupported (nint reason) => throw new NotImplementedException ("All subclasses of INIntentResolutionResult must re-implement this method"); @@ -70,7 +69,6 @@ public static INIntentResolutionResult Unsupported { [SupportedOSPlatform ("tvos14.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [iOS (13, 0)] #endif public static INIntentResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason) => throw new NotImplementedException ("All subclasses of INIntentResolutionResult must re-implement this method"); diff --git a/src/Intents/INInteraction.cs b/src/Intents/INInteraction.cs index a5aa53cf0100..98cee40d7593 100644 --- a/src/Intents/INInteraction.cs +++ b/src/Intents/INInteraction.cs @@ -7,7 +7,7 @@ // Copyright 2017 Xamarin Inc. All rights reserved. // -#if IOS || WATCH +#if IOS using System; using Foundation; using ObjCRuntime; diff --git a/src/Intents/INMessageAttributeOptionsResolutionResult.cs b/src/Intents/INMessageAttributeOptionsResolutionResult.cs index 5ec88e8cacbd..ff6439b10fbc 100644 --- a/src/Intents/INMessageAttributeOptionsResolutionResult.cs +++ b/src/Intents/INMessageAttributeOptionsResolutionResult.cs @@ -20,8 +20,6 @@ public static INMessageAttributeOptionsResolutionResult GetSuccess (INMessageAtt { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif @@ -34,8 +32,6 @@ public static INMessageAttributeOptionsResolutionResult GetConfirmationRequired { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif diff --git a/src/Intents/INMessageAttributeResolutionResult.cs b/src/Intents/INMessageAttributeResolutionResult.cs index 3954bf285bb8..5e8a2b8d8658 100644 --- a/src/Intents/INMessageAttributeResolutionResult.cs +++ b/src/Intents/INMessageAttributeResolutionResult.cs @@ -20,8 +20,6 @@ public static INMessageAttributeResolutionResult GetSuccess (INMessageAttribute { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif @@ -34,8 +32,6 @@ public static INMessageAttributeResolutionResult GetConfirmationRequired (INMess { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif diff --git a/src/Intents/INPaymentStatusResolutionResult.cs b/src/Intents/INPaymentStatusResolutionResult.cs index f9ec101b468d..05098efd515c 100644 --- a/src/Intents/INPaymentStatusResolutionResult.cs +++ b/src/Intents/INPaymentStatusResolutionResult.cs @@ -19,8 +19,6 @@ public static INPaymentStatusResolutionResult GetSuccess (INPaymentStatus resolv { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return SuccessWithResolvedPaymentStatus (resolvedValue); else @@ -31,8 +29,6 @@ public static INPaymentStatusResolutionResult GetConfirmationRequired (INPayment { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return ConfirmationRequiredWithPaymentStatusToConfirm (valueToConfirm); else diff --git a/src/Intents/INRadioTypeResolutionResult.cs b/src/Intents/INRadioTypeResolutionResult.cs index 1fa9449a518b..5d5f5c49a9ca 100644 --- a/src/Intents/INRadioTypeResolutionResult.cs +++ b/src/Intents/INRadioTypeResolutionResult.cs @@ -17,9 +17,7 @@ public partial class INRadioTypeResolutionResult { public static INRadioTypeResolutionResult GetSuccess (INRadioType resolvedValue) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return SuccessWithResolvedRadioType (resolvedValue); else @@ -29,9 +27,7 @@ public static INRadioTypeResolutionResult GetSuccess (INRadioType resolvedValue) public static INRadioTypeResolutionResult GetConfirmationRequired (INRadioType valueToConfirm) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return ConfirmationRequiredWithRadioTypeToConfirm (valueToConfirm); else diff --git a/src/Intents/INRadioTypeResolutionResult.watchOS.cs b/src/Intents/INRadioTypeResolutionResult.watchOS.cs index 4c6e2d2a4aa0..eae5b88989b8 100644 --- a/src/Intents/INRadioTypeResolutionResult.watchOS.cs +++ b/src/Intents/INRadioTypeResolutionResult.watchOS.cs @@ -1,4 +1,4 @@ -#if __WATCHOS__ && !NET +#if !NET using System; using System.Drawing; using System.Diagnostics; @@ -18,7 +18,7 @@ using CoreFoundation; namespace Intents { - [Register("INRadioTypeResolutionResult", true)] + [Register ("INRadioTypeResolutionResult", true)] [Obsolete (Constants.UnavailableOnWatchOS)] public unsafe partial class INRadioTypeResolutionResult : INIntentResolutionResult { public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); } } @@ -52,4 +52,4 @@ protected internal INRadioTypeResolutionResult (IntPtr handle) : base (handle) } } /* class INRadioTypeResolutionResult */ } -#endif // __WATCHOS__ && !NET +#endif // !NET diff --git a/src/Intents/INRelativeReferenceResolutionResult.cs b/src/Intents/INRelativeReferenceResolutionResult.cs index 7757472a6735..c0d7cc768343 100644 --- a/src/Intents/INRelativeReferenceResolutionResult.cs +++ b/src/Intents/INRelativeReferenceResolutionResult.cs @@ -17,9 +17,7 @@ public partial class INRelativeReferenceResolutionResult { public static INRelativeReferenceResolutionResult GetSuccess (INRelativeReference resolvedValue) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return SuccessWithResolvedRelativeReference (resolvedValue); else @@ -29,9 +27,7 @@ public static INRelativeReferenceResolutionResult GetSuccess (INRelativeReferenc public static INRelativeReferenceResolutionResult GetConfirmationRequired (INRelativeReference valueToConfirm) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return ConfirmationRequiredWithRelativeReferenceToConfirm (valueToConfirm); else diff --git a/src/Intents/INRelativeReferenceResolutionResult.watchOS.cs b/src/Intents/INRelativeReferenceResolutionResult.watchOS.cs index 9fedff0bd3e6..e4e2de95af0b 100644 --- a/src/Intents/INRelativeReferenceResolutionResult.watchOS.cs +++ b/src/Intents/INRelativeReferenceResolutionResult.watchOS.cs @@ -1,4 +1,4 @@ -#if __WATCHOS__ && !NET +#if !NET using System; using System.Drawing; using System.Diagnostics; @@ -18,7 +18,7 @@ using CoreFoundation; namespace Intents { - [Register("INRelativeReferenceResolutionResult", true)] + [Register ("INRelativeReferenceResolutionResult", true)] [Obsolete (Constants.UnavailableOnWatchOS)] public unsafe partial class INRelativeReferenceResolutionResult : INIntentResolutionResult { public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); } } @@ -52,4 +52,4 @@ protected internal INRelativeReferenceResolutionResult (IntPtr handle) : base (h } } /* class INRelativeReferenceResolutionResult */ } -#endif // __WATCHOS__ && !NET +#endif // !NET diff --git a/src/Intents/INRelativeSettingResolutionResult.cs b/src/Intents/INRelativeSettingResolutionResult.cs index 06da0935959a..e82507ec806f 100644 --- a/src/Intents/INRelativeSettingResolutionResult.cs +++ b/src/Intents/INRelativeSettingResolutionResult.cs @@ -17,9 +17,7 @@ public partial class INRelativeSettingResolutionResult { public static INRelativeSettingResolutionResult GetSuccess (INRelativeSetting resolvedValue) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return SuccessWithResolvedRelativeSetting (resolvedValue); else @@ -29,9 +27,7 @@ public static INRelativeSettingResolutionResult GetSuccess (INRelativeSetting re public static INRelativeSettingResolutionResult GetConfirmationRequired (INRelativeSetting valueToConfirm) { -#if __WATCHOS__ - throw new PlatformNotSupportedException ("This class is not supported on watchOS"); -#elif __IOS__ +#if __IOS__ if (SystemVersion.CheckiOS (11, 0)) return ConfirmationRequiredWithRelativeSettingToConfirm (valueToConfirm); else diff --git a/src/Intents/INRelativeSettingResolutionResult.watchOS.cs b/src/Intents/INRelativeSettingResolutionResult.watchOS.cs index d63093545fc1..8e5b6410eecb 100644 --- a/src/Intents/INRelativeSettingResolutionResult.watchOS.cs +++ b/src/Intents/INRelativeSettingResolutionResult.watchOS.cs @@ -1,4 +1,4 @@ -#if __WATCHOS__ && !NET +#if !NET using System; using System.Drawing; using System.Diagnostics; @@ -18,7 +18,7 @@ using CoreFoundation; namespace Intents { - [Register("INRelativeSettingResolutionResult", true)] + [Register ("INRelativeSettingResolutionResult", true)] [Obsolete (Constants.UnavailableOnWatchOS)] public unsafe partial class INRelativeSettingResolutionResult : INIntentResolutionResult { public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); } } @@ -52,4 +52,4 @@ protected internal INRelativeSettingResolutionResult (IntPtr handle) : base (han } } /* class INRelativeSettingResolutionResult */ } -#endif // __WATCHOS__ && !NET +#endif // !NET diff --git a/src/Intents/INSpeakableString.cs b/src/Intents/INSpeakableString.cs index a7561e782be2..7b6ed0e23a73 100644 --- a/src/Intents/INSpeakableString.cs +++ b/src/Intents/INSpeakableString.cs @@ -18,8 +18,6 @@ public INSpeakableString (string identifier, string spokenPhrase, string pronunc { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif diff --git a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs index abc83a3e1ba1..46020fca83a0 100644 --- a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs +++ b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs @@ -19,8 +19,6 @@ public static INWorkoutGoalUnitTypeResolutionResult GetSuccess (INWorkoutGoalUni { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return SuccessWithResolvedWorkoutGoalUnitType (resolvedValue); else @@ -31,8 +29,6 @@ public static INWorkoutGoalUnitTypeResolutionResult GetConfirmationRequired (INW { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (valueToConfirm); else diff --git a/src/Intents/INWorkoutLocationTypeResolutionResult.cs b/src/Intents/INWorkoutLocationTypeResolutionResult.cs index 96b5a91293a9..0afa363d03e1 100644 --- a/src/Intents/INWorkoutLocationTypeResolutionResult.cs +++ b/src/Intents/INWorkoutLocationTypeResolutionResult.cs @@ -19,8 +19,6 @@ public static INWorkoutLocationTypeResolutionResult GetSuccess (INWorkoutLocatio { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return SuccessWithResolvedWorkoutLocationType (resolvedValue); else @@ -31,8 +29,6 @@ public static INWorkoutLocationTypeResolutionResult GetConfirmationRequired (INW { #if IOS if (SystemVersion.CheckiOS (11, 0)) -#elif WATCH - if (SystemVersion.CheckwatchOS (4, 0)) #endif return ConfirmationRequiredWithWorkoutLocationTypeToConfirm (valueToConfirm); else diff --git a/src/LocalAuthentication/LADomainStateCompanion.cs b/src/LocalAuthentication/LADomainStateCompanion.cs index 27e4d544116b..cf87dbd7c1dc 100644 --- a/src/LocalAuthentication/LADomainStateCompanion.cs +++ b/src/LocalAuthentication/LADomainStateCompanion.cs @@ -1,4 +1,4 @@ -#if !WATCH && !TV +#if !TV using Foundation; namespace LocalAuthentication { @@ -17,4 +17,4 @@ public LACompanionType AvailableCompanionTypes { } } } -#endif // !WATCH && !TV +#endif // !TV diff --git a/src/LocalAuthentication/LAEnums.cs b/src/LocalAuthentication/LAEnums.cs index e7c013aa3de2..7cea51004bbb 100644 --- a/src/LocalAuthentication/LAEnums.cs +++ b/src/LocalAuthentication/LAEnums.cs @@ -9,30 +9,26 @@ namespace LocalAuthentication { [MacCatalyst (13, 1)] [Native] public enum LAPolicy : long { - [NoWatch] [MacCatalyst (13, 1)] DeviceOwnerAuthenticationWithBiometrics = 1, DeviceOwnerAuthentication = 2, [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'DeviceOwnerAuthenticationWithCompanion' instead.")] [NoiOS] - [NoWatch] [NoMacCatalyst] DeviceOwnerAuthenticationWithWatch = 3, - [NoWatch, NoTV, MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [NoTV, MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] DeviceOwnerAuthenticationWithCompanion = 3, [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'DeviceOwnerAuthenticationWithBiometricsOrCompanion' instead.")] [NoiOS] - [NoWatch] [NoMacCatalyst] DeviceOwnerAuthenticationWithBiometricsOrWatch = 4, - [NoWatch, NoTV, MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [NoTV, MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] DeviceOwnerAuthenticationWithBiometricsOrCompanion = 4, [Obsolete ("Use DeviceOwnerAuthenticationWithBiometricsOrWatch enum value instead.")] [NoiOS] - [NoWatch] [NoMacCatalyst] OwnerAuthenticationWithBiometricsOrWatch = DeviceOwnerAuthenticationWithBiometricsOrWatch, - [NoMac, NoiOS, NoMacCatalyst, Watch (9, 0)] + [NoMac, NoiOS, NoMacCatalyst] DeviceOwnerAuthenticationWithWristDetection = 5, } @@ -43,15 +39,15 @@ public enum LAPolicy : long { [ErrorDomain ("LAErrorDomain")] public enum LAStatus : long { Success = 0, - /// Authentication was not successful, because user failed to provide valid credentials. + /// Authentication was not successful, because user failed to provide valid credentials. AuthenticationFailed = -1, - /// Authentication was canceled by user (e.g. tapped Cancel button). + /// Authentication was canceled by user (e.g. tapped Cancel button). UserCancel = -2, - /// Authentication was canceled, because the user tapped the fallback button (Enter Password). + /// Authentication was canceled, because the user tapped the fallback button (Enter Password). UserFallback = -3, - /// Authentication was canceled by system (e.g. another application went to foreground). + /// Authentication was canceled by system (e.g. another application went to foreground). SystemCancel = -4, - /// Authentication could not start, because passcode is not set on the device. + /// Authentication could not start, because passcode is not set on the device. PasscodeNotSet = -5, #if !NET @@ -72,25 +68,21 @@ public enum LAStatus : long { AppCancel = -9, InvalidContext = -10, [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'CompanionNotAvailable' instead.")] - [NoiOS, NoWatch, NoMacCatalyst] + [NoiOS, NoMacCatalyst] WatchNotAvailable = -11, - [NoiOS, NoWatch, NoMacCatalyst] + [NoiOS, NoMacCatalyst] BiometryNotPaired = -12, - [NoiOS, NoWatch, NoMacCatalyst] + [NoiOS, NoMacCatalyst] BiometryDisconnected = -13, - [NoiOS, NoWatch, NoMacCatalyst] + [NoiOS, NoMacCatalyst] InvalidDimension = -14, - [NoWatch] [MacCatalyst (13, 1)] BiometryNotAvailable = -6, - [NoWatch] [MacCatalyst (13, 1)] BiometryNotEnrolled = -7, - [NoWatch] [MacCatalyst (13, 1)] BiometryLockout = -8, NotInteractive = -1004, - [NoWatch] CompanionNotAvailable = -11, } @@ -100,7 +92,7 @@ public enum LAStatus : long { [Native] public enum LACredentialType : long { ApplicationPassword = 0, - [iOS (13, 4), NoWatch, NoTV] + [iOS (13, 4), NoTV] [MacCatalyst (13, 1)] SmartCardPin = -3, } @@ -120,7 +112,7 @@ public enum LAAccessControlOperation : long { UseKeyKeyExchange, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum LARightState : long { Unknown = 0, diff --git a/src/MLCompute/MLHelpers.cs b/src/MLCompute/MLHelpers.cs index 18dc83df7364..e1dd300c7ad3 100644 --- a/src/MLCompute/MLHelpers.cs +++ b/src/MLCompute/MLHelpers.cs @@ -17,7 +17,6 @@ namespace MLCompute { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCActivationTypeExtensions { @@ -38,7 +37,6 @@ public static class MLCActivationTypeExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCArithmeticOperationExtensions { @@ -59,7 +57,6 @@ public static class MLCArithmeticOperationExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCPaddingPolicyExtensions { @@ -80,7 +77,6 @@ public static class MLCPaddingPolicyExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCLossTypeExtensions { @@ -101,7 +97,6 @@ public static class MLCLossTypeExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCReductionTypeExtensions { @@ -122,7 +117,6 @@ public static class MLCReductionTypeExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCPaddingTypeExtensions { @@ -143,7 +137,6 @@ public static class MLCPaddingTypeExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCConvolutionTypeExtensions { @@ -164,7 +157,6 @@ public static class MLCConvolutionTypeExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCPoolingTypeExtensions { @@ -185,7 +177,6 @@ public static class MLCPoolingTypeExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCSoftmaxOperationExtensions { @@ -206,7 +197,6 @@ public static class MLCSoftmaxOperationExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCSampleModeExtensions { @@ -227,7 +217,6 @@ public static class MLCSampleModeExtensions { #else [iOS (14, 0)] [TV (14, 0)] - [NoWatch] #endif public static class MLCLstmResultModeExtensions { @@ -248,7 +237,6 @@ public static class MLCLstmResultModeExtensions { #else [TV (14, 5)] [iOS (14, 5)] - [NoWatch] #endif public static class MLCComparisonOperationExtensions { @@ -267,7 +255,6 @@ public static class MLCComparisonOperationExtensions { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Makefile b/src/Makefile index 037a204c27a6..0639f5485151 100644 --- a/src/Makefile +++ b/src/Makefile @@ -14,7 +14,7 @@ IOS_DOTNET_BUILD_DIR=$(DOTNET_BUILD_DIR)/ios TVOS_DOTNET_BUILD_DIR=$(DOTNET_BUILD_DIR)/tvos MACCATALYST_DOTNET_BUILD_DIR=$(DOTNET_BUILD_DIR)/maccatalyst -GENERATOR_FLAGS=-process-enums -core -nologo -nostdlib -noconfig -native-exception-marshalling --ns:ObjCRuntime +GENERATOR_FLAGS=-process-enums -core -nologo -nostdlib -native-exception-marshalling --ns:ObjCRuntime GENERATOR_TF_VERSION=$(subst net,,$(DOTNET_TFM)) @@ -56,14 +56,13 @@ DOTNET_REFERENCES = \ /r:$(DOTNET_BCL_DIR)/System.Xml.ReaderWriter.dll \ DOTNET_OR_GREATER_DEFINES:=$(foreach version,$(shell seq 6 $(firstword $(subst ., ,$(subst net,,$(DOTNET_TFM))))),/define:NET$(version)_0_OR_GREATER) -DOTNET_FLAGS=/warnaserror+ /noconfig /nostdlib+ /deterministic /features:strict /nologo /target:library /debug /unsafe /define:NET /define:NET_TODO $(DOTNET_OR_GREATER_DEFINES) $(DOTNET_REFERENCES) +DOTNET_FLAGS=/warnaserror+ /nostdlib+ /deterministic /features:strict /nologo /target:library /debug /unsafe /define:NET /define:NET_TODO $(DOTNET_OR_GREATER_DEFINES) $(DOTNET_REFERENCES) ifeq ($(XCODE_IS_STABLE),true) DOTNET_FLAGS+=/define:XCODE_IS_STABLE endif -DOTNET_COMPILER=$(DOTNET_BUILD_DIR)/compiler -DOTNET_GENERATOR_FLAGS=$(GENERATOR_FLAGS) -compiler=$(abspath $(DOTNET_COMPILER)) --lib=$(DOTNET_BCL_DIR) -attributelib:$(DOTNET_BINDING_ATTRIBUTES) $(DOTNET_REFERENCES) +DOTNET_GENERATOR_FLAGS=$(GENERATOR_FLAGS) --lib=$(DOTNET_BCL_DIR) -attributelib:$(DOTNET_BINDING_ATTRIBUTES) $(DOTNET_REFERENCES) DOTNET_GENERATOR=$(DOTNET_BUILD_DIR)/bgen/bgen DOTNET_BINDING_ATTRIBUTES=$(DOTNET_BUILD_DIR)/Xamarin.Apple.BindingAttributes.dll @@ -95,6 +94,12 @@ CSC_WARNINGS_TO_FIX=108,219,618,114,414,1635,3021,4014 # we can ignore this warning. CSC_WARNINGS_TO_FIX:=$(CSC_WARNINGS_TO_FIX),1591 +# warning CS8981: The type name 'nfloat' only contains lower-cased ascii characters. Such names may become reserved for the language. +CSC_WARNINGS_TO_FIX:=$(CSC_WARNINGS_TO_FIX),CS8981 + +# availability warnings, need to fix https://github.com/xamarin/xamarin-macios/pull/21185 to stop ignoring this. +CSC_WARNINGS_TO_FIX:=$(CSC_WARNINGS_TO_FIX),CA1416,CA1422 + WARNINGS_TO_FIX = -nowarn:$(CSC_WARNINGS_TO_FIX) CORE_WARNINGS_TO_FIX = -nowarn:$(CSC_WARNINGS_TO_FIX),$(BGEN_WARNINGS_TO_FIX) @@ -135,7 +140,8 @@ IOS_DOTNET_CORE_SOURCES += $(IOS_DOTNET_EXTRA_SOURCES) IOS_DOTNET_SOURCES += $(IOS_DOTNET_EXTRA_SOURCES) $(IOS_DOTNET_HTTP_SOURCES) -IOS_GENERATOR_FLAGS = -inline-selectors -d:IOS -process-enums $(IOS_GENERATOR_WARNASERROR) +IOS_GENERATOR_DEFINES = -d:IOS +IOS_GENERATOR_FLAGS = -inline-selectors -process-enums $(IOS_GENERATOR_WARNASERROR) $(IOS_GENERATOR_DEFINES) IOS_DEFINES = -define:IPHONE -define:IOS -define:MONOTOUCH -d:__IOS__ -d:SYSTEM_NET_HTTP IOS_CORE_DEFINES=-define:COREBUILD $(IOS_DEFINES) @@ -143,13 +149,12 @@ IOS_CORE_DEFINES=-define:COREBUILD $(IOS_DEFINES) $(IOS_DOTNET_BUILD_DIR)/Constants.cs: Constants.iOS.cs.in Makefile $(TOP)/Make.config.inc | $(IOS_DOTNET_BUILD_DIR) $(call Q_PROF_GEN,ios) sed \ -e "s/@VERSION@/$(IOS_NUGET_VERSION_MAJOR).$(IOS_NUGET_VERSION_MINOR).$(IOS_NUGET_VERSION_PATCH)/g" \ - -e 's/@REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ + -e 's/@REVISION@/$(IOS_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ -e "s/@IOS_SDK_VERSION@/$(IOS_SDK_VERSION)/g" \ $< > $@ $(IOS_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in | $(IOS_DOTNET_BUILD_DIR) $(call Q_PROF_GEN,ios) sed \ - -e 's|@PRODUCT_NAME@|$(IOS_PRODUCT)|g' \ -e 's|@PACKAGE_HEAD_REV@|$(PACKAGE_HEAD_REV)|g' \ -e 's|@PACKAGE_HEAD_BRANCH@|$(CURRENT_BRANCH_SED_ESCAPED)|g' \ -e 's|@NUGET_VERSION_NO_METADATA@|$(IOS_NUGET_VERSION_NO_METADATA)|g' \ @@ -169,7 +174,8 @@ $(IOS_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in | $(IOS_D # MAC_COMMON_DEFINES = -define:MONOMAC -d:__MACOS__ -MACOS_GENERATOR_FLAGS = -d:MONOMAC -d:__MACOS__ +MACOS_GENERATOR_DEFINES = -d:MONOMAC -d:__MACOS__ +MACOS_GENERATOR_FLAGS = $(MACOS_GENERATOR_DEFINES) MACOS_CORE_DEFINES = $(MAC_COMMON_DEFINES),COREBUILD MACOS_DEFINES = $(MAC_COMMON_DEFINES) -D:XAMARIN_MODERN @@ -208,14 +214,13 @@ MACOS_DOTNET_SOURCES += \ $(MACOS_DOTNET_BUILD_DIR)/Constants.cs: Constants.mac.cs.in Makefile $(TOP)/Make.config.inc | $(MACOS_DOTNET_BUILD_DIR) $(Q) sed \ -e "s/@VERSION@/$(MACOS_NUGET_VERSION_MAJOR).$(MACOS_NUGET_VERSION_MINOR).$(MACOS_NUGET_VERSION_PATCH)/g" \ - -e 's/@REVISION@/$(MAC_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ + -e 's/@REVISION@/$(MACOS_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ -e "s/@MACOS_SDK_VERSION@/$(MACOS_SDK_VERSION)/g" \ -e "s/@MIN_XM_MONO_VERSION@/$(MIN_XM_MONO_VERSION)/g" \ $< > $@ $(MACOS_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in | $(MACOS_DOTNET_BUILD_DIR) $(call Q_PROF_GEN,mac) sed \ - -e 's|@PRODUCT_NAME@|$(MAC_PRODUCT)|g' \ -e 's|@PACKAGE_HEAD_REV@|$(PACKAGE_HEAD_REV)|g' \ -e 's|@NUGET_VERSION_NO_METADATA@|$(MACOS_NUGET_VERSION_NO_METADATA)|g' \ -e 's|@NUGET_VERSION_MAJOR@|$(MACOS_NUGET_VERSION_MAJOR)|g' \ @@ -236,7 +241,8 @@ $(MACOS_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in | $(MAC TVOS_DEFINES = -define:IPHONE -define:MONOTOUCH -d:TVOS -d:__TVOS__ -d:SYSTEM_NET_HTTP TVOS_CORE_DEFINES=$(TVOS_DEFINES) -d:COREBUILD -TVOS_GENERATOR_FLAGS = -d:TVOS -inline-selectors +TVOS_GENERATOR_DEFINES = -d:TVOS +TVOS_GENERATOR_FLAGS = $(TVOS_GENERATOR_DEFINES) -inline-selectors TVOS_DOTNET_EXTRA_CORE_SOURCES = \ $(TVOS_DOTNET_BUILD_DIR)/Constants.cs \ @@ -265,7 +271,7 @@ TVOS_DOTNET_SOURCES += \ $(TVOS_DOTNET_BUILD_DIR)/Constants.cs: $(TOP)/src/Constants.tvos.cs.in Makefile $(TOP)/Make.config.inc | $(TVOS_DOTNET_BUILD_DIR) $(call Q_PROF_GEN,tvos) sed \ -e "s/@VERSION@/$(TVOS_NUGET_VERSION_MAJOR).$(TVOS_NUGET_VERSION_MINOR).$(TVOS_NUGET_VERSION_PATCH)/g" \ - -e 's/@REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ + -e 's/@REVISION@/$(TVOS_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ -e "s/@TVOS_SDK_VERSION@/$(TVOS_SDK_VERSION)/g" \ $< > $@ @@ -294,7 +300,8 @@ $(TVOS_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in $(TOP)/M MACCATALYST_DEFINES = -define:IPHONE -define:IOS -define:MONOTOUCH -d:__IOS__ -d:__MACCATALYST__ -d:SYSTEM_NET_HTTP MACCATALYST_CORE_DEFINES=$(MACCATALYST_DEFINES) -d:COREBUILD -MACCATALYST_GENERATOR_FLAGS = -d:__MACCATALYST__ -d:IOS -inline-selectors +MACCATALYST_GENERATOR_DEFINES = -d:__MACCATALYST__ -d:IOS +MACCATALYST_GENERATOR_FLAGS = $(MACCATALYST_GENERATOR_DEFINES) -inline-selectors MACCATALYST_DOTNET_EXTRA_CORE_SOURCES = \ $(MACCATALYST_DOTNET_BUILD_DIR)/Constants.cs \ @@ -317,7 +324,7 @@ MACCATALYST_DOTNET_SOURCES += \ $(MACCATALYST_DOTNET_BUILD_DIR)/Constants.cs: $(TOP)/src/Constants.maccatalyst.cs.in Makefile $(TOP)/Make.config.inc | $(MACCATALYST_DOTNET_BUILD_DIR) $(call Q_PROF_GEN,maccatalyst) sed \ -e "s/@VERSION@/$(MACCATALYST_NUGET_VERSION_MAJOR).$(MACCATALYST_NUGET_VERSION_MINOR).$(MACCATALYST_NUGET_VERSION_PATCH)/g" \ - -e 's/@REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ + -e 's/@REVISION@/$(MACCATALYST_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(shell git log -1 --pretty=%h))/g' \ -e "s/@MACCATALYST_SDK_VERSION@/$(MACCATALYST_SDK_VERSION)/g" \ $< > $@ @@ -341,11 +348,21 @@ $(MACCATALYST_DOTNET_BUILD_DIR)/AssemblyInfo.cs: $(TOP)/src/AssemblyInfo.cs.in $ ### .NET ### include $(TOP)/scripts/generate-sourcelink-json/fragment.mk +include $(TOP)/scripts/rsp-to-csproj/fragment.mk define BuildDotNetIntermediateAssembly -$($(2)_DOTNET_BUILD_DIR)/core-$(3).dll: $($(2)_DOTNET_CORE_SOURCES) frameworks.sources $(RSP_DIR)/dotnet/$(3)-defines-dotnet.rsp | $($(2)_DOTNET_BUILD_DIR) - $$(Q_DOTNET_GEN) \ - $(DOTNET_CSC) \ + +CORE_$(1)_CSPROJ = $(DOTNET_BUILD_DIR)/$(1)/csproj/core/Core.$(1).csproj +CSPROJECTS += $$(CORE_$(1)_CSPROJ) +$$(CORE_$(1)_CSPROJ): $($(2)_DOTNET_BUILD_DIR)/core-$(3).rsp $(RSP_TO_CSPROJ) + $$(Q) rm -f $$@ + $$(Q) mkdir -p $$(dir $$@) + $$(call Q_PROF_GEN,$(1)) $(RSP_TO_CSPROJ_EXEC) --rsp $(abspath $$<) --working-directory $(abspath .) --target-framework $(DOTNET_TFM) --output $$@.tmp + $$(Q) mv $$@.tmp $$@ + +rsp:: $($(2)_DOTNET_BUILD_DIR)/core-$(3).rsp +$($(2)_DOTNET_BUILD_DIR)/core-$(3).rsp: Makefile frameworks.sources | $($(2)_DOTNET_BUILD_DIR) + $$(Q_DOTNET_GEN) echo \ $(DOTNET_FLAGS) \ $(DOTNET_CORE_WARNINGS_TO_FIX) \ @$(RSP_DIR)/dotnet/$(3)-defines-dotnet.rsp \ @@ -353,12 +370,52 @@ $($(2)_DOTNET_BUILD_DIR)/core-$(3).dll: $($(2)_DOTNET_CORE_SOURCES) frameworks.s $($(2)_DOTNET_CORE_SOURCES) \ -nullable+ \ -warnaserror+ \ - -out:$$@ + -nowarn:1591 \ + -out:$($(2)_DOTNET_BUILD_DIR)/core-$(3).dll \ + -doc:$($(2)_DOTNET_BUILD_DIR)/core-$(3).xml \ + > $$@.tmp + $$(Q) mv $$@.tmp $$@ + +$($(2)_DOTNET_BUILD_DIR)/core-$(3).dll: $($(2)_DOTNET_CORE_SOURCES) $($(2)_DOTNET_BUILD_DIR)/core-$(3).rsp | $($(2)_DOTNET_BUILD_DIR) + $$(Q_DOTNET_GEN) $(DOTNET_CSC) @$($(2)_DOTNET_BUILD_DIR)/core-$(3).rsp + +$($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).rsp: Makefile frameworks.sources | $($(2)_DOTNET_BUILD_DIR) + $$(Q_DOTNET_GEN) echo \ + -debug \ + -unsafe \ + -target:library \ + -nowarn:436,1591,CA1416,CS8981 \ + -warnaserror+ \ + -out:$($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).dll \ + -doc:$($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).xml \ + -r:$($(2)_DOTNET_BUILD_DIR)/core-$(3).dll \ + -nostdlib \ + -nologo \ + -r:$(DOTNET_BINDING_ATTRIBUTES) \ + $($(2)_APIS) \ + $($(2)_GENERATOR_DEFINES) \ + @$(RSP_DIR)/dotnet/$(3)-defines-dotnet.rsp \ + > $$@.tmp + $$(Q) mv $$@.tmp $$@ + +APIDEFINITION_$(1)_CSPROJ = $(DOTNET_BUILD_DIR)/$(1)/csproj/api/ApiDefinition.$(1).csproj +CSPROJECTS += $$(APIDEFINITION_$(1)_CSPROJ) +$$(APIDEFINITION_$(1)_CSPROJ): $($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).rsp $(RSP_TO_CSPROJ) + $$(Q) rm -f $$@ + $$(Q) mkdir -p $$(dir $$@) + $$(call Q_PROF_GEN,$(1)) $(RSP_TO_CSPROJ_EXEC) --rsp $(abspath $$<) --working-directory $(abspath .) --target-framework $(DOTNET_TFM) --output $$@.tmp + $$(Q) mv $$@.tmp $$@ + +$($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).dll: $($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).rsp $($(2)_DOTNET_BUILD_DIR)/core-$(3).dll $(DOTNET_BINDING_ATTRIBUTES) + $$(Q_GEN) $(DOTNET_CSC) $(DOTNET_FLAGS) @$$< + +apidefinition:: $(3)-apidefinition +$(3)-apidefinition: $($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).dll -$($(2)_DOTNET_BUILD_DIR)/$(3)-generated-sources: $(DOTNET_GENERATOR) $($(2)_DOTNET_APIS) $($(2)_DOTNET_BUILD_DIR)/core-$(3).dll $(DOTNET_BINDING_ATTRIBUTES) $($(2)_DOTNET_BUILD_DIR)/$(3).rsp | $($(2)_DOTNET_BUILD_DIR)/generated-sources +$($(2)_DOTNET_BUILD_DIR)/$(3)-generated-sources: $(DOTNET_GENERATOR) $($(2)_DOTNET_APIS) $($(2)_DOTNET_BUILD_DIR)/core-$(3).dll $($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).dll $(DOTNET_BINDING_ATTRIBUTES) $($(2)_DOTNET_BUILD_DIR)/$(3).rsp | $($(2)_DOTNET_BUILD_DIR)/generated-sources $$(Q_DOTNET_GEN) $$< @$($(2)_DOTNET_BUILD_DIR)/$(3).rsp -$($(2)_DOTNET_BUILD_DIR)/$(3).rsp: Makefile Makefile.generator Makefile.rgenerator frameworks.sources $(ROSLYN_GENERATOR) $(ROSLYN_ANALYZER) $(DOTNET_COMPILER) | $($(2)_DOTNET_BUILD_DIR) +$($(2)_DOTNET_BUILD_DIR)/$(3).rsp: Makefile Makefile.generator Makefile.rgenerator frameworks.sources $(ROSLYN_GENERATOR) $(ROSLYN_ANALYZER) | $($(2)_DOTNET_BUILD_DIR) $(Q) echo \ $($(2)_GENERATOR_FLAGS) \ $(DOTNET_GENERATOR_FLAGS) \ @@ -367,8 +424,7 @@ $($(2)_DOTNET_BUILD_DIR)/$(3).rsp: Makefile Makefile.generator Makefile.rgenerat -tmpdir=$($(2)_DOTNET_BUILD_DIR)/generated-sources \ -baselib=$($(2)_DOTNET_BUILD_DIR)/core-$(3).dll \ --target-framework=.NETCoreApp,Version=$(GENERATOR_TF_VERSION),Profile=$(3) \ - $($(2)_APIS) \ - @$(RSP_DIR)/dotnet/$(3)-defines-dotnet.rsp \ + --compiled-api-definition-assembly=$($(2)_DOTNET_BUILD_DIR)/apidefinition-$(3).dll \ > $$@ DOTNET_TARGETS_$(3) += \ @@ -442,6 +498,7 @@ endif $(2)_DOTNET_PLATFORM_ASSEMBLY_DEPENDENCIES = \ $($(2)_DOTNET_SOURCES) \ + $($(2)_DOTNET_BUILD_DIR)/Microsoft.$(1).rsp \ $($(2)_DOTNET_BUILD_DIR)/$(3)-generated-sources \ $($(2)_DOTNET_BUILD_DIR)/SourceLink.json \ $($(2)_DOTNET_BUILD_DIR)/embed-files.rsp \ @@ -453,9 +510,21 @@ $(2)_DOTNET_PLATFORM_ASSEMBLY_DIR_DEPENDENCIES = \ $($(2)_DOTNET_BUILD_DIR)/$(4) \ $($(2)_DOTNET_BUILD_DIR)/ref \ -$($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1)%dll $($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1)%pdb $$($(2)_$(4)_REF_TARGET) $$($(2)_$(4)_DOC_TARGET): $$($(2)_DOTNET_PLATFORM_ASSEMBLY_DEPENDENCIES) $$(ROSLYN_GENERATOR) $$(ROSLYN_ANALYZER) | $$($(2)_DOTNET_PLATFORM_ASSEMBLY_DIR_DEPENDENCIES) - $$(call Q_PROF_CSC,dotnet/$(4)-bit) \ - $(DOTNET_CSC) \ +ifeq ($(4),64) +PLATFORM_$(1)_CSPROJ = $(DOTNET_BUILD_DIR)/$(1)/platform/Microsoft.$(1).csproj +CSPROJECTS += $$(PLATFORM_$(1)_CSPROJ) +$$(PLATFORM_$(1)_CSPROJ): $($(2)_DOTNET_BUILD_DIR)/Microsoft.$(1).rsp Makefile $(RSP_TO_CSPROJ) $($(2)_DOTNET_BUILD_DIR)/embed-files.rsp + $$(Q) rm -f $$@ + $$(Q) mkdir -p $$(dir $$@) + $$(call Q_PROF_GEN,$(1)) $(RSP_TO_CSPROJ_EXEC) --rsp $(abspath $($(2)_DOTNET_BUILD_DIR)/Microsoft.$(1).rsp) --working-directory $(abspath .) --target-framework $(DOTNET_TFM) --output $$@.tmp + $$(Q) mv $$@.tmp $$@ +endif + +rsp:: $($(2)_DOTNET_BUILD_DIR)/Microsoft.$(1).rsp + +$($(2)_DOTNET_BUILD_DIR)/Microsoft.$(1).rsp: Makefile | $($(2)_DOTNET_BUILD_DIR) + $$(Q) rm -f $$@ + $$(Q) echo \ $(DOTNET_FLAGS) \ /analyzer:$(ROSLYN_GENERATOR_COMMON) \ /analyzer:$(ROSLYN_GENERATOR) \ @@ -470,18 +539,23 @@ $($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1)%dll $($(2)_DOTNET_BUILD_DIR)/$(4)/M $$($(2)_$(4)_REFOUT_ARG) \ $$($(2)_$(4)_DOC_ARG) \ -sourcelink:$($(2)_DOTNET_BUILD_DIR)/SourceLink.json \ - @$($(2)_DOTNET_BUILD_DIR)/embed-files.rsp \ + @$$(abspath $($(2)_DOTNET_BUILD_DIR)/embed-files.rsp) \ $$($(2)_DEFINES) \ $(ARGS_$(4)) \ $$(DOTNET_WARNINGS_TO_FIX) \ - @$(RSP_DIR)/dotnet/$(3)-defines-dotnet.rsp \ + @$$(abspath $(RSP_DIR)/dotnet/$(3)-defines-dotnet.rsp) \ -res:$($(2)_DOTNET_BUILD_DIR)/ILLink.LinkAttributes.xml \ -res:$($(2)_DOTNET_BUILD_DIR)/ILLink.Substitutions.xml \ -warnaserror+ \ -nullable+ \ $$($(2)_DOTNET_SOURCES) \ - @$($(2)_DOTNET_BUILD_DIR)/$(3)-generated-sources \ + @$$(abspath $($(2)_DOTNET_BUILD_DIR)/$(3)-generated-sources) \ -out:$($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1).dll \ + > $$@.tmp + $$(Q) mv $$@.tmp $$@ + +$($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1)%dll $($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1)%pdb $$($(2)_$(4)_REF_TARGET) $$($(2)_$(4)_DOC_TARGET): $$($(2)_DOTNET_PLATFORM_ASSEMBLY_DEPENDENCIES) $$(ROSLYN_GENERATOR) $$(ROSLYN_ANALYZER) | $$($(2)_DOTNET_PLATFORM_ASSEMBLY_DIR_DEPENDENCIES) + $$(call Q_PROF_CSC,dotnet/$(4)-bit) $(DOTNET_CSC) @$($(2)_DOTNET_BUILD_DIR)/Microsoft.$(1).rsp dotnet-$(3):: $($(2)_DOTNET_BUILD_DIR)/$(4)/Microsoft.$(1).dll @@ -541,11 +615,6 @@ $(SHARED_PATH)/Delegates.generated.cs: $(SHARED_PATH)/Delegates.cs.t4 $(SHARED_P $(COMMON_TARGET_DIRS): $(Q) mkdir -p $@ -$(DOTNET_COMPILER): Makefile $(TOP)/Make.config | $(DOTNET_BUILD_DIR) - $(Q) echo "#!/bin/zsh -e" > $@ - $(Q) echo "exec $(DOTNET_CSC) $(DOTNET_FLAGS) \"\$$@\"" >> $@ - $(Q) chmod +x $@ - DOTNET_GENERATE_FRAMEWORKS_CONSTANTS=generate-frameworks-constants/dotnet/bin/Debug/$(DOTNET_TFM)/generate-frameworks-constants.dll $(DOTNET_GENERATE_FRAMEWORKS_CONSTANTS): $(wildcard generate-frameworks-constants/*.cs*) $(TOP)/tools/common/Frameworks.cs Makefile @@ -557,30 +626,37 @@ $(DOTNET_BUILD_DIR)/%/Constants.generated.cs: Makefile $(DOTNET_GENERATE_FRAMEWO $(Q) $(DOTNET) $(DOTNET_GENERATE_FRAMEWORKS_CONSTANTS) "$*" "$@.tmp" $(Q) mv "$@.tmp" "$@" +# This target builds all the generated project files. It's not really useful by itself, +# except to validate that the csproj files actually work. +build-csproj: $(CSPROJECTS) $(foreach platform,$(DOTNET_PLATFORMS),$($(shell echo $(platform) | tr '[:lower:]' '[:upper:]')_DOTNET_PLATFORM_ASSEMBLY_DEPENDENCIES)) + $(Q) set -e; \ + for csproj in $(CSPROJECTS); do \ + echo "Building $$csproj..."; \ + $(DOTNET) build $$csproj /bl:"$$(dirname $$csproj)/$$(basename -s .csproj $$csproj).binlog" $(DOTNET_BUILD_VERBOSITY); \ + echo "Built $$csproj successfully."; \ + done + +# This targets runs 'dotnet format' on the generated project files. +format-csproj: $(CSPROJECTS) $(foreach platform,$(DOTNET_PLATFORMS),$($(shell echo $(platform) | tr '[:lower:]' '[:upper:]')_DOTNET_PLATFORM_ASSEMBLY_DEPENDENCIES)) + $(Q) set -e; \ + for csproj in $(CSPROJECTS); do \ + echo "Formatting $$csproj..."; \ + $(DOTNET) format whitespace $$csproj; \ + echo "Formatted $$csproj successfully."; \ + done + +csproj:: $(CSPROJECTS) +ALL_TARGETS += $(CSPROJECTS) + install-local:: $(INSTALL_TARGETS) all-local:: $(ALL_TARGETS) $(DOTNET_TARGETS_DIRS): $(Q) mkdir -p $@ -define DotNetProjectFiles -$(DOTNET_BUILD_DIR)/projects/$(1)/$(1).csproj: dotnet.tmpl.csproj Makefile $$(wildcard $(CURDIR)/*.sources) - @mkdir -p $$(dir $$@) - @sed \ - -e 's*%DOTNET_TFM%*$(DOTNET_TFM)*' \ - -e 's*%PLATFORM%*$(1)*' \ - -e 's**$$(foreach file,$$($(2)_DOTNET_SOURCES),)*' \ - -e 's**$$(foreach file,$$($(2)_DOTNET_APIS),)*' \ - $$< | xmllint --format - > $$@ -PROJECT_FILES += $(DOTNET_BUILD_DIR)/projects/$(1)/$(1).csproj -endef -$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call DotNetProjectFiles,$(platform),$(shell echo $(platform) | tr '[:lower:]' '[:upper:]')))) - dotnet: $(DOTNET_TARGETS) all-local:: $(DOTNET_TARGETS) -project-files: $(PROJECT_FILES) - $(TOP)/tools/common/SdkVersions.cs: $(TOP)/tools/common/SdkVersions.in.cs @$(MAKE) -C $(TOP)/tools/mtouch ../common/SdkVersions.cs @@ -591,11 +667,6 @@ MinimumVersions.cs: MinimumVersions.cs.in Makefile $(TOP)/Make.config -e 's/@DOTNET_MIN_TVOS_SDK_VERSION@/$(DOTNET_MIN_TVOS_SDK_VERSION)/' \ -e 's/@DOTNET_MIN_MACOS_SDK_VERSION@/$(DOTNET_MIN_MACOS_SDK_VERSION)/' \ -e 's/@DOTNET_MIN_MACCATALYST_SDK_VERSION@/$(DOTNET_MIN_MACCATALYST_SDK_VERSION)/g' \ - \ - -e 's/@MIN_IOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_IOS_SDK_VERSION))/g' \ - -e 's/@MIN_MACOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_MACOS_SDK_VERSION))/g' \ - -e 's/@MIN_TVOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_TVOS_SDK_VERSION))/g' \ - -e 's/@MIN_MACCATALYST_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_MACCATALYST_SDK_VERSION))/g' \ $< > $@ # Using .SECONDARY can cause make to go into an infinite loop. diff --git a/src/Makefile.generator b/src/Makefile.generator index 06358768ee06..b7ffc65b888c 100644 --- a/src/Makefile.generator +++ b/src/Makefile.generator @@ -2,10 +2,8 @@ # Generator # -bgen.csproj.inc: export BUILD_EXECUTABLE=$(DOTNET) build -bgen.csproj.inc: export BUILD_VERBOSITY=$(MSBUILD_VERBOSITY) - # bgen.csproj.inc contains the generator_dependencies variable used to determine if the generator needs to be rebuilt or not. +$(DOTNET_BUILD_DIR)/bgen.csproj.inc: export BUILD_VERBOSITY=$(DOTNET_BUILD_VERBOSITY) $(DOTNET_BUILD_DIR)/bgen.csproj.inc: export DOTNET:=$(DOTNET) $(DOTNET_BUILD_DIR)/bgen.csproj.inc: bgen/bgen.csproj.inc $(Q) $(CP) $< $@ @@ -56,7 +54,7 @@ DOTNET_TARGETS_DIRS += \ include $(TOP)/scripts/generate-frameworks/fragment.mk $(DOTNET_BUILD_DIR)/generator-frameworks.g.cs: frameworks.sources Makefile.generator $(GENERATE_FRAMEWORKS) @mkdir -p $(dir $@) - $(Q) $(GENERATE_FRAMEWORKS_EXEC) $@.tmp '$(IOS_FRAMEWORKS)' '$(MACOS_FRAMEWORKS)' '$(WATCHOS_FRAMEWORKS)' '$(TVOS_FRAMEWORKS)' '$(MACCATALYST_FRAMEWORKS)' + $(Q) $(GENERATE_FRAMEWORKS_EXEC) $@.tmp '$(IOS_FRAMEWORKS)' '$(MACOS_FRAMEWORKS)' '$(TVOS_FRAMEWORKS)' '$(MACCATALYST_FRAMEWORKS)' $(Q) if ! diff $@ $@.tmp >/dev/null; then $(CP) $@.tmp $@; git diff "$@"; echo "The file $@ has been automatically re-generated; please commit the changes."; exit 1; fi $(Q) mv $@.tmp $@ diff --git a/src/Makefile.rgenerator b/src/Makefile.rgenerator index ba0dadfc3b4b..90befdd2e8d2 100644 --- a/src/Makefile.rgenerator +++ b/src/Makefile.rgenerator @@ -20,8 +20,10 @@ $(ROSLYN_GENERATOR): Makefile.rgenerator $(ROSLYN_GENERATOR_FILES) @mkdir -p $(dir $@) $(Q) $(CP) -Rf $(DOTNET_BUILD_DIR)/IDE/bin/common/rgen/generator/publish/* $(dir $@) - -$(ROSLYN_ANALYZER): Makefile.rgenerator $(ROSLYN_ANALYZER_FILES) +# Build the generator first, because both of these projects reference Microsoft.Macios.Binding.Common.csproj, and building both in parallel +# will randomly run into issues with NuGet restoring packages for Microsoft.Macios.Binding.Common.csproj for both builds simulataneously, +# which will fail randomly. +$(ROSLYN_ANALYZER): Makefile.rgenerator $(ROSLYN_ANALYZER_FILES) $(ROSLYN_GENERATOR) $(Q_DOTNET_BUILD) $(DOTNET) publish rgen/Microsoft.Macios.Bindings.Analyzer/Microsoft.Macios.Bindings.Analyzer.csproj $(DOTNET_BUILD_VERBOSITY) /p:Configuration=Debug /p:IntermediateOutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/obj/common/rgen/analyzer)/ /p:OutputPath=$(abspath $(DOTNET_BUILD_DIR)/IDE/bin/common/rgen/analyzer/)/ @mkdir -p $(dir $@) $(Q) $(CP) -Rf $(DOTNET_BUILD_DIR)/IDE/bin/common/rgen/analyzer/publish/* $(dir $@) diff --git a/src/MapKit/MKAddressFilter.cs b/src/MapKit/MKAddressFilter.cs index daacf9fd6568..a83c311efe03 100644 --- a/src/MapKit/MKAddressFilter.cs +++ b/src/MapKit/MKAddressFilter.cs @@ -1,5 +1,3 @@ -#if !WATCH - using System; using System.Runtime.InteropServices; using Foundation; @@ -38,5 +36,3 @@ public MKAddressFilter (MKAddressFilterOption options, MKAddressFilterConstructo } } } - -#endif diff --git a/src/MapKit/MKEnums.cs b/src/MapKit/MKEnums.cs index 04b8e2e5afd3..22db9990ea48 100644 --- a/src/MapKit/MKEnums.cs +++ b/src/MapKit/MKEnums.cs @@ -20,7 +20,6 @@ namespace MapKit { // NSUInteger -> MKDirectionsTypes.h - [NoWatch] [Native] [MacCatalyst (13, 1)] public enum MKDirectionsTransportType : ulong { @@ -31,7 +30,6 @@ public enum MKDirectionsTransportType : ulong { } // NSUInteger -> MKTypes.h - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MKMapType : ulong { @@ -64,7 +62,6 @@ public enum MKDistanceFormatterUnitStyle : ulong { } // NSInteger -> MKMapView.h - [Watch (10, 0)] [MacCatalyst (13, 1)] [Native] public enum MKOverlayLevel : long { @@ -73,7 +70,6 @@ public enum MKOverlayLevel : long { } // NSUInteger -> MKTypes.h - [NoWatch] [MacCatalyst (13, 1)] [Native] [ErrorDomain ("MKErrorDomain")] @@ -89,28 +85,31 @@ public enum MKErrorCode : ulong { // NSUInteger -> MKTypes.h /// An enumeration of valid states for a dragged . [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MKAnnotationViewDragState : ulong { - None, Starting, Dragging, Canceling, Ending + None, + Starting, + Dragging, + Canceling, + Ending, } // NSUInteger -> MKTypes.h /// Color for map pins. [NoTV] - [NoWatch] [Native] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'MKPinAnnotationView.PinTintColor' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'MKPinAnnotationView.PinTintColor' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'MKPinAnnotationView.PinTintColor' instead.")] public enum MKPinAnnotationColor : ulong { - Red, Green, Purple + Red, + Green, + Purple, } // NSUInteger -> MKTypes.h - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MKUserTrackingMode : ulong { @@ -124,7 +123,6 @@ public enum MKUserTrackingMode : ulong { #endif } - [NoWatch] [Native] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'MKLocalSearchCompleterResultType' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'MKLocalSearchCompleterResultType' instead.")] @@ -133,10 +131,9 @@ public enum MKUserTrackingMode : ulong { [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'MKLocalSearchCompleterResultType' instead.")] public enum MKSearchCompletionFilterType : long { AndQueries = 0, - Only + Only, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MKAnnotationViewCollisionMode : long { @@ -148,7 +145,6 @@ public enum MKAnnotationViewCollisionMode : long { None, } - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [Native] @@ -157,7 +153,6 @@ public enum MKScaleViewAlignment : long { Trailing, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MKFeatureVisibility : long { @@ -167,29 +162,29 @@ public enum MKFeatureVisibility : long { } [Flags] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum MKLocalSearchCompleterResultType : ulong { Address = 1 << 0, PointOfInterest = 1 << 1, Query = 1 << 2, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] PhysicalFeature = 1 << 3, } [Flags] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum MKLocalSearchResultType : ulong { Address = 1 << 0, PointOfInterest = 1 << 1, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] PhysicalFeature = 1 << 2, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Native] public enum MKDirectionsRoutePreference : long { Any = 0, @@ -197,7 +192,7 @@ public enum MKDirectionsRoutePreference : long { } [Flags] - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum MKMapFeatureOptions : long { PointsOfInterest = 1 << (int) MKMapFeatureType.PointOfInterest, @@ -205,7 +200,7 @@ public enum MKMapFeatureOptions : long { PhysicalFeatures = 1 << (int) MKMapFeatureType.PhysicalFeature, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum MKLookAroundBadgePosition : long { TopLeading = 0, @@ -213,14 +208,14 @@ public enum MKLookAroundBadgePosition : long { BottomTrailing, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Native] public enum MKMapElevationStyle : long { Flat = 0, Realistic, } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum MKMapFeatureType : long { PointOfInterest = 0, @@ -228,15 +223,14 @@ public enum MKMapFeatureType : long { PhysicalFeature, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Native] public enum MKStandardMapEmphasisStyle : long { Default = 0, Muted, } -#if !WATCH - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum MKPointOfInterestCategory { @@ -360,138 +354,136 @@ public enum MKPointOfInterestCategory { [Field ("MKPointOfInterestCategoryZoo")] Zoo, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryAnimalService")] AnimalService, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryAutomotiveRepair")] AutomotiveRepair, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryBaseball")] Baseball, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryBasketball")] Basketball, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryBeauty")] Beauty, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryBowling")] Bowling, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryCastle")] Castle, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryConventionCenter")] ConventionCenter, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryDistillery")] Distillery, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryFairground")] Fairground, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryFishing")] Fishing, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryFortress")] Fortress, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryGolf")] Golf, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryGoKart")] GoKart, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryHiking")] Hiking, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryKayaking")] Kayaking, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryLandmark")] Landmark, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryMailbox")] Mailbox, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryMiniGolf")] MiniGolf, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryMusicVenue")] MusicVenue, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryNationalMonument")] NationalMonument, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryPlanetarium")] Planetarium, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryRockClimbing")] RockClimbing, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryRVPark")] RVPark, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategorySkatePark")] SkatePark, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategorySkating")] Skating, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategorySkiing")] Skiing, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategorySoccer")] Soccer, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategorySpa")] Spa, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategorySurfing")] Surfing, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategorySwimming")] Swimming, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryTennis")] Tennis, - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MKPointOfInterestCategoryVolleyball")] Volleyball, } - -#endif } diff --git a/src/MapKit/MKFeatureDisplayPriority.cs b/src/MapKit/MKFeatureDisplayPriority.cs index f32382e3447b..e86271a128c7 100644 --- a/src/MapKit/MKFeatureDisplayPriority.cs +++ b/src/MapKit/MKFeatureDisplayPriority.cs @@ -5,18 +5,11 @@ namespace MapKit { -#if !WATCH || (WATCH && !NET) - #if NET [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] -#endif -#if WATCH && !NET - [Obsolete ("This API is not available on this platform.")] #endif // .net does not allow float-based enumerations public static class MKFeatureDisplayPriority { @@ -24,5 +17,4 @@ public static class MKFeatureDisplayPriority { public const float DefaultHigh = 750f; public const float DefaultLow = 250f; } -#endif } diff --git a/src/MapKit/MKGeodesicPolyline.cs b/src/MapKit/MKGeodesicPolyline.cs index 35db9479d044..beaa84767586 100644 --- a/src/MapKit/MKGeodesicPolyline.cs +++ b/src/MapKit/MKGeodesicPolyline.cs @@ -24,7 +24,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !WATCH using System; using System.Threading.Tasks; using System.Threading; @@ -62,4 +61,3 @@ public static unsafe MKGeodesicPolyline FromCoordinates (CLLocationCoordinate2D } } } -#endif // !WATCH diff --git a/src/MapKit/MKLocalSearch.cs b/src/MapKit/MKLocalSearch.cs index d85b1efefcba..68b5b179fab1 100644 --- a/src/MapKit/MKLocalSearch.cs +++ b/src/MapKit/MKLocalSearch.cs @@ -25,8 +25,6 @@ // #pragma warning disable 414 -#if !WATCH // doesn't show up in watch headers - using System; using System.Threading.Tasks; using System.Threading; @@ -62,4 +60,3 @@ public virtual Task StartAsync (CancellationToken token) } } } -#endif // !WATCH diff --git a/src/MapKit/MKMapCameraZoomRange.cs b/src/MapKit/MKMapCameraZoomRange.cs index ad8c2681287d..c89e3f9b587a 100644 --- a/src/MapKit/MKMapCameraZoomRange.cs +++ b/src/MapKit/MKMapCameraZoomRange.cs @@ -1,4 +1,3 @@ -#if !WATCH // doesn't show up in watch headers #if !MONOMAC using System; using ObjCRuntime; @@ -34,4 +33,3 @@ public MKMapCameraZoomRange (double distance, MKMapCameraZoomRangeType type) } } #endif -#endif // !WATCH diff --git a/src/MapKit/MKMapItem.cs b/src/MapKit/MKMapItem.cs index 44e689f3c5cf..ea7c67e0b4f9 100644 --- a/src/MapKit/MKMapItem.cs +++ b/src/MapKit/MKMapItem.cs @@ -19,7 +19,9 @@ namespace MapKit { // it's similar to MKDirectionsTransportType values but it's something only used on the managed side // to replace NSString fields public enum MKDirectionsMode { - Driving, Walking, Transit, + Driving, + Walking, + Transit, #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("macos")] @@ -28,7 +30,7 @@ public enum MKDirectionsMode { #else [NoTV] #endif - Default + Default, } #if NET @@ -38,16 +40,11 @@ public enum MKDirectionsMode { #endif public class MKLaunchOptions { public MKDirectionsMode? DirectionsMode { get; set; } -#if !WATCH // MapType: __WATCHOS_PROHIBITED public MKMapType? MapType { get; set; } -#endif public CLLocationCoordinate2D? MapCenter { get; set; } public MKCoordinateSpan? MapSpan { get; set; } -#if !WATCH // ShowTraffic: __WATCHOS_PROHIBITED public bool? ShowTraffic { get; set; } -#endif -#if !WATCH // The corresponding key (MKLaunchOptionsCameraKey) is allowed in WatchOS, but there's no MKMapCamera type. #if NET [SupportedOSPlatform ("ios")] @@ -55,21 +52,16 @@ public class MKLaunchOptions { [SupportedOSPlatform ("macos")] #endif public MKMapCamera? Camera { get; set; } -#endif internal NSDictionary? ToDictionary () { int n = 0; if (DirectionsMode.HasValue) n++; -#if !WATCH if (MapType.HasValue) n++; -#endif if (MapCenter.HasValue) n++; if (MapSpan.HasValue) n++; -#if !WATCH if (ShowTraffic.HasValue) n++; if (Camera is not null) n++; -#endif if (n == 0) return null; @@ -98,12 +90,10 @@ public class MKLaunchOptions { values [i++] = v; } -#if !WATCH // MapType: __WATCHOS_PROHIBITED if (MapType.HasValue) { keys [i] = MKMapItem.MKLaunchOptionsMapTypeKey; values [i++] = new NSNumber ((int) MapType.Value); } -#endif if (MapCenter.HasValue) { keys [i] = MKMapItem.MKLaunchOptionsMapCenterKey; values [i++] = NSValue.FromMKCoordinate (MapCenter.Value); @@ -112,18 +102,14 @@ public class MKLaunchOptions { keys [i] = MKMapItem.MKLaunchOptionsMapSpanKey; values [i++] = NSValue.FromMKCoordinateSpan (MapSpan.Value); } -#if !WATCH // ShowsTraffic: __WATCHOS_PROHIBITED if (ShowTraffic.HasValue) { keys [i] = MKMapItem.MKLaunchOptionsShowsTrafficKey; values [i++] = new NSNumber (ShowTraffic.Value); } -#endif -#if !WATCH // MKLaunchOptionsCameraKey is allowed in WatchOS, but there's no MKMapCamera type. if (Camera is not null) { keys [i] = MKMapItem.MKLaunchOptionsCameraKey; values [i++] = Camera; } -#endif return NSDictionary.FromObjectsAndKeys (values, keys); } } diff --git a/src/MapKit/MKMultiPoint.cs b/src/MapKit/MKMultiPoint.cs index 69c6f9596e24..8de46fcfbb43 100644 --- a/src/MapKit/MKMultiPoint.cs +++ b/src/MapKit/MKMultiPoint.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using System.Runtime.InteropServices; using Foundation; @@ -33,4 +32,3 @@ public unsafe CLLocationCoordinate2D [] GetCoordinates (int first, int count) } } } -#endif // !WATCH diff --git a/src/MapKit/MKOverlayRenderer.cs b/src/MapKit/MKOverlayRenderer.cs index a0ba8477154a..dce9d73991d2 100644 --- a/src/MapKit/MKOverlayRenderer.cs +++ b/src/MapKit/MKOverlayRenderer.cs @@ -1,5 +1,3 @@ -#if !WATCH - using System; using System.Runtime.InteropServices; using Foundation; @@ -21,5 +19,3 @@ public partial class MKOverlayRenderer { public static extern nfloat MKRoadWidthAtZoomScale (/* MKZoomScale */ nfloat zoomScale); } } - -#endif // !WATCH diff --git a/src/MapKit/MKOverlayView.cs b/src/MapKit/MKOverlayView.cs index 20683150ba20..a8257d97a613 100644 --- a/src/MapKit/MKOverlayView.cs +++ b/src/MapKit/MKOverlayView.cs @@ -3,7 +3,6 @@ // #if !XAMCORE_5_0 -#if !WATCH using System; using System.Runtime.InteropServices; @@ -33,5 +32,4 @@ public partial class MKOverlayView { } } -#endif #endif // !XAMCORE_5_0 diff --git a/src/MapKit/MKPointOfInterestFilter.cs b/src/MapKit/MKPointOfInterestFilter.cs index d40e91d10d17..3dc60ad29264 100644 --- a/src/MapKit/MKPointOfInterestFilter.cs +++ b/src/MapKit/MKPointOfInterestFilter.cs @@ -1,4 +1,3 @@ -#if !WATCH // doesn't show up in watch headers #if !MONOMAC using System; using ObjCRuntime; @@ -34,4 +33,3 @@ public MKPointOfInterestFilter (MKPointOfInterestCategory [] categories, MKPoint } } #endif -#endif // !WATCH diff --git a/src/MapKit/MKPolygon.cs b/src/MapKit/MKPolygon.cs index 5ff6bf0d5216..fcebdc4d662e 100644 --- a/src/MapKit/MKPolygon.cs +++ b/src/MapKit/MKPolygon.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using System.Runtime.InteropServices; using Foundation; @@ -61,4 +60,3 @@ public static unsafe MKPolygon FromCoordinates (CLLocationCoordinate2D [] coords } } -#endif // !WATCH diff --git a/src/MapKit/MKPolyline.cs b/src/MapKit/MKPolyline.cs index aa666c834b4d..132dc928b42c 100644 --- a/src/MapKit/MKPolyline.cs +++ b/src/MapKit/MKPolyline.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using System.Runtime.InteropServices; using Foundation; @@ -36,4 +35,3 @@ public static unsafe MKPolyline FromCoordinates (CLLocationCoordinate2D [] coord } } } -#endif // !WATCH diff --git a/src/MapKit/MapKit.cs b/src/MapKit/MapKit.cs index 785602dd8aac..a5ae570ccccf 100644 --- a/src/MapKit/MapKit.cs +++ b/src/MapKit/MapKit.cs @@ -20,7 +20,6 @@ namespace MapKit { -#if !WATCH // MKTileOverlay.h #if NET [SupportedOSPlatform ("ios")] @@ -35,7 +34,6 @@ public struct MKTileOverlayPath { public /* NSInteger */ nint Z; public /* CGFloat */ nfloat ContentScaleFactor; } -#endif // MKGeometry.h // note: CLLocationDegrees is double - see CLLocation.h diff --git a/src/MediaAccessibility/MediaAccessibility.cs b/src/MediaAccessibility/MediaAccessibility.cs index 52e618a5fc56..6c8013c89fde 100644 --- a/src/MediaAccessibility/MediaAccessibility.cs +++ b/src/MediaAccessibility/MediaAccessibility.cs @@ -316,7 +316,7 @@ public static void DidDisplayCaptions (NSAttributedString [] strings) [SupportedOSPlatform ("ios18.0")] [SupportedOSPlatform ("maccatalyst18.0")] #else - [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] #endif [DllImport (Constants.MediaAccessibilityLibrary)] static extern byte MACaptionAppearanceIsCustomized (nint /* MACaptionAppearanceDomain */ domain); @@ -330,7 +330,7 @@ public static void DidDisplayCaptions (NSAttributedString [] strings) [SupportedOSPlatform ("ios18.0")] [SupportedOSPlatform ("maccatalyst18.0")] #else - [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] #endif public static bool IsCustomized (MACaptionAppearanceDomain domain) { diff --git a/src/MediaPlayer/MPMediaItem.cs b/src/MediaPlayer/MPMediaItem.cs index 571d2abd384d..c7e2c8e5038d 100644 --- a/src/MediaPlayer/MPMediaItem.cs +++ b/src/MediaPlayer/MPMediaItem.cs @@ -9,7 +9,7 @@ // Copyright 2011-2012 Xamarin, Inc // -#if !MONOMAC && !WATCH +#if !MONOMAC using System; using System.Collections; @@ -319,7 +319,6 @@ public NSString? PlaybackStoreID { [SupportedOSPlatform ("ios14.5")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (7, 4)] [TV (14, 5)] [iOS (14, 5)] #endif diff --git a/src/MediaPlayer/MPMediaQuery.cs b/src/MediaPlayer/MPMediaQuery.cs index 2053f71fed97..56d050057202 100644 --- a/src/MediaPlayer/MPMediaQuery.cs +++ b/src/MediaPlayer/MPMediaQuery.cs @@ -9,7 +9,7 @@ // Copyright 2011-2012, 2014-2015 Xamarin, Inc // -#if !TVOS && !MONOMAC && !WATCH +#if !TVOS && !MONOMAC using System; using Foundation; diff --git a/src/MediaPlayer/MPMoviePlayerController.cs b/src/MediaPlayer/MPMoviePlayerController.cs deleted file mode 100644 index dfbe9ac904f9..000000000000 --- a/src/MediaPlayer/MPMoviePlayerController.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2014 Xamarin, Inc. - -using System; -using System.Runtime.InteropServices; -using Foundation; -using ObjCRuntime; -#if HAS_IAD && !NET -using iAd; -#endif - -#nullable enable - -namespace MediaPlayer { - -#if HAS_IAD && !NET - public partial class MPMoviePlayerController { - // 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 - // https://trello.com/c/iQpXOxCd/227-category-and-static-methods-selectors - // note: we cannot reuse the same method name - as it would break compilation of existing apps - [Obsoleted (PlatformName.iOS, 15,0, PlatformArchitecture.None, Constants.iAdRemoved)] - static public void PrepareForPrerollAds () - { - } - } -#endif // HAS_IAD && !NET -} diff --git a/src/MediaPlayer/MPVolumeSettings.cs b/src/MediaPlayer/MPVolumeSettings.cs index e202b2238239..4b0d3e27346d 100644 --- a/src/MediaPlayer/MPVolumeSettings.cs +++ b/src/MediaPlayer/MPVolumeSettings.cs @@ -6,7 +6,7 @@ // Copyright 2011-2015 Xamarin, Inc. // -#if !TVOS && !MONOMAC && !WATCH +#if !TVOS && !MONOMAC using System; using System.Runtime.InteropServices; diff --git a/src/MediaPlayer/MediaPlayer.cs b/src/MediaPlayer/MediaPlayer.cs index 95a668d04cbe..37513501d164 100644 --- a/src/MediaPlayer/MediaPlayer.cs +++ b/src/MediaPlayer/MediaPlayer.cs @@ -19,7 +19,6 @@ namespace MediaPlayer { /// An enumeration of possible states in which the may be. Used with the P:MediaPlayer.MPMovieCotnroller.PlaybackState property. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -30,14 +29,13 @@ public enum MPMoviePlaybackState : long { Paused, Interrupted, SeekingForward, - SeekingBackward + SeekingBackward, } // NSInteger -> MPMoviePlayerController.h /// An enumeration whose values reflect a movie's load state. Used in the property. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -53,46 +51,48 @@ public enum MPMovieLoadState : long { /// An enumeration that specifies whether a movie should repeat or not. Used with the property. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Native] public enum MPMovieRepeatMode : long { - None, One + None, + One, } // NSInteger -> MPMoviePlayerController.h /// An enumeration whose values specify various modes for the property. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Native] public enum MPMovieControlStyle : long { - None, Embedded, Fullscreen, Default = Embedded + None, + Embedded, + Fullscreen, + Default = Embedded, } // NSInteger -> MPMoviePlayerController.h /// An enumeration whose values specify various ways a movie may have finished. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Native] public enum MPMovieFinishReason : long { - PlaybackEnded, PlaybackError, UserExited + PlaybackEnded, + PlaybackError, + UserExited, } // NSInteger -> MPMoviePlayerController.h /// An enumeration that specifies the movie's media types. Used with the property. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -101,38 +101,37 @@ public enum MPMovieFinishReason : long { public enum MPMovieMediaType : long { None = 0, Video = 1 << 0, - Audio = 1 << 1 + Audio = 1 << 1, } // NSInteger -> MPMoviePlayerController.h /// An enumeration that specifies whether a movie's data is provided by a file or streaming. Used with the property. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Native] public enum MPMovieSourceType : long { - Unknown, File, Streaming + Unknown, + File, + Streaming, } // NSInteger -> MPMoviePlayerController.h /// An enumeration that specifies which frame to use when generating thumbnails. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Native] public enum MPMovieTimeOption : long { NearestKeyFrame, - Exact + Exact, } // NSUInteger -> MPMediaItem.h - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] [Flags] @@ -157,14 +156,13 @@ public enum MPMediaType : ulong { HomeVideo = 1 << 13, [MacCatalyst (13, 1)] TypeAnyVideo = 0xff00, - Any = 0xFFFFFFFFFFFFFFFF + Any = 0xFFFFFFFFFFFFFFFF, } // NSInteger -> MPMediaPlaylist.h /// An enumeration whose values specify various types of playlist. [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] [Flags] @@ -172,14 +170,13 @@ public enum MPMediaPlaylistAttribute : long { None = 0, OnTheGo = (1 << 0), // if set, the playlist was created on a device rather than synced from iTunes Smart = (1 << 1), - Genius = (1 << 2) + Genius = (1 << 2), }; // NSInteger -> MPMediaQuery.h /// An enumeration whose values specify various ways in which media can be logically grouped. [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MPMediaGrouping : long { @@ -190,26 +187,24 @@ public enum MPMediaGrouping : long { Composer, Genre, Playlist, - PodcastTitle + PodcastTitle, } // NSInteger -> MPMediaQuery.h /// An enumeration whose values specifies a comparison-type to be used with a . [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MPMediaPredicateComparison : long { EqualsTo, - Contains + Contains, } // NSInteger -> MPMoviePlayerController.h /// An enumeration of video scaling modes. Used with the property. [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -218,7 +213,7 @@ public enum MPMovieScalingMode : long { None, AspectFit, AspectFill, - Fill + Fill, } // untyped enum -> MPMoviePlayerController.h @@ -227,12 +222,11 @@ public enum MPMovieScalingMode : long { public enum MPMovieControlMode { Default, VolumeOnly, - Hidden + Hidden, } // NSInteger -> /MPMusicPlayerController.h [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [Native] @@ -242,12 +236,11 @@ public enum MPMusicPlaybackState : long { Paused, Interrupted, SeekingForward, - SeekingBackward + SeekingBackward, } // NSInteger -> /MPMusicPlayerController.h [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [Native] @@ -255,12 +248,11 @@ public enum MPMusicRepeatMode : long { Default, None, One, - All + All, } // NSInteger -> /MPMusicPlayerController.h [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [Native] @@ -268,40 +260,36 @@ public enum MPMusicShuffleMode : long { Default, Off, Songs, - Albums + Albums, } public delegate void MPMediaItemEnumerator (string property, NSObject value, ref bool stop); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPShuffleType : long { Off, Items, - Collections + Collections, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPRepeatType : long { Off, One, - All + All, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPChangeLanguageOptionSetting : long { None, NowPlayingItemOnly, - Permanent + Permanent, } // NSInteger -> MPRemoteCommand.h - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPRemoteCommandHandlerStatus : long { @@ -311,11 +299,10 @@ public enum MPRemoteCommandHandlerStatus : long { NoActionableNowPlayingItem = 110, [MacCatalyst (13, 1)] DeviceNotFound = 120, - CommandFailed = 200 + CommandFailed = 200, } // NSUInteger -> MPRemoteCommandEvent.h - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPSeekCommandEventType : ulong { @@ -323,15 +310,13 @@ public enum MPSeekCommandEventType : ulong { EndSeeking } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPNowPlayingInfoLanguageOptionType : ulong { Audible, - Legible + Legible, } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] [ErrorDomain ("MPErrorDomain")] @@ -349,26 +334,23 @@ public enum MPErrorCode : long { /// Enumerates the status of the application's permission to access the media library. [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MPMediaLibraryAuthorizationStatus : long { NotDetermined = 0, Denied, Restricted, - Authorized + Authorized, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPNowPlayingInfoMediaType : ulong { None = 0, Audio, - Video + Video, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MPNowPlayingPlaybackState : ulong { diff --git a/src/MessageUI/MessageUI.cs b/src/MessageUI/MessageUI.cs index a15817cce314..36b69e1a4fd0 100644 --- a/src/MessageUI/MessageUI.cs +++ b/src/MessageUI/MessageUI.cs @@ -24,7 +24,7 @@ public enum MFMailComposeResult { Cancelled, Saved, Sent, - Failed + Failed, } /// Details of the composing error. @@ -38,7 +38,7 @@ public enum MFMailComposeErrorCode : long { public enum MFMailComposeErrorCode { #endif SaveFailed, - SendFailed + SendFailed, } #if NET @@ -50,6 +50,8 @@ public enum MessageComposeResult : long { // Note: now used as a NSInteger in the API. public enum MessageComposeResult { #endif - Cancelled, Sent, Failed + Cancelled, + Sent, + Failed, } } diff --git a/src/Metal/Defs.cs b/src/Metal/Defs.cs index dc5e0e32d8b7..e3dfdfec36aa 100644 --- a/src/Metal/Defs.cs +++ b/src/Metal/Defs.cs @@ -364,8 +364,6 @@ public struct MTLDrawIndexedPrimitivesIndirectArguments { [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif [StructLayout (LayoutKind.Sequential)] public struct MTLSizeAndAlign { @@ -385,8 +383,6 @@ public MTLSizeAndAlign (nuint size, nuint align) [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif [StructLayout (LayoutKind.Sequential)] public struct MTLDrawPatchIndirectArguments { @@ -410,8 +406,6 @@ public MTLDrawPatchIndirectArguments (uint pathCount, uint instanceCount, uint p [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif [StructLayout (LayoutKind.Sequential)] public struct MTLQuadTessellationFactorsHalf { @@ -480,8 +474,6 @@ public MTLQuadTessellationFactorsHalf (ushort [] edgeTessellationFactor, ushort [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [NoWatch] #endif [StructLayout (LayoutKind.Sequential)] public struct MTLTriangleTessellationFactorsHalf { @@ -538,7 +530,6 @@ public partial interface IMTLTexture { #else [NoiOS] [NoTV] - [NoWatch] #endif public struct MTLIndirectCommandBufferExecutionRange { @@ -640,7 +631,7 @@ public struct MTLAccelerationStructureSizes { [SupportedOSPlatform ("macos13.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), NoWatch] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif [NativeName ("MTLResourceID")] [StructLayout (LayoutKind.Sequential)] diff --git a/src/Metal/MTLDevice.cs b/src/Metal/MTLDevice.cs index a1a5fc46b80c..97259720df0a 100644 --- a/src/Metal/MTLDevice.cs +++ b/src/Metal/MTLDevice.cs @@ -170,7 +170,6 @@ public static unsafe void TrampolineNotificationHandler (IntPtr block, IntPtr de [UnsupportedOSPlatform ("maccatalyst")] #else [NoiOS] - [NoWatch] [NoTV] #endif public static void RemoveObserver (NSObject observer) diff --git a/src/Metal/MTLEnums.cs b/src/Metal/MTLEnums.cs index 0c57c477ae9b..2933c7a7ab25 100644 --- a/src/Metal/MTLEnums.cs +++ b/src/Metal/MTLEnums.cs @@ -65,7 +65,7 @@ public enum MTLColorWriteMask : ulong { Green = 0x1 << 2, Blue = 0x1 << 1, Alpha = 0x1 << 0, - All = 0xf + All = 0xf, } /// The state of the command-buffer state-machine. Enqueued->Committed->Scheduled->Completed. @@ -76,7 +76,7 @@ public enum MTLCommandBufferStatus : ulong { Committed, Scheduled, Completed, - Error + Error, } /// Enumeration of error codes describing why a command buffer has failed. @@ -99,20 +99,21 @@ public enum MTLCommandBufferError : ulong { /// An action performed at the start of a rendering pass. [Native] public enum MTLLoadAction : ulong { - DontCare, Load, Clear + DontCare, + Load, + Clear, } /// The action to be performed at the end of a rendering pass. [Native] public enum MTLStoreAction : ulong { - DontCare, Store, MultisampleResolve, - [NoWatch] + DontCare, + Store, + MultisampleResolve, [MacCatalyst (13, 1)] StoreAndMultisampleResolve, - [NoWatch] [MacCatalyst (13, 1)] Unknown, - [NoWatch] [MacCatalyst (13, 1)] CustomSampleDepthStore, } @@ -138,7 +139,8 @@ public enum MTLTextureType : ulong { /// Options for calculating the pixel value returned within a mipmap level. [Native] public enum MTLSamplerMinMagFilter : ulong { - Nearest, Linear + Nearest, + Linear, } /// Options for calculating the pixel value returned with multiple mipmap levels. @@ -146,7 +148,7 @@ public enum MTLSamplerMinMagFilter : ulong { public enum MTLSamplerMipFilter : ulong { NotMipmapped, Nearest, - Linear + Linear, } /// The wrapping mode. Used when a fetch falls outside the bounds of a texture. @@ -223,36 +225,26 @@ public enum MTLVertexFormat : ulong { Int1010102Normalized = 40, UInt1010102Normalized = 41, - [NoWatch] [MacCatalyst (13, 1)] UChar4NormalizedBgra = 42, - [NoWatch] [MacCatalyst (13, 1)] UChar = 45, - [NoWatch] [MacCatalyst (13, 1)] Char = 46, - [NoWatch] [MacCatalyst (13, 1)] UCharNormalized = 47, - [NoWatch] [MacCatalyst (13, 1)] CharNormalized = 48, - [NoWatch] [MacCatalyst (13, 1)] UShort = 49, - [NoWatch] [MacCatalyst (13, 1)] Short = 50, - [NoWatch] [MacCatalyst (13, 1)] UShortNormalized = 51, - [NoWatch] [MacCatalyst (13, 1)] ShortNormalized = 52, - [NoWatch] [MacCatalyst (13, 1)] Half = 53, @@ -314,7 +306,6 @@ public enum MTLPixelFormat : ulong { RGB10A2Uint = 91, RG11B10Float = 92, RGB9E5Float = 93, - [NoWatch] [MacCatalyst (13, 1)] BGR10A2Unorm = 94, RG32Uint = 103, @@ -548,7 +539,6 @@ public enum MTLPixelFormat : ulong { [MacCatalyst (13, 1)] Depth32Float_Stencil8 = 260, - [NoWatch] [MacCatalyst (13, 1)] X32_Stencil8 = 261, @@ -603,7 +593,9 @@ public enum MTLLibraryError : ulong { [Native] [ErrorDomain ("MTLRenderPipelineErrorDomain")] public enum MTLRenderPipelineError : ulong { - Internal = 1, Unsupported, InvalidInput + Internal = 1, + Unsupported, + InvalidInput, } #endif @@ -617,7 +609,7 @@ public enum MTLCompareFunction : ulong { Greater = 4, NotEqual = 5, GreaterEqual = 6, - Always = 7 + Always = 7, } @@ -631,7 +623,7 @@ public enum MTLStencilOperation : ulong { DecrementClamp = 4, Invert = 5, IncrementWrap = 6, - DecrementWrap = 7 + DecrementWrap = 7, } /// Enumerates the primitive geometry used for drawing commands. @@ -641,13 +633,14 @@ public enum MTLPrimitiveType : ulong { Line = 1, LineStrip = 2, Triangle = 3, - TriangleStrip = 4 + TriangleStrip = 4, } /// The index type for an index buffer. [Native] public enum MTLIndexType : ulong { - UInt16, UInt32 + UInt16, + UInt32, } /// Enumerates values that control how and whether to monitor samples that pass depth and stencil tests. @@ -663,19 +656,21 @@ public enum MTLVisibilityResultMode : ulong { public enum MTLCullMode : ulong { None = 0, Front = 1, - Back = 2 + Back = 2, } /// Vertex winding rule for front-facing primitives. [Native] public enum MTLWinding : ulong { - Clockwise = 0, CounterClockwise = 1 + Clockwise = 0, + CounterClockwise = 1, } /// How to rasterize triangle and triangle-strip primitives. [Native] public enum MTLTriangleFillMode : ulong { - Fill, Lines + Fill, + Lines, } /// The purgeable state of the resource. @@ -684,13 +679,14 @@ public enum MTLPurgeableState : ulong { KeepCurrent = 1, NonVolatile = 2, Volatile = 3, - Empty = 4 + Empty = 4, } /// Enumerates what cache mode is used for CPU mapping of a resource. [Native] public enum MTLCpuCacheMode : ulong { - DefaultCache, WriteCombined + DefaultCache, + WriteCombined, } /// Enumerates the ways in which a may be used. @@ -729,11 +725,10 @@ public enum MTLResourceOptions : ulong { [MacCatalyst (13, 1)] StorageModePrivate = MTLStorageMode.Private << 4, - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] StorageModeMemoryless = MTLStorageMode.Memoryless << 4, - [NoWatch] [MacCatalyst (13, 1)] HazardTrackingModeUntracked = 1 << 8, @@ -746,11 +741,11 @@ public enum MTLResourceOptions : ulong { /// The frequency at which the vertex shader function should fetch attribute data. [Native] public enum MTLVertexStepFunction : ulong { - Constant, PerVertex, PerInstance, - [NoWatch] + Constant, + PerVertex, + PerInstance, [MacCatalyst (13, 1)] PerPatch = 3, - [NoWatch] [MacCatalyst (13, 1)] PerPatchControlPoint = 4, } @@ -834,44 +829,44 @@ public enum MTLDataType : ulong { Bool4 = 56, [MacCatalyst (13, 1)] - [NoWatch] Texture = 58, + Texture = 58, [MacCatalyst (13, 1)] - [NoWatch] Sampler = 59, + Sampler = 59, [MacCatalyst (13, 1)] - [NoWatch] Pointer = 60, + Pointer = 60, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] R8Unorm = 62, + [NoMac, TV (14, 5)] R8Unorm = 62, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] R8Snorm = 63, + [NoMac, TV (14, 5)] R8Snorm = 63, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] R16Unorm = 64, + [NoMac, TV (14, 5)] R16Unorm = 64, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] R16Snorm = 65, + [NoMac, TV (14, 5)] R16Snorm = 65, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rg8Unorm = 66, + [NoMac, TV (14, 5)] Rg8Unorm = 66, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rg8Snorm = 67, + [NoMac, TV (14, 5)] Rg8Snorm = 67, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rg16Unorm = 68, + [NoMac, TV (14, 5)] Rg16Unorm = 68, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rg16Snorm = 69, + [NoMac, TV (14, 5)] Rg16Snorm = 69, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rgba8Unorm = 70, + [NoMac, TV (14, 5)] Rgba8Unorm = 70, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rgba8Unorm_sRgb = 71, + [NoMac, TV (14, 5)] Rgba8Unorm_sRgb = 71, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rgba8Snorm = 72, + [NoMac, TV (14, 5)] Rgba8Snorm = 72, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rgba16Unorm = 73, + [NoMac, TV (14, 5)] Rgba16Unorm = 73, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rgba16Snorm = 74, + [NoMac, TV (14, 5)] Rgba16Snorm = 74, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rgb10A2Unorm = 75, + [NoMac, TV (14, 5)] Rgb10A2Unorm = 75, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rg11B10Float = 76, + [NoMac, TV (14, 5)] Rg11B10Float = 76, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Rgb9E5Float = 77, + [NoMac, TV (14, 5)] Rgb9E5Float = 77, [MacCatalyst (13, 1)] RenderPipeline = 78, @@ -880,14 +875,14 @@ public enum MTLDataType : ulong { [MacCatalyst (13, 1)] IndirectCommandBuffer = 80, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] Long = 81, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] Long2 = 82, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] Long3 = 83, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] Long4 = 84, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] ULong = 85, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] ULong2 = 86, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] ULong3 = 87, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] ULong4 = 88, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] Long = 81, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] Long2 = 82, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] Long3 = 83, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] Long4 = 84, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] ULong = 85, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] ULong2 = 86, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] ULong3 = 87, + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] ULong4 = 88, [MacCatalyst (14, 0)] [iOS (14, 0), NoTV] VisibleFunctionTable = 115, @@ -917,28 +912,24 @@ public enum MTLArgumentType : ulong { Sampler = 3, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] ImageblockData = 16, + [NoMac, TV (14, 5)] ImageblockData = 16, [MacCatalyst (13, 1)] - [NoMac, TV (14, 5), NoWatch] Imageblock = 17, + [NoMac, TV (14, 5)] Imageblock = 17, [iOS (14, 0)] [NoTV] - [NoWatch] [MacCatalyst (14, 0)] VisibleFunctionTable = 24, [iOS (14, 0)] [NoTV] - [NoWatch] [MacCatalyst (14, 0)] PrimitiveAccelerationStructure = 25, [iOS (14, 0)] [NoTV] - [NoWatch] [MacCatalyst (14, 0)] InstanceAccelerationStructure = 26, [iOS (14, 0)] [NoTV] - [NoWatch] [MacCatalyst (14, 0)] IntersectionFunctionTable = 27, } @@ -951,7 +942,9 @@ public enum MTLArgumentType : ulong { [Deprecated (PlatformName.MacCatalyst, 17, 0)] [Native] public enum MTLArgumentAccess : ulong { - ReadOnly, ReadWrite, WriteOnly + ReadOnly, + ReadWrite, + WriteOnly, } #endif @@ -978,104 +971,115 @@ public enum MTLPipelineOption : ulong { /// Enumerates the hardware feature sets that are available on a device. [Native] public enum MTLFeatureSet : ulong { +#if XAMCORE_5_0 + [NoMacCatalyst] +#elif __MACCATALYST__ + [Obsolete ("Not available on the current platform.")] +#endif [NoTV, NoMac] iOS_GPUFamily1_v1 = 0, +#if XAMCORE_5_0 + [NoMacCatalyst] +#elif __MACCATALYST__ + [Obsolete ("Not available on the current platform.")] +#endif [NoTV, NoMac] iOS_GPUFamily1_v2 = 2, +#if XAMCORE_5_0 + [NoMacCatalyst] +#elif __MACCATALYST__ + [Obsolete ("Not available on the current platform.")] +#endif [NoTV, NoMac] iOS_GPUFamily2_v1 = 1, +#if XAMCORE_5_0 + [NoMacCatalyst] +#elif __MACCATALYST__ + [Obsolete ("Not available on the current platform.")] +#endif [NoTV, NoMac] iOS_GPUFamily2_v2 = 3, +#if XAMCORE_5_0 + [NoMacCatalyst] +#elif __MACCATALYST__ + [Obsolete ("Not available on the current platform.")] +#endif [NoTV, NoMac] iOS_GPUFamily3_v1 = 4, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily1_v3 = 5, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily2_v3 = 6, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily3_v2 = 7, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily1_v4 = 8, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily2_v4 = 9, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily3_v3 = 10, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily4_v1 = 11, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily1_v5 = 12, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily2_v5 = 13, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily3_v4 = 14, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily4_v2 = 15, - [NoTV, NoWatch, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] iOS_GPUFamily5_v1 = 16, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] macOS_GPUFamily1_v1 = 10000, -#if !NET - [Obsolete ("Use 'macOS_GPUFamily1_v1' instead.")] - OSX_GPUFamily1_v1 = macOS_GPUFamily1_v1, -#endif - - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] macOS_GPUFamily1_v2 = 10001, -#if !NET - [Obsolete ("Use 'macOS_GPUFamily1_v2' instead.")] - OSX_GPUFamily1_v2 = macOS_GPUFamily1_v2, -#endif - - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] macOS_ReadWriteTextureTier2 = 10002, -#if !NET - [Obsolete ("Use 'macOS_ReadWriteTextureTier2' instead.")] - OSX_ReadWriteTextureTier2 = macOS_ReadWriteTextureTier2, -#endif - - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] macOS_GPUFamily1_v3 = 10003, - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] macOS_GPUFamily1_v4 = 10004, - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] macOS_GPUFamily2_v1 = 10005, -#if !NET - [Obsolete ("Use 'tvOS_GPUFamily1_v1' instead.")] - TVOS_GPUFamily1_v1 = 30000, +#if XAMCORE_5_0 + [NoMacCatalyst] +#elif __MACCATALYST__ + [Obsolete ("Not available on the current platform.")] #endif - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] tvOS_GPUFamily1_v1 = 30000, - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] tvOS_GPUFamily1_v2 = 30001, - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] tvOS_GPUFamily1_v3 = 30002, - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] tvOS_GPUFamily2_v1 = 30003, - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] tvOS_GPUFamily1_v4 = 30004, - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] tvOS_GPUFamily2_v2 = 30005, } @@ -1088,26 +1092,23 @@ public enum MTLLanguageVersion : ulong { [NoMacCatalyst] v1_0 = (1 << 16), v1_1 = (1 << 16) + 1, - [NoWatch] [MacCatalyst (13, 1)] v1_2 = (1 << 16) + 2, - [NoWatch] [MacCatalyst (13, 1)] v2_0 = (2 << 16), - [NoWatch] [MacCatalyst (13, 1)] v2_1 = (2 << 16) + 1, - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] v2_2 = (2 << 16) + 2, - [iOS (14, 0), TV (14, 0), NoWatch] + [iOS (14, 0), TV (14, 0)] [MacCatalyst (14, 0)] v2_3 = (2 << 16) + 3, - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] v2_4 = (2uL << 16) + 4, - [iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), NoWatch] + [iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Mac (13, 0)] v3_0 = (3uL << 16) + 0, - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)] v3_1 = (3uL << 16) + 1, [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] v3_2 = (3ul << 16) + 2, @@ -1118,7 +1119,7 @@ public enum MTLLanguageVersion : ulong { [Native] public enum MTLDepthClipMode : ulong { Clip = 0, - Clamp = 1 + Clamp = 1, } /// Enumerates blitting options. @@ -1131,7 +1132,7 @@ public enum MTLBlitOption : ulong { StencilFromDepthStencil = 1 << 1, [NoMac] [MacCatalyst (13, 1)] - RowLinearPvrtc = 1 << 2 + RowLinearPvrtc = 1 << 2, } /// Enumerates CPU cache modes for resource mapping. @@ -1144,7 +1145,7 @@ public enum MTLStorageMode : ulong { [NoMacCatalyst] Managed = 1, Private = 2, - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] Memoryless = 3, } @@ -1152,7 +1153,9 @@ public enum MTLStorageMode : ulong { /// Enumerates MSAA dept resolve filter operations. [Native] public enum MTLMultisampleDepthResolveFilter : ulong { - Sample0, Min, Max + Sample0, + Min, + Max, } [TV (16, 0)] @@ -1162,7 +1165,7 @@ public enum MTLMultisampleDepthResolveFilter : ulong { public enum MTLSamplerBorderColor : ulong { TransparentBlack = 0, OpaqueBlack = 1, - OpaqueWhite = 2 + OpaqueWhite = 2, } [TV (13, 0)] @@ -1172,56 +1175,50 @@ public enum MTLPrimitiveTopologyClass : ulong { Unspecified = 0, Point = 1, Line = 2, - Triangle = 3 + Triangle = 3, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLTessellationPartitionMode : ulong { Pow2 = 0, Integer = 1, FractionalOdd = 2, - FractionalEven = 3 + FractionalEven = 3, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLTessellationFactorFormat : ulong { - Half = 0 + Half = 0, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLTessellationControlPointIndexType : ulong { None = 0, UInt16 = 1, - UInt32 = 2 + UInt32 = 2, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLTessellationFactorStepFunction : ulong { Constant = 0, PerPatch = 1, PerInstance = 2, - PerPatchAndPerInstance = 3 + PerPatchAndPerInstance = 3, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLPatchType : ulong { None = 0, Triangle = 1, - Quad = 2 + Quad = 2, } /// Enumerates formats for function attributes. - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLAttributeFormat : ulong { @@ -1267,43 +1264,32 @@ public enum MTLAttributeFormat : ulong { UInt4 = 39, Int1010102Normalized = 40, UInt1010102Normalized = 41, - [NoWatch] [MacCatalyst (13, 1)] UChar4Normalized_Bgra = 42, - [NoWatch] [MacCatalyst (13, 1)] UChar = 45, - [NoWatch] [MacCatalyst (13, 1)] Char = 46, - [NoWatch] [MacCatalyst (13, 1)] UCharNormalized = 47, - [NoWatch] [MacCatalyst (13, 1)] CharNormalized = 48, - [NoWatch] [MacCatalyst (13, 1)] UShort = 49, - [NoWatch] [MacCatalyst (13, 1)] Short = 50, - [NoWatch] [MacCatalyst (13, 1)] UShortNormalized = 51, - [NoWatch] [MacCatalyst (13, 1)] ShortNormalized = 52, - [NoWatch] [MacCatalyst (13, 1)] Half = 53, - [Mac (14, 0), iOS (17, 0), TV (17, 0), NoWatch, MacCatalyst (17, 0)] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] FloatRG11B10 = 54, - [Mac (14, 0), iOS (17, 0), TV (17, 0), NoWatch, MacCatalyst (17, 0)] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] FloatRGB9E5 = 55, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLStepFunction : ulong { @@ -1315,26 +1301,24 @@ public enum MTLStepFunction : ulong { ThreadPositionInGridX = 5, ThreadPositionInGridY = 6, ThreadPositionInGridXIndexed = 7, - ThreadPositionInGridYIndexed = 8 + ThreadPositionInGridYIndexed = 8, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLRenderStages : ulong { Vertex = (1 << 0), Fragment = (1 << 1), - [iOS (15, 0), TV (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] Tile = (1uL << 2), - [iOS (16, 0), TV (16, 0), NoWatch, Mac (13, 0), MacCatalyst (16, 0)] + [iOS (16, 0), TV (16, 0), Mac (13, 0), MacCatalyst (16, 0)] Object = (1uL << 3), - [iOS (16, 0), TV (16, 0), NoWatch, Mac (13, 0), MacCatalyst (16, 0)] + [iOS (16, 0), TV (16, 0), Mac (13, 0), MacCatalyst (16, 0)] Mesh = (1uL << 4), } /// Enumerates resource usage patterns. - [NoWatch] [MacCatalyst (13, 1)] [Native, Flags] public enum MTLResourceUsage : ulong { @@ -1344,7 +1328,6 @@ public enum MTLResourceUsage : ulong { } /// Enumerates buffer mutability descriptions. - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLMutability : ulong { @@ -1353,7 +1336,6 @@ public enum MTLMutability : ulong { Immutable = 2, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLReadWriteTextureTier : ulong { @@ -1363,7 +1345,6 @@ public enum MTLReadWriteTextureTier : ulong { } /// Enumerates argument buffer tiers. - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum MTLArgumentBuffersTier : ulong { @@ -1372,7 +1353,6 @@ public enum MTLArgumentBuffersTier : ulong { } /// Enumerates store action options. - [NoWatch] [MacCatalyst (13, 1)] [Native, Flags] public enum MTLStoreActionOptions : ulong { @@ -1611,7 +1591,7 @@ public enum MTLAccelerationStructureUsage : ulong { None = 0x0, Refit = (1uL << 0), PreferFastBuild = (1uL << 1), - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] ExtendedLimits = (1uL << 2), } @@ -1706,15 +1686,15 @@ public enum MTLIntersectionFunctionSignature : ulong { Instancing = (1uL << 0), TriangleData = (1uL << 1), WorldSpaceData = (1uL << 2), - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] InstanceMotion = (1uL << 3), - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] PrimitiveMotion = (1uL << 4), - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] ExtendedLimits = (1uL << 5), - [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), NoWatch] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] MaxLevels = (1uL << 6), - [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), NoWatch] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] CurveData = (1uL << 7), } @@ -1737,13 +1717,13 @@ public enum MTLTextureSwizzle : byte { Alpha = 5, } - [iOS (15, 0), MacCatalyst (15, 0), TV (17, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), TV (17, 0)] public enum MTLMotionBorderMode : uint { Clamp = 0, Vanish = 1, } - [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Native] public enum MTLAccelerationStructureInstanceDescriptorType : ulong { Default = 0, @@ -1755,7 +1735,7 @@ public enum MTLAccelerationStructureInstanceDescriptorType : ulong { IndirectMotion = 4, } - [Mac (12, 5), iOS (15, 0), MacCatalyst (15, 0), TV (17, 0), NoWatch] + [Mac (12, 5), iOS (15, 0), MacCatalyst (15, 0), TV (17, 0)] [Native] public enum MTLTextureCompressionType : long { Lossless = 0, diff --git a/src/Metal/MTLRenderCommandEncoder.cs b/src/Metal/MTLRenderCommandEncoder.cs index 591ccb824c2e..e455a34c329d 100644 --- a/src/Metal/MTLRenderCommandEncoder.cs +++ b/src/Metal/MTLRenderCommandEncoder.cs @@ -15,7 +15,6 @@ namespace Metal { [SupportedOSPlatform ("tvos")] #endif public static class IMTLRenderCommandEncoder_Extensions { -#if !WATCH #if NET [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] @@ -23,16 +22,13 @@ public static class IMTLRenderCommandEncoder_Extensions { [SupportedOSPlatform ("tvos14.5")] #else [TV (14, 5)] - [NoWatch] #endif public unsafe static void SetViewports (this IMTLRenderCommandEncoder This, MTLViewport [] viewports) { fixed (void* handle = viewports) This.SetViewports ((IntPtr) handle, (nuint) (viewports?.Length ?? 0)); } -#endif // !WATCH -#if !WATCH #if NET [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] @@ -40,16 +36,13 @@ public unsafe static void SetViewports (this IMTLRenderCommandEncoder This, MTLV [SupportedOSPlatform ("tvos14.5")] #else [TV (14, 5)] - [NoWatch] #endif public unsafe static void SetScissorRects (this IMTLRenderCommandEncoder This, MTLScissorRect [] scissorRects) { fixed (void* handle = scissorRects) This.SetScissorRects ((IntPtr) handle, (nuint) (scissorRects?.Length ?? 0)); } -#endif // !WATCH -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -57,16 +50,13 @@ public unsafe static void SetScissorRects (this IMTLRenderCommandEncoder This, M [SupportedOSPlatform ("macos")] #else [TV (14, 5)] - [NoWatch] #endif public unsafe static void SetTileBuffers (this IMTLRenderCommandEncoder This, IMTLBuffer [] buffers, nuint [] offsets, NSRange range) { fixed (void* handle = offsets) This.SetTileBuffers (buffers, (IntPtr) handle, range); } -#endif // !WATCH -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -74,7 +64,6 @@ public unsafe static void SetTileBuffers (this IMTLRenderCommandEncoder This, IM [SupportedOSPlatform ("macos")] #else [TV (14, 5)] - [NoWatch] #endif public unsafe static void SetTileSamplerStates (this IMTLRenderCommandEncoder This, IMTLSamplerState [] samplers, float [] lodMinClamps, float [] lodMaxClamps, NSRange range) { @@ -84,6 +73,5 @@ public unsafe static void SetTileSamplerStates (this IMTLRenderCommandEncoder Th } } } -#endif // !WATCH } } diff --git a/src/MetricKit/MXEnums.cs b/src/MetricKit/MXEnums.cs index c4e5c1f95161..672a497b808e 100644 --- a/src/MetricKit/MXEnums.cs +++ b/src/MetricKit/MXEnums.cs @@ -12,7 +12,7 @@ using ObjCRuntime; namespace MetricKit { - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [ErrorDomain ("MXErrorDomain")] [Native] public enum MXErrorCode : long { diff --git a/src/MobileCoreServices/UTType.cs b/src/MobileCoreServices/UTType.cs index c10c85f74727..6e593422bbae 100644 --- a/src/MobileCoreServices/UTType.cs +++ b/src/MobileCoreServices/UTType.cs @@ -265,8 +265,6 @@ public static bool ConformsTo (string uti, string conformsToUti) [ObsoletedOSPlatform ("tvos14.0", "Use the 'UniformTypeIdentifiers.UTType' API instead.")] [ObsoletedOSPlatform ("macos11.0", "Use the 'UniformTypeIdentifiers.UTType' API instead.")] [ObsoletedOSPlatform ("ios14.0", "Use the 'UniformTypeIdentifiers.UTType' API instead.")] -#else - [Watch (5, 0)] #endif public static bool Equals (NSString uti1, NSString uti2) { diff --git a/src/ModelIO/MIEnums.cs b/src/ModelIO/MIEnums.cs index 9e83fdb9c46f..6a1a456a7b62 100644 --- a/src/ModelIO/MIEnums.cs +++ b/src/ModelIO/MIEnums.cs @@ -158,7 +158,7 @@ public enum MDLMaterialSemantic : ulong { AmbientOcclusion, AmbientOcclusionScale, None = 0x8000, - UserDefined = 0x8001 + UserDefined = 0x8001, } /// Enumerates material property types. @@ -181,21 +181,23 @@ public enum MDLMaterialPropertyType : ulong { /// Enumerates procedures for handling texture coordinates outside of the range [0.0,1.0]. [Native] public enum MDLMaterialTextureWrapMode : ulong { - Clamp, Repeat, Mirror + Clamp, + Repeat, + Mirror, } /// Enumerates values that control how to sample between texels. [Native] public enum MDLMaterialTextureFilterMode : ulong { Nearest, - Linear + Linear, } /// Enumerates values that control texture sampling between mipmap levels. [Native] public enum MDLMaterialMipMapFilterMode : ulong { Nearest, - Linear + Linear, } /// Enumerates values that specify data types and sizes for texel channels. @@ -207,7 +209,7 @@ public enum MDLTextureChannelEncoding : long { UInt32 = 4, Float16 = 258, Float16SR = 770, - Float32 = 260 + Float32 = 260, } /// Enumerates the types of . @@ -224,7 +226,7 @@ public enum MDLLightType : ulong { SuperElliptical, Photometric, Probe, - Environment + Environment, } /// Enumerates camera projections. diff --git a/src/NaturalLanguage/Enums.cs b/src/NaturalLanguage/Enums.cs index 26a29a532e55..c6ae5c3546b0 100644 --- a/src/NaturalLanguage/Enums.cs +++ b/src/NaturalLanguage/Enums.cs @@ -29,7 +29,6 @@ namespace NaturalLanguage { /// Enumerates preprocessing options for tags. [Flags] [Native] - [Watch (5, 0)] [MacCatalyst (13, 1)] public enum NLTaggerOptions : ulong { OmitWords = 1uL << 0, @@ -42,7 +41,6 @@ public enum NLTaggerOptions : ulong { /// Enumerates natural language model types. [Native] - [Watch (5, 0)] [MacCatalyst (13, 1)] public enum NLModelType : long { Classifier, @@ -51,7 +49,6 @@ public enum NLModelType : long { /// Enumerates linguistic units to which tags can be applied. [Native] - [Watch (5, 0)] [MacCatalyst (13, 1)] public enum NLTokenUnit : long { Word, @@ -64,7 +61,6 @@ public enum NLTokenUnit : long { /// Enumerates content hints for tokenizers. [Flags] [Native] - [Watch (5, 0)] [MacCatalyst (13, 1)] public enum NLTokenizerAttributes : ulong { Numeric = 1uL << 0, @@ -73,7 +69,6 @@ public enum NLTokenizerAttributes : ulong { } /// Enumerates languages for which recognition is supported. - [Watch (5, 0)] [MacCatalyst (13, 1)] public enum NLLanguage { [DefaultEnumValue] @@ -194,13 +189,12 @@ public enum NLLanguage { [Field ("NLLanguageVietnamese")] Vietnamese, - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] [Field ("NLLanguageKazakh")] Kazakh, } /// Enumerates classes of tags that are returned from a text classifier. - [Watch (5, 0)] [MacCatalyst (13, 1)] public enum NLTagScheme { [Field ("NLTagSchemeTokenType")] @@ -217,13 +211,13 @@ public enum NLTagScheme { Language, [Field ("NLTagSchemeScript")] Script, - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Field ("NLTagSchemeSentimentScore")] SentimentScore, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] public enum NLScript { [Field ("NLScriptUndetermined")] Undetermined, @@ -289,7 +283,7 @@ public enum NLScript { TraditionalChinese, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum NLContextualEmbeddingAssetsResult : long { Available, @@ -297,7 +291,7 @@ public enum NLContextualEmbeddingAssetsResult : long { Error, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] public enum NLContextualEmebeddingKey { [Field ("NLContextualEmbeddingKeyLanguages")] Languages, diff --git a/src/NaturalLanguage/NLModel.cs b/src/NaturalLanguage/NLModel.cs index 3819e565d8cb..a095bee16927 100644 --- a/src/NaturalLanguage/NLModel.cs +++ b/src/NaturalLanguage/NLModel.cs @@ -16,7 +16,6 @@ public partial class NLModel { [SupportedOSPlatform ("ios14.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -33,7 +32,6 @@ public Dictionary GetPredictedLabelHypotheses (string @strin [SupportedOSPlatform ("ios14.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] diff --git a/src/NearbyInteraction/Enums.cs b/src/NearbyInteraction/Enums.cs index 7ca0202b4375..1b53b257a0c9 100644 --- a/src/NearbyInteraction/Enums.cs +++ b/src/NearbyInteraction/Enums.cs @@ -13,7 +13,7 @@ namespace NearbyInteraction { - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [ErrorDomain ("NIErrorDomain")] [Native] @@ -30,7 +30,7 @@ public enum NIErrorCode : long { ActiveExtendedDistanceSessionsLimitExceeded = -5880, } - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum NINearbyObjectRemovalReason : long { @@ -38,7 +38,7 @@ public enum NINearbyObjectRemovalReason : long { PeerEnded, } - [iOS (16, 0), NoMac, Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), NoMac, NoTV, MacCatalyst (16, 0)] [Native] public enum NIAlgorithmConvergenceStatus : long { Unknown, @@ -46,7 +46,7 @@ public enum NIAlgorithmConvergenceStatus : long { Converged, } - [iOS (16, 0), NoMac, Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), NoMac, NoTV, MacCatalyst (16, 0)] [Native] public enum NINearbyObjectVerticalDirectionEstimate : long { Unknown = 0, diff --git a/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs b/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs index 3cec4435a0eb..01d69a593730 100644 --- a/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs +++ b/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs @@ -7,7 +7,7 @@ // Copyright 2022 Microsoft Corp. // -#if IOS || WATCH || __MACCATALYST__ +#if IOS || __MACCATALYST__ #nullable enable @@ -30,7 +30,7 @@ public partial class NIAlgorithmConvergenceStatusReasonValues [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] #else - [iOS (16,0), NoMac, Watch (9,0), NoTV, MacCatalyst (16,0)] + [iOS (16,0), NoMac, NoTV, MacCatalyst (16,0)] #endif // NET [DllImport (Constants.NearbyInteractionLibrary)] static extern NativeHandle /* NSString */ NIAlgorithmConvergenceStatusReasonDescription (NativeHandle /* NIAlgorithmConvergenceStatusReason */ reason); @@ -41,7 +41,7 @@ public partial class NIAlgorithmConvergenceStatusReasonValues [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] #else - [iOS (16,0), NoMac, Watch (9,0), NoTV, MacCatalyst (16,0)] + [iOS (16,0), NoMac, NoTV, MacCatalyst (16,0)] #endif // NET public static NSString GetConvergenceStatusReason (NIAlgorithmConvergenceStatusReason reason) { @@ -49,4 +49,4 @@ public static NSString GetConvergenceStatusReason (NIAlgorithmConvergenceStatusR } } } -#endif // IOS || WATCH || __MACCATALYST__ +#endif // IOS || __MACCATALYST__ diff --git a/src/NearbyInteraction/NICompat.cs b/src/NearbyInteraction/NICompat.cs index 1c2b96e17c39..e461d85d2687 100644 --- a/src/NearbyInteraction/NICompat.cs +++ b/src/NearbyInteraction/NICompat.cs @@ -33,17 +33,6 @@ namespace NearbyInteraction { #if !__MACOS__ && !__TVOS__ public partial class NISession { - -#if WATCH - [Obsolete ("This method was removed and will always throw a InvalidOperationException.")] - [EditorBrowsable (EditorBrowsableState.Never)] - public virtual void SetARSession (ARSession session) => throw new InvalidOperationException (Constants.ApiRemovedGeneral); - - [Obsolete ("This method was removed and will always throw a InvalidOperationException.")] - [EditorBrowsable (EditorBrowsableState.Never)] - public virtual MatrixFloat4x4 GetWorldTransform (NINearbyObject @object) => throw new InvalidOperationException (Constants.ApiRemovedGeneral); -#endif // WATCH - #if __MACCATALYST__ [Obsolete ("This method was removed and will always throw a InvalidOperationException.")] [EditorBrowsable (EditorBrowsableState.Never)] diff --git a/src/NearbyInteraction/NINearbyObject.cs b/src/NearbyInteraction/NINearbyObject.cs index cc1e97bfeca4..18f691c36940 100644 --- a/src/NearbyInteraction/NINearbyObject.cs +++ b/src/NearbyInteraction/NINearbyObject.cs @@ -23,7 +23,7 @@ using MatrixFloat4x4 = global::OpenTK.NMatrix4; #endif -#if __IOS__ || WATCH +#if __IOS__ namespace NearbyInteraction { partial class NINearbyObject { @@ -52,7 +52,7 @@ public static Vector3 DirectionNotAvailable { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] #else - [iOS (16,0), Watch (9,0), MacCatalyst (16,0)] + [iOS (16,0), MacCatalyst (16,0)] #endif // NET // Following similar strategy found here: https://github.com/xamarin/maccore/issues/2274 [Field ("NINearbyObjectWorldTransformNotAvailable", "NearbyInteraction")] diff --git a/src/Network/NWAdvertiseDescriptor.cs b/src/Network/NWAdvertiseDescriptor.cs index d399d35e8e2e..7aaf90e7adfd 100644 --- a/src/Network/NWAdvertiseDescriptor.cs +++ b/src/Network/NWAdvertiseDescriptor.cs @@ -28,8 +28,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWAdvertiseDescriptor : NativeObject { [Preserve (Conditional = true)] @@ -49,7 +47,6 @@ public NWAdvertiseDescriptor (NativeHandle handle, bool owns) : base (handle, ow [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern OS_nw_advertise_descriptor nw_advertise_descriptor_create_application_service (IntPtr application_service_name); @@ -69,7 +66,6 @@ static OS_nw_advertise_descriptor nw_advertise_descriptor_create_application_ser [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public NWAdvertiseDescriptor (string applicationServiceName) : base (nw_advertise_descriptor_create_application_service (applicationServiceName), true) { } @@ -82,7 +78,6 @@ public NWAdvertiseDescriptor (string applicationServiceName) : base (nw_advertis [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern IntPtr nw_advertise_descriptor_get_application_service_name (OS_nw_advertise_descriptor advertise_descriptor); @@ -96,7 +91,6 @@ public NWAdvertiseDescriptor (string applicationServiceName) : base (nw_advertis [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public string? ApplicationServiceName { get { diff --git a/src/Network/NWBrowseResult.cs b/src/Network/NWBrowseResult.cs index 83613c863620..334808a5783f 100644 --- a/src/Network/NWBrowseResult.cs +++ b/src/Network/NWBrowseResult.cs @@ -33,7 +33,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWBrowseResult : NativeObject { diff --git a/src/Network/NWBrowser.cs b/src/Network/NWBrowser.cs index 564f5a9e91a8..f614eef04571 100644 --- a/src/Network/NWBrowser.cs +++ b/src/Network/NWBrowser.cs @@ -39,7 +39,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWBrowser : NativeObject { diff --git a/src/Network/NWBrowserDescriptor.cs b/src/Network/NWBrowserDescriptor.cs index d4fc58de40e7..bfb3ce5425cf 100644 --- a/src/Network/NWBrowserDescriptor.cs +++ b/src/Network/NWBrowserDescriptor.cs @@ -31,7 +31,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWBrowserDescriptor : NativeObject { @@ -50,7 +49,6 @@ internal NWBrowserDescriptor (NativeHandle handle, bool owns) : base (handle, ow [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern OS_nw_browse_descriptor nw_browse_descriptor_create_application_service (IntPtr application_service_name); @@ -64,7 +62,6 @@ internal NWBrowserDescriptor (NativeHandle handle, bool owns) : base (handle, ow [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public static NWBrowserDescriptor CreateApplicationServiceName (string applicationServiceName) { @@ -84,7 +81,6 @@ public static NWBrowserDescriptor CreateApplicationServiceName (string applicati [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern IntPtr nw_browse_descriptor_get_application_service_name (OS_nw_browse_descriptor descriptor); @@ -98,7 +94,6 @@ public static NWBrowserDescriptor CreateApplicationServiceName (string applicati [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public string? ApplicationServiceName { get { diff --git a/src/Network/NWConnection.cs b/src/Network/NWConnection.cs index 2c46260886f1..5fd4ce6c4ad2 100644 --- a/src/Network/NWConnection.cs +++ b/src/Network/NWConnection.cs @@ -51,8 +51,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWConnection : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWConnectionGroup.cs b/src/Network/NWConnectionGroup.cs index 76450b2034a2..e2388e91882b 100644 --- a/src/Network/NWConnectionGroup.cs +++ b/src/Network/NWConnectionGroup.cs @@ -30,7 +30,6 @@ namespace Network { #else [TV (14, 0)] [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public delegate void NWConnectionGroupReceiveDelegate (DispatchData content, NWContentContext context, bool isCompleted); @@ -43,7 +42,6 @@ namespace Network { #else [TV (14, 0)] [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public delegate void NWConnectionGroupStateChangedDelegate (NWConnectionGroupState state, NWError? error); @@ -56,7 +54,6 @@ namespace Network { #else [TV (14, 0)] [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public class NWConnectionGroup : NativeObject { @@ -317,7 +314,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -331,7 +327,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -350,7 +345,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -364,7 +358,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -385,7 +378,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -399,7 +391,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -416,7 +407,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -430,7 +420,6 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -448,7 +437,6 @@ public bool TryReinsertExtractedConnection (NWConnection connection) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -480,7 +468,6 @@ static void TrampolineSetNewConnectionHandler (IntPtr block, IntPtr connection) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWContentContext.cs b/src/Network/NWContentContext.cs index 2daba248fcb2..4fd18acf33f3 100644 --- a/src/Network/NWContentContext.cs +++ b/src/Network/NWContentContext.cs @@ -30,8 +30,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWContentContext : NativeObject { bool global; diff --git a/src/Network/NWDataTransferReport.cs b/src/Network/NWDataTransferReport.cs index 8ec9d0ac427b..83f8363ef520 100644 --- a/src/Network/NWDataTransferReport.cs +++ b/src/Network/NWDataTransferReport.cs @@ -35,7 +35,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWDataTransferReport : NativeObject { @@ -193,7 +192,6 @@ public void Collect (DispatchQueue queue, Action handler) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -207,7 +205,6 @@ public void Collect (DispatchQueue queue, Action handler) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -222,7 +219,6 @@ public NWInterfaceRadioType GetPathRadioType (uint pathIndex) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWEndpoint.cs b/src/Network/NWEndpoint.cs index 2229893491f7..ccb21c14341a 100644 --- a/src/Network/NWEndpoint.cs +++ b/src/Network/NWEndpoint.cs @@ -30,8 +30,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWEndpoint : NativeObject { @@ -207,7 +205,6 @@ static string nw_endpoint_copy_address_string (OS_nw_endpoint endpoint) [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern unsafe byte* nw_endpoint_get_signature (OS_nw_endpoint endpoint, nuint* out_signature_length); @@ -221,7 +218,6 @@ static string nw_endpoint_copy_address_string (OS_nw_endpoint endpoint) [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public ReadOnlySpan Signature { get { @@ -245,7 +241,6 @@ public ReadOnlySpan Signature { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern OS_nw_txt_record nw_endpoint_copy_txt_record (OS_nw_endpoint endpoint); @@ -259,7 +254,6 @@ public ReadOnlySpan Signature { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public NWTxtRecord? TxtRecord { get { diff --git a/src/Network/NWEnums.cs b/src/Network/NWEnums.cs index a537969f20e0..c6d43ba7f669 100644 --- a/src/Network/NWEnums.cs +++ b/src/Network/NWEnums.cs @@ -21,7 +21,7 @@ namespace Network { - [Flags, TV (13, 0), iOS (13, 0), Watch (6, 0)] + [Flags, TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWBrowseResultChange : ulong { Invalid = 0x00, @@ -33,7 +33,7 @@ public enum NWBrowseResultChange : ulong { InterfaceRemoved = 0x10, } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWBrowserState { Invalid = 0, @@ -42,7 +42,6 @@ public enum NWBrowserState { Cancelled = 3, } - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWConnectionState { Invalid = 0, @@ -53,7 +52,7 @@ public enum NWConnectionState { Cancelled = 5, } - [TV (14, 0), iOS (14, 0), Watch (7, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] public enum NWConnectionGroupState { Invalid = 0, @@ -63,26 +62,25 @@ public enum NWConnectionGroupState { Cancelled = 4, } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWDataTransferReportState { Collecting = 1, Collected = 2, } - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWEndpointType { Invalid = 0, Address = 1, Host = 2, BonjourService = 3, - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] Url = 4, } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWReportResolutionSource { Query = 1, @@ -90,7 +88,7 @@ public enum NWReportResolutionSource { ExpiredCache = 3, } - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [NoMacCatalyst] public enum NWEthernetChannelState { Invalid = 0, @@ -103,14 +101,14 @@ public enum NWEthernetChannelState { // from System/Library/Frameworks/Network.framework/Headers/framer_options.h: [Flags] - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWFramerCreateFlags : uint { Default = 0x00, } // from System/Library/Frameworks/Network.framework/Headers/framer_options.h: - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWFramerStartResult { Unknown = 0, @@ -118,7 +116,7 @@ public enum NWFramerStartResult { WillMarkReady = 2, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWIPLocalAddressPreference { Default = 0, @@ -126,7 +124,6 @@ public enum NWIPLocalAddressPreference { Stable = 2, } - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWIPVersion { Any = 0, @@ -134,7 +131,6 @@ public enum NWIPVersion { Version6 = 2, } - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWInterfaceType { Other = 0, @@ -144,7 +140,6 @@ public enum NWInterfaceType { Loopback = 4, } - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWListenerState { Invalid = 0, @@ -154,7 +149,6 @@ public enum NWListenerState { Cancelled = 4, } - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWMultiPathService { Disabled = 0, @@ -163,18 +157,16 @@ public enum NWMultiPathService { Aggregate = 3, } - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWParametersExpiredDnsBehavior { Default = 0, Allow = 1, Prohibit = 2, - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] Persistent = 3, } // this maps to `nw_path_status_t` in Network/Headers/path.h (and not the enum from NetworkExtension) - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWPathStatus { Invalid = 0, @@ -199,7 +191,7 @@ public enum NWIPEcnFlag { Ce = 3, } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWTxtRecordFindKey { Invalid = 0, @@ -209,7 +201,7 @@ public enum NWTxtRecordFindKey { NonEmptyValue = 4, } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWWebSocketOpCode : int { Cont = 0x0, @@ -221,7 +213,7 @@ public enum NWWebSocketOpCode : int { Invalid = -1, } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWWebSocketCloseCode : int { NormalClosure = 1000, @@ -239,14 +231,14 @@ public enum NWWebSocketCloseCode : int { } // this maps to `nw_ws_version_t` in Network.framework/Headers/ws_options.h (and not the enum from NetworkExtension) - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWWebSocketVersion { Invalid = 0, Version13 = 1, } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] public enum NWWebSocketResponseStatus { Invalid = 0, @@ -254,7 +246,7 @@ public enum NWWebSocketResponseStatus { Reject = 2, } - [TV (15, 0), iOS (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] public enum NWReportResolutionProtocol { Unknown = 0, Udp = 1, @@ -263,14 +255,14 @@ public enum NWReportResolutionProtocol { Https = 4, } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] public enum NWResolverConfigEndpointType { Https, Tls, } - [Watch (8, 0), TV (15, 0), iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [MacCatalyst (15, 0)] public enum NWMultipathVersion { Unspecified = -1, @@ -278,7 +270,7 @@ public enum NWMultipathVersion { Version1 = 1, } - [Watch (8, 0), TV (15, 0), iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [MacCatalyst (15, 0)] public enum NWInterfaceRadioType { Unknown = 0, @@ -300,19 +292,19 @@ public enum NWInterfaceRadioType { CellEvdo = 0x88, } - [Watch (8, 0), TV (15, 0), iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [MacCatalyst (15, 0)] public enum NWParametersAttribution { Developer = 1, User = 2, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] public enum NWQuicStreamType { Unknown = 0, Bidirectional = 1, Unidirectional = 2, - [Watch (9, 4), TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] Datagram = 3, } } diff --git a/src/Network/NWError.cs b/src/Network/NWError.cs index 2875c88ed3fb..203e581cf5f2 100644 --- a/src/Network/NWError.cs +++ b/src/Network/NWError.cs @@ -26,8 +26,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWError : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWEstablishmentReport.cs b/src/Network/NWEstablishmentReport.cs index 5bdb598b92e8..f04b6fcb2a6d 100644 --- a/src/Network/NWEstablishmentReport.cs +++ b/src/Network/NWEstablishmentReport.cs @@ -37,7 +37,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWEstablishmentReport : NativeObject { @@ -162,7 +161,6 @@ public NWEndpoint? ProxyEndpoint { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -193,7 +191,6 @@ static void TrampolineEnumerateResolutionReport (IntPtr block, nw_resolution_rep [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWEthernetChannel.cs b/src/Network/NWEthernetChannel.cs index b5b0cd5179ff..1011665380b6 100644 --- a/src/Network/NWEthernetChannel.cs +++ b/src/Network/NWEthernetChannel.cs @@ -35,7 +35,6 @@ namespace Network { // [UnsupportedOSPlatform ("tvos")] // [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif diff --git a/src/Network/NWFramer.cs b/src/Network/NWFramer.cs index 7d64ffa5d914..0cba67ef52f3 100644 --- a/src/Network/NWFramer.cs +++ b/src/Network/NWFramer.cs @@ -41,7 +41,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWFramer : NativeObject { [Preserve (Conditional = true)] @@ -472,7 +471,6 @@ public void DeliverInput (ReadOnlySpan buffer, NWFramerMessage message, bo [Mac (13, 0)] [iOS (16, 0)] [MacCatalyst (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern OS_nw_protocol_options nw_framer_copy_options (OS_nw_framer framer); @@ -487,7 +485,6 @@ public void DeliverInput (ReadOnlySpan buffer, NWFramerMessage message, bo [Mac (13, 0)] [iOS (16, 0)] [MacCatalyst (16, 0)] - [Watch (9, 0)] #endif public NSProtocolFramerOptions? ProtocolOptions { get { diff --git a/src/Network/NWFramerMessage.cs b/src/Network/NWFramerMessage.cs index 52eb5436a9ba..76a6d1654e5c 100644 --- a/src/Network/NWFramerMessage.cs +++ b/src/Network/NWFramerMessage.cs @@ -38,7 +38,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWFramerMessage : NWProtocolMetadata { [Preserve (Conditional = true)] diff --git a/src/Network/NWIPMetadata.cs b/src/Network/NWIPMetadata.cs index 4c7408e1e6f8..e7d162709ec5 100644 --- a/src/Network/NWIPMetadata.cs +++ b/src/Network/NWIPMetadata.cs @@ -25,8 +25,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWIPMetadata : NWProtocolMetadata { diff --git a/src/Network/NWInterface.cs b/src/Network/NWInterface.cs index 3929385d92f3..b37d41851a4d 100644 --- a/src/Network/NWInterface.cs +++ b/src/Network/NWInterface.cs @@ -29,8 +29,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWInterface : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWListener.cs b/src/Network/NWListener.cs index 5bf36f335da6..a4ad66c69b3a 100644 --- a/src/Network/NWListener.cs +++ b/src/Network/NWListener.cs @@ -28,8 +28,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWListener : NativeObject { bool connectionHandlerWasSet = false; @@ -337,7 +335,6 @@ public uint ConnectionLimit { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -368,7 +365,6 @@ static void TrampolineNewConnectionGroup (IntPtr block, nw_connection_group_t co [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWMulticastGroup.cs b/src/Network/NWMulticastGroup.cs index 31c8758c1fa2..0d24644061e2 100644 --- a/src/Network/NWMulticastGroup.cs +++ b/src/Network/NWMulticastGroup.cs @@ -22,7 +22,6 @@ namespace Network { #else [TV (14, 0)] [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public class NWMulticastGroup : NativeObject { diff --git a/src/Network/NWMultiplexGroup.cs b/src/Network/NWMultiplexGroup.cs index 1f602d1a3f80..7be952d3dfea 100644 --- a/src/Network/NWMultiplexGroup.cs +++ b/src/Network/NWMultiplexGroup.cs @@ -20,7 +20,6 @@ namespace Network { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWParameters.cs b/src/Network/NWParameters.cs index 2a24f85208bb..5e562febdd81 100644 --- a/src/Network/NWParameters.cs +++ b/src/Network/NWParameters.cs @@ -32,8 +32,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWParameters : NativeObject { [Preserve (Conditional = true)] @@ -53,7 +51,6 @@ public NWParameters (NativeHandle handle, bool owns) : base (handle, owns) { } [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern OS_nw_parameters nw_parameters_create_application_service (); @@ -67,7 +64,6 @@ public NWParameters (NativeHandle handle, bool owns) : base (handle, owns) { } [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public static NWParameters CreateApplicationService () => new NWParameters (nw_parameters_create_application_service (), true); @@ -222,7 +218,6 @@ public unsafe static NWParameters CreateUdp (Action? configur [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -235,7 +230,6 @@ public unsafe static NWParameters CreateUdp (Action? configur [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -577,7 +571,6 @@ public bool ProhibitConstrained { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -591,7 +584,6 @@ public bool ProhibitConstrained { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -605,7 +597,6 @@ public bool ProhibitConstrained { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -621,7 +612,6 @@ public NWParametersAttribution Attribution { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -635,7 +625,6 @@ public NWParametersAttribution Attribution { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -649,7 +638,6 @@ public void SetPrivacyContext (NWPrivacyContext privacyContext) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -663,7 +651,6 @@ public void SetPrivacyContext (NWPrivacyContext privacyContext) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -691,7 +678,6 @@ public unsafe static NWParameters CreateQuic (Action? configu [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern byte nw_parameters_requires_dnssec_validation (OS_nw_parameters parameters); @@ -705,7 +691,6 @@ public unsafe static NWParameters CreateQuic (Action? configu [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern void nw_parameters_set_requires_dnssec_validation (OS_nw_parameters parameters, byte requires_dnssec_validation); @@ -719,7 +704,6 @@ public unsafe static NWParameters CreateQuic (Action? configu [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public bool RequiresDnssecValidation { get => nw_parameters_requires_dnssec_validation (GetCheckedHandle ()) != 0; diff --git a/src/Network/NWPath.cs b/src/Network/NWPath.cs index 166eebe76aea..84c4e1f5595c 100644 --- a/src/Network/NWPath.cs +++ b/src/Network/NWPath.cs @@ -28,8 +28,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWPath : NativeObject { [Preserve (Conditional = true)] @@ -270,7 +268,6 @@ public void EnumerateGateways (Func callback) #else [iOS (14, 2)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 2)] #endif [DllImport (Constants.NetworkLibrary)] @@ -284,7 +281,6 @@ public void EnumerateGateways (Func callback) #else [iOS (14, 2)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 2)] #endif public NWPathUnsatisfiedReason GetUnsatisfiedReason () diff --git a/src/Network/NWPathMonitor.cs b/src/Network/NWPathMonitor.cs index 94e4c8fa2efb..4bd6abf037dd 100644 --- a/src/Network/NWPathMonitor.cs +++ b/src/Network/NWPathMonitor.cs @@ -29,8 +29,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWPathMonitor : NativeObject { [Preserve (Conditional = true)] @@ -168,7 +166,6 @@ public void SetMonitorCanceledHandler (Action callback) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -182,7 +179,6 @@ public void SetMonitorCanceledHandler (Action callback) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -197,7 +193,6 @@ public void ProhibitInterfaceType (NWInterfaceType interfaceType) [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] [Mac (13,0)] @@ -211,7 +206,6 @@ public void ProhibitInterfaceType (NWInterfaceType interfaceType) [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] #else - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] diff --git a/src/Network/NWPrivacyContext.cs b/src/Network/NWPrivacyContext.cs index 8751ea71d513..eef58bb15bfb 100644 --- a/src/Network/NWPrivacyContext.cs +++ b/src/Network/NWPrivacyContext.cs @@ -20,7 +20,6 @@ namespace Network { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -73,7 +72,7 @@ public void RequireEncryptedNameResolution (bool requireEncryptedNameResolution, [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern void nw_privacy_context_add_proxy (OS_nw_privacy_context privacy_context, OS_nw_proxy_config proxy_config); @@ -84,7 +83,7 @@ public void RequireEncryptedNameResolution (bool requireEncryptedNameResolution, [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public void AddProxy (NWProxyConfig proxyConfig) { @@ -99,7 +98,7 @@ public void AddProxy (NWProxyConfig proxyConfig) [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern void nw_privacy_context_clear_proxies (OS_nw_privacy_context privacy_context); @@ -110,7 +109,7 @@ public void AddProxy (NWProxyConfig proxyConfig) [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public void ClearProxies () { diff --git a/src/Network/NWProtocolDefinition.cs b/src/Network/NWProtocolDefinition.cs index 4201ac1596cb..f96c8cccceb6 100644 --- a/src/Network/NWProtocolDefinition.cs +++ b/src/Network/NWProtocolDefinition.cs @@ -29,8 +29,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWProtocolDefinition : NativeObject { [Preserve (Conditional = true)] @@ -183,7 +181,6 @@ public static NWProtocolDefinition CreateFramerDefinition (string identifier, NW [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -197,7 +194,6 @@ public static NWProtocolDefinition CreateFramerDefinition (string identifier, NW [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWProtocolFramerOptions.cs b/src/Network/NWProtocolFramerOptions.cs index 099e2577e2a1..7b49cca2d57d 100644 --- a/src/Network/NWProtocolFramerOptions.cs +++ b/src/Network/NWProtocolFramerOptions.cs @@ -36,7 +36,6 @@ namespace Network { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] [MacCatalyst (16, 0)] #endif public class NSProtocolFramerOptions : NWProtocolOptions { diff --git a/src/Network/NWProtocolIPOptions.cs b/src/Network/NWProtocolIPOptions.cs index f5d56a160427..f36a15d25ba4 100644 --- a/src/Network/NWProtocolIPOptions.cs +++ b/src/Network/NWProtocolIPOptions.cs @@ -34,7 +34,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWProtocolIPOptions : NWProtocolOptions { [Preserve (Conditional = true)] @@ -64,7 +63,6 @@ public void SetIPLocalAddressPreference (NWIPLocalAddressPreference localAddress [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -78,7 +76,6 @@ public void SetIPLocalAddressPreference (NWIPLocalAddressPreference localAddress [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWProtocolMetadata.cs b/src/Network/NWProtocolMetadata.cs index fecbf9efe8d0..93dbc81c74d4 100644 --- a/src/Network/NWProtocolMetadata.cs +++ b/src/Network/NWProtocolMetadata.cs @@ -31,8 +31,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWProtocolMetadata : NativeObject { @@ -96,7 +94,6 @@ public NWProtocolMetadata (NativeHandle handle, bool owns) : base (handle, owns) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -110,7 +107,6 @@ public NWProtocolMetadata (NativeHandle handle, bool owns) : base (handle, owns) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWProtocolOptions.cs b/src/Network/NWProtocolOptions.cs index 572813a8065e..c3d8267019ca 100644 --- a/src/Network/NWProtocolOptions.cs +++ b/src/Network/NWProtocolOptions.cs @@ -30,8 +30,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWProtocolOptions : NativeObject { [Preserve (Conditional = true)] @@ -87,7 +85,6 @@ public static NWProtocolOptions CreateUdp () [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -335,7 +332,6 @@ public NWIPLocalAddressPreference IPLocalAddressPreference { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWProtocolQuicOptions.cs b/src/Network/NWProtocolQuicOptions.cs index 2e16d2344910..8b0259d116db 100644 --- a/src/Network/NWProtocolQuicOptions.cs +++ b/src/Network/NWProtocolQuicOptions.cs @@ -23,7 +23,6 @@ namespace Network { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -160,7 +159,6 @@ public ulong InitialMaxStreamDataUnidirectional { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern ushort nw_quic_get_max_datagram_frame_size (OS_nw_protocol_options options); @@ -174,7 +172,6 @@ public ulong InitialMaxStreamDataUnidirectional { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern void nw_quic_set_max_datagram_frame_size (OS_nw_protocol_options options, ushort max_datagram_frame_size); @@ -188,7 +185,6 @@ public ulong InitialMaxStreamDataUnidirectional { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public ushort DatagramFrameSize { get => nw_quic_get_max_datagram_frame_size (GetCheckedHandle ()); @@ -204,7 +200,6 @@ public ushort DatagramFrameSize { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern byte nw_quic_get_stream_is_datagram (OS_nw_protocol_options options); @@ -218,7 +213,6 @@ public ushort DatagramFrameSize { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern void nw_quic_set_stream_is_datagram (OS_nw_protocol_options options, byte is_datagram); @@ -232,7 +226,6 @@ public ushort DatagramFrameSize { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public bool StreamIsDatagram { get => nw_quic_get_stream_is_datagram (GetCheckedHandle ()) != 0; @@ -248,7 +241,6 @@ public bool StreamIsDatagram { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern ushort nw_quic_get_stream_usable_datagram_frame_size (OS_nw_protocol_metadata metadata); @@ -262,7 +254,6 @@ public bool StreamIsDatagram { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public ushort StreamUsableDatagramFrameSize => nw_quic_get_stream_usable_datagram_frame_size (GetCheckedHandle ()); @@ -275,7 +266,6 @@ public bool StreamIsDatagram { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif [DllImport (Constants.NetworkLibrary)] static extern byte nw_quic_get_stream_type (OS_nw_protocol_metadata stream_metadata); @@ -289,7 +279,6 @@ public bool StreamIsDatagram { [TV (16, 0)] [Mac (13, 0)] [iOS (16, 0)] - [Watch (9, 0)] #endif public NWQuicStreamType StreamType => (NWQuicStreamType) nw_quic_get_stream_type (GetCheckedHandle ()); diff --git a/src/Network/NWProtocolStack.cs b/src/Network/NWProtocolStack.cs index e8b8fc397e3e..d43e247558eb 100644 --- a/src/Network/NWProtocolStack.cs +++ b/src/Network/NWProtocolStack.cs @@ -32,8 +32,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWProtocolStack : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWProtocolTcpOptions.cs b/src/Network/NWProtocolTcpOptions.cs index ea6dc2874445..8380ceaf9b1d 100644 --- a/src/Network/NWProtocolTcpOptions.cs +++ b/src/Network/NWProtocolTcpOptions.cs @@ -31,8 +31,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWProtocolTcpOptions : NWProtocolOptions { @@ -84,7 +82,6 @@ public void SetDisableAckStretching (bool disableAckStretching) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -98,7 +95,6 @@ public void SetDisableAckStretching (bool disableAckStretching) [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWProtocolTlsOptions.cs b/src/Network/NWProtocolTlsOptions.cs index 39c08b44b097..52e902719169 100644 --- a/src/Network/NWProtocolTlsOptions.cs +++ b/src/Network/NWProtocolTlsOptions.cs @@ -30,8 +30,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWProtocolTlsOptions : NWProtocolOptions { [Preserve (Conditional = true)] diff --git a/src/Network/NWProtocolUdpOptions.cs b/src/Network/NWProtocolUdpOptions.cs index 0eb9f17e9f3e..473682610ea0 100644 --- a/src/Network/NWProtocolUdpOptions.cs +++ b/src/Network/NWProtocolUdpOptions.cs @@ -26,8 +26,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWProtocolUdpOptions : NWProtocolOptions { [Preserve (Conditional = true)] diff --git a/src/Network/NWProxyConfig.cs b/src/Network/NWProxyConfig.cs index 7363c52aad11..86c631dd7b37 100644 --- a/src/Network/NWProxyConfig.cs +++ b/src/Network/NWProxyConfig.cs @@ -24,7 +24,7 @@ namespace Network { [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public class NWProxyConfig : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWQuicMetadata.cs b/src/Network/NWQuicMetadata.cs index e96f615f3148..7bd592579dd4 100644 --- a/src/Network/NWQuicMetadata.cs +++ b/src/Network/NWQuicMetadata.cs @@ -22,7 +22,6 @@ namespace Network { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWRelayHop.cs b/src/Network/NWRelayHop.cs index dfe322553096..d56f895f324a 100644 --- a/src/Network/NWRelayHop.cs +++ b/src/Network/NWRelayHop.cs @@ -23,7 +23,7 @@ namespace Network { [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif public class NWRelayHop : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWResolutionReport.cs b/src/Network/NWResolutionReport.cs index 9919bf3193e6..0c61abe7f519 100644 --- a/src/Network/NWResolutionReport.cs +++ b/src/Network/NWResolutionReport.cs @@ -23,7 +23,6 @@ namespace Network { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWResolverConfig.cs b/src/Network/NWResolverConfig.cs index 1e14fa81d854..0f0b69bec429 100644 --- a/src/Network/NWResolverConfig.cs +++ b/src/Network/NWResolverConfig.cs @@ -22,7 +22,6 @@ namespace Network { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] diff --git a/src/Network/NWTcpMetadata.cs b/src/Network/NWTcpMetadata.cs index ce1ba235a567..0dcb1778e90e 100644 --- a/src/Network/NWTcpMetadata.cs +++ b/src/Network/NWTcpMetadata.cs @@ -25,8 +25,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWTcpMetadata : NWProtocolMetadata { diff --git a/src/Network/NWTlsMetadata.cs b/src/Network/NWTlsMetadata.cs index fba2718570d2..be496743d5ff 100644 --- a/src/Network/NWTlsMetadata.cs +++ b/src/Network/NWTlsMetadata.cs @@ -26,8 +26,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWTlsMetadata : NWProtocolMetadata { diff --git a/src/Network/NWTxtRecord.cs b/src/Network/NWTxtRecord.cs index 73f86ed0640d..d75510bc48f4 100644 --- a/src/Network/NWTxtRecord.cs +++ b/src/Network/NWTxtRecord.cs @@ -36,7 +36,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWTxtRecord : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWUdpMetadata.cs b/src/Network/NWUdpMetadata.cs index cbc57ab1ae45..946bad77011b 100644 --- a/src/Network/NWUdpMetadata.cs +++ b/src/Network/NWUdpMetadata.cs @@ -26,8 +26,6 @@ namespace Network { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (6, 0)] #endif public class NWUdpMetadata : NWProtocolMetadata { diff --git a/src/Network/NWWebSocketMetadata.cs b/src/Network/NWWebSocketMetadata.cs index 97cf843b17be..03b8248e09df 100644 --- a/src/Network/NWWebSocketMetadata.cs +++ b/src/Network/NWWebSocketMetadata.cs @@ -34,7 +34,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWWebSocketMetadata : NWProtocolMetadata { diff --git a/src/Network/NWWebSocketOptions.cs b/src/Network/NWWebSocketOptions.cs index 3eedbf2de73d..4a0ff6cc3bee 100644 --- a/src/Network/NWWebSocketOptions.cs +++ b/src/Network/NWWebSocketOptions.cs @@ -33,7 +33,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWWebSocketOptions : NWProtocolOptions { bool autoReplyPing = false; diff --git a/src/Network/NWWebSocketRequest.cs b/src/Network/NWWebSocketRequest.cs index 22764169ab63..9613e78a8f38 100644 --- a/src/Network/NWWebSocketRequest.cs +++ b/src/Network/NWWebSocketRequest.cs @@ -32,7 +32,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWWebSocketRequest : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Network/NWWebSocketResponse.cs b/src/Network/NWWebSocketResponse.cs index 82e40421679b..97ce14de61a1 100644 --- a/src/Network/NWWebSocketResponse.cs +++ b/src/Network/NWWebSocketResponse.cs @@ -32,7 +32,6 @@ namespace Network { #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public class NWWebSocketResponse : NativeObject { diff --git a/src/NetworkExtension/NEEnums.cs b/src/NetworkExtension/NEEnums.cs index dc6090928706..65cf695b6625 100644 --- a/src/NetworkExtension/NEEnums.cs +++ b/src/NetworkExtension/NEEnums.cs @@ -94,7 +94,7 @@ public enum NEVpnIke2DiffieHellman : long { [iOS (13, 0)] [MacCatalyst (13, 1)] Group31 = 31, - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] Group32 = 32, } @@ -137,7 +137,7 @@ public enum NEVpnIke2CertificateType : long { [iOS (13, 0)] [MacCatalyst (13, 1)] Ed25519 = 5, - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] Rsapss = 6, } @@ -311,7 +311,7 @@ public enum NEHotspotHelperResult : long { } #endif - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] [ErrorDomain ("NEAppPushErrorDomain")] @@ -322,7 +322,7 @@ public enum NEAppPushManagerError : long { InactiveSession = 4, } - [NoWatch, iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Native ("NEDNSProtocol")] public enum NEDnsProtocol : long { @@ -331,7 +331,7 @@ public enum NEDnsProtocol : long { Https = 3, } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native ("NEDNSSettingsManagerError")] [ErrorDomain ("NEDNSSettingsErrorDomain")] @@ -342,7 +342,7 @@ public enum NEDnsSettingsManagerError : long { CannotBeRemoved = 4, } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum NERelayManagerError : long { Invalid = 1, diff --git a/src/ObjCBindings/BindingTypeAttribute.cs b/src/ObjCBindings/BindingTypeAttribute.cs index 6f936d77c69a..79f2f7499385 100644 --- a/src/ObjCBindings/BindingTypeAttribute.cs +++ b/src/ObjCBindings/BindingTypeAttribute.cs @@ -11,7 +11,7 @@ namespace ObjCBindings { /// If the attribute is used in a class, the class must be partial otherwise the generator will fail. /// [Experimental ("APL0003")] - [AttributeUsage (AttributeTargets.Class | System.AttributeTargets.Enum, AllowMultiple = false)] + [AttributeUsage (System.AttributeTargets.Enum, AllowMultiple = false)] public class BindingTypeAttribute : Attribute { /// @@ -22,4 +22,20 @@ public class BindingTypeAttribute : Attribute { public string Name { get; set; } = string.Empty; } + [Experimental ("APL0003")] + [AttributeUsage (AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)] + public class BindingTypeAttribute : Attribute where T : Enum { + + /// + /// Indicates the name of the binding type. This is the name that will be used by the registrar to make the + /// class available in the ObjC runtime. The default value is string.Empty, in that case the generator + /// will use the name of the C# class. + /// + public string Name { get; set; } = string.Empty; + + /// + /// Get/Set the export configuration flags. + /// + public T? Flags { get; set; } = default (T); + } } diff --git a/src/ObjCBindings/BindingTypeTag.cs b/src/ObjCBindings/BindingTypeTag.cs new file mode 100644 index 000000000000..aeb3d3734955 --- /dev/null +++ b/src/ObjCBindings/BindingTypeTag.cs @@ -0,0 +1,60 @@ +using System; +using System.Diagnostics.CodeAnalysis; + +#nullable enable + +namespace ObjCBindings { + + /// + /// Flags to be used on class bindings. + /// + [Flags] + [Experimental ("APL0003")] + public enum Class : Int64 { + /// + /// Use the default values. + /// + Default = 0, + + /// + /// Use to let the generator know that the default constructor should not be generated. + /// + DisableDefaultCtor = 1 << 2, + } + + /// + /// Flags to be used on protocol bindings. + /// + [Flags] + [Experimental ("APL0003")] + public enum Protocol : Int64 { + /// + /// Use the default values. + /// + Default = 0, + } + + /// + /// Flags to be used on protocol bindings. + /// + [Flags] + [Experimental ("APL0003")] + public enum Category : Int64 { + /// + /// Use the default values. + /// + Default = 0, + } + + /// + /// Flags to be used on strong dictionary bindings. + /// + [Flags] + [Experimental ("APL0003")] + public enum StrongDictionary : Int64 { + /// + /// Use the default values. + /// + Default = 0, + } +} diff --git a/src/ObjCBindings/ExportTag.cs b/src/ObjCBindings/ExportTag.cs index 21346178a46c..fdc91745bfe9 100644 --- a/src/ObjCBindings/ExportTag.cs +++ b/src/ObjCBindings/ExportTag.cs @@ -9,6 +9,7 @@ namespace ObjCBindings { /// Flags to be used on methods that will generate constructors in the binding class. /// [Flags] + [Experimental ("APL0003")] public enum Constructor : Int64 { /// /// Use the default values. @@ -25,6 +26,7 @@ public enum Constructor : Int64 { /// Flgs to be used in general bound methods. /// [Flags] + [Experimental ("APL0003")] public enum Method : Int64 { /// /// Use the default values. @@ -53,6 +55,7 @@ public enum Method : Int64 { /// Flags to be used on properties. /// [Flags] + [Experimental ("APL0003")] public enum Property : Int64 { /// /// Use the default values. diff --git a/src/ObjCBindings/FieldTag.cs b/src/ObjCBindings/FieldTag.cs index 6ec82dbe09b4..7a92e88bb087 100644 --- a/src/ObjCBindings/FieldTag.cs +++ b/src/ObjCBindings/FieldTag.cs @@ -5,18 +5,6 @@ namespace ObjCBindings { - /// - /// The exported constant/field is a class/interface property field. - /// - [Flags] - [Experimental ("APL0003")] - public enum Field { - /// - /// Use the default values. - /// - None = 0, - } - /// /// Field flag that states that the field is used as a Enum value. /// @@ -26,6 +14,6 @@ public enum EnumValue { /// /// Use the default values. /// - None = 0, + Default = 0, } } diff --git a/src/ObjCRuntime/BlockCallbackAttribute.cs b/src/ObjCRuntime/BlockCallbackAttribute.cs index eac616d8b984..b62761878aa7 100644 --- a/src/ObjCRuntime/BlockCallbackAttribute.cs +++ b/src/ObjCRuntime/BlockCallbackAttribute.cs @@ -5,9 +5,7 @@ namespace ObjCRuntime { /// This attribute is applied to delegate parameters in a delegate to specify /// that the delegate parameter needs an Objective-C Block-style bridge. /// - /// /// - /// [AttributeUsage (AttributeTargets.Parameter, AllowMultiple = false)] public class BlockCallbackAttribute : Attribute { /// diff --git a/src/ObjCRuntime/CCallbackAttribute.cs b/src/ObjCRuntime/CCallbackAttribute.cs index fce65a0d5be8..b692f152ba01 100644 --- a/src/ObjCRuntime/CCallbackAttribute.cs +++ b/src/ObjCRuntime/CCallbackAttribute.cs @@ -5,9 +5,7 @@ namespace ObjCRuntime { /// This attribute is applied to delegate parameters in a delegate to specify /// that the delegate parameter needs an C-style bridge. /// - /// /// - /// [AttributeUsage (AttributeTargets.Parameter, AllowMultiple = false)] public class CCallbackAttribute : Attribute { /// diff --git a/src/ObjCRuntime/Class.cs b/src/ObjCRuntime/Class.cs index 316bc42d9eb8..4135e6d8cb9d 100644 --- a/src/ObjCRuntime/Class.cs +++ b/src/ObjCRuntime/Class.cs @@ -753,6 +753,17 @@ static unsafe uint GetFullTokenReference (string assembly_name, int module_token return uint.MaxValue; } + static internal Class [] FromTypes (params Type [] types) + { + if (types is null) + ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (types)); + + var classes = new Class [types.Length]; + for (var i = 0; i < types.Length; i++) + classes [i] = new Class (types [i]); + return classes; + } + /* Type must have been previously registered. */ @@ -854,6 +865,16 @@ internal unsafe static bool TryGetClass (IntPtr obj, out IntPtr cls, [NotNullWhe return true; } + [DllImport (Messaging.LIBOBJC_DYLIB)] + unsafe extern static int objc_getClassList (IntPtr* buffer, int bufferCount); + + /// Gets the total number of registered Objective-C classes in the process. + /// A side-effect of counting all the registered Objective-C classes, is that all stub (unrealized) classes are also realized and can be used afterwards. + internal unsafe static int GetClassCount () + { + return objc_getClassList (null, 0); + } + [DllImport (Messaging.LIBOBJC_DYLIB)] internal extern static IntPtr class_getMethodImplementation (IntPtr cls, IntPtr sel); diff --git a/src/ObjCRuntime/Dlfcn.cs b/src/ObjCRuntime/Dlfcn.cs index 541ce35ec247..a1b10999b496 100644 --- a/src/ObjCRuntime/Dlfcn.cs +++ b/src/ObjCRuntime/Dlfcn.cs @@ -38,10 +38,8 @@ using Foundation; using CoreFoundation; using CoreGraphics; -#if !WATCH using CoreMedia; #endif -#endif #if !NO_SYSTEM_DRAWING using System.Drawing; #endif @@ -63,11 +61,9 @@ static public class OpenGLES static public readonly IntPtr Handle = Dlfcn._dlopen (Constants.OpenGLESLibrary, 0); } #endif -#if !WATCH static public class AudioToolbox { static public readonly IntPtr Handle = Dlfcn._dlopen (Constants.AudioToolboxLibrary, 0); } -#endif #endif } @@ -192,6 +188,20 @@ public static IntPtr GetIndirect (IntPtr handle, string symbol) return dlsym (handle, symbol); } + /// Gets the struct value exposed with the given symbol from the dynamic library. + /// Handle to the dynamic library previously opened with . + /// Name of the public symbol in the dynamic library to look up. + /// The struct from the library, or an empty struct (default(T)) if the symbol couldn't be found. + public static T GetStruct (IntPtr handle, string symbol) where T : unmanaged + { + var ptr = GetIndirect (handle, symbol); + if (ptr == IntPtr.Zero) + return default (T); + unsafe { + return *(T*) ptr; + } + } + public static NSNumber? GetNSNumber (IntPtr handle, string symbol) { var indirect = dlsym (handle, symbol); diff --git a/src/ObjCRuntime/DynamicRegistrar.cs b/src/ObjCRuntime/DynamicRegistrar.cs index d4b573bfbc71..2248335ac62c 100644 --- a/src/ObjCRuntime/DynamicRegistrar.cs +++ b/src/ObjCRuntime/DynamicRegistrar.cs @@ -20,6 +20,8 @@ using UIKit; #endif +using Xamarin.Bundler; + // Disable until we get around to enable + fix any issues. #nullable disable @@ -428,8 +430,6 @@ protected override string PlatformName { get { #if __TVOS__ return "tvOS"; -#elif __WATCHOS__ - return "watchOS"; #elif __IOS__ return "iOS"; #elif MONOMAC @@ -936,6 +936,7 @@ protected override void OnReloadType (ObjCType type) type.Handle = Class.GetHandle (type.ExportedName); } + static bool computed_class_count; protected override void OnRegisterType (ObjCType type) { type.Handle = Class.GetHandle (type.ExportedName); @@ -946,6 +947,13 @@ protected override void OnRegisterType (ObjCType type) return; } + if (!computed_class_count && type.RegisterAttribute?.IsStubClass == true) { + // Asking Objective-C for the total number of registered Objective-C classes will also realize any stub (unrealized) Objective-C classes. + Class.GetClassCount (); + // We only need to do this once. + computed_class_count = true; + } + /*FIXME try to guess the name of the missing library - quite trivial for monotouch.dll*/ // types decorated with [Model] attribute are not registered (see registrar.cs and regression from #769) if (type.IsWrapper && !type.IsModel) { diff --git a/src/ObjCRuntime/ExceptionMode.cs b/src/ObjCRuntime/ExceptionMode.cs index 579e63518508..e87d1663125a 100644 --- a/src/ObjCRuntime/ExceptionMode.cs +++ b/src/ObjCRuntime/ExceptionMode.cs @@ -10,20 +10,69 @@ namespace ObjCRuntime { /* This enum must always match the identical enum in runtime/xamarin/main.h */ + + /// This enum is used to specify what to do when an Objective-C exception is thrown, and that exception reaches managed code. + /// Exception marshaling public enum MarshalObjectiveCExceptionMode { + /// The default mode. + /// This is currently the same as . Default = 0, - UnwindManagedCode = 1, // not available for watchOS/COOP, default for the other platforms - ThrowManagedException = 2, // default for watchOS/COOP + + /// Let the Objective-C runtime unwind managed frames. + /// + /// This option is not recommended, because it leads to undefined behavior (the app may crash, leak memory, deadlock, etc.) + /// if Objective-C exceptions are thrown (the Objective-C runtime does not know how to unwind managed frames, so anything + /// can happen). The recommended option is . + /// + UnwindManagedCode = 1, + + /// Convert the Objective-C exception to a managed exception. + /// This is the recommended option (and also the default behavior). + ThrowManagedException = 2, + + /// Abort when an Objective-C exception reaches managed code. + /// This may be useful during debugging to easily detect when Objective-C exceptions are thrown. Abort = 3, + + /// Disable marshalling Objective-C exceptions. + /// This is effectively the same as , except that no events will be raised. Disable = 4, // this will also prevent the corresponding event from working } /* This enum must always match the identical enum in runtime/xamarin/main.h */ + + /// This enum is used to specify what to do when an managed exception is thrown, and that exception reaches native code. + /// Exception marshaling public enum MarshalManagedExceptionMode { + /// The default mode. + /// This is currently the same as . Default = 0, - UnwindNativeCode = 1, // not available for watchOS/COOP, default for the other platforms - ThrowObjectiveCException = 2, // default for watchOS/COOP + + /// Let the runtime unwind native frames. + /// + /// + /// This option is only available when using the MonoVM runtime, not when using CoreCLR runtime. The CoreCLR runtime does + /// not support unwinding native frames, and will just abort the process instead. The CoreCLR runtime is used in a macOS + /// (not Mac Catalyst) app, or when using NativeAOT. + /// + /// + /// This option is not recommended, because it leads to undefined behavior (the app may crash, leak memory, deadlock, etc.) + /// if managed exceptions reaches native code (the MonoVM runtime does not know how to unwind native frames, so anything can + /// happen). The recommended option is . + /// + /// + UnwindNativeCode = 1, + + /// Convert the managed exception to an Objective-C exception. + /// This is the recommended option (and also the default behavior). + ThrowObjectiveCException = 2, + + /// Abort when a managed exception reaches native code. + /// This may be useful during debugging to easily detect when managed exceptions reaches native code. Abort = 3, + + /// Disable marshalling managed exceptions. + /// This is effectively the same as , except that no events will be raised. Disable = 4, // this will also prevent the corresponding event from working } } diff --git a/src/ObjCRuntime/Exceptions.cs b/src/ObjCRuntime/Exceptions.cs index 0566f361f01f..1830146f72f2 100644 --- a/src/ObjCRuntime/Exceptions.cs +++ b/src/ObjCRuntime/Exceptions.cs @@ -9,21 +9,74 @@ using System; using Foundation; -// Disable until we get around to enable + fix any issues. -#nullable disable +#nullable enable namespace ObjCRuntime { + + /// The event delegate for the event. + /// Always null. + /// The exception data for the Objective-C exception. + /// Exception marshaling public delegate void MarshalObjectiveCExceptionHandler (object sender, MarshalObjectiveCExceptionEventArgs args); + /// The event args for the event. + /// Exception marshaling public class MarshalObjectiveCExceptionEventArgs { +#if !XAMCORE_5_0 + /// Creates a new instance. +#pragma warning disable CS8618 // Non-nullable property 'Exception' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. + public MarshalObjectiveCExceptionEventArgs () { } +#pragma warning restore CS8618 +#endif + + /// The value for this instance. + /// The value for this instance. + public MarshalObjectiveCExceptionEventArgs (NSException exception, MarshalObjectiveCExceptionMode mode) + { + Exception = exception; + ExceptionMode = mode; + } + + /// The Objective-C exception that must be marshalled. + /// The Objective-C exception that must be marshalled. public NSException Exception { get; set; } + + /// Specify how to marshal the Objective-C exception. + /// A value that specifies how to marshal the Objective-C exception. public MarshalObjectiveCExceptionMode ExceptionMode { get; set; } } + /// The event delegate for the event. + /// Always null. + /// The exception data for the managed exception. + /// Exception marshaling public delegate void MarshalManagedExceptionHandler (object sender, MarshalManagedExceptionEventArgs args); + /// The event args for the event. + /// Exception marshaling public class MarshalManagedExceptionEventArgs { +#if !XAMCORE_5_0 + /// Creates a new instance. +#pragma warning disable CS8618 // Non-nullable property 'Exception' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. + public MarshalManagedExceptionEventArgs () { } +#pragma warning restore CS8618 +#endif + + /// Creates a new instance. + /// The value for this instance. + /// The value for this instance. + public MarshalManagedExceptionEventArgs (Exception exception, MarshalManagedExceptionMode mode) + { + Exception = exception; + ExceptionMode = mode; + } + + /// The managed exception that must be marshalled. + /// The managed exception that must be marshalled. public Exception Exception { get; set; } + + /// Specify how to marshal the managed exception. + /// A value that specifies how to marshal the Objective-C exception. public MarshalManagedExceptionMode ExceptionMode { get; set; } } } diff --git a/src/ObjCRuntime/ObsoleteConstants.cs b/src/ObjCRuntime/ObsoleteConstants.cs index bf89b55a044c..9747118a0a90 100644 --- a/src/ObjCRuntime/ObsoleteConstants.cs +++ b/src/ObjCRuntime/ObsoleteConstants.cs @@ -18,26 +18,18 @@ partial class Constants { internal const string UseNetworkInstead = "Use 'Network.framework' instead."; - internal const string WatchKitRemoved = "The WatchKit framework has been removed from iOS."; - internal const string UnavailableOniOS = "This type is not available on iOS."; internal const string UnavailableOnWatchOS = "This type is not available on watchOS."; internal const string MacOS32bitsUnavailable = "This framework is not available on 64bits macOS versions."; - internal const string iAdRemoved = "The iAd framework has been removed from iOS."; - internal const string UnavailableOnMacOS = "This type is not available on macOS."; internal const string UnavailableOnThisPlatform = "This type is not available on this Platform."; - internal const string RemovedFromChip = "This API has been removed from the 'CHIP' framework."; - internal const string TypeUnavailable = "This type has been removed from the current platform."; - internal const string ChipRemoved = "The CHIP framework has been removed from iOS."; - internal const string ApiRemovedGeneral = "This API has been removed from the framework."; internal const string RemovedFromHomeKit = "This API has been removed from the 'HomeKit' framework."; diff --git a/src/ObjCRuntime/PlatformAvailability.cs b/src/ObjCRuntime/PlatformAvailability.cs index 3322154bdb39..41887c7773b8 100644 --- a/src/ObjCRuntime/PlatformAvailability.cs +++ b/src/ObjCRuntime/PlatformAvailability.cs @@ -239,10 +239,6 @@ public static Platform GetHostApiPlatform () (NSString)plist ["ProductName"], (NSString)plist ["ProductVersion"]) ).Value; -#elif WATCH - hostApiPlatform = null; - Console.WriteLine ("PlatformHelper.GetHostApiPlatform () not implemented for WatchOS."); - throw new NotImplementedException (); #else return (hostApiPlatform = ParseApiPlatform ( UIDevice.CurrentDevice.SystemName, @@ -282,7 +278,7 @@ public static Platform ParseApiPlatform (string productName, string productVersi return platform; } -#if !COREBUILD && !WATCH && !NET +#if !COREBUILD && !NET #if MONOMAC const int sys1 = 1937339185; const int sys2 = 1937339186; @@ -511,6 +507,7 @@ public override string ToString () } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] #if !COREBUILD [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")] #endif @@ -541,6 +538,7 @@ public iOSAttribute (byte major, byte minor, byte subminor, bool onlyOn64) } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] #if !COREBUILD [Obsolete ("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")] #endif diff --git a/src/ObjCRuntime/PlatformAvailability2.cs b/src/ObjCRuntime/PlatformAvailability2.cs index a021b458aea5..02f5162468e4 100644 --- a/src/ObjCRuntime/PlatformAvailability2.cs +++ b/src/ObjCRuntime/PlatformAvailability2.cs @@ -202,6 +202,7 @@ public UnavailableAttribute (PlatformName platform, } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class TVAttribute : IntroducedAttribute { public TVAttribute (byte major, byte minor) : base (PlatformName.TvOS, (int) major, (int) minor) @@ -226,6 +227,7 @@ public TVAttribute (byte major, byte minor, byte subminor, bool onlyOn64) } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class WatchAttribute : IntroducedAttribute { public WatchAttribute (byte major, byte minor) : base (PlatformName.WatchOS, (int) major, (int) minor) @@ -250,6 +252,7 @@ public WatchAttribute (byte major, byte minor, byte subminor, bool onlyOn64) } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class MacCatalystAttribute : IntroducedAttribute { public MacCatalystAttribute (byte major, byte minor) : base (PlatformName.MacCatalyst, (int) major, (int) minor) @@ -262,6 +265,7 @@ public MacCatalystAttribute (byte major, byte minor, byte subminor) } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoMacAttribute : UnavailableAttribute { public NoMacAttribute () : base (PlatformName.MacOSX) @@ -269,6 +273,7 @@ public NoMacAttribute () } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoiOSAttribute : UnavailableAttribute { public NoiOSAttribute () : base (PlatformName.iOS) @@ -276,6 +281,7 @@ public NoiOSAttribute () } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoWatchAttribute : UnavailableAttribute { public NoWatchAttribute () : base (PlatformName.WatchOS) @@ -283,6 +289,7 @@ public NoWatchAttribute () } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoTVAttribute : UnavailableAttribute { public NoTVAttribute () : base (PlatformName.TvOS) @@ -290,6 +297,7 @@ public NoTVAttribute () } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoMacCatalystAttribute : UnavailableAttribute { public NoMacCatalystAttribute () : base (PlatformName.MacCatalyst) diff --git a/src/ObjCRuntime/PlatformAvailabilityShadow.cs b/src/ObjCRuntime/PlatformAvailabilityShadow.cs index 1ccf6df64ed2..2724d3d61905 100644 --- a/src/ObjCRuntime/PlatformAvailabilityShadow.cs +++ b/src/ObjCRuntime/PlatformAvailabilityShadow.cs @@ -5,6 +5,7 @@ // These _must_ be in a less nested namespace than the copies they are shadowing in PlatformAvailability.cs // Since those are in ObjcRuntime these must be global +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] #if COREBUILD public #endif @@ -44,6 +45,7 @@ public MacAttribute (byte major, byte minor, byte subminor, PlatformArchitecture { } } +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] #if COREBUILD public #endif diff --git a/src/ObjCRuntime/Registrar.cs b/src/ObjCRuntime/Registrar.cs index 4c9fc91d0874..18a9163515dd 100644 --- a/src/ObjCRuntime/Registrar.cs +++ b/src/ObjCRuntime/Registrar.cs @@ -882,13 +882,7 @@ public Trampoline Trampoline { #else var mi = (System.Reflection.MethodInfo) Method; bool is_stret; -#if __WATCHOS__ - if (Runtime.Arch == Arch.DEVICE) { - is_stret = Stret.ArmNeedStret (NativeReturnType, null); - } else { - is_stret = IntPtr.Size == 4 ? Stret.X86NeedStret (NativeReturnType, null) : Stret.X86_64NeedStret (NativeReturnType, null); - } -#elif MONOMAC || __MACCATALYST__ +#if MONOMAC || __MACCATALYST__ if (Runtime.IsARM64CallingConvention) { is_stret = false; } else { @@ -1360,12 +1354,6 @@ internal string AssemblyName { #else internal const string AssemblyName = "Xamarin.Mac"; #endif -#elif WATCH -#if NET - internal const string AssemblyName = "Microsoft.watchOS"; -#else - internal const string AssemblyName = "Xamarin.WatchOS"; -#endif #elif TVOS #if NET internal const string AssemblyName = "Microsoft.tvOS"; diff --git a/src/ObjCRuntime/RegistrarHelper.cs b/src/ObjCRuntime/RegistrarHelper.cs index a790af23ec24..f5ba5b46b689 100644 --- a/src/ObjCRuntime/RegistrarHelper.cs +++ b/src/ObjCRuntime/RegistrarHelper.cs @@ -58,7 +58,9 @@ public MapInfo (IManagedRegistrar registrar) static RuntimeTypeHandleEqualityComparer RuntimeTypeHandleEqualityComparer; #pragma warning restore 8618 +#pragma warning disable CA2255 // The 'ModuleInitializer' attribute is only intended to be used in application code or advanced source generator scenarios [ModuleInitializer] +#pragma warning restore CA2255 internal static void Initialize () { StringEqualityComparer = new StringEqualityComparer (); @@ -102,6 +104,25 @@ static MapInfo GetMapEntry (string assemblyName) { if (TryGetMapEntry (assemblyName, out var rv)) return rv; + +#if TRACE + Runtime.NSLog ($"RegistrarHelper.GetMapEntry ({assemblyName}) => failed to find entry, will ensure module constructors are called for all loaded assemblies."); +#endif + // An assembly is only registered if we've (tried to) execute code from it, which is not guaranteed to + // happen before we get here (in particular for app extensions, which don't have a managed Main method). + // So here we loop over all the assemblies in the current domain, make sure the module constructor + // has been called for all of them, and then we try again. + var assemblies = AppDomain.CurrentDomain.GetAssemblies (); + foreach (var asm in assemblies) + RuntimeHelpers.RunModuleConstructor (asm.ManifestModule.ModuleHandle); + + if (TryGetMapEntry (assemblyName, out rv)) + return rv; + +#if TRACE + Runtime.NSLog ($"RegistrarHelper.GetMapEntry ({assemblyName}) => failed to find entry for the second time."); +#endif + throw ErrorHelper.CreateError (8055, Errors.MX8055 /* Could not find the type 'ObjCRuntime.__Registrar__' in the assembly '{0}' */, assemblyName); } diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs index c5526b40c7d3..66aedf65af84 100644 --- a/src/ObjCRuntime/Runtime.cs +++ b/src/ObjCRuntime/Runtime.cs @@ -85,8 +85,6 @@ internal unsafe struct MTRegistrationMap { #if __TVOS__ internal const string PlatformName = "tvOS"; -#elif __WATCHOS__ - internal const string PlatformName = "watchOS"; #elif __MACCATALYST__ internal const string PlatformName = "Mac Catalyst"; #elif __IOS__ @@ -486,10 +484,10 @@ static MarshalObjectiveCExceptionMode OnMarshalObjectiveCException (IntPtr excep if (MarshalObjectiveCException is not null) { var exception = GetNSObject (exception_handle); - var args = new MarshalObjectiveCExceptionEventArgs () { - Exception = exception, - ExceptionMode = (throwManagedAsDefault != 0) ? MarshalObjectiveCExceptionMode.ThrowManagedException : objc_exception_mode, - }; + var args = new MarshalObjectiveCExceptionEventArgs ( + exception, + (throwManagedAsDefault != 0) ? MarshalObjectiveCExceptionMode.ThrowManagedException : objc_exception_mode + ); MarshalObjectiveCException (null, args); return args.ExceptionMode; @@ -501,10 +499,7 @@ static MarshalManagedExceptionMode OnMarshalManagedException (IntPtr exception_h { if (MarshalManagedException is not null) { var exception = GCHandle.FromIntPtr (exception_handle).Target as Exception; - var args = new MarshalManagedExceptionEventArgs () { - Exception = exception, - ExceptionMode = managed_exception_mode, - }; + var args = new MarshalManagedExceptionEventArgs (exception, managed_exception_mode); MarshalManagedException (null, args); return args.ExceptionMode; } diff --git a/src/ObjCRuntime/Runtime.iOS.cs b/src/ObjCRuntime/Runtime.iOS.cs index 4e50f4be3619..5c0c8ee20c94 100644 --- a/src/ObjCRuntime/Runtime.iOS.cs +++ b/src/ObjCRuntime/Runtime.iOS.cs @@ -22,18 +22,14 @@ namespace ObjCRuntime { public static partial class Runtime { #if !COREBUILD #if NET -#if WATCH - internal const string ProductName = "Microsoft.watchOS"; -#elif TVOS +#if TVOS internal const string ProductName = "Microsoft.tvOS"; #elif IOS internal const string ProductName = "Microsoft.iOS"; #else #error Unknown platform #endif -#if WATCH - internal const string AssemblyName = "Microsoft.watchOS.dll"; -#elif TVOS +#if TVOS internal const string AssemblyName = "Microsoft.tvOS.dll"; #elif IOS internal const string AssemblyName = "Microsoft.iOS.dll"; @@ -41,18 +37,14 @@ public static partial class Runtime { #error Unknown platform #endif #else -#if WATCH - internal const string ProductName = "Xamarin.Watch"; -#elif TVOS +#if TVOS internal const string ProductName = "Xamarin.TVOS"; #elif IOS internal const string ProductName = "Xamarin.iOS"; #else #error Unknown platform #endif -#if WATCH - internal const string AssemblyName = "Xamarin.Watch.dll"; -#elif TVOS +#if TVOS internal const string AssemblyName = "Xamarin.TVOS.dll"; #elif IOS internal const string AssemblyName = "Xamarin.iOS.dll"; @@ -111,7 +103,7 @@ static public List GetSurfacedObjects () } #endif -#if TVOS || WATCH || __MACCATALYST__ +#if TVOS || __MACCATALYST__ [Advice ("This method is present only to help porting code.")] public static void StartWWAN (Uri uri, Action callback) { @@ -160,7 +152,7 @@ public static void StartWWAN (Uri uri) using var uriPtr = new TransientString (uri.ToString ()); xamarin_start_wwan (uriPtr); } -#endif // !TVOS && !WATCH +#endif // !TVOS #endif // !COREBUILD } diff --git a/src/ObjCRuntime/RuntimeOptions.cs b/src/ObjCRuntime/RuntimeOptions.cs index a010735a77c7..2801214c03d8 100644 --- a/src/ObjCRuntime/RuntimeOptions.cs +++ b/src/ObjCRuntime/RuntimeOptions.cs @@ -191,10 +191,6 @@ internal static HttpMessageHandler GetHttpMessageHandler () Runtime.NSLog ($"{handler_name} is not a valid HttpMessageHandler, defaulting to System.Net.Http.NSUrlSessionHandlerValue"); return new NSUrlSessionHandler (); } -#elif __WATCHOS__ - if (handler_name is not null && handler_name != NSUrlSessionHandlerValue) - Runtime.NSLog ($"{handler_name} is not a valid HttpMessageHandler, defaulting to NSUrlSessionHandler"); - return new NSUrlSessionHandler (); #else switch (handler_name) { case CFNetworkHandlerValue: diff --git a/src/ObjCRuntime/Stret.cs b/src/ObjCRuntime/Stret.cs index 14cc5c52b187..53e52767cfbc 100644 --- a/src/ObjCRuntime/Stret.cs +++ b/src/ObjCRuntime/Stret.cs @@ -78,7 +78,7 @@ static bool IsHomogeneousAggregate_Armv7k (List fieldTypes, Generator gene return true; } -#if __WATCHOS__ || BGENERATOR +#if BGENERATOR public static bool ArmNeedStret (Type returnType, Generator generator) { bool has32bitArm; @@ -103,8 +103,6 @@ public static bool ArmNeedStret (Type returnType, Generator generator) bool isWatchOS; #if BGENERATOR isWatchOS = generator.CurrentPlatform == PlatformName.WatchOS; -#elif __WATCHOS__ - isWatchOS = true; #else isWatchOS = false; #endif @@ -152,9 +150,9 @@ public static bool ArmNeedStret (Type returnType, Generator generator) return true; } -#endif // __WATCHOS__ || BGENERATOR +#endif // BGENERATOR -#if __WATCHOS__ || BGENERATOR +#if BGENERATOR public static bool X86NeedStret (Type returnType, Generator generator) { Type t = returnType; @@ -173,7 +171,7 @@ public static bool X86NeedStret (Type returnType, Generator generator) return false; } -#endif // __WATCHOS__ || BGENERATOR +#endif // BGENERATOR public static bool X86_64NeedStret (Type returnType, Generator generator) { diff --git a/src/ObjCRuntime/SystemVersion.cs b/src/ObjCRuntime/SystemVersion.cs index a17113208d2f..14598deb0775 100644 --- a/src/ObjCRuntime/SystemVersion.cs +++ b/src/ObjCRuntime/SystemVersion.cs @@ -64,11 +64,6 @@ internal static bool CheckMacCatalyst (int major, int minor) { return UIKit.UIDevice.CurrentDevice.CheckSystemVersion (major, minor); } -#elif __WATCHOS__ - internal static bool CheckwatchOS (int major, int minor) - { - return WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (major, minor); - } #else #error Unknown platform #endif diff --git a/src/ObjCRuntime/Timespec.cs b/src/ObjCRuntime/Timespec.cs deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/PassKit/PKEnums.cs b/src/PassKit/PKEnums.cs index 5fdb62b887cb..cef26d1781ca 100644 --- a/src/PassKit/PKEnums.cs +++ b/src/PassKit/PKEnums.cs @@ -31,7 +31,7 @@ public enum PKPassKitErrorCode : long { InvalidData = 1, UnsupportedVersion, InvalidSignature, - NotEntitled + NotEntitled, } // NSInteger -> PKPassLibrary.h @@ -41,7 +41,7 @@ public enum PKPassKitErrorCode : long { public enum PKPassLibraryAddPassesStatus : long { DidAddPasses, ShouldReviewPasses, - DidCancelAddPasses + DidCancelAddPasses, } /// Enumeration of pass types (whether a pass is a barcode or presents a payment card). @@ -52,7 +52,6 @@ public enum PKPassType : ulong { SecureElement, [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElement' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElement' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SecureElement' instead.")] Payment = SecureElement, @@ -67,21 +66,18 @@ public enum PKPaymentAuthorizationStatus : long { Failure, [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentBillingAddressInvalidError'.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentBillingAddressInvalidError'.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentBillingAddressInvalidError'.")] InvalidBillingPostalAddress, [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentShippingAddressInvalidError'.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentShippingAddressInvalidError'.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentShippingAddressInvalidError'.")] InvalidShippingPostalAddress, [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentContactInvalidError'.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentContactInvalidError'.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Failure' and 'PKPaymentRequest.CreatePaymentContactInvalidError'.")] @@ -92,21 +88,24 @@ public enum PKPaymentAuthorizationStatus : long { [MacCatalyst (13, 1)] PinIncorrect, [MacCatalyst (13, 1)] - PinLockout + PinLockout, } /// Enumeration of valid states of a payment card. [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'PKSecureElementPassActivationState' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'PKSecureElementPassActivationState' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PKSecureElementPassActivationState' instead.")] [Native] public enum PKPaymentPassActivationState : ulong { - Activated, RequiresActivation, Activating, Suspended, Deactivated + Activated, + RequiresActivation, + Activating, + Suspended, + Deactivated, } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [Native] public enum PKSecureElementPassActivationState : long { @@ -125,14 +124,13 @@ public enum PKMerchantCapability : ulong { EMV = 1 << 1, Credit = 1 << 2, Debit = 1 << 3, - [iOS (17, 0), Mac (14, 0), Watch (10, 0), NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (14, 0), NoTV, MacCatalyst (17, 0)] InstantFundsOut = 1 << 7, } /// Holds address information for billing or shipping purposes. [NoMac] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'PKContactField' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'PKContactField' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PKContactField' instead.")] [Native] @@ -144,11 +142,10 @@ public enum PKAddressField : ulong { Email = 1 << 2, [MacCatalyst (13, 1)] Name = 1 << 3, - All = PostalAddress | Phone | Email | Name + All = PostalAddress | Phone | Email | Name, } /// Enumerates available styles for objects. - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum PKPaymentButtonStyle : long { @@ -161,7 +158,6 @@ public enum PKPaymentButtonStyle : long { } /// Enumerates the types of objects. - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum PKPaymentButtonType : long { @@ -210,7 +206,7 @@ public enum PKPaymentButtonType : long { [iOS (14, 0)] [MacCatalyst (14, 0)] Tip = 15, - [iOS (15, 0), Watch (8, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] Continue = 16, #if !NET @@ -232,18 +228,16 @@ public enum PKShippingType : ulong { } /// Enumerates error codes relating to PassKit operations. - [Watch (6, 0)] [MacCatalyst (13, 1)] [Native] public enum PKAddPaymentPassError : long { Unsupported, UserCancelled, - SystemCancelled + SystemCancelled, } /// Enumerates results that are used in calls to . [Mac (11, 0)] - [Watch (10, 2)] [MacCatalyst (13, 1)] [Native] public enum PKAutomaticPassPresentationSuppressionResult : ulong { @@ -251,7 +245,7 @@ public enum PKAutomaticPassPresentationSuppressionResult : ulong { AlreadyPresenting, Denied, Cancelled, - Success + Success, } /// Enumerates the types of cards available to Apple Pay. @@ -271,17 +265,16 @@ public enum PKPaymentMethodType : ulong { [Native] public enum PKPaymentSummaryItemType : ulong { Final, - Pending + Pending, } /// Enumerates Pass Button styles. - [NoWatch] [NoMac] // under `#if TARGET_OS_IOS` [MacCatalyst (13, 1)] [Native] public enum PKAddPassButtonStyle : long { Black = 0, - Outline + Outline, } /// Enumerates error conditions for payment operations. @@ -297,7 +290,6 @@ public enum PKPaymentErrorCode : long { CouponCodeExpired, } - [NoWatch] // https://feedbackassistant.apple.com/feedback/6301809 https://github.com/xamarin/maccore/issues/1819 [MacCatalyst (13, 1)] [Native] public enum PKAddPaymentPassStyle : ulong { @@ -305,7 +297,7 @@ public enum PKAddPaymentPassStyle : ulong { Access, } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [ErrorDomain ("PKAddSecureElementPassErrorDomain")] [Native] @@ -315,7 +307,6 @@ public enum PKAddSecureElementPassErrorCode : long { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'GenericError' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'GenericError' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'GenericError' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'GenericError' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'GenericError' instead.")] UnknownError = GenericError, #endif @@ -327,7 +318,7 @@ public enum PKAddSecureElementPassErrorCode : long { OSVersionNotSupportedError, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum PKIdentityButtonLabel : long { VerifyIdentity = 0, @@ -336,14 +327,14 @@ public enum PKIdentityButtonLabel : long { Continue, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum PKIdentityButtonStyle : long { Black = 0, Outline, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] [ErrorDomain ("PKIdentityErrorDomain")] public enum PKIdentityError : long { @@ -358,7 +349,7 @@ public enum PKIdentityError : long { RegionNotSupported = 8, } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Native] [ErrorDomain ("PKShareSecureElementPassErrorDomain")] public enum PKShareSecureElementPassErrorCode : long { @@ -366,7 +357,7 @@ public enum PKShareSecureElementPassErrorCode : long { SetupError, } - [iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV, NoMac] + [iOS (16, 0), MacCatalyst (16, 0), NoTV, NoMac] [Native] public enum PKShareSecureElementPassResult : long { Canceled, @@ -374,7 +365,7 @@ public enum PKShareSecureElementPassResult : long { Failed, } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Native] public enum PKVehicleConnectionErrorCode : long { Unknown = 0, @@ -382,7 +373,7 @@ public enum PKVehicleConnectionErrorCode : long { SessionNotActive, } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Native] public enum PKVehicleConnectionSessionConnectionState : long { Disconnected = 0, @@ -391,7 +382,7 @@ public enum PKVehicleConnectionSessionConnectionState : long { FailedToConnect, } - [iOS (17, 0), Mac (14, 0), Watch (10, 0), TV (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), Mac (14, 0), TV (17, 0), MacCatalyst (17, 0)] [Native] public enum PKApplePayLaterAvailability : long { Available, @@ -399,7 +390,7 @@ public enum PKApplePayLaterAvailability : long { UnavailableRecurringTransaction, } - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] [ErrorDomain ("PKDisbursementErrorDomain")] public enum PKDisbursementErrorCode : long { @@ -408,14 +399,14 @@ public enum PKDisbursementErrorCode : long { RecipientContactInvalidError, } - [NoWatch, NoTV, NoMac, iOS (17, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (17, 0), NoMacCatalyst] [Native] public enum PKPayLaterAction : long { LearnMore = 0, Calculator, } - [NoWatch, NoTV, NoMac, iOS (17, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (17, 0), NoMacCatalyst] [Native] public enum PKPayLaterDisplayStyle : long { Standard = 0, @@ -426,7 +417,7 @@ public enum PKPayLaterDisplayStyle : long { [Static] [Internal] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] interface PKMerchantCategoryCodeValues { [Field ("PKMerchantCategoryCodeNone")] short None { get; } diff --git a/src/PassKit/PKJapanIndividualNumberCardMetadata.cs b/src/PassKit/PKJapanIndividualNumberCardMetadata.cs index c38a9dabe384..d7bf19a8495a 100644 --- a/src/PassKit/PKJapanIndividualNumberCardMetadata.cs +++ b/src/PassKit/PKJapanIndividualNumberCardMetadata.cs @@ -1,7 +1,5 @@ #nullable enable -#if !WATCH - using System; using Foundation; using ObjCRuntime; @@ -33,4 +31,3 @@ public PKJapanIndividualNumberCardMetadata (string credentialIdentifier, string } } } -#endif // !WATCH diff --git a/src/PassKit/PKMerchantCategoryCode.cs b/src/PassKit/PKMerchantCategoryCode.cs index f00df4711c37..942f899677cd 100644 --- a/src/PassKit/PKMerchantCategoryCode.cs +++ b/src/PassKit/PKMerchantCategoryCode.cs @@ -30,7 +30,7 @@ namespace PassKit { [SupportedOSPlatform ("maccatalyst18.0")] [UnsupportedOSPlatform ("tvos")] #else - [Mac (15, 0), iOS (18, 0), NoTV, MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), NoTV, MacCatalyst (18, 0)] #endif public struct PKMerchantCategoryCode { short value; diff --git a/src/PhotosUI/PHEnums.cs b/src/PhotosUI/PHEnums.cs index 55e5f0c9ebf7..8753917b1c49 100644 --- a/src/PhotosUI/PHEnums.cs +++ b/src/PhotosUI/PHEnums.cs @@ -34,7 +34,6 @@ public enum PHLivePhotoBadgeOptions : ulong { #endif [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] public enum PHProjectCategory { [Field ("PHProjectCategoryBook")] @@ -56,7 +55,7 @@ public enum PHProjectCategory { Undefined, } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [Mac (13, 0)] [MacCatalyst (14, 0)] @@ -67,14 +66,14 @@ public enum PHPickerConfigurationAssetRepresentationMode : long { Compatible = 2, } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum PHPickerMode : long { Default = 0, Compact = 1, } - [Flags, NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Flags, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum PHPickerCapabilities : ulong { None = 0, diff --git a/src/PrintCore/Defs.cs b/src/PrintCore/Defs.cs index c14047cec7d1..d221d05f3117 100644 --- a/src/PrintCore/Defs.cs +++ b/src/PrintCore/Defs.cs @@ -17,7 +17,6 @@ using Foundation; using PMObject = System.IntPtr; -using OSStatus = System.Int32; using System.Runtime.Versioning; namespace PrintCore { diff --git a/src/PrintCore/PrintCore.cs b/src/PrintCore/PrintCore.cs index 722abd682853..3be56d5fa2f6 100644 --- a/src/PrintCore/PrintCore.cs +++ b/src/PrintCore/PrintCore.cs @@ -21,7 +21,6 @@ using CoreGraphics; using CoreFoundation; using PMObject = System.IntPtr; -using OSStatus = System.Int32; #if !NET using NativeHandle = System.IntPtr; diff --git a/src/QTKit/QTCompat.cs b/src/QTKit/QTCompat.cs deleted file mode 100644 index 6d3cfd3a37f5..000000000000 --- a/src/QTKit/QTCompat.cs +++ /dev/null @@ -1,3498 +0,0 @@ -// autogenerated stub - do not edit -#if !NET -using System; - -#pragma warning disable 0067 - -namespace QTKit { - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureConnection : Foundation.NSObject { - public Foundation.NSObject GetAttribute (System.String attributeKey) - { - return default (Foundation.NSObject); - } - - public void SetAttribute (Foundation.NSObject attribute, System.String key) - { - } - - public QTCaptureConnection () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureConnection (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureConnection (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual Foundation.NSObject GetAttribute (Foundation.NSString attributeKey) - { - return default (Foundation.NSObject); - } - - public virtual System.Boolean IsAttributeReadOnly (System.String attributeKey) - { - return default (System.Boolean); - } - - public virtual void SetAttribute (Foundation.NSObject attribute, Foundation.NSString key) - { - } - - public QTKit.QTMediaType MediaTypeValue { - get { return default (QTKit.QTMediaType); } - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual Foundation.NSDictionary ConnectionAttributes { - get { return default (Foundation.NSDictionary); } - set { } - } - - public virtual System.Boolean Enabled { - get { return default (System.Boolean); } - set { } - } - - public virtual QTKit.QTFormatDescription FormatDescription { - get { return default (QTKit.QTFormatDescription); } - } - - public virtual System.String MediaType { - get { return default (System.String); } - } - - public virtual Foundation.NSObject Owner { - get { return default (Foundation.NSObject); } - } - - public static Foundation.NSString AttributeDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AttributeWillChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AudioAveragePowerLevelsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AudioMasterVolumeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AudioPeakHoldLevelsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AudioVolumesAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ChangedAttributeKey { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString EnabledAudioChannelsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FormatDescriptionDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FormatDescriptionWillChangeNotification { - get { return default (Foundation.NSString); } - } - - public static class Notifications : System.Object { - public static Foundation.NSObject ObserveAttributeDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveAttributeDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveAttributeWillChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveAttributeWillChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionWillChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionWillChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureDevice : Foundation.NSObject, Foundation.INSCoding, ObjCRuntime.INativeObject, System.IDisposable { - public static QTKit.QTCaptureDevice [] GetInputDevices (QTKit.QTMediaType mediaType) - { - return default (QTKit.QTCaptureDevice []); - } - - public static QTKit.QTCaptureDevice GetDefaultInputDevice (QTKit.QTMediaType mediaType) - { - return default (QTKit.QTCaptureDevice); - } - - public System.Boolean HasMediaType (QTKit.QTMediaType mediaType) - { - return default (System.Boolean); - } - - public QTCaptureDevice (Foundation.NSCoder coder) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureDevice (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureDevice (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void Close () - { - } - - public virtual void EncodeTo (Foundation.NSCoder encoder) - { - } - - public static QTKit.QTCaptureDevice FromUniqueID (System.String deviceUniqueID) - { - return default (QTKit.QTCaptureDevice); - } - - public virtual Foundation.NSObject GetAttribute (System.String attributeKey) - { - return default (Foundation.NSObject); - } - - public virtual System.Boolean IsAttributeReadOnly (System.String attributeKey) - { - return default (System.Boolean); - } - - public virtual System.Boolean Open (out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.Boolean); - } - - public virtual void SetAttribute (Foundation.NSObject attribute, System.String attributeKey) - { - } - - internal QTCaptureDevice () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public System.Boolean IsAvcTransportControlReadOnly { - get { return default (System.Boolean); } - } - - public QTKit.QTCaptureDeviceTransportControl AvcTransportControl { - get { return default (QTKit.QTCaptureDeviceTransportControl); } - set { } - } - - public System.Boolean IsSuspended { - get { return default (System.Boolean); } - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual Foundation.NSDictionary DeviceAttributes { - get { return default (Foundation.NSDictionary); } - set { } - } - - public virtual QTKit.QTFormatDescription [] FormatDescriptions { - get { return default (QTKit.QTFormatDescription []); } - } - - public static QTKit.QTCaptureDevice [] InputDevices { - get { return default (QTKit.QTCaptureDevice []); } - } - - public virtual System.Boolean IsConnected { - get { return default (System.Boolean); } - } - - public virtual System.Boolean IsInUseByAnotherApplication { - get { return default (System.Boolean); } - } - - public virtual System.Boolean IsOpen { - get { return default (System.Boolean); } - } - - public virtual System.String LocalizedDisplayName { - get { return default (System.String); } - } - - public virtual System.String ModelUniqueID { - get { return default (System.String); } - } - - public virtual System.String UniqueID { - get { return default (System.String); } - } - - public static Foundation.NSString AVCTransportControlsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AVCTransportControlsPlaybackModeKey { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AVCTransportControlsSpeedKey { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AttributeDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AttributeWillChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AvailableInputSourcesAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ChangedAttributeKey { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FormatDescriptionsDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FormatDescriptionsWillChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString InputSourceIdentifierAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString InputSourceIdentifierKey { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString InputSourceLocalizedDisplayNameKey { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LegacySequenceGrabberAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LinkedDevicesAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString SuspendedAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString WasConnectedNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString WasDisconnectedNotification { - get { return default (Foundation.NSString); } - } - - public static class Notifications : System.Object { - public static Foundation.NSObject ObserveAttributeDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveAttributeDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveAttributeWillChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveAttributeWillChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionsDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionsDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionsWillChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveFormatDescriptionsWillChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveWasConnected (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveWasConnected (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveWasDisconnected (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveWasDisconnected (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureDeviceTransportControl : System.Object { - public QTCaptureDeviceTransportControl () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTKit.QTCaptureDeviceControlsSpeed? Speed { - get { return default (System.Nullable); } - set { } - } - - public QTKit.QTCaptureDevicePlaybackMode? PlaybackMode { - get { return default (System.Nullable); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCompressionOptions : Foundation.NSObject { - public System.String [] GetCompressionOptionsIdentifiers (QTKit.QTMediaType forMediaType) - { - return default (System.String []); - } - - public QTCompressionOptions () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCompressionOptions (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCompressionOptions (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public static Foundation.NSObject FromIdentifier (System.String identifier) - { - return default (Foundation.NSObject); - } - - public static System.String [] GetCompressionOptionsIdentifiers (System.String forMediaType) - { - return default (System.String []); - } - - public virtual System.Boolean IsEqualToCompressionOptions (QTKit.QTCompressionOptions compressionOptions) - { - return default (System.Boolean); - } - - public QTKit.QTMediaType MediaTypeValue { - get { return default (QTKit.QTMediaType); } - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual System.String LocalizedCompressionOptionsSummary { - get { return default (System.String); } - } - - public virtual System.String LocalizedDisplayName { - get { return default (System.String); } - } - - public virtual System.String MediaType { - get { return default (System.String); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTFormatDescription : Foundation.NSObject { - public QTFormatDescription () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTFormatDescription (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTFormatDescription (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual Foundation.NSObject AttributeForKey (System.String key) - { - return default (Foundation.NSObject); - } - - public virtual System.Boolean IsEqualToFormatDescription (QTKit.QTFormatDescription formatDescription) - { - return default (System.Boolean); - } - - public QTKit.QTMediaType MediaTypeValue { - get { return default (QTKit.QTMediaType); } - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual Foundation.NSDictionary FormatDescriptionAttributes { - get { return default (Foundation.NSDictionary); } - } - - public virtual System.UInt32 FormatType { - get { return default (System.UInt32); } - } - - public virtual System.String LocalizedFormatSummary { - get { return default (System.String); } - } - - public virtual System.String MediaType { - get { return default (System.String); } - } - - public virtual Foundation.NSData QuickTimeSampleDescription { - get { return default (Foundation.NSData); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTMedia : Foundation.NSObject { - public QTMedia () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTMedia (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTMedia (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual System.IntPtr Conditions (System.IntPtr quicktimeMedia, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.IntPtr); - } - - public System.IntPtr Constructors (System.IntPtr quicktimeMedia, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.IntPtr); - } - - public static Foundation.NSObject FromQuickTimeMedia (System.IntPtr quicktimeMedia, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (Foundation.NSObject); - } - - public virtual Foundation.NSObject GetAttribute (System.String attributeKey) - { - return default (Foundation.NSObject); - } - - public virtual System.Boolean HasCharacteristic (System.String characteristic) - { - return default (System.Boolean); - } - - public virtual void SetAttribute (Foundation.NSObject value, System.String attributeKey) - { - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual Foundation.NSDictionary MediaAttributes { - get { return default (Foundation.NSDictionary); } - set { } - } - - public virtual System.IntPtr QuickTimeMedia { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTTrack Track { - get { return default (QTKit.QTTrack); } - } - - public static Foundation.NSString CharacteristicAudio { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicCanSendVideo { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicCanStep { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicHasNoDuration { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicHasSkinData { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicHasVideoFrameRate { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicNonLinear { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicProvidesActions { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicProvidesKeyFocus { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CharacteristicVisual { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CreationTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DurationAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ModificationTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString QualityAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString SampleCountAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString TimeScaleAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString TypeAttribute { - get { return default (Foundation.NSString); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public enum QTCodecQuality : System.Int32 { - Lossless = 1024, - Max = 1023, - Min = 0, - Low = 256, - Normal = 512, - High = 768, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTImageAttributes : System.Object { - public QTImageAttributes () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public Foundation.NSDictionary ToDictionary () - { - return default (Foundation.NSDictionary); - } - - public System.String CodecType { - get { return default (System.String); } - set { } - } - - public QTKit.QTCodecQuality? Quality { - get { return default (System.Nullable); } - set { } - } - - public System.Int32? TimeScale { - get { return default (System.Nullable); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTMovieSaveOptions : System.Object { - public QTMovieSaveOptions () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public Foundation.NSDictionary ToDictionary () - { - return default (Foundation.NSDictionary); - } - - public System.Boolean Flatten { - get { return default (System.Boolean); } - set { } - } - - public QTKit.QTFileType? ExportType { - get { return default (System.Nullable); } - set { } - } - - public Foundation.NSData ExportSettings { - get { return default (Foundation.NSData); } - set { } - } - - public System.Int32? ManufacturerCode { - get { return default (System.Nullable); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTTrack : Foundation.NSObject { - public void AddImage (AppKit.NSImage image, QTKit.QTTime forDuration, QTKit.QTImageAttributes attributes) - { - } - - public QTTrack () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTTrack (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTTrack (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTTrack (System.IntPtr quicktimeTrack, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void AddImage (AppKit.NSImage image, QTKit.QTTime forDuration, Foundation.NSDictionary attributes) - { - } - - public virtual CoreGraphics.CGSize ApertureModeDimensionsForMode (System.String mode) - { - return default (CoreGraphics.CGSize); - } - - public virtual void DeleteSegment (QTKit.QTTimeRange segment) - { - } - - public static Foundation.NSObject FromQuickTimeTrack (System.IntPtr quicktimeTrack, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (Foundation.NSObject); - } - - public virtual void GenerateApertureModeDimensions () - { - } - - public virtual Foundation.NSObject GetAttribute (System.String attributeKey) - { - return default (Foundation.NSObject); - } - - public virtual void InsertEmptySegment (QTKit.QTTimeRange range) - { - } - - public virtual void InsertSegmentOfTrack (QTKit.QTTrack track, QTKit.QTTimeRange timeRange, QTKit.QTTime atTime) - { - } - - public virtual void InsertSegmentOfTrack (QTKit.QTTrack track, QTKit.QTTimeRange fromRange, QTKit.QTTimeRange scaledToRange) - { - } - - public virtual void RemoveApertureModeDimensions () - { - } - - public virtual void ScaleSegmentnewDuration (QTKit.QTTimeRange segment, QTKit.QTTime newDuration) - { - } - - public virtual void SetApertureModeDimensionsforMode (CoreGraphics.CGSize dimensions, System.String mode) - { - } - - public virtual void SetAttribute (Foundation.NSObject value, System.String attributeKey) - { - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual System.Boolean Enabled { - get { return default (System.Boolean); } - set { } - } - - public virtual QTKit.QTMedia Media { - get { return default (QTKit.QTMedia); } - } - - public virtual QTKit.QTMovie Movie { - get { return default (QTKit.QTMovie); } - } - - public virtual System.IntPtr QuickTimeTrack { - get { return default (System.IntPtr); } - } - - public virtual Foundation.NSDictionary TrackAttributes { - get { return default (Foundation.NSDictionary); } - set { } - } - - public virtual System.Single Volume { - get { return default (System.Single); } - set { } - } - - public static Foundation.NSString BoundsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CreationTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DimensionsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DisplayNameAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString EnabledAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FormatSummaryAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString HasApertureModeDimensionsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString IDAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString IsChapterTrackAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LayerAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString MediaTypeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ModificationTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString RangeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString TimeScaleAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString UsageInMovieAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString UsageInPosterAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString UsageInPreviewAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString VolumeAttribute { - get { return default (Foundation.NSString); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTMovie : Foundation.NSObject, Foundation.INSCoding, ObjCRuntime.INativeObject, System.IDisposable, Foundation.INSCopying { - public System.Boolean SaveTo (System.String fileName, QTKit.QTMovieSaveOptions options, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.Boolean); - } - - public System.Boolean SaveTo (System.String fileName, QTKit.QTMovieSaveOptions options) - { - return default (System.Boolean); - } - - public void AddImage (AppKit.NSImage image, QTKit.QTTime forDuration, QTKit.QTImageAttributes attributes) - { - } - - public QTKit.QTTrack [] TracksOfMediaType (QTKit.QTMediaType mediaType) - { - return default (QTKit.QTTrack []); - } - - public QTMovie () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (Foundation.NSCoder coder) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTMovie (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTMovie (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (System.String fileName, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (Foundation.NSUrl url, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (QTKit.QTDataReference dataReference, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (AppKit.NSPasteboard pasteboard, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (Foundation.NSData data, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (QTKit.QTMovie movie, QTKit.QTTimeRange range, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (Foundation.NSDictionary attributes, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (QTKit.QTTimeRange range, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovie (Foundation.NSMutableData data, out Foundation.NSError error) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void AddImage (AppKit.NSImage image, QTKit.QTTime duration, Foundation.NSDictionary attributes) - { - } - - public virtual void AppendSelectionFromMovie (QTKit.QTMovie movie) - { - } - - public virtual System.Boolean AttachToCurrentThread () - { - return default (System.Boolean); - } - - public virtual void Autoplay () - { - } - - public static System.Boolean CanInitWithFile (System.String fileName) - { - return default (System.Boolean); - } - - public static System.Boolean CanInitWithPasteboard (AppKit.NSPasteboard pasteboard) - { - return default (System.Boolean); - } - - public static System.Boolean CanInitWithUrl (Foundation.NSUrl url) - { - return default (System.Boolean); - } - - public virtual nint ChapterIndexForTime (QTKit.QTTime time) - { - return default (nint); - } - - public virtual Foundation.NSDictionary [] Chapters () - { - return default (Foundation.NSDictionary []); - } - - public virtual Foundation.NSObject Copy (Foundation.NSZone zone) - { - return default (Foundation.NSObject); - } - - public virtual void DeleteSegment (QTKit.QTTimeRange segment) - { - } - - public virtual System.Boolean DetachFromCurrentThread () - { - return default (System.Boolean); - } - - public virtual void EncodeTo (Foundation.NSCoder encoder) - { - } - - public static void EnterQTKitOnThread () - { - } - - public static void EnterQTKitOnThreadDisablingThreadSafetyProtection () - { - } - - public static void ExitQTKitOnThread () - { - } - - public virtual AppKit.NSImage FrameImageAtTime (QTKit.QTTime time) - { - return default (AppKit.NSImage); - } - - public virtual System.IntPtr FrameImageAtTime (QTKit.QTTime time, Foundation.NSDictionary attributes, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.IntPtr); - } - - public static QTKit.QTMovie FromAttributes (Foundation.NSDictionary attributes, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (QTKit.QTMovie); - } - - public static QTKit.QTMovie FromData (Foundation.NSData data, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (QTKit.QTMovie); - } - - public static QTKit.QTMovie FromFile (System.String fileName, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (QTKit.QTMovie); - } - - public static QTKit.QTMovie FromMovieNamed (System.String name, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (QTKit.QTMovie); - } - - public static QTKit.QTMovie FromPasteboard (AppKit.NSPasteboard pasteboard, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (QTKit.QTMovie); - } - - public static QTKit.QTMovie FromUrl (Foundation.NSUrl url, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (QTKit.QTMovie); - } - - public virtual void GenerateApertureModeDimensions () - { - } - - public virtual Foundation.NSObject GetAttribute (System.String attributeKey) - { - return default (Foundation.NSObject); - } - - public virtual void GotoBeginning () - { - } - - public virtual void GotoEnd () - { - } - - public virtual void GotoNextSelectionPoint () - { - } - - public virtual void GotoPosterTime () - { - } - - public virtual void GotoPreviousSelectionPoint () - { - } - - public virtual void InsertEmptySegmentAt (QTKit.QTTimeRange range) - { - } - - public virtual void InsertSegmentOfMovieFromRange (QTKit.QTMovie movie, QTKit.QTTimeRange srcRange, QTKit.QTTimeRange dstRange) - { - } - - public virtual void InsertSegmentOfMovieTimeRange (QTKit.QTMovie movie, QTKit.QTTimeRange range, QTKit.QTTime time) - { - } - - public virtual QTKit.QTTrack InsertSegmentOfTrackFromRange (QTKit.QTTrack track, QTKit.QTTimeRange srcRange, QTKit.QTTimeRange dstRange) - { - return default (QTKit.QTTrack); - } - - public virtual QTKit.QTTrack InsertSegmentOfTrackTimeRange (QTKit.QTTrack track, QTKit.QTTimeRange range, QTKit.QTTime time) - { - return default (QTKit.QTTrack); - } - - public virtual void Invalidate () - { - } - - public static System.String [] MovieFileTypes (QTKit.QTMovieFileTypeOptions types) - { - return default (System.String []); - } - - public virtual Foundation.NSData MovieFormatRepresentation () - { - return default (Foundation.NSData); - } - - public static System.String [] MovieTypesWithOptions (QTKit.QTMovieFileTypeOptions types) - { - return default (System.String []); - } - - public static System.String [] MovieUnfilteredFileTypes () - { - return default (System.String []); - } - - public static System.String [] MovieUnfilteredPasteboardTypes () - { - return default (System.String []); - } - - public QTKit.QTMovie MovieWithTimeRange (QTKit.QTTimeRange range, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (QTKit.QTMovie); - } - - public virtual void Play () - { - } - - public virtual void RemoveApertureModeDimensions () - { - } - - public virtual System.Boolean RemoveChapters () - { - return default (System.Boolean); - } - - public virtual void RemoveTrack (QTKit.QTTrack track) - { - } - - public virtual void ReplaceSelectionWithSelectionFromMovie (QTKit.QTMovie movie) - { - } - - public virtual System.Boolean SaveTo (System.String fileName, Foundation.NSDictionary attributes) - { - return default (System.Boolean); - } - - public virtual System.Boolean SaveTo (System.String fileName, Foundation.NSDictionary attributes, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.Boolean); - } - - public virtual void ScaleSegmentNewDuration (QTKit.QTTimeRange segment, QTKit.QTTime newDuration) - { - } - - public virtual QTKit.QTTime SelectionDuration () - { - return default (QTKit.QTTime); - } - - public virtual QTKit.QTTime SelectionEnd () - { - return default (QTKit.QTTime); - } - - public virtual QTKit.QTTime SelectionStart () - { - return default (QTKit.QTTime); - } - - public virtual void SetAttribute (Foundation.NSObject value, System.String attributeKey) - { - } - - public virtual void SetSelection (QTKit.QTTimeRange selection) - { - } - - public virtual QTKit.QTTime StartTimeOfChapter (nint chapterIndex) - { - return default (QTKit.QTTime); - } - - public virtual void StepBackward () - { - } - - public virtual void StepForward () - { - } - - public virtual void Stop () - { - } - - public virtual QTKit.QTTrack [] TracksOfMediaType (System.String type) - { - return default (QTKit.QTTrack []); - } - - public virtual System.Boolean UpdateMovieFile () - { - return default (System.Boolean); - } - - protected override void Dispose (System.Boolean disposing) - { - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual System.Boolean CanUpdateMovieFile { - get { return default (System.Boolean); } - } - - public virtual nint ChapterCount { - get { return default (nint); } - } - - public virtual AppKit.NSImage CurrentFrameImage { - get { return default (AppKit.NSImage); } - } - - public virtual QTKit.QTTime CurrentTime { - get { return default (QTKit.QTTime); } - set { } - } - - public virtual QTKit.QTTime Duration { - get { return default (QTKit.QTTime); } - } - - public virtual System.Boolean HasChapters { - get { return default (System.Boolean); } - } - - public virtual System.Boolean Idling { - get { return default (System.Boolean); } - } - - public static QTKit.QTMovie Movie { - get { return default (QTKit.QTMovie); } - } - - public virtual Foundation.NSDictionary MovieAttributes { - get { return default (Foundation.NSDictionary); } - set { } - } - - public virtual System.Boolean Muted { - get { return default (System.Boolean); } - set { } - } - - public virtual AppKit.NSImage PosterImage { - get { return default (AppKit.NSImage); } - } - - public virtual System.Single Rate { - get { return default (System.Single); } - set { } - } - - public virtual QTKit.QTTrack [] Tracks { - get { return default (QTKit.QTTrack []); } - } - - public virtual System.Single Volume { - get { return default (System.Single); } - set { } - } - - public virtual Foundation.NSObject WeakDelegate { - get { return default (Foundation.NSObject); } - set { } - } - - public static Foundation.NSString ActiveSegmentAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ApertureModeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ApertureModeClassic { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ApertureModeClean { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ApertureModeDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ApertureModeEncodedPixels { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ApertureModeProduction { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AskUnresolvedDataRefsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString AutoAlternatesAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ChapterDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ChapterListDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ChapterName { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ChapterStartTime { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ChapterTargetTrackAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CloseWindowRequestNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CopyrightAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CreationTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CurrentSizeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CurrentTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DataAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DataReferenceAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DataSizeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DelegateAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DidEndNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DisplayNameAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DontInteractWithUserAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString DurationAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString EditabilityDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString EditableAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString EditedNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString EnterFullScreenRequestNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ExitFullScreenRequestNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FileNameAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FileOffsetAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageDeinterlaceFields { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageHighQuality { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageOpenGLContext { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImagePixelFormat { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageRepresentationsType { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageSingleField { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageSize { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageType { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageTypeCGImageRef { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageTypeCIImage { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageTypeCVOpenGLTextureRef { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageTypeCVPixelBufferRef { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FrameImageTypeNSImage { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString HasApertureModeDimensionsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString HasAudioAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString HasDurationAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString HasVideoAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString IsActiveAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString IsInteractiveAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString IsLinearAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString IsSteppableAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LoadStateAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LoadStateDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LoopModeDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LoopsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString LoopsBackAndForthAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString MessageNotificationParameter { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString MessageStringPostedNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ModificationTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString MutedAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString NaturalSizeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString OpenAsyncOKAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PasteboardAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PasteboardType { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PlaysAllFramesAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PlaysSelectionOnlyAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PosterTimeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PreferredMutedAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PreferredRateAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PreferredVolumeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PreviewModeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString PreviewRangeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString RateAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString RateChangesPreservePitchAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString RateDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString RateDidChangeNotificationParameter { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ResolveDataRefsAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString SelectionAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString SelectionDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString SizeDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString StatusCodeNotificationParameter { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString StatusFlagsNotificationParameter { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString StatusStringNotificationParameter { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString StatusStringPostedNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString TargetIDNotificationParameter { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString TargetNameNotificationParameter { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString TimeDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString TimeScaleAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString URLAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString UneditableException { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString VolumeAttribute { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString VolumeDidChangeNotification { - get { return default (Foundation.NSString); } - } - - public static class Notifications : System.Object { - public static Foundation.NSObject ObserveApertureModeDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveApertureModeDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveChapterDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveChapterDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveChapterListDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveChapterListDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveCloseWindowRequest (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveCloseWindowRequest (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveDidEnd (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveDidEnd (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveEditabilityDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveEditabilityDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveEdited (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveEdited (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveEnterFullScreenRequest (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveEnterFullScreenRequest (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveExitFullScreenRequest (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveExitFullScreenRequest (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveLoadStateDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveLoadStateDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveLoopModeDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveLoopModeDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveMessageStringPosted (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveMessageStringPosted (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveRateDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveRateDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveSelectionDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveSelectionDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveSizeDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveSizeDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveStatusStringPosted (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveStatusStringPosted (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveTimeDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveTimeDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveVolumeDidChange (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveVolumeDidChange (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public struct QTTime { - public static readonly QTKit.QTTime Zero; - - public static readonly QTKit.QTTime IndefiniteTime; - - public QTTime (System.Int64 timeValue, nint timeScale, QTKit.TimeFlags flags) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTTime (System.Int64 timeValue, nint timeScale) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.String ToString () - { - return default (System.String); - } - - public System.Int64 TimeValue { - get { return default (System.Int64); } - set { } - } - - public nint TimeScale { - get { return default (nint); } - set { } - } - - public QTKit.TimeFlags Flags { - get { return default (QTKit.TimeFlags); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public struct QTTimeRange { - public QTTimeRange (QTKit.QTTime time, QTKit.QTTime duration) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.String ToString () - { - return default (System.String); - } - - public QTKit.QTTime Time { - get { return default (QTKit.QTTime); } - set { } - } - - public QTKit.QTTime Duration { - get { return default (QTKit.QTTime); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - [System.Flags] - public enum TimeFlags : System.Int32 { - TimeIsIndefinite = 1, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - [System.Flags] - public enum QTMovieFileTypeOptions : System.UInt32 { - StillImageTypes = 1, - TranslatableTypes = 2, - AggressiveTypes = 4, - DynamicTypes = 8, - CommonTypes = 0, - AllTypes = 65535, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - [ObjCRuntime.Native] - public enum QTCaptureDevicePlaybackMode : System.UInt64 { - NotPlaying = 0, - Playing = 1, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - [ObjCRuntime.Native] - public enum QTCaptureDeviceControlsSpeed : System.Int64 { - FastestReverse = -19000, - VeryFastReverse = -16000, - FastReverse = -13000, - NormalReverse = -10000, - SlowReverse = -7000, - VerySlowReverse = -4000, - SlowestReverse = -1000, - Stopped = 0, - SlowestForward = 1000, - VerySlowForward = 4000, - SlowForward = 7000, - NormalForward = 10000, - FastForward = 13000, - VeryFastForward = 16000, - FastestForward = 19000, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - [ObjCRuntime.Native] - public enum QTCaptureDestination : System.UInt64 { - NewFile = 1, - OldFile = 2, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - [ObjCRuntime.Native] - public enum QTError : System.Int64 { - Unknown = -1, - None = 0, - IncompatibleInput = 1002, - IncompatibleOutput = 1003, - InvalidInputsOrOutputs = 1100, - DeviceAlreadyUsedbyAnotherSession = 1101, - NoDataCaptured = 1200, - SessionConfigurationChanged = 1201, - DiskFull = 1202, - DeviceWasDisconnected = 1203, - MediaChanged = 1204, - MaximumDurationReached = 1205, - MaximumFileSizeReached = 1206, - MediaDiscontinuity = 1207, - MaximumNumberOfSamplesForFileFormatReached = 1208, - DeviceNotConnected = 1300, - DeviceInUseByAnotherApplication = 1301, - DeviceExcludedByAnotherDevice = 1302, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public enum QTMediaType : System.Int32 { - Video = 0, - Sound = 1, - Text = 2, - Base = 3, - Mpeg = 4, - Music = 5, - TimeCode = 6, - Sprite = 7, - Flash = 8, - Movie = 9, - Tween = 10, - Type3D = 11, - Skin = 12, - Qtvr = 13, - Hint = 14, - Stream = 15, - Muxed = 16, - QuartzComposer = 17, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public enum QTFileType : System.Int32 { - AIFF = 1095321158, - AIFC = 1095321155, - DVC = 1685480225, - MIDI = 1298752617, - Picture = 1346978644, - Movie = 1299148630, - Text = 1413830740, - Wave = 1463899717, - SystemSevenSound = 1936091500, - MuLaw = 1431060823, - AVI = 1449547552, - SoundDesignerII = 1399075430, - AudioCDTrack = 1953653099, - PICS = 1346978643, - GIF = 1195984486, - PNG = 1347307366, - TIFF = 1414088262, - PhotoShop = 943870035, - SGIImage = 777209673, - BMP = 1112363110, - JPEG = 1246774599, - JFIF = 1246774599, - MacPaint = 1347310663, - TargaImage = 1414547779, - QuickDrawGXPicture = 1902405496, - QuickTimeImage = 1903454566, - T3DMF = 860114246, - FLC = 1179403040, - Flash = 1398228556, - FlashPix = 1179675000, - MP4 = 1836082996, - PDF = 1346651680, - T3GPP = 862417008, - AMR = 1634562592, - SDV = 1935963680, - T3GP2 = 862416946, - AMC = 1634558752, - JPEG2000 = 1785737760, - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureAudioPreviewOutput : QTKit.QTCaptureOutput { - public QTCaptureAudioPreviewOutput () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureAudioPreviewOutput (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureAudioPreviewOutput (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual System.String OutputDeviceUniqueID { - get { return default (System.String); } - set { } - } - - public virtual System.Single Volume { - get { return default (System.Single); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureDecompressedVideoOutput : QTKit.QTCaptureOutput { - public QTCaptureDecompressedVideoOutput () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureDecompressedVideoOutput (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureDecompressedVideoOutput (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void OutputVideoFrame (CoreVideo.CVImageBuffer videoFrame, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - } - - protected override void Dispose (System.Boolean disposing) - { - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual System.Boolean AutomaticallyDropsLateVideoFrames { - get { return default (System.Boolean); } - set { } - } - - public QTKit.IQTCaptureDecompressedVideoOutputDelegate Delegate { - get { return default (QTKit.IQTCaptureDecompressedVideoOutputDelegate); } - set { } - } - - public virtual System.Double MinimumVideoFrameInterval { - get { return default (System.Double); } - set { } - } - - public virtual Foundation.NSDictionary PixelBufferAttributes { - get { return default (Foundation.NSDictionary); } - set { } - } - - public virtual Foundation.NSObject WeakDelegate { - get { return default (Foundation.NSObject); } - set { } - } - - public event System.EventHandler DidDropVideoFrame; - - public event System.EventHandler DidOutputVideoFrame; - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureVideoDroppedEventArgs : System.EventArgs { - public QTCaptureVideoDroppedEventArgs (QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - internal QTCaptureVideoDroppedEventArgs () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTKit.QTCaptureConnection Connection { - get { return default (QTKit.QTCaptureConnection); } - set { } - } - - public QTKit.QTSampleBuffer SampleBuffer { - get { return default (QTKit.QTSampleBuffer); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureVideoFrameEventArgs : System.EventArgs { - public QTCaptureVideoFrameEventArgs (CoreVideo.CVImageBuffer videoFrame, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - internal QTCaptureVideoFrameEventArgs () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTKit.QTCaptureConnection Connection { - get { return default (QTKit.QTCaptureConnection); } - set { } - } - - public QTKit.QTSampleBuffer SampleBuffer { - get { return default (QTKit.QTSampleBuffer); } - set { } - } - - public CoreVideo.CVImageBuffer VideoFrame { - get { return default (CoreVideo.CVImageBuffer); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public interface IQTCaptureDecompressedVideoOutputDelegate : ObjCRuntime.INativeObject, System.IDisposable { - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public static class QTCaptureDecompressedVideoOutputDelegate_Extensions : System.Object { - public static void DidOutputVideoFrame (this QTKit.IQTCaptureDecompressedVideoOutputDelegate This, QTKit.QTCaptureOutput captureOutput, CoreVideo.CVImageBuffer videoFrame, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - } - - public static void DidDropVideoFrame (this QTKit.IQTCaptureDecompressedVideoOutputDelegate This, QTKit.QTCaptureOutput captureOutput, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureDecompressedVideoOutputDelegate : Foundation.NSObject, QTKit.IQTCaptureDecompressedVideoOutputDelegate, ObjCRuntime.INativeObject, System.IDisposable { - public QTCaptureDecompressedVideoOutputDelegate () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureDecompressedVideoOutputDelegate (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureDecompressedVideoOutputDelegate (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void DidDropVideoFrame (QTKit.QTCaptureOutput captureOutput, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - } - - public virtual void DidOutputVideoFrame (QTKit.QTCaptureOutput captureOutput, CoreVideo.CVImageBuffer videoFrame, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureDeviceInput : QTKit.QTCaptureInput { - protected QTCaptureDeviceInput (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureDeviceInput (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTCaptureDeviceInput (QTKit.QTCaptureDevice device) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public static QTKit.QTCaptureDeviceInput FromDevice (QTKit.QTCaptureDevice device) - { - return default (QTKit.QTCaptureDeviceInput); - } - - internal QTCaptureDeviceInput () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTCaptureDevice Device { - get { return default (QTKit.QTCaptureDevice); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureFileOutput : QTKit.QTCaptureOutput { - protected QTCaptureFileOutput (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureFileOutput (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual QTKit.QTCompressionOptions GetCompressionOptions (QTKit.QTCaptureConnection forConnection) - { - return default (QTKit.QTCompressionOptions); - } - - public virtual void PauseRecording () - { - } - - public virtual void RecordToOutputFile (Foundation.NSUrl url) - { - } - - public virtual void RecordToOutputFile (Foundation.NSUrl url, QTKit.QTCaptureDestination bufferDestination) - { - } - - public virtual void ResumeRecording () - { - } - - public virtual void SetCompressionOptions (QTKit.QTCompressionOptions compressionOptions, QTKit.QTCaptureConnection forConnection) - { - } - - protected override void Dispose (System.Boolean disposing) - { - } - - internal QTCaptureFileOutput () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public QTKit.IQTCaptureFileOutputDelegate Delegate { - get { return default (QTKit.IQTCaptureFileOutputDelegate); } - set { } - } - - public virtual System.Boolean IsRecordingPaused { - get { return default (System.Boolean); } - } - - public virtual QTKit.QTTime MaximumRecordedDuration { - get { return default (QTKit.QTTime); } - set { } - } - - public virtual System.UInt64 MaximumRecordedFileSize { - get { return default (System.UInt64); } - set { } - } - - public virtual CoreGraphics.CGSize MaximumVideoSize { - get { return default (CoreGraphics.CGSize); } - set { } - } - - public virtual System.Double MinimumVideoFrameInterval { - get { return default (System.Double); } - set { } - } - - public virtual Foundation.NSUrl OutputFileUrl { - get { return default (Foundation.NSUrl); } - } - - public virtual QTKit.QTTime RecordedDuration { - get { return default (QTKit.QTTime); } - } - - public virtual System.UInt64 RecordedFileSize { - get { return default (System.UInt64); } - } - - public virtual Foundation.NSObject WeakDelegate { - get { return default (Foundation.NSObject); } - set { } - } - - public QTKit.QTCaptureFileError ShouldChangeOutputFile { - get { return default (QTKit.QTCaptureFileError); } - set { } - } - - public event System.EventHandler DidFinishRecording; - - public event System.EventHandler DidOutputSampleBuffer; - - public event System.EventHandler DidPauseRecording; - - public event System.EventHandler DidResumeRecording; - - public event System.EventHandler DidStartRecording; - - public event System.EventHandler MustChangeOutputFile; - - public event System.EventHandler WillFinishRecording; - - public event System.EventHandler WillStartRecording; - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureFileErrorEventArgs : System.EventArgs { - public QTCaptureFileErrorEventArgs (Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - internal QTCaptureFileErrorEventArgs () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTKit.QTCaptureConnection [] Connections { - get { return default (QTKit.QTCaptureConnection []); } - set { } - } - - public Foundation.NSUrl OutputFileURL { - get { return default (Foundation.NSUrl); } - set { } - } - - public Foundation.NSError Reason { - get { return default (Foundation.NSError); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureFileSampleEventArgs : System.EventArgs { - public QTCaptureFileSampleEventArgs (QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - internal QTCaptureFileSampleEventArgs () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTKit.QTCaptureConnection Connection { - get { return default (QTKit.QTCaptureConnection); } - set { } - } - - public QTKit.QTSampleBuffer SampleBuffer { - get { return default (QTKit.QTSampleBuffer); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureFileUrlEventArgs : System.EventArgs { - public QTCaptureFileUrlEventArgs (Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - internal QTCaptureFileUrlEventArgs () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTKit.QTCaptureConnection [] Connections { - get { return default (QTKit.QTCaptureConnection []); } - set { } - } - - public Foundation.NSUrl FileUrl { - get { return default (Foundation.NSUrl); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public interface IQTCaptureFileOutputDelegate : ObjCRuntime.INativeObject, System.IDisposable { - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public static class QTCaptureFileOutputDelegate_Extensions : System.Object { - public static void DidOutputSampleBuffer (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - } - - public static void WillStartRecording (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - public static void DidStartRecording (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - public static System.Boolean ShouldChangeOutputFile (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - return default (System.Boolean); - } - - public static void MustChangeOutputFile (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - } - - public static void WillFinishRecording (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - } - - public static void DidFinishRecording (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - } - - public static void DidPauseRecording (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - public static void DidResumeRecording (this QTKit.IQTCaptureFileOutputDelegate This, QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureFileOutputDelegate : Foundation.NSObject, QTKit.IQTCaptureFileOutputDelegate, ObjCRuntime.INativeObject, System.IDisposable { - public QTCaptureFileOutputDelegate () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureFileOutputDelegate (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureFileOutputDelegate (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void DidFinishRecording (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - } - - public virtual void DidOutputSampleBuffer (QTKit.QTCaptureFileOutput captureOutput, QTKit.QTSampleBuffer sampleBuffer, QTKit.QTCaptureConnection connection) - { - } - - public virtual void DidPauseRecording (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - public virtual void DidResumeRecording (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - public virtual void DidStartRecording (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - public virtual void MustChangeOutputFile (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - } - - public virtual System.Boolean ShouldChangeOutputFile (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - return default (System.Boolean); - } - - public virtual void WillFinishRecording (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason) - { - } - - public virtual void WillStartRecording (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl fileUrl, QTKit.QTCaptureConnection [] connections) - { - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureInput : Foundation.NSObject { - protected QTCaptureInput (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureInput (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - internal QTCaptureInput () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTCaptureConnection [] Connections { - get { return default (QTKit.QTCaptureConnection []); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureLayer : CoreAnimation.CALayer { - public QTCaptureLayer () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTCaptureLayer (Foundation.NSCoder coder) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureLayer (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureLayer (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTCaptureLayer (QTKit.QTCaptureSession session) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public static Foundation.NSObject FromSession (QTKit.QTCaptureSession session) - { - return default (Foundation.NSObject); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTCaptureSession Session { - get { return default (QTKit.QTCaptureSession); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureMovieFileOutput : QTKit.QTCaptureFileOutput { - public QTCaptureMovieFileOutput () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureMovieFileOutput (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureMovieFileOutput (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureOutput : Foundation.NSObject { - protected QTCaptureOutput (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureOutput (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - internal QTCaptureOutput () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTCaptureConnection [] Connections { - get { return default (QTKit.QTCaptureConnection []); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureSession : Foundation.NSObject { - public QTCaptureSession () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureSession (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureSession (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual System.Boolean AddInput (QTKit.QTCaptureInput input, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.Boolean); - } - - public virtual System.Boolean AddOutput (QTKit.QTCaptureOutput output, out Foundation.NSError error) - { - error = default (Foundation.NSError); - return default (System.Boolean); - } - - public virtual void RemoveInput (QTKit.QTCaptureInput input) - { - } - - public virtual void RemoveOutput (QTKit.QTCaptureOutput output) - { - } - - public virtual void StartRunning () - { - } - - public virtual void StopRunning () - { - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTCaptureInput [] Inputs { - get { return default (QTKit.QTCaptureInput []); } - } - - public virtual System.Boolean IsRunning { - get { return default (System.Boolean); } - } - - public virtual QTKit.QTCaptureOutput [] Outputs { - get { return default (QTKit.QTCaptureOutput []); } - } - - public static Foundation.NSString ErrorKey { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString RuntimeErrorNotification { - get { return default (Foundation.NSString); } - } - - public static class Notifications : System.Object { - public static Foundation.NSObject ObserveRuntimeError (System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject ObserveRuntimeError (Foundation.NSObject objectToObserve, System.EventHandler handler) - { - return default (Foundation.NSObject); - } - - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureView : AppKit.NSView { - public QTCaptureView () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTCaptureView (Foundation.NSCoder coder) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureView (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureView (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTCaptureView (CoreGraphics.CGRect frameRect) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected override void Dispose (System.Boolean disposing) - { - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTCaptureConnection [] AvailableVideoPreviewConnections { - get { return default (QTKit.QTCaptureConnection []); } - } - - public virtual QTKit.QTCaptureSession CaptureSession { - get { return default (QTKit.QTCaptureSession); } - set { } - } - - public QTKit.IQTCaptureViewDelegate Delegate { - get { return default (QTKit.IQTCaptureViewDelegate); } - set { } - } - - public virtual AppKit.NSColor FillColor { - get { return default (AppKit.NSColor); } - set { } - } - - public virtual System.Boolean PreservesAspectRatio { - get { return default (System.Boolean); } - set { } - } - - public virtual CoreGraphics.CGRect PreviewBounds { - get { return default (CoreGraphics.CGRect); } - } - - public virtual QTKit.QTCaptureConnection VideoPreviewConnection { - get { return default (QTKit.QTCaptureConnection); } - set { } - } - - public virtual Foundation.NSObject WeakDelegate { - get { return default (Foundation.NSObject); } - set { } - } - - public QTKit.QTCaptureImageEvent WillDisplayImage { - get { return default (QTKit.QTCaptureImageEvent); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public interface IQTCaptureViewDelegate : ObjCRuntime.INativeObject, System.IDisposable { - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public static class QTCaptureViewDelegate_Extensions : System.Object { - public static CoreImage.CIImage WillDisplayImage (this QTKit.IQTCaptureViewDelegate This, QTKit.QTCaptureView view, CoreImage.CIImage image) - { - return default (CoreImage.CIImage); - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTCaptureViewDelegate : Foundation.NSObject, QTKit.IQTCaptureViewDelegate, ObjCRuntime.INativeObject, System.IDisposable { - public QTCaptureViewDelegate () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTCaptureViewDelegate (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTCaptureViewDelegate (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual CoreImage.CIImage WillDisplayImage (QTKit.QTCaptureView view, CoreImage.CIImage image) - { - return default (CoreImage.CIImage); - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTDataReference : Foundation.NSObject, Foundation.INSCoding, ObjCRuntime.INativeObject, System.IDisposable { - public QTDataReference () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTDataReference (Foundation.NSCoder coder) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTDataReference (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTDataReference (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void EncodeTo (Foundation.NSCoder encoder) - { - } - - public static Foundation.NSObject FromDataRefData (Foundation.NSData dataRefData, System.String type) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject FromDataReference (Foundation.NSData data) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject FromReference (System.String fileName) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject FromReference (Foundation.NSUrl url) - { - return default (Foundation.NSObject); - } - - public static Foundation.NSObject FromReference (Foundation.NSData data, System.String name, System.String mimeType) - { - return default (Foundation.NSObject); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual Foundation.NSData DataRefData { - get { return default (Foundation.NSData); } - } - - public virtual System.String DataRefType { - get { return default (System.String); } - set { } - } - - public virtual System.String MimeType { - get { return default (System.String); } - } - - public virtual System.String Name { - get { return default (System.String); } - } - - public virtual Foundation.NSData ReferenceData { - get { return default (Foundation.NSData); } - } - - public virtual System.String ReferenceFile { - get { return default (System.String); } - } - - public virtual Foundation.NSUrl ReferenceUrl { - get { return default (Foundation.NSUrl); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public static class QTErrorKey : System.Object { - public static Foundation.NSString CaptureInput { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString CaptureOutput { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString Device { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString Domain { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString ExcludingDevice { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString FileSize { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString RecordingSuccesfullyFinished { - get { return default (Foundation.NSString); } - } - - public static Foundation.NSString Time { - get { return default (Foundation.NSString); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTMovieLayer : CoreAnimation.CALayer { - public QTMovieLayer () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovieLayer (Foundation.NSCoder coder) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTMovieLayer (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTMovieLayer (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovieLayer (QTKit.QTMovie movie) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public static QTKit.QTMovieLayer FromMovie (QTKit.QTMovie movie) - { - return default (QTKit.QTMovieLayer); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTMovie Movie { - get { return default (QTKit.QTMovie); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTMovieView : AppKit.NSView { - public QTMovieView () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovieView (Foundation.NSCoder coder) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTMovieView (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTMovieView (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public QTMovieView (CoreGraphics.CGRect frameRect) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void Add (Foundation.NSObject sender) - { - } - - public virtual void AddScaled (Foundation.NSObject sender) - { - } - - public virtual void Copy (Foundation.NSObject sender) - { - } - - public virtual void Cut (Foundation.NSObject sender) - { - } - - public virtual void Delete (Foundation.NSObject sender) - { - } - - public virtual void GotoBeginning (Foundation.NSObject sender) - { - } - - public virtual void GotoEnd (Foundation.NSObject sender) - { - } - - public virtual void GotoNextSelectionPoint (Foundation.NSObject sender) - { - } - - public virtual void GotoPosterFrame (Foundation.NSObject sender) - { - } - - public virtual void GotoPreviousSelectionPoint (Foundation.NSObject sender) - { - } - - public virtual void Paste (Foundation.NSObject sender) - { - } - - public virtual void Pause (Foundation.NSObject sender) - { - } - - public virtual void Play (Foundation.NSObject sender) - { - } - - public virtual void Replace (Foundation.NSObject sender) - { - } - - public virtual void SelectAll (Foundation.NSObject sender) - { - } - - public virtual void SelectNone (Foundation.NSObject sender) - { - } - - public virtual void SetShowsResizeIndicator (System.Boolean show) - { - } - - public virtual void StepBackward (Foundation.NSObject sender) - { - } - - public virtual void StepForward (Foundation.NSObject sender) - { - } - - public virtual void Trim (Foundation.NSObject sender) - { - } - - protected override void Dispose (System.Boolean disposing) - { - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual System.Boolean BackButtonVisible { - get { return default (System.Boolean); } - set { } - } - - public virtual System.Single ControllerBarHeight { - get { return default (System.Single); } - } - - public virtual System.Boolean CustomButtonVisible { - get { return default (System.Boolean); } - set { } - } - - public QTKit.IQTMovieViewDelegate Delegate { - get { return default (QTKit.IQTMovieViewDelegate); } - set { } - } - - public virtual System.Boolean Editable { - get { return default (System.Boolean); } - set { } - } - - public virtual AppKit.NSColor FillColor { - get { return default (AppKit.NSColor); } - set { } - } - - public virtual System.Boolean HotSpotButtonVisible { - get { return default (System.Boolean); } - set { } - } - - public virtual System.Boolean IsControllerVisible { - get { return default (System.Boolean); } - set { } - } - - public virtual QTKit.QTMovie Movie { - get { return default (QTKit.QTMovie); } - set { } - } - - public virtual CoreGraphics.CGRect MovieBounds { - get { return default (CoreGraphics.CGRect); } - } - - public virtual CoreGraphics.CGRect MovieControllerBounds { - get { return default (CoreGraphics.CGRect); } - } - - public virtual System.Boolean PreservesAspectRatio { - get { return default (System.Boolean); } - set { } - } - - public virtual System.Boolean SetStepButtonsVisible { - get { return default (System.Boolean); } - set { } - } - - public virtual System.Boolean TranslateButtonVisible { - get { return default (System.Boolean); } - set { } - } - - public virtual System.Boolean VolumeButtonVisible { - get { return default (System.Boolean); } - set { } - } - - public virtual Foundation.NSObject WeakDelegate { - get { return default (Foundation.NSObject); } - set { } - } - - public virtual System.Boolean ZoomButtonsVisible { - get { return default (System.Boolean); } - set { } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public interface IQTMovieViewDelegate : ObjCRuntime.INativeObject, System.IDisposable { - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public static class QTMovieViewDelegate_Extensions : System.Object { - public static CoreImage.CIImage ViewWillDisplayImage (this QTKit.IQTMovieViewDelegate This, QTKit.QTMovieView view, CoreImage.CIImage image) - { - return default (CoreImage.CIImage); - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTMovieViewDelegate : Foundation.NSObject, QTKit.IQTMovieViewDelegate, ObjCRuntime.INativeObject, System.IDisposable { - public QTMovieViewDelegate () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected QTMovieViewDelegate (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTMovieViewDelegate (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual CoreImage.CIImage ViewWillDisplayImage (QTKit.QTMovieView view, CoreImage.CIImage image) - { - return default (CoreImage.CIImage); - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public class QTSampleBuffer : Foundation.NSObject { - protected QTSampleBuffer (Foundation.NSObjectFlag t) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - protected internal QTSampleBuffer (System.IntPtr handle) - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public virtual void DecrementSampleUseCount () - { - } - - public virtual Foundation.NSObject GetAttribute (System.String key) - { - return default (Foundation.NSObject); - } - - public virtual void IncrementSampleUseCount () - { - } - - internal QTSampleBuffer () - { - throw new System.PlatformNotSupportedException (ObjCRuntime.Constants.MacOS32bitsUnavailable); - } - - public override System.IntPtr ClassHandle { - get { return default (System.IntPtr); } - } - - public virtual System.IntPtr BytesForAllSamples { - get { return default (System.IntPtr); } - } - - public virtual QTKit.QTTime DecodeTime { - get { return default (QTKit.QTTime); } - } - - public virtual QTKit.QTTime Duration { - get { return default (QTKit.QTTime); } - } - - public virtual QTKit.QTFormatDescription FormatDescription { - get { return default (QTKit.QTFormatDescription); } - } - - public virtual nuint LengthForAllSamples { - get { return default (nuint); } - } - - public virtual QTKit.QTTime PresentationTime { - get { return default (QTKit.QTTime); } - } - - public virtual Foundation.NSDictionary SampleBufferAttributes { - get { return default (Foundation.NSDictionary); } - } - - public virtual nint SampleCount { - get { return default (nint); } - } - - public virtual nint SampleUseCount { - get { return default (nint); } - } - - } - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public delegate System.Boolean QTCaptureFileError (QTKit.QTCaptureFileOutput captureOutput, Foundation.NSUrl outputFileURL, QTKit.QTCaptureConnection [] connections, Foundation.NSError reason); - - [ObjCRuntime.Obsoleted (ObjCRuntime.PlatformName.MacOSX, 10, 15, message: ObjCRuntime.Constants.MacOS32bitsUnavailable)] - public delegate CoreImage.CIImage QTCaptureImageEvent (QTKit.QTCaptureView view, CoreImage.CIImage image); - -} - -#endif // !NET diff --git a/src/README.md b/src/README.md index 2512ad73a987..a81bf8f62c65 100644 --- a/src/README.md +++ b/src/README.md @@ -48,10 +48,9 @@ These are the symbols defined for each platform assembly: | ------------------ | ----------- | | Xamarin.iOS.dll | IPHONE MONOTOUCH IOS | | Xamarin.Mac.dll | MONOMAC | -| Xamarin.WatchOS.dll | IPHONE MONOTOUCH WATCH | | Xamarin.TVOS.dll | IPHONE MONOTOUCH TVOS | -To build core for only one platform, use the platform unique variables `IOS`, `MONOMAC`, `WATCH` or `TVOS`. +To build core for only one platform, use the platform unique variables `IOS`, `MONOMAC`, or `TVOS`. ## Core Assemblies ## diff --git a/src/SafetyKit/SAEnums.cs b/src/SafetyKit/SAEnums.cs index 532e6487949f..1a6ab0fec8aa 100644 --- a/src/SafetyKit/SAEnums.cs +++ b/src/SafetyKit/SAEnums.cs @@ -16,7 +16,7 @@ namespace SafetyKit { - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum SAAuthorizationStatus : long { NotDetermined = 0, @@ -24,14 +24,14 @@ public enum SAAuthorizationStatus : long { Authorized, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum SACrashDetectionEventResponse : long { Attempted, Disabled, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum SAEmergencyResponseManagerVoiceCallStatus : long { Dialing, @@ -40,7 +40,7 @@ public enum SAEmergencyResponseManagerVoiceCallStatus : long { Failed, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [ErrorDomain ("SAErrorDomain")] [Native] public enum SAErrorCode : long { diff --git a/src/SceneKit/Defs.cs b/src/SceneKit/Defs.cs index 7c8137e30731..8f1d6da893bf 100644 --- a/src/SceneKit/Defs.cs +++ b/src/SceneKit/Defs.cs @@ -33,7 +33,7 @@ public enum SCNGeometryPrimitiveType : long { Line, Point, [MacCatalyst (13, 1)] - Polygon + Polygon, } /// Enumerates techniques for calculating transparency. @@ -57,7 +57,8 @@ public enum SCNTransparencyMode : long { [MacCatalyst (13, 1)] [Native] public enum SCNCullMode : long { - Back, Front + Back, + Front, } /// Enumeration of texture filtering modes. @@ -66,7 +67,7 @@ public enum SCNCullMode : long { public enum SCNFilterMode : long { None, Nearest, - Linear + Linear, } /// Enumerates texture-wrapping techniques. @@ -77,7 +78,7 @@ public enum SCNWrapMode : long { Repeat, // added in iOS 8, removed in 8.3 (mistake?) but added back in 9.0 betas ClampToBorder, - Mirror + Mirror, } /// Enumerates the states of an SCNSceneSource. @@ -88,7 +89,7 @@ public enum SCNSceneSourceStatus : long { Parsing = 4, Validating = 8, Processing = 12, - Complete = 16 + Complete = 16, } /// Enumerates the ways a can be chamfered; on its front, back, or both sides. @@ -97,7 +98,7 @@ public enum SCNSceneSourceStatus : long { public enum SCNChamferMode : long { Both, Front, - Back + Back, } /// Enumeration of valid interpolation formulae for . @@ -105,7 +106,7 @@ public enum SCNChamferMode : long { [Native] public enum SCNMorpherCalculationMode : long { Normalized, - Additive + Additive, } /// Enumerates rate curves for use with objects. @@ -115,7 +116,7 @@ public enum SCNActionTimingMode : long { Linear, EaseIn, EaseOut, - EaseInEaseOut + EaseInEaseOut, } /// Enumeration controlling when shadows are calculated. @@ -124,7 +125,7 @@ public enum SCNActionTimingMode : long { public enum SCNShadowMode : long { Forward, Deferred, - Modulated + Modulated, } /// An enumeration specifying whether the is dynamic, kinematic, or static. Used with . @@ -133,7 +134,7 @@ public enum SCNShadowMode : long { public enum SCNPhysicsBodyType : long { Static, Dynamic, - Kinematic + Kinematic, } /// Enumerates values specifying whether an affects objects inside or outside its border. @@ -141,7 +142,7 @@ public enum SCNPhysicsBodyType : long { [Native] public enum SCNPhysicsFieldScope : long { InsideExtent, - OutsideExtent + OutsideExtent, } /// Enumeration specifying the order in which particles emitted by a T:SceneKit.SCNParticleScene are rendered. @@ -155,7 +156,7 @@ public enum SCNParticleSortingMode : long { ProjectedDepth, Distance, OldestFirst, - YoungestFirst + YoungestFirst, } /// Enumeration of the ways in which overlapping particles emitted by a will be rendered. @@ -167,7 +168,7 @@ public enum SCNParticleBlendMode : long { Multiply, Screen, Alpha, - Replace + Replace, } /// Enumerates the alignment of particles emitted by a . Used with . @@ -177,7 +178,7 @@ public enum SCNParticleOrientationMode : long { BillboardScreenAligned, BillboardViewAligned, Free, - BillboardYAligned + BillboardYAligned, } /// Enumeration of the initial location of particles emitted by a . @@ -186,7 +187,7 @@ public enum SCNParticleOrientationMode : long { public enum SCNParticleBirthLocation : long { Surface, Volume, - Vertex + Vertex, } /// Enumerates the initial direction of particles emitted by a . @@ -195,7 +196,7 @@ public enum SCNParticleBirthLocation : long { public enum SCNParticleBirthDirection : long { Constant, SurfaceNormal, - Random + Random, } /// Enumeration of playing modes for 's whose particles are rendered as a sequence of images. @@ -204,7 +205,7 @@ public enum SCNParticleBirthDirection : long { public enum SCNParticleImageSequenceAnimationMode : long { Repeat, Clamp, - AutoReverse + AutoReverse, } /// Enumerates how a particle property is animated (over the lifetime of the particle, as the particle travels over a distance, or based on another property). Used with . @@ -213,7 +214,7 @@ public enum SCNParticleImageSequenceAnimationMode : long { public enum SCNParticleInputMode : long { OverLife, OverDistance, - OverOtherProperty + OverOtherProperty, } /// Enumerates moments when the modifier specified in should be applied. @@ -223,7 +224,7 @@ public enum SCNParticleModifierStage : long { PreDynamics, PostDynamics, PreCollision, - PostCollision + PostCollision, } /// Enumeration of lifecycle events for particles emitted by a . Used with . @@ -232,7 +233,7 @@ public enum SCNParticleModifierStage : long { public enum SCNParticleEvent : long { Birth, Death, - Collision + Collision, } // Utility enum @@ -245,7 +246,7 @@ public enum SCNGeometrySourceSemantics { VertexCrease, EdgeCrease, BoneWeights, - BoneIndices + BoneIndices, } // Utility enum @@ -255,14 +256,16 @@ public enum SCNAnimationImportPolicy { Play, PlayRepeatedly, DoNotPlay, - PlayUsingSceneTimeBase + PlayUsingSceneTimeBase, } // Utility enum /// Enumerates values that control which physics search results are returned. public enum SCNPhysicsSearchMode { Unknown = -1, - Any, Closest, All, + Any, + Closest, + All, } /// Enumerates values that control antialiasing behavior. @@ -289,7 +292,7 @@ public enum SCNPhysicsCollisionCategory : ulong { None = 0, Default = 1 << 0, Static = 1 << 1, - All = UInt64.MaxValue + All = UInt64.MaxValue, } /// Enumeration of axes' locks available to nodes constrained by . @@ -299,7 +302,7 @@ public enum SCNBillboardAxis : ulong { X = 1 << 0, Y = 1 << 1, Z = 1 << 2, - All = (X | Y | Z) + All = (X | Y | Z), } /// Enumerates possible loading policies for objects. @@ -307,7 +310,7 @@ public enum SCNBillboardAxis : ulong { [Native] public enum SCNReferenceLoadingPolicy : long { Immediate = 0, - OnDemand = 1 + OnDemand = 1, } /// Enumeration of the ways SceneKit can blend colors from a material with colors that already exist in the render target. @@ -363,7 +366,7 @@ public enum SCNRenderingApi : ulong { [NoiOS][NoTV][NoMacCatalyst] OpenGLCore32, [NoiOS][NoTV][NoMacCatalyst] - OpenGLCore41 + OpenGLCore41, #endif } @@ -381,7 +384,7 @@ public enum SCNBufferFrequency : long { [Native] public enum SCNMovabilityHint : long { Fixed, - Movable + Movable, } [MacCatalyst (13, 1)] @@ -415,7 +418,6 @@ public enum SCNFillMode : ulong { Lines = 1, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum SCNTessellationSmoothingMode : long { @@ -447,7 +449,7 @@ public enum SCNNodeFocusBehavior : long { Focusable, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum SCNLightProbeType : long { @@ -455,7 +457,7 @@ public enum SCNLightProbeType : long { Radiance = 1, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum SCNLightProbeUpdateType : long { @@ -463,7 +465,7 @@ public enum SCNLightProbeUpdateType : long { Realtime = 1, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum SCNLightAreaType : long { diff --git a/src/SceneKit/SCNAnimatable.cs b/src/SceneKit/SCNAnimatable.cs index 6ac61aa8c116..13267cd4f2b5 100644 --- a/src/SceneKit/SCNAnimatable.cs +++ b/src/SceneKit/SCNAnimatable.cs @@ -7,8 +7,6 @@ // Copyright 2014 Xamarin Inc. All rights reserved. // -#if !WATCH - using System; using System.Runtime.InteropServices; using Foundation; @@ -28,5 +26,3 @@ public void AddAnimation (CAAnimation animation, string? key = null) } } } - -#endif diff --git a/src/SceneKit/SCNCompat.cs b/src/SceneKit/SCNCompat.cs index 03d5077ce579..fbff31b25785 100644 --- a/src/SceneKit/SCNCompat.cs +++ b/src/SceneKit/SCNCompat.cs @@ -5,12 +5,8 @@ using Foundation; using ObjCRuntime; -#if WATCH -using AnimationType = global::SceneKit.ISCNAnimationProtocol; -#else using CoreAnimation; using AnimationType = global::CoreAnimation.CAAnimation; -#endif #nullable enable @@ -110,7 +106,7 @@ public static SCNAnimationEvent Create (nfloat keyTime, SCNAnimationEventHandler } #endif // !NET -#if !WATCH && !NET +#if !NET static public partial class SCNAnimatableExtensions { static public void AddAnimation (this ISCNAnimatable self, SCNAnimation animation, string key) { @@ -119,7 +115,7 @@ static public void AddAnimation (this ISCNAnimatable self, SCNAnimation animatio self.AddAnimation (ca, st); } } -#endif // !WATCH && !NET +#endif // !NET #if !NET public partial class SCNHitTestOptions { @@ -131,12 +127,12 @@ public SCNHitTestSearchMode? OptionSearchMode { } } -#if !MONOMAC && !WATCH && !__MACCATALYST__ +#if !MONOMAC && !__MACCATALYST__ public partial class SCNView { - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Obsolete ("Empty stub. (not a public API).")] public virtual bool DrawableResizesAsynchronously { get; set; } } -#endif // !MONOMAC && !WATCH && !__MACCATALYST__ +#endif // !MONOMAC && !__MACCATALYST__ #endif // !NET } diff --git a/src/SceneKit/SCNGeometrySource.cs b/src/SceneKit/SCNGeometrySource.cs index c292dccc9ccd..00147cefdce0 100644 --- a/src/SceneKit/SCNGeometrySource.cs +++ b/src/SceneKit/SCNGeometrySource.cs @@ -11,9 +11,7 @@ using CoreGraphics; using Foundation; -#if !WATCH using Metal; -#endif #nullable enable @@ -76,12 +74,10 @@ public static SCNGeometrySource FromData (NSData data, SCNGeometrySourceSemantic return FromData (data, SemanticToToken (semantic), vectorCount, floatComponents, componentsPerVector, bytesPerComponent, offset, stride); } -#if !WATCH public static SCNGeometrySource FromMetalBuffer (IMTLBuffer mtlBuffer, MTLVertexFormat vertexFormat, SCNGeometrySourceSemantics semantic, nint vertexCount, nint offset, nint stride) { return FromMetalBuffer (mtlBuffer, vertexFormat, SemanticToToken (semantic), vertexCount, offset, stride); } -#endif } } diff --git a/src/SceneKit/SCNJavaScript.cs b/src/SceneKit/SCNJavaScript.cs index 3ff61a0b1c5d..3c47488f3789 100644 --- a/src/SceneKit/SCNJavaScript.cs +++ b/src/SceneKit/SCNJavaScript.cs @@ -7,8 +7,6 @@ // Copyright 2014 Xamarin Inc. All rights reserved. // -#if !WATCH - using System; using System.Runtime.InteropServices; @@ -37,5 +35,3 @@ public static void ExportModule (JSContext context) } } } - -#endif diff --git a/src/SceneKit/SCNMatrix4.cs b/src/SceneKit/SCNMatrix4.cs index 907d61f46c37..99c2b40750cb 100644 --- a/src/SceneKit/SCNMatrix4.cs +++ b/src/SceneKit/SCNMatrix4.cs @@ -133,7 +133,6 @@ public SCNMatrix4 ( Row3 = new SCNVector4 (m30, m31, m32, m33); } -#if !WATCH public SCNMatrix4 (CoreAnimation.CATransform3D transform) { Row0 = new SCNVector4 ((pfloat) transform.M11, (pfloat) transform.M12, (pfloat) transform.M13, (pfloat) transform.M14); @@ -141,7 +140,6 @@ public SCNMatrix4 (CoreAnimation.CATransform3D transform) Row2 = new SCNVector4 ((pfloat) transform.M31, (pfloat) transform.M32, (pfloat) transform.M33, (pfloat) transform.M34); Row3 = new SCNVector4 ((pfloat) transform.M41, (pfloat) transform.M42, (pfloat) transform.M43, (pfloat) transform.M44); } -#endif #endregion diff --git a/src/SceneKit/SCNMatrix4_dotnet.cs b/src/SceneKit/SCNMatrix4_dotnet.cs index 7351416da338..ffb1efc0484d 100644 --- a/src/SceneKit/SCNMatrix4_dotnet.cs +++ b/src/SceneKit/SCNMatrix4_dotnet.cs @@ -154,7 +154,6 @@ public SCNMatrix4 ( Column3 = new SCNVector4 (m03, m13, m23, m33); } -#if !WATCH public SCNMatrix4 (CoreAnimation.CATransform3D transform) { Column0 = new SCNVector4 ((pfloat) transform.M11, (pfloat) transform.M12, (pfloat) transform.M13, (pfloat) transform.M14); @@ -162,7 +161,6 @@ public SCNMatrix4 (CoreAnimation.CATransform3D transform) Column2 = new SCNVector4 ((pfloat) transform.M31, (pfloat) transform.M32, (pfloat) transform.M33, (pfloat) transform.M34); Column3 = new SCNVector4 ((pfloat) transform.M41, (pfloat) transform.M42, (pfloat) transform.M43, (pfloat) transform.M44); } -#endif #endregion diff --git a/src/SceneKit/SCNNode.cs b/src/SceneKit/SCNNode.cs index 91c5ee79bbd9..280b2ed30780 100644 --- a/src/SceneKit/SCNNode.cs +++ b/src/SceneKit/SCNNode.cs @@ -11,9 +11,7 @@ using System.Collections; using System.Collections.Generic; -#if !WATCH using CoreAnimation; -#endif using Foundation; using ObjCRuntime; @@ -45,7 +43,6 @@ IEnumerator IEnumerable.GetEnumerator () return GetEnumerator (); } -#if !WATCH public void AddAnimation (CAAnimation animation, string? key) { if (key is null) { @@ -129,7 +126,5 @@ public virtual void EnumerateChildNodes (SCNNodePredicate predicate) EnumerateChildNodes (predHandler); } #endif - -#endif // !WATCH } } diff --git a/src/SceneKit/SCNRenderingOptions.cs b/src/SceneKit/SCNRenderingOptions.cs index a16c4911ba2e..b3923c034ce6 100644 --- a/src/SceneKit/SCNRenderingOptions.cs +++ b/src/SceneKit/SCNRenderingOptions.cs @@ -1,4 +1,4 @@ -#if !WATCH && !__MACCATALYST__ +#if !__MACCATALYST__ using System; using ObjCRuntime; diff --git a/src/SearchKit/SearchKit.cs b/src/SearchKit/SearchKit.cs index c1ea053587fe..50465dcddd30 100644 --- a/src/SearchKit/SearchKit.cs +++ b/src/SearchKit/SearchKit.cs @@ -35,7 +35,10 @@ namespace SearchKit { public enum SKIndexType { - Unknown, Inverted, Vector, InvertedVector + Unknown, + Inverted, + Vector, + InvertedVector, }; [Flags] @@ -43,7 +46,7 @@ public enum SKSearchOptions { Default = 0, NoRelevanceScores = 1 << 0, SpaceMeansOr = 1 << 1, - FindSimilar = 1 << 2 + FindSimilar = 1 << 2, } #if NET diff --git a/src/Security/Certificate.cs b/src/Security/Certificate.cs index 7ead363012a6..5d0fc90840b0 100644 --- a/src/Security/Certificate.cs +++ b/src/Security/Certificate.cs @@ -273,7 +273,6 @@ internal static bool Equals (SecCertificate first, SecCertificate second) #else [Deprecated (PlatformName.iOS, 12, 0)] [Deprecated (PlatformName.TvOS, 12, 0)] - [Deprecated (PlatformName.WatchOS, 5, 0)] #endif [DllImport (Constants.SecurityLibrary)] static extern /* __nullable SecKeyRef */ IntPtr SecCertificateCopyPublicKey (IntPtr /* SecCertificateRef */ certificate); @@ -288,7 +287,6 @@ internal static bool Equals (SecCertificate first, SecCertificate second) #else [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetKey' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GetKey' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'GetKey' instead.")] #endif public SecKey? GetPublicKey () { @@ -303,8 +301,6 @@ internal static bool Equals (SecCertificate first, SecCertificate second) [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.SecurityLibrary)] static extern IntPtr /* SecKeyRef* */ SecCertificateCopyKey (IntPtr /* SecKeyRef* */ key); @@ -314,8 +310,6 @@ internal static bool Equals (SecCertificate first, SecCertificate second) [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public SecKey? GetKey () { @@ -438,7 +432,6 @@ internal static bool Equals (SecCertificate first, SecCertificate second) #else [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GetSerialNumber' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GetSerialNumber' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'GetSerialNumber' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'GetSerialNumber' instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -455,7 +448,6 @@ internal static bool Equals (SecCertificate first, SecCertificate second) #else [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GetSerialNumber(out NSError)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GetSerialNumber(out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'GetSerialNumber(out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'GetSerialNumber(out NSError)' instead.")] #endif public NSData? GetSerialNumber () @@ -500,7 +492,7 @@ internal static bool Equals (SecCertificate first, SecCertificate second) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.SecurityLibrary)] static extern /* CFDateRef */ IntPtr SecCertificateCopyNotValidBeforeDate (/* SecCertificateRef */ IntPtr certificate); @@ -513,7 +505,7 @@ internal static bool Equals (SecCertificate first, SecCertificate second) [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public NSDate? NotValidBeforeDate { get { @@ -528,7 +520,7 @@ public NSDate? NotValidBeforeDate { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif [DllImport (Constants.SecurityLibrary)] static extern /* CFDateRef */ IntPtr SecCertificateCopyNotValidAfterDate (/* SecCertificateRef */ IntPtr certificate); @@ -541,7 +533,7 @@ public NSDate? NotValidBeforeDate { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public NSDate? NotValidAfterDate { get { @@ -739,7 +731,6 @@ public SecKey (NativeHandle handle, bool owns) [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'SecKeyCreateRandomKey' instead.")] #endif [DllImport (Constants.SecurityLibrary)] unsafe extern static SecStatusCode SecKeyGeneratePair (IntPtr dictHandle, IntPtr* pubKey, IntPtr* privKey); @@ -760,7 +751,6 @@ public SecKey (NativeHandle handle, bool owns) [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'CreateRandomKey' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'CreateRandomKey' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'CreateRandomKey' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'CreateRandomKey' instead.")] #endif public static SecStatusCode GenerateKeyPair (NSDictionary parameters, out SecKey? publicKey, out SecKey? privateKey) { @@ -843,7 +833,6 @@ public int BlockSize { [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'SecKeyCreateSignature' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'SecKeyCreateSignature' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'SecKeyCreateSignature' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'SecKeyCreateSignature' instead.")] #endif [DllImport (Constants.SecurityLibrary)] unsafe extern static SecStatusCode SecKeyRawSign (IntPtr handle, SecPadding padding, IntPtr dataToSign, nint dataToSignLen, IntPtr sig, nint* sigLen); @@ -860,7 +849,6 @@ public int BlockSize { [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'CreateSignature' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'CreateSignature' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'CreateSignature' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'CreateSignature' instead.")] #endif public SecStatusCode RawSign (SecPadding padding, IntPtr dataToSign, int dataToSignLen, out byte [] result) { @@ -903,7 +891,6 @@ unsafe SecStatusCode _RawSign (SecPadding padding, IntPtr dataToSign, int dataTo [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'SecKeyVerifySignature' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'SecKeyVerifySignature' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'SecKeyVerifySignature' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'SecKeyVerifySignature' instead.")] #endif [DllImport (Constants.SecurityLibrary)] extern static SecStatusCode SecKeyRawVerify (IntPtr handle, SecPadding padding, IntPtr signedData, nint signedLen, IntPtr sign, nint signLen); @@ -920,7 +907,6 @@ unsafe SecStatusCode _RawSign (SecPadding padding, IntPtr dataToSign, int dataTo [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'VerifySignature' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'VerifySignature' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'VerifySignature' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'VerifySignature' instead.")] #endif public unsafe SecStatusCode RawVerify (SecPadding padding, IntPtr signedData, int signedDataLen, IntPtr signature, int signatureLen) { @@ -958,7 +944,6 @@ public SecStatusCode RawVerify (SecPadding padding, byte [] signedData, byte [] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'SecKeyCreateEncryptedData' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'SecKeyCreateEncryptedData' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'SecKeyCreateEncryptedData' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'SecKeyCreateEncryptedData' instead.")] #endif [DllImport (Constants.SecurityLibrary)] unsafe extern static SecStatusCode SecKeyEncrypt (IntPtr handle, SecPadding padding, IntPtr plainText, nint plainTextLen, IntPtr cipherText, nint* cipherTextLengh); @@ -975,7 +960,6 @@ public SecStatusCode RawVerify (SecPadding padding, byte [] signedData, byte [] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'CreateEncryptedData' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'CreateEncryptedData' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'CreateEncryptedData' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'CreateEncryptedData' instead.")] #endif public unsafe SecStatusCode Encrypt (SecPadding padding, IntPtr plainText, nint plainTextLen, IntPtr cipherText, ref nint cipherTextLen) { @@ -1015,7 +999,6 @@ public SecStatusCode Encrypt (SecPadding padding, byte [] plainText, out byte [] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'SecKeyCreateDecryptedData' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'SecKeyCreateDecryptedData' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'SecKeyCreateDecryptedData' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'SecKeyCreateDecryptedData' instead.")] #endif [DllImport (Constants.SecurityLibrary)] unsafe extern static SecStatusCode SecKeyDecrypt (IntPtr handle, SecPadding padding, IntPtr cipherTextLen, nint cipherLen, IntPtr plainText, nint* plainTextLen); @@ -1032,7 +1015,6 @@ public SecStatusCode Encrypt (SecPadding padding, byte [] plainText, out byte [] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'CreateDecryptedData' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'CreateDecryptedData' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'CreateDecryptedData' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'CreateDecryptedData' instead.")] #endif public unsafe SecStatusCode Decrypt (SecPadding padding, IntPtr cipherText, nint cipherTextLen, IntPtr plainText, ref nint plainTextLen) { diff --git a/src/Security/Enums.cs b/src/Security/Enums.cs index 1ea3d7d6dea1..e8266599bef3 100644 --- a/src/Security/Enums.cs +++ b/src/Security/Enums.cs @@ -415,13 +415,11 @@ public enum SecPadding { [Obsolete ("Don't use hash algorithm.")] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] PKCS1MD2 = 0x8000, [Obsolete ("Don't use hash algorithm.")] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] PKCS1MD5 = 0x8001, @@ -471,7 +469,6 @@ public enum SecAuthenticationUI { [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Field ("kSecUseAuthenticationUIAllow")] Allow, @@ -479,7 +476,6 @@ public enum SecAuthenticationUI { [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Field ("kSecUseAuthenticationUIFail")] Fail, diff --git a/src/Security/Items.cs b/src/Security/Items.cs index 61313d88bb4c..6f49c0e74dfb 100644 --- a/src/Security/Items.cs +++ b/src/Security/Items.cs @@ -55,7 +55,7 @@ public enum SecKind { GenericPassword, Certificate, Key, - Identity + Identity, } // manually mapped to KeysAccessible @@ -89,14 +89,42 @@ public enum SecAccessible { [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'AfterFirstUnlockThisDeviceOnly' or a better suited option instead.")] #endif AlwaysThisDeviceOnly, - WhenPasscodeSetThisDeviceOnly + WhenPasscodeSetThisDeviceOnly, } public enum SecProtocol { Invalid = -1, - Ftp, FtpAccount, Http, Irc, Nntp, Pop3, Smtp, Socks, Imap, Ldap, AppleTalk, Afp, Telnet, Ssh, - Ftps, Https, HttpProxy, HttpsProxy, FtpProxy, Smb, Rtsp, RtspProxy, Daap, Eppc, Ipp, - Nntps, Ldaps, Telnets, Imaps, Ircs, Pop3s, + Ftp, + FtpAccount, + Http, + Irc, + Nntp, + Pop3, + Smtp, + Socks, + Imap, + Ldap, + AppleTalk, + Afp, + Telnet, + Ssh, + Ftps, + Https, + HttpProxy, + HttpsProxy, + FtpProxy, + Smb, + Rtsp, + RtspProxy, + Daap, + Eppc, + Ipp, + Nntps, + Ldaps, + Telnets, + Imaps, + Ircs, + Pop3s, } public enum SecAuthenticationType { @@ -712,8 +740,6 @@ public SecRecord (SecKind secKind) var kind = SecClass.FromSecKind (secKind); #if MONOMAC queryDict = NSMutableDictionary.LowlevelFromObjectAndKey (kind, SecClass.SecClassKey); -#elif WATCH - queryDict = NSMutableDictionary.LowlevelFromObjectAndKey (kind, SecClass.SecClassKey); #else // Apple changed/fixed this in iOS7 (not the only change, see comments above) // test suite has a test case that needs to work on both pre-7.0 and post-7.0 @@ -1071,7 +1097,7 @@ public SecAuthenticationUI AuthenticationUI { } } -#if !WATCH && !TVOS +#if !TVOS #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("macos")] @@ -1438,7 +1464,6 @@ public bool PersistentReference { #else [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] #endif public bool UseDataProtectionKeychain { get { diff --git a/src/Security/SecAccessControl.cs b/src/Security/SecAccessControl.cs index b39e98f7ee72..bea0f52636a8 100644 --- a/src/Security/SecAccessControl.cs +++ b/src/Security/SecAccessControl.cs @@ -94,7 +94,6 @@ public enum SecAccessControlCreateFlags : long { #else [NoiOS] [NoTV] - [NoWatch] #endif Watch = 1 << 5, @@ -106,7 +105,6 @@ public enum SecAccessControlCreateFlags : long { #else [NoiOS] [NoTV] - [NoWatch] #endif Companion = 1 << 5, diff --git a/src/Security/SecCertificate2.cs b/src/Security/SecCertificate2.cs index f8d128d78978..1ca0f1ba97e4 100644 --- a/src/Security/SecCertificate2.cs +++ b/src/Security/SecCertificate2.cs @@ -32,8 +32,6 @@ namespace Security { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public class SecCertificate2 : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Security/SecIdentity2.cs b/src/Security/SecIdentity2.cs index 6506619424f7..6db4f0df505b 100644 --- a/src/Security/SecIdentity2.cs +++ b/src/Security/SecIdentity2.cs @@ -32,8 +32,6 @@ namespace Security { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public class SecIdentity2 : NativeObject { #if NET @@ -95,7 +93,6 @@ public SecCertificate [] Certificates { [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -123,7 +120,6 @@ static void TrampolineAccessCertificates (IntPtr block, IntPtr cert) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif diff --git a/src/Security/SecProtocolMetadata.cs b/src/Security/SecProtocolMetadata.cs index c49c1d6448ed..1befc345609c 100644 --- a/src/Security/SecProtocolMetadata.cs +++ b/src/Security/SecProtocolMetadata.cs @@ -29,8 +29,6 @@ namespace Security { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public class SecProtocolMetadata : NativeObject { #if !NET @@ -64,7 +62,6 @@ internal SecProtocolMetadata (NativeHandle handle, bool owns) : base (handle, ow #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -81,7 +78,6 @@ internal SecProtocolMetadata (NativeHandle handle, bool owns) : base (handle, ow #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NegotiatedTlsProtocolVersion' instead.")] #endif public SslProtocol NegotiatedProtocolVersion => sec_protocol_metadata_get_negotiated_protocol_version (GetCheckedHandle ()); @@ -94,7 +90,6 @@ internal SecProtocolMetadata (NativeHandle handle, bool owns) : base (handle, ow #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.SecurityLibrary)] static extern TlsProtocolVersion sec_protocol_metadata_get_negotiated_tls_protocol_version (IntPtr handle); @@ -107,7 +102,6 @@ internal SecProtocolMetadata (NativeHandle handle, bool owns) : base (handle, ow #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public TlsProtocolVersion NegotiatedTlsProtocolVersion => sec_protocol_metadata_get_negotiated_tls_protocol_version (GetCheckedHandle ()); @@ -119,7 +113,6 @@ internal SecProtocolMetadata (NativeHandle handle, bool owns) : base (handle, ow #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif [DllImport (Constants.SecurityLibrary)] static extern TlsCipherSuite sec_protocol_metadata_get_negotiated_tls_ciphersuite (IntPtr handle); @@ -132,14 +125,12 @@ internal SecProtocolMetadata (NativeHandle handle, bool owns) : base (handle, ow #else [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] #endif public TlsCipherSuite NegotiatedTlsCipherSuite => sec_protocol_metadata_get_negotiated_tls_ciphersuite (GetCheckedHandle ()); #if !NET [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NegotiatedTlsCipherSuite' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NegotiatedTlsCipherSuite' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NegotiatedTlsCipherSuite' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NegotiatedTlsCipherSuite' instead.")] [DllImport (Constants.SecurityLibrary)] extern static SslCipherSuite sec_protocol_metadata_get_negotiated_ciphersuite (IntPtr handle); @@ -148,7 +139,6 @@ internal SecProtocolMetadata (NativeHandle handle, bool owns) : base (handle, ow #if !NET [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NegotiatedTlsCipherSuite' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NegotiatedTlsCipherSuite' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NegotiatedTlsCipherSuite' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NegotiatedTlsCipherSuite' instead.")] public SslCipherSuite NegotiatedCipherSuite => sec_protocol_metadata_get_negotiated_ciphersuite (GetCheckedHandle ()); #endif @@ -375,7 +365,6 @@ public void SetSignatureAlgorithmsForPeerHandler (Action callback) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -388,7 +377,6 @@ public void SetSignatureAlgorithmsForPeerHandler (Action callback) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -400,7 +388,6 @@ public void SetSignatureAlgorithmsForPeerHandler (Action callback) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -430,7 +417,6 @@ static void TrampolineAccessPreSharedKeys (IntPtr block, IntPtr psk, IntPtr psk_ [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif diff --git a/src/Security/SecProtocolOptions.cs b/src/Security/SecProtocolOptions.cs index 2e6d6d4d1a92..1d9540a00659 100644 --- a/src/Security/SecProtocolOptions.cs +++ b/src/Security/SecProtocolOptions.cs @@ -31,8 +31,6 @@ namespace Security { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public class SecProtocolOptions : NativeObject { #if !COREBUILD @@ -54,7 +52,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #if !NET [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] [DllImport (Constants.SecurityLibrary)] static extern void sec_protocol_options_add_tls_ciphersuite (sec_protocol_options_t handle, SslCipherSuite cipherSuite); @@ -63,7 +60,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #if !NET [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'AddTlsCipherSuite (TlsCipherSuite)' instead.")] [Unavailable (PlatformName.MacCatalyst)] public void AddTlsCipherSuite (SslCipherSuite cipherSuite) => sec_protocol_options_add_tls_ciphersuite (GetCheckedHandle (), cipherSuite); @@ -75,7 +71,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -88,7 +83,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -105,7 +99,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -122,7 +115,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'AddTlsCipherSuiteGroup (TlsCipherSuiteGroup)' instead.")] #endif public void AddTlsCipherSuiteGroup (SslCipherSuiteGroup cipherSuiteGroup) => sec_protocol_options_add_tls_ciphersuite_group (GetCheckedHandle (), cipherSuiteGroup); @@ -133,7 +125,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -146,7 +137,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -164,7 +154,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -182,7 +171,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'SetTlsMinVersion (TlsProtocolVersion)' instead.")] [Unavailable (PlatformName.MacCatalyst)] #endif @@ -194,7 +182,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -207,7 +194,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -225,7 +211,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -243,7 +228,6 @@ public void SetLocalIdentity (SecIdentity2 identity) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'SetTlsMaxVersion (TlsProtocolVersion)' instead.")] [Unavailable (PlatformName.MacCatalyst)] #endif @@ -255,7 +239,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -268,7 +251,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -281,7 +263,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -294,7 +275,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -306,7 +286,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -319,7 +298,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -331,7 +309,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -344,7 +321,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -356,7 +332,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -369,7 +344,6 @@ public void SetLocalIdentity (SecIdentity2 identity) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -409,7 +383,6 @@ public void SetTlsServerName (string serverName) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use non-DHE cipher suites instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use non-DHE cipher suites instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use non-DHE cipher suites instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use non-DHE cipher suites instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -427,7 +400,6 @@ public void SetTlsServerName (string serverName) #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use non-DHE cipher suites instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use non-DHE cipher suites instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use non-DHE cipher suites instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use non-DHE cipher suites instead.")] #endif public void SetTlsDiffieHellmanParameters (DispatchData parameters) @@ -516,7 +488,6 @@ public void SetKeyUpdateCallback (SecProtocolKeyUpdate keyUpdate, DispatchQueue [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -530,7 +501,6 @@ public void SetKeyUpdateCallback (SecProtocolKeyUpdate keyUpdate, DispatchQueue [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -547,7 +517,6 @@ public bool IsEqual (SecProtocolOptions other) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -566,7 +535,6 @@ static public bool IsEqual (SecProtocolOptions optionsA, SecProtocolOptions opti [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -579,7 +547,6 @@ static public bool IsEqual (SecProtocolOptions optionsA, SecProtocolOptions opti [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif diff --git a/src/Security/SecStatusCodeExtensions.cs b/src/Security/SecStatusCodeExtensions.cs index 37082b9ffde7..6c7d2e55d8f3 100644 --- a/src/Security/SecStatusCodeExtensions.cs +++ b/src/Security/SecStatusCodeExtensions.cs @@ -28,8 +28,6 @@ public static class SecStatusCodeExtensions { [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] -#else - [Watch (4, 3)] #endif [DllImport (Constants.SecurityLibrary)] extern static /* CFStringRef */ IntPtr SecCopyErrorMessageString ( @@ -41,8 +39,6 @@ public static class SecStatusCodeExtensions { [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] -#else - [Watch (4, 3)] #endif public static string GetStatusDescription (this SecStatusCode status) { diff --git a/src/Security/SecTrust.cs b/src/Security/SecTrust.cs index 9407c694d9c7..3dc024663192 100644 --- a/src/Security/SecTrust.cs +++ b/src/Security/SecTrust.cs @@ -178,7 +178,6 @@ public SecCertificate [] GetCustomAnchorCertificates () #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -212,7 +211,6 @@ static void TrampolineEvaluate (IntPtr block, IntPtr trust, SecTrustResult trust #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Evaluate (DispatchQueue, SecTrustWithErrorCallback)' instead.")] #endif [BindingImpl (BindingImplOptions.Optimizable)] @@ -242,7 +240,6 @@ public SecStatusCode Evaluate (DispatchQueue queue, SecTrustCallback handler) [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -273,7 +270,6 @@ static void TrampolineEvaluateError (IntPtr block, IntPtr trust, byte result, In [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -329,8 +325,6 @@ public SecTrustResult GetTrustResult () [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif [DllImport (Constants.SecurityLibrary)] unsafe static extern byte SecTrustEvaluateWithError (/* SecTrustRef */ IntPtr trust, /* CFErrorRef** */ IntPtr* error); @@ -340,8 +334,6 @@ public SecTrustResult GetTrustResult () [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public bool Evaluate (out NSError? error) { @@ -445,8 +437,6 @@ public void SetOCSPResponse (NSArray ocspResponses) [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 1, 1)] #endif [DllImport (Constants.SecurityLibrary)] static extern SecStatusCode /* OSStatus */ SecTrustSetSignedCertificateTimestamps (/* SecTrustRef* */ IntPtr trust, /* CFArrayRef* */ IntPtr sctArray); @@ -456,8 +446,6 @@ public void SetOCSPResponse (NSArray ocspResponses) [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 1, 1)] #endif public SecStatusCode SetSignedCertificateTimestamps (IEnumerable sct) { @@ -473,8 +461,6 @@ public SecStatusCode SetSignedCertificateTimestamps (IEnumerable sct) [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 1, 1)] #endif public SecStatusCode SetSignedCertificateTimestamps (NSArray sct) { diff --git a/src/Security/SecTrust2.cs b/src/Security/SecTrust2.cs index a88619b9563f..fec07746c4eb 100644 --- a/src/Security/SecTrust2.cs +++ b/src/Security/SecTrust2.cs @@ -32,8 +32,6 @@ namespace Security { [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public class SecTrust2 : NativeObject { [Preserve (Conditional = true)] diff --git a/src/Security/SecureTransport.cs b/src/Security/SecureTransport.cs index f433ef844682..01ce6e936ae2 100644 --- a/src/Security/SecureTransport.cs +++ b/src/Security/SecureTransport.cs @@ -10,7 +10,6 @@ namespace Security { /// Enumerates SSL protocols. [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'TlsProtocolVersion' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'TlsProtocolVersion' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'TlsProtocolVersion' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'TlsProtocolVersion' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'TlsProtocolVersion' instead.")] public enum SslProtocol { @@ -31,7 +30,7 @@ public enum SslProtocol { All = 6, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] // CF_ENUM(uint16_t, tls_protocol_version_t) [NativeName ("tls_protocol_version_t")] @@ -44,14 +43,13 @@ public enum TlsProtocolVersion : ushort { Dtls12 = 65277, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] // CF_ENUM(uint16_t, tls_ciphersuite_t) [NativeName ("tls_ciphersuite_t")] public enum TlsCipherSuite : ushort { [Deprecated (PlatformName.MacOSX, 15, 0)] [Deprecated (PlatformName.iOS, 18, 0)] - [Deprecated (PlatformName.WatchOS, 11, 0)] [Deprecated (PlatformName.TvOS, 18, 0)] [Deprecated (PlatformName.MacCatalyst, 18, 0)] RsaWith3desEdeCbcSha = 10, @@ -63,7 +61,6 @@ public enum TlsCipherSuite : ushort { RsaWithAes256CbcSha256 = 61, [Deprecated (PlatformName.MacOSX, 15, 0)] [Deprecated (PlatformName.iOS, 18, 0)] - [Deprecated (PlatformName.WatchOS, 11, 0)] [Deprecated (PlatformName.TvOS, 18, 0)] [Deprecated (PlatformName.MacCatalyst, 18, 0)] EcdheEcdsaWith3desEdeCbcSha = 49160, @@ -71,7 +68,6 @@ public enum TlsCipherSuite : ushort { EcdheEcdsaWithAes256CbcSha = 49162, [Deprecated (PlatformName.MacOSX, 15, 0)] [Deprecated (PlatformName.iOS, 18, 0)] - [Deprecated (PlatformName.WatchOS, 11, 0)] [Deprecated (PlatformName.TvOS, 18, 0)] [Deprecated (PlatformName.MacCatalyst, 18, 0)] EcdheRsaWith3desEdeCbcSha = 49170, @@ -92,7 +88,7 @@ public enum TlsCipherSuite : ushort { Chacha20Poly1305Sha256 = 4867 } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] // CF_ENUM(uint16_t, tls_ciphersuite_group_t) [NativeName ("tls_ciphersuite_group_t")] @@ -101,7 +97,7 @@ public enum TlsCipherSuiteGroup : ushort { Compatibility, Legacy, Ats, - AtsCompatibility + AtsCompatibility, } // subset of OSStatus (int) @@ -193,7 +189,6 @@ public enum SslStatus { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: Constants.UseNetworkInstead)] public enum SslSessionOption { BreakOnServerAuth, @@ -227,12 +222,11 @@ public enum SslSessionOption { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: Constants.UseNetworkInstead)] public enum SslAuthenticate { Never, Always, - Try + Try, } // Security.framework/Headers/SecureTransport.h @@ -241,7 +235,6 @@ public enum SslAuthenticate { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: Constants.UseNetworkInstead)] public enum SslProtocolSide { Server, @@ -254,11 +247,10 @@ public enum SslProtocolSide { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: Constants.UseNetworkInstead)] public enum SslConnectionType { Stream, - Datagram + Datagram, } // Security.framework/Headers/SecureTransport.h @@ -267,7 +259,6 @@ public enum SslConnectionType { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: Constants.UseNetworkInstead)] public enum SslSessionState { Invalid = -1, @@ -275,7 +266,7 @@ public enum SslSessionState { Handshake, Connected, Closed, - Aborted + Aborted, } // Security.framework/Headers/SecureTransport.h @@ -283,12 +274,11 @@ public enum SslSessionState { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: Constants.UseNetworkInstead)] public enum SslSessionStrengthPolicy { Default, ATSv1, - ATSv1NoPFS + ATSv1NoPFS, } // Security.framework/Headers/SecureTransport.h @@ -297,13 +287,12 @@ public enum SslSessionStrengthPolicy { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: Constants.UseNetworkInstead)] public enum SslClientCertificateState { None, Requested, Sent, - Rejected + Rejected, } #if !NET @@ -312,7 +301,6 @@ public enum SslClientCertificateState { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'TlsCipherSuite' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'TlsCipherSuite' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'TlsCipherSuite' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'TlsCipherSuite' instead.")] #if MONOMAC || __MACCATALYST__ public enum SslCipherSuite : uint { #else @@ -479,11 +467,14 @@ public enum SslCipherSuite : ushort { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'TlsCipherSuiteGroup' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'TlsCipherSuiteGroup' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'TlsCipherSuiteGroup' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'TlsCipherSuiteGroup' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'TlsCipherSuiteGroup' instead.")] // typedef CF_ENUM(int, SSLCiphersuiteGroup) public enum SslCipherSuiteGroup { - Default, Compatibility, Legacy, Ats, AtsCompatibility, + Default, + Compatibility, + Legacy, + Ats, + AtsCompatibility, } } diff --git a/src/Security/SslConnection.cs b/src/Security/SslConnection.cs index 6e2a401dcfbe..1d856ea40012 100644 --- a/src/Security/SslConnection.cs +++ b/src/Security/SslConnection.cs @@ -37,7 +37,6 @@ namespace Security { [Deprecated (PlatformName.MacOSX, 10, 15, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.iOS, 13, 0, message: Constants.UseNetworkInstead)] [Deprecated (PlatformName.TvOS, 13, 0, message: Constants.UseNetworkInstead)] - [Deprecated (PlatformName.WatchOS, 6, 0, message: Constants.UseNetworkInstead)] #endif public abstract class SslConnection : IDisposable { diff --git a/src/Security/SslContext.cs b/src/Security/SslContext.cs index f463b3086cba..5bcdc3eea542 100644 --- a/src/Security/SslContext.cs +++ b/src/Security/SslContext.cs @@ -39,7 +39,6 @@ namespace Security { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Network.framework' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Network.framework' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Network.framework' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Network.framework' instead.")] #endif public class SslContext : NativeObject { @@ -600,7 +599,6 @@ public static IntPtr GetTypeId () return SSLContextGetTypeID (); } -#if !WATCH // TODO: Headers say /* Deprecated, does nothing */ but we are not completly sure about it since there is no deprecation macro // Plus they added new members to SslSessionStrengthPolicy enum opened radar://23379052 https://trello.com/c/NbdTLVD3 // Xcode 8 beta 1: the P/Invoke was removed completely. @@ -622,7 +620,6 @@ public SslStatus SetSessionStrengthPolicy (SslSessionStrengthPolicy policyStreng Runtime.NSLog ("SetSessionStrengthPolicy is not available anymore."); return SslStatus.Success; } -#endif #endif // !XAMCORE_5_0 #if NET diff --git a/src/Security/Trust.cs b/src/Security/Trust.cs index 052aa3ce161c..7b8eca8eb722 100644 --- a/src/Security/Trust.cs +++ b/src/Security/Trust.cs @@ -143,7 +143,6 @@ void Initialize (IntPtr certHandle, SecPolicy? policy) #else [Deprecated (PlatformName.iOS, 12, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 12, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] #endif [DllImport (Constants.SecurityLibrary)] @@ -160,7 +159,6 @@ void Initialize (IntPtr certHandle, SecPolicy? policy) #else [Deprecated (PlatformName.iOS, 12, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 12, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, 1, message: "Use 'SecTrust.Evaluate (out NSError)' instead.")] #endif public SecTrustResult Evaluate () @@ -199,7 +197,6 @@ public int Count { [Deprecated (PlatformName.MacOSX, 12, 0)] [Deprecated (PlatformName.iOS, 15, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Deprecated (PlatformName.TvOS, 15, 0)] #endif [DllImport (Constants.SecurityLibrary)] @@ -218,7 +215,6 @@ public int Count { [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use the 'GetCertificateChain' method instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use the 'GetCertificateChain' method instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use the 'GetCertificateChain' method instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use the 'GetCertificateChain' method instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use the 'GetCertificateChain' method instead.")] #endif public SecCertificate this [nint index] { @@ -236,7 +232,6 @@ public SecCertificate this [nint index] { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -250,7 +245,6 @@ public SecCertificate this [nint index] { [SupportedOSPlatform ("ios15.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (8, 0)] [TV (15, 0)] [iOS (15, 0)] [MacCatalyst (15, 0)] @@ -271,7 +265,6 @@ public SecCertificate [] GetCertificateChain () [Deprecated (PlatformName.iOS, 14, 0)] [Deprecated (PlatformName.MacOSX, 11, 0)] [Deprecated (PlatformName.TvOS, 14, 0)] - [Deprecated (PlatformName.WatchOS, 7, 0)] #endif [DllImport (Constants.SecurityLibrary)] extern static IntPtr /* SecKeyRef */ SecTrustCopyPublicKey (IntPtr /* SecTrustRef */ trust); @@ -288,7 +281,6 @@ public SecCertificate [] GetCertificateChain () [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GetKey' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'GetKey' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'GetKey' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'GetKey' instead.")] #endif public SecKey GetPublicKey () { @@ -303,7 +295,6 @@ public SecKey GetPublicKey () #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif [DllImport (Constants.SecurityLibrary)] @@ -317,7 +308,6 @@ public SecKey GetPublicKey () #else [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] #endif public SecKey GetKey () diff --git a/src/SensorKit/SRAbsoluteTime.cs b/src/SensorKit/SRAbsoluteTime.cs index c02f3f4e057a..2fda80e6a14c 100644 --- a/src/SensorKit/SRAbsoluteTime.cs +++ b/src/SensorKit/SRAbsoluteTime.cs @@ -12,7 +12,6 @@ namespace SensorKit { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] #else - [NoWatch] [NoTV] [NoMac] [iOS (14, 0)] diff --git a/src/SensorKit/SRAmbientLightChromaticity.cs b/src/SensorKit/SRAmbientLightChromaticity.cs index ec51c4d52587..88be4919e65b 100644 --- a/src/SensorKit/SRAmbientLightChromaticity.cs +++ b/src/SensorKit/SRAmbientLightChromaticity.cs @@ -12,7 +12,6 @@ namespace SensorKit { [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("macos")] #else - [NoWatch] [NoTV] [NoMac] [iOS (14, 0)] diff --git a/src/SharedWithYouCore/SWCollaborationMetadata.cs b/src/SharedWithYouCore/SWCollaborationMetadata.cs index 5b19ae3145d2..7de69ce14f6d 100644 --- a/src/SharedWithYouCore/SWCollaborationMetadata.cs +++ b/src/SharedWithYouCore/SWCollaborationMetadata.cs @@ -12,7 +12,7 @@ using Foundation; using ObjCRuntime; -#if !TVOS && !WATCH +#if !TVOS namespace SharedWithYouCore { @@ -23,7 +23,7 @@ namespace SharedWithYouCore { [SupportedOSPlatform ("ios16.0")] [SupportedOSPlatform ("maccatalyst16.0")] #else - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] #endif public enum SWIdentifierType { Local, diff --git a/src/Social/Enums.cs b/src/Social/Enums.cs index d763f9f7acdc..3e80171b08c9 100644 --- a/src/Social/Enums.cs +++ b/src/Social/Enums.cs @@ -16,7 +16,10 @@ namespace Social { /// The HTTP verb associated with a social service request. [Native] public enum SLRequestMethod : long { - Get, Post, Delete, Put + Get, + Post, + Delete, + Put, } // NSInteger -> SLComposeViewController.h @@ -27,7 +30,8 @@ public enum SLRequestMethod : long { #endif [Native] public enum SLComposeViewControllerResult : long { - Cancelled, Done + Cancelled, + Done, } // note: those are NSString in iOS/OSX that we expose as an enum (i.e. it's NOT a native enum) @@ -40,7 +44,7 @@ public enum SLServiceKind { SinaWeibo, TencentWeibo, #if MONOMAC - LinkedIn + LinkedIn, #endif } } diff --git a/src/SpriteKit/Enums.cs b/src/SpriteKit/Enums.cs index 4d9f1f874f6e..789c695bda15 100644 --- a/src/SpriteKit/Enums.cs +++ b/src/SpriteKit/Enums.cs @@ -201,7 +201,6 @@ public enum SKTileAdjacencyMask : ulong { /// Enumerates the various ways a may be focusable. [NoMac] - [Watch (9, 0)] [MacCatalyst (13, 1)] [Native] public enum SKNodeFocusBehavior : long { diff --git a/src/SpriteKit/SKNode.cs b/src/SpriteKit/SKNode.cs index 1aa5723ceba2..55e5fd7172be 100644 --- a/src/SpriteKit/SKNode.cs +++ b/src/SpriteKit/SKNode.cs @@ -65,8 +65,6 @@ IEnumerator IEnumerable.GetEnumerator () [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public static SKNode? Create (string filename, Type [] types, out NSError error) { @@ -90,8 +88,6 @@ IEnumerator IEnumerable.GetEnumerator () [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] -#else - [Watch (5, 0)] #endif public static SKNode? Create (string filename, NSSet classes, out NSError error) { diff --git a/src/SpriteKit/SKUniform.cs b/src/SpriteKit/SKUniform.cs index c94d729dc8a1..5e99160b8605 100644 --- a/src/SpriteKit/SKUniform.cs +++ b/src/SpriteKit/SKUniform.cs @@ -32,7 +32,6 @@ #nullable enable -#if !WATCH namespace SpriteKit { public partial class SKUniform { @@ -283,4 +282,3 @@ public virtual Matrix4 FloatMatrix4Value { #endif // !NET } } -#endif // !WATCH diff --git a/src/SpriteKit/SKVideoNode.cs b/src/SpriteKit/SKVideoNode.cs index ed99c12f0a94..6ce66178d61b 100644 --- a/src/SpriteKit/SKVideoNode.cs +++ b/src/SpriteKit/SKVideoNode.cs @@ -13,7 +13,6 @@ #nullable enable -#if !WATCH namespace SpriteKit { public partial class SKVideoNode : SKNode { @@ -79,4 +78,3 @@ public SKVideoNode (NSUrl url) } } } -#endif // !WATCH diff --git a/src/StoreKit/Enums.cs b/src/StoreKit/Enums.cs index 2098329ca87e..1b9f9aded092 100644 --- a/src/StoreKit/Enums.cs +++ b/src/StoreKit/Enums.cs @@ -11,8 +11,6 @@ namespace StoreKit { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [Native] public enum SKPaymentTransactionState : long { @@ -21,7 +19,7 @@ public enum SKPaymentTransactionState : long { Failed, Restored, [MacCatalyst (13, 1)] - Deferred + Deferred, } // untyped enum and not used in API - so it _could_ be an `int` @@ -67,11 +65,15 @@ public enum SKError : long { // typedef NSInteger SKDownloadState; // StoreKit.framework/Headers/SKDownload.h /// An enumeration whose values specify the state of an object. Used with the property. - [Watch (6, 2)] [MacCatalyst (13, 1)] [Native] public enum SKDownloadState : long { - Waiting, Active, Paused, Finished, Failed, Cancelled + Waiting, + Active, + Paused, + Finished, + Failed, + Cancelled, } /// Enumerates authorization states for music store access. @@ -79,15 +81,13 @@ public enum SKDownloadState : long { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] public enum SKCloudServiceAuthorizationStatus : long { NotDetermined, Denied, Restricted, - Authorized + Authorized, } /// Enumerates flags that describe the user's local music library capabilities.. @@ -95,8 +95,6 @@ public enum SKCloudServiceAuthorizationStatus : long { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (7, 0)] [MacCatalyst (13, 1)] [Native] public enum SKCloudServiceCapability : ulong { @@ -112,8 +110,6 @@ public enum SKCloudServiceCapability : ulong { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum SKProductStorePromotionVisibility : long { @@ -123,12 +119,10 @@ public enum SKProductStorePromotionVisibility : long { } /// Defines the natural period for a subscription. - [Watch (6, 2)] [Deprecated (PlatformName.iOS, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] [MacCatalyst (13, 1)] [Native] public enum SKProductPeriodUnit : ulong { @@ -139,12 +133,10 @@ public enum SKProductPeriodUnit : ulong { } /// Enumerates how a discount price is applied. - [Watch (6, 2)] [Deprecated (PlatformName.iOS, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] [MacCatalyst (13, 1)] [Native] public enum SKProductDiscountPaymentMode : ulong { @@ -153,7 +145,7 @@ public enum SKProductDiscountPaymentMode : ulong { FreeTrial, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum SKOverlayPosition : long { @@ -161,7 +153,7 @@ public enum SKOverlayPosition : long { Raised = 1, } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] public enum SKAdNetworkCoarseConversionValue { [Field ("SKAdNetworkCoarseConversionValueHigh")] High, diff --git a/src/StoreKit/StoreProductParameters.cs b/src/StoreKit/StoreProductParameters.cs index 91762f17a011..beb44118d17b 100644 --- a/src/StoreKit/StoreProductParameters.cs +++ b/src/StoreKit/StoreProductParameters.cs @@ -27,8 +27,6 @@ #nullable enable -#if !WATCH - using System; using Foundation; @@ -75,5 +73,3 @@ public string? CampaignToken { #endif } } - -#endif // !MONOMAC diff --git a/src/Twitter/Enums.cs b/src/Twitter/Enums.cs index cae9606099b1..926de4ed96e8 100644 --- a/src/Twitter/Enums.cs +++ b/src/Twitter/Enums.cs @@ -17,7 +17,8 @@ namespace Twitter { // SLComposeViewControllerResult, which is a NSInteger -> SLComposeViewController.h, but a // sizeof(TWTweetComposeViewControllerResultDone) shows it's 4 bytes (on a 64 bits process) public enum TWTweetComposeViewControllerResult { - Cancelled, Done + Cancelled, + Done, } // untyped enum -> TWRequest.h where the values are equals to those of SLRequestMethod, @@ -28,6 +29,8 @@ public enum TWTweetComposeViewControllerResult { // which likely means it's internally used as a `SLRequestMethod` [Native] public enum TWRequestMethod : long { - Get, Post, Delete + Get, + Post, + Delete, } } diff --git a/src/UIKit/Compat.cs b/src/UIKit/Compat.cs index 743db952b1f7..ae66cd7f61b9 100644 --- a/src/UIKit/Compat.cs +++ b/src/UIKit/Compat.cs @@ -16,7 +16,7 @@ using ObjCRuntime; namespace UIKit { -#if !NET && !WATCH +#if !NET public partial class UIPresentationController { [Obsolete ("Removed in iOS10. Use '.ctor (UIViewController,UIViewController)'.")] @@ -45,7 +45,7 @@ public UIMarkupTextPrintFormatter () #endif -#if !NET && !WATCH +#if !NET public partial class UICollectionViewFocusUpdateContext { [Obsolete ("This cannot be directly created.")] public UICollectionViewFocusUpdateContext () { } diff --git a/src/UIKit/NSLayoutManager.cs b/src/UIKit/NSLayoutManager.cs index ad558cc45887..530730812d64 100644 --- a/src/UIKit/NSLayoutManager.cs +++ b/src/UIKit/NSLayoutManager.cs @@ -7,8 +7,6 @@ // Copyright 2013, Xamarin Inc // -#if !WATCH - using System; #if IOS using System.Drawing; @@ -69,13 +67,11 @@ public unsafe nuint GetGlyphs ( #if MONOMAC [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the overload that takes 'nint glyphCount' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the overload that takes 'nint glyphCount' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the overload that takes 'nint glyphCount' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the overload that takes 'nint glyphCount' instead.")] public unsafe void ShowGlyphs ( #else [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the 'ShowGlyphs' overload that takes 'nint glyphCount' instead.")] public unsafe void ShowCGGlyphs ( #endif // MONOMAC @@ -101,7 +97,6 @@ public unsafe void ShowCGGlyphs ( [SupportedOSPlatform ("ios13.0")] [SupportedOSPlatform ("maccatalyst")] #else - [Watch (6, 0)] [TV (13, 0)] [iOS (13, 0)] #endif @@ -213,5 +208,3 @@ public unsafe nuint GetLineFragmentInsertionPoints ( } } } - -#endif // !WATCH diff --git a/src/UIKit/NSTextAttachmentContainer.cs b/src/UIKit/NSTextAttachmentContainer.cs deleted file mode 100644 index b2432c94ef5b..000000000000 --- a/src/UIKit/NSTextAttachmentContainer.cs +++ /dev/null @@ -1,59 +0,0 @@ -#if __WATCHOS__ - -using System; -using System.Drawing; -using System.Diagnostics; -using System.ComponentModel; -using System.Threading.Tasks; -using System.Runtime.InteropServices; -using System.Diagnostics.CodeAnalysis; -using UIKit; -using CoreML; -using Network; -using SceneKit; -using CoreVideo; -using CoreMedia; -using SpriteKit; -using Foundation; -using ObjCRuntime; -using MediaPlayer; -using CoreGraphics; -using CoreLocation; -using AVFoundation; -using CoreFoundation; - -#nullable enable - -#if !NET -using NativeHandle = System.IntPtr; -#endif - -namespace UIKit { - [EditorBrowsable (EditorBrowsableState.Never)] - [Obsolete ("This type is not available on this platform.")] - public partial interface INSTextAttachmentContainer : INativeObject, IDisposable - { - } - - [EditorBrowsable (EditorBrowsableState.Never)] - [Obsolete ("This type is not available on this platform.")] - public class NSTextAttachmentContainer : NSObject, INSTextAttachmentContainer { - public NSTextAttachmentContainer () : base (NSObjectFlag.Empty) - { - throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); - } - - protected NSTextAttachmentContainer (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); - } - - protected internal NSTextAttachmentContainer (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.UnavailableOnWatchOS); - } - - } -} - -#endif // __WATCHOS__ diff --git a/src/UIKit/UIAccessibility.cs b/src/UIKit/UIAccessibility.cs index c4fd590a7708..96daee416d62 100644 --- a/src/UIKit/UIAccessibility.cs +++ b/src/UIKit/UIAccessibility.cs @@ -7,8 +7,6 @@ // Copyrigh 2012-2014, Xamarin Inc. // -#if !WATCH - using Foundation; using ObjCRuntime; using UIKit; @@ -591,5 +589,3 @@ public static UIAccessibilityHearingDeviceEar HearingDevicePairedEar { } - -#endif // !WATCH diff --git a/src/UIKit/UIAccessibilityCustomAction.cs b/src/UIKit/UIAccessibilityCustomAction.cs index fb3e348b3e62..3ba32f8849b0 100644 --- a/src/UIKit/UIAccessibilityCustomAction.cs +++ b/src/UIKit/UIAccessibilityCustomAction.cs @@ -7,8 +7,6 @@ // Copyright 2014 Xamarin Inc // -#if !WATCH - using System; using Foundation; using ObjCRuntime; @@ -60,5 +58,3 @@ public bool Probe (UIAccessibilityCustomAction customAction) } } - -#endif // !WATCH diff --git a/src/UIKit/UIAppearance.cs b/src/UIKit/UIAppearance.cs index 21ffdcb66ed8..da6d4b9a0b68 100644 --- a/src/UIKit/UIAppearance.cs +++ b/src/UIKit/UIAppearance.cs @@ -7,8 +7,6 @@ // Copyright 2011, 2015 Xamarin Inc // -#if !WATCH - using System; using System.Reflection; using System.Runtime.InteropServices; @@ -152,5 +150,3 @@ public static IntPtr GetAppearance (IntPtr class_ptr, UITraitCollection traits) } } } - -#endif // !WATCH diff --git a/src/UIKit/UIApplication.cs b/src/UIKit/UIApplication.cs index 0dcecb3da63f..4dd878d26f41 100644 --- a/src/UIKit/UIApplication.cs +++ b/src/UIKit/UIApplication.cs @@ -30,23 +30,12 @@ public UIKitThreadAccessException () : base ("UIKit Consistency error: you are c } } -#if WATCH - // There's no UIApplication on the watch, but we use the class extensively in bindings (EnsureUIThread, etc) - // so we include it as an internal type. - internal -#else - public -#endif - partial class UIApplication -#if !WATCH - : UIResponder -#endif - { + public partial class UIApplication + : UIResponder { static Thread? mainThread; public static bool CheckForIllegalCrossThreadCalls = true; public static bool CheckForEventAndDelegateMismatches = true; -#if !WATCH // We link with __Internal here so that this function is interposable from third-party native libraries. // See: https://github.com/xamarin/MicrosoftInTune/issues/3 for an example. [DllImport ("__Internal")] @@ -64,7 +53,6 @@ static int UIApplicationMain (int argc, /* char[]* */ string []? argv, /* NSStri Runtime.ThrowException (gchandle); return rv; } -#endif // called from NSExtension.Initialize (so other, future stuff, can be added if needed) // NOTE: must be called from the main thread, e.g. for extensions @@ -77,7 +65,6 @@ internal static void Initialize () mainThread = Thread.CurrentThread; } -#if !WATCH [Obsolete ("Use the overload with 'Type' instead of 'String' parameters for type safety.")] [EditorBrowsable (EditorBrowsableState.Never)] public static void Main (string []? args, string? principalClassName, string? delegateClassName) @@ -101,7 +88,6 @@ public static void Main (string []? args) Initialize (); UIApplicationMain (args?.Length ?? 0, args, IntPtr.Zero, IntPtr.Zero); } -#endif public static void EnsureUIThread () { @@ -126,7 +112,6 @@ internal static void EnsureDelegateAssignIsNotOverwritingInternalDelegate (objec } } -#if !WATCH public partial class UIContentSizeCategoryChangedEventArgs { public UIContentSizeCategory NewValue { get { @@ -134,5 +119,4 @@ public UIContentSizeCategory NewValue { } } } -#endif } diff --git a/src/UIKit/UIBarItem.cs b/src/UIKit/UIBarItem.cs index b510afcab7e4..41d7400fbc7d 100644 --- a/src/UIKit/UIBarItem.cs +++ b/src/UIKit/UIBarItem.cs @@ -7,8 +7,6 @@ // Copyright 2011, 2015 Xamarin Inc. // -#if !WATCH - using System; using ObjCRuntime; using Foundation; @@ -49,5 +47,3 @@ public virtual TextAttributes GetTitleTextAttributes (UIControlState state) } } } - -#endif // !WATCH diff --git a/src/UIKit/UIButton.cs b/src/UIKit/UIButton.cs index 2524b2fadb14..21bdc132fa36 100644 --- a/src/UIKit/UIButton.cs +++ b/src/UIKit/UIButton.cs @@ -7,8 +7,6 @@ // Copyright 2012, 2015 Xamarin Inc // -#if !WATCH - using System; using ObjCRuntime; @@ -37,5 +35,3 @@ private void VerifyIsUIButton () } } } - -#endif // !WATCH diff --git a/src/UIKit/UICellAccessory.cs b/src/UIKit/UICellAccessory.cs index af6f053e405d..43f0d9952c63 100644 --- a/src/UIKit/UICellAccessory.cs +++ b/src/UIKit/UICellAccessory.cs @@ -13,7 +13,6 @@ using ObjCRuntime; #nullable enable -#if !WATCH namespace UIKit { @@ -106,4 +105,3 @@ nuint Invoke (UICellAccessory [] accessories) } } /* class NIDUICellAccessoryPosition */ } -#endif // WATCH diff --git a/src/UIKit/UICollectionView.cs b/src/UIKit/UICollectionView.cs index e67978848110..f9399d76cb3c 100644 --- a/src/UIKit/UICollectionView.cs +++ b/src/UIKit/UICollectionView.cs @@ -7,8 +7,6 @@ // Miguel de Icaza // -#if !WATCH - using System; using ObjCRuntime; using Foundation; @@ -126,5 +124,3 @@ public UICollectionViewSource Source { } } } - -#endif // !WATCH diff --git a/src/UIKit/UICollectionViewLayout.cs b/src/UIKit/UICollectionViewLayout.cs index 4ff41c461ec0..e8d0c7858a03 100644 --- a/src/UIKit/UICollectionViewLayout.cs +++ b/src/UIKit/UICollectionViewLayout.cs @@ -7,8 +7,6 @@ // Copyrigh 2012, Xamarin Inc. // -#if !WATCH - using System; using Foundation; using ObjCRuntime; @@ -40,5 +38,3 @@ public UICollectionViewLayoutAttributes LayoutAttributesForSupplementaryView (UI } } } - -#endif // !WATCH diff --git a/src/UIKit/UICollectionViewLayoutAttributes.cs b/src/UIKit/UICollectionViewLayoutAttributes.cs index a4d6112c0007..98dc4179f67a 100644 --- a/src/UIKit/UICollectionViewLayoutAttributes.cs +++ b/src/UIKit/UICollectionViewLayoutAttributes.cs @@ -7,8 +7,6 @@ // Copyright 2013 Xamarin Inc // -#if !WATCH - using System; using System.Collections; using System.ComponentModel; @@ -76,5 +74,3 @@ public static T CreateForSupplementaryView (UICollectionElementKindSection se } } } - -#endif // !WATCH diff --git a/src/UIKit/UIConfigurationColorTransformer.cs b/src/UIKit/UIConfigurationColorTransformer.cs index 2590bdbd4bc1..81c0e6291582 100644 --- a/src/UIKit/UIConfigurationColorTransformer.cs +++ b/src/UIKit/UIConfigurationColorTransformer.cs @@ -13,7 +13,6 @@ using ObjCRuntime; #nullable enable -#if !WATCH namespace UIKit { @@ -88,4 +87,3 @@ UIColor Invoke (UIColor color) } } /* class NIDUIConfigurationColorTransformerHandler */ } -#endif // WATCH diff --git a/src/UIKit/UIContentSizeCategory.cs b/src/UIKit/UIContentSizeCategory.cs index 7c694a9a33ce..95737709289e 100644 --- a/src/UIKit/UIContentSizeCategory.cs +++ b/src/UIKit/UIContentSizeCategory.cs @@ -1,5 +1,3 @@ -#if !WATCH - using System; using System.Runtime.InteropServices; @@ -58,5 +56,3 @@ static public bool IsAccessibilityCategory (this UIContentSizeCategory self) } } } - -#endif // !WATCH diff --git a/src/UIKit/UIControl.cs b/src/UIKit/UIControl.cs index a0c60b0f7e44..7321c8670a39 100644 --- a/src/UIKit/UIControl.cs +++ b/src/UIKit/UIControl.cs @@ -7,8 +7,6 @@ // Copyright 2009 Novell, Inc // -#if !WATCH - using Foundation; using System; using System.Collections.Generic; @@ -275,5 +273,3 @@ public event EventHandler AllEvents { } } } - -#endif // !WATCH diff --git a/src/UIKit/UIDevice.cs b/src/UIKit/UIDevice.cs index 1b75151e83c5..afe3d44476c2 100644 --- a/src/UIKit/UIDevice.cs +++ b/src/UIKit/UIDevice.cs @@ -5,12 +5,7 @@ namespace UIKit { -#if WATCH - internal -#else - public -#endif - partial class UIDevice { + public partial class UIDevice { #if NET [SupportedOSPlatformGuard ("ios")] @@ -19,9 +14,7 @@ partial class UIDevice { #endif public bool CheckSystemVersion (int major, int minor) { -#if WATCH - return Runtime.CheckSystemVersion (major, minor, WatchKit.WKInterfaceDevice.CurrentDevice.SystemVersion); -#elif __MACCATALYST__ +#if __MACCATALYST__ return Runtime.CheckSystemVersion (major, minor, Runtime.iOSSupportVersion); #else return Runtime.CheckSystemVersion (major, minor, SystemVersion); diff --git a/src/UIKit/UIDragDropSessionExtensions.cs b/src/UIKit/UIDragDropSessionExtensions.cs index 44b0abb4044a..4e14a9c6aef1 100644 --- a/src/UIKit/UIDragDropSessionExtensions.cs +++ b/src/UIKit/UIDragDropSessionExtensions.cs @@ -7,7 +7,7 @@ // Copyright 2017 Microsoft // -#if !TVOS && !WATCH +#if !TVOS using System; using ObjCRuntime; diff --git a/src/UIKit/UIDynamicAnimator.cs b/src/UIKit/UIDynamicAnimator.cs index 1b24910d0a88..5f0f5d956370 100644 --- a/src/UIKit/UIDynamicAnimator.cs +++ b/src/UIKit/UIDynamicAnimator.cs @@ -7,8 +7,6 @@ // Copyright 2013 Xamarin Inc // -#if !WATCH - using System.Collections; using System.Collections.Generic; @@ -45,5 +43,3 @@ IEnumerator IEnumerable.GetEnumerator () } } } - -#endif // WATCH diff --git a/src/UIKit/UIEnums.cs b/src/UIKit/UIEnums.cs index 70eee2e7f997..e5a727f5acd6 100644 --- a/src/UIKit/UIEnums.cs +++ b/src/UIKit/UIEnums.cs @@ -17,7 +17,6 @@ namespace UIKit { /// An enumeration of values used to specify video quality. [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIImagePickerControllerQualityType : long { High, @@ -25,12 +24,11 @@ public enum UIImagePickerControllerQualityType : long { Low, At640x480, At1280x720, - At960x540 + At960x540, } // NSInteger -> UIActivityIndicatorView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIActivityIndicatorViewStyle : long { [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Large' instead.")] @@ -63,18 +61,16 @@ public enum UIActivityIndicatorViewStyle : long { /// [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIAlertViewStyle : long { Default, SecureTextInput, PlainTextInput, - LoginAndPasswordInput + LoginAndPasswordInput, } // NSInteger -> UIBarButtonItem.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIBarButtonItemStyle : long { Plain, @@ -89,7 +85,6 @@ public enum UIBarButtonItemStyle : long { // NSInteger -> UIBarButtonItem.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIBarButtonSystemItem : long { Done, @@ -129,7 +124,6 @@ public enum UIBarButtonSystemItem : long { // NSUInteger -> UIControl.h [Native ("UIControlEvents")] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UIControlEvent : ulong { TouchDown = 1 << 0, @@ -157,12 +151,11 @@ public enum UIControlEvent : ulong { AllEditingEvents = 0x000F0000, ApplicationReserved = 0x0F000000, SystemReserved = 0xF0000000, - AllEvents = 0xFFFFFFFF + AllEvents = 0xFFFFFFFF, } // NSInteger -> UIEvent.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIEventType : long { Touches, @@ -183,7 +176,6 @@ public enum UIEventType : long { // NSInteger -> UIEvent.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIEventSubtype : long { None, @@ -203,7 +195,6 @@ public enum UIEventSubtype : long { // NSInteger -> UIControl.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIControlContentVerticalAlignment : long { Center = 0, @@ -214,7 +205,6 @@ public enum UIControlContentVerticalAlignment : long { // NSInteger -> UIControl.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIControlContentHorizontalAlignment : long { Center = 0, @@ -222,13 +212,12 @@ public enum UIControlContentHorizontalAlignment : long { Right = 2, Fill = 3, Leading = 4, - Trailing = 5 + Trailing = 5, } // NSUInteger -> UIControl.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UIControlState : ulong { Normal = 0, @@ -238,7 +227,7 @@ public enum UIControlState : ulong { [MacCatalyst (13, 1)] Focused = 1 << 3, Application = 0x00FF0000, - Reserved = 0xFF000000 + Reserved = 0xFF000000, } // NSInteger -> UIImage.h @@ -257,7 +246,6 @@ public enum UIImageOrientation : long { // NSUInteger -> UIView.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UIViewAutoresizing : ulong { None = 0, @@ -269,23 +257,21 @@ public enum UIViewAutoresizing : ulong { FlexibleBottomMargin = 1 << 5, FlexibleMargins = FlexibleBottomMargin | FlexibleTopMargin | FlexibleLeftMargin | FlexibleRightMargin, FlexibleDimensions = FlexibleHeight | FlexibleWidth, - All = 63 + All = 63, } // NSInteger -> UIView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIViewAnimationCurve : long { EaseInOut, EaseIn, EaseOut, - Linear + Linear, } // NSInteger -> UIView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIViewContentMode : long { ScaleToFill, @@ -305,7 +291,6 @@ public enum UIViewContentMode : long { // NSInteger -> UIView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIViewAnimationTransition : long { None, @@ -317,7 +302,6 @@ public enum UIViewAnimationTransition : long { // NSInteger -> UIBarCommon.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIBarMetrics : long { Default, @@ -333,12 +317,11 @@ public enum UIBarMetrics : long { [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'UIBarMetrics.CompactPrompt' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'UIBarMetrics.CompactPrompt' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UIBarMetrics.CompactPrompt' instead.")] - LandscapePhonePrompt = CompactPrompt + LandscapePhonePrompt = CompactPrompt, } // NSInteger -> UIButton.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIButtonType : long { Custom, @@ -370,7 +353,6 @@ public enum UILineBreakMode : long { // NSInteger -> UIStringDrawing.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIBaselineAdjustment : long { AlignBaselines = 0, @@ -383,7 +365,6 @@ public enum UIBaselineAdjustment : long { /// Valid modes for the . [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIDatePickerMode : long { Time, @@ -399,7 +380,6 @@ public enum UIDatePickerMode : long { /// The current device orientation. [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIDeviceOrientation : long { Unknown, @@ -408,7 +388,7 @@ public enum UIDeviceOrientation : long { LandscapeLeft, LandscapeRight, FaceUp, - FaceDown + FaceDown, } // NSInteger -> UIDevice.h @@ -418,7 +398,6 @@ public enum UIDeviceOrientation : long { /// [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIDeviceBatteryState : long { Unknown, @@ -431,10 +410,12 @@ public enum UIDeviceBatteryState : long { /// An enumeration indicating what kind of change has occurred to a . [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIDocumentChangeKind : long { - Done, Undone, Redone, Cleared + Done, + Undone, + Redone, + Cleared, } // NSInteger -> UIDocument.h @@ -444,10 +425,10 @@ public enum UIDocumentChangeKind : long { /// [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIDocumentSaveOperation : long { - ForCreating, ForOverwriting + ForCreating, + ForOverwriting, } // NSUInteger -> UIDocument.h @@ -455,7 +436,6 @@ public enum UIDocumentSaveOperation : long { [Native] [Flags] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIDocumentState : ulong { Normal = 0, @@ -463,13 +443,12 @@ public enum UIDocumentState : ulong { InConflict = 1 << 1, SavingError = 1 << 2, EditingDisabled = 1 << 3, - ProgressAvailable = 1 << 4 + ProgressAvailable = 1 << 4, } // NSInteger -> UIImagePickerController.h /// An enumeration of values used to specify the source using by the . [Native] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] public enum UIImagePickerControllerSourceType : long { @@ -488,34 +467,34 @@ public enum UIImagePickerControllerSourceType : long { /// Specifies whether the camera will capture still images or video. /// [Native] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] public enum UIImagePickerControllerCameraCaptureMode : long { - Photo, Video + Photo, + Video, } // NSInteger -> UIImagePickerController.h /// An enumeration of values used by and related functions. /// Used to differentiate between front (screen-side) and rear cameras. [Native] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] public enum UIImagePickerControllerCameraDevice : long { Rear, - Front + Front, } // NSInteger -> UIImagePickerController.h /// An enumeration of values used by /// Determines whether the flash will be on, off, or as-needed. [Native] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] public enum UIImagePickerControllerCameraFlashMode : long { - Off = -1, Auto = 0, On = 1 + Off = -1, + Auto = 0, + On = 1, } // NSInteger -> UIInterface.h @@ -524,7 +503,6 @@ public enum UIImagePickerControllerCameraFlashMode : long { /// The style used for , , and . /// [Native] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] public enum UIBarStyle : long { @@ -544,7 +522,6 @@ public enum UIBarStyle : long { // NSInteger -> UIProgressView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIProgressViewStyle : long { Default, @@ -555,17 +532,15 @@ public enum UIProgressViewStyle : long { // NSInteger -> UIScrollView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIScrollViewIndicatorStyle : long { Default, Black, - White + White, } // NSInteger -> UITextInputTraits.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextAutocapitalizationType : long { None, @@ -576,7 +551,6 @@ public enum UITextAutocapitalizationType : long { // NSInteger -> UITextInputTraits.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextAutocorrectionType : long { Default, @@ -586,7 +560,6 @@ public enum UITextAutocorrectionType : long { // NSInteger -> UITextInputTraits.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIKeyboardType : long { Default, @@ -602,14 +575,13 @@ public enum UIKeyboardType : long { Twitter, WebSearch, [MacCatalyst (13, 1)] - AsciiCapableNumberPad + AsciiCapableNumberPad, } // NSInteger -> UISegmentedControl.h /// The visual style for a . [Native] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "This no longer has any effect.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This no longer has any effect.")] @@ -617,12 +589,11 @@ public enum UISegmentedControlStyle : long { Plain, Bordered, Bar, - Bezeled + Bezeled, } // NSInteger -> UITabBarItem.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITabBarSystemItem : long { More, @@ -641,7 +612,6 @@ public enum UITabBarSystemItem : long { // NSInteger -> UITableView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewStyle : long { Plain, @@ -653,18 +623,16 @@ public enum UITableViewStyle : long { // NSInteger -> UITableView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewScrollPosition : long { None, Top, Middle, - Bottom + Bottom, } // NSInteger -> UITableView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewRowAnimation : long { Fade, @@ -674,22 +642,22 @@ public enum UITableViewRowAnimation : long { Bottom, None, Middle, - Automatic = 100 + Automatic = 100, } // #defines over UIBarPosition -> NSInteger -> UIBarCommon.h /// An enumeration of the valid positions for a . [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIToolbarPosition : long { - Any, Bottom, Top + Any, + Bottom, + Top, } // NSInteger -> UITouch.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITouchPhase : long { Began, @@ -708,7 +676,6 @@ public enum UITouchPhase : long { RegionExited, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITouchType : long { @@ -720,7 +687,6 @@ public enum UITouchType : long { IndirectPointer, } - [NoWatch] [MacCatalyst (13, 1)] [Native] [Flags] @@ -752,18 +718,17 @@ public enum UITextAlignment : long { Right, Justified, - Natural + Natural, } // NSInteger -> UITableViewCell.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewCellStyle : long { Default, Value1, Value2, - Subtitle + Subtitle, } // NSInteger -> UITableViewCell.h @@ -771,7 +736,6 @@ public enum UITableViewCellStyle : long { /// The cell separator style is set via a table view's property. [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewCellSeparatorStyle : long { None, @@ -779,33 +743,30 @@ public enum UITableViewCellSeparatorStyle : long { [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SingleLine' for a single line separator.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SingleLine' for a single line separator.")] SingleLineEtched, - DoubleLineEtched = SingleLineEtched + DoubleLineEtched = SingleLineEtched, } // NSInteger -> UITableViewCell.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewCellSelectionStyle : long { None, Blue, Gray, - Default + Default, } // NSInteger -> UITableViewCell.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewCellEditingStyle : long { None, Delete, - Insert + Insert, } // NSInteger -> UITableViewCell.h [Native ("UITableViewCellAccessoryType")] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewCellAccessory : long { None, @@ -816,45 +777,41 @@ public enum UITableViewCellAccessory : long { Checkmark, [NoTV] [MacCatalyst (13, 1)] - DetailButton + DetailButton, } // NSUInteger -> UITableViewCell.h [Native ("UITableViewCellStateMask")] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UITableViewCellState : ulong { DefaultMask = 0, ShowingEditControlMask = 1 << 0, - ShowingDeleteConfirmationMask = 1 << 1 + ShowingDeleteConfirmationMask = 1 << 1, } // NSInteger -> UITextField.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextBorderStyle : long { None, Line, Bezel, - RoundedRect + RoundedRect, } // NSInteger -> UITextField.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextFieldViewMode : long { Never, WhileEditing, UnlessEditing, - Always + Always, } // NSInteger -> UIViewController.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIModalTransitionStyle : long { CoverVertical = 0, @@ -864,7 +821,7 @@ public enum UIModalTransitionStyle : long { CrossDissolve, [NoTV] [MacCatalyst (13, 1)] - PartialCurl + PartialCurl, } // NSInteger -> UIApplication.h @@ -875,14 +832,13 @@ public enum UIModalTransitionStyle : long { /// [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIInterfaceOrientation : long { Unknown = UIDeviceOrientation.Unknown, Portrait = UIDeviceOrientation.Portrait, PortraitUpsideDown = UIDeviceOrientation.PortraitUpsideDown, LandscapeLeft = UIDeviceOrientation.LandscapeRight, - LandscapeRight = UIDeviceOrientation.LandscapeLeft + LandscapeRight = UIDeviceOrientation.LandscapeLeft, } // NSUInteger -> UIApplication.h @@ -893,7 +849,6 @@ public enum UIInterfaceOrientation : long { [Native] [Flags] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIInterfaceOrientationMask : ulong { Portrait = 1 << (int) UIInterfaceOrientation.Portrait, @@ -909,7 +864,6 @@ public enum UIInterfaceOrientationMask : ulong { // NSInteger -> UIApplication.h /// An enumeration of navigation types for use in a . [Native] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] public enum UIWebViewNavigationType : long { @@ -918,7 +872,7 @@ public enum UIWebViewNavigationType : long { BackForward, Reload, FormResubmitted, - Other + Other, } // NSUInteger -> UIApplication.h @@ -927,7 +881,6 @@ public enum UIWebViewNavigationType : long { [Native ("UIDataDetectorTypes")] [Flags] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIDataDetectorType : ulong { PhoneNumber = 1 << 0, @@ -941,13 +894,13 @@ public enum UIDataDetectorType : ulong { FlightNumber = 1 << 5, [MacCatalyst (13, 1)] LookupSuggestion = 1 << 6, - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] Money = 1 << 7, - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] PhysicalValue = 1uL << 8, None = 0, - All = UInt64.MaxValue + All = UInt64.MaxValue, } // NSInteger -> UIActionSheet.h @@ -961,7 +914,6 @@ public enum UIDataDetectorType : ulong { /// [Native] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -979,7 +931,6 @@ public enum UIActionSheetStyle : long { /// [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIStatusBarStyle : long { Default, @@ -1003,17 +954,15 @@ public enum UIStatusBarStyle : long { /// An enumeration of animations available when the status bar is hidden or made visible. [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIStatusBarAnimation : long { None, Fade, - Slide + Slide, } // NSInteger -> UIGestureRecognizer.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIGestureRecognizerState : long { Possible, @@ -1023,7 +972,7 @@ public enum UIGestureRecognizerState : long { Cancelled, Failed, - Recognized = Ended + Recognized = Ended, } // NSUInteger -> UIApplication.h @@ -1031,30 +980,27 @@ public enum UIGestureRecognizerState : long { [Native] [Flags] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIRemoteNotificationType : ulong { None = 0, Badge = 1 << 0, Sound = 1 << 1, Alert = 1 << 2, - NewsstandContentAvailability = 1 << 3 + NewsstandContentAvailability = 1 << 3, } // NSInteger -> UITextInputTraits.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIKeyboardAppearance : long { Default, Alert, Dark = Alert, - Light + Light, } // NSInteger -> UITextInputTraits.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIReturnKeyType : long { Default, @@ -1068,12 +1014,11 @@ public enum UIReturnKeyType : long { Yahoo, Done, EmergencyCall, - Continue + Continue, } // NSInteger -> UIViewController.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIModalPresentationStyle : long { None = -1, @@ -1103,7 +1048,6 @@ public enum UIModalPresentationStyle : long { // NSUInteger -> UISwipeGestureRecognizer.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UISwipeGestureRecognizerDirection : ulong { Right = 1 << 0, @@ -1115,7 +1059,6 @@ public enum UISwipeGestureRecognizerDirection : ulong { // NSUInteger -> UIPopoverController.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPopoverArrowDirection : ulong { Up = 1 << 0, @@ -1123,14 +1066,13 @@ public enum UIPopoverArrowDirection : ulong { Left = 1 << 2, Right = 1 << 3, Any = Up | Down | Left | Right, - Unknown = UInt64.MaxValue + Unknown = UInt64.MaxValue, }; // NSInteger -> UIMenuController.h /// An enumeration indicating in which direction the arrow of the points. [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIMenuControllerArrowDirection : long { Default, @@ -1148,20 +1090,19 @@ public enum UIRectCorner : ulong { TopRight = 1 << 1, BottomLeft = 1 << 2, BottomRight = 1 << 3, - AllCorners = ~(ulong) 0 + AllCorners = ~(ulong) 0, } // NSInteger -> UIApplication.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIUserInterfaceLayoutDirection : long { - LeftToRight, RightToLeft + LeftToRight, + RightToLeft, } // NSInteger -> UIDevice.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIUserInterfaceIdiom : long { Unspecified = -1, @@ -1169,27 +1110,25 @@ public enum UIUserInterfaceIdiom : long { Pad, TV, CarPlay, - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] Mac = 5, - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] Vision = 6, } // NSInteger -> UIApplication.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIApplicationState : long { Active, Inactive, - Background + Background, } // NSInteger -> UIView.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UIViewAnimationOptions : ulong { LayoutSubviews = 1 << 0, @@ -1229,7 +1168,6 @@ public enum UIViewAnimationOptions : ulong { // note: it looks unused by any API /// An enumeration of error codes from the printing system. [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [ErrorDomain ("UIPrintErrorDomain")] public enum UIPrintError { @@ -1243,7 +1181,6 @@ public enum UIPrintError { /// An enumeration of duplex modes supported by the printer. [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPrintInfoDuplex : long { None, @@ -1255,7 +1192,6 @@ public enum UIPrintInfoDuplex : long { /// An enumeration of printing orientations. [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPrintInfoOrientation : long { Portrait, @@ -1266,18 +1202,16 @@ public enum UIPrintInfoOrientation : long { /// An enumeration of print content types (e.g., general, photo, grayscale). [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPrintInfoOutputType : long { General, Photo, Grayscale, - PhotoGrayscale + PhotoGrayscale, } // NSInteger -> UIAccessibility.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIAccessibilityScrollDirection : long { Right = 1, @@ -1285,31 +1219,33 @@ public enum UIAccessibilityScrollDirection : long { Up, Down, Next, - Previous + Previous, } // NSInteger -> UIScreen.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIScreenOverscanCompensation : long { - Scale, InsetBounds, + Scale, + InsetBounds, None, [Obsolete ("Use 'UIScreenOverscanCompensation.None' instead.")] - InsetApplicationFrame = None + InsetApplicationFrame = None, } // NSInteger -> UISegmentedControl.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UISegmentedControlSegment : long { - Any, Left, Center, Right, Alone + Any, + Left, + Center, + Right, + Alone, } // NSInteger -> UISearchBar.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UISearchBarIcon : long { Search, @@ -1321,75 +1257,81 @@ public enum UISearchBarIcon : long { Bookmark, [NoTV] [MacCatalyst (13, 1)] - ResultsList + ResultsList, } // NSInteger -> UIPageViewController.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPageViewControllerNavigationOrientation : long { - Horizontal, Vertical + Horizontal, + Vertical, } // NSInteger -> UIPageViewController.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPageViewControllerSpineLocation : long { - None, Min, Mid, Max + None, + Min, + Mid, + Max, } // NSInteger -> UIPageViewController.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPageViewControllerNavigationDirection : long { - Forward, Reverse + Forward, + Reverse, } // NSInteger -> UIPageViewController.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPageViewControllerTransitionStyle : long { - PageCurl, Scroll + PageCurl, + Scroll, } // NSInteger -> UITextInputTraits.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextSpellCheckingType : long { - Default, No, Yes, + Default, + No, + Yes, } // NSInteger -> UITextInput.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextStorageDirection : long { - Forward, Backward + Forward, + Backward, } // NSInteger -> UITextInput.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextLayoutDirection : long { Right = 2, Left, Up, - Down + Down, } // Sum of UITextStorageDirection and UITextLayoutDirection // NSInteger -> UITextInput.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextDirection : long { - Forward, Backward, Right, Left, Up, Down + Forward, + Backward, + Right, + Left, + Up, + Down, } #if !NET @@ -1397,7 +1339,6 @@ public enum UITextDirection : long { // Use Foundation.NSWritingDirection in .NET. // see: https://github.com/xamarin/xamarin-macios/issues/6573 [Native] - [NoWatch] public enum UITextWritingDirection : long { Natural = -1, LeftToRight, @@ -1407,7 +1348,6 @@ public enum UITextWritingDirection : long { // NSInteger -> UITextInput.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITextGranularity : long { Character, @@ -1415,13 +1355,12 @@ public enum UITextGranularity : long { Sentence, Paragraph, Line, - Document + Document, } // float (and not even a CGFloat) -> NSLayoutConstraint.h // the API were fixed (a long time ago to use `float`) and the enum // values can still be used (and useful) since they will be casted - [NoWatch] [MacCatalyst (13, 1)] public enum UILayoutPriority { Required = 1000, @@ -1441,16 +1380,18 @@ public enum UILayoutPriority { // NSInteger -> NSLayoutConstraint.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UICollectionUpdateAction : long { - Insert, Delete, Reload, Move, None + Insert, + Delete, + Reload, + Move, + None, } // NSUInteger -> UICollectionView.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UICollectionViewScrollPosition : ulong { None, @@ -1459,23 +1400,23 @@ public enum UICollectionViewScrollPosition : ulong { Bottom = 1 << 2, Left = 1 << 3, CenteredHorizontally = 1 << 4, - Right = 1 << 5 + Right = 1 << 5, } // NSInteger -> UICollectionViewFlowLayout.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UICollectionViewScrollDirection : long { - Vertical, Horizontal + Vertical, + Horizontal, } // NSInteger -> UICollectionViewFlowLayout.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UILayoutConstraintAxis : long { - Horizontal, Vertical + Horizontal, + Vertical, } // NSInteger -> UIImage.h @@ -1485,23 +1426,24 @@ public enum UILayoutConstraintAxis : long { [Native] #endif public enum UIImageResizingMode : long { - Tile, Stretch + Tile, + Stretch, } // NSUInteger -> UICollectionViewLayout.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UICollectionElementCategory : ulong { - Cell, SupplementaryView, DecorationView + Cell, + SupplementaryView, + DecorationView, } // that's a convenience enum that maps to UICollectionElementKindSection[Footer|Header] which are NSString - [NoWatch] [MacCatalyst (13, 1)] public enum UICollectionElementKindSection { Header, - Footer + Footer, } // uint64_t -> UIAccessibilityConstants.h @@ -1534,24 +1476,24 @@ public enum UIAccessibilityTrait : long { public enum UIImageRenderingMode : long { Automatic, AlwaysOriginal, - AlwaysTemplate + AlwaysTemplate, } // NSInteger -> UIMotionEffect.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIInterpolatingMotionEffectType : long { TiltAlongHorizontalAxis, - TiltAlongVerticalAxis + TiltAlongVerticalAxis, } // NSInteger -> UINavigationController.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UINavigationControllerOperation : long { - None, Push, Pop + None, + Push, + Pop, } // NSInteger -> UIActivity.h @@ -1561,37 +1503,38 @@ public enum UINavigationControllerOperation : long { /// [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIActivityCategory : long { - Action, Share + Action, + Share, } // NSInteger -> UIAttachmentBehavior.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIAttachmentBehaviorType : long { - Items, Anchor + Items, + Anchor, } // NSInteger -> UIBarCommon.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIBarPosition : long { - Any, Bottom, Top, TopAttached, + Any, + Bottom, + Top, + TopAttached, } // NSUInteger -> UICollisionBehavior.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UICollisionBehaviorMode : ulong { Items = 1, Boundaries = 2, - Everything = UInt64.MaxValue + Everything = UInt64.MaxValue, } // uint32_t -> UIFontDescriptor.h @@ -1619,13 +1562,12 @@ public enum UIFontDescriptorSymbolicTraits : uint { ClassSansSerif = 8U << 28, ClassOrnamentals = 9U << 28, ClassScripts = 10U << 28, - ClassSymbolic = 12U << 28 + ClassSymbolic = 12U << 28, } // NSInteger -> UIResponder.h [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum UIKeyModifierFlags : long { AlphaShift = 1 << 16, // This bit indicates CapsLock @@ -1638,7 +1580,6 @@ public enum UIKeyModifierFlags : long { // NSInteger -> UIScrollView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIScrollViewKeyboardDismissMode : long { None, @@ -1652,17 +1593,16 @@ public enum UIScrollViewKeyboardDismissMode : long { // NSInteger -> UIWebView.h /// An enumeration whose values specify whether a 's should break by columns or page. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIWebPaginationBreakingMode : long { - Page, Column + Page, + Column, } // NSInteger -> UIWebView.h /// An enumeration whose values specify valid page-break modes for the 's property. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -1671,31 +1611,28 @@ public enum UIWebPaginationMode : long { LeftToRight, TopToBottom, BottomToTop, - RightToLeft + RightToLeft, } // NSInteger -> UIPushBehavior.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPushBehaviorMode : long { Continuous, - Instantaneous + Instantaneous, } // NSInteger -> UITabBar.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UITabBarItemPositioning : long { Automatic, Fill, - Centered + Centered, } // NSUInteger -> UIView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIViewKeyframeAnimationOptions : ulong { LayoutSubviews = UIViewAnimationOptions.LayoutSubviews, @@ -1710,25 +1647,23 @@ public enum UIViewKeyframeAnimationOptions : ulong { CalculationModeDiscrete = 1 << 10, CalculationModePaced = 2 << 10, CalculationModeCubic = 3 << 10, - CalculationModeCubicPaced = 4 << 10 + CalculationModeCubicPaced = 4 << 10, } // NSInteger -> UIView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIViewTintAdjustmentMode : long { Automatic, Normal, - Dimmed + Dimmed, } // NSUInteger -> UIView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UISystemAnimation : ulong { - Delete + Delete, } // NSUInteger -> UIGeometry.h @@ -1739,7 +1674,7 @@ public enum UIRectEdge : ulong { Left = 1 << 1, Bottom = 1 << 2, Right = 1 << 3, - All = Top | Left | Bottom | Right + All = Top | Left | Bottom | Right, } // Xamarin.iOS home-grown define @@ -1748,58 +1683,56 @@ public enum NSTextEffect { LetterPressStyle, // An unkonwn value, the real value can be fetched using the WeakTextEffect: Apple added a new effect and the bindings are old. - UnknownUseWeakEffect + UnknownUseWeakEffect, } // NSUInteger -> UISearchBar.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UISearchBarStyle : ulong { Default, Prominent, - Minimal + Minimal, } // NSInteger -> UIInputView.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIInputViewStyle : long { Default, - Keyboard + Keyboard, } [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIUserInterfaceSizeClass : long { Unspecified = 0, Compact = 1, - Regular = 2 + Regular = 2, } [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIAlertActionStyle : long { - Default, Cancel, Destructive + Default, + Cancel, + Destructive, } [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIAlertControllerStyle : long { ActionSheet, - Alert + Alert, } [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIBlurEffectStyle : long { - ExtraLight, Light, Dark, - [NoiOS, NoWatch] + ExtraLight, + Light, + Dark, + [NoiOS] [NoMacCatalyst] ExtraDark, [MacCatalyst (13, 1)] @@ -1856,7 +1789,6 @@ public enum UIBlurEffectStyle : long { /// Enumerates various types of printing tasks. Used with . [Native] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPrinterJobTypes : long { Unknown = 0, @@ -1867,12 +1799,11 @@ public enum UIPrinterJobTypes : long { Receipt = 1 << 4, Roll = 1 << 5, LargeFormat = 1 << 6, - Postcard = 1 << 7 + Postcard = 1 << 7, } /// Enumerates the various types of user notification. Can be "OR"ed together as flags. [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNAuthorizationOptions' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UNAuthorizationOptions' instead.")] @@ -1882,49 +1813,45 @@ public enum UIUserNotificationType : ulong { None = 0, Badge = 1 << 0, Sound = 1 << 1, - Alert = 1 << 2 + Alert = 1 << 2, } /// Whether a should run the app in foreground or background mode. [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNNotificationActionOptions' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UNNotificationActionOptions' instead.")] [Native] public enum UIUserNotificationActivationMode : ulong { Foreground, - Background + Background, } /// Enumerates the amount of space available for a . Used with [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNNotificationCategory.Actions' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UNNotificationCategory.Actions' instead.")] [Native] public enum UIUserNotificationActionContext : ulong { Default, - Minimal + Minimal, } /// Enumerates the insertion points for custom menu items. [Deprecated (PlatformName.iOS, 11, 0)] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Native] public enum UIDocumentMenuOrder : ulong { First, - Last + Last, } /// Enumerates the types of file transfer operations used by the document picker. [Deprecated (PlatformName.iOS, 14, 0, message: "Use the designated constructors instead.")] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use the designated constructors instead.")] [Native] @@ -1932,7 +1859,7 @@ public enum UIDocumentPickerMode : ulong { Import, Open, ExportToService, - MoveToService + MoveToService, } [MacCatalyst (13, 1)] @@ -1941,11 +1868,10 @@ public enum UIAccessibilityNavigationStyle : long { Automatic = 0, Separate = 1, - Combined = 2 + Combined = 2, } [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UISplitViewControllerDisplayMode : long { Automatic, @@ -1987,19 +1913,20 @@ public enum UISplitViewControllerDisplayMode : long { /// Enumerates characteristics of the button displayed in a table row. Used with the C:UIKit.UITableViewRowAction(UIKit.UITableViewRowActionStyle,string ,Action`1,Foundation.NSIndexPath) constructor. [Native] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'UIContextualActionStyle' and corresponding APIs instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UIContextualActionStyle' and corresponding APIs instead.")] public enum UITableViewRowActionStyle : long { - Default, Destructive = Default, Normal + Default, + Destructive = Default, + Normal, } // Utility enum for UITransitionContext[To|From]ViewKey - [NoWatch] [MacCatalyst (13, 1)] public enum UITransitionViewControllerKind { - ToView, FromView + ToView, + FromView, } // note [Native] since it maps to UIFontWeightConstants fields (CGFloat) @@ -2016,7 +1943,7 @@ public enum UIFontWeight { Black, } - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] public enum UIFontWidth { Condensed, Standard, @@ -2024,7 +1951,6 @@ public enum UIFontWidth { Compressed, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIStackViewDistribution : long { @@ -2032,10 +1958,9 @@ public enum UIStackViewDistribution : long { FillEqually, FillProportionally, EqualSpacing, - EqualCentering + EqualCentering, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIStackViewAlignment : long { @@ -2046,7 +1971,7 @@ public enum UIStackViewAlignment : long { Center, Trailing, Bottom = Trailing, - LastBaseline + LastBaseline, } [MacCatalyst (13, 1)] @@ -2054,12 +1979,11 @@ public enum UIStackViewAlignment : long { [Flags] public enum NSWritingDirectionFormatType : long { Embedding = 0 << 1, - Override = 1 << 1 + Override = 1 << 1, } /// Enumerates desired page cutting behavior for roll-feed printers. [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIPrinterCutterBehavior : long { @@ -2067,22 +1991,20 @@ public enum UIPrinterCutterBehavior : long { PrinterDefault, CutAfterEachPage, CutAfterEachCopy, - CutAfterEachJob + CutAfterEachJob, } /// Enumerates whether the user may respond to a user notification with text input. [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNNotificationAction' or 'UNTextInputNotificationAction' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UNNotificationAction' or 'UNTextInputNotificationAction' instead.")] [Native] public enum UIUserNotificationActionBehavior : ulong { Default, - TextInput + TextInput, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UISemanticContentAttribute : long { @@ -2090,35 +2012,33 @@ public enum UISemanticContentAttribute : long { Playback, Spatial, ForceLeftToRight, - ForceRightToLeft + ForceRightToLeft, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIDynamicItemCollisionBoundsType : ulong { Rectangle, Ellipse, - Path + Path, } [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIForceTouchCapability : long { Unknown = 0, Unavailable = 1, - Available = 2 + Available = 2, } [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIPreviewActionStyle : long { - Default, Selected, Destructive + Default, + Selected, + Destructive, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIPressPhase : long { @@ -2126,10 +2046,9 @@ public enum UIPressPhase : long { Changed, Stationary, Ended, - Cancelled + Cancelled, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIPressType : long { @@ -2154,80 +2073,71 @@ public enum UIPressType : long { TVRemoteFourColors = 33, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITableViewCellFocusStyle : long { Default, - Custom + Custom, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIDisplayGamut : long { Unspecified = -1, Srgb, - P3 + P3, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITraitEnvironmentLayoutDirection : long { Unspecified = -1, LeftToRight = UIUserInterfaceLayoutDirection.LeftToRight, - RightToLeft = UIUserInterfaceLayoutDirection.RightToLeft + RightToLeft = UIUserInterfaceLayoutDirection.RightToLeft, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIUserInterfaceStyle : long { Unspecified, Light, - Dark + Dark, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITextItemInteraction : long { InvokeDefaultAction, PresentActions, - Preview + Preview, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIViewAnimatingState : long { Inactive, Active, - Stopped + Stopped, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIViewAnimatingPosition : long { End, Start, - Current + Current, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITimingCurveType : long { Builtin, Cubic, Spring, - Composed + Composed, } /// Enumerates the ear (or ears) for which the accessibility device is paired. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -2235,15 +2145,14 @@ public enum UIAccessibilityHearingDeviceEar : ulong { None = 0, Left = 1 << 1, Right = 1 << 2, - Both = Left | Right + Both = Left | Right, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIAccessibilityCustomRotorDirection : long { Previous, - Next + Next, } #if NET @@ -2252,7 +2161,6 @@ public enum UIAccessibilityCustomRotorDirection : long { #else // Xcode 8.2 beta 1 added __TVOS_PROHIBITED but we need to keep it for binary compatibility #endif - [NoWatch] [MacCatalyst (13, 1)] [Native] [Flags] @@ -2261,10 +2169,9 @@ public enum UICloudSharingPermissionOptions : ulong { AllowPublic = 1 << 0, AllowPrivate = 1 << 1, AllowReadOnly = 1 << 2, - AllowReadWrite = 1 << 3 + AllowReadWrite = 1 << 3, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITextFieldDidEndEditingReason : long { @@ -2272,25 +2179,23 @@ public enum UITextFieldDidEndEditingReason : long { Committed, [NoiOS] [NoMacCatalyst] - Cancelled + Cancelled, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIScrollViewIndexDisplayMode : long { Automatic, - AlwaysHidden + AlwaysHidden, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIScrollViewContentInsetAdjustmentBehavior : long { Automatic, ScrollableAxes, Never, - Always + Always, } [MacCatalyst (13, 1)] @@ -2300,39 +2205,35 @@ public enum UIAccessibilityContainerType : long { DataTable, List, Landmark, - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] SemanticGroup, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITextSmartQuotesType : long { Default, No, - Yes + Yes, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITextSmartDashesType : long { Default, No, - Yes + Yes, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITextSmartInsertDeleteType : long { Default, No, - Yes + Yes, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIAccessibilityCustomSystemRotorType : long { @@ -2354,203 +2255,196 @@ public enum UIAccessibilityCustomSystemRotorType : long { TextField, Table, List, - Landmark + Landmark, } /// Enumerates drag activity drop resolutions. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIDropOperation : ulong { Cancel = 0, Forbidden = 1, Copy = 2, - Move = 3 + Move = 3, } /// Enumerates behaviors when dragging text. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] [Flags] public enum UITextDragOptions : long { None = 0, - StripTextColorFromPreviews = (1 << 0) + StripTextColorFromPreviews = (1 << 0), } /// Enumerates behaviors in response to dropped text. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UITextDropAction : ulong { Insert = 0, ReplaceSelection, - ReplaceAll + ReplaceAll, } /// Enumerates text drop progress notification styles. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UITextDropProgressMode : ulong { System = 0, - Custom + Custom, } /// Enumerates behaviors for noneditable views when receiving dropped text. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UITextDropEditability : ulong { No = 0, Temporary, - Yes + Yes, } /// Enumerates collection view reorganization speeds for drop animations. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UICollectionViewReorderingCadence : long { Immediate, Fast, - Slow + Slow, } /// Enumerates drop actions. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UICollectionViewDropIntent : long { Unspecified, InsertAtDestinationIndexPath, - InsertIntoDestinationIndexPath + InsertIntoDestinationIndexPath, } /// Enumerates drag operation states. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UICollectionViewCellDragState : long { None, Lifting, - Dragging + Dragging, } /// Enumerates presets for exporting images. [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'PHPicker' instead.")] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'PHPicker' instead.")] [Native] public enum UIImagePickerControllerImageUrlExportPreset : long { Compatible = 0, - Current + Current, } /// Enumerates action button styles. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIContextualActionStyle : long { Normal, - Destructive + Destructive, } /// Enumerates cell states while the cell is involved in a drag operation. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UITableViewCellDragState : long { None, Lifting, - Dragging + Dragging, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITableViewSeparatorInsetReference : long { CellEdges, - AutomaticInsets + AutomaticInsets, } /// Enumerates drop handling options. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UITableViewDropIntent : long { Unspecified, InsertAtDestinationIndexPath, InsertIntoDestinationIndexPath, - Automatic + Automatic, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UISplitViewControllerPrimaryEdge : long { Leading, - Trailing + Trailing, } /// Enumerates drop progress indicator styles. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIDropSessionProgressIndicatorStyle : ulong { None, - Default + Default, } /// Enumerates states for spring-loaded interactions. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UISpringLoadedInteractionEffectState : long { Inactive, Possible, Activating, - Activated + Activated, } /// Enumerates the import modes of the document browser. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIDocumentBrowserImportMode : ulong { None, Copy, - Move + Move, } /// Enumerates document browser styles. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIDocumentBrowserUserInterfaceStyle : ulong { White = 0, Light, - Dark + Dark, } /// Enumerates allowable action locations. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] [Flags] public enum UIDocumentBrowserActionAvailability : long { Menu = 1, - NavigationBar = 1 << 1 + NavigationBar = 1 << 1, } /// Enumerates the type responsible for the drop operation. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UITextDropPerformer : ulong { @@ -2558,7 +2452,6 @@ public enum UITextDropPerformer : ulong { Delegate, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UINavigationItemLargeTitleDisplayMode : long { @@ -2569,7 +2462,6 @@ public enum UINavigationItemLargeTitleDisplayMode : long { Inline, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UICollectionViewFlowLayoutSectionInsetReference : long { @@ -2579,7 +2471,6 @@ public enum UICollectionViewFlowLayoutSectionInsetReference : long { } /// Enumerates how the data from a should be presented. - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -2590,7 +2481,7 @@ public enum UIPreferredPresentationStyle : long { } /// Enumerates the document browser error code. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Native] [ErrorDomain ("UIDocumentBrowserErrorDomain")] @@ -2599,7 +2490,6 @@ public enum UIDocumentBrowserErrorCode : long { NoLocationAvailable = 2, } - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIGraphicsImageRendererFormatRange : long { @@ -2610,17 +2500,17 @@ public enum UIGraphicsImageRendererFormatRange : long { } /// Enumerates print failure reasons. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIPrintErrorCode : long { NotAvailableError = 1, NoContentError, UnknownImageFormatError, - JobFailedError + JobFailedError, } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [ErrorDomain ("UISceneErrorDomain")] [Native] @@ -2631,7 +2521,7 @@ public enum UISceneErrorCode : long { GeometryRequestDenied, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIImageSymbolScale : long { @@ -2642,7 +2532,7 @@ public enum UIImageSymbolScale : long { Large, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIImageSymbolWeight : long { @@ -2658,7 +2548,7 @@ public enum UIImageSymbolWeight : long { Black, } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UISceneActivationState : long { @@ -2668,7 +2558,7 @@ public enum UISceneActivationState : long { Background, } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIMenuElementState : long { @@ -2677,7 +2567,7 @@ public enum UIMenuElementState : long { Mixed, } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIMenuElementAttributes : ulong { @@ -2689,19 +2579,19 @@ public enum UIMenuElementAttributes : ulong { } [Flags] - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIMenuOptions : ulong { DisplayInline = 1uL << 0, Destructive = 1uL << 1, - [iOS (15, 0), TV (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] SingleSelection = 1uL << 5, - [iOS (17, 0), TV (17, 0), NoWatch, MacCatalyst (17, 0)] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] DisplayAsPalette = 1uL << 7, } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIContextMenuInteractionCommitStyle : long { @@ -2709,7 +2599,7 @@ public enum UIContextMenuInteractionCommitStyle : long { Pop, } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] public enum UIWindowSceneSessionRole { [Field ("UIWindowSceneSessionRoleApplication")] @@ -2719,7 +2609,6 @@ public enum UIWindowSceneSessionRole { ExternalDisplay, [NoTV] - [NoWatch] [MacCatalyst (13, 1)] #if HAS_CARPLAY [Field ("CPTemplateApplicationSceneSessionRoleApplication", "CarPlay")] @@ -2731,7 +2620,7 @@ public enum UIWindowSceneSessionRole { ExternalDisplayNonInteractive, } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] public enum UIMenuIdentifier { [DefaultEnumValue] @@ -2844,7 +2733,7 @@ public enum UIMenuIdentifier { Open, } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] public enum UIAccessibilityTextualContext { [Field ("UIAccessibilityTextualContextWordProcessing")] @@ -2863,7 +2752,7 @@ public enum UIAccessibilityTextualContext { Console, } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UICollectionLayoutSectionOrthogonalScrollingBehavior : long { @@ -2875,7 +2764,7 @@ public enum UICollectionLayoutSectionOrthogonalScrollingBehavior : long { GroupPagingCentered, } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIAccessibilityContrast : long { @@ -2884,7 +2773,7 @@ public enum UIAccessibilityContrast : long { High, } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UILegibilityWeight : long { @@ -2893,7 +2782,7 @@ public enum UILegibilityWeight : long { Bold, } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIUserInterfaceLevel : long { @@ -2902,7 +2791,7 @@ public enum UIUserInterfaceLevel : long { Elevated, } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIEditingInteractionConfiguration : long { @@ -2910,7 +2799,7 @@ public enum UIEditingInteractionConfiguration : long { Default = 1, } - [NoTV, NoWatch, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UISplitViewControllerBackgroundStyle : long { @@ -2918,7 +2807,7 @@ public enum UISplitViewControllerBackgroundStyle : long { Sidebar, } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UITabBarItemAppearanceStyle : long { @@ -2927,7 +2816,7 @@ public enum UITabBarItemAppearanceStyle : long { CompactInline, } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UITextAlternativeStyle : long { @@ -2935,7 +2824,7 @@ public enum UITextAlternativeStyle : long { LowConfidence, } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UITextInteractionMode : long { @@ -2943,7 +2832,7 @@ public enum UITextInteractionMode : long { NonEditable, } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIVibrancyEffectStyle : long { @@ -2957,7 +2846,7 @@ public enum UIVibrancyEffectStyle : long { Separator, } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum UIWindowSceneDismissalAnimation : long { @@ -2966,7 +2855,7 @@ public enum UIWindowSceneDismissalAnimation : long { Decline = 3, } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] public enum UIActivityItemsConfigurationInteraction { [Field ("UIActivityItemsConfigurationInteractionShare")] @@ -2976,7 +2865,7 @@ public enum UIActivityItemsConfigurationInteraction { Copy, } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] public enum UIActivityItemsConfigurationPreviewIntent { [Field ("UIActivityItemsConfigurationPreviewIntentFullSize")] @@ -2985,7 +2874,7 @@ public enum UIActivityItemsConfigurationPreviewIntent { Thumbnail, } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Native] public enum UIDatePickerStyle : long { @@ -2998,7 +2887,7 @@ public enum UIDatePickerStyle : long { } [Introduced (PlatformName.MacCatalyst, 13, 4)] - [iOS (13, 4), NoWatch, TV (13, 4)] + [iOS (13, 4), TV (13, 4)] [Native ("UIKeyboardHIDUsage")] public enum UIKeyboardHidUsage : long { KeyboardErrorRollOver = 1, @@ -3183,7 +3072,7 @@ public enum UIKeyboardHidUsage : long { KeyboardZenkakuHankakuKanji = KeyboardLang5, } - [Flags, NoWatch, NoTV, iOS (13, 4)] + [Flags, NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Native] public enum UIEventButtonMask : ulong { @@ -3191,7 +3080,7 @@ public enum UIEventButtonMask : ulong { Secondary = 1L << 1, } - [Flags, TV (13, 4), Watch (6, 2), iOS (13, 4)] + [Flags, TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Native] public enum UIAxis : ulong { @@ -3201,7 +3090,7 @@ public enum UIAxis : ulong { Both = (Horizontal | Vertical), } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Native] public enum UIScrollType : long { @@ -3209,7 +3098,7 @@ public enum UIScrollType : long { Continuous, } - [Flags, NoWatch, NoTV, iOS (13, 4)] + [Flags, NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Native] public enum UIScrollTypeMask : ulong { @@ -3218,7 +3107,7 @@ public enum UIScrollTypeMask : ulong { All = Discrete | Continuous, } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Native] public enum UIPointerEffectTintMode : long { @@ -3227,7 +3116,7 @@ public enum UIPointerEffectTintMode : long { Underlay, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UIButtonRole : long { @@ -3237,7 +3126,7 @@ public enum UIButtonRole : long { Destructive, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICellAccessoryDisplayedState : long { @@ -3246,7 +3135,7 @@ public enum UICellAccessoryDisplayedState : long { WhenNotEditing, } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICellAccessoryOutlineDisclosureStyle : long { @@ -3255,7 +3144,7 @@ public enum UICellAccessoryOutlineDisclosureStyle : long { Cell, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICellAccessoryPlacement : long { @@ -3263,7 +3152,7 @@ public enum UICellAccessoryPlacement : long { Trailing, } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICellConfigurationDragState : long { @@ -3272,7 +3161,7 @@ public enum UICellConfigurationDragState : long { Dragging, } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICellConfigurationDropState : long { @@ -3281,7 +3170,7 @@ public enum UICellConfigurationDropState : long { Targeted, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICollectionLayoutListAppearance : long { @@ -3300,7 +3189,7 @@ public enum UICollectionLayoutListAppearance : long { #endif } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICollectionLayoutListHeaderMode : long { @@ -3309,7 +3198,7 @@ public enum UICollectionLayoutListHeaderMode : long { FirstItemInSection, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UIContentInsetsReference : long { @@ -3320,7 +3209,7 @@ public enum UIContentInsetsReference : long { ReadableContent, } - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UIContextMenuInteractionAppearance : long { @@ -3329,7 +3218,7 @@ public enum UIContextMenuInteractionAppearance : long { Compact, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UIUserInterfaceActiveAppearance : long { @@ -3338,7 +3227,7 @@ public enum UIUserInterfaceActiveAppearance : long { Active, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UIListContentTextAlignment : long { @@ -3347,7 +3236,7 @@ public enum UIListContentTextAlignment : long { Justified, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UIPageControlInteractionState : long { @@ -3356,7 +3245,7 @@ public enum UIPageControlInteractionState : long { Continuous = 2, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UIPageControlBackgroundStyle : long { @@ -3366,9 +3255,9 @@ public enum UIPageControlBackgroundStyle : long { } #if XAMCORE_5_0 - [iOS (14, 0), TV (14, 0), NoWatch, NoMacCatalyst] + [iOS (14, 0), TV (14, 0), NoMacCatalyst] #else - [iOS (14, 0), TV (14, 0), NoWatch] + [iOS (14, 0), TV (14, 0)] [MacCatalyst (14, 0)] [Obsoleted (PlatformName.MacCatalyst, 17, 4, message: Constants.ApiRemovedGeneral)] #endif @@ -3446,7 +3335,7 @@ public enum UIPasteboardDetectionPattern { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [Native] public enum UISceneCollectionJoinBehavior : long { Automatic, @@ -3455,7 +3344,7 @@ public enum UISceneCollectionJoinBehavior : long { PreferredWithoutActivating, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UISplitViewControllerStyle : long { @@ -3464,7 +3353,7 @@ public enum UISplitViewControllerStyle : long { TripleColumn, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UISplitViewControllerColumn : long { @@ -3474,7 +3363,7 @@ public enum UISplitViewControllerColumn : long { Compact, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UISplitViewControllerSplitBehavior : long { @@ -3484,7 +3373,7 @@ public enum UISplitViewControllerSplitBehavior : long { Displace, } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UISwitchStyle : long { @@ -3493,7 +3382,7 @@ public enum UISwitchStyle : long { Sliding, } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UICollectionLayoutListFooterMode : long { @@ -3502,7 +3391,7 @@ public enum UICollectionLayoutListFooterMode : long { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [Native] public enum UITitlebarSeparatorStyle : long { Automatic, @@ -3511,7 +3400,7 @@ public enum UITitlebarSeparatorStyle : long { Shadow, } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum UINavigationItemBackButtonDisplayMode : long { @@ -3522,14 +3411,13 @@ public enum UINavigationItemBackButtonDisplayMode : long { // NSInteger -> UIGuidedAccessRestrictions.h [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum UIGuidedAccessRestrictionState : long { Allow, Deny, } - [TV (15, 0), iOS (15, 0), NoWatch, MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] public enum UIActionIdentifier { [DefaultEnumValue] [Field (null)] @@ -3548,7 +3436,7 @@ public enum UIActionIdentifier { PasteAndSearch, } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIBandSelectionInteractionState : long { Possible = 0, @@ -3557,7 +3445,7 @@ public enum UIBandSelectionInteractionState : long { Ended, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIBehavioralStyle : ulong { Automatic = 0, @@ -3565,7 +3453,7 @@ public enum UIBehavioralStyle : ulong { Mac, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIButtonConfigurationSize : long { Medium, @@ -3574,7 +3462,7 @@ public enum UIButtonConfigurationSize : long { Large, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIButtonConfigurationTitleAlignment : long { Automatic, @@ -3583,7 +3471,7 @@ public enum UIButtonConfigurationTitleAlignment : long { Trailing, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIButtonConfigurationCornerStyle : long { Fixed = -1, @@ -3594,7 +3482,7 @@ public enum UIButtonConfigurationCornerStyle : long { Capsule, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIButtonConfigurationMacIdiomStyle : long { Automatic, @@ -3603,7 +3491,7 @@ public enum UIButtonConfigurationMacIdiomStyle : long { BorderlessTinted, } - [NoTV, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIFocusGroupPriority : long { Ignored = 0, @@ -3612,7 +3500,7 @@ public enum UIFocusGroupPriority : long { CurrentlyFocused = Int64.MaxValue, } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIFocusHaloEffectPosition : long { Automatic = 0, @@ -3620,7 +3508,7 @@ public enum UIFocusHaloEffectPosition : long { Inside, } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] public enum UISheetPresentationControllerDetentIdentifier { [DefaultEnumValue] [Field (null)] @@ -3633,7 +3521,7 @@ public enum UISheetPresentationControllerDetentIdentifier { Large, } - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum UIWindowScenePresentationStyle : ulong { Automatic, diff --git a/src/UIKit/UIEvent.cs b/src/UIKit/UIEvent.cs index 21558a3a5c94..d860e44033d8 100644 --- a/src/UIKit/UIEvent.cs +++ b/src/UIKit/UIEvent.cs @@ -7,8 +7,6 @@ // Copyright 2012, Xamarin Inc // -#if !WATCH - using System; using ObjCRuntime; using Foundation; @@ -22,5 +20,3 @@ public override string ToString () } } } - -#endif // !WATCH diff --git a/src/UIKit/UIFont.cs b/src/UIKit/UIFont.cs index 8cf5b59b441c..6770c4164925 100644 --- a/src/UIKit/UIFont.cs +++ b/src/UIKit/UIFont.cs @@ -167,7 +167,7 @@ public static UIFont PreferredCallout { [SupportedOSPlatform ("maccatalyst16.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Watch (9, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif static nfloat GetFontWidth (UIFontWidth width) { @@ -266,7 +266,6 @@ public static UIFont GetPreferredFontForTextStyle (UIFontTextStyle uiFontTextSty return GetPreferredFontForTextStyle (uiFontTextStyle.GetConstant ()); } -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -287,7 +286,6 @@ public static UIFont GetPreferredFontForTextStyle (UIFontTextStyle uiFontTextSty { return GetPreferredFontForTextStyle (uiFontTextStyle.GetConstant (), traitCollection); } -#endif #if NET [SupportedOSPlatform ("ios")] @@ -317,7 +315,7 @@ public static UIFont SystemFontOfSize (nfloat size) [SupportedOSPlatform ("maccatalyst16.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Watch (9, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] #endif public static UIFont SystemFontOfSize (nfloat fontSize, UIFontWeight weight, UIFontWidth width) { diff --git a/src/UIKit/UIFontDescriptor.cs b/src/UIKit/UIFontDescriptor.cs index 8e1a07392dd5..a664eb14d1df 100644 --- a/src/UIKit/UIFontDescriptor.cs +++ b/src/UIKit/UIFontDescriptor.cs @@ -22,12 +22,10 @@ public UIFontAttributes () { } #if !COREBUILD public UIFontAttributes (NSDictionary dictionary) : base (dictionary) { } -#if !WATCH public UIFontAttributes (params UIFontFeature [] features) { FeatureSettings = features; } -#endif public string Family { get { @@ -168,7 +166,6 @@ public NSDictionary [] WeakFeatureSettings { } } -#if !WATCH public UIFontFeature [] FeatureSettings { get { var dictArray = WeakFeatureSettings; @@ -184,7 +181,6 @@ public UIFontFeature [] FeatureSettings { Dictionary [UIFontDescriptor.FeatureSettingsAttribute] = NSArray.FromNativeObjects (value); } } -#endif #endif } @@ -407,7 +403,6 @@ public NSDictionary [] WeakFeatureSettings { } } -#if !WATCH public UIFontFeature [] FeatureSettings { get { var dictArray = WeakFeatureSettings; @@ -420,12 +415,22 @@ public UIFontFeature [] FeatureSettings { return strong; } } -#endif } // that's a convenience enum that maps to UIFontDescriptorXXX which are internal (hidden) NSString public enum UIFontDescriptorAttribute { - Family, Face, Name, Size, VisibleName, Matrix, CharacterSet, CascadeList, Traits, FixedAdvance, FeatureSettings, TextStyle + Family, + Face, + Name, + Size, + VisibleName, + Matrix, + CharacterSet, + CascadeList, + Traits, + FixedAdvance, + FeatureSettings, + TextStyle, } public class UIFontTraits : DictionaryContainer { diff --git a/src/UIKit/UIFontFeature.cs b/src/UIKit/UIFontFeature.cs index b60d1156b00a..9daeb8da8d94 100644 --- a/src/UIKit/UIFontFeature.cs +++ b/src/UIKit/UIFontFeature.cs @@ -9,7 +9,6 @@ #nullable enable -#if !WATCH using System; using Foundation; @@ -231,4 +230,3 @@ public UIFontFeature (CTFontFeatureUpperCase.Selector featureSelector) : this (F public UIFontFeature (CTFontFeatureCJKRomanSpacing.Selector featureSelector) : this (FontFeatureGroup.CJKRomanSpacing, (int) featureSelector, featureSelector) { } } } -#endif diff --git a/src/UIKit/UIGestureRecognizer.cs b/src/UIKit/UIGestureRecognizer.cs index 4de1a9f81f48..367dab2b3076 100644 --- a/src/UIKit/UIGestureRecognizer.cs +++ b/src/UIKit/UIGestureRecognizer.cs @@ -8,8 +8,6 @@ // Copyright 2011-2013 Xamarin Inc. All rights reserved // -#if !WATCH - using System; using System.Collections.Generic; using Foundation; @@ -229,5 +227,3 @@ public partial class UIHoverGestureRecognizer : UIGestureRecognizer { } #endif } - -#endif // !WATCH diff --git a/src/UIKit/UIGuidedAccessRestriction.cs b/src/UIKit/UIGuidedAccessRestriction.cs index fcf846675706..b9a98a5782a7 100644 --- a/src/UIKit/UIGuidedAccessRestriction.cs +++ b/src/UIKit/UIGuidedAccessRestriction.cs @@ -7,8 +7,6 @@ // Copyrigh 2013-2014 Xamarin Inc. // -#if !WATCH - using System; using System.Runtime.InteropServices; using System.Threading.Tasks; @@ -123,5 +121,3 @@ public static void ConfigureAccessibilityFeatures (UIGuidedAccessAccessibilityFe #endif // !COREBUILD } } - -#endif // !WATCH diff --git a/src/UIKit/UIImage.cs b/src/UIKit/UIImage.cs index b774aaa34ad2..76fb5eadee3e 100644 --- a/src/UIKit/UIImage.cs +++ b/src/UIKit/UIImage.cs @@ -102,7 +102,7 @@ public UIImage Scale (CGSize newSize) throw new ArgumentException (String.Format ("No resource named `{0}' found", name)); byte [] buffer = new byte [stream.Length]; - stream.Read (buffer, 0, buffer.Length); + stream.ReadExactly (buffer, 0, buffer.Length); unsafe { fixed (byte* p = buffer) { var data = NSData.FromBytes ((IntPtr) p, (uint) stream.Length); @@ -115,7 +115,7 @@ public UIImage Scale (CGSize newSize) [SupportedOSPlatform ("tvos17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), iOS (17, 0)] + [TV (17, 0), iOS (17, 0)] #endif [DllImport (Constants.UIKitLibrary)] static extern /* NSData */ IntPtr UIImageHEICRepresentation (/* UIImage */ IntPtr image); @@ -125,7 +125,7 @@ public UIImage Scale (CGSize newSize) [SupportedOSPlatform ("tvos17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [Watch (10, 0), TV (17, 0), iOS (17, 0)] + [TV (17, 0), iOS (17, 0)] #endif public NSData? HeicRepresentation => Runtime.GetNSObject (UIImageHEICRepresentation (Handle)); diff --git a/src/UIKit/UIImagePickerController.cs b/src/UIKit/UIImagePickerController.cs index 73987369ceed..be506de36db4 100644 --- a/src/UIKit/UIImagePickerController.cs +++ b/src/UIKit/UIImagePickerController.cs @@ -8,7 +8,7 @@ // Copyright 2012-2014 Xamarin Inc // -#if !TVOS && !WATCH // __TVOS_PROHIBITED, doesn't show up in WatchOS headers +#if !TVOS // __TVOS_PROHIBITED using ObjCRuntime; using Foundation; @@ -147,4 +147,4 @@ public NSUrl ImageUrl { } } -#endif // !TVOS && !WATCH +#endif // !TVOS diff --git a/src/UIKit/UIKeyboard.cs b/src/UIKit/UIKeyboard.cs index d9bd76172cf0..6ef378be800a 100644 --- a/src/UIKit/UIKeyboard.cs +++ b/src/UIKit/UIKeyboard.cs @@ -2,8 +2,6 @@ // Mostly notifications for keyboard events // -#if !WATCH - using Foundation; using ObjCRuntime; using CoreGraphics; @@ -91,5 +89,3 @@ static public CGRect FrameEndFromNotification (NSNotification n) #endif } } - -#endif // !WATCH diff --git a/src/UIKit/UIMenu.cs b/src/UIKit/UIMenu.cs index 90e177c3a893..15ff204085d2 100644 --- a/src/UIKit/UIMenu.cs +++ b/src/UIKit/UIMenu.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using System.Runtime.InteropServices; @@ -35,4 +34,3 @@ public virtual UIMenuElement [] SelectedElements { } } } -#endif diff --git a/src/UIKit/UINavigationController.cs b/src/UIKit/UINavigationController.cs index 79ccedc64719..ab65b247283f 100644 --- a/src/UIKit/UINavigationController.cs +++ b/src/UIKit/UINavigationController.cs @@ -1,4 +1,3 @@ -#if !WATCH using System; using Foundation; using ObjCRuntime; @@ -16,5 +15,3 @@ public UINavigationController (Type navigationBarType, Type toolbarType) : this } } - -#endif // !WATCH diff --git a/src/UIKit/UIPageViewController.cs b/src/UIKit/UIPageViewController.cs index e0cf68112382..86334cf0be6f 100644 --- a/src/UIKit/UIPageViewController.cs +++ b/src/UIKit/UIPageViewController.cs @@ -7,8 +7,6 @@ // Miguel de Icaza // -#if !WATCH - using Foundation; namespace UIKit { @@ -27,5 +25,3 @@ public partial class UIPageViewController { } } - -#endif // !WATCH diff --git a/src/UIKit/UIPopoverController.cs b/src/UIKit/UIPopoverController.cs index 5693e956e375..976652368e45 100644 --- a/src/UIKit/UIPopoverController.cs +++ b/src/UIKit/UIPopoverController.cs @@ -1,7 +1,5 @@ // Copyright 2012 Xamarin Inc. All rights reserved. -#if !WATCH - using System; using ObjCRuntime; @@ -27,5 +25,3 @@ public virtual Type PopoverBackgroundViewType { } } } - -#endif // !WATCH diff --git a/src/UIKit/UIPushBehavior.cs b/src/UIKit/UIPushBehavior.cs index d42de105fbcd..a4a5d6ad193b 100644 --- a/src/UIKit/UIPushBehavior.cs +++ b/src/UIKit/UIPushBehavior.cs @@ -1,9 +1,5 @@ -#if !WATCH - namespace UIKit { public partial class UIPushBehavior { public UIPushBehavior (UIPushBehaviorMode mode, params IUIDynamicItem [] items) : this (items, mode) { } } } - -#endif // !WATCH diff --git a/src/UIKit/UIScreen.cs b/src/UIKit/UIScreen.cs index d8d44260439d..cc8d0bf81c48 100644 --- a/src/UIKit/UIScreen.cs +++ b/src/UIKit/UIScreen.cs @@ -8,8 +8,6 @@ // Copyright 2014 Xamarin Inc. // -#if !WATCH - using System; using System.Collections; using Foundation; @@ -73,5 +71,3 @@ public UIImage Capture () } } } - -#endif // !WATCH diff --git a/src/UIKit/UIScrollView.cs b/src/UIKit/UIScrollView.cs index 0bac69d5544d..77fca2306bc1 100644 --- a/src/UIKit/UIScrollView.cs +++ b/src/UIKit/UIScrollView.cs @@ -7,8 +7,6 @@ // Copyright 2009, Novell, Inc. // -#if !WATCH - using System; namespace UIKit { @@ -23,5 +21,3 @@ static DraggingEventArgs () } } } - -#endif // !WATCH diff --git a/src/UIKit/UISearchBar.cs b/src/UIKit/UISearchBar.cs index 22e457e16fd8..3352ab174f86 100644 --- a/src/UIKit/UISearchBar.cs +++ b/src/UIKit/UISearchBar.cs @@ -7,8 +7,6 @@ // Miguel de Icaza // -#if !WATCH - using System; using TextAttributes = UIKit.UIStringAttributes; @@ -50,5 +48,3 @@ public TextAttributes GetScopeBarButtonTitleTextAttributes (UIControlState state } } } - -#endif // !WATCH diff --git a/src/UIKit/UISearchController.cs b/src/UIKit/UISearchController.cs index 984e761075be..73b727a6ff1f 100644 --- a/src/UIKit/UISearchController.cs +++ b/src/UIKit/UISearchController.cs @@ -2,8 +2,6 @@ // UISearchController.cs: Simplify the UISearchController // -#if !WATCH - using System; using Foundation; @@ -37,5 +35,3 @@ public void SetSearchResultsUpdater (Action updateSearchResu } } } - -#endif // !WATCH diff --git a/src/UIKit/UISearchDisplayController.cs b/src/UIKit/UISearchDisplayController.cs index c89789199ed4..a7e9574afa2c 100644 --- a/src/UIKit/UISearchDisplayController.cs +++ b/src/UIKit/UISearchDisplayController.cs @@ -1,4 +1,4 @@ -#if !TVOS && !WATCH && !__MACCATALYST__ // __TVOS_PROHIBITED, doesn't show up in WatchOS headers +#if !TVOS && !__MACCATALYST__ // __TVOS_PROHIBITED using System; using System.Drawing; using System.Runtime.InteropServices; @@ -32,4 +32,4 @@ public UITableViewSource SearchResultsSource { } } -#endif // !TVOS && !WATCH && !__MACCATALYST__ +#endif // !TVOS && !__MACCATALYST__ diff --git a/src/UIKit/UIStringAttributes.cs b/src/UIKit/UIStringAttributes.cs index dd142ccfaf93..acc8cc0cd86d 100644 --- a/src/UIKit/UIStringAttributes.cs +++ b/src/UIKit/UIStringAttributes.cs @@ -33,9 +33,7 @@ using Foundation; using CoreFoundation; using CoreGraphics; -#if !WATCH using CoreText; -#endif // Disable until we get around to enable + fix any issues. #nullable disable @@ -137,7 +135,6 @@ public float? StrokeWidth { } } -#if !WATCH public NSShadow Shadow { get { return Dictionary [UIStringAttributeKey.Shadow] as NSShadow; @@ -146,7 +143,6 @@ public NSShadow Shadow { SetNativeValue (UIStringAttributeKey.Shadow, value); } } -#endif // !WATCH public NSUnderlineStyle? UnderlineStyle { get { @@ -195,7 +191,6 @@ public NSTextEffect TextEffect { } } -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -209,7 +204,6 @@ public NSTextAttachment TextAttachment { SetNativeValue (UIStringAttributeKey.Attachment, value); } } -#endif // !WATCH #if NET [SupportedOSPlatform ("ios")] diff --git a/src/UIKit/UITableView.cs b/src/UIKit/UITableView.cs index 7ef433ce2937..5a26d6e4594e 100644 --- a/src/UIKit/UITableView.cs +++ b/src/UIKit/UITableView.cs @@ -1,5 +1,3 @@ - -#if !WATCH // no header using System; using System.Runtime.InteropServices; using CoreFoundation; @@ -88,4 +86,3 @@ public void RegisterNibForHeaderFooterViewReuse (UINib nib, string reuseIdentifi } } } -#endif // !WATCH diff --git a/src/UIKit/UITableViewCell.cs b/src/UIKit/UITableViewCell.cs index ca1466cb868c..7e32cf529073 100644 --- a/src/UIKit/UITableViewCell.cs +++ b/src/UIKit/UITableViewCell.cs @@ -1,5 +1,3 @@ -#if !WATCH - using System; using System.Runtime.InteropServices; using CoreFoundation; @@ -19,5 +17,3 @@ public partial class UITableViewCell { } } /* class UITableViewCell */ } - -#endif // !WATCH diff --git a/src/UIKit/UITextField.cs b/src/UIKit/UITextField.cs index 80cdce788096..9b6b0a2dd9f9 100644 --- a/src/UIKit/UITextField.cs +++ b/src/UIKit/UITextField.cs @@ -7,7 +7,7 @@ // Copyright 2009, Novell, Inc. // -#if !WATCH && !COREBUILD +#if !COREBUILD using System; using Foundation; @@ -203,4 +203,4 @@ public UITextFieldCondition ShouldReturn { } } -#endif // !WATCH +#endif // !COREBUILD diff --git a/src/UIKit/UITextView.cs b/src/UIKit/UITextView.cs index 7bd149c90003..46fcfe911831 100644 --- a/src/UIKit/UITextView.cs +++ b/src/UIKit/UITextView.cs @@ -7,11 +7,8 @@ // Copyright 2009, Novell, Inc. // -#if !WATCH - namespace UIKit { public partial class UITextView : IUITextInputTraits { } } -#endif // !WATCH diff --git a/src/UIKit/UITraitChangeObservable.cs b/src/UIKit/UITraitChangeObservable.cs index 201153f00c8b..ff3e9b1f0704 100644 --- a/src/UIKit/UITraitChangeObservable.cs +++ b/src/UIKit/UITraitChangeObservable.cs @@ -28,10 +28,8 @@ public static Class [] ToClasses (params Type [] traits) { if (traits is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (traits)); - var traitsClasses = new Class [traits.Length]; - for (var i = 0; i < traits.Length; i++) - traitsClasses [i] = new Class (traits [i]); - return traitsClasses; + + return Class.FromTypes (traits); } /// diff --git a/src/UIKit/UITraitOverrides.cs b/src/UIKit/UITraitOverrides.cs index 008c46ea361e..78c85083a431 100644 --- a/src/UIKit/UITraitOverrides.cs +++ b/src/UIKit/UITraitOverrides.cs @@ -7,8 +7,6 @@ // Copyright 2023 Microsoft Corp. All rights reserved. // -#if !__WATCHOS__ - using System; using Foundation; @@ -97,5 +95,3 @@ public sealed void RemoveTrait (Class trait) #endif // !XAMCORE_5_0 } } - -#endif // !__WATCHOS__ diff --git a/src/UIKit/UITypes.cs b/src/UIKit/UITypes.cs index 7efe202982ef..c6748306a9e8 100644 --- a/src/UIKit/UITypes.cs +++ b/src/UIKit/UITypes.cs @@ -108,7 +108,6 @@ public override string ToString () #endif } -#if !WATCH #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] @@ -159,7 +158,6 @@ public override int GetHashCode () [Field ("UIFloatRangeInfinite")] // fake (but helps testing and could also help documentation) public static UIFloatRange Infinite = new UIFloatRange (nfloat.NegativeInfinity, nfloat.PositiveInfinity); } -#endif #if IOS || __MACCATALYST__ #if NET diff --git a/src/UIKit/UIViewControllerTransitionCoordinatorContext.cs b/src/UIKit/UIViewControllerTransitionCoordinatorContext.cs index c264853dabd6..01984694f637 100644 --- a/src/UIKit/UIViewControllerTransitionCoordinatorContext.cs +++ b/src/UIKit/UIViewControllerTransitionCoordinatorContext.cs @@ -6,8 +6,6 @@ // Copyright 2014 Xamarin // -#if !WATCH - // Disable until we get around to enable + fix any issues. #nullable disable @@ -26,5 +24,3 @@ public static UIView GetTransitionViewController (this IUIViewControllerTransiti } } } - -#endif // !WATCH diff --git a/src/VideoToolbox/VTCompressionSession.cs b/src/VideoToolbox/VTCompressionSession.cs index 0bb615a39dc5..deb4485ce60f 100644 --- a/src/VideoToolbox/VTCompressionSession.cs +++ b/src/VideoToolbox/VTCompressionSession.cs @@ -445,14 +445,13 @@ public VTStatus SetCompressionProperties (VTCompressionProperties options) return VTSessionSetProperties (GetCheckedHandle (), options.Dictionary.Handle); } -#if !__WATCHOS__ #if NET [SupportedOSPlatform ("macos14.0")] [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("tvos17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [iOS (17, 0), TV (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), Mac (14, 0)] #endif [DllImport (Constants.VideoToolboxLibrary)] extern static /* Boolean */ byte VTIsStereoMVHEVCEncodeSupported (); @@ -465,12 +464,11 @@ public VTStatus SetCompressionProperties (VTCompressionProperties options) [SupportedOSPlatform ("tvos17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [iOS (17, 0), TV (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), Mac (14, 0)] #endif public static bool IsStereoMvHevcEncodeSupported () { return VTIsStereoMVHEVCEncodeSupported () != 0; } -#endif // !__WATCHOS__ } } diff --git a/src/VideoToolbox/VTDecompressionSession.cs b/src/VideoToolbox/VTDecompressionSession.cs index 3b3bf3ffc156..3424ff153749 100644 --- a/src/VideoToolbox/VTDecompressionSession.cs +++ b/src/VideoToolbox/VTDecompressionSession.cs @@ -393,14 +393,13 @@ public static bool IsHardwareDecodeSupported (CMVideoCodecType codecType) return VTIsHardwareDecodeSupported (codecType) != 0; } -#if !__WATCHOS__ #if NET [SupportedOSPlatform ("macos14.0")] [SupportedOSPlatform ("ios17.0")] [SupportedOSPlatform ("tvos17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [iOS (17, 0), TV (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), Mac (14, 0)] #endif [DllImport (Constants.VideoToolboxLibrary)] extern static /* Boolean */ byte VTIsStereoMVHEVCDecodeSupported (); @@ -413,12 +412,11 @@ public static bool IsHardwareDecodeSupported (CMVideoCodecType codecType) [SupportedOSPlatform ("tvos17.0")] [SupportedOSPlatform ("maccatalyst17.0")] #else - [iOS (17, 0), TV (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), Mac (14, 0)] #endif public static bool IsStereoMvHevcDecodeSupported () { return VTIsStereoMVHEVCDecodeSupported () != 0; } -#endif // !__WATCHOS__ } } diff --git a/src/VideoToolbox/VTDefs.cs b/src/VideoToolbox/VTDefs.cs index ec6e76d0ad04..2ef94b2c6402 100644 --- a/src/VideoToolbox/VTDefs.cs +++ b/src/VideoToolbox/VTDefs.cs @@ -56,11 +56,11 @@ public enum VTStatus { DecoderNeedsRosetta = -17692, [MacCatalyst (13, 1)] EncoderNeedsRosetta = -17693, - [iOS (15, 0), MacCatalyst (15, 0), Watch (9, 0), TV (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] VideoDecoderReferenceMissing = -17694, - [iOS (15, 0), MacCatalyst (15, 0), Watch (9, 0), TV (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] VideoDecoderCallbackMessaging = -17695, - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] VideoDecoderUnknownErr = -17696, ExtensionDisabledErr = -17697, VideoEncoderMVHEVCVideoLayerIDsMismatchErr = -17698, @@ -290,7 +290,7 @@ public enum VTDownsamplingMode { Average } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] public enum HdrMetadataInsertionMode { [Field ("kVTHDRMetadataInsertionMode_None")] @@ -299,7 +299,7 @@ public enum HdrMetadataInsertionMode { Auto, } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] public enum VTRotation { [DefaultEnumValue] [Field ("kVTRotation_0")] diff --git a/src/VideoToolbox/VTHdrPerFrameMetadataGenerationSession.cs b/src/VideoToolbox/VTHdrPerFrameMetadataGenerationSession.cs index e029df18dc06..160810992000 100644 --- a/src/VideoToolbox/VTHdrPerFrameMetadataGenerationSession.cs +++ b/src/VideoToolbox/VTHdrPerFrameMetadataGenerationSession.cs @@ -1,4 +1,4 @@ -#if !WATCH && NET +#if NET #nullable enable @@ -19,7 +19,7 @@ namespace VideoToolbox { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] #else - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] #endif public class VTHdrPerFrameMetadataGenerationSession : NativeObject { [Preserve (Conditional = true)] @@ -89,4 +89,4 @@ public VTStatus AttachMetadata (CVPixelBuffer pixelBuffer, bool sceneChange) } } -#endif // !WATCH +#endif // NET diff --git a/src/VideoToolbox/VTPixelRotationSession.cs b/src/VideoToolbox/VTPixelRotationSession.cs index 97746a04bc63..426c9c9d8cae 100644 --- a/src/VideoToolbox/VTPixelRotationSession.cs +++ b/src/VideoToolbox/VTPixelRotationSession.cs @@ -31,7 +31,7 @@ namespace VideoToolbox { [SupportedOSPlatform ("watchos9.0")] [SupportedOSPlatform ("tvos16.0")] #else - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] #endif public class VTPixelRotationSession : VTSession { diff --git a/src/VideoToolbox/VTPixelTransferSession.cs b/src/VideoToolbox/VTPixelTransferSession.cs index 77e2a2df8db8..855e8edd3363 100644 --- a/src/VideoToolbox/VTPixelTransferSession.cs +++ b/src/VideoToolbox/VTPixelTransferSession.cs @@ -31,7 +31,7 @@ namespace VideoToolbox { [SupportedOSPlatform ("watchos9.0")] [SupportedOSPlatform ("tvos16.0")] #else - [iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] #endif public class VTPixelTransferSession : VTSession { diff --git a/src/VideoToolbox/VTProfessionalVideoWorkflow.cs b/src/VideoToolbox/VTProfessionalVideoWorkflow.cs index e00610bb7f76..333dadf5d06b 100644 --- a/src/VideoToolbox/VTProfessionalVideoWorkflow.cs +++ b/src/VideoToolbox/VTProfessionalVideoWorkflow.cs @@ -26,7 +26,7 @@ namespace VideoToolbox { [UnsupportedOSPlatform ("watchos")] [UnsupportedOSPlatform ("tvos")] #else - [NoiOS, NoMacCatalyst, NoWatch, NoTV] + [NoiOS, NoMacCatalyst, NoTV] #endif public static class VTProfessionalVideoWorkflow { [DllImport (Constants.VideoToolboxLibrary, EntryPoint = "VTRegisterProfessionalVideoWorkflowVideoDecoders")] diff --git a/src/VideoToolbox/VTRawProcessingSession.cs b/src/VideoToolbox/VTRawProcessingSession.cs index c765c8c9c291..410529239c7a 100644 --- a/src/VideoToolbox/VTRawProcessingSession.cs +++ b/src/VideoToolbox/VTRawProcessingSession.cs @@ -29,7 +29,7 @@ namespace VideoToolbox { [SupportedOSPlatform ("macos15.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] #endif public class VTRawProcessingSession : NativeObject { [Preserve (Conditional = true)] diff --git a/src/VideoToolbox/VTUtilities.cs b/src/VideoToolbox/VTUtilities.cs index 9351dcfb43d8..693e3b81521a 100644 --- a/src/VideoToolbox/VTUtilities.cs +++ b/src/VideoToolbox/VTUtilities.cs @@ -62,7 +62,6 @@ public static VTStatus ToCGImage (this CVPixelBuffer pixelBuffer, out CGImage? i [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -75,7 +74,6 @@ public static VTStatus ToCGImage (this CVPixelBuffer pixelBuffer, out CGImage? i [UnsupportedOSPlatform ("tvos")] [UnsupportedOSPlatform ("ios")] #else - [NoWatch] [NoTV] [NoiOS] #endif @@ -90,7 +88,7 @@ public static void RegisterSupplementalVideoDecoder (CMVideoCodecType codecType) [SupportedOSPlatform ("macos15.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] #endif [DllImport (Constants.VideoToolboxLibrary)] unsafe static extern VTStatus VTCopyVideoDecoderExtensionProperties ( @@ -108,7 +106,7 @@ unsafe static extern VTStatus VTCopyVideoDecoderExtensionProperties ( [SupportedOSPlatform ("macos15.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] #endif public static NSDictionary? CopyVideoDecoderExtensionProperties (CMFormatDescription formatDescription, out VTStatus error) { @@ -127,7 +125,7 @@ unsafe static extern VTStatus VTCopyVideoDecoderExtensionProperties ( [SupportedOSPlatform ("macos15.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] #endif [DllImport (Constants.VideoToolboxLibrary)] unsafe static extern VTStatus VTCopyRAWProcessorExtensionProperties ( @@ -145,7 +143,7 @@ unsafe static extern VTStatus VTCopyRAWProcessorExtensionProperties ( [SupportedOSPlatform ("macos15.0")] [UnsupportedOSPlatform ("tvos")] #else - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] #endif public static NSDictionary? CopyRawProcessorExtensionProperties (CMFormatDescription formatDescription, out VTStatus error) { diff --git a/src/VideoToolbox/VTVideoEncoder.cs b/src/VideoToolbox/VTVideoEncoder.cs index f5f800b780b4..5ffa6bf2acdb 100644 --- a/src/VideoToolbox/VTVideoEncoder.cs +++ b/src/VideoToolbox/VTVideoEncoder.cs @@ -132,7 +132,7 @@ public class VTVideoEncoder { public bool SupportsFrameReordering { get; private set; } #if !NET - [NoiOS, NoTV, NoMacCatalyst, NoMac, NoWatch] + [NoiOS, NoTV, NoMacCatalyst, NoMac] public bool SupportsMultiPass { get; private set; } #endif // !NET @@ -145,7 +145,6 @@ public class VTVideoEncoder { [iOS (15, 0)] [TV (15, 0)] [MacCatalyst (15, 0)] - [Watch (8, 0)] #endif public bool IncludeStandardDefinitionDVEncoders { get; private set; } diff --git a/src/WatchKit/WKAccessibility.cs b/src/WatchKit/WKAccessibility.cs deleted file mode 100644 index 20858ac05a72..000000000000 --- a/src/WatchKit/WKAccessibility.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable - -using System; -using System.Runtime.InteropServices; -using Foundation; -using ObjCRuntime; - -#if WATCH - -namespace WatchKit { - - public partial class WKAccessibility { - - [DllImport (Constants.WatchKitLibrary)] - [return: MarshalAs (UnmanagedType.I1)] - static extern bool WKAccessibilityIsVoiceOverRunning (); - - static public bool IsVoiceOverRunning { - get { return WKAccessibilityIsVoiceOverRunning (); } - } - - [DllImport (Constants.WatchKitLibrary)] - [return: MarshalAs (UnmanagedType.I1)] - static extern bool WKAccessibilityIsReduceMotionEnabled (); - - static public bool IsReduceMotionEnabled { - get { return WKAccessibilityIsReduceMotionEnabled (); } - } - } -} - -#endif diff --git a/src/WatchKit/WKDefs.cs b/src/WatchKit/WKDefs.cs deleted file mode 100644 index 0881af56b59d..000000000000 --- a/src/WatchKit/WKDefs.cs +++ /dev/null @@ -1,272 +0,0 @@ -// -// WatchKit Enums -// -// Copyright 2014-2015 Xamarin Inc. -// -// Author: -// Miguel de Icaza -// - -using System; -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [NoiOS] - [Native] - public enum WKInterfaceMapPinColor : long { - Red, - Green, - Purple - } - - [NoiOS] - [Deprecated (PlatformName.WatchOS, 7, 0)] - [Native] - public enum WKMenuItemIcon : long { - Accept, - Add, - Block, - Decline, - Info, - Maybe, - More, - Mute, - Pause, - Play, - Repeat, - Resume, - Share, - Shuffle, - Speaker, - Trash - } - - [NoiOS] - [Native] - public enum WKUserNotificationInterfaceType : long { - Default, - Custom - } - - [NoiOS] - [Native] - public enum WKTextInputMode : long { - Plain, - AllowEmoji, - AllowAnimatedEmoji - } - - [NoiOS] - [Native ("WatchKitErrorCode")] - [ErrorDomain ("WatchKitErrorDomain")] - public enum WKErrorCode : long { - None = 0, - UnknownError = 1, - RequestReplyNotCalledError = 2, - InvalidArgumentError = 3, - MediaPlayerError = 4, - DownloadError = 5, - RecordingFailedError = 6, - } - - [NoiOS] - [Native] - public enum WKHapticType : long { - Notification, - DirectionUp, - DirectionDown, - Success, - Failure, - Retry, - Start, - Stop, - Click, - [Watch (7, 0)] - NavigationLeftTurn, - [Watch (7, 0)] - NavigationRightTurn, - [Watch (7, 0)] - NavigationGenericManeuver, - [Watch (9, 0)] - UnderwaterDepthPrompt, - [Watch (9, 0)] - UnderwaterDepthCriticalPrompt, - } - - [NoiOS] - [Native] - public enum WKAudioFilePlayerStatus : long { - Unknown, - ReadyToPlay, - Failed - } - - [NoiOS] - [Native] - public enum WKAudioFilePlayerItemStatus : long { - Unknown, - ReadyToPlay, - Failed - } - - [NoiOS] - [Native] - public enum WKAudioRecorderPreset : long { - NarrowBandSpeech, - WideBandSpeech, - HighQualityAudio - } - - [NoiOS] - [Native] - public enum WKAlertActionStyle : long { - Default = 0, - Cancel, - Destructive - } - - [NoiOS] - [Native] - public enum WKAlertControllerStyle : long { - Alert, - SideBySideButtonsAlert, - ActionSheet - } - - [NoiOS] - [Native] - public enum WKVideoGravity : long { - Aspect, - AspectFill, - Resize - } - - [NoiOS] - [Native] - public enum WKInterfaceObjectHorizontalAlignment : long { - Left, - Center, - Right - } - - [NoiOS] - [Native] - public enum WKInterfaceObjectVerticalAlignment : long { - Top, - Center, - Bottom - } - - [NoiOS] - [Native] - public enum WKInterfaceLayoutDirection : long { - LeftToRight, - RightToLeft - } - - [NoiOS] - [Native] - public enum WKInterfaceSemanticContentAttribute : long { - Unspecified, - Playback, - Spatial, - ForceLeftToRight, - ForceRightToLeft - } - - [NoiOS] - [Native] - public enum WKApplicationState : long { - Active, - Inactive, - Background - } - - [NoiOS] - [Native] - public enum WKGestureRecognizerState : long { - Possible, - Began, - Changed, - Ended, - Cancelled, - Failed, - Recognized - } - - [NoiOS] - [Native] - [Flags] - public enum WKSwipeGestureRecognizerDirection : ulong { - Right = 1 << 0, - Left = 1 << 1, - Up = 1 << 2, - Down = 1 << 3 - } - - [NoiOS] - [Native] - public enum WKInterfaceDeviceWristLocation : long { - Left, - Right - } - - [NoiOS] - [Native] - public enum WKInterfaceDeviceCrownOrientation : long { - Left, - Right - } - - [NoiOS] - [Native] - public enum WKWaterResistanceRating : long { - Ipx7, - Wr50, - [Watch (9, 0)] - WR100, - } - - [NoiOS] - [Native] - public enum WKSnapshotReason : long { - AppScheduled = 0, - ReturnToDefaultState, - ComplicationUpdate, - Prelaunch, - AppBackgrounded, - } - - [NoiOS] - [Native] - public enum WKPageOrientation : long { - Horizontal, - Vertical, - } - - [NoiOS] - [Native] - public enum WKInterfaceScrollPosition : long { - Top, - CenteredVertically, - Bottom, - } - - [NoiOS] - [Native] - public enum WKInterfaceDeviceBatteryState : long { - Unknown, - Unplugged, - Charging, - Full, - } - - [Watch (9, 0), NoiOS] - [Native] - enum WKExtendedRuntimeSessionAutoLaunchAuthorizationStatus : long { - Unknown, - Inactive, - Active, - } -} diff --git a/src/WatchKit/WKInterfaceController.cs b/src/WatchKit/WKInterfaceController.cs deleted file mode 100644 index 55e2d6ced7c7..000000000000 --- a/src/WatchKit/WKInterfaceController.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2014-2015 Xamarin Inc. All rights reserved. - -#nullable enable - -#if WATCH - -using System; -using System.Reflection; -using Foundation; -using ObjCRuntime; -using UIKit; - -namespace WatchKit { - -#if !COREBUILD - public partial class WKInterfaceController { - - public void PushController (string name, string context) - { - using (var ns = context is null ? null : new NSString (context)) { - PushController (name, (NSObject?) ns); - } - } - - public void PresentController (string name, string context) - { - using (var ns = context is null ? null : new NSString (context)) { - PresentController (name, (NSObject?) ns); - } - } - - public void PresentController (string [] names, string [] contexts) - { - NSObject[]? array = null; - try { - if (contexts is not null) { - array = new NSObject [contexts.Length]; - for (int i = 0; i < array.Length; i++) - array [i] = new NSString (contexts [i]); - } - PresentController (names, array); - } - finally { - if (array is not null) { - foreach (var ns in array) - ns.Dispose (); - } - } - } - - static int counter = 0; - - static Selector GetUniqueSelector () - { - return new Selector ("xamarinAddMenuItem" + counter++.ToString ()); - } - - MethodInfo GetMethodInfo (Action action) - { - var del = action as Delegate; - if (del is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (action)); - var met = del.Method; - // The method must be defined on the current interface controller object. - if (met.DeclaringType != GetType ()) - throw new ArgumentException ("Action delegate must declared in the same type."); - // note that an anonymous delegate that does not use any instance member can be defined as static - // e.g. Console.WriteLine ("coucou"); - if (met.IsStatic) - throw new ArgumentException ("Action delegate must declared an instance (not static) method."); - return met; - } - - public void AddMenuItem (UIImage image, string title, Action action) - { - var mi = GetMethodInfo (action); - var sel = GetUniqueSelector (); - AddMenuItem (image, title, sel); - Runtime.ConnectMethod (mi, sel); - } - - public void AddMenuItem (string imageName, string title, Action action) - { - var mi = GetMethodInfo (action); - var sel = GetUniqueSelector (); - AddMenuItem (imageName, title, sel); - Runtime.ConnectMethod (mi, sel); - } - - public void AddMenuItem (WKMenuItemIcon itemIcon, string title, Action action) - { - var mi = GetMethodInfo (action); - var sel = GetUniqueSelector (); - AddMenuItem (itemIcon, title, sel); - Runtime.ConnectMethod (mi, sel); - } - } -#endif - - public class WKPresentMediaPlayerResult { -#if !COREBUILD - public WKPresentMediaPlayerResult (bool didPlayToEnd, double /* NSTimeInterval */ endTime) - { - DidPlayToEnd = didPlayToEnd; - EndTime = endTime; - } - - public bool DidPlayToEnd { get; set; } - - public double EndTime { get; set; } -#endif - } -} - -#endif // WATCH || IOS diff --git a/src/WatchKit/WKInterfaceDevice.cs b/src/WatchKit/WKInterfaceDevice.cs deleted file mode 100644 index f3f87bb50cfc..000000000000 --- a/src/WatchKit/WKInterfaceDevice.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2015 Xamarin Inc. All rights reserved. - -#nullable enable - -#if WATCH - -using System; -using System.Collections.Generic; -using Foundation; -using ObjCRuntime; -using UIKit; - -namespace WatchKit { - - public partial class WKInterfaceDevice { - - // This method (preferredContentSizeCategory) is defined as "NSString *" - // in the headers, and the return values are not documented - // (documentation says the return values are the same as for - // UIApplication.ContentSizeCategory, but testing shows that to be - // incorrect). - // - // Unfortunately we've already bound this using the - // UIContentSizeCategory for Xamarin.iOS.dll, and since we can't - // change that, use a different name instead. - public string PreferredContentSizeCategoryString { - get { - return _PreferredContentSizeCategory; - } - } - - public bool CheckSystemVersion (int major, int minor) - { - return Runtime.CheckSystemVersion (major, minor, SystemVersion); - } - - public bool CheckSystemVersion (int major, int minor, int build) - { - return Runtime.CheckSystemVersion (major, minor, build, SystemVersion); - } - } -} - -#endif // WATCH diff --git a/src/WatchKit/iOS/WKAccessibility.cs b/src/WatchKit/iOS/WKAccessibility.cs deleted file mode 100644 index d8b00b3d99d6..000000000000 --- a/src/WatchKit/iOS/WKAccessibility.cs +++ /dev/null @@ -1,52 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using ObjCRuntime; - -namespace WatchKit { - - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public static class WKAccessibility { - public static void SetAccessibilityHint (this WKInterfaceObject This, string accessibilityHint) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static void SetAccessibilityIdentifier (this WKInterfaceObject This, string accessibilityIdentifier) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static void SetAccessibilityImageRegions (this WKInterfaceObject This, WKAccessibilityImageRegion[] accessibilityImageRegions) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static void SetAccessibilityLabel (this WKInterfaceObject This, string accessibilityLabel) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static void SetAccessibilityTraits (this WKInterfaceObject This, global::UIKit.UIAccessibilityTrait accessibilityTraits) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static void SetAccessibilityValue (this WKInterfaceObject This, string accessibilityValue) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static void SetIsAccessibilityElement (this WKInterfaceObject This, bool isAccessibilityElement) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKAccessibility */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKAccessibilityImageRegion.cs b/src/WatchKit/iOS/WKAccessibilityImageRegion.cs deleted file mode 100644 index 836ca0a456b6..000000000000 --- a/src/WatchKit/iOS/WKAccessibilityImageRegion.cs +++ /dev/null @@ -1,54 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using CoreGraphics; -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKAccessibilityImageRegion", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKAccessibilityImageRegion : NSObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - public WKAccessibilityImageRegion () : base (NSObjectFlag.Empty) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected WKAccessibilityImageRegion (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKAccessibilityImageRegion (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual CGRect Frame { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string Label { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - } /* class WKAccessibilityImageRegion */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKErrorCode.cs b/src/WatchKit/iOS/WKErrorCode.cs deleted file mode 100644 index 13a69e69fa1c..000000000000 --- a/src/WatchKit/iOS/WKErrorCode.cs +++ /dev/null @@ -1,35 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public enum WKErrorCode : long { - None = 0, - UnknownError = 1, - RequestReplyNotCalledError = 2, - InvalidArgumentError = 3, - MediaPlayerError = 4, - DownloadError = 5, - RecordingFailedError = 6, - } - - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - static public class WKErrorCodeExtensions { - public static NSString GetDomain (this WKErrorCode self) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKImageAnimatable.cs b/src/WatchKit/iOS/WKImageAnimatable.cs deleted file mode 100644 index cbcd320155db..000000000000 --- a/src/WatchKit/iOS/WKImageAnimatable.cs +++ /dev/null @@ -1,27 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public interface IWKImageAnimatable : INativeObject, IDisposable - { - [Preserve (Conditional = true)] - void StartAnimating (); - - [Preserve (Conditional = true)] - void StartAnimating (NSRange imageRange, double duration, nint repeatCount); - - [Preserve (Conditional = true)] - void StopAnimating (); - } -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceButton.cs b/src/WatchKit/iOS/WKInterfaceButton.cs deleted file mode 100644 index f132138abaf3..000000000000 --- a/src/WatchKit/iOS/WKInterfaceButton.cs +++ /dev/null @@ -1,66 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceButton", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceButton : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceButton (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceButton (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundImage (global::UIKit.UIImage image) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundImage (NSData imageData) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundImage (string imageName) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetEnabled (bool enabled) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTitle (string title) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTitle (NSAttributedString attributedTitle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - } /* class WKInterfaceButton */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceController.cs b/src/WatchKit/iOS/WKInterfaceController.cs deleted file mode 100644 index 74c56e1c62de..000000000000 --- a/src/WatchKit/iOS/WKInterfaceController.cs +++ /dev/null @@ -1,260 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; -using System.Threading.Tasks; - -using CoreGraphics; -using Foundation; -using ObjCRuntime; -using UIKit; - -namespace WatchKit { - [Register ("WKInterfaceController", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public abstract class WKInterfaceController : NSObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceController (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceController (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public WKInterfaceController () - : base (NSObjectFlag.Empty) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void AddMenuItem (global::UIKit.UIImage image, string title, Selector action) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void AddMenuItem (string imageName, string title, Selector action) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void AddMenuItem (WKMenuItemIcon itemIcon, string title, Selector action) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void Awake (NSObject context) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void BecomeCurrentPage () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void ClearAllMenuItems () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void DidDeactivate () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void DidSelectRow (WKInterfaceTable table, nint rowIndex) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void DismissController () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void DismissTextInputController () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual NSObject GetContextForSegue (string segueIdentifier) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual NSObject GetContextForSegue (string segueIdentifier, WKInterfaceTable table, nint rowIndex) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual NSObject[] GetContextsForSegue (string segueIdentifier) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual NSObject[] GetContextsForSegue (string segueIdentifier, WKInterfaceTable table, nint rowIndex) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void HandleAction (string identifier, global::UserNotifications.UNNotification notification) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void HandleLocalNotificationAction (string identifier, global::UIKit.UILocalNotification localNotification) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void HandleRemoteNotificationAction (string identifier, NSDictionary remoteNotification) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void HandleUserActivity (NSDictionary userActivity) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void InvalidateUserActivity () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static bool OpenParentApplication (NSDictionary userInfo, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity2V69))]global::System.Action reply) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void PopController () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void PopToRootController () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void PresentController (string name, NSObject context) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void PresentController (string[] names, NSObject[] contexts) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void PresentTextInputController (string[] suggestions, WKTextInputMode inputMode, global::System.Action completion) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual Task PresentTextInputControllerAsync (string[] suggestions, WKTextInputMode inputMode) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void PresentTextInputController (global::System.Func suggestionsHandler, WKTextInputMode inputMode, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V208))]global::System.Action completion) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual Task PresentTextInputControllerAsync (global::System.Func suggestionsHandler, WKTextInputMode inputMode) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void PushController (string name, NSObject context) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static void ReloadRootControllers (string[] names, NSObject[] contexts) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTitle (string title) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void UpdateUserActivity (string type, NSDictionary userInfo, NSUrl webpageURL) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void WillActivate () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual CGRect ContentFrame { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public static NSString ErrorDomain { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - - public void PushController (string name, string context) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public void PresentController (string name, string context) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public void PresentController (string [] names, string [] contexts) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public void AddMenuItem (UIImage image, string title, Action action) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public void AddMenuItem (string imageName, string title, Action action) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public void AddMenuItem (WKMenuItemIcon itemIcon, string title, Action action) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceController */ - - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKPresentMediaPlayerResult { - public WKPresentMediaPlayerResult (bool didPlayToEnd, double /* NSTimeInterval */ endTime) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public bool DidPlayToEnd { get; set; } - - public double EndTime { get; set; } - } -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceDate.cs b/src/WatchKit/iOS/WKInterfaceDate.cs deleted file mode 100644 index ab8f9ff19599..000000000000 --- a/src/WatchKit/iOS/WKInterfaceDate.cs +++ /dev/null @@ -1,45 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceDate", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceDate : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceDate (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceDate (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetCalendar (NSCalendar calendar) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTextColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTimeZone (NSTimeZone timeZone) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceDate */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceDevice.cs b/src/WatchKit/iOS/WKInterfaceDevice.cs deleted file mode 100644 index 7f8d9c69db49..000000000000 --- a/src/WatchKit/iOS/WKInterfaceDevice.cs +++ /dev/null @@ -1,130 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Runtime.Versioning; - -using CoreGraphics; -using Foundation; -using ObjCRuntime; -using UIKit; - -namespace WatchKit { - [Register ("WKInterfaceDevice", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceDevice : NSObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceDevice (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceDevice (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual bool AddCachedImage (global::UIKit.UIImage image, string name) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual bool AddCachedImage (NSData imageData, string name) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void RemoveAllCachedImages () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void RemoveCachedImage (string name) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public static WKInterfaceDevice CurrentDevice { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string LocalizedModel { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string Model { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string Name { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual CGRect ScreenBounds { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual nfloat ScreenScale { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string SystemName { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string SystemVersion { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual NSDictionary WeakCachedImages { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public IReadOnlyDictionary CachedImages { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public UIContentSizeCategory PreferredContentSizeCategory { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public string PreferredContentSizeCategoryString { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public bool CheckSystemVersion (int major, int minor) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceDevice */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceGroup.cs b/src/WatchKit/iOS/WKInterfaceGroup.cs deleted file mode 100644 index 55111ba390de..000000000000 --- a/src/WatchKit/iOS/WKInterfaceGroup.cs +++ /dev/null @@ -1,70 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceGroup", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceGroup : WKInterfaceObject, IWKImageAnimatable { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceGroup (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceGroup (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundImage (global::UIKit.UIImage image) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundImage (NSData imageData) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetBackgroundImage (string imageName) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetCornerRadius (nfloat cornerRadius) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void StartAnimating () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void StartAnimating (NSRange imageRange, double duration, nint repeatCount) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void StopAnimating () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceGroup */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceImage.cs b/src/WatchKit/iOS/WKInterfaceImage.cs deleted file mode 100644 index 7df05aea7d53..000000000000 --- a/src/WatchKit/iOS/WKInterfaceImage.cs +++ /dev/null @@ -1,65 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceImage", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceImage : WKInterfaceObject, IWKImageAnimatable { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceImage (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceImage (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetImage (global::UIKit.UIImage image) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetImage (NSData imageData) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetImage (string imageName) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTintColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void StartAnimating () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void StartAnimating (NSRange imageRange, double duration, nint repeatCount) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void StopAnimating () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceImage */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceLabel.cs b/src/WatchKit/iOS/WKInterfaceLabel.cs deleted file mode 100644 index e9cd88fa5286..000000000000 --- a/src/WatchKit/iOS/WKInterfaceLabel.cs +++ /dev/null @@ -1,45 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceLabel", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceLabel : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceLabel (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceLabel (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetText (string text) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetText (NSAttributedString attributedText) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTextColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceLabel */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceMap.cs b/src/WatchKit/iOS/WKInterfaceMap.cs deleted file mode 100644 index 374b93cc3d9d..000000000000 --- a/src/WatchKit/iOS/WKInterfaceMap.cs +++ /dev/null @@ -1,62 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using CoreGraphics; -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceMap", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceMap : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceMap (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceMap (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void AddAnnotation (global::CoreLocation.CLLocationCoordinate2D location, global::UIKit.UIImage image, CGPoint offset) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void AddAnnotation (global::CoreLocation.CLLocationCoordinate2D location, string name, CGPoint offset) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void AddAnnotation (global::CoreLocation.CLLocationCoordinate2D location, WKInterfaceMapPinColor pinColor) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void RemoveAllAnnotations () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetRegion (global::MapKit.MKCoordinateRegion coordinateRegion) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetVisible (global::MapKit.MKMapRect mapRect) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - } /* class WKInterfaceMap */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceMapPinColor.cs b/src/WatchKit/iOS/WKInterfaceMapPinColor.cs deleted file mode 100644 index 46a776504c25..000000000000 --- a/src/WatchKit/iOS/WKInterfaceMapPinColor.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using ObjCRuntime; - -namespace WatchKit { - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public enum WKInterfaceMapPinColor : long { - Red = 0, - Green = 1, - Purple = 2, - } -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceObject.cs b/src/WatchKit/iOS/WKInterfaceObject.cs deleted file mode 100644 index f27a4be5694d..000000000000 --- a/src/WatchKit/iOS/WKInterfaceObject.cs +++ /dev/null @@ -1,659 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using CoreGraphics; -using Foundation; -using ObjCRuntime; -using UIKit; - -namespace WatchKit { - [Register ("WKInterfaceObject", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceObject : NSObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceObject (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceObject (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual bool AccessibilityActivate () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetAlpha (nfloat alpha) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetHeight (nfloat height) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetHidden (bool hidden) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetWidth (nfloat width) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual CGPoint AccessibilityActivationPoint { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual NSAttributedString AccessibilityAttributedHint { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual NSAttributedString AccessibilityAttributedLabel { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual NSAttributedString AccessibilityAttributedValue { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual bool AccessibilityElementsHidden { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual CGRect AccessibilityFrame { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string AccessibilityHint { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string AccessibilityLabel { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string AccessibilityLanguage { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual UIAccessibilityNavigationStyle AccessibilityNavigationStyle { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual UIBezierPath AccessibilityPath { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual UIAccessibilityTrait AccessibilityTraits { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string AccessibilityValue { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual bool AccessibilityViewIsModal { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual string InterfaceProperty { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual bool IsAccessibilityElement { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public virtual bool ShouldGroupAccessibilityChildren { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - set { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - public static NSString AnnouncementDidFinishNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static int AnnouncementNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString AssistiveTechnologyKey { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString AssistiveTouchStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString BoldTextStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString ClosedCaptioningStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString DarkerSystemColorsStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString ElementFocusedNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString FocusedElementKey { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString GrayscaleStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString GuidedAccessStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString HearingDevicePairedEarDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString InvertColorsStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static int LayoutChangedNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString MonoAudioStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString NotificationSwitchControlIdentifier { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString NotificationVoiceOverIdentifier { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static int PageScrolledNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static int PauseAssistiveTechnologyNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString ReduceMotionStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString ReduceTransparencyStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static int ResumeAssistiveTechnologyNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static int ScreenChangedNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString ShakeToUndoDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SpeakScreenStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SpeakSelectionStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SpeechAttributeIpaNotation { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SpeechAttributeLanguage { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SpeechAttributePitch { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SpeechAttributePunctuation { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SpeechAttributeQueueAnnouncement { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString SwitchControlStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString TextAttributeCustom { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString TextAttributeHeadingLevel { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitAdjustable { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitAllowsDirectInteraction { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitButton { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitCausesPageTurn { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitHeader { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitImage { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitKeyboardKey { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitLink { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitNone { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitNotEnabled { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitPlaysSound { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitSearchField { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitSelected { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitStartsMediaSession { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitStaticText { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitSummaryElement { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitTabBar { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static long TraitUpdatesFrequently { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString UnfocusedElementKey { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString VoiceOverStatusChanged { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - public static NSString VoiceOverStatusDidChangeNotification { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - - // - // Notifications - // - public static class Notifications { - public static NSObject ObserveAnnouncementDidFinish (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveAnnouncementDidFinish (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveAssistiveTechnologyKey (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveAssistiveTechnologyKey (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveAssistiveTouchStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveAssistiveTouchStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveBoldTextStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveBoldTextStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveClosedCaptioningStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveClosedCaptioningStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveDarkerSystemColorsStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveDarkerSystemColorsStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveElementFocused (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveElementFocused (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveFocusedElementKey (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveFocusedElementKey (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveGrayscaleStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveGrayscaleStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveGuidedAccessStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveGuidedAccessStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveHearingDevicePairedEarDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveHearingDevicePairedEarDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveInvertColorsStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveInvertColorsStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveMonoAudioStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveMonoAudioStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveReduceMotionStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveReduceMotionStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveReduceTransparencyStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveReduceTransparencyStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveShakeToUndoDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveShakeToUndoDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveSpeakScreenStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveSpeakScreenStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveSpeakSelectionStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveSpeakSelectionStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveSwitchControlStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveSwitchControlStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveUnfocusedElementKey (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveUnfocusedElementKey (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveVoiceOverStatusDidChange (EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - public static NSObject ObserveVoiceOverStatusDidChange (NSObject objectToObserve, EventHandler handler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - } /* class WKInterfaceObject */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceSeparator.cs b/src/WatchKit/iOS/WKInterfaceSeparator.cs deleted file mode 100644 index da99e93e1638..000000000000 --- a/src/WatchKit/iOS/WKInterfaceSeparator.cs +++ /dev/null @@ -1,35 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceSeparator", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceSeparator : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceSeparator (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceSeparator (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceSeparator */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceSlider.cs b/src/WatchKit/iOS/WKInterfaceSlider.cs deleted file mode 100644 index 103005702b85..000000000000 --- a/src/WatchKit/iOS/WKInterfaceSlider.cs +++ /dev/null @@ -1,50 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceSlider", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceSlider : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceSlider (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceSlider (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetEnabled (bool enabled) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetNumberOfSteps (nint numberOfSteps) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetValue (float value) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceSlider */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceSwitch.cs b/src/WatchKit/iOS/WKInterfaceSwitch.cs deleted file mode 100644 index 98e7cedd963d..000000000000 --- a/src/WatchKit/iOS/WKInterfaceSwitch.cs +++ /dev/null @@ -1,55 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceSwitch", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceSwitch : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceSwitch (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceSwitch (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetEnabled (bool enabled) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetOn (bool on) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTitle (string title) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTitle (NSAttributedString attributedTitle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceSwitch */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceTable.cs b/src/WatchKit/iOS/WKInterfaceTable.cs deleted file mode 100644 index 9db7804700dc..000000000000 --- a/src/WatchKit/iOS/WKInterfaceTable.cs +++ /dev/null @@ -1,66 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceTable", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceTable : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceTable (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceTable (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual NSObject GetRowController (nint index) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void InsertRows (NSIndexSet rowIndexes, string rowType) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void RemoveRows (NSIndexSet rowIndexes) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void ScrollToRow (nint index) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetNumberOfRows (nint numberOfRows, string rowType) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetRowTypes (string[] rowTypes) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual nint NumberOfRows { - get { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } - } /* class WKInterfaceTable */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKInterfaceTimer.cs b/src/WatchKit/iOS/WKInterfaceTimer.cs deleted file mode 100644 index 9ea5cff719ed..000000000000 --- a/src/WatchKit/iOS/WKInterfaceTimer.cs +++ /dev/null @@ -1,50 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKInterfaceTimer", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKInterfaceTimer : WKInterfaceObject { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKInterfaceTimer (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKInterfaceTimer (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetDate (NSDate date) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void SetTextColor (global::UIKit.UIColor color) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void Start () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void Stop () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKInterfaceTimer */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKMenuItemIcon.cs b/src/WatchKit/iOS/WKMenuItemIcon.cs deleted file mode 100644 index c56cb1839864..000000000000 --- a/src/WatchKit/iOS/WKMenuItemIcon.cs +++ /dev/null @@ -1,33 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using ObjCRuntime; - -namespace WatchKit { - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public enum WKMenuItemIcon : long { - Accept = 0, - Add = 1, - Block = 2, - Decline = 3, - Info = 4, - Maybe = 5, - More = 6, - Mute = 7, - Pause = 8, - Play = 9, - Repeat = 10, - Resume = 11, - Share = 12, - Shuffle = 13, - Speaker = 14, - Trash = 15, - } -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKTextInputMode.cs b/src/WatchKit/iOS/WKTextInputMode.cs deleted file mode 100644 index 8978ee5d45bb..000000000000 --- a/src/WatchKit/iOS/WKTextInputMode.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using ObjCRuntime; - -namespace WatchKit { - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public enum WKTextInputMode : long { - Plain = 0, - AllowEmoji = 1, - AllowAnimatedEmoji = 2, - } -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKUserNotificationInterfaceController.cs b/src/WatchKit/iOS/WKUserNotificationInterfaceController.cs deleted file mode 100644 index 133d2a9d9044..000000000000 --- a/src/WatchKit/iOS/WKUserNotificationInterfaceController.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using Foundation; -using ObjCRuntime; - -namespace WatchKit { - [Register ("WKUserNotificationInterfaceController", SkipRegistration = true)] - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public class WKUserNotificationInterfaceController : WKInterfaceController { - public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException (Constants.WatchKitRemoved); } } - - protected WKUserNotificationInterfaceController (NSObjectFlag t) : base (t) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - protected internal WKUserNotificationInterfaceController (IntPtr handle) : base (handle) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public WKUserNotificationInterfaceController () - : base (NSObjectFlag.Empty) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void DidReceiveLocalNotification (global::UIKit.UILocalNotification localNotification, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V209))]global::System.Action completionHandler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void DidReceiveNotification (global::UserNotifications.UNNotification notification, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V209))]global::System.Action completionHandler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public virtual void DidReceiveRemoteNotification (NSDictionary remoteNotification, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V209))]global::System.Action completionHandler) - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - - public new virtual void DismissController () - { - throw new PlatformNotSupportedException (Constants.WatchKitRemoved); - } - } /* class WKUserNotificationInterfaceController */ -} -#endif // __IOS__ && !NET diff --git a/src/WatchKit/iOS/WKUserNotificationInterfaceType.cs b/src/WatchKit/iOS/WKUserNotificationInterfaceType.cs deleted file mode 100644 index 4c82346a4bff..000000000000 --- a/src/WatchKit/iOS/WKUserNotificationInterfaceType.cs +++ /dev/null @@ -1,20 +0,0 @@ -#nullable enable - -#if __IOS__ && !NET -using System; -using System.ComponentModel; -using System.Runtime.Versioning; - -using ObjCRuntime; - -namespace WatchKit { - - [Unavailable (PlatformName.iOS, PlatformArchitecture.All)] - [Obsolete (Constants.WatchKitRemoved)] - [EditorBrowsable (EditorBrowsableState.Never)] - public enum WKUserNotificationInterfaceType : long { - Default = 0, - Custom = 1, - } -} -#endif // __IOS__ && !NET diff --git a/src/WebKit/Defs.cs b/src/WebKit/Defs.cs index a12a0593088e..1656df7ca875 100644 --- a/src/WebKit/Defs.cs +++ b/src/WebKit/Defs.cs @@ -23,7 +23,7 @@ public enum WKNavigationType : long { BackForward, Reload, FormResubmitted, - Other = -1 + Other = -1, } /// Contains values that enumerate whether to cancel or allow navigation actions. @@ -53,7 +53,7 @@ public enum WKNavigationResponsePolicy : long { [Native] public enum WKUserScriptInjectionTime : long { AtDocumentStart, - AtDocumentEnd + AtDocumentEnd, } /// Enumerates WebKit errors. @@ -92,7 +92,8 @@ public enum WKErrorCode : long { [MacCatalyst (13, 1)] [Native] public enum WKSelectionGranularity : long { - Dynamic, Character + Dynamic, + Character, } /// Enumerates the kinds of data that are detected and converted to links. @@ -110,7 +111,7 @@ public enum WKDataDetectorTypes : ulong { FlightNumber = 1 << 5, LookupSuggestion = 1 << 6, SpotlightSuggestion = LookupSuggestion, - All = UInt64.MaxValue + All = UInt64.MaxValue, } /// Enumerates media types. @@ -121,7 +122,7 @@ public enum WKAudiovisualMediaTypes : ulong { None = 0, Audio = 1 << 0, Video = 1 << 1, - All = UInt64.MaxValue + All = UInt64.MaxValue, } [iOS (15, 0), NoTV, MacCatalyst (15, 0)] diff --git a/src/WebKit/Enums.cs b/src/WebKit/Enums.cs index 7f00859619c2..1cf82a598550 100644 --- a/src/WebKit/Enums.cs +++ b/src/WebKit/Enums.cs @@ -4,7 +4,7 @@ namespace WebKit { - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] public enum DomCssRuleType : ushort { Unknown = 0, @@ -20,16 +20,16 @@ public enum DomCssRuleType : ushort { NamespaceRule = 10, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] public enum DomCssValueType : ushort { Inherit = 0, PrimitiveValue = 1, ValueList = 2, - Custom = 3 + Custom = 3, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [Flags] public enum DomDocumentPosition : ushort { @@ -38,10 +38,10 @@ public enum DomDocumentPosition : ushort { Following = 0x04, Contains = 0x08, ContainedBy = 0x10, - ImplementationSpecific = 0x20 + ImplementationSpecific = 0x20, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] public enum DomNodeType : ushort { Element = 1, @@ -55,31 +55,35 @@ public enum DomNodeType : ushort { Document = 9, DocumentType = 10, DocumentFragment = 11, - Notation = 12 + Notation = 12, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] public enum DomRangeCompareHow : ushort { StartToStart = 0, StartToEnd = 1, EndToEnd = 2, - EndToStart = 3 + EndToStart = 3, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Native] public enum WebCacheModel : ulong { - DocumentViewer, DocumentBrowser, PrimaryWebBrowser + DocumentViewer, + DocumentBrowser, + PrimaryWebBrowser, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] public enum DomEventPhase : ushort { - Capturing = 1, AtTarget, Bubbling + Capturing = 1, + AtTarget, + Bubbling, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [Flags] public enum WebDragSourceAction : ulong { @@ -88,10 +92,10 @@ public enum WebDragSourceAction : ulong { Image = 2, Link = 4, Selection = 8, - Any = UInt64.MaxValue + Any = UInt64.MaxValue, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [Flags] public enum WebDragDestinationAction : ulong { @@ -101,35 +105,40 @@ public enum WebDragDestinationAction : ulong { Link = 4, [Obsolete ("This API is not available on this platform.")] Selection = 8, - Any = UInt64.MaxValue + Any = UInt64.MaxValue, } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] #if !NET public enum WebNavigationType : uint { #else [Native] public enum WebNavigationType : long { #endif - LinkClicked, FormSubmitted, BackForward, Reload, FormResubmitted, Other + LinkClicked, + FormSubmitted, + BackForward, + Reload, + FormResubmitted, + Other, } // Used as an 'unsigned int' parameter - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] public enum DomKeyLocation : uint { Standard = 0, Left = 1, Right = 2, - NumberPad = 3 + NumberPad = 3, } // Used as an 'int' parameter - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] public enum DomDelta : int { Pixel = 0, Line = 1, - Page = 2 + Page = 2, } } diff --git a/src/XKit/XKitCompat.cs b/src/XKit/XKitCompat.cs index 6044d16d00e8..ca262ab89d97 100644 --- a/src/XKit/XKitCompat.cs +++ b/src/XKit/XKitCompat.cs @@ -17,8 +17,6 @@ namespace AppKit { namespace UIKit { #endif // iOS, tvOS, WatchOS -#if !WATCH - #if !COREBUILD public partial class NSLayoutManager { @@ -35,7 +33,5 @@ public virtual void SetTemporaryAttributes (Foundation.NSDictionary AccessibilityCustomContentHandler { get; set; } @@ -145,7 +145,7 @@ interface AXCustomContentProvider { interface IAXDataAxisDescriptor { } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Protocol] interface AXDataAxisDescriptor : NSCopying { [Abstract] @@ -157,7 +157,7 @@ interface AXDataAxisDescriptor : NSCopying { NSAttributedString AttributedTitle { get; set; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AXDataPoint : NSCopying { @@ -187,7 +187,7 @@ interface AXDataPoint : NSCopying { NativeHandle Constructor (AXDataPointValue xValue, [NullAllowed] AXDataPointValue yValue, [NullAllowed] AXDataPointValue [] additionalValues, [NullAllowed] string label); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AXDataPointValue : NSCopying { @@ -206,7 +206,7 @@ interface AXDataPointValue : NSCopying { AXDataPointValue CreateValueWithCategory (string category); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AXDataSeriesDescriptor : NSCopying { @@ -231,7 +231,7 @@ interface AXDataSeriesDescriptor : NSCopying { NativeHandle Constructor (NSAttributedString attributedName, bool isContinuous, AXDataPoint [] dataPoints); } - [Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum AXHearingDeviceEar : ulong { @@ -241,7 +241,7 @@ public enum AXHearingDeviceEar : ulong { Both = Left | Right, } - [Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Static] [Partial] partial interface AXHearingUtilities { @@ -254,7 +254,7 @@ partial interface AXHearingUtilities { NSString PairedUUIDsDidChangeNotification { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AXLiveAudioGraph { @@ -271,7 +271,7 @@ interface AXLiveAudioGraph { void Stop (); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum AXNumericDataAxisDescriptorScale : long { Linear = 0, @@ -281,7 +281,7 @@ public enum AXNumericDataAxisDescriptorScale : long { delegate NSString ValueDescriptionProviderHandler (double dataValue); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AXNumericDataAxisDescriptor : AXDataAxisDescriptor { @@ -309,7 +309,7 @@ interface AXNumericDataAxisDescriptor : AXDataAxisDescriptor { NativeHandle Constructor (NSAttributedString attributedTitle, double lowerBound, double upperBound, [NullAllowed] NSNumber [] gridlinePositions, Func valueDescriptionProvider); } - [Watch (8, 3), TV (15, 2), Mac (12, 1), iOS (15, 2), MacCatalyst (15, 2)] + [TV (15, 2), Mac (12, 1), iOS (15, 2), MacCatalyst (15, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AXBrailleMap : NSCopying, NSSecureCoding { @@ -327,7 +327,7 @@ interface AXBrailleMap : NSCopying, NSSecureCoding { void Present (CGImage image); } - [Watch (8, 3), TV (15, 2), Mac (12, 1), iOS (15, 2), MacCatalyst (15, 2)] + [TV (15, 2), Mac (12, 1), iOS (15, 2), MacCatalyst (15, 2)] [Protocol] interface AXBrailleMapRenderer { @@ -344,7 +344,7 @@ interface AXBrailleMapRenderer { Action AccessibilityBrailleMapRenderer { get; set; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Partial] partial interface AXAnimatedImagesUtilities { @@ -353,7 +353,7 @@ partial interface AXAnimatedImagesUtilities { NSString AnimatedImagesEnabledDidChangeNotification { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Partial] partial interface AXPrefers { @@ -361,13 +361,13 @@ partial interface AXPrefers { [Field ("AXPrefersHorizontalTextLayoutDidChangeNotification")] NSString HorizontalTextLayoutDidChangeNotification { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Notification] [Field ("AXPrefersNonBlinkingTextInsertionIndicatorDidChangeNotification")] NSString NonBlinkingTextInsertionIndicatorDidChangeNotification { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AXRequest : NSCopying, NSSecureCoding { @@ -380,7 +380,7 @@ interface AXRequest : NSCopying, NSSecureCoding { NSString Technology { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum AXTechnology { [Field ("AXTechnologyVoiceOver")] VoiceOver, diff --git a/src/accounts.cs b/src/accounts.cs index d9026e98ead5..9b9f595699de 100644 --- a/src/accounts.cs +++ b/src/accounts.cs @@ -186,7 +186,6 @@ interface ACAccountType : NSSecureCoding { [NoiOS] [NoTV] - [NoWatch] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use LinkedIn SDK instead.")] [NoMacCatalyst] [Field ("ACAccountTypeIdentifierLinkedIn")] @@ -239,7 +238,6 @@ interface ACTencentWeiboKey { [NoiOS] [NoTV] - [NoWatch] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use LinkedIn SDK instead.")] [NoMacCatalyst] [Static] diff --git a/src/adservices.cs b/src/adservices.cs index 2e7e71711a79..fafe783aeb5c 100644 --- a/src/adservices.cs +++ b/src/adservices.cs @@ -7,7 +7,6 @@ namespace AdServices { [iOS (14, 3)] [MacCatalyst (14, 3)] [NoTV] - [NoWatch] [Native] [ErrorDomain ("AAAttributionErrorDomain")] enum AAAttributionErrorCode : long { @@ -19,7 +18,6 @@ enum AAAttributionErrorCode : long { [iOS (14, 3)] [MacCatalyst (14, 3)] [NoTV] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AAAttribution { diff --git a/src/appkit.cs b/src/appkit.cs index c71eb604c640..7320ec7c35a6 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -15776,15 +15776,15 @@ interface NSStringAttributeKey { [Internal, Field ("NSSourceTextScalingDocumentOption")] NSString SourceTextScalingDocumentOption { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSTextHighlightStyleAttributeName")] NSString TextHighlightStyle { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSTextHighlightColorSchemeAttributeName")] NSString TextHighlightColorScheme { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSAdaptiveImageGlyphAttributeName")] NSString AdaptiveImageGlyph { get; } @@ -20402,7 +20402,7 @@ interface NSObject_NSToolbarItemValidation { bool ValidateToolbarItem (NSToolbarItem item); } - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface NSToolbarItem : NSCopying, NSMenuItemValidation, NSValidatedUserInterfaceItem diff --git a/src/apptrackingtransparency.cs b/src/apptrackingtransparency.cs index f63c20922f2b..42e62ff917f0 100644 --- a/src/apptrackingtransparency.cs +++ b/src/apptrackingtransparency.cs @@ -11,7 +11,7 @@ namespace AppTrackingTransparency { - [iOS (14, 0), TV (14, 0), NoWatch] + [iOS (14, 0), TV (14, 0)] [Introduced (PlatformName.MacCatalyst, 14, 0)] [Native] public enum ATTrackingManagerAuthorizationStatus : ulong { @@ -21,7 +21,7 @@ public enum ATTrackingManagerAuthorizationStatus : ulong { Authorized = 3, } - [iOS (14, 0), TV (14, 0), NoWatch] + [iOS (14, 0), TV (14, 0)] [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] diff --git a/src/arkit.cs b/src/arkit.cs index e3497b69f5d0..507a94972687 100644 --- a/src/arkit.cs +++ b/src/arkit.cs @@ -43,7 +43,7 @@ namespace ARKit { /// Enumerates the quality of real-world tracking in an augmented-reality . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum ARTrackingState : long { NotAvailable, @@ -52,7 +52,7 @@ public enum ARTrackingState : long { } /// Enumerates the causes of . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum ARTrackingStateReason : long { None, @@ -63,7 +63,7 @@ public enum ARTrackingStateReason : long { } /// Enumerate causes for an failure. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [ErrorDomain ("ARErrorDomain")] [Native] public enum ARErrorCode : long { @@ -94,7 +94,7 @@ public enum ARErrorCode : long { } /// Enumerates the kinds of objects detected by the method. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Flags] [Native] public enum ARHitTestResultType : ulong { @@ -107,7 +107,7 @@ public enum ARHitTestResultType : ulong { } /// The orientation of an (Currently restricted to horizontal). - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum ARPlaneAnchorAlignment : long { Horizontal, @@ -115,7 +115,7 @@ public enum ARPlaneAnchorAlignment : long { } /// Enumerates options in calls to . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Flags] [Native] public enum ARSessionRunOptions : ulong { @@ -128,7 +128,7 @@ public enum ARSessionRunOptions : ulong { } /// Enumerates options for how the world coordinate system is created. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum ARWorldAlignment : long { Gravity, @@ -137,7 +137,7 @@ public enum ARWorldAlignment : long { } /// Enumerates the valid orientations for detected planes (currently, only horizontal). - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Flags] [Native] public enum ARPlaneDetection : ulong { @@ -147,7 +147,7 @@ public enum ARPlaneDetection : ulong { } /// Enumerates environmental texturing strategies used with T:ARKit.ARWorldTrackingProbeAnchor objects. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum AREnvironmentTexturing : long { None, @@ -156,7 +156,7 @@ public enum AREnvironmentTexturing : long { } /// Enumerates the states of a world-mapping session. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum ARWorldMappingStatus : long { NotAvailable, @@ -165,7 +165,7 @@ public enum ARWorldMappingStatus : long { Mapped, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum ARPlaneClassificationStatus : long { NotAvailable = 0, @@ -174,7 +174,7 @@ public enum ARPlaneClassificationStatus : long { Known, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] public enum ARPlaneClassification : long { None = 0, @@ -308,7 +308,7 @@ public enum ARAppClipCodeUrlDecodingState : long { Decoded, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol] [Advice ("To conform to 'ARAnchorCopying' you need to implement:\n'[Export (\"initWithAnchor:\")]'\n'public YourConstructor (ARAnchor anchor)'")] interface ARAnchorCopying : NSCopying { @@ -317,7 +317,7 @@ interface ARAnchorCopying : NSCopying { } /// A position, orientation, and scale that is located in the real world to which augmented reality objects can be attached. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARAnchor : ARAnchorCopying, NSSecureCoding { @@ -352,7 +352,7 @@ Matrix4 Transform { } /// Information about the location and orientation of the camera that captured an augmented-reality frame. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARCamera : NSCopying { @@ -425,7 +425,7 @@ Matrix4 ProjectionMatrix { /// /// Developers can retrieve the current from or by implementing . /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARFrame : NSCopying { @@ -508,7 +508,7 @@ interface ARFrame : NSCopying { /// A result generated by the method. [Deprecated (PlatformName.iOS, 14, 0, message: "Use Raycasting methods over HitTestResult ones.")] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARHitTestResult { @@ -539,7 +539,7 @@ Matrix4 WorldTransform { /// /// Developers who are doing their own rendering can use this information to inform their augmented-reality lighting decisions. objects that display SceneKit objects automatically take this value into account for their own rendering. /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARLightEstimate { @@ -552,7 +552,7 @@ interface ARLightEstimate { } /// A subclass of used to represent real-world flat surfaces. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARAnchor))] [DisableDefaultCtor] interface ARPlaneAnchor { @@ -645,7 +645,7 @@ interface ARSCNPlaneGeometry { /// /// Developers can visualize this data in a by setting to . /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARPointCloud : NSSecureCoding { @@ -663,7 +663,7 @@ interface ARPointCloud : NSSecureCoding { } /// An image resource that contains pre-processed images to be recognized in the real-world. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARReferenceImage : NSCopying { @@ -726,7 +726,7 @@ interface ARVideoFormat : NSCopying { } /// A subclass of that supports augmented-reality content. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (SCNView))] interface ARSCNView : ARSessionProviding { @@ -782,7 +782,7 @@ interface ARSCNView : ARSessionProviding { interface IARSCNViewDelegate { } /// Delegate object for objects. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol, Model] [BaseType (typeof (NSObject))] interface ARSCNViewDelegate : SCNSceneRendererDelegate, ARSessionObserver { @@ -805,7 +805,7 @@ interface ARSCNViewDelegate : SCNSceneRendererDelegate, ARSessionObserver { } /// A subclass of that places Sprite Kit objects in an augmented-reality session. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (SKView))] interface ARSKView : ARSessionProviding { @@ -838,7 +838,7 @@ interface ARSKView : ARSessionProviding { interface IARSKViewDelegate { } /// Delegate object allowing the developer to respond to events relating to a . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol, Model] [BaseType (typeof (NSObject))] interface ARSKViewDelegate : SKViewDelegate, ARSessionObserver { @@ -863,7 +863,7 @@ interface ARSKViewDelegate : SKViewDelegate, ARSessionObserver { delegate void GetGeolocationCallback (CLLocationCoordinate2D coordinate, double altitude, NSError error); /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] interface ARSession { @@ -937,7 +937,7 @@ interface ARSession { void CaptureHighResolutionFrame (Action handler); } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol] interface ARSessionObserver { @@ -977,7 +977,7 @@ interface ARSessionObserver { interface IARSessionDelegate { } /// Delegate object for the object, allowing the developer to respond to events relating to the augmented-reality session. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol, Model] [BaseType (typeof (NSObject))] interface ARSessionDelegate : ARSessionObserver { @@ -996,7 +996,7 @@ interface ARSessionDelegate : ARSessionObserver { } /// Configuration information for augmented reality sessions. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [Abstract] [DisableDefaultCtor] @@ -1059,7 +1059,7 @@ ARVideoFormat [] SupportedVideoFormats { } /// Configuration for a session that tracks the device position and orientation, and optionally detects horizontal surfaces. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARConfiguration))] interface ARWorldTrackingConfiguration { @@ -1135,7 +1135,7 @@ interface ARWorldTrackingConfiguration { } /// An that only tracks the device orientation and uses the device's rear-facing cameras. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARConfiguration))] interface AROrientationTrackingConfiguration { @@ -1153,7 +1153,7 @@ interface AROrientationTrackingConfiguration { } /// Visualization options for use with the property of . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Static] interface ARSCNDebugOptions { @@ -1165,7 +1165,7 @@ interface ARSCNDebugOptions { } /// Interface for real-world objects that can be tracked by ARKit. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol] interface ARTrackable { [Abstract] @@ -1174,7 +1174,7 @@ interface ARTrackable { } /// An for recognizing and tracking faces. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARConfiguration))] interface ARFaceTrackingConfiguration { [Static] @@ -1209,7 +1209,7 @@ interface ARFaceTrackingConfiguration { /// /// All values are in the range [0..1], where 0.0 indicates the neutral state and 1.0 indicates maximum displacement. /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [StrongDictionary ("ARBlendShapeLocationKeys")] interface ARBlendShapeLocationOptions { @@ -1318,7 +1318,7 @@ interface ARBlendShapeLocationOptions { float TongueOut { get; set; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Static] [Internal] interface ARBlendShapeLocationKeys { @@ -1481,7 +1481,7 @@ interface ARBlendShapeLocationKeys { } /// An that locates a detected face in the AR session's world coordinates. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARAnchor))] [DisableDefaultCtor] interface ARFaceAnchor : ARTrackable { @@ -1525,7 +1525,7 @@ Vector3 LookAtPoint { } /// A mesh that represents a recognized face, including shape and expression. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARFaceGeometry : NSCopying, NSSecureCoding { @@ -1559,7 +1559,7 @@ interface ARFaceGeometry : NSCopying, NSSecureCoding { } /// SceneKit geometry that represents a face. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (SCNGeometry))] [DisableDefaultCtor] interface ARSCNFaceGeometry { @@ -1594,7 +1594,7 @@ interface ARSCNFaceGeometry { } /// A that tracks an image detected in the real world. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARAnchor))] [DisableDefaultCtor] interface ARImageAnchor : ARTrackable { @@ -1611,7 +1611,7 @@ interface ARImageAnchor : ARTrackable { } /// Estimates real-world illumination falling on a face. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARLightEstimate))] [DisableDefaultCtor] interface ARDirectionalLightEstimate { @@ -1633,7 +1633,7 @@ Vector3 PrimaryLightDirection { /// /// Developers should use this subclass of in scenarios where a known image, viewable by the rear-facing camera, is a more reliable anchor than real-world features from a broader field of view. For instance, a poster or advetisement located in a moving train car. /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARConfiguration))] interface ARImageTrackingConfiguration { [Static] @@ -1659,7 +1659,7 @@ interface ARImageTrackingConfiguration { /// /// This is intended to be used during development only. It is expensive in terms of computation, power, and memory. Developers can use the higher-fidelity data generated in sessions using this configuration to create instances that can be used later. /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARConfiguration))] interface ARObjectScanningConfiguration { [Static] @@ -1679,7 +1679,7 @@ interface ARObjectScanningConfiguration { } /// Source for environmentally-based lighting. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARAnchor))] [DisableDefaultCtor] interface AREnvironmentProbeAnchor { @@ -1706,7 +1706,7 @@ Vector3 Extent { } /// Digital representation of a 3D object to be detected in the real world. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARReferenceObject : NSSecureCoding { @@ -1763,7 +1763,7 @@ Vector3 Scale { /// /// subclass that tracks a recognized real-world 3D object. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ARAnchor))] [DisableDefaultCtor] interface ARObjectAnchor { @@ -1779,7 +1779,7 @@ interface ARObjectAnchor { /// /// Developers can use an to serialize a mixed-reality scene. The serialized data can be used at a later time to recreate a scene or shared with another user to create a shared experience. /// - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ARWorldMap : NSCopying, NSSecureCoding { diff --git a/src/audiounit.cs b/src/audiounit.cs index 295a27b2cbc9..f8a1c0272fc7 100644 --- a/src/audiounit.cs +++ b/src/audiounit.cs @@ -31,7 +31,7 @@ using MediaToolbox; using AUViewControllerBase = UIKit.UIViewController; #endif -#if WATCH || TVOS +#if TVOS using MidiCIProfile = Foundation.NSObject; using MidiCIProfileState = Foundation.NSObject; #endif @@ -48,7 +48,6 @@ internal delegate AudioUnitStatus AURenderPullInputBlock (ref AudioUnitRenderAct uint frameCount, nint inputBusNumber, AudioBuffers inputData); delegate void AUScheduleParameterBlock (AUEventSampleTime eventSampleTime, uint rampDurationSampleFrames, ulong parameterAddress, float value); - [NoWatch] [MacCatalyst (13, 1)] delegate int AUMidiOutputEventBlock (long eventSampleTime, byte cable, nint length, IntPtr midiBytes); /// The parameter that changed. @@ -112,7 +111,6 @@ internal delegate AudioUnitStatus AURenderPullInputBlock (ref AudioUnitRenderAct /// The new audio unit value. delegate float AUImplementorValueFromStringCallback (AUParameter param, string str); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] delegate void AUMidiCIProfileChangedCallback (byte cable, byte channel, MidiCIProfile profile, bool enabled); @@ -161,7 +159,6 @@ interface AUAudioUnit { [NullAllowed, Export ("manufacturerName")] string ManufacturerName { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("audioUnitShortName")] string ShortName { get; } @@ -191,7 +188,7 @@ interface AUAudioUnit { AUScheduleParameterBlock ScheduleParameterBlock { get; } // TODO: https://github.com/xamarin/xamarin-macios/issues/12489 - // [TV (15,0), NoWatch, iOS (15,0), MacCatalyst (15,0)] + // [TV (15,0), iOS (15,0), MacCatalyst (15,0)] // [NullAllowed] // [Export ("scheduleMIDIEventListBlock")] // AUMidiEventListBlock ScheduleMidiEventListBlock { get; } @@ -210,18 +207,18 @@ interface AUAudioUnit { string [] MidiOutputNames { get; } // TODO: https://github.com/xamarin/xamarin-macios/issues/12489 - // [TV (15,0), NoWatch, iOS (15,0), MacCatalyst (15,0)] + // [TV (15,0), iOS (15,0), MacCatalyst (15,0)] // [NullAllowed] // [Export ("MIDIOutputEventListBlock", ArgumentSemantic.Copy)] // AUMidiEventListBlock MidiOutputEventListBlock { get; set; } // TODO: https://github.com/xamarin/xamarin-macios/issues/12489 - // [TV (15,0), NoWatch, iOS (15,0), MacCatalyst (15,0)] + // [TV (15,0), iOS (15,0), MacCatalyst (15,0)] // [Export ("AudioUnitMIDIProtocol")] // MIDIProtocolID AudioUnitMidiProtocol { get; } // TODO: https://github.com/xamarin/xamarin-macios/issues/12489 - // [TV (15,0), NoWatch, iOS (15,0), MacCatalyst (15,0)] + // [TV (15,0), iOS (15,0), MacCatalyst (15,0)] // [Export ("hostMIDIProtocol", ArgumentSemantic.Assign)] // MIDIProtocolID HostMIDIProtocol { get; set; } @@ -246,7 +243,7 @@ interface AUAudioUnit { AUParameterTree ParameterTree { get; - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] set; } @@ -332,61 +329,58 @@ AUParameterTree ParameterTree { [Export ("MIDIOutputBufferSizeHint")] nint MidiOutputBufferSizeHint { get; set; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("profileStateForCable:channel:")] MidiCIProfileState GetProfileState (byte cable, byte channel); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("profileChangedBlock", ArgumentSemantic.Assign)] AUMidiCIProfileChangedCallback ProfileChangedCallback { get; set; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("disableProfile:cable:onChannel:error:")] bool Disable (MidiCIProfile profile, byte cable, byte channel, [NullAllowed] out NSError outError); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("enableProfile:cable:onChannel:error:")] bool Enable (MidiCIProfile profile, byte cable, byte channel, [NullAllowed] out NSError outError); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("userPresets", ArgumentSemantic.Copy)] AUAudioUnitPreset [] UserPresets { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("saveUserPreset:error:")] bool SaveUserPreset (AUAudioUnitPreset userPreset, [NullAllowed] out NSError outError); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("deleteUserPreset:error:")] bool DeleteUserPreset (AUAudioUnitPreset userPreset, [NullAllowed] out NSError outError); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("presetStateFor:error:")] [return: NullAllowed] NSDictionary GetPresetState (AUAudioUnitPreset userPreset, [NullAllowed] out NSError outError); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("supportsUserPresets")] bool SupportsUserPresets { get; } [Introduced (PlatformName.MacCatalyst, 13, 0)] // needed since it's not in iOS - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [Export ("isLoadedInProcess")] bool IsLoadedInProcess { get; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("migrateFromPlugin")] NSData [] MigrateFromPlugin { get; } } @@ -399,12 +393,12 @@ AUParameterTree ParameterTree { [BaseType (typeof (AUAudioUnit))] interface AUAudioUnit_AUAudioInputOutputUnit { - [NoTV, NoiOS, NoWatch] + [NoTV, NoiOS] [NoMacCatalyst] [Export ("deviceID")] uint GetDeviceId (); - [NoTV, NoiOS, NoWatch] + [NoTV, NoiOS] [NoMacCatalyst] [Export ("setDeviceID:error:")] bool SetDeviceId (uint deviceID, out NSError outError); @@ -448,12 +442,12 @@ interface AUAudioUnit_AUAudioInputOutputUnit { void SetOutputProvider ([NullAllowed] AURenderPullInputBlock provider); // the following are properties but we cannot have properties in Categories. - [NoWatch, NoiOS, NoTV] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("deviceInputLatency")] double GetDeviceInputLatency (); - [NoWatch, NoiOS, NoTV] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("deviceOutputLatency")] double GetDeviceOutputLatency (); diff --git a/src/authenticationservices.cs b/src/authenticationservices.cs index 1c548e586d14..27bdb45f578f 100644 --- a/src/authenticationservices.cs +++ b/src/authenticationservices.cs @@ -16,11 +16,6 @@ #else using UIKit; #endif -#if WATCH -using UIControl = Foundation.NSObject; -using UIViewController = Foundation.NSObject; -using UIWindow = Foundation.NSObject; -#endif #if !TVOS using LocalAuthentication; #endif @@ -37,7 +32,6 @@ namespace AuthenticationServices { /// Enumerates error codes associated with authentication service store requests. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [Native] [ErrorDomain ("ASCredentialIdentityStoreErrorDomain")] public enum ASCredentialIdentityStoreErrorCode : long { @@ -49,7 +43,6 @@ public enum ASCredentialIdentityStoreErrorCode : long { /// Error codes associated with Authentication Services extensions. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [Native] [ErrorDomain ("ASExtensionErrorDomain")] public enum ASExtensionErrorCode : long { @@ -63,12 +56,12 @@ public enum ASExtensionErrorCode : long { [Partial] interface ASExtensionErrorCodeExtensions { -#if NET || TVOS || WATCH +#if NET || TVOS // Type `ASExtensionErrorCode` is already decorated, so it becomes a duplicate (after code gen) // on those platforms and intro tests complains (on other platforms, e.g. iOS, Catalyst) // OTOH if we don't add them here then we'll get the extra, not really usable, extension type // on tvOS and watchOS (which is incorrect) - [NoTV][NoWatch] + [NoTV] #endif [NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] @@ -79,7 +72,6 @@ interface ASExtensionErrorCodeExtensions { /// Enumerates the types of service identified. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [Native] public enum ASCredentialServiceIdentifierType : long { Domain, @@ -87,7 +79,6 @@ public enum ASCredentialServiceIdentifierType : long { } [TV (16, 0)] - [Watch (6, 2)] [MacCatalyst (13, 1)] [Native] [ErrorDomain ("ASWebAuthenticationSessionErrorDomain")] @@ -97,13 +88,13 @@ public enum ASWebAuthenticationSessionErrorCode : long { PresentationContextInvalid = 3, } - [Flags, NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Flags, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum ASAuthorizationControllerRequestOptions : ulong { ImmediatelyAvailableCredentials = 1uL << 0, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [Native] public enum ASAuthorizationProviderExtensionAuthenticationMethod : long { Password = 1, @@ -112,7 +103,7 @@ public enum ASAuthorizationProviderExtensionAuthenticationMethod : long { SmartCard = 3, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [Native] public enum ASAuthorizationProviderExtensionKeyType : long { DeviceSigning = 1, @@ -130,7 +121,7 @@ public enum ASAuthorizationProviderExtensionKeyType : long { UserSmartCard = 20, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [Native] public enum ASAuthorizationProviderExtensionRegistrationResult : long { Success = 0, @@ -139,7 +130,7 @@ public enum ASAuthorizationProviderExtensionRegistrationResult : long { FailedNoRetry = 3, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [Flags] [Native] public enum ASAuthorizationProviderExtensionRequestOptions : ulong { @@ -156,7 +147,7 @@ public enum ASAuthorizationProviderExtensionRequestOptions : ulong { UserKeyInvalid = 1uL << 5, } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (16, 4), Mac (13, 3)] + [TV (17, 0), iOS (17, 0), MacCatalyst (16, 4), Mac (13, 3)] [Native] public enum ASAuthorizationWebBrowserPublicKeyCredentialManagerAuthorizationState : long { Authorized, @@ -164,29 +155,29 @@ public enum ASAuthorizationWebBrowserPublicKeyCredentialManagerAuthorizationStat NotDetermined, } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (14, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (14, 0)] [Native] public enum ASCredentialRequestType : long { Password = 0, PasskeyAssertion, - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] PasskeyRegistration, - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] OneTimeCode, } - [NoWatch, NoTV, Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Flags] [Native] public enum ASCredentialIdentityTypes : ulong { All = 0, Password = 1, Passkey = 1uL << 1, - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] OneTimeCode = 1uL << 2, } - [NoWatch, NoTV, Mac (14, 4), NoiOS, NoMacCatalyst] + [NoTV, Mac (14, 4), NoiOS, NoMacCatalyst] [Flags] [Native] public enum ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy : ulong { @@ -204,7 +195,6 @@ public enum ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy /// A class whose shared instance (see ) holds credentials across providers. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASCredentialIdentityStore { @@ -265,7 +255,6 @@ interface ASCredentialIdentityStore { /// Data related to the availability and capability of the credential identity store. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASCredentialIdentityStoreState { @@ -279,11 +268,9 @@ interface ASCredentialIdentityStoreState { /// Delegate object for completion handlers in methods within T:AuthenticationServices.ASCredentialProviderExtension. delegate void ASCredentialProviderExtensionRequestCompletionHandler (bool expired); - /// - /// subclass that provides context for a credential provider. + /// An subclass that provides context for a credential provider. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (NSExtensionContext))] [DisableDefaultCtor] interface ASCredentialProviderExtensionContext { @@ -297,22 +284,22 @@ interface ASCredentialProviderExtensionContext { void CancelRequest (NSError error); [Async] - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("completeRegistrationRequestWithSelectedPasskeyCredential:completionHandler:")] void CompleteRegistrationRequest (ASPasskeyRegistrationCredential credential, [NullAllowed] Action completionHandler); [Async] - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("completeAssertionRequestWithSelectedPasskeyCredential:completionHandler:")] void CompleteAssertionRequest (ASPasskeyAssertionCredential credential, [NullAllowed] Action completionHandler); [Async] - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("completeOneTimeCodeRequestWithSelectedCredential:completionHandler:")] void CompleteOneTimeCodeRequest (ASOneTimeCodeCredential credential, [NullAllowed] Action completionHandler); [Async] - [NoWatch, NoTV, NoMac, iOS (18, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (18, 0), NoMacCatalyst] [Export ("completeRequestWithTextToInsert:completionHandler:")] void CompleteRequest (string textToInsert, [NullAllowed] Action completionHandler); } @@ -320,7 +307,6 @@ interface ASCredentialProviderExtensionContext { /// Holds the identification for a credential service. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASCredentialServiceIdentifier : NSCopying, NSSecureCoding { @@ -337,7 +323,6 @@ interface ASCredentialServiceIdentifier : NSCopying, NSSecureCoding { /// Associates a string with a record in the developer's credential database. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasswordCredentialIdentity : NSCopying, NSSecureCoding, ASCredentialIdentity { @@ -365,7 +350,6 @@ interface ASPasswordCredentialIdentity : NSCopying, NSSecureCoding, ASCredential /// System-provided standard for presenting a credential provider extension. [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (UIViewController))] interface ASCredentialProviderViewController { [Export ("extensionContext", ArgumentSemantic.Strong)] @@ -389,36 +373,36 @@ interface ASCredentialProviderViewController { [Export ("prepareInterfaceForExtensionConfiguration")] void PrepareInterfaceForExtensionConfiguration (); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("prepareCredentialListForServiceIdentifiers:requestParameters:")] void PrepareCredentialList (ASCredentialServiceIdentifier [] serviceIdentifiers, ASPasskeyCredentialRequestParameters requestParameters); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("provideCredentialWithoutUserInteractionForRequest:")] void ProvideCredentialWithoutUserInteraction (IASCredentialRequest credentialRequest); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("prepareInterfaceToProvideCredentialForRequest:")] void PrepareInterfaceToProvideCredential (IASCredentialRequest credentialRequest); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("prepareInterfaceForPasskeyRegistration:")] void PrepareInterfaceForPasskeyRegistration (IASCredentialRequest registrationRequest); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("prepareOneTimeCodeCredentialListForServiceIdentifiers:")] void PrepareOneTimeCodeCredentialList (ASCredentialServiceIdentifier [] serviceIdentifiers); - [NoWatch, NoTV, NoMac, iOS (18, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (18, 0), NoMacCatalyst] [Export ("prepareInterfaceForUserChoosingTextToInsert")] void PrepareInterfaceForUserChoosingTextToInsert (); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("performPasskeyRegistrationWithoutUserInteractionIfPossible:")] void PerformPasskeyRegistrationWithoutUserInteractionIfPossible (ASPasskeyCredentialRequest registrationRequest); } - [Watch (6, 0), TV (13, 0)] + [TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -440,7 +424,6 @@ interface ASPasswordCredential : NSCopying, NSSecureCoding, ASAuthorizationCrede delegate void ASWebAuthenticationSessionCompletionHandler ([NullAllowed] NSUrl callbackUrl, [NullAllowed] NSError error); [TV (16, 0)] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -450,11 +433,10 @@ interface ASWebAuthenticationSession { [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the 'ASWebAuthenticationSessionCallback' overload instead.")] [Deprecated (PlatformName.MacOSX, 14, 4, message: "Use the 'ASWebAuthenticationSessionCallback' overload instead.")] [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the 'ASWebAuthenticationSessionCallback' overload instead.")] - [Deprecated (PlatformName.WatchOS, 10, 4, message: "Use the 'ASWebAuthenticationSessionCallback' overload instead.")] [Export ("initWithURL:callbackURLScheme:completionHandler:")] NativeHandle Constructor (NSUrl url, [NullAllowed] string callbackUrlScheme, ASWebAuthenticationSessionCompletionHandler completionHandler); - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("initWithURL:callback:completionHandler:")] NativeHandle Constructor (NSUrl url, ASWebAuthenticationSessionCallback callback, ASWebAuthenticationSessionCompletionHandler completionHandler); @@ -466,7 +448,7 @@ interface ASWebAuthenticationSession { [Export ("cancel")] void Cancel (); - [iOS (13, 0), NoWatch, NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("presentationContextProvider", ArgumentSemantic.Weak)] IASWebAuthenticationPresentationContextProviding PresentationContextProvider { get; set; } @@ -476,7 +458,7 @@ interface ASWebAuthenticationSession { [Export ("prefersEphemeralWebBrowserSession")] bool PrefersEphemeralWebBrowserSession { get; set; } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [NullAllowed, Export ("additionalHeaderFields", ArgumentSemantic.Assign)] NSDictionary AdditionalHeaderFields { get; set; } @@ -486,7 +468,7 @@ interface ASWebAuthenticationSession { bool CanStart { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -507,7 +489,7 @@ interface ASAuthorization { IntPtr _Credential { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] enum ASAuthorizationScope { [Field ("ASAuthorizationScopeFullName")] @@ -516,7 +498,7 @@ enum ASAuthorizationScope { Email, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum ASUserDetectionStatus : long { @@ -525,21 +507,21 @@ enum ASUserDetectionStatus : long { LikelyReal, } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum ASAuthorizationPublicKeyCredentialLargeBlobSupportRequirement : long { Required, Preferred, } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum ASAuthorizationPublicKeyCredentialLargeBlobAssertionOperation : long { Read, Write, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum ASPublicKeyCredentialClientDataCrossOriginValue : long { NotSet, @@ -547,14 +529,14 @@ public enum ASPublicKeyCredentialClientDataCrossOriginValue : long { SameOriginWithAncestors, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum ASAuthorizationPublicKeyCredentialAttachment : long { Platform, CrossPlatform, } - [NoWatch, NoTV, Mac (14, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (14, 0), NoiOS, NoMacCatalyst] [Native] public enum ASAuthorizationProviderExtensionFederationType : long { None = 0, @@ -562,7 +544,7 @@ public enum ASAuthorizationProviderExtensionFederationType : long { DynamicWSTrust = 2, } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum ASUserAgeRange : long { Unknown, @@ -570,7 +552,7 @@ public enum ASUserAgeRange : long { NotChild, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "ASAuthorizationAppleIDCredential")] [DisableDefaultCtor] @@ -601,12 +583,12 @@ interface ASAuthorizationAppleIdCredential : ASAuthorizationCredential { [Export ("realUserStatus")] ASUserDetectionStatus RealUserStatus { get; } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("userAgeRange")] ASUserAgeRange UserAgeRange { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum ASAuthorizationAppleIdProviderCredentialState : long { @@ -616,7 +598,7 @@ enum ASAuthorizationAppleIdProviderCredentialState : long { Transferred, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "ASAuthorizationAppleIDProvider")] interface ASAuthorizationAppleIdProvider : ASAuthorizationProvider { @@ -633,7 +615,7 @@ interface ASAuthorizationAppleIdProvider : ASAuthorizationProvider { NSString CredentialRevokedNotification { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (ASAuthorizationOpenIdRequest), Name = "ASAuthorizationAppleIDRequest")] [DisableDefaultCtor] // NSInvalidArgumentException Reason: -[ASAuthorizationAppleIDRequest init]: unrecognized selector sent to instance 0x600002ff8b40 @@ -645,7 +627,7 @@ interface ASAuthorizationAppleIdRequest { interface IASAuthorizationControllerDelegate { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol][Model] @@ -662,14 +644,14 @@ interface ASAuthorizationControllerDelegate { [Export ("authorizationController:didCompleteWithError:")] void DidComplete (ASAuthorizationController controller, NSError error); - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("authorizationController:didCompleteWithCustomMethod:")] void DidComplete (ASAuthorizationController controller, NSString method); } interface IASAuthorizationControllerPresentationContextProviding { } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface ASAuthorizationControllerPresentationContextProviding { @@ -679,7 +661,7 @@ interface ASAuthorizationControllerPresentationContextProviding { UIWindow GetPresentationAnchor (ASAuthorizationController controller); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -699,7 +681,6 @@ interface ASAuthorizationController { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("presentationContextProvider", ArgumentSemantic.Weak)] IASAuthorizationControllerPresentationContextProviding PresentationContextProvider { get; set; } @@ -707,20 +688,20 @@ interface ASAuthorizationController { [Export ("performRequests")] void PerformRequests (); - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("customAuthorizationMethods", ArgumentSemantic.Copy)] NSString [] CustomAuthorizationMethods { get; set; } - [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (16, 0)] + [NoTV, NoMacCatalyst, NoMac, iOS (16, 0)] [Export ("performAutoFillAssistedRequests")] void PerformAutoFillAssistedRequests (); - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("performRequestsWithOptions:")] void PerformRequests (ASAuthorizationControllerRequestOptions options); - [NoWatch, TV (18, 0), Mac (13, 0), iOS (16, 0)] + [TV (18, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("cancel")] void Cancel (); @@ -728,12 +709,12 @@ interface ASAuthorizationController { interface IASAuthorizationCredential { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface ASAuthorizationCredential : NSCopying, NSSecureCoding { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [ErrorDomain ("ASAuthorizationErrorDomain")] [Native] @@ -749,7 +730,7 @@ public enum ASAuthorizationError : long { CredentialExport = 1008, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] enum ASAuthorizationOperation { [Field ("ASAuthorizationOperationImplicit")] @@ -765,7 +746,7 @@ enum ASAuthorizationOperation { Logout, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (ASAuthorizationRequest), Name = "ASAuthorizationOpenIDRequest")] [DisableDefaultCtor] // NSInvalidArgumentException Reason: -[ASAuthorizationOpenIDRequest init]: unrecognized selector sent to instance 0x600002ff0660 @@ -786,7 +767,7 @@ interface ASAuthorizationOpenIdRequest { NSString RequestedOperation { get; set; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface ASAuthorizationPasswordProvider : ASAuthorizationProvider { @@ -795,7 +776,7 @@ interface ASAuthorizationPasswordProvider : ASAuthorizationProvider { ASAuthorizationPasswordRequest CreateRequest (); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (ASAuthorizationRequest))] // Name: NSInvalidArgumentException Reason: -[ASAuthorizationPasswordRequest init]: unrecognized selector sent to instance 0x6000005f2dc0 @@ -804,13 +785,13 @@ interface ASAuthorizationPasswordRequest { } interface IASAuthorizationProvider { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface ASAuthorizationProvider { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Protocol] interface ASAuthorizationProviderExtensionAuthorizationRequestHandler { @@ -823,7 +804,7 @@ interface ASAuthorizationProviderExtensionAuthorizationRequestHandler { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] enum ASAuthorizationProviderAuthorizationOperation { // no value yet - but we must handle `nil` as a default value [DefaultEnumValue] @@ -835,14 +816,14 @@ enum ASAuthorizationProviderAuthorizationOperation { [Field ("ASAuthorizationProviderAuthorizationOperationConfigurationRemoved")] ConfigurationRemoved, - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Field ("ASAuthorizationProviderAuthorizationOperationDirectRequest")] DirectRequest, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [BaseType (typeof (NSObject))] interface ASAuthorizationProviderExtensionAuthorizationRequest { @@ -864,7 +845,7 @@ interface ASAuthorizationProviderExtensionAuthorizationRequest { [Export ("completeWithError:")] void Complete (NSError error); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("completeWithAuthorizationResult:")] void Complete (ASAuthorizationProviderExtensionAuthorizationResult authorizationResult); @@ -919,17 +900,17 @@ interface ASAuthorizationProviderExtensionAuthorizationRequest { bool UserInterfaceEnabled { [Bind ("isUserInterfaceEnabled")] get; } [NullAllowed] - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [Export ("loginManager", ArgumentSemantic.Strong)] ASAuthorizationProviderExtensionLoginManager LoginManager { get; } - [NoWatch, NoTV, NoiOS, Mac (14, 0), NoMacCatalyst] + [NoTV, NoiOS, Mac (14, 0), NoMacCatalyst] [Export ("callerAuditToken")] NSData CallerAuditToken { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -943,7 +924,7 @@ interface ASAuthorizationRequest : NSCopying, NSSecureCoding { IntPtr _Provider { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -970,7 +951,7 @@ interface ASAuthorizationSingleSignOnCredential : ASAuthorizationCredential { SecKey [] PrivateKeys { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -990,7 +971,7 @@ interface ASAuthorizationSingleSignOnProvider : ASAuthorizationProvider { bool CanPerformAuthorization { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (ASAuthorizationOpenIdRequest))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: -[ASAuthorizationSingleSignOnRequest init]: unrecognized selector sent to instance 0x60000095aa60 @@ -1004,7 +985,7 @@ interface ASAuthorizationSingleSignOnRequest { bool UserInterfaceEnabled { [Bind ("isUserInterfaceEnabled")] get; set; } } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum ASAuthorizationAppleIdButtonType : long { @@ -1016,7 +997,7 @@ enum ASAuthorizationAppleIdButtonType : long { Default = SignIn, } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum ASAuthorizationAppleIdButtonStyle : long { @@ -1025,7 +1006,7 @@ enum ASAuthorizationAppleIdButtonStyle : long { Black = 2, } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl), Name = "ASAuthorizationAppleIDButton")] [DisableDefaultCtor] @@ -1051,7 +1032,7 @@ interface ASAuthorizationAppleIdButton { interface IASWebAuthenticationPresentationContextProviding { } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface ASWebAuthenticationPresentationContextProviding { @@ -1066,7 +1047,6 @@ interface IASWebAuthenticationSessionRequestDelegate { } [Introduced (PlatformName.MacCatalyst, 13, 0)] [NoTV] [NoiOS] - [NoWatch] #if NET [Protocol][Model] #else @@ -1087,7 +1067,6 @@ interface IASWebAuthenticationSessionWebBrowserSessionHandling { } [NoTV] [NoiOS] - [NoWatch] [NoMacCatalyst] [Protocol] interface ASWebAuthenticationSessionWebBrowserSessionHandling { @@ -1104,7 +1083,6 @@ interface ASWebAuthenticationSessionWebBrowserSessionHandling { [Introduced (PlatformName.MacCatalyst, 13, 0)] [NoTV] [NoiOS] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASWebAuthenticationSessionRequest : NSSecureCoding, NSCopying { @@ -1147,7 +1125,6 @@ interface ASWebAuthenticationSessionRequest : NSSecureCoding, NSCopying { [NoTV] [NoiOS] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // implied by `sharedManager` @@ -1173,7 +1150,7 @@ interface ASWebAuthenticationSessionWebBrowserSessionManager { [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAccountAuthenticationModificationRequest { @@ -1183,7 +1160,7 @@ interface IASAccountAuthenticationModificationControllerDelegate { } [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] #if NET [Protocol][Model] #else @@ -1204,7 +1181,7 @@ interface IASAccountAuthenticationModificationControllerPresentationContextProvi [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol] interface ASAccountAuthenticationModificationControllerPresentationContextProviding { @@ -1215,7 +1192,7 @@ interface ASAccountAuthenticationModificationControllerPresentationContextProvid [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] interface ASAccountAuthenticationModificationController { @@ -1235,7 +1212,7 @@ interface ASAccountAuthenticationModificationController { [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSExtensionContext))] [DisableDefaultCtor] interface ASAccountAuthenticationModificationExtensionContext { @@ -1256,7 +1233,7 @@ interface ASAccountAuthenticationModificationExtensionContext { [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ASAccountAuthenticationModificationRequest))] [DisableDefaultCtor] interface ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest { @@ -1276,7 +1253,7 @@ interface ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleR [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (ASAccountAuthenticationModificationRequest))] [DisableDefaultCtor] interface ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest { @@ -1296,7 +1273,7 @@ interface ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequ [Introduced (PlatformName.MacCatalyst, 14, 0)] [iOS (14, 0)] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (UIViewController))] interface ASAccountAuthenticationModificationViewController { @@ -1319,7 +1296,7 @@ interface ASAccountAuthenticationModificationViewController { void CancelRequest (); } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch, NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] [Static] interface ASAuthorizationPublicKeyCredentialAttestationKind { [Field ("ASAuthorizationPublicKeyCredentialAttestationKindNone")] @@ -1336,7 +1313,7 @@ interface ASAuthorizationPublicKeyCredentialAttestationKind { } #if !XAMCORE_5_0 - [iOS (15, 0), MacCatalyst (15, 0), NoWatch, TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Static] interface ASAuthorizationPublicKeyCredentialUserVerificationPreference { [Field ("ASAuthorizationPublicKeyCredentialUserVerificationPreferencePreferred")] @@ -1350,7 +1327,7 @@ interface ASAuthorizationPublicKeyCredentialUserVerificationPreference { } #endif - [iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), NoWatch, TV (16, 0)] + [iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), TV (16, 0)] #if XAMCORE_5_0 enum ASAuthorizationPublicKeyCredentialUserVerificationPreference { #else @@ -1366,7 +1343,7 @@ enum ASAuthorizationPublicKeyCredentialUserVerificationPreferenceEnum { Discouraged, } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch, NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] enum ASAuthorizationPublicKeyCredentialResidentKeyPreference { [Field ("ASAuthorizationPublicKeyCredentialResidentKeyPreferenceDiscouraged")] Discouraged, @@ -1376,7 +1353,7 @@ enum ASAuthorizationPublicKeyCredentialResidentKeyPreference { Required, } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch, NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] enum ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport { [Field ("ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportUSB")] Usb, @@ -1386,21 +1363,21 @@ enum ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport { Bluetooth, } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch, NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] [Native] enum ASCoseAlgorithmIdentifier : long { ES256 = -7, } // Introduced in Xcode13 Beta3 but not used anywhere - // [iOS (15,0), MacCatalyst (15,0), NoWatch, NoTV] + // [iOS (15,0), MacCatalyst (15,0), NoTV] // [Native] // enum AscoseEllipticCurveIdentifier : long { // P256 = 1, // } // - [Flags, NoWatch, NoTV, NoiOS, Mac (14, 0), NoMacCatalyst] + [Flags, NoTV, NoiOS, Mac (14, 0), NoMacCatalyst] [Native] public enum ASAuthorizationProviderExtensionSupportedGrantTypes : long { None = 0x0, @@ -1410,7 +1387,7 @@ public enum ASAuthorizationProviderExtensionSupportedGrantTypes : long { Saml20 = 1L << 3, } - [NoWatch, NoTV, NoiOS, Mac (14, 0), NoMacCatalyst] + [NoTV, NoiOS, Mac (14, 0), NoMacCatalyst] [Native] public enum ASAuthorizationProviderExtensionPlatformSSOProtocolVersion : long { Version1_0 = 0, @@ -1420,7 +1397,7 @@ public enum ASAuthorizationProviderExtensionPlatformSSOProtocolVersion : long { interface IASAuthorizationPublicKeyCredentialAssertion { } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Protocol] interface ASAuthorizationPublicKeyCredentialAssertion : ASPublicKeyCredential { [Abstract] @@ -1440,10 +1417,9 @@ interface ASAuthorizationPublicKeyCredentialAssertion : ASPublicKeyCredential { [Obsoleted (PlatformName.iOS, 16, 4, message: Constants.ApiRemovedGeneral)] [Obsoleted (PlatformName.MacCatalyst, 16, 4, message: Constants.ApiRemovedGeneral)] [Obsoleted (PlatformName.TvOS, 16, 4, message: Constants.ApiRemovedGeneral)] - [Obsoleted (PlatformName.WatchOS, 9, 4, message: Constants.ApiRemovedGeneral)] - [NoWatch, Mac (13, 3), iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [Mac (13, 3), iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] #else - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 3)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 3)] #endif [BaseType (typeof (ASAuthorizationRequest))] [DisableDefaultCtor] @@ -1454,16 +1430,16 @@ interface ASAuthorizationPlatformPublicKeyCredentialAssertionRequest : ASAuthori ASAuthorizationPlatformPublicKeyCredentialDescriptor [] PlatformAllowedCredentials { get; set; } [NullAllowed] - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("largeBlob", ArgumentSemantic.Assign)] ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput LargeBlob { get; set; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("prf"), NullAllowed] ASAuthorizationPublicKeyCredentialPrfAssertionInput Prf { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (ASAuthorizationRequest))] [DisableDefaultCtor] interface ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest : ASAuthorizationPublicKeyCredentialAssertionRequest { @@ -1479,7 +1455,7 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest : ASAuth interface IASAuthorizationPublicKeyCredentialAssertionRequest { } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Protocol] interface ASAuthorizationPublicKeyCredentialAssertionRequest : NSSecureCoding, NSCopying { [Abstract] @@ -1501,7 +1477,7 @@ interface ASAuthorizationPublicKeyCredentialAssertionRequest : NSSecureCoding, N interface IASAuthorizationPublicKeyCredentialDescriptor { } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Protocol] interface ASAuthorizationPublicKeyCredentialDescriptor : NSSecureCoding, NSCopying { [Abstract] @@ -1509,7 +1485,7 @@ interface ASAuthorizationPublicKeyCredentialDescriptor : NSSecureCoding, NSCopyi NSData CredentialId { get; set; } } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Protocol] interface ASAuthorizationPublicKeyCredentialRegistration : ASPublicKeyCredential { [Abstract] @@ -1517,7 +1493,7 @@ interface ASAuthorizationPublicKeyCredentialRegistration : ASPublicKeyCredential NSData RawAttestationObject { get; } } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Protocol] interface ASAuthorizationPublicKeyCredentialRegistrationRequest : NSSecureCoding, NSCopying { [Abstract] @@ -1551,7 +1527,7 @@ interface ASAuthorizationPublicKeyCredentialRegistrationRequest : NSSecureCoding NSString AttestationPreference { get; set; } } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Protocol] interface ASPublicKeyCredential : ASAuthorizationCredential { [Abstract] @@ -1563,7 +1539,7 @@ interface ASPublicKeyCredential : ASAuthorizationCredential { NSData CredentialId { get; } } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPlatformPublicKeyCredentialDescriptor : ASAuthorizationPublicKeyCredentialDescriptor { @@ -1572,7 +1548,7 @@ interface ASAuthorizationPlatformPublicKeyCredentialDescriptor : ASAuthorization NativeHandle Constructor (NSData credentialId); } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPlatformPublicKeyCredentialProvider : ASAuthorizationProvider { @@ -1589,12 +1565,12 @@ interface ASAuthorizationPlatformPublicKeyCredentialProvider : ASAuthorizationPr [Export ("relyingPartyIdentifier")] string RelyingPartyIdentifier { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("createCredentialRegistrationRequestWithChallenge:name:userID:requestStyle:")] void CreateCredentialRegistrationRequest (NSData challenge, string name, NSData userId, ASAuthorizationPlatformPublicKeyCredentialRegistrationRequestStyle requestStyle); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationProviderExtensionAuthorizationResult { @@ -1617,7 +1593,7 @@ interface ASAuthorizationProviderExtensionAuthorizationResult { SecKey [] PrivateKeys { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialParameters : NSSecureCoding, NSCopying { @@ -1628,7 +1604,7 @@ interface ASAuthorizationPublicKeyCredentialParameters : NSSecureCoding, NSCopyi ASCoseAlgorithmIdentifier Algorithm { get; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor : ASAuthorizationPublicKeyCredentialDescriptor { @@ -1641,7 +1617,7 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor : ASAuthorizat NSString [] Transports { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationSecurityKeyPublicKeyCredentialProvider : ASAuthorizationProvider { @@ -1659,7 +1635,7 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialProvider : ASAuthorizatio string RelyingPartyIdentifier { get; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (ASAuthorizationRequest))] [DisableDefaultCtor] interface ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest : ASAuthorizationPublicKeyCredentialRegistrationRequest { @@ -1674,7 +1650,7 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest : ASA NSString ResidentKeyPreference { get; set; } } - [TV (15, 0), NoWatch, NoiOS, NoMac, NoMacCatalyst] + [TV (15, 0), NoiOS, NoMac, NoMacCatalyst] [Static] interface ASAuthorizationCustomMethod { [Field ("ASAuthorizationCustomMethodVideoSubscriberAccount")] @@ -1687,11 +1663,11 @@ interface ASAuthorizationCustomMethod { NSString Other { get; } } - [NoWatch, TV (16, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (16, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface ASAuthorizationPlatformPublicKeyCredentialAssertion : ASAuthorizationPublicKeyCredentialAssertion { - [iOS (17, 0), NoWatch, NoTV, Mac (14, 0), MacCatalyst (17, 0)] + [iOS (17, 0), NoTV, Mac (14, 0), MacCatalyst (17, 0)] [Export ("attachment")] ASAuthorizationPublicKeyCredentialAttachment Attachment { get; } @@ -1711,12 +1687,12 @@ interface ASAuthorizationPlatformPublicKeyCredentialAssertion : ASAuthorizationP ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput LargeBlob2 { get; } #endif - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("prf"), NullAllowed] ASAuthorizationPublicKeyCredentialPrfAssertionOutput Prf { get; } } - [NoWatch, TV (16, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (16, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (ASAuthorizationRequest))] [DisableDefaultCtor] interface ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest : ASAuthorizationPublicKeyCredentialRegistrationRequest { @@ -1726,16 +1702,16 @@ interface ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest : ASAuth [Export ("largeBlob", ArgumentSemantic.Assign)] ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput LargeBlob { get; set; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("prf"), NullAllowed] ASAuthorizationPublicKeyCredentialPrfRegistrationInput Prf { get; set; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("requestStyle")] ASAuthorizationPlatformPublicKeyCredentialRegistrationRequestStyle RequestStyle { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface ASAuthorizationSecurityKeyPublicKeyCredentialAssertion : ASAuthorizationPublicKeyCredentialAssertion { @@ -1744,7 +1720,7 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialAssertion : ASAuthorizati bool AppId { get; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationSecurityKeyPublicKeyCredentialRegistration : ASAuthorizationPublicKeyCredentialRegistration { @@ -1755,11 +1731,11 @@ interface ASAuthorizationSecurityKeyPublicKeyCredentialRegistration : ASAuthoriz NSString [] Transports { get; } } - [NoWatch, TV (16, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (16, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface ASAuthorizationPlatformPublicKeyCredentialRegistration : ASAuthorizationPublicKeyCredentialRegistration { - [iOS (17, 0), NoWatch, NoTV, Mac (14, 0), MacCatalyst (17, 0)] + [iOS (17, 0), NoTV, Mac (14, 0), MacCatalyst (17, 0)] [Export ("attachment")] ASAuthorizationPublicKeyCredentialAttachment Attachment { get; } @@ -1768,12 +1744,12 @@ interface ASAuthorizationPlatformPublicKeyCredentialRegistration : ASAuthorizati [Export ("largeBlob", ArgumentSemantic.Assign)] ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput LargeBlob { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("prf"), NullAllowed] ASAuthorizationPublicKeyCredentialPrfRegistrationOutput Prf { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [BaseType (typeof (NSObject))] interface ASAuthorizationProviderExtensionKerberosMapping { [NullAllowed, Export ("ticketKeyPath")] @@ -1798,7 +1774,7 @@ interface ASAuthorizationProviderExtensionKerberosMapping { string SessionKeyKeyName { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationProviderExtensionLoginConfiguration { @@ -2025,7 +2001,7 @@ SecKey LoginRequestEncryptionPublicKey { SecKey HpkeAuthPublicKey { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationProviderExtensionLoginManager { @@ -2122,7 +2098,7 @@ interface ASAuthorizationProviderExtensionLoginManager { void CompleteKeyRotation (ASAuthorizationProviderExtensionKeyType keyType); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 0)] [Protocol] #if NET [Model] @@ -2195,7 +2171,7 @@ ASAuthorizationProviderExtensionSigningAlgorithm [] SupportedUserSecureEnclaveKe interface IASAuthorizationWebBrowserExternallyAuthenticatableRequest { } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (13, 3)] + [NoTV, NoiOS, NoMacCatalyst, Mac (13, 3)] [Protocol] interface ASAuthorizationWebBrowserExternallyAuthenticatableRequest { @@ -2204,7 +2180,7 @@ interface ASAuthorizationWebBrowserExternallyAuthenticatableRequest { LAContext AuthenticatedContext { get; set; } } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (16, 4), Mac (13, 3)] + [NoTV, iOS (17, 4), MacCatalyst (16, 4), Mac (13, 3)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationWebBrowserPlatformPublicKeyCredential { @@ -2230,7 +2206,7 @@ interface ASAuthorizationWebBrowserPlatformPublicKeyCredential { string CustomTitle { get; } } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (16, 4), Mac (13, 3)] + [NoTV, iOS (17, 4), MacCatalyst (16, 4), Mac (13, 3)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] interface ASAuthorizationWebBrowserPublicKeyCredentialManager { @@ -2249,7 +2225,7 @@ interface ASAuthorizationWebBrowserPublicKeyCredentialManager { delegate void ASSettingsHelperRequestToTurnOnCredentialProviderExtensionCallback (bool appWasEnabledForAutofill); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASSettingsHelper { @@ -2263,7 +2239,7 @@ interface ASSettingsHelper { [Export ("openVerificationCodeAppSettingsWithCompletionHandler:")] void OpenVerificationCodeAppSettings ([NullAllowed] Action completionHandler); - [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), NoTV, NoWatch] + [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), NoTV] [Async] [Static] [Export ("requestToTurnOnCredentialProviderExtensionWithCompletionHandler:")] @@ -2272,7 +2248,7 @@ interface ASSettingsHelper { interface IASCredentialRequest { } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface ASCredentialRequest : NSSecureCoding, NSCopying { [Abstract] @@ -2284,7 +2260,7 @@ interface ASCredentialRequest : NSSecureCoding, NSCopying { IASCredentialIdentity CredentialIdentity { get; } } - [NoWatch, NoTV, MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [NoTV, MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasswordCredentialRequest : ASCredentialRequest { @@ -2297,13 +2273,13 @@ interface ASPasswordCredentialRequest : ASCredentialRequest { ASPasswordCredentialRequest Request (ASPasswordCredentialIdentity credentialIdentity); } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface ASPasskeyRegistrationCredential : ASAuthorizationCredential { [Export ("initWithRelyingParty:clientDataHash:credentialID:attestationObject:")] NativeHandle Constructor (string relyingParty, NSData clientDataHash, NSData credentialId, NSData attestationObject); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("initWithRelyingParty:clientDataHash:credentialID:attestationObject:extensionOutput:")] NativeHandle Constructor (string relyingParty, NSData clientDataHash, NSData credentialId, NSData attestationObject, [NullAllowed] ASPasskeyRegistrationCredentialExtensionOutput extensionOutput); @@ -2323,23 +2299,23 @@ interface ASPasskeyRegistrationCredential : ASAuthorizationCredential { [Export ("attestationObject")] NSData AttestationObject { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("extensionOutput", ArgumentSemantic.Copy), NullAllowed] ASPasskeyRegistrationCredentialExtensionOutput ExtensionOutput { get; set; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasskeyCredentialRequest : ASCredentialRequest { [Export ("initWithCredentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:")] NativeHandle Constructor (ASPasskeyCredentialIdentity credentialIdentity, NSData clientDataHash, string userVerificationPreference, NSNumber [] supportedAlgorithms); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("initWithCredentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:assertionExtensionInput:")] NativeHandle Constructor (ASPasskeyCredentialIdentity credentialIdentity, NSData clientDataHash, [BindAs (typeof (ASAuthorizationPublicKeyCredentialUserVerificationPreferenceEnum))] NSString userVerificationPreference, NSNumber [] supportedAlgorithms, [NullAllowed] ASPasskeyAssertionCredentialExtensionInput assertionExtensionInput); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("initWithCredentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:registrationExtensionInput:")] NativeHandle Constructor (ASPasskeyCredentialIdentity credentialIdentity, NSData clientDataHash, [BindAs (typeof (ASAuthorizationPublicKeyCredentialUserVerificationPreferenceEnum))] NSString userVerificationPreference, NSNumber [] supportedAlgorithms, [NullAllowed] ASPasskeyRegistrationCredentialExtensionInput registrationExtensionInput); @@ -2356,22 +2332,22 @@ interface ASPasskeyCredentialRequest : ASCredentialRequest { [Export ("requestWithCredentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:")] ASPasskeyCredentialRequest Create (ASPasskeyCredentialIdentity credentialIdentity, NSData clientDataHash, string userVerificationPreference, NSNumber [] supportedAlgorithms); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("excludedCredentials"), NullAllowed] ASAuthorizationPlatformPublicKeyCredentialDescriptor [] ExcludedCredentials { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("assertionExtensionInput"), NullAllowed] ASPasskeyAssertionCredentialExtensionInput AssertionExtensionInput { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("registrationExtensionInput"), NullAllowed] ASPasskeyRegistrationCredentialExtensionInput RegistrationExtensionInput { get; } } interface IASCredentialIdentity { } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface ASCredentialIdentity { @@ -2392,7 +2368,7 @@ interface ASCredentialIdentity { nint Rank { get; set; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasskeyCredentialIdentity : NSCopying, NSSecureCoding, ASCredentialIdentity { @@ -2422,14 +2398,14 @@ interface ASPasskeyCredentialIdentity : NSCopying, NSSecureCoding, ASCredentialI new nint Rank { get; set; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface ASPasskeyAssertionCredential : ASAuthorizationCredential { [Export ("initWithUserHandle:relyingParty:signature:clientDataHash:authenticatorData:credentialID:")] NativeHandle Constructor (NSData userHandle, string relyingParty, NSData signature, NSData clientDataHash, NSData authenticatorData, NSData credentialId); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("initWithUserHandle:relyingParty:signature:clientDataHash:authenticatorData:credentialID:extensionOutput:")] NativeHandle Constructor (NSData userHandle, string relyingParty, NSData signature, NSData clientDataHash, NSData authenticatorData, NSData credentialId, [NullAllowed] ASPasskeyAssertionCredentialExtensionOutput extensionOutput); @@ -2455,12 +2431,12 @@ interface ASPasskeyAssertionCredential : ASAuthorizationCredential { [Export ("credentialID", ArgumentSemantic.Copy)] NSData CredentialId { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("extensionOutput", ArgumentSemantic.Copy), NullAllowed] ASPasskeyAssertionCredentialExtensionOutput ExtensionOutput { get; set; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasskeyCredentialRequestParameters : NSSecureCoding, NSCopying { @@ -2476,12 +2452,12 @@ interface ASPasskeyCredentialRequestParameters : NSSecureCoding, NSCopying { [Export ("allowedCredentials", ArgumentSemantic.Copy)] NSData [] AllowedCredentials { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("extensionInput"), NullAllowed] ASPasskeyAssertionCredentialExtensionInput ExtensionInput { get; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput { @@ -2492,7 +2468,7 @@ interface ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput { ASAuthorizationPublicKeyCredentialLargeBlobSupportRequirement SupportRequirement { get; set; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput { @@ -2506,7 +2482,7 @@ interface ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput { NSData DataToWrite { get; set; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput { @@ -2517,14 +2493,14 @@ interface ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput { bool DidWrite { get; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface ASAuthorizationPublicKeyCredentialLargeBlobRegistrationOutput : NSCopying, NSSecureCoding { [Export ("isSupported")] bool IsSupported { get; } } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (17, 0), Mac (14, 0)] + [NoTV, iOS (17, 4), MacCatalyst (17, 0), Mac (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPublicKeyCredentialClientData { @@ -2544,7 +2520,7 @@ interface ASPublicKeyCredentialClientData { ASPublicKeyCredentialClientDataCrossOriginValue CrossOrigin { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (14, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASAuthorizationProviderExtensionUserLoginConfiguration { @@ -2567,7 +2543,7 @@ interface ASAuthorizationProviderExtensionUserLoginConfiguration { bool SetCustomLoginRequestBodyClaims (NSDictionary claims, [NullAllowed] out NSError error); } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (17, 0), Mac (14, 0)] + [NoTV, iOS (17, 4), MacCatalyst (17, 0), Mac (14, 0)] [Protocol] interface ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider { [Abstract] @@ -2581,12 +2557,12 @@ interface ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider { #if NET [Abstract] #endif - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("createCredentialRegistrationRequestWithClientData:name:userID:requestStyle:")] ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest CreateCredentialRegistrationRequest (ASPublicKeyCredentialClientData clientData, string name, NSData userId, ASAuthorizationPlatformPublicKeyCredentialRegistrationRequestStyle requestStyle); } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (17, 0), Mac (14, 0)] + [NoTV, iOS (17, 4), MacCatalyst (17, 0), Mac (14, 0)] [Protocol] interface ASAuthorizationWebBrowserPlatformPublicKeyCredentialRegistrationRequest { [Abstract] @@ -2608,7 +2584,7 @@ interface ASAuthorizationWebBrowserPlatformPublicKeyCredentialRegistrationReques bool ShouldShowHybridTransport { get; set; } } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] + [NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] [Protocol] interface ASAuthorizationWebBrowserPlatformPublicKeyCredentialAssertionRequest { [Abstract] @@ -2620,7 +2596,7 @@ interface ASAuthorizationWebBrowserPlatformPublicKeyCredentialAssertionRequest { bool ShouldShowHybridTransport { get; set; } } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] + [NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialAssertionRequest { @@ -2629,7 +2605,7 @@ interface ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialAssertionReques ASPublicKeyCredentialClientData ClientData { get; } } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] + [NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialProvider { @@ -2642,7 +2618,7 @@ interface ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialProvider { ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest CreateCredentialAssertionRequest (ASPublicKeyCredentialClientData clientData); } - [NoWatch, NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] + [NoTV, iOS (17, 4), MacCatalyst (17, 4), Mac (14, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialRegistrationRequest { @@ -2651,7 +2627,7 @@ interface ASAuthorizationWebBrowserSecurityKeyPublicKeyCredentialRegistrationReq ASPublicKeyCredentialClientData ClientData { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASWebAuthenticationSessionCallback { @@ -2668,14 +2644,14 @@ interface ASWebAuthenticationSessionCallback { bool MatchesUrl (NSUrl url); } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum ASAuthorizationPlatformPublicKeyCredentialRegistrationRequestStyle : long { Standard, Conditional, } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "ASAuthorizationPublicKeyCredentialPRFAssertionInputValues")] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialPrfAssertionInputValues { @@ -2689,7 +2665,7 @@ interface ASAuthorizationPublicKeyCredentialPrfAssertionInputValues { NSData SaltInput2 { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "ASAuthorizationPublicKeyCredentialPRFAssertionInput")] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialPrfAssertionInput { @@ -2703,7 +2679,7 @@ interface ASAuthorizationPublicKeyCredentialPrfAssertionInput { NSDictionary PerCredentialInputValues { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "ASAuthorizationPublicKeyCredentialPRFAssertionOutput")] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialPrfAssertionOutput { @@ -2714,7 +2690,7 @@ interface ASAuthorizationPublicKeyCredentialPrfAssertionOutput { NSData Second { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "ASAuthorizationPublicKeyCredentialPRFRegistrationInput")] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialPrfRegistrationInput { @@ -2732,7 +2708,7 @@ interface ASAuthorizationPublicKeyCredentialPrfRegistrationInput { ASAuthorizationPublicKeyCredentialPrfAssertionInputValues InputValues { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "ASAuthorizationPublicKeyCredentialPRFRegistrationOutput")] [DisableDefaultCtor] interface ASAuthorizationPublicKeyCredentialPrfRegistrationOutput { @@ -2746,7 +2722,7 @@ interface ASAuthorizationPublicKeyCredentialPrfRegistrationOutput { NSData Second { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASOneTimeCodeCredential : ASAuthorizationCredential { @@ -2762,7 +2738,7 @@ interface ASOneTimeCodeCredential : ASAuthorizationCredential { string Code { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASOneTimeCodeCredentialIdentity : NSCopying, NSSecureCoding, ASCredentialIdentity { @@ -2773,7 +2749,7 @@ interface ASOneTimeCodeCredentialIdentity : NSCopying, NSSecureCoding, ASCredent string Label { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASOneTimeCodeCredentialRequest : ASCredentialRequest { @@ -2782,7 +2758,7 @@ interface ASOneTimeCodeCredentialRequest : ASCredentialRequest { NativeHandle Constructor (ASOneTimeCodeCredentialIdentity credentialIdentity); } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasskeyAssertionCredentialExtensionInput : NSCopying, NSSecureCoding { @@ -2790,7 +2766,7 @@ interface ASPasskeyAssertionCredentialExtensionInput : NSCopying, NSSecureCoding ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput LargeBlob { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasskeyAssertionCredentialExtensionOutput : NSCopying, NSSecureCoding { @@ -2801,7 +2777,7 @@ interface ASPasskeyAssertionCredentialExtensionOutput : NSCopying, NSSecureCodin ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput LargeBlobAssertionOutput { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasskeyRegistrationCredentialExtensionInput : NSCopying, NSSecureCoding { @@ -2809,7 +2785,7 @@ interface ASPasskeyRegistrationCredentialExtensionInput : NSCopying, NSSecureCod ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput LargeBlob { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ASPasskeyRegistrationCredentialExtensionOutput : NSCopying, NSSecureCoding { @@ -2820,7 +2796,7 @@ interface ASPasskeyRegistrationCredentialExtensionOutput : NSCopying, NSSecureCo ASAuthorizationPublicKeyCredentialLargeBlobRegistrationOutput LargeBlobRegistrationOutput { get; } } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [BackingFieldType (typeof (NSNumber))] public enum ASAuthorizationProviderExtensionEncryptionAlgorithm { [Field ("ASAuthorizationProviderExtensionEncryptionAlgorithmECDHE_A256GCM")] @@ -2836,7 +2812,7 @@ public enum ASAuthorizationProviderExtensionEncryptionAlgorithm { HpkeCurve25519Sha256ChachaPoly, } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [BackingFieldType (typeof (NSNumber))] public enum ASAuthorizationProviderExtensionSigningAlgorithm { [Field ("ASAuthorizationProviderExtensionSigningAlgorithmES256")] @@ -2849,7 +2825,7 @@ public enum ASAuthorizationProviderExtensionSigningAlgorithm { Ed25519, } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Static] interface ASAuthorizationProviderExtensionEncryptionAlgorithm222 { [Field ("ASAuthorizationProviderExtensionEncryptionAlgorithmECDHE_A256GCM")] @@ -2865,7 +2841,7 @@ interface ASAuthorizationProviderExtensionEncryptionAlgorithm222 { NSNumber HpkeCurve25519Sha256ChachaPoly { get; } } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Static] interface ASAuthorizationProviderExtensionSigningAlgorithm222 { [Field ("ASAuthorizationProviderExtensionSigningAlgorithmES256")] diff --git a/src/avfoundation.cs b/src/avfoundation.cs index bdb043768791..29f1b1c94063 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -41,19 +41,14 @@ using NMatrix4x3 = global::OpenTK.NMatrix4x3; #endif -#if !WATCH using AudioUnit; using AVKit; using CoreAnimation; using CoreImage; using MediaToolbox; -#else -// hack: ease compilation without extra defines -using CIBarcodeDescriptor = Foundation.NSObject; -#endif // cinematic is not present in certain platforms -#if WATCH || __MACCATALYST__ +#if __MACCATALYST__ using CNAssetInfo = Foundation.NSObject; using CNCompositionInfo = Foundation.NSObject; #else @@ -83,35 +78,7 @@ using NativeHandle = System.IntPtr; #endif -#if WATCH -using AVCaptureWhiteBalanceGains = Foundation.NSString; -// stubs to ease compilation using [NoWatch] -namespace AudioUnit { - interface AudioUnit {} -} -#endif - namespace AVFoundation { - -#if WATCH - // stubs to ease compilation using [NoWatch] - interface AudioComponent {} - interface AudioComponentDescription {} - interface AudioComponentInstantiationOptions {} - interface MusicSequence {} - interface AVInterstitialTimeRange {} - interface AVNavigationMarkersGroup {} - interface AVVideoSettingsCompressed {} - interface AVVideoSettingsUncompressed {} - interface AUAudioUnit {} - interface CALayer {} - interface CIContext {} - interface CIImage {} - interface CVPixelBufferAttributes {} - interface CVPixelBufferPool {} - interface MTAudioProcessingTap {} -#endif - #if XAMCORE_5_0 delegate void AVAssetImageGeneratorCompletionHandler (CMTime requestedTime, CGImage imageRef, CMTime actualTime, AVAssetImageGeneratorResult result, NSError error); #else @@ -124,7 +91,6 @@ interface MTAudioProcessingTap {} delegate void AVRequestAccessStatus (bool accessGranted); delegate AVAudioBuffer AVAudioConverterInputHandler (uint inNumberOfPackets, out AVAudioConverterInputStatus outStatus); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAsynchronousVideoCompositionRequest : NSCopying { @@ -153,24 +119,23 @@ interface AVAsynchronousVideoCompositionRequest : NSCopying { [Export ("finishCancelledRequest")] void FinishCancelledRequest (); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("sourceSampleBufferByTrackID:")] [return: NullAllowed] CMSampleBuffer GetSourceSampleBuffer (int trackId); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("sourceTimedMetadataByTrackID:")] [return: NullAllowed] AVTimedMetadataGroup GetSourceTimedMetadata (int trackId); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("sourceSampleDataTrackIDs")] [BindAs (typeof (int []))] NSNumber [] SourceSampleDataTrackIds { get; } } // values are manually given since not some are platform specific - [Watch (6, 0)] [MacCatalyst (13, 1)] enum AVMediaTypes { [Field ("AVMediaTypeVideo")] @@ -192,7 +157,7 @@ enum AVMediaTypes { Timecode = 5, #if !NET - [NoTV, NoWatch] + [NoTV] [Obsoleted (PlatformName.iOS, 6, 0)] [Deprecated (PlatformName.iOS, 12, 0, message: "Always 'null'.")] [Obsoleted (PlatformName.MacOSX, 10, 8)] @@ -206,7 +171,6 @@ enum AVMediaTypes { Muxed = 7, [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMediaTypeMetadataObject")] MetadataObject = 8, @@ -214,15 +178,21 @@ enum AVMediaTypes { [Field ("AVMediaTypeMetadata")] Metadata = 9, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMediaTypeDepthData")] DepthData = 10, + + [MacCatalyst (14, 0), TV (14, 0), Mac (11, 0), iOS (14, 0)] + [Field ("AVMediaTypeAuxiliaryPicture")] + AuxiliaryPicture = 11, + + [MacCatalyst (13, 1)] + [Field ("AVMediaTypeHaptic")] + Haptic = 12, } #if !NET [Obsolete ("Use AVMediaTypes enum values.")] - [NoWatch] [BaseType (typeof (NSObject))] [Static] interface AVMediaType { @@ -245,7 +215,6 @@ interface AVMediaType { NSString Timecode { get; } [NoTV] - [NoWatch] [Field ("AVMediaTypeTimedMetadata")] // last header where I can find this: iOS 5.1 SDK, 10.7 only on Mac [Deprecated (PlatformName.iOS, 12, 0, message: "Always 'null'.")] [Obsoleted (PlatformName.iOS, 6, 0, message: "Always 'null'.")] @@ -265,7 +234,6 @@ interface AVMediaType { } #endif // !NET - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVMetadataGroup))] interface AVDateRangeMetadataGroup : NSCopying, NSMutableCopying { @@ -282,7 +250,6 @@ interface AVDateRangeMetadataGroup : NSCopying, NSMutableCopying { AVMetadataItem [] Items { get; [NotImplemented] set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVDateRangeMetadataGroup))] interface AVMutableDateRangeMetadataGroup { @@ -300,7 +267,6 @@ interface AVMutableDateRangeMetadataGroup { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVDepthData { @@ -347,7 +313,6 @@ interface AVDepthData { } // values are manually given since not some are platform specific - [Watch (6, 0)] [MacCatalyst (13, 1)] enum AVMediaCharacteristics { [Field ("AVMediaCharacteristicVisual")] @@ -384,7 +349,6 @@ enum AVMediaCharacteristics { [Field ("AVMediaCharacteristicDescribesVideoForAccessibility")] DescribesVideoForAccessibility = 10, - [NoMac] [MacCatalyst (13, 1)] [Field ("AVMediaCharacteristicEasyToRead")] EasyToRead = 11, @@ -406,20 +370,39 @@ enum AVMediaCharacteristics { [Field ("AVMediaCharacteristicIsOriginalContent")] IsOriginalContent = 15, - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMediaCharacteristicContainsHDRVideo")] ContainsHdrVideo = 16, - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMediaCharacteristicContainsAlphaChannel")] ContainsAlphaChannel = 17, + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("AVMediaCharacteristicCarriesVideoStereoMetadata")] + CarriesVideoStereoMetadata = 18, + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("AVMediaCharacteristicContainsStereoMultiviewVideo")] + ContainsStereoMultiviewVideo = 19, + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("AVMediaCharacteristicEnhancesSpeechIntelligibility")] + EnhancesSpeechIntelligibility = 20, + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("AVMediaCharacteristicIndicatesHorizontalFieldOfView")] + IndicatesHorizontalFieldOfView = 21, + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("AVMediaCharacteristicTactileMinimal")] + TactileMinimal = 22, + } #if !NET - [NoWatch] [Obsolete ("Use AVMediaCharacteristics enum values.")] [BaseType (typeof (NSObject))] [Static] @@ -457,7 +440,6 @@ interface AVMediaCharacteristic { [Field ("AVMediaCharacteristicDescribesVideoForAccessibility")] NSString DescribesVideoForAccessibility { get; } - [NoMac] [Field ("AVMediaCharacteristicEasyToRead")] NSString EasyToRead { get; } @@ -474,7 +456,7 @@ interface AVMediaCharacteristic { [Field ("AVMediaCharacteristicIsOriginalContent")] NSString IsOriginalContent { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Field ("AVMediaCharacteristicContainsAlphaChannel")] NSString ContainsAlphaChannel { get; } @@ -482,7 +464,6 @@ interface AVMediaCharacteristic { } #endif - [Watch (6, 0)] [MacCatalyst (13, 1)] enum AVMetadataFormat { [MacCatalyst (13, 1)] @@ -507,7 +488,6 @@ enum AVMetadataFormat { Unknown = 5, } - [Watch (6, 0)] [MacCatalyst (13, 1)] enum AVFileTypes { [Field ("AVFileTypeQuickTimeMovie")] @@ -585,17 +565,20 @@ enum AVFileTypes { [Field ("AVFileTypeTIFF")] Tiff = 20, - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, iOS (18, 0), MacCatalyst (15, 0)] [Field ("AVFileTypeAppleiTT")] AppleiTT = 21, - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, iOS (18, 0), MacCatalyst (15, 0)] [Field ("AVFileTypeSCC")] Scc = 22, + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVFileTypeAHAP")] + Ahap = 23, } #if !NET - [NoWatch] [BaseType (typeof (NSObject))] [Static] [Obsolete ("Use AVFileTypes enum values.")] @@ -646,7 +629,6 @@ interface AVFileType { } #endif - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface AVStreamingKeyDelivery { @@ -662,8 +644,7 @@ interface AVStreamingKeyDelivery { /// /// Apple documentation for AVFrameRateRange [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [DisableDefaultCtor] // crash -> immutable and you can get them but not set them (i.e. no point in creating them) [BaseType (typeof (NSObject))] interface AVFrameRateRange { @@ -681,7 +662,6 @@ interface AVFrameRateRange { CMTime MinFrameDuration { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Static] @@ -693,7 +673,7 @@ interface AVVideo { [Field ("AVVideoMaxKeyFrameIntervalDurationKey")] NSString MaxKeyFrameIntervalDurationKey { get; } - [Watch (7, 2), TV (14, 3), iOS (14, 3)] + [TV (14, 3), iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("AVVideoAppleProRAWBitDepthKey")] NSString AppleProRawBitDepthKey { get; } @@ -845,9 +825,12 @@ interface AVVideo { [Field ("AVVideoCleanApertureVerticalOffsetKey")] NSString CleanApertureVerticalOffsetKey { get; } + [MacCatalyst (17, 0), NoTV, Mac (10, 13), iOS (17, 0)] + [Field ("AVVideoDecompressionPropertiesKey")] + NSString DecompressionPropertiesKey { get; } + } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface AVVideoScalingModeKey { @@ -962,7 +945,6 @@ interface AVAudioConnectionPoint { [BaseType (typeof (NSObject))] interface AVAudioEngine { - [NoWatch] [MacCatalyst (13, 1)] [Export ("musicSequence"), NullAllowed] MusicSequence MusicSequence { get; set; } @@ -1036,7 +1018,6 @@ interface AVAudioEngine { [Field ("AVAudioEngineConfigurationChangeNotification")] NSString ConfigurationChangeNotification { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("autoShutdownEnabled")] bool AutoShutdownEnabled { [Bind ("isAutoShutdownEnabled")] get; set; } @@ -1077,45 +1058,44 @@ interface AVAudioEngine { [Export ("disableManualRenderingMode")] void DisableManualRenderingMode (); -#if !WATCH - [NoWatch] + [Deprecated (PlatformName.MacOSX, 13, 0)] + [Deprecated (PlatformName.iOS, 16, 0)] + [Deprecated (PlatformName.MacCatalyst, 13, 0)] + [Deprecated (PlatformName.TvOS, 16, 0)] [MacCatalyst (13, 1)] [Export ("connectMIDI:to:format:block:")] void ConnectMidi (AVAudioNode sourceNode, AVAudioNode destinationNode, [NullAllowed] AVAudioFormat format, [NullAllowed] AUMidiOutputEventBlock tapHandler); - [NoWatch] + [Deprecated (PlatformName.MacOSX, 13, 0)] + [Deprecated (PlatformName.iOS, 16, 0)] + [Deprecated (PlatformName.MacCatalyst, 9, 0)] + [Deprecated (PlatformName.TvOS, 16, 0)] [MacCatalyst (13, 1)] [Export ("connectMIDI:toNodes:format:block:")] void ConnectMidi (AVAudioNode sourceNode, AVAudioNode [] destinationNodes, [NullAllowed] AVAudioFormat format, [NullAllowed] AUMidiOutputEventBlock tapHandler); -#endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("disconnectMIDI:from:")] void DisconnectMidi (AVAudioNode sourceNode, AVAudioNode destinationNode); - [NoWatch] [MacCatalyst (13, 1)] [Export ("disconnectMIDI:fromNodes:")] void DisconnectMidi (AVAudioNode sourceNode, AVAudioNode [] destinationNodes); - [NoWatch] [MacCatalyst (13, 1)] [Export ("disconnectMIDIInput:")] void DisconnectMidiInput (AVAudioNode node); - [NoWatch] [MacCatalyst (13, 1)] [Export ("disconnectMIDIOutput:")] void DisconnectMidiOutput (AVAudioNode node); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("attachedNodes", ArgumentSemantic.Copy)] NSSet AttachedNodes { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioNode))] [DisableDefaultCtor] // designated @@ -1153,12 +1133,12 @@ interface AVAudioEnvironmentNode : AVAudioMixing { [Export ("outputVolume")] float OutputVolume { get; set; } /* float, not CGFloat */ - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("outputType", ArgumentSemantic.Assign)] AVAudioEnvironmentOutputType OutputType { get; set; } - [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("listenerHeadTrackingEnabled")] bool ListenerHeadTrackingEnabled { [Bind ("isListenerHeadTrackingEnabled")] @@ -1246,11 +1226,11 @@ interface AVAudioFile { [Export ("writeFromBuffer:error:")] bool WriteFromBuffer (AVAudioPcmBuffer buffer, out NSError outError); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("close")] void Close (); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("isOpen")] bool IsOpen { get; } } @@ -1282,7 +1262,6 @@ interface AVAudioFormat : NSSecureCoding { [Wrap ("this (settings.GetDictionary ()!)")] NativeHandle Constructor (AudioSettings settings); - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("initWithCMAudioFormatDescription:")] NativeHandle Constructor (CMAudioFormatDescription formatDescription); @@ -1315,7 +1294,6 @@ interface AVAudioFormat : NSSecureCoding { [Wrap ("WeakSettings")] AudioSettings Settings { get; } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("formatDescription")] CMAudioFormatDescription FormatDescription { get; } @@ -1328,7 +1306,6 @@ interface AVAudioFormat : NSSecureCoding { NSData MagicCookie { get; set; } } - [NoWatch] // all members are unavailable [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -1359,31 +1336,31 @@ interface AVAudio3DMixing { #if NET [Abstract] - [TV (13,0), NoWatch, iOS (13,0)] + [TV (13,0), iOS (13,0)] [MacCatalyst (13, 1)] [Export ("sourceMode", ArgumentSemantic.Assign)] AVAudio3DMixingSourceMode SourceMode { get; set; } [Abstract] - [TV (13,0), NoWatch, iOS (13,0)] + [TV (13,0), iOS (13,0)] [MacCatalyst (13, 1)] [Export ("pointSourceInHeadMode", ArgumentSemantic.Assign)] AVAudio3DMixingPointSourceInHeadMode PointSourceInHeadMode { get; set; } #else - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Export ("sourceMode", ArgumentSemantic.Assign)] AVAudio3DMixingSourceMode GetSourceMode (); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Export ("setSourceMode:")] void SetSourceMode (AVAudio3DMixingSourceMode sourceMode); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Export ("pointSourceInHeadMode", ArgumentSemantic.Assign)] AVAudio3DMixingPointSourceInHeadMode GetPointSourceInHeadMode (); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Export ("setPointSourceInHeadMode:")] void SetPointSourceInHeadMode (AVAudio3DMixingPointSourceInHeadMode pointSourceInHeadMode); #endif @@ -1392,10 +1369,7 @@ interface AVAudio3DMixing { [MacCatalyst (13, 1)] [Protocol] interface AVAudioMixing : AVAudioStereoMixing -#if !WATCH - , AVAudio3DMixing -#endif - { + , AVAudio3DMixing { [MacCatalyst (13, 1)] #if NET @@ -1470,7 +1444,6 @@ interface AVAudioNode { [Export ("removeTapOnBus:")] void RemoveTapOnBus (nuint bus); - [NoWatch] [MacCatalyst (13, 1)] [Export ("AUAudioUnit")] AUAudioUnit AUAudioUnit { get; } @@ -1491,17 +1464,16 @@ interface AVAudioIONode { [Export ("presentationLatency")] double PresentationLatency { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("audioUnit"), NullAllowed] global::AudioUnit.AudioUnit AudioUnit { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("voiceProcessingEnabled")] bool VoiceProcessingEnabled { [Bind ("isVoiceProcessingEnabled")] get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("setVoiceProcessingEnabled:error:")] bool SetVoiceProcessingEnabled (bool enabled, out NSError outError); @@ -1540,28 +1512,38 @@ interface AVAudioOutputNode { // note: sample source (header) suggest it comes from AVAudioEngine properties interface AVAudioInputNode : AVAudioMixing { - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("setManualRenderingInputPCMFormat:inputBlock:")] bool SetManualRenderingInputPcmFormat (AVAudioFormat format, AVAudioIONodeInputBlock block); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("voiceProcessingBypassed")] bool VoiceProcessingBypassed { [Bind ("isVoiceProcessingBypassed")] get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("voiceProcessingAGCEnabled")] bool VoiceProcessingAgcEnabled { [Bind ("isVoiceProcessingAGCEnabled")] get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("voiceProcessingInputMuted")] bool VoiceProcessingInputMuted { [Bind ("isVoiceProcessingInputMuted")] get; set; } + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("setMutedSpeechActivityEventListener:")] + bool SetMutedSpeechActivityEventListener ([NullAllowed] AVAudioInputNodeMutedSpeechEventListener listenerAction); + +#if !TVOS + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("voiceProcessingOtherAudioDuckingConfiguration", ArgumentSemantic.Assign)] + AVAudioVoiceProcessingOtherAudioDuckingConfiguration VoiceProcessingOtherAudioDuckingConfiguration { get; set; } +#endif } + delegate void AVAudioInputNodeMutedSpeechEventListener (AVAudioVoiceProcessingSpeechActivityEvent @event); + [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioBuffer), Name = "AVAudioPCMBuffer")] [DisableDefaultCtor] // crash in tests @@ -1571,7 +1553,7 @@ interface AVAudioPcmBuffer { [Export ("initWithPCMFormat:frameCapacity:")] NativeHandle Constructor (AVAudioFormat format, uint /* AVAudioFrameCount = uint32_t */ frameCapacity); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithPCMFormat:bufferListNoCopy:deallocator:")] [DesignatedInitializer] NativeHandle Constructor (AVAudioFormat format, AudioBuffers bufferList, [NullAllowed] Action deallocator); @@ -1685,19 +1667,43 @@ interface AVAudioPlayer { [Export ("channelAssignments", ArgumentSemantic.Copy), NullAllowed] AVAudioSessionChannelDescription [] ChannelAssignments { get; set; } +#if !XAMCORE_5_0 [Export ("initWithData:fileTypeHint:error:")] [MacCatalyst (13, 1)] + [Obsolete ("Use the 'FromUrl' method instead, because a constructor can't fail.")] NativeHandle Constructor (NSData data, [NullAllowed] string fileTypeHint, out NSError outError); [Export ("initWithContentsOfURL:fileTypeHint:error:")] [MacCatalyst (13, 1)] + [Obsolete ("Use the 'FromUrl' method instead, because a constructor can't fail.")] NativeHandle Constructor (NSUrl url, [NullAllowed] string fileTypeHint, out NSError outError); +#endif + + [Internal] + [Export ("initWithData:fileTypeHint:error:")] + [MacCatalyst (13, 1)] + [Sealed] + NativeHandle _InitWithData (NSData data, [NullAllowed] NSString fileTypeHint, out NSError outError); + + [Internal] + [Export ("initWithContentsOfURL:fileTypeHint:error:")] + [MacCatalyst (13, 1)] + [Sealed] + NativeHandle _InitWithContentsOfUrl (NSUrl url, [NullAllowed] NSString fileTypeHint, out NSError outError); + + [Internal] + [Export ("initWithContentsOfURL:error:")] + NativeHandle _InitWithContentsOfUrl (NSUrl url, out NSError error); + + [Internal] + [Export ("initWithData:error:")] + NativeHandle _InitWithData (NSData url, out NSError error); [MacCatalyst (13, 1)] [Export ("format")] AVAudioFormat Format { get; } - [NoiOS, NoTV, NoWatch, MacCatalyst (15, 0)] + [NoiOS, NoTV, MacCatalyst (15, 0)] [NullAllowed, Export ("currentDevice")] string CurrentDevice { get; set; } } @@ -1818,7 +1824,7 @@ interface AVAudioPlayerNode : AVAudioMixing { /// [BaseType (typeof (NSObject))] - [NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] interface AVAudioRecorder { [Export ("initWithURL:settings:error:")] @@ -1923,7 +1929,7 @@ interface IAVAudioRecorderDelegate { } [BaseType (typeof (NSObject))] [Model] [Protocol] - [NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] interface AVAudioRecorderDelegate { [Export ("audioRecorderDidFinishRecording:successfully:"), CheckDisposed] @@ -1937,6 +1943,7 @@ interface AVAudioRecorderDelegate { [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Export ("audioRecorderBeginInterruption:")] + [NoTV] void BeginInterruption (AVAudioRecorder recorder); [NoMac] @@ -1944,6 +1951,7 @@ interface AVAudioRecorderDelegate { [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Export ("audioRecorderEndInterruption:")] + [NoTV] void EndInterruption (AVAudioRecorder recorder); // Deprecated in iOS 6.0 but we have same C# signature as a method that was deprecated in iOS 8.0 @@ -1951,13 +1959,9 @@ interface AVAudioRecorderDelegate { [NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] -#if !NET - [Export ("audioRecorderEndInterruption:withFlags:")] - void EndInterruption (AVAudioRecorder recorder, AVAudioSessionInterruptionFlags flags); -#else + [NoTV] [Export ("audioRecorderEndInterruption:withOptions:")] void EndInterruption (AVAudioRecorder recorder, AVAudioSessionInterruptionOptions flags); -#endif // !NET } [NoMac] @@ -1973,7 +1977,7 @@ interface AVAudioSessionSecondaryAudioHintEventArgs { /// The delegate for . delegate void AVPermissionGranted (bool granted); - [iOS (14, 5), Watch (7, 4), TV (14, 5), Mac (11, 3)] + [iOS (14, 5), TV (14, 5), Mac (11, 3)] [MacCatalyst (14, 5)] [Native] public enum AVAudioSessionInterruptionReason : ulong { @@ -1982,16 +1986,15 @@ public enum AVAudioSessionInterruptionReason : ulong { [Deprecated (PlatformName.iOS, 16, 0, message: "Not reported anymore.")] [Deprecated (PlatformName.TvOS, 16, 0, message: "Not reported anymore.")] [Deprecated (PlatformName.MacOSX, 11, 3, message: "Not reported anymore.")] - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Not reported anymore.")] AppWasSuspended = 1, BuiltInMicMuted = 2, // visionOS only // WasBackgrounded = 3, - [iOS (17, 0), Watch (10, 0), TV (17, 0), MacCatalyst (17, 0), NoMac] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), NoMac] RouteDisconnected = 4, // visionOS only // DeviceUnauthenticated = 5, } - [Watch (8, 0), TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] interface SpatialPlaybackCapabilitiesChangedEventArgs { [Export ("AVAudioSessionSpatialAudioEnabledKey")] bool SpatialAudioEnabledKey { get; } @@ -2010,7 +2013,7 @@ interface AVAudioSession { [Export ("sharedInstance"), Static] AVAudioSession SharedInstance (); - [NoWatch, NoMac] + [NoMac] [Deprecated (PlatformName.iOS, 6, 0, message: "Use 'AVAudioSession.Notification.Observe*' methods instead.")] [Export ("delegate", ArgumentSemantic.Assign)] [NullAllowed] @@ -2019,7 +2022,7 @@ interface AVAudioSession { [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVAudioSession.Notification.Observe*' methods instead.")] NSObject WeakDelegate { get; set; } - [NoWatch, NoMac] + [NoMac] [Wrap ("WeakDelegate")] [NullAllowed] [Deprecated (PlatformName.iOS, 6, 0, message: "Use 'AVAudioSession.Notification.Observe*' methods instead.")] @@ -2070,7 +2073,7 @@ interface AVAudioSession { [Export ("setPreferredHardwareSampleRate:error:")] bool SetPreferredHardwareSampleRate (double sampleRate, out NSError outError); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setPreferredIOBufferDuration:error:")] bool SetPreferredIOBufferDuration (double duration, out NSError outError); @@ -2102,7 +2105,7 @@ interface AVAudioSession { [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PreferredSampleRate' instead.")] double PreferredHardwareSampleRate { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("preferredIOBufferDuration")] double PreferredIOBufferDuration { get; } @@ -2168,7 +2171,6 @@ interface AVAudioSession { [Obsolete ("Use 'AVAudioSessionCategory' enum values instead.")] [NoTV] - [NoWatch] [NoMac] [Deprecated (PlatformName.iOS, 10, 0)] [MacCatalyst (13, 1)] @@ -2208,7 +2210,7 @@ interface AVAudioSession { NSString ModeGameChat { get; } [Obsolete ("Use 'AVAudioSessionMode' enum values instead.")] - [Watch (5, 0), NoMac] + [NoMac] [MacCatalyst (13, 1)] [Field ("AVAudioSessionModeVoicePrompt")] NSString VoicePrompt { get; } @@ -2297,22 +2299,22 @@ interface AVAudioSession { [Export ("currentRoute")] AVAudioSessionRouteDescription CurrentRoute { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setPreferredSampleRate:error:")] bool SetPreferredSampleRate (double sampleRate, out NSError error); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("preferredSampleRate")] double PreferredSampleRate { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("inputGain")] float InputGain { get; } // defined as 'float' - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("inputGainSettable")] bool InputGainSettable { [Bind ("isInputGainSettable")] get; } @@ -2357,15 +2359,18 @@ interface AVAudioSession { [Export ("IOBufferDuration")] double IOBufferDuration { get; } - [TV (17, 2), NoWatch, NoMac, iOS (17, 2), NoMacCatalyst] + [TV (17, 2), NoMac, iOS (17, 2), MacCatalyst (17, 2)] [Export ("supportedOutputChannelLayouts")] AVAudioChannelLayout [] SupportedOutputChannelLayouts { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setInputGain:error:")] bool SetInputGain (float /* defined as 'float' */ gain, out NSError outError); +#if XAMCORE_5_0 + [NoMac] +#endif [Field ("AVAudioSessionInterruptionNotification")] [Notification (typeof (AVAudioSessionInterruptionEventArgs))] NSString InterruptionNotification { get; } @@ -2376,10 +2381,16 @@ interface AVAudioSession { [Notification (typeof (AVAudioSessionRouteChangeEventArgs))] NSString RouteChangeNotification { get; } +#if XAMCORE_5_0 + [NoMac] +#endif [Field ("AVAudioSessionMediaServicesWereResetNotification")] [Notification] NSString MediaServicesWereResetNotification { get; } +#if XAMCORE_5_0 + [NoMac] +#endif [Notification, Field ("AVAudioSessionMediaServicesWereLostNotification")] NSString MediaServicesWereLostNotification { get; } @@ -2479,32 +2490,32 @@ interface AVAudioSession { [Field ("AVAudioSessionPortCarAudio")] NSString PortCarAudio { get; } - [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [TV (14, 0), NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAudioSessionPortAVB")] NSString PortAvb { get; } - [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [TV (14, 0), NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAudioSessionPortDisplayPort")] NSString PortDisplayPort { get; } - [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [TV (14, 0), NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAudioSessionPortFireWire")] NSString PortFireWire { get; } - [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [TV (14, 0), NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAudioSessionPortPCI")] NSString PortPci { get; } - [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [TV (14, 0), NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAudioSessionPortThunderbolt")] NSString PortThunderbolt { get; } - [Watch (7, 0), TV (14, 0), NoMac, iOS (14, 0)] + [TV (14, 0), NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAudioSessionPortVirtual")] NSString PortVirtual { get; } @@ -2515,6 +2526,10 @@ interface AVAudioSession { [Internal, Field ("AVAudioSessionLocationLower")] NSString LocationLower_ { get; } + [MacCatalyst (17, 0), TV (17, 0), NoMac, iOS (17, 0)] + [Field ("AVAudioSessionPortContinuityMicrophone")] + NSString PortContinuityMicrophone { get; } + [NoMac] [MacCatalyst (13, 1)] [Export ("inputDataSources"), NullAllowed] @@ -2535,29 +2550,31 @@ interface AVAudioSession { [Export ("outputDataSource"), NullAllowed] AVAudioSessionDataSourceDescription OutputDataSource { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setInputDataSource:error:")] [PostGet ("InputDataSource")] bool SetInputDataSource ([NullAllowed] AVAudioSessionDataSourceDescription dataSource, out NSError outError); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setOutputDataSource:error:")] [PostGet ("OutputDataSource")] bool SetOutputDataSource ([NullAllowed] AVAudioSessionDataSourceDescription dataSource, out NSError outError); + [Deprecated (PlatformName.iOS, 17, 0, message: "Please use 'AVAudioApplication.RequestRecordPermission' instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Please use 'AVAudioApplication.RequestRecordPermission' instead.")] [NoTV, NoMac] [MacCatalyst (13, 1)] [Export ("requestRecordPermission:")] void RequestRecordPermission (AVPermissionGranted responseCallback); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setPreferredInput:error:")] bool SetPreferredInput ([NullAllowed] AVAudioSessionPortDescription inPort, out NSError outError); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("preferredInput", ArgumentSemantic.Copy), NullAllowed] AVAudioSessionPortDescription PreferredInput { get; } @@ -2567,22 +2584,22 @@ interface AVAudioSession { [NullAllowed, Export ("availableInputs")] AVAudioSessionPortDescription [] AvailableInputs { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setPreferredInputNumberOfChannels:error:")] bool SetPreferredInputNumberOfChannels (nint count, out NSError outError); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("preferredInputNumberOfChannels")] nint GetPreferredInputNumberOfChannels (); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setPreferredOutputNumberOfChannels:error:")] bool SetPreferredOutputNumberOfChannels (nint count, out NSError outError); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("preferredOutputNumberOfChannels")] nint GetPreferredOutputNumberOfChannels (); @@ -2626,14 +2643,15 @@ interface AVAudioSession { [Internal, Field ("AVAudioSessionPolarPatternSubcardioid")] NSString PolarPatternSubcardioid_ { get; } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAudioSessionPolarPatternStereo")] NSString PolarPatternStereo { get; } // 8.0 + [Deprecated (PlatformName.iOS, 17, 0, message: "Please use 'AVAudioApplication.RecordPermission' instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Please use 'AVAudioApplication.RecordPermission' instead.")] [NoTV, NoMac] - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("recordPermission")] AVAudioSessionRecordPermission RecordPermission { get; } @@ -2649,121 +2667,122 @@ interface AVAudioSession { [Notification (typeof (AVAudioSessionSecondaryAudioHintEventArgs))] NSString SilenceSecondaryAudioHintNotification { get; } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Export ("setAggregatedIOPreference:error:")] bool SetAggregatedIOPreference (AVAudioSessionIOType ioType, out NSError error); - [Watch (5, 0), NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("setCategory:mode:routeSharingPolicy:options:error:")] bool SetCategory (string category, string mode, AVAudioSessionRouteSharingPolicy policy, AVAudioSessionCategoryOptions options, [NullAllowed] out NSError outError); - [Watch (5, 0), NoMac] + [NoMac] [MacCatalyst (13, 1)] [Wrap ("SetCategory (category.GetConstant ()!, mode, policy, options, out outError)")] bool SetCategory (AVAudioSessionCategory category, string mode, AVAudioSessionRouteSharingPolicy policy, AVAudioSessionCategoryOptions options, [NullAllowed] out NSError outError); - [Watch (5, 0), NoMac] + [NoMac] [MacCatalyst (13, 1)] [Wrap ("SetCategory (category.GetConstant ()!, mode.GetConstant ()!, policy, options, out outError)")] bool SetCategory (AVAudioSessionCategory category, AVAudioSessionMode mode, AVAudioSessionRouteSharingPolicy policy, AVAudioSessionCategoryOptions options, [NullAllowed] out NSError outError); - [Watch (5, 0), NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("routeSharingPolicy")] AVAudioSessionRouteSharingPolicy RouteSharingPolicy { get; } [Async] - [Watch (5, 0), NoTV, NoMac, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoMac, NoiOS, MacCatalyst (15, 0)] [Export ("activateWithOptions:completionHandler:")] void Activate (AVAudioSessionActivationOptions options, Action handler); - [Watch (5, 2), NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("promptStyle")] AVAudioSessionPromptStyle PromptStyle { get; } - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("setAllowHapticsAndSystemSoundsDuringRecording:error:")] bool SetAllowHapticsAndSystemSoundsDuringRecording (bool inValue, [NullAllowed] out NSError outError); - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowHapticsAndSystemSoundsDuringRecording")] bool AllowHapticsAndSystemSoundsDuringRecording { get; } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("preferredInputOrientation")] AVAudioStereoOrientation PreferredInputOrientation { get; } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setPreferredInputOrientation:error:")] bool SetPreferredInputOrientation (AVAudioStereoOrientation orientation, [NullAllowed] out NSError outError); - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("inputOrientation")] AVAudioStereoOrientation InputOrientation { get; } - [Watch (7, 4), TV (14, 5), NoMac, iOS (14, 5)] + [TV (14, 5), NoMac, iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("setPrefersNoInterruptionsFromSystemAlerts:error:")] bool SetPrefersNoInterruptionsFromSystemAlerts (bool inValue, [NullAllowed] out NSError outError); - [Watch (7, 4), TV (14, 5), NoMac, iOS (14, 5)] + [TV (14, 5), NoMac, iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("prefersNoInterruptionsFromSystemAlerts")] bool PrefersNoInterruptionsFromSystemAlerts { get; } - [Watch (8, 0), TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("setSupportsMultichannelContent:error:")] bool SetSupportsMultichannelContent (bool inValue, [NullAllowed] out NSError outError); - [Watch (8, 0), TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("supportsMultichannelContent")] bool SupportsMultichannelContent { get; } [Notification (typeof (SpatialPlaybackCapabilitiesChangedEventArgs))] - [Watch (8, 0), TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVAudioSessionSpatialPlaybackCapabilitiesChangedNotification")] NSString SpatialPlaybackCapabilitiesChangedNotification { get; } [Notification (typeof (RenderingModeChangeNotificationEventArgs))] - [TV (17, 2), NoWatch, NoMac, iOS (17, 2), NoMacCatalyst] + [TV (17, 2), NoMac, iOS (17, 2), MacCatalyst (17, 2)] [Field ("AVAudioSessionRenderingModeChangeNotification")] NSString RenderingModeChangeNotification { get; } [Notification] - [TV (17, 2), NoWatch, NoMac, iOS (17, 2), NoMacCatalyst] + [TV (17, 2), NoMac, iOS (17, 2), MacCatalyst (17, 2)] [Field ("AVAudioSessionRenderingCapabilitiesChangeNotification")] NSString RenderingCapabilitiesChangeNotification { get; } - [TV (17, 2), NoWatch, NoMac, iOS (17, 2), NoMacCatalyst] + [TV (17, 2), NoMac, iOS (17, 2), MacCatalyst (17, 2)] [Export ("renderingMode")] AVAudioSessionRenderingMode RenderingMode { get; } [Notification (typeof (MicrophoneInjectionCapabilitiesChangeEventArgs))] - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [iOS (18, 2), NoTV, NoMac, MacCatalyst (18, 2)] [Field ("AVAudioSessionMicrophoneInjectionCapabilitiesChangeNotification")] NSString MicrophoneInjectionCapabilitiesChangeNotification { get; } - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [NoMacCatalyst] // This is available in headers (according to xtro) for Mac Catalyst, but introspection says no (which we'll believe) + [iOS (18, 2), NoTV, NoMac] [Export ("setPrefersEchoCancelledInput:error:")] bool SetPrefersEchoCancelledInput (bool value, [NullAllowed] out NSError error); - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [iOS (18, 2), NoTV, NoMac, MacCatalyst (18, 2)] [Export ("prefersEchoCancelledInput")] bool PrefersEchoCancelledInput { get; } - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [iOS (18, 2), NoTV, NoMac, MacCatalyst (18, 2)] [Export ("isEchoCancelledInputEnabled")] bool IsEchoCancelledInputEnabled { get; } - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [iOS (18, 2), NoTV, NoMac, MacCatalyst (18, 2)] [Export ("isEchoCancelledInputAvailable")] bool IsEchoCancelledInputAvailable { get; } @@ -2781,15 +2800,23 @@ interface AVAudioSession { [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] [Export ("isMicrophoneInjectionAvailable")] bool IsMicrophoneInjectionAvailable { get; } + + [TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [Export ("prefersInterruptionOnRouteDisconnect")] + bool PrefersInterruptionOnRouteDisconnect { get; } + + [MacCatalyst (17, 0), TV (17, 0), NoMac, iOS (17, 0)] + [Export ("setPrefersInterruptionOnRouteDisconnect:error:")] + bool SetPrefersInterruptionOnRouteDisconnect (bool value, [NullAllowed] out NSError outError); } - [TV (17, 2), NoWatch, NoMac, iOS (17, 2), NoMacCatalyst] + [TV (17, 2), NoMac, iOS (17, 2), MacCatalyst (17, 2)] interface RenderingModeChangeNotificationEventArgs { [Export ("AVAudioSessionRenderingModeNewRenderingModeKey")] AVAudioSessionRenderingMode NewRenderingMode { get; } } - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [iOS (18, 2), NoTV, NoMac, MacCatalyst (18, 2)] interface MicrophoneInjectionCapabilitiesChangeEventArgs { [Export ("AVAudioSessionMicrophoneInjectionIsAvailableKey")] bool IsAvailable { get; } @@ -2814,7 +2841,6 @@ enum AVAudioSessionCategory { PlayAndRecord, [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Field ("AVAudioSessionCategoryAudioProcessing")] @@ -2858,7 +2884,6 @@ enum AVAudioSessionMode { [Field ("AVAudioSessionModeSpokenAudio")] SpokenAudio, - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("AVAudioSessionModeVoicePrompt")] VoicePrompt, @@ -2882,22 +2907,18 @@ interface AVAudioSessionDataSourceDescription { [Internal] NSString Orientation_ { get; } - [NoWatch] [MacCatalyst (13, 1)] [Internal, Export ("supportedPolarPatterns"), NullAllowed] NSString [] SupportedPolarPatterns_ { get; } - [NoWatch] [MacCatalyst (13, 1)] [Internal, Export ("selectedPolarPattern", ArgumentSemantic.Copy), NullAllowed] NSString SelectedPolarPattern_ { get; } - [NoWatch] [MacCatalyst (13, 1)] [Internal, Export ("preferredPolarPattern", ArgumentSemantic.Copy), NullAllowed] NSString PreferredPolarPattern_ { get; } - [NoWatch] [MacCatalyst (13, 1)] [Internal, Export ("setPreferredPolarPattern:error:")] bool SetPreferredPolarPattern_ ([NullAllowed] NSString pattern, out NSError outError); @@ -2906,13 +2927,19 @@ interface AVAudioSessionDataSourceDescription { [MacCatalyst (13, 1)] interface AVAudioSessionInterruptionEventArgs { +#if XAMCORE_5_0 + [NoMac] +#endif [Export ("AVAudioSessionInterruptionTypeKey")] AVAudioSessionInterruptionType InterruptionType { get; } +#if XAMCORE_5_0 + [NoMac] +#endif [Export ("AVAudioSessionInterruptionOptionKey")] AVAudioSessionInterruptionOptions Option { get; } - [iOS (14, 5), Watch (7, 4), NoTV, NoMac] + [iOS (14, 5), NoTV, NoMac] [MacCatalyst (14, 5)] [Export ("AVAudioSessionInterruptionReasonKey")] AVAudioSessionInterruptionReason Reason { get; } @@ -2950,7 +2977,6 @@ interface IAVAudioSessionDelegate { } [Model] [Protocol] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] interface AVAudioSessionDelegate { @@ -3015,22 +3041,19 @@ interface AVAudioSessionPortDescription { AVAudioSessionDataSourceDescription [] DataSourceDescriptions { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("selectedDataSource", ArgumentSemantic.Copy), NullAllowed] AVAudioSessionDataSourceDescription SelectedDataSource { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("preferredDataSource", ArgumentSemantic.Copy), NullAllowed] AVAudioSessionDataSourceDescription PreferredDataSource { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("setPreferredDataSource:error:")] bool SetPreferredDataSource ([NullAllowed] AVAudioSessionDataSourceDescription dataSource, out NSError outError); - [Watch (8, 0), TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("spatialAudioEnabled")] bool SpatialAudioEnabled { [Bind ("isSpatialAudioEnabled")] get; } } @@ -3047,7 +3070,6 @@ interface AVAudioSessionRouteDescription { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioNode))] [DisableDefaultCtor] // returns a nil handle @@ -3076,13 +3098,11 @@ interface AVAudioUnit { [Async] void FromComponentDescription (AudioComponentDescription audioComponentDescription, AudioComponentInstantiationOptions options, Action completionHandler); - [NoWatch] [MacCatalyst (13, 1)] [Export ("AUAudioUnit")] AUAudioUnit AUAudioUnit { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnitEffect))] interface AVAudioUnitDelay { @@ -3099,7 +3119,6 @@ interface AVAudioUnitDelay { float WetDryMix { get; set; } /* float, not CGFloat */ } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnitEffect))] interface AVAudioUnitDistortion { @@ -3113,7 +3132,6 @@ interface AVAudioUnitDistortion { void LoadFactoryPreset (AVAudioUnitDistortionPreset preset); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnit))] [DisableDefaultCtor] // returns a nil handle @@ -3125,7 +3143,6 @@ interface AVAudioUnitEffect { bool Bypass { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnitEffect))] interface AVAudioUnitEQ { @@ -3159,7 +3176,6 @@ interface AVAudioUnitEQFilterParameters { bool Bypass { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnit))] [DisableDefaultCtor] // returns a nil handle @@ -3171,7 +3187,6 @@ interface AVAudioUnitGenerator : AVAudioMixing { bool Bypass { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnit), Name = "AVAudioUnitMIDIInstrument")] [DisableDefaultCtor] // returns a nil handle @@ -3213,7 +3228,6 @@ interface AVAudioUnitMidiInstrument : AVAudioMixing { void SendMidiSysExEvent (NSData midiData); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnitMidiInstrument))] interface AVAudioUnitSampler { @@ -3223,7 +3237,6 @@ interface AVAudioUnitSampler { [Deprecated (PlatformName.MacOSX, 12, 0)] [Deprecated (PlatformName.iOS, 15, 0)] [Deprecated (PlatformName.TvOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Export ("masterGain")] float MasterGain { get; set; } /* float, not CGFloat */ @@ -3240,12 +3253,11 @@ interface AVAudioUnitSampler { [Export ("loadAudioFilesAtURLs:error:")] bool LoadAudioFiles (NSUrl [] audioFiles, out NSError outError); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("overallGain")] float OverallGain { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnitEffect))] interface AVAudioUnitReverb { @@ -3258,7 +3270,6 @@ interface AVAudioUnitReverb { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnit))] [DisableDefaultCtor] // returns a nil handle @@ -3270,7 +3281,6 @@ interface AVAudioUnitTimeEffect { bool Bypass { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnitTimeEffect))] interface AVAudioUnitTimePitch { @@ -3288,7 +3298,6 @@ interface AVAudioUnitTimePitch { float Overlap { get; set; } /* float, not CGFloat */ } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioUnitTimeEffect))] interface AVAudioUnitVarispeed { @@ -3431,14 +3440,19 @@ interface AVAudioConverter { NSNumber [] AvailableEncodeChannelLayoutTags { get; } } - [NoWatch, NoMac, NoiOS] + [NoMac, NoiOS] [NoMacCatalyst] [Abstract] [BaseType (typeof (NSObject))] +#if XAMCORE_5_0 + [DisableDefaultCtor] +#endif interface AVDisplayCriteria : NSCopying { + [TV (17, 0), NoMac, NoiOS, NoMacCatalyst] + [Export ("initWithRefreshRate:formatDescription:")] + NativeHandle Constructor (float refreshRate, CMFormatDescription formatDescription); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** initialization method -init cannot be sent to an abstract object of class AVAsset: Create a concrete instance! @@ -3463,7 +3477,7 @@ interface AVAsset : NSCopying { [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] CGSize NaturalSize { get; } - [NoWatch, NoMac, NoiOS, NoMacCatalyst] + [NoMac, NoiOS, NoMacCatalyst] [Export ("preferredDisplayCriteria")] AVDisplayCriteria PreferredDisplayCriteria { get; } @@ -3476,16 +3490,28 @@ interface AVAsset : NSCopying { [Export ("tracks")] AVAssetTrack [] Tracks { get; } + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] [return: NullAllowed] [Export ("trackWithTrackID:")] AVAssetTrack TrackWithTrackID (int /* CMPersistentTrackID = int32_t */ trackID); + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'NaturalSize/PreferredTransform' as appropriate on the video track instead.")] [Export ("tracksWithMediaType:")] AVAssetTrack [] TracksWithMediaType (string mediaType); [Wrap ("TracksWithMediaType (mediaType.GetConstant ())")] AVAssetTrack [] GetTracks (AVMediaTypes mediaType); + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("tracksWithMediaCharacteristic:")] AVAssetTrack [] TracksWithMediaCharacteristic (string mediaCharacteristic); @@ -3501,11 +3527,20 @@ interface AVAsset : NSCopying { [Export ("availableMetadataFormats")] string [] AvailableMetadataFormats { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] #if !NET [Obsolete ("Use 'GetMetadataForFormat' with enum values AVMetadataFormat.")] [Wrap ("GetMetadataForFormat (new NSString (format))", IsVirtual = true)] AVMetadataItem [] MetadataForFormat (string format); #endif + + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("metadataForFormat:")] AVMetadataItem [] GetMetadataForFormat (NSString format); @@ -3518,6 +3553,10 @@ interface AVAsset : NSCopying { [Export ("availableChapterLocales")] NSLocale [] AvailableChapterLocales { get; } + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] [Export ("chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:")] AVTimedMetadataGroup [] GetChapterMetadataGroups (NSLocale forLocale, [NullAllowed] AVMetadataItem [] commonKeys); @@ -3551,6 +3590,10 @@ interface AVAsset : NSCopying { [Export ("referenceRestrictions")] AVAssetReferenceRestrictions ReferenceRestrictions { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [return: NullAllowed] [Export ("mediaSelectionGroupForMediaCharacteristic:")] AVMediaSelectionGroup MediaSelectionGroupForMediaCharacteristic (string avMediaCharacteristic); @@ -3566,6 +3609,10 @@ interface AVAsset : NSCopying { [Async ("LoadValuesTaskAsync")] void LoadValuesAsynchronously (string [] keys, Action handler); + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'LoadChapterMetadataGroups' instead.")] [Export ("chapterMetadataGroupsBestMatchingPreferredLanguages:")] AVTimedMetadataGroup [] GetChapterMetadataGroupsBestMatchingPreferredLanguages (string [] languages); @@ -3577,6 +3624,10 @@ interface AVAsset : NSCopying { [Export ("metadata")] AVMetadataItem [] Metadata { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] [Export ("unusedTrackID")] int /* CMPersistentTrackID -> int32_t */ UnusedTrackId { get; } // TODO: wrong name, should have benn UnusedTrackID @@ -3613,13 +3664,11 @@ interface AVAsset : NSCopying { [Notification, Field ("AVAssetMediaSelectionGroupsDidChangeNotification")] NSString MediaSelectionGroupsDidChangeNotification { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVAssetContainsFragmentsDidChangeNotification")] [Notification] NSString ContainsFragmentsDidChangeNotification { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVAssetWasDefragmentedNotification")] [Notification] @@ -3639,42 +3688,42 @@ interface AVAsset : NSCopying { CMTime MinimumTimeOffsetFromLive { get; } [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("findUnusedTrackIDWithCompletionHandler:")] void FindUnusedTrackId (Action completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadChapterMetadataGroupsBestMatchingPreferredLanguages:completionHandler:")] void LoadChapterMetadataGroups (string [] bestMatchingPreferredLanguages, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadChapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:completionHandler:")] void LoadChapterMetadataGroups (NSLocale titleLocale, string [] commonKeys, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadMediaSelectionGroupForMediaCharacteristic:completionHandler:")] void LoadMediaSelectionGroup (string mediaCharacteristic, Action completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadMetadataForFormat:completionHandler:")] void LoadMetadata (string format, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTrackWithTrackID:completionHandler:")] void LoadTrack (int trackId, Action completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaCharacteristic:completionHandler:")] void LoadTrackWithMediaCharacteristics (string mediaCharacteristic, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaType:completionHandler:")] void LoadTracksWithMediaType (string mediaType, Action, NSError> completionHandler); } @@ -3682,7 +3731,6 @@ interface AVAsset : NSCopying { interface IAVFragmentMinding { } [Protocol] - [Watch (6, 0)] [MacCatalyst (13, 1)] interface AVFragmentMinding { @@ -3693,7 +3741,6 @@ interface AVFragmentMinding { bool IsAssociatedWithFragmentMinder (); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (AVUrlAsset))] @@ -3710,7 +3757,6 @@ interface AVFragmentedAsset : AVFragmentMinding { AVFragmentedAssetTrack [] Tracks { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVFragmentedAsset))] @@ -3733,23 +3779,22 @@ interface AVFragmentedAsset_AVFragmentedAssetTrackInspection { AVFragmentedAssetTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTrackWithTrackID:completionHandler:")] void LoadTrack (int trackId, Action completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaType:completionHandler:")] void LoadTracksWithMediaType (string mediaType, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaCharacteristic:completionHandler:")] void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action, NSError> completionHandler); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVFragmentedAssetMinder { @@ -3775,7 +3820,6 @@ interface AVFragmentedAssetMinder { void RemoveFragmentedAsset (AVAsset asset); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (AVAssetTrack))] @@ -3784,7 +3828,6 @@ interface AVFragmentedAssetTrack { interface IAVCaptureFileOutputDelegate { } - [NoWatch] [NoiOS] [NoTV] [Unavailable (PlatformName.MacCatalyst)] @@ -3805,7 +3848,7 @@ interface AVCaptureFileOutputDelegate { #endif /// Base class for media samples that were captured with . [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptureSynchronizedData { @@ -3814,8 +3857,11 @@ interface AVCaptureSynchronizedData { } /// A collection of simultaneous media capture samples. +#if XAMCORE_5_0 + [NoMac] +#endif [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptureSynchronizedDataCollection : INSFastEnumeration { @@ -3846,7 +3892,7 @@ interface IAVCaptureDataOutputSynchronizerDelegate { } /// Delegate for receiving synchronized data for a . [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [TV (17, 0)] [NoMac] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -3857,7 +3903,7 @@ interface AVCaptureDataOutputSynchronizerDelegate { } /// Combines captured media from multiple sources and passes timestamp-matched data to a single callback. - [NoWatch, NoTV] + [TV (17, 0)] [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -3885,7 +3931,7 @@ interface AVCaptureDataOutputSynchronizer { /// Contains buffer data that was obtained with synchronized capture.. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoMac, NoWatch, NoTV] + [NoMac, TV (17, 0)] [BaseType (typeof (AVCaptureSynchronizedData))] interface AVCaptureSynchronizedSampleBufferData { [Export ("sampleBuffer")] @@ -3900,7 +3946,7 @@ interface AVCaptureSynchronizedSampleBufferData { /// Contains metadata that was obtained with synchronized capture. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoMac, NoWatch, NoTV] + [NoMac, TV (17, 0)] [BaseType (typeof (AVCaptureSynchronizedData))] interface AVCaptureSynchronizedMetadataObjectData { [Export ("metadataObjects")] @@ -3909,7 +3955,7 @@ interface AVCaptureSynchronizedMetadataObjectData { /// Contains depth data that was obtained with synchronized capture. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoMac, NoWatch, NoTV] + [NoMac, TV (17, 0)] [BaseType (typeof (AVCaptureSynchronizedData))] [DisableDefaultCtor] interface AVCaptureSynchronizedDepthData { @@ -3923,7 +3969,6 @@ interface AVCaptureSynchronizedDepthData { AVCaptureOutputDataDroppedReason DroppedReason { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Protocol] interface AVQueuedSampleBufferRendering { @@ -3954,13 +3999,12 @@ interface AVQueuedSampleBufferRendering { #if NET [Abstract] #endif - [TV (14, 5), Watch (7, 4), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("hasSufficientMediaDataForReliablePlaybackStart")] bool HasSufficientMediaDataForReliablePlaybackStart { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVSampleBufferAudioRenderer : AVQueuedSampleBufferRendering { @@ -3970,7 +4014,7 @@ interface AVSampleBufferAudioRenderer : AVQueuedSampleBufferRendering { [NullAllowed, Export ("error")] NSError Error { get; } - [NullAllowed, Export ("audioOutputDeviceUniqueID"), NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NullAllowed, Export ("audioOutputDeviceUniqueID"), NoTV, NoiOS, MacCatalyst (15, 0)] string AudioOutputDeviceUniqueId { get; set; } [Export ("audioTimePitchAlgorithm")] @@ -3993,18 +4037,17 @@ interface AVSampleBufferAudioRenderer : AVQueuedSampleBufferRendering { [Field ("AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification")] NSString AudioRendererWasFlushedAutomaticallyNotification { get; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("allowedAudioSpatializationFormats", ArgumentSemantic.Assign)] AVAudioSpatializationFormats AllowedAudioSpatializationFormats { get; set; } [Notification] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVSampleBufferAudioRendererOutputConfigurationDidChangeNotification")] NSString ConfigurationDidChangeNotification { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] interface AudioRendererWasFlushedAutomaticallyEventArgs { [Internal] @@ -4014,7 +4057,6 @@ interface AudioRendererWasFlushedAutomaticallyEventArgs { interface IAVQueuedSampleBufferRendering { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVSampleBufferRenderSynchronizer { @@ -4036,12 +4078,12 @@ interface AVSampleBufferRenderSynchronizer { [Export ("setRate:time:")] void SetRate (float rate, CMTime time); - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("setRate:time:atHostTime:")] void SetRate (float rate, CMTime time, CMTime hostTime); - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("delaysRateChangeUntilHasSufficientMediaData")] bool DelaysRateChangeUntilHasSufficientMediaData { get; set; } @@ -4079,7 +4121,7 @@ interface AVSampleBufferRenderSynchronizer { void RemoveTimeObserver (NSObject observer); } - [NoTV, NoiOS, NoWatch, NoMacCatalyst] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVSampleBufferGenerator { @@ -4088,6 +4130,8 @@ interface AVSampleBufferGenerator { [DesignatedInitializer] NativeHandle Constructor (AVAsset asset, [NullAllowed] CMTimebase timebase); + [NoiOS, NoTV, NoMacCatalyst] + [Deprecated (PlatformName.MacOSX, 13, 0, message: "Use the 'GenerateCGImagesAsynchronously' method instead.")] [Export ("createSampleBufferForRequest:")] [return: Release] [return: NullAllowed] @@ -4097,9 +4141,23 @@ interface AVSampleBufferGenerator { [Async] [Export ("notifyOfDataReadyForSampleBuffer:completionHandler:")] void NotifyOfDataReady (CMSampleBuffer sbuf, Action completionHandler); + + [Mac (13, 0)] + [Export ("createSampleBufferForRequest:addingToBatch:error:")] + [return: NullAllowed] + CMSampleBuffer CreateSampleBuffer (AVSampleBufferRequest request, AVSampleBufferGeneratorBatch batch, [NullAllowed] out NSError outError); + + [Mac (13, 0)] + [Export ("createSampleBufferForRequest:error:")] + [return: NullAllowed] + CMSampleBuffer CreateSampleBuffer (AVSampleBufferRequest request, [NullAllowed] out NSError outError); + + [Mac (13, 0)] + [Export ("makeBatch")] + AVSampleBufferGeneratorBatch MakeBatch (); } - [NoTV, NoiOS, NoWatch, NoMacCatalyst] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVSampleBufferRequest { @@ -4130,7 +4188,6 @@ interface AVSampleBufferRequest { CMTime OverrideTime { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // You create an asset generator using initWithAsset: or assetImageGeneratorWithAsset: http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVAssetImageGenerator_Class/Reference/Reference.html @@ -4205,13 +4262,30 @@ interface AVAssetImageGenerator { [Export ("asset")] AVAsset Asset { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("customVideoCompositor", ArgumentSemantic.Copy), NullAllowed] IAVVideoCompositing CustomVideoCompositor { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("dynamicRangePolicy")] + [BindAs (typeof (AVAssetImageGeneratorDynamicRangePolicy))] + NSString DynamicRangePolicy { get; set; } + + [Sealed] + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("dynamicRangePolicy")] + NSString WeakDynamicRangePolicy { get; set; } + } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + enum AVAssetImageGeneratorDynamicRangePolicy { + [Field ("AVAssetImageGeneratorDynamicRangePolicyForceSDR")] + DynamicRangePolicyForceSdr, + + [Field ("AVAssetImageGeneratorDynamicRangePolicyMatchSource")] + DynamicRangePolicyMatchSource, } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetReader initWithAsset:error:] invalid parameter not satisfying: asset != ((void*)0) @@ -4253,7 +4327,6 @@ interface AVAssetReader { void CancelReading (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** initialization method -init cannot be sent to an abstract object of class AVAssetReaderOutput: Create a concrete instance! @@ -4282,7 +4355,6 @@ interface AVAssetReaderOutput { void MarkConfigurationAsFinal (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: *** -[AVAssetReaderOutputMetadataAdaptor initWithAssetReaderTrackOutput:] invalid parameter not satisfying: trackOutput != ((void*)0) @@ -4303,7 +4375,6 @@ interface AVAssetReaderOutputMetadataAdaptor { AVTimedMetadataGroup NextTimedMetadataGroup (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetReaderOutput))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: *** -[AVAssetReaderSampleReferenceOutput initWithTrack:] invalid parameter not satisfying: track != ((void*)0) @@ -4320,7 +4391,6 @@ interface AVAssetReaderSampleReferenceOutput { AVAssetReaderSampleReferenceOutput Create (AVAssetTrack track); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetReaderOutput))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetReaderTrackOutput initWithTrack:outputSettings:] invalid parameter not satisfying: track != ((void*)0) @@ -4359,7 +4429,6 @@ interface AVAssetReaderTrackOutput { NSString AudioTimePitchAlgorithm { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetReaderOutput))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetReaderAudioMixOutput initWithAudioTracks:audioSettings:] invalid parameter not satisfying: audioTracks != ((void*)0) @@ -4400,7 +4469,6 @@ interface AVAssetReaderAudioMixOutput { NSString AudioTimePitchAlgorithm { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetReaderOutput))] // crash application if 'init' is called @@ -4435,13 +4503,11 @@ interface AVAssetReaderVideoCompositionOutput { [Wrap ("WeakVideoSettings"), NullAllowed] CVPixelBufferAttributes UncompressedVideoSettings { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("customVideoCompositor", ArgumentSemantic.Copy), NullAllowed] IAVVideoCompositing CustomVideoCompositor { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // no valid handle, docs now says "You do not create resource loader objects yourself." @@ -4459,11 +4525,15 @@ interface AVAssetResourceLoader { [MacCatalyst (13, 1)] [Export ("preloadsEligibleContentKeys")] bool PreloadsEligibleContentKeys { get; set; } + + // From the AVAssetResourceLoaderCommonMediaClientDataSupport (AVAssetResourceLoader) category + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("sendsCommonMediaClientDataAsHTTPHeaders")] + bool SendsCommonMediaClientDataAsHttpHeaders { get; set; } } interface IAVAssetResourceLoaderDelegate { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -4472,33 +4542,27 @@ interface AVAssetResourceLoaderDelegate { #if !NET [Abstract] #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("resourceLoader:shouldWaitForLoadingOfRequestedResource:")] bool ShouldWaitForLoadingOfRequestedResource (AVAssetResourceLoader resourceLoader, AVAssetResourceLoadingRequest loadingRequest); - [NoWatch] [MacCatalyst (13, 1)] [Export ("resourceLoader:didCancelLoadingRequest:")] void DidCancelLoadingRequest (AVAssetResourceLoader resourceLoader, AVAssetResourceLoadingRequest loadingRequest); - [NoWatch] [MacCatalyst (13, 1)] [Export ("resourceLoader:shouldWaitForResponseToAuthenticationChallenge:")] bool ShouldWaitForResponseToAuthenticationChallenge (AVAssetResourceLoader resourceLoader, NSUrlAuthenticationChallenge authenticationChallenge); - [NoWatch] [MacCatalyst (13, 1)] [Export ("resourceLoader:didCancelAuthenticationChallenge:")] void DidCancelAuthenticationChallenge (AVAssetResourceLoader resourceLoader, NSUrlAuthenticationChallenge authenticationChallenge); - [NoWatch] [MacCatalyst (13, 1)] [Export ("resourceLoader:shouldWaitForRenewalOfRequestedResource:")] bool ShouldWaitForRenewalOfRequestedResource (AVAssetResourceLoader resourceLoader, AVAssetResourceRenewalRequest renewalRequest); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // crash at 'description' - not meant to be used callable (it's used from a property getter) @@ -4520,7 +4584,6 @@ interface AVAssetResourceLoadingDataRequest { bool RequestsAllDataToEndOfResource { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // not meant be be user created (resource loader job, see documentation) @@ -4560,7 +4623,6 @@ interface AVAssetResourceLoadingRequest { [return: NullAllowed] NSData GetPersistentContentKey (NSData keyVendorResponse, [NullAllowed] NSDictionary options, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVAssetResourceLoadingRequestStreamingContentKeyRequestRequiresPersistentKey")] NSString StreamingContentKeyRequestRequiresPersistentKey { get; } @@ -4588,7 +4650,6 @@ interface AVAssetResourceLoadingRequest { AVAssetResourceLoadingRequestor Requestor { get; } } - [NoWatch] [MacCatalyst (13, 1)] [DisableDefaultCtor] // not meant be be user created (resource loader job, see documentation) fix crash [BaseType (typeof (AVAssetResourceLoadingRequest))] @@ -4596,7 +4657,6 @@ interface AVAssetResourceRenewalRequest { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // no valid handle, the instance is received (not created) -> see doc @@ -4614,15 +4674,18 @@ interface AVAssetResourceLoadingContentInformationRequest { [Export ("renewalDate", ArgumentSemantic.Copy), NullAllowed] NSDate RenewalDate { get; set; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [NullAllowed, Export ("allowedContentTypes")] string [] AllowedContentTypes { get; } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("entireLengthAvailableOnDemand")] + bool EntireLengthAvailableOnDemand { [Bind ("isEntireLengthAvailableOnDemand")] get; set; } } interface IAVAssetWriterDelegate { } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -4639,7 +4702,6 @@ interface AVAssetWriterDelegate { void DidOutputSegmentData (AVAssetWriter writer, NSData segmentData, AVAssetSegmentType segmentType); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetWriter initWithURL:fileType:error:] invalid parameter not satisfying: outputURL != ((void*)0) @@ -4697,7 +4759,7 @@ interface AVAssetWriter { [Export ("initWithURL:fileType:error:")] NativeHandle Constructor (NSUrl outputUrl, string outputFileType, out NSError error); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithContentType:")] [DesignatedInitializer] @@ -4763,17 +4825,17 @@ interface AVAssetWriter { // from category AVAssetWriterSegmentation (AVAssetWriter) - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("preferredOutputSegmentInterval", ArgumentSemantic.Assign)] CMTime PreferredOutputSegmentInterval { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initialSegmentStartTime", ArgumentSemantic.Assign)] CMTime InitialSegmentStartTime { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("outputFileTypeProfile")] [NullAllowed] @@ -4783,30 +4845,33 @@ interface AVAssetWriter { [Wrap ("WeakDelegate")] IAVAssetWriterDelegate Delegate { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("flushSegment")] void FlushSegment (); // from category AVAssetWriterFileTypeSpecificProperties (AVAssetWriter) - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initialMovieFragmentSequenceNumber")] nint InitialMovieFragmentSequenceNumber { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("producesCombinableFragments")] bool ProducesCombinableFragments { get; set; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("initialMovieFragmentInterval", ArgumentSemantic.Assign)] + CMTime InitialMovieFragmentInterval { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetWriterInput initWithMediaType:outputSettings:] invalid parameter not satisfying: mediaType != ((void*)0) @@ -4954,14 +5019,12 @@ interface AVAssetWriterInput { // AVAssetWriterInput_AVAssetWriterInputFileTypeSpecificProperties - [NoWatch] [MacCatalyst (13, 1)] [Export ("mediaDataLocation")] string MediaDataLocation { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAssetWriterInputPassDescription { @@ -4970,7 +5033,6 @@ interface AVAssetWriterInputPassDescription { NSValue [] SourceTimeRanges { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: *** -[AVAssetWriterInputMetadataAdaptor initWithAssetWriterInput:] invalid parameter not satisfying: input != ((void*)0) @@ -4990,7 +5052,6 @@ interface AVAssetWriterInputMetadataAdaptor { bool AppendTimedMetadataGroup (AVTimedMetadataGroup timedMetadataGroup); } - [NoWatch] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetWriterInputGroup initWithInputs:defaultInput:] invalid parameter not satisfying: inputs != ((void*)0) [BaseType (typeof (AVMediaSelectionGroup))] [MacCatalyst (13, 1)] @@ -5010,7 +5071,6 @@ interface AVAssetWriterInputGroup { AVAssetWriterInput DefaultInput { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVAssetWriterInputPixelBufferAdaptor initWithAssetWriterInput:sourcePixelBufferAttributes:] invalid parameter not satisfying: input != ((void*)0) @@ -5046,7 +5106,6 @@ interface AVAssetWriterInputPixelBufferAdaptor { bool AppendPixelBufferWithPresentationTime (CVPixelBuffer pixelBuffer, CMTime presentationTime); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -5058,16 +5117,12 @@ interface AVAssetCache { AVMediaSelectionOption [] GetMediaSelectionOptions (AVMediaSelectionGroup mediaSelectionGroup); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAsset), Name = "AVURLAsset")] // 'init' returns NIL [DisableDefaultCtor] interface AVUrlAsset -#if !WATCH - : AVContentKeyRecipient -#endif -{ + : AVContentKeyRecipient { [Export ("URL", ArgumentSemantic.Copy)] NSUrl Url { get; } @@ -5095,6 +5150,10 @@ interface AVUrlAsset [Wrap ("this (url, (NSDictionary) null!)")] NativeHandle Constructor (NSUrl url); + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] [return: NullAllowed] [Export ("compatibleTrackForCompositionTrack:")] AVAssetTrack CompatibleTrack (AVCompositionTrack forCompositionTrack); @@ -5102,7 +5161,6 @@ interface AVUrlAsset [Field ("AVURLAssetPreferPreciseDurationAndTimingKey")] NSString PreferPreciseDurationAndTimingKey { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVURLAssetReferenceRestrictionsKey")] NSString ReferenceRestrictionsKey { get; } @@ -5116,7 +5174,6 @@ interface AVUrlAsset [Static, Export ("isPlayableExtendedMIMEType:")] bool IsPlayable (string extendedMimeType); - [NoWatch] [MacCatalyst (13, 1)] [Export ("resourceLoader")] AVAssetResourceLoader ResourceLoader { get; } @@ -5125,7 +5182,6 @@ interface AVUrlAsset [Field ("AVURLAssetHTTPCookiesKey")] NSString HttpCookiesKey { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("assetCache")] AVAssetCache Cache { get; } @@ -5144,25 +5200,45 @@ interface AVUrlAsset [Field ("AVURLAssetAllowsConstrainedNetworkAccessKey")] NSString AllowsConstrainedNetworkAccessKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("AVURLAssetShouldSupportAliasDataReferencesKey")] NSString ShouldSupportAliasDataReferencesKey { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("variants")] AVAssetVariant [] Variants { get; } [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("findCompatibleTrackForCompositionTrack:completionHandler:")] void FindCompatibleTrack (AVCompositionTrack compositionTrack, Action completionHandler); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVURLAssetURLRequestAttributionKey")] NSString RequestAttributionKey { get; } + + [MacCatalyst (16, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [Field ("AVURLAssetHTTPUserAgentKey")] + NSString HttpUserAgentKey { get; } + + [MacCatalyst (16, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [Field ("AVURLAssetPrimarySessionIdentifierKey")] + NSString PrimarySessionIdentifierKey { get; } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVURLAssetOverrideMIMETypeKey")] + NSString OverrideMimeTypeKey { get; } + + [MacCatalyst (16, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("httpSessionIdentifier")] + NSUuid HttpSessionIdentifier { get; } + + // From the AVMediaExtension (AVURLAsset) category + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [NullAllowed, Export ("mediaExtensionProperties")] + AVMediaExtensionProperties MediaExtensionProperties { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // 'init' returns NIL @@ -5230,10 +5306,18 @@ interface AVAssetTrack : NSCopying { [Export ("segments", ArgumentSemantic.Copy)] AVAssetTrackSegment [] Segments { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] [return: NullAllowed] [Export ("segmentForTrackTime:")] AVAssetTrackSegment SegmentForTrackTime (CMTime trackTime); + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] [Export ("samplePresentationTimeForTrackTime:")] CMTime SamplePresentationTimeForTrackTime (CMTime trackTime); @@ -5243,6 +5327,10 @@ interface AVAssetTrack : NSCopying { [Export ("commonMetadata")] AVMetadataItem [] CommonMetadata { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] [Export ("metadataForFormat:")] AVMetadataItem [] MetadataForFormat (string format); @@ -5257,6 +5345,10 @@ interface AVAssetTrack : NSCopying { [Export ("minFrameDuration")] CMTime MinFrameDuration { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] [MacCatalyst (13, 1)] [Export ("associatedTracksOfType:")] AVAssetTrack [] GetAssociatedTracks (NSString avAssetTrackTrackAssociationType); @@ -5284,21 +5376,21 @@ interface AVAssetTrack : NSCopying { [Notification] NSString TrackAssociationsDidChangeNotification { get; } - [NoiOS, NoTV, NoWatch, MacCatalyst (15, 0)] + [iOS (16, 0), TV (16, 0), MacCatalyst (15, 0)] [Export ("canProvideSampleCursors")] bool CanProvideSampleCursors { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [MacCatalyst (16, 0), TV (16, 0), iOS (16, 0)] [return: NullAllowed] [Export ("makeSampleCursorWithPresentationTimeStamp:")] AVSampleCursor MakeSampleCursor (CMTime presentationTimeStamp); - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [iOS (16, 0), TV (16, 0), MacCatalyst (15, 0)] [return: NullAllowed] [Export ("makeSampleCursorAtFirstSampleInDecodeOrder")] AVSampleCursor MakeSampleCursorAtFirstSampleInDecodeOrder (); - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [iOS (16, 0), TV (16, 0), MacCatalyst (15, 0)] [return: NullAllowed] [Export ("makeSampleCursorAtLastSampleInDecodeOrder")] AVSampleCursor MakeSampleCursorAtLastSampleInDecodeOrder (); @@ -5309,27 +5401,27 @@ interface AVAssetTrack : NSCopying { bool HasAudioSampleDependencies { get; } [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadAssociatedTracksOfType:completionHandler:")] void LoadAssociatedTracks (string trackAssociationType, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadMetadataForFormat:completionHandler:")] void LoadMetadata (string format, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadSamplePresentationTimeForTrackTime:completionHandler:")] void LoadSamplePresentationTime (CMTime trackTime, Action completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadSegmentForTrackTime:completionHandler:")] void LoadSegment (CMTime trackTime, Action completionHandler); } - [iOS (16, 0), TV (16, 0), Watch (9, 0)] + [iOS (16, 0), TV (16, 0)] [MacCatalyst (16, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -5437,7 +5529,6 @@ interface AVSampleCursor : NSCopying { NSDictionary CurrentSampleDependencyAttachments { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Category, BaseType (typeof (AVAssetTrack))] interface AVAssetTrackTrackAssociation { @@ -5461,7 +5552,6 @@ interface AVAssetTrackTrackAssociation { NSString MetadataReferent { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAssetTrackGroup : NSCopying { @@ -5469,7 +5559,6 @@ interface AVAssetTrackGroup : NSCopying { NSNumber [] TrackIDs { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVMediaSelectionGroup : NSCopying { @@ -5508,7 +5597,6 @@ interface AVMediaSelectionGroup : NSCopying { AVMediaSelectionOption DefaultOption { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVMediaSelectionOption : NSCopying { @@ -5556,7 +5644,6 @@ interface AVMediaSelectionOption : NSCopying { string ExtendedLanguageTag { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface AVMetadata { @@ -5632,7 +5719,7 @@ interface AVMetadata { [Field ("AVMetadataCommonKeySoftware")] NSString CommonKeySoftware { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataCommonKeyAccessibilityDescription")] NSString CommonKeyAccessibilityDescription { get; } @@ -5760,7 +5847,7 @@ interface AVMetadata { [Field ("AVMetadataQuickTimeUserDataKeyTaggedCharacteristic")] NSString QuickTimeUserDataKeyTaggedCharacteristic { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataQuickTimeUserDataKeyAccessibilityDescription")] NSString QuickTimeUserDataKeyAccessibilityDescription { get; } @@ -5960,12 +6047,12 @@ interface AVMetadata { [Field ("AVMetadataQuickTimeMetadataKeyContentIdentifier")] NSString QuickTimeMetadataKeyContentIdentifier { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataQuickTimeMetadataKeyAccessibilityDescription")] NSString QuickTimeMetadataKeyAccessibilityDescription { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVMetadataQuickTimeMetadataKeyIsMontage")] NSString QuickTimeMetadataKeyIsMontage { get; } @@ -6425,12 +6512,12 @@ interface AVMetadata { [Field ("AVMetadataISOUserDataKeyDate")] NSString IsoUserDataKeyDate { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataISOUserDataKeyAccessibilityDescription")] NSString IsoUserDataKeyAccessibilityDescription { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataIdentifierISOUserDataAccessibilityDescription")] NSString IsoUserDataAccessibilityDescription { get; } @@ -6461,12 +6548,19 @@ interface AVMetadata { [Field ("AVMetadataKeySpaceAudioFile")] NSString KeySpaceAudioFile { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVMetadataIdentifierQuickTimeMetadataIsMontage")] NSString QuickTimeMetadataIsMontage { get; } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVMetadataIdentifierQuickTimeMetadataFullFrameRatePlaybackIntent")] + NSString QuickTimeMetadataFullFrameRatePlaybackIntent { get; } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVMetadataQuickTimeMetadataKeyFullFrameRatePlaybackIntent")] + NSString QuickTimeMetadataKeyFullFrameRatePlaybackIntent { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface AVMetadataExtraAttribute { @@ -6485,7 +6579,6 @@ interface AVMetadataExtraAttribute { } class AVMetadataIdentifiers { - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface CommonIdentifier { @@ -6558,14 +6651,13 @@ interface CommonIdentifier { [Field ("AVMetadataCommonIdentifierSoftware")] NSString Software { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataCommonIdentifierAccessibilityDescription")] NSString AccessibilityDescription { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface QuickTime { @@ -6683,13 +6775,12 @@ interface QuickTime { [Field ("AVMetadataIdentifierQuickTimeUserDataTaggedCharacteristic")] NSString UserDataTaggedCharacteristic { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataIdentifierQuickTimeUserDataAccessibilityDescription")] NSString UserDataAccessibilityDescription { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface Iso { @@ -6705,7 +6796,6 @@ interface Iso { NSString UserDataTaggedCharacteristic { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface ThreeGP { @@ -6755,7 +6845,6 @@ interface ThreeGP { NSString UserDataMediaRating { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface QuickTimeMetadata { @@ -6894,63 +6983,62 @@ interface QuickTimeMetadata { [Field ("AVMetadataIdentifierQuickTimeMetadataContentIdentifier")] NSString ContentIdentifier { get; } - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataSpatialOverCaptureQualityScoringVersion")] NSString SpatialOverCaptureQualityScoringVersion { get; } - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataSpatialOverCaptureQualityScore")] NSString SpatialOverCaptureQualityScore { get; } - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataLivePhotoVitalityScoringVersion")] NSString LivePhotoVitalityScoringVersion { get; } - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataLivePhotoVitalityScore")] NSString LivePhotoVitalityScore { get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataDetectedSalientObject")] NSString DetectedSalientObject { get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataDetectedHumanBody")] NSString DetectedHumanBody { get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataDetectedDogBody")] NSString DetectedDogBody { get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataDetectedCatBody")] NSString DetectedCatBody { get; } - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVMetadataIdentifierQuickTimeMetadataAutoLivePhoto")] NSString AutoLivePhoto { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataIdentifierQuickTimeMetadataAccessibilityDescription")] NSString AccessibilityDescription { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataIdentifierQuickTimeMetadataLocationHorizontalAccuracyInMeters")] NSString LocationHorizontalAccuracyInMeters { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface iTunesMetadata { @@ -7099,7 +7187,6 @@ interface iTunesMetadata { NSString ExecProducer { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface ID3Metadata { @@ -7389,7 +7476,6 @@ interface ID3Metadata { NSString UserUrl { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface IcyMetadata { @@ -7401,7 +7487,6 @@ interface IcyMetadata { } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVMetadataItem : NSMutableCopying { @@ -7446,7 +7531,6 @@ interface AVMetadataItem : NSMutableCopying { [Export ("metadataItemsFromArray:withKey:keySpace:")] AVMetadataItem [] FilterWithKey (AVMetadataItem [] metadataItems, [NullAllowed] NSObject key, [NullAllowed] string keySpace); - [NoWatch] // headers say it is the watch, but the AVMetadataItemFilter is not [MacCatalyst (13, 1)] [Static, Export ("metadataItemsFromArray:filteredByMetadataItemFilter:")] AVMetadataItem [] FilterWithItemFilter (AVMetadataItem [] metadataItems, AVMetadataItemFilter metadataItemFilter); @@ -7505,7 +7589,6 @@ interface AVMetadataItem : NSMutableCopying { AVMetadataItem GetMetadataItem (AVMetadataItem metadataItem, Action handler); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVMetadataItemValueRequest { @@ -7520,7 +7603,6 @@ interface AVMetadataItemValueRequest { void Respond (NSError error); } - [Watch (8, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // for binary compatibility this is added in AVMetadataItemFilter.cs w/[Obsolete] @@ -7530,7 +7612,6 @@ interface AVMetadataItemFilter { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSGenericException Reason: Cannot instantiate AVMetadataObject because it is an abstract superclass. [DisableDefaultCtor] @@ -7590,158 +7671,140 @@ interface AVMetadataObject { [Field ("AVMetadataObjectTypeDataMatrixCode")] NSString TypeDataMatrixCode { get; } - [NoWatch, NoTV, iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [Field ("AVMetadataObjectTypeCatBody")] NSString TypeCatBody { get; } - [NoWatch, NoTV, iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [Field ("AVMetadataObjectTypeDogBody")] NSString TypeDogBody { get; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Field ("AVMetadataObjectTypeHumanBody")] NSString TypeHumanBody { get; } - [NoWatch, NoTV, iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [Field ("AVMetadataObjectTypeSalientObject")] NSString TypeSalientObject { get; } #endif } -#if NET - [NoWatch] -#endif [Introduced (PlatformName.MacCatalyst, 14, 0)] [Flags] enum AVMetadataObjectType : ulong { [Field (null)] None = 0, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeFace")] Face = 1 << 0, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeAztecCode")] AztecCode = 1 << 1, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeCode128Code")] Code128Code = 1 << 2, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeCode39Code")] Code39Code = 1 << 3, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeCode39Mod43Code")] Code39Mod43Code = 1 << 4, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeCode93Code")] Code93Code = 1 << 5, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeEAN13Code")] EAN13Code = 1 << 6, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeEAN8Code")] EAN8Code = 1 << 7, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypePDF417Code")] PDF417Code = 1 << 8, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeQRCode")] QRCode = 1 << 9, - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVMetadataObjectTypeUPCECode")] UPCECode = 1 << 10, - [NoWatch] [MacCatalyst (14, 0)] [Field ("AVMetadataObjectTypeInterleaved2of5Code")] Interleaved2of5Code = 1 << 11, - [NoWatch] [MacCatalyst (14, 0)] [Field ("AVMetadataObjectTypeITF14Code")] ITF14Code = 1 << 12, - [NoWatch] [MacCatalyst (14, 0)] [Field ("AVMetadataObjectTypeDataMatrixCode")] DataMatrixCode = 1 << 13, [iOS (13, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataObjectTypeCatBody")] CatBody = 1 << 14, [iOS (13, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataObjectTypeDogBody")] DogBody = 1 << 15, [iOS (13, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataObjectTypeHumanBody")] HumanBody = 1 << 16, [iOS (13, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [MacCatalyst (14, 0)] [Field ("AVMetadataObjectTypeSalientObject")] SalientObject = 1 << 17, - [TV (15, 4), NoWatch, MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] + [TV (15, 4), MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] [Field ("AVMetadataObjectTypeCodabarCode")] CodabarCode = 1 << 18, - [TV (15, 4), NoWatch, MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] + [TV (15, 4), MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] [Field ("AVMetadataObjectTypeGS1DataBarCode")] GS1DataBarCode = 1 << 19, - [TV (15, 4), NoWatch, MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] + [TV (15, 4), MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] [Field ("AVMetadataObjectTypeGS1DataBarExpandedCode")] GS1DataBarExpandedCode = 1 << 20, - [TV (15, 4), NoWatch, MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] + [TV (15, 4), MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] [Field ("AVMetadataObjectTypeGS1DataBarLimitedCode")] GS1DataBarLimitedCode = 1 << 21, - [TV (15, 4), NoWatch, MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] + [TV (15, 4), MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] [Field ("AVMetadataObjectTypeMicroQRCode")] MicroQRCode = 1 << 22, - [TV (15, 4), NoWatch, MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] + [TV (15, 4), MacCatalyst (15, 4), Mac (12, 3), iOS (15, 4)] [Field ("AVMetadataObjectTypeMicroPDF417Code")] MicroPdf417Code = 1 << 23, + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVMetadataObjectTypeHumanFullBody")] + HumanFullBody = 1 << 24, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [BaseType (typeof (AVMetadataObject))] interface AVMetadataFaceObject : NSCopying { [Export ("hasRollAngle")] @@ -7761,7 +7824,6 @@ interface AVMetadataFaceObject : NSCopying { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [BaseType (typeof (AVMetadataObject))] interface AVMetadataMachineReadableCodeObject { [Export ("corners", ArgumentSemantic.Copy)] @@ -7778,7 +7840,6 @@ interface AVMetadataMachineReadableCodeObject { CIBarcodeDescriptor Descriptor { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "AVMIDIPlayer")] interface AVMidiPlayer { @@ -7812,7 +7873,7 @@ interface AVMidiPlayer { void Stop (); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (AVAsset))] @@ -7820,7 +7881,7 @@ interface AVMovie : NSCopying, NSMutableCopying { [Field ("AVMovieReferenceRestrictionsKey")] NSString ReferenceRestrictionsKey { get; } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVMovieShouldSupportAliasDataReferencesKey")] NSString ShouldSupportAliasDataReferencesKey { get; } @@ -7868,7 +7929,7 @@ interface AVMovie : NSCopying, NSMutableCopying { bool ContainsMovieFragments { get; } } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMovie))] @@ -7887,7 +7948,7 @@ interface AVMovie_AVMovieMovieHeaderSupport { bool IsCompatibleWithFileType (string fileType); } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMovie))] @@ -7909,22 +7970,22 @@ interface AVMovie_AVMovieTrackInspection { AVMovieTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); [Async] - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTrackWithTrackID:completionHandler:")] void LoadTrack (int trackId, Action completionHandler); [Async] - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaType:completionHandler:")] void LoadTracksWithMediaType (string mediaType, Action, NSError> completionHandler); [Async] - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaCharacteristic:completionHandler:")] void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action, NSError> completionHandler); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVMovie))] interface AVMutableMovie { @@ -7985,22 +8046,43 @@ interface AVMutableMovie { CMTime InterleavingPeriod { get; set; } [Async] - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTrackWithTrackID:completionHandler:")] void LoadTrack (int trackId, Action completionHandler); [Async] - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaType:completionHandler:")] void LoadTracksWithMediaType (string mediaType, Action, NSError> completionHandler); [Async] - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaCharacteristic:completionHandler:")] void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action, NSError> completionHandler); + + // inlined from the AVMutableMovie (SynchronousAssetInterface) category + [Export ("metadataForFormat:")] + AVMetadataItem [] GetMetadata (string format); + + // inlined from the AVMutableMovie (SynchronousAssetInterface) category + [Export ("chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:")] + AVTimedMetadataGroup [] GetChapterMetadataGroups (NSLocale titleLocale, [NullAllowed] string [] commonKeys); + + // inlined from the AVMutableMovie (SynchronousAssetInterface) category + [Export ("chapterMetadataGroupsBestMatchingPreferredLanguages:")] + AVTimedMetadataGroup [] GetChapterMetadataGroups (string [] bestMatchingPreferredLanguages); + + // inlined from the AVMutableMovie (SynchronousAssetInterface) category + [Export ("mediaSelectionGroupForMediaCharacteristic:")] + [return: NullAllowed] + AVMediaSelectionGroup GetMediaSelectionGroup (string mediaCharacteristic); + + // inlined from the AVMutableMovie (SynchronousAssetInterface) category + [Export ("unusedTrackID")] + int GetUnusedTrackId (); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMutableMovie))] @@ -8018,7 +8100,7 @@ interface AVMutableMovie_AVMutableMovieMovieLevelEditing { void ScaleTimeRange (CMTimeRange timeRange, CMTime duration); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMutableMovie))] @@ -8038,7 +8120,7 @@ interface AVMutableMovie_AVMutableMovieTrackLevelEditing { void RemoveTrack (AVMovieTrack track); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMutableMovie))] @@ -8060,7 +8142,7 @@ interface AVMutableMovie_AVMutableMovieTrackInspection { AVMutableMovieTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -8073,7 +8155,7 @@ interface AVMediaDataStorage { NSUrl URL { get; } } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (AVMovie))] @@ -8103,7 +8185,7 @@ interface AVFragmentedMovie : AVFragmentMinding { NSString WasDefragmentedNotification { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVFragmentedMovie))] @@ -8125,22 +8207,22 @@ interface AVFragmentedMovie_AVFragmentedMovieTrackInspection { AVFragmentedMovieTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); [Async] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTrackWithTrackID:completionHandler:")] void LoadTrack (int trackId, Action completionHandler); [Async] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaType:completionHandler:")] void LoadTracksWithMediaType (string mediaType, Action, NSError> completionHandler); [Async] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaCharacteristic:completionHandler:")] void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action, NSError> completionHandler); } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (AVFragmentedAssetMinder))] interface AVFragmentedMovieMinder { @@ -8165,7 +8247,7 @@ interface AVFragmentedMovieMinder { void Remove (AVFragmentedMovie movie); } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetTrack))] [DisableDefaultCtor] @@ -8188,7 +8270,7 @@ interface AVMovieTrack { AVMediaDataStorage MediaDataStorage { get; } } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (AVMovieTrack))] [DisableDefaultCtor] @@ -8269,9 +8351,35 @@ interface AVMutableMovieTrack { [MacCatalyst (13, 1)] [Export ("replaceFormatDescription:withFormatDescription:")] void ReplaceFormatDescription (CMFormatDescription formatDescription, CMFormatDescription newFormatDescription); + + // inlined from the AVMutableMovieTrack (SynchronousTrackInterface) category + [NoTV, iOS (13, 0)] + [Export ("hasMediaCharacteristic:")] + bool HasMediaCharacteristic (string mediaCharacteristic); + + // inlined from the AVMutableMovieTrack (SynchronousTrackInterface) category + [NoTV, iOS (13, 0)] + [Export ("segmentForTrackTime:")] + [return: NullAllowed] + AVAssetTrackSegment GetSegment (CMTime trackTime); + + // inlined from the AVMutableMovieTrack (SynchronousTrackInterface) category + [NoTV, iOS (13, 0)] + [Export ("samplePresentationTimeForTrackTime:")] + CMTime GetSamplePresentationTime (CMTime trackTime); + + // inlined from the AVMutableMovieTrack (SynchronousTrackInterface) category + [NoTV, iOS (13, 0)] + [Export ("metadataForFormat:")] + AVMetadataItem [] GetMetadata (string format); + + // inlined from the AVMutableMovieTrack (SynchronousTrackInterface) category + [NoTV, iOS (13, 0)] + [Export ("associatedTracksOfType:")] + AVAssetTrack [] GetAssociatedTracks (string trackAssociationType); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMutableMovieTrack))] @@ -8289,7 +8397,7 @@ interface AVMutableMovieTrack_AVMutableMovieTrack_TrackLevelEditing { void ScaleTimeRange (CMTimeRange timeRange, CMTime duration); } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMutableMovieTrack))] @@ -8301,13 +8409,13 @@ interface AVMutableMovieTrack_AVMutableMovieTrackTrackAssociations { void RemoveTrackAssociation (AVMovieTrack movieTrack, string trackAssociationType); } - [NoTV, Watch (6, 0), iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVMovieTrack))] [DisableDefaultCtor] interface AVFragmentedMovieTrack { #if !NET - [NoiOS, NoWatch] + [NoiOS] [Field ("AVFragmentedMovieTrackTimeRangeDidChangeNotification")] NSString ATimeRangeDidChangeNotification { get; } #endif @@ -8320,14 +8428,13 @@ interface AVFragmentedMovieTrack { [Field ("AVFragmentedMovieTrackSegmentsDidChangeNotification")] NSString SegmentsDidChangeNotification { get; } - [NoiOS, NoWatch] + [NoiOS] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use either 'AVFragmentedMovieTrackTimeRangeDidChangeNotification' or 'AVFragmentedMovieTrackSegmentsDidChangeNotification' instead. In either case, you can assume that the sender's 'TotalSampleDataLength' has changed.")] [NoMacCatalyst] [Field ("AVFragmentedMovieTrackTotalSampleDataLengthDidChangeNotification")] NSString TotalSampleDataLengthDidChangeNotification { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVMetadataItem))] interface AVMutableMetadataItem { @@ -8390,7 +8497,6 @@ interface AVMutableMetadataItem { NSDate StartDate { get; set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetTrack))] // 'init' returns NIL @@ -8403,9 +8509,24 @@ interface AVCompositionTrack { [MacCatalyst (13, 1)] [Export ("formatDescriptionReplacements")] AVCompositionTrackFormatDescriptionReplacement [] FormatDescriptionReplacements { get; } + + // inlined from the SynchronousTrackInterface (AVCompositionTrack) category + [Export ("hasMediaCharacteristic:")] + bool HasMediaCharacteristic (string mediaCharacteristic); + + // inlined from the SynchronousTrackInterface (AVCompositionTrack) category + [Export ("samplePresentationTimeForTrackTime:")] + CMTime GetSamplePresentationTime (CMTime trackTime); + + // inlined from the SynchronousTrackInterface (AVCompositionTrack) category + [Export ("metadataForFormat:")] + AVMetadataItem [] GetMetadata (string format); + + // inlined from the SynchronousTrackInterface (AVCompositionTrack) category + [Export ("associatedTracksOfType:")] + AVAssetTrack [] GetAssociatedTracks (string trackAssociationType); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVCompositionTrack))] // 'init' returns NIL @@ -8467,14 +8588,12 @@ interface AVMutableCompositionTrack { [Export ("replaceFormatDescription:withFormatDescription:")] void ReplaceFormatDescription (CMFormatDescription originalFormatDescription, [NullAllowed] CMFormatDescription replacementFormatDescription); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("enabled")] bool Enabled { [Bind ("isEnabled")] get; set; } - } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface AVErrorKeys { @@ -8514,14 +8633,13 @@ interface AVErrorKeys { [Field ("AVErrorFileTypeKey")] NSString FileType { get; } - [NoiOS, NoWatch] + [NoiOS] [NoTV] [NoMacCatalyst] [Field ("AVErrorDiscontinuityFlagsKey")] NSString DiscontinuityFlags { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAssetTrackSegment { @@ -8533,7 +8651,6 @@ interface AVAssetTrackSegment { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAsset))] interface AVComposition : NSMutableCopying { @@ -8548,9 +8665,29 @@ interface AVComposition : NSMutableCopying { [MacCatalyst (13, 1)] [Export ("URLAssetInitializationOptions", ArgumentSemantic.Copy)] NSDictionary UrlAssetInitializationOptions { get; } + + // Inlined from the AVComposition (SynchronousAssetInterface) category + [Export ("metadataForFormat:")] + AVMetadataItem [] GetMetadata (string format); + + // Inlined from the AVComposition (SynchronousAssetInterface) category + [Export ("chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:")] + AVTimedMetadataGroup [] GetChapterMetadataGroups (NSLocale titleLocale, [NullAllowed] string [] commonKeys); + + // Inlined from the AVComposition (SynchronousAssetInterface) category + [Export ("chapterMetadataGroupsBestMatchingPreferredLanguages:")] + AVTimedMetadataGroup [] GetChapterMetadataGroups (string [] bestMatchingPreferredLanguages); + + // Inlined from the AVComposition (SynchronousAssetInterface) category + [Export ("mediaSelectionGroupForMediaCharacteristic:")] + [return: NullAllowed] + AVMediaSelectionGroup GetMediaSelectionGroup (string mediaCharacteristic); + + // Inlined from the AVComposition (SynchronousAssetInterface) category + [Export ("unusedTrackID")] + int GetUnusedTrackId (); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVComposition))] @@ -8573,22 +8710,21 @@ interface AVComposition_AVCompositionTrackInspection { AVCompositionTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTrackWithTrackID:completionHandler:")] void LoadTrack (int trackId, Action completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaType:completionHandler:")] void LoadTracksWithMediaType (string mediaType, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaCharacteristic:completionHandler:")] void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action, NSError> completionHandler); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVComposition))] interface AVMutableComposition { @@ -8601,6 +8737,10 @@ interface AVMutableComposition { [Export ("compositionWithURLAssetInitializationOptions:")] AVMutableComposition FromOptions ([NullAllowed] NSDictionary urlAssetInitializationOptions); + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] [Export ("insertTimeRange:ofAsset:atTime:error:")] bool Insert (CMTimeRange insertTimeRange, AVAsset sourceAsset, CMTime atTime, out NSError error); @@ -8629,12 +8769,19 @@ interface AVMutableComposition { CGSize NaturalSize { get; set; } // from @interface CNComposition (AVMutableComposition) - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [Export ("addTracksForCinematicAssetInfo:preferredStartingTrackID:")] CNCompositionInfo AddTracks (CNAssetInfo assetInfo, int preferredStartingTrackID); + + // From the AVMutableCompositionCompositionLevelEditing (AVMutableComposition) category + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] + [Export ("insertTimeRange:ofAsset:atTime:completionHandler:")] + [Async] + void Insert (CMTimeRange timeRange, AVAsset asset, CMTime startTime, AVMutableCompositionInsertHandler completionHandler); } - [Watch (6, 0)] + delegate void AVMutableCompositionInsertHandler ([NullAllowed] NSError error); + [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMutableComposition))] @@ -8657,22 +8804,21 @@ interface AVMutableComposition_AVMutableCompositionTrackInspection { AVMutableCompositionTrack [] GetTracks (AVMediaCharacteristics mediaCharacteristic); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTrackWithTrackID:completionHandler:")] void LoadTrack (int trackId, Action completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaType:completionHandler:")] void LoadTracksWithMediaType (string mediaType, Action, NSError> completionHandler); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("loadTracksWithMediaCharacteristic:completionHandler:")] void LoadTracksWithMediaCharacteristic (string mediaCharacteristic, Action, NSError> completionHandler); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetTrackSegment))] interface AVCompositionTrackSegment { @@ -8702,7 +8848,6 @@ interface AVCompositionTrackSegment { bool Empty { [Bind ("isEmpty")] get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // 'init' returns NIL @@ -8736,7 +8881,6 @@ interface AVAssetExportSession { [Export ("progress")] float Progress { get; } // defined as 'float' - [NoWatch] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'EstimateMaximumDuration' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'EstimateMaximumDuration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'EstimateMaximumDuration' instead.")] @@ -8833,35 +8977,42 @@ interface AVAssetExportSession { [Field ("AVAssetExportPresetPassthrough")] NSString PresetPassthrough { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [NoTV, MacCatalyst (15, 0), iOS (15, 0)] [Field ("AVAssetExportPresetAppleProRes4444LPCM")] NSString PresetAppleProRes4444Lpcm { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVAssetExportPresetHEVC1920x1080WithAlpha")] NSString PresetHevc1920x1080WithAlpha { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVAssetExportPresetHEVC3840x2160WithAlpha")] NSString PresetHevc3840x2160WithAlpha { get; } - [NoWatch, NoTV, NoiOS, Mac (12, 1)] + [NoTV, NoiOS, Mac (12, 1)] [NoMacCatalyst] [Field ("AVAssetExportPresetHEVC7680x4320")] NSString PresetHevc7680x4320 { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVAssetExportPresetHEVCHighestQualityWithAlpha")] NSString PresetHevcHighestQualityWithAlpha { get; } + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("AVAssetExportPresetMVHEVC960x960")] + NSString AVAssetExportPresetMvHevc960x960 { get; } + + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Field ("AVAssetExportPresetMVHEVC1440x1440")] + NSString AVAssetExportPresetMvHevc1440x1440 { get; } + // 5.0 APIs [Export ("asset", ArgumentSemantic.Retain)] AVAsset Asset { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'EstimateOutputFileLength' for more precise results.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'EstimateOutputFileLength' for more precise results.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'EstimateOutputFileLength' for more precise results.")] @@ -8888,7 +9039,6 @@ interface AVAssetExportSession { [Export ("metadataItemFilter", ArgumentSemantic.Retain), NullAllowed] AVMetadataItemFilter MetadataItemFilter { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("customVideoCompositor", ArgumentSemantic.Copy)] IAVVideoCompositing CustomVideoCompositor { get; } @@ -8909,19 +9059,26 @@ interface AVAssetExportSession { NSUrl DirectoryForTemporaryFiles { get; set; } [Async] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("estimateMaximumDurationWithCompletionHandler:")] void EstimateMaximumDuration (Action handler); [Async] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("estimateOutputFileLengthWithCompletionHandler:")] void EstimateOutputFileLength (Action handler); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("audioTrackGroupHandling", ArgumentSemantic.Assign)] + AVAssetTrackGroupOutputHandling AudioTrackGroupHandling { get; set; } + + [NoTV, NoiOS, NoMacCatalyst, Mac (14, 0)] + [Export ("allowsParallelizedExport")] + bool AllowsParallelizedExport { get; set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface AVAudioTimePitchAlgorithm { @@ -8943,7 +9100,6 @@ interface AVAudioTimePitchAlgorithm { NSString Varispeed { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAudioMix : NSMutableCopying { @@ -8951,7 +9107,6 @@ interface AVAudioMix : NSMutableCopying { AVAudioMixInputParameters [] InputParameters { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioMix))] interface AVMutableAudioMix { @@ -8962,7 +9117,6 @@ interface AVMutableAudioMix { AVMutableAudioMix Create (); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAudioMixInputParameters : NSMutableCopying { @@ -8972,7 +9126,6 @@ interface AVAudioMixInputParameters : NSMutableCopying { [Export ("getVolumeRampForTime:startVolume:endVolume:timeRange:")] bool GetVolumeRamp (CMTime forTime, ref float /* defined as 'float*' */ startVolume, ref float /* defined as 'float*' */ endVolume, ref CMTimeRange timeRange); - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] [Export ("audioTapProcessor", ArgumentSemantic.Retain)] @@ -8984,7 +9137,6 @@ interface AVAudioMixInputParameters : NSMutableCopying { NSString AudioTimePitchAlgorithm { get; [NotImplemented] set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioMixInputParameters))] interface AVMutableAudioMixInputParameters { @@ -9005,7 +9157,6 @@ interface AVMutableAudioMixInputParameters { [Export ("setVolume:atTime:")] void SetVolume (float /* defined as 'float' */ volume, CMTime atTime); - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] // by default this property is null [Export ("audioTapProcessor", ArgumentSemantic.Retain)] @@ -9021,7 +9172,6 @@ interface AVMutableAudioMixInputParameters { interface IAVVideoCompositing { } - [NoWatch] [MacCatalyst (13, 1)] [Model, BaseType (typeof (NSObject))] [Protocol] @@ -9050,17 +9200,17 @@ interface AVVideoCompositing { [Export ("supportsWideColorSourceFrames")] bool SupportsWideColorSourceFrames { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("anticipateRenderingUsingHint:")] void AnticipateRendering (AVVideoCompositionRenderHint renderHint); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("prerollForRenderingUsingHint:")] void PrerollForRendering (AVVideoCompositionRenderHint renderHint); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("supportsHDRSourceFrames")] bool SupportsHdrSourceFrames { get; } @@ -9070,7 +9220,6 @@ interface AVVideoCompositing { bool CanConformColorOfSourceFrames { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVVideoComposition : NSMutableCopying { @@ -9083,7 +9232,6 @@ interface AVVideoComposition : NSMutableCopying { [Export ("instructions", ArgumentSemantic.Copy)] AVVideoCompositionInstruction [] Instructions { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("animationTool", ArgumentSemantic.Retain), NullAllowed] AVVideoCompositionCoreAnimationTool AnimationTool { get; } @@ -9092,7 +9240,11 @@ interface AVVideoComposition : NSMutableCopying { [Export ("renderScale")] float RenderScale { get; [NotImplemented] set; } // defined as 'float' - [NoWatch] + // From the AVVideoCompositionValidation (AVVideoComposition category) + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Call 'IsValid' instead")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Call 'IsValid' instead")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Call 'IsValid' instead")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Call 'IsValid' instead")] [MacCatalyst (13, 1)] [Export ("isValidForAsset:timeRange:validationDelegate:")] bool IsValidForAsset ([NullAllowed] AVAsset asset, CMTimeRange timeRange, [NullAllowed] IAVVideoCompositionValidationHandling validationDelegate); @@ -9105,12 +9257,21 @@ interface AVVideoComposition : NSMutableCopying { [Export ("customVideoCompositorClass", ArgumentSemantic.Copy), NullAllowed] Class CustomVideoCompositorClass { get; [NotImplemented] set; } - [NoWatch] + [Deprecated (PlatformName.MacOSX, 13, 0, "Call 'Create' instead.")] + [Deprecated (PlatformName.iOS, 16, 0, "Call 'Create' instead.")] + [Deprecated (PlatformName.MacCatalyst, 16, 0, "Call 'Create' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, "Call 'Create' instead.")] [MacCatalyst (13, 1)] [Static] [Export ("videoCompositionWithAsset:applyingCIFiltersWithHandler:")] AVVideoComposition CreateVideoComposition (AVAsset asset, Action applier); + [Async] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Static] + [Export ("videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler:")] + void Create (AVAsset asset, AVVideoCompositionCreateApplier applier, AVVideoCompositionCreateCallback completionHandler); + [MacCatalyst (13, 1)] [NullAllowed, Export ("colorPrimaries")] string ColorPrimaries { get; } @@ -9123,13 +9284,41 @@ interface AVVideoComposition : NSMutableCopying { [NullAllowed, Export ("colorTransferFunction")] string ColorTransferFunction { get; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("sourceSampleDataTrackIDs")] [BindAs (typeof (int []))] NSNumber [] SourceSampleDataTrackIds { get; } + + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("perFrameHDRDisplayMetadataPolicy")] + string PerFrameHdrDisplayMetadataPolicy { get; } + + // From the AVVideoCompositionValidation (AVVideoComposition category) + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Call 'IsValid' instead")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Call 'IsValid' instead")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Call 'IsValid' instead")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Call 'IsValid' instead")] + [Export ("determineValidityForAsset:timeRange:validationDelegate:completionHandler:")] + [Async] + void DetermineValidity ([NullAllowed] AVAsset asset, CMTimeRange timeRange, [NullAllowed] IAVVideoCompositionValidationHandling validationDelegate, AVVideoCompositionDetermineValidityCallback completionHandler); + + // From the AVVideoCompositionValidation (AVVideoComposition category) + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("isValidForTracks:assetDuration:timeRange:validationDelegate:")] + bool IsValid (AVAssetTrack [] tracks, CMTime duration, CMTimeRange timeRange, [NullAllowed] IAVVideoCompositionValidationHandling validationDelegate); + + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Static] + [Export ("videoCompositionWithPropertiesOfAsset:completionHandler:")] + [Async] + void Create (AVAsset asset, AVVideoCompositionCreateCallback completionHandler); } - [NoWatch] + delegate void AVVideoCompositionDetermineValidityCallback (bool isValid, [NullAllowed] NSError error); + delegate void AVVideoCompositionCreateApplier (AVAsynchronousCIImageFilteringRequest applier); + delegate void AVVideoCompositionCreateCallback ([NullAllowed] AVVideoComposition videoComposition, [NullAllowed] NSError error); + [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVVideoCompositionRenderContext { @@ -9161,35 +9350,29 @@ interface AVVideoCompositionRenderContext { interface IAVVideoCompositionValidationHandling { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] [Protocol] [DisableDefaultCtor] interface AVVideoCompositionValidationHandling { - [NoWatch] [MacCatalyst (13, 1)] [Export ("videoComposition:shouldContinueValidatingAfterFindingInvalidValueForKey:")] bool ShouldContinueValidatingAfterFindingInvalidValueForKey (AVVideoComposition videoComposition, string key); - [NoWatch] [MacCatalyst (13, 1)] [Export ("videoComposition:shouldContinueValidatingAfterFindingEmptyTimeRange:")] bool ShouldContinueValidatingAfterFindingEmptyTimeRange (AVVideoComposition videoComposition, CMTimeRange timeRange); - [NoWatch] [MacCatalyst (13, 1)] [Export ("videoComposition:shouldContinueValidatingAfterFindingInvalidTimeRangeInInstruction:")] bool ShouldContinueValidatingAfterFindingInvalidTimeRangeInInstruction (AVVideoComposition videoComposition, AVVideoCompositionInstruction videoCompositionInstruction); - [NoWatch] [MacCatalyst (13, 1)] [Export ("videoComposition:shouldContinueValidatingAfterFindingInvalidTrackIDInInstruction:layerInstruction:asset:")] bool ShouldContinueValidatingAfterFindingInvalidTrackIDInInstruction (AVVideoComposition videoComposition, AVVideoCompositionInstruction videoCompositionInstruction, AVVideoCompositionLayerInstruction layerInstruction, AVAsset asset); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVVideoComposition))] interface AVMutableVideoComposition { @@ -9215,10 +9398,18 @@ interface AVMutableVideoComposition { // in 7.0 they declared this was available in 6.0 [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] [Static, Export ("videoCompositionWithPropertiesOfAsset:")] AVMutableVideoComposition Create (AVAsset asset); - [TV (13, 0), NoWatch, iOS (13, 0)] + [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] + [Deprecated (PlatformName.iOS, 18, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] + [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] + [Deprecated (PlatformName.TvOS, 18, 0, message: "Use the overload of 'Create' that takes a completion handler instead.")] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("videoCompositionWithPropertiesOfAsset:prototypeInstruction:")] @@ -9230,9 +9421,13 @@ interface AVMutableVideoComposition { [Override] Class CustomVideoCompositorClass { get; set; } - [NoWatch] + // inlined from the AVMutableVideoComposition (AVMutableVideoCompositionFiltering) category [MacCatalyst (13, 1)] [Static] + [Deprecated (PlatformName.MacOSX, 13, 0, message: "Call 'Create' instead.")] + [Deprecated (PlatformName.iOS, 16, 0, message: "Call 'Create' instead.")] + [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Call 'Create' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, message: "Call 'Create' instead.")] [Export ("videoCompositionWithAsset:applyingCIFiltersWithHandler:")] AVMutableVideoComposition GetVideoComposition (AVAsset asset, Action applier); @@ -9252,13 +9447,39 @@ interface AVMutableVideoComposition { [Export ("sourceTrackIDForFrameTiming")] int SourceTrackIdForFrameTiming { get; set; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("sourceSampleDataTrackIDs", ArgumentSemantic.Copy)] [BindAs (typeof (int []))] NSNumber [] SourceSampleDataTrackIds { get; set; } + + // inlined from the AVMutableVideoComposition (AVMutableVideoCompositionFiltering) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Static] + [Export ("videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler:")] + [Async] + void Create (AVAsset asset, AVMutableVideoCompositionCreateApplier applier, AVMutableVideoCompositionCreateCallback completionHandler); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Static] + [Export ("videoCompositionWithPropertiesOfAsset:completionHandler:")] + [Async] + void Create (AVAsset asset, AVMutableVideoCompositionCreateCallback completionHandler); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Static] + [Export ("videoCompositionWithPropertiesOfAsset:prototypeInstruction:completionHandler:")] + [Async] + void Create (AVAsset asset, AVVideoCompositionInstruction prototypeInstruction, AVMutableVideoCompositionCreateCallback completionHandler); + + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("perFrameHDRDisplayMetadataPolicy")] + string PerFrameHdrDisplayMetadataPolicy { get; set; } + } - [NoWatch] + delegate void AVMutableVideoCompositionCreateApplier (AVAsynchronousCIImageFilteringRequest request); + delegate void AVMutableVideoCompositionCreateCallback ([NullAllowed] AVMutableVideoComposition videoComposition, [NullAllowed] NSError error); + [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVVideoCompositionInstruction : NSSecureCoding, NSMutableCopying { @@ -9273,7 +9494,6 @@ CGColor BackgroundColor { set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("layerInstructions", ArgumentSemantic.Copy)] AVVideoCompositionLayerInstruction [] LayerInstructions { get; [NotImplemented ("Not available on AVVideoCompositionInstruction, only available on AVMutableVideoCompositionInstruction")] set; } @@ -9295,13 +9515,12 @@ CGColor BackgroundColor { [Export ("passthroughTrackID")] int PassthroughTrackID { get; } /* CMPersistentTrackID = int32_t */ - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BindAs (typeof (int []))] [Export ("requiredSourceSampleDataTrackIDs")] /* CMPersistentTrackID = int32_t */ NSNumber [] RequiredSourceSampleDataTrackIds { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVVideoCompositionInstruction))] interface AVMutableVideoCompositionInstruction { @@ -9325,13 +9544,12 @@ interface AVMutableVideoCompositionInstruction { [Static, Export ("videoCompositionInstruction")] AVVideoCompositionInstruction Create (); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BindAs (typeof (int []))] [Export ("requiredSourceSampleDataTrackIDs", ArgumentSemantic.Copy)] NSNumber [] RequiredSourceSampleDataTrackIds { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVVideoCompositionLayerInstruction : NSSecureCoding, NSMutableCopying { @@ -9349,7 +9567,6 @@ interface AVVideoCompositionLayerInstruction : NSSecureCoding, NSMutableCopying bool GetCrop (CMTime time, ref CGRect startCropRectangle, ref CGRect endCropRectangle, ref CMTimeRange timeRange); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVVideoCompositionLayerInstruction))] interface AVMutableVideoCompositionLayerInstruction { @@ -9385,7 +9602,6 @@ interface AVMutableVideoCompositionLayerInstruction { void SetCrop (CGRect cropRectangle, CMTime time); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVVideoCompositionCoreAnimationTool { @@ -9403,7 +9619,6 @@ interface AVVideoCompositionCoreAnimationTool { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCameraCalibrationData { @@ -9430,7 +9645,6 @@ interface AVCameraCalibrationData { } /// Provides data for the event. - [NoWatch] [MacCatalyst (13, 1)] interface AVCaptureSessionRuntimeErrorEventArgs { [Export ("AVCaptureSessionErrorKey")] @@ -9439,7 +9653,6 @@ interface AVCaptureSessionRuntimeErrorEventArgs { /// [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [BaseType (typeof (NSObject))] interface AVCaptureSession { @@ -9628,30 +9841,73 @@ interface AVCaptureSession { [Export ("removeConnection:")] void RemoveConnection (AVCaptureConnection connection); - [NoWatch, NoTV, iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("connections")] AVCaptureConnection [] Connections { get; } - [NoWatch, NoTV, NoMac, NoMacCatalyst] + [NoMac, NoMacCatalyst] [iOS (16, 0)] [Export ("multitaskingCameraAccessEnabled")] bool MultitaskingCameraAccessEnabled { [Bind ("isMultitaskingCameraAccessEnabled")] get; set; } - [NoWatch, NoTV, NoMac, NoMacCatalyst] + [NoMac, NoMacCatalyst] [iOS (16, 0)] [Export ("multitaskingCameraAccessSupported")] bool MultitaskingCameraAccessSupported { [Bind ("isMultitaskingCameraAccessSupported")] get; } - [NoWatch, NoTV, NoMac] + [NoMac] [iOS (16, 0), MacCatalyst (16, 0)] [Export ("hardwareCost")] float HardwareCost { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("supportsControls")] + bool SupportsControls { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("maxControlsCount")] + nint MaxControlsCount { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("setControlsDelegate:queue:")] + void SetControlsDelegate ([NullAllowed] IAVCaptureSessionControlsDelegate controlsDelegate, [NullAllowed] DispatchQueue controlsDelegateCallbackQueue); + + [Wrap ("WeakControlsDelegate")] + IAVCaptureSessionControlsDelegate ControlsDelegate { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [NullAllowed, Export ("controlsDelegate")] + NSObject WeakControlsDelegate { get; } + + [NullAllowed] + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("controlsDelegateCallbackQueue")] + DispatchQueue ControlsDelegateCallbackQueue { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("controls")] + AVCaptureControl [] Controls { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("canAddControl:")] + bool CanAddControl (AVCaptureControl control); + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("addControl:")] + void AddControl (AVCaptureControl control); + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("removeControl:")] + void RemoveControl (AVCaptureControl control); + + [TV (18, 0), NoMac, MacCatalyst (18, 0), iOS (18, 0)] + [Export ("configuresApplicationAudioSessionToMixWithOthers")] + bool ConfiguresApplicationAudioSessionToMixWithOthers { get; set; } } /// [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [BaseType (typeof (NSObject))] interface AVCaptureConnection { @@ -9703,6 +9959,10 @@ interface AVCaptureConnection { [Export ("isVideoMirroringSupported")] bool SupportsVideoMirroring { get; } + [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'IsVideoRotationAngleSupported' instead.")] + [Deprecated (PlatformName.iOS, 17, 0, message: "Use 'IsVideoRotationAngleSupported' instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use 'IsVideoRotationAngleSupported' instead.")] + [Deprecated (PlatformName.TvOS, 17, 0, message: "Use 'IsVideoRotationAngleSupported' instead.")] [Export ("isVideoOrientationSupported")] bool SupportsVideoOrientation { get; } @@ -9790,12 +10050,12 @@ interface AVCaptureConnection { [Export ("videoFieldMode")] AVVideoFieldMode VideoFieldMode { get; set; } - [NoMac, NoWatch] + [NoMac] [MacCatalyst (14, 0)] [Export ("cameraIntrinsicMatrixDeliverySupported")] bool CameraIntrinsicMatrixDeliverySupported { [Bind ("isCameraIntrinsicMatrixDeliverySupported")] get; } - [NoMac, NoWatch] + [NoMac] [MacCatalyst (14, 0)] [Export ("cameraIntrinsicMatrixDeliveryEnabled")] bool CameraIntrinsicMatrixDeliveryEnabled { [Bind ("isCameraIntrinsicMatrixDeliveryEnabled")] get; set; } @@ -9806,14 +10066,13 @@ interface AVCaptureConnection { [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), TV (17, 0)] [Export ("videoRotationAngle")] - nfloat VideoRotationAngle { get; } + nfloat VideoRotationAngle { get; set; } } /// An audio channel in a capture connection. /// /// Apple documentation for AVCaptureAudioChannel [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [BaseType (typeof (NSObject))] interface AVCaptureAudioChannel { @@ -9836,7 +10095,6 @@ interface AVCaptureAudioChannel { /// /// Apple documentation for AVCaptureInput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSGenericException Reason: Cannot instantiate AVCaptureInput because it is an abstract superclass. @@ -9854,7 +10112,6 @@ interface AVCaptureInput { /// /// Apple documentation for AVCaptureInputPort [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -9897,7 +10154,7 @@ interface IAVCaptureDepthDataOutputDelegate { } /// Delegate for receiving captured depth data. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoMac] + [TV (17, 0), NoMac] [Protocol, Model] [BaseType (typeof (NSObject))] interface AVCaptureDepthDataOutputDelegate { @@ -9910,7 +10167,7 @@ interface AVCaptureDepthDataOutputDelegate { /// Captures depth information for scenes. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoMac] + [TV (17, 0), NoMac] [BaseType (typeof (AVCaptureOutput))] interface AVCaptureDepthDataOutput { [Export ("setDelegate:callbackQueue:")] @@ -9937,8 +10194,7 @@ interface AVCaptureDepthDataOutput { /// /// Apple documentation for AVCaptureDeviceInput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (AVCaptureInput))] // crash application if 'init' is called [DisableDefaultCtor] @@ -9953,7 +10209,7 @@ interface AVCaptureDeviceInput { [Export ("initWithDevice:error:")] NativeHandle Constructor (AVCaptureDevice device, out NSError error); - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("unifiedAutoExposureDefaultsEnabled")] bool UnifiedAutoExposureDefaultsEnabled { get; set; } @@ -9967,9 +10223,25 @@ interface AVCaptureDeviceInput { [MacCatalyst (14, 0)] [Export ("videoMinFrameDurationOverride", ArgumentSemantic.Assign)] CMTime VideoMinFrameDurationOverride { get; set; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("isMultichannelAudioModeSupported:")] + bool IsMultichannelAudioModeSupported (AVCaptureMultichannelAudioMode multichannelAudioMode); + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("multichannelAudioMode", ArgumentSemantic.Assign)] + AVCaptureMultichannelAudioMode MultichannelAudioMode { get; set; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("windNoiseRemovalSupported")] + bool WindNoiseRemovalSupported { [Bind ("isWindNoiseRemovalSupported")] get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("windNoiseRemovalEnabled")] + bool WindNoiseRemovalEnabled { [Bind ("isWindNoiseRemovalEnabled")] get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] interface AVCaptureDeviceInputSource { [Export ("inputSourceID")] @@ -9979,7 +10251,7 @@ interface AVCaptureDeviceInputSource { string LocalizedName { get; } } - [NoiOS, NoWatch, NoTV, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (AVCaptureFileOutput))] interface AVCaptureAudioFileOutput { [Export ("metadata", ArgumentSemantic.Copy)] @@ -9999,7 +10271,7 @@ interface AVCaptureAudioFileOutput { void StartRecording (NSUrl outputFileUrl, string fileType, IAVCaptureFileOutputRecordingDelegate recordingDelegate); } - [NoiOS, NoWatch, NoTV, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (AVCaptureOutput))] interface AVCaptureAudioPreviewOutput { [Export ("outputDeviceUniqueID", ArgumentSemantic.Copy), NullAllowed] @@ -10009,7 +10281,7 @@ interface AVCaptureAudioPreviewOutput { float Volume { get; set; } /* float, not CGFloat */ } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] interface AVAssetExportPresetApple { @@ -10058,7 +10330,6 @@ interface AVAssetExportPresetApple { /// /// Apple documentation for AVCaptureOutput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [BaseType (typeof (NSObject))] #if NET @@ -10089,7 +10360,7 @@ interface AVCaptureOutput { AVMetadataObject GetTransformedMetadataObject (AVMetadataObject metadataObject, AVCaptureConnection connection); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (AVCaptureInput))] interface AVCaptureScreenInput { [Export ("initWithDisplayID:")] @@ -10119,7 +10390,6 @@ interface AVCaptureScreenInput { /// /// Apple documentation for AVCaptureVideoPreviewLayer [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (17, 0)] [BaseType (typeof (CALayer))] interface AVCaptureVideoPreviewLayer { @@ -10216,7 +10486,7 @@ interface AVCaptureVideoPreviewLayer { [Export ("layerWithSessionWithNoConnection:")] AVCaptureVideoPreviewLayer CreateWithNoConnection (AVCaptureSession session); - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("previewing")] bool Previewing { [Bind ("isPreviewing")] get; } @@ -10226,8 +10496,7 @@ interface AVCaptureVideoPreviewLayer { /// /// Apple documentation for AVCaptureVideoDataOutput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV] - [NoWatch] + [TV (17, 0)] [BaseType (typeof (AVCaptureOutput))] interface AVCaptureVideoDataOutput { [NullAllowed, Export ("sampleBufferDelegate")] @@ -10301,15 +10570,26 @@ interface AVCaptureVideoDataOutput { [return: NullAllowed] AVPlayerItemVideoOutputSettings GetRecommendedVideoSettings (string videoCodecType, string outputFileType); - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("automaticallyConfiguresOutputBufferDimensions")] bool AutomaticallyConfiguresOutputBufferDimensions { get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("deliversPreviewSizedOutputBuffers")] bool DeliversPreviewSizedOutputBuffers { get; set; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType:outputFileURL:")] + [return: NullAllowed] + NSDictionary GetRecommendedVideoSettings (string videoCodecType, string outputFileType, [NullAllowed] NSUrl outputFileUrl); + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Wrap ("new AVPlayerItemVideoOutputSettings (GetRecommendedVideoSettings ((string) videoCodecType.GetConstant (), (string) outputFileType.GetConstant (), outputFileUrl)!)")] + [return: NullAllowed] + AVPlayerItemVideoOutputSettings GetRecommendedVideoSettings ([BindAs (typeof (AVVideoCodecType))] NSString videoCodecType, [BindAs (typeof (AVFileTypes))] NSString outputFileType, [NullAllowed] NSUrl outputFileUrl); + } /// Delegate class used to notify when a sample buffer has been written. @@ -10326,8 +10606,7 @@ interface AVCaptureVideoDataOutput { /// /// Apple documentation for AVCaptureVideoDataOutputSampleBufferDelegate [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -10352,8 +10631,7 @@ interface IAVCaptureVideoDataOutputSampleBufferDelegate { } /// /// Apple documentation for AVCaptureAudioDataOutput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (AVCaptureOutput))] interface AVCaptureAudioDataOutput { [NullAllowed, Export ("sampleBufferDelegate")] @@ -10397,8 +10675,7 @@ interface AVCaptureAudioDataOutput { /// /// Apple documentation for AVCaptureAudioDataOutputSampleBufferDelegate [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -10412,8 +10689,7 @@ interface AVCaptureAudioDataOutputSampleBufferDelegate { /// Apple documentation for AVCaptureBracketedStillImageSettings [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoMac] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] [Abstract] @@ -10425,8 +10701,7 @@ interface AVCaptureBracketedStillImageSettings { /// /// Apple documentation for AVCaptureManualExposureBracketedStillImageSettings [NoMac] - [NoWatch] - [NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVCaptureBracketedStillImageSettings))] [DisableDefaultCtor] @@ -10445,8 +10720,8 @@ interface AVCaptureManualExposureBracketedStillImageSettings { /// New instances are typically created with the  factory method. /// Apple documentation for AVCaptureAutoExposureBracketedStillImageSettings [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoMac] - [NoTV] + [NoMac] + [TV (17, 0)] [BaseType (typeof (AVCaptureBracketedStillImageSettings))] [DisableDefaultCtor] interface AVCaptureAutoExposureBracketedStillImageSettings { @@ -10477,7 +10752,6 @@ interface IAVCaptureFileOutputRecordingDelegate { } /// /// Apple documentation for AVCaptureFileOutput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [BaseType (typeof (AVCaptureOutput))] // Objective-C exception thrown. Name: NSGenericException Reason: Cannot instantiate AVCaptureFileOutput because it is an abstract superclass. [DisableDefaultCtor] @@ -10520,7 +10794,6 @@ interface AVCaptureFileOutput { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("delegate", ArgumentSemantic.Assign), NullAllowed] IAVCaptureFileOutputDelegate Delegate { get; set; } @@ -10539,7 +10812,6 @@ interface AVCaptureFileOutput { [Model] [Protocol] [TV (17, 0)] - [NoWatch] [MacCatalyst (13, 1)] interface AVCaptureFileOutputRecordingDelegate { [Export ("captureOutput:didStartRecordingToOutputFileAtURL:fromConnections:")] @@ -10570,9 +10842,8 @@ interface AVCaptureFileOutputRecordingDelegate { /// /// Apple documentation for AVCaptureMetadataOutput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] - [NoMac] + [TV (17, 0)] + [Mac (13, 0)] [BaseType (typeof (AVCaptureOutput))] interface AVCaptureMetadataOutput { [NullAllowed, Export ("metadataObjectsDelegate")] @@ -10607,9 +10878,8 @@ interface IAVCaptureMetadataOutputObjectsDelegate { } /// A delegate object that allows the application developer to respond to the arrival of metadata capture objects. /// /// Apple documentation for AVCaptureMetadataOutputObjectsDelegate - [NoWatch] - [NoTV] - [NoMac] + [TV (17, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -10619,7 +10889,7 @@ interface AVCaptureMetadataOutputObjectsDelegate { void DidOutputMetadataObjects (AVCaptureMetadataOutput captureOutput, AVMetadataObject [] metadataObjects, AVCaptureConnection connection); } - [NoTV, NoWatch] + [TV (17, 0)] [MacCatalyst (13, 1)] [Internal] [Static] @@ -10636,7 +10906,7 @@ interface AVCapturePhotoSettingsThumbnailFormatKeys { /// A raw format for an embedded thumbnail image. - [NoTV, NoWatch] + [TV (17, 0)] [MacCatalyst (13, 1)] [StrongDictionary ("AVCapturePhotoSettingsThumbnailFormatKeys")] interface AVCapturePhotoSettingsThumbnailFormat { @@ -10649,8 +10919,7 @@ interface AVCapturePhotoSettingsThumbnailFormat { /// /// Apple documentation for AVCapturePhotoSettings [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCapturePhotoSettings : NSCopying { @@ -10695,11 +10964,13 @@ interface AVCapturePhotoSettings : NSCopying { [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'PhotoQualityPrioritization' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PhotoQualityPrioritization' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'PhotoQualityPrioritization' instead.")] [Export ("autoStillImageStabilizationEnabled")] bool IsAutoStillImageStabilizationEnabled { [Bind ("isAutoStillImageStabilizationEnabled")] get; set; } [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")] [Deprecated (PlatformName.MacOSX, 13, 0, message: "Use 'MaxPhotoDimensions' instead.")] [Export ("highResolutionPhotoEnabled")] bool IsHighResolutionPhotoEnabled { [Bind ("isHighResolutionPhotoEnabled")] get; set; } @@ -10733,6 +11004,7 @@ interface AVCapturePhotoSettings : NSCopying { [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'VirtualDeviceConstituentPhotoDeliveryEnabled' instead.")] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'VirtualDeviceConstituentPhotoDeliveryEnabled' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'VirtualDeviceConstituentPhotoDeliveryEnabled' instead.")] [Export ("dualCameraDualPhotoDeliveryEnabled")] bool DualCameraDualPhotoDeliveryEnabled { [Bind ("isDualCameraDualPhotoDeliveryEnabled")] get; set; } @@ -10787,23 +11059,23 @@ interface AVCapturePhotoSettings : NSCopying { NSDictionary EmbeddedThumbnailPhotoFormat { get; set; } #endif - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("portraitEffectsMatteDeliveryEnabled")] bool PortraitEffectsMatteDeliveryEnabled { [Bind ("isPortraitEffectsMatteDeliveryEnabled")] get; set; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("embedsPortraitEffectsMatteInPhoto")] bool EmbedsPortraitEffectsMatteInPhoto { get; set; } [BindAs (typeof (AVVideoCodecType []))] - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("availableRawEmbeddedThumbnailPhotoCodecTypes")] NSString [] AvailableRawEmbeddedThumbnailPhotoCodecTypes { get; } - [NoWatch, NoTV, NoMac] + [TV (17, 0), NoMac] [MacCatalyst (14, 0)] [NullAllowed, Export ("rawEmbeddedThumbnailPhotoFormat", ArgumentSemantic.Copy)] NSDictionary WeakRawEmbeddedThumbnailPhotoFormat { get; set; } @@ -10813,33 +11085,33 @@ interface AVCapturePhotoSettings : NSCopying { [Wrap ("WeakRawEmbeddedThumbnailPhotoFormat")] AVCapturePhotoSettingsThumbnailFormat RawEmbeddedThumbnailPhotoFormat { get; set; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("autoRedEyeReductionEnabled")] bool AutoRedEyeReductionEnabled { [Bind ("isAutoRedEyeReductionEnabled")] get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [Mac (13, 0), iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("photoQualityPrioritization", ArgumentSemantic.Assign)] AVCapturePhotoQualityPrioritization PhotoQualityPrioritization { get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("embedsSemanticSegmentationMattesInPhoto")] bool EmbedsSemanticSegmentationMattesInPhoto { get; set; } [BindAs (typeof (AVSemanticSegmentationMatteType []))] - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("enabledSemanticSegmentationMatteTypes", ArgumentSemantic.Assign)] NSString [] EnabledSemanticSegmentationMatteTypes { get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("virtualDeviceConstituentPhotoDeliveryEnabledDevices", ArgumentSemantic.Copy)] AVCaptureDevice [] VirtualDeviceConstituentPhotoDeliveryEnabledDevices { get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("autoVirtualDeviceFusionEnabled")] bool AutoVirtualDeviceFusionEnabled { [Bind ("isAutoVirtualDeviceFusionEnabled")] get; set; } @@ -10855,14 +11127,30 @@ interface AVCapturePhotoSettings : NSCopying { [Mac (13, 0)] [Export ("maxPhotoDimensions")] CMVideoDimensions MaxPhotoDimensions { get; set; } + + [NullAllowed] + [TV (18, 0), NoMac, MacCatalyst (18, 0), iOS (18, 0)] + [Export ("rawFileFormat", ArgumentSemantic.Copy)] + NSDictionary RawFileFormat { get; set; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("constantColorEnabled")] + bool ConstantColorEnabled { [Bind ("isConstantColorEnabled")] get; set; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("constantColorFallbackPhotoDeliveryEnabled")] + bool ConstantColorFallbackPhotoDeliveryEnabled { [Bind ("isConstantColorFallbackPhotoDeliveryEnabled")] get; set; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("shutterSoundSuppressionEnabled")] + bool ShutterSoundSuppressionEnabled { [Bind ("isShutterSoundSuppressionEnabled")] get; set; } } /// Contains settings for capturing bracketed images. /// /// Apple documentation for AVCapturePhotoBracketSettings [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV, NoMac] + [TV (17, 0), NoMac] [BaseType (typeof (AVCapturePhotoSettings))] [DisableDefaultCtor] interface AVCapturePhotoBracketSettings { @@ -10886,8 +11174,7 @@ interface AVCapturePhotoBracketSettings { /// /// Apple documentation for AVCaptureResolvedPhotoSettings [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptureResolvedPhotoSettings { @@ -10910,6 +11197,7 @@ interface AVCaptureResolvedPhotoSettings { bool IsFlashEnabled { [Bind ("isFlashEnabled")] get; } [NoMac] + [NoTV] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'AVCaptureResolvedPhotoSettings.PhotoProcessingTimeRange' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCaptureResolvedPhotoSettings.PhotoProcessingTimeRange' instead.")] @@ -10930,32 +11218,32 @@ interface AVCaptureResolvedPhotoSettings { [Export ("expectedPhotoCount")] nuint ExpectedPhotoCount { get; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("portraitEffectsMatteDimensions")] CMVideoDimensions PortraitEffectsMatteDimensions { get; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("rawEmbeddedThumbnailDimensions")] CMVideoDimensions RawEmbeddedThumbnailDimensions { get; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("redEyeReductionEnabled")] bool RedEyeReductionEnabled { [Bind ("isRedEyeReductionEnabled")] get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("dimensionsForSemanticSegmentationMatteOfType:")] CMVideoDimensions GetDimensions ([BindAs (typeof (AVSemanticSegmentationMatteType))] NSString semanticSegmentationMatteType); - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("photoProcessingTimeRange")] CMTimeRange PhotoProcessingTimeRange { get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("virtualDeviceFusionEnabled")] bool VirtualDeviceFusionEnabled { [Bind ("isVirtualDeviceFusionEnabled")] get; } @@ -10965,6 +11253,14 @@ interface AVCaptureResolvedPhotoSettings { [NoMac] [Export ("contentAwareDistortionCorrectionEnabled")] bool ContentAwareDistortionCorrectionEnabled { [Bind ("isContentAwareDistortionCorrectionEnabled")] get; } + + [NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] + [Export ("deferredPhotoProxyDimensions")] + CMVideoDimensions DeferredPhotoProxyDimensions { get; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("fastCapturePrioritizationEnabled")] + bool FastCapturePrioritizationEnabled { [Bind ("isFastCapturePrioritizationEnabled")] get; } } @@ -10980,8 +11276,7 @@ interface IAVCapturePhotoCaptureDelegate { } /// /// Apple documentation for AVCapturePhotoCaptureDelegate [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [Protocol, Model] [BaseType (typeof (NSObject))] interface AVCapturePhotoCaptureDelegate { @@ -10994,14 +11289,14 @@ interface AVCapturePhotoCaptureDelegate { [Export ("captureOutput:didCapturePhotoForResolvedSettings:")] void DidCapturePhoto (AVCapturePhotoOutput captureOutput, AVCaptureResolvedPhotoSettings resolvedSettings); - [NoMac] + [NoMac, NoTV] [Deprecated (PlatformName.iOS, 11, 0, message: "Use the 'DidFinishProcessingPhoto' overload accepting a 'AVCapturePhoto' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the 'DidFinishProcessingPhoto' overload accepting a 'AVCapturePhoto' instead.")] [Export ("captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:")] void DidFinishProcessingPhoto (AVCapturePhotoOutput captureOutput, [NullAllowed] CMSampleBuffer photoSampleBuffer, [NullAllowed] CMSampleBuffer previewPhotoSampleBuffer, AVCaptureResolvedPhotoSettings resolvedSettings, [NullAllowed] AVCaptureBracketedStillImageSettings bracketSettings, [NullAllowed] NSError error); - [NoMac] + [NoMac, NoTV] [Deprecated (PlatformName.iOS, 11, 0, message: "Use the 'DidFinishProcessingPhoto' overload accepting a 'AVCapturePhoto' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the 'DidFinishProcessingPhoto' overload accepting a 'AVCapturePhoto' instead.")] @@ -11024,14 +11319,18 @@ interface AVCapturePhotoCaptureDelegate { [Export ("captureOutput:didFinishCaptureForResolvedSettings:error:")] void DidFinishCapture (AVCapturePhotoOutput captureOutput, AVCaptureResolvedPhotoSettings resolvedSettings, [NullAllowed] NSError error); + + [NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] + [Export ("captureOutput:didFinishCapturingDeferredPhotoProxy:error:")] + void DidFinishCapturingDeferredPhotoProxy (AVCapturePhotoOutput output, [NullAllowed] AVCaptureDeferredPhotoProxy deferredPhotoProxy, [NullAllowed] NSError error); + } /// Provides an interface for capturing still images, Live Photos, RAW capture, wide-gamut color, and bracketed images. /// /// Apple documentation for AVCapturePhotoOutput [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (AVCaptureOutput))] interface AVCapturePhotoOutput { [Export ("capturePhotoWithSettings:delegate:")] @@ -11044,23 +11343,23 @@ interface AVCapturePhotoOutput { string [] AvailablePhotoCodecTypes { get; } [Introduced (PlatformName.MacCatalyst, 14, 3)] - [NoWatch, NoTV, NoMac, iOS (14, 3)] + [NoMac, iOS (14, 3)] [Export ("appleProRAWSupported")] bool AppleProRawSupported { [Bind ("isAppleProRAWSupported")] get; } [Introduced (PlatformName.MacCatalyst, 14, 3)] - [NoWatch, NoTV, NoMac, iOS (14, 3)] + [NoMac, iOS (14, 3)] [Export ("appleProRAWEnabled")] bool AppleProRawEnabled { [Bind ("isAppleProRAWEnabled")] get; set; } [Introduced (PlatformName.MacCatalyst, 14, 3)] - [NoWatch, NoTV, NoMac, iOS (14, 3)] + [NoMac, iOS (14, 3)] [Static] [Export ("isBayerRAWPixelFormat:")] bool IsBayerRawPixelFormat (CVPixelFormatType pixelFormat); [Introduced (PlatformName.MacCatalyst, 14, 3)] - [NoWatch, NoTV, NoMac, iOS (14, 3)] + [NoMac, iOS (14, 3)] [Static] [Export ("isAppleProRAWPixelFormat:")] bool IsAppleProRawPixelFormat (CVPixelFormatType pixelFormat); @@ -11074,6 +11373,7 @@ interface AVCapturePhotoOutput { [NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'MaxPhotoQualityPrioritization' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'MaxPhotoQualityPrioritization' instead.")] [Export ("stillImageStabilizationSupported")] bool IsStillImageStabilizationSupported { [Bind ("isStillImageStabilizationSupported")] get; } @@ -11081,10 +11381,11 @@ interface AVCapturePhotoOutput { [NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'MaxPhotoQualityPrioritization' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'MaxPhotoQualityPrioritization' instead.")] [Export ("isStillImageStabilizationScene")] bool IsStillImageStabilizationScene { get; } - [NoMac] + [Mac (13, 0)] [MacCatalyst (13, 1)] #if NET [BindAs (typeof (AVCaptureFlashMode []))] @@ -11104,6 +11405,7 @@ interface AVCapturePhotoOutput { [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'MaxPhotoDimensions' instead.")] [Deprecated (PlatformName.MacOSX, 13, 0, message: "Use 'MaxPhotoDimensions' instead.")] [MacCatalyst (13, 1)] [Export ("highResolutionCaptureEnabled")] @@ -11143,6 +11445,7 @@ interface AVCapturePhotoOutput { [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'AVCapturePhoto.FileDataRepresentation' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCapturePhoto.FileDataRepresentation' instead.")] + [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'AVCapturePhoto.FileDataRepresentation' instead.")] [Static] [Export ("JPEGPhotoDataRepresentationForJPEGSampleBuffer:previewPhotoSampleBuffer:")] [return: NullAllowed] @@ -11152,6 +11455,7 @@ interface AVCapturePhotoOutput { [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'AVCapturePhoto.FileDataRepresentation' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCapturePhoto.FileDataRepresentation' instead.")] + [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'AVCapturePhoto.FileDataRepresentation' instead.")] [Static] [Export ("DNGPhotoDataRepresentationForRawSampleBuffer:previewPhotoSampleBuffer:")] [return: NullAllowed] @@ -11172,6 +11476,7 @@ interface AVCapturePhotoOutput { [NoMac] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'VirtualDeviceFusionSupported' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'VirtualDeviceFusionSupported' instead.")] [Export ("dualCameraFusionSupported")] bool DualCameraFusionSupported { [Bind ("isDualCameraFusionSupported")] get; } @@ -11230,6 +11535,7 @@ interface AVCapturePhotoOutput { [NoMac] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'VirtualDeviceConstituentPhotoDeliverySupported' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'VirtualDeviceConstituentPhotoDeliverySupported' instead.")] [Export ("dualCameraDualPhotoDeliverySupported")] bool DualCameraDualPhotoDeliverySupported { [Bind ("isDualCameraDualPhotoDeliverySupported")] get; } @@ -11237,6 +11543,7 @@ interface AVCapturePhotoOutput { [NoMac] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'VirtualDeviceConstituentPhotoDeliveryEnabledDevices' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'VirtualDeviceConstituentPhotoDeliveryEnabledDevices' instead.")] [Export ("dualCameraDualPhotoDeliveryEnabled")] bool DualCameraDualPhotoDeliveryEnabled { [Bind ("isDualCameraDualPhotoDeliveryEnabled")] get; set; } @@ -11250,49 +11557,49 @@ interface AVCapturePhotoOutput { [Export ("cameraCalibrationDataDeliverySupported")] bool CameraCalibrationDataDeliverySupported { [Bind ("isCameraCalibrationDataDeliverySupported")] get; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("portraitEffectsMatteDeliverySupported")] bool PortraitEffectsMatteDeliverySupported { [Bind ("isPortraitEffectsMatteDeliverySupported")] get; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("portraitEffectsMatteDeliveryEnabled")] bool PortraitEffectsMatteDeliveryEnabled { [Bind ("isPortraitEffectsMatteDeliveryEnabled")] get; set; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("autoRedEyeReductionSupported")] bool AutoRedEyeReductionSupported { [Bind ("isAutoRedEyeReductionSupported")] get; } [BindAs (typeof (AVSemanticSegmentationMatteType []))] - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("availableSemanticSegmentationMatteTypes")] NSString [] AvailableSemanticSegmentationMatteTypes { get; } [BindAs (typeof (AVSemanticSegmentationMatteType []))] - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("enabledSemanticSegmentationMatteTypes", ArgumentSemantic.Assign)] NSString [] EnabledSemanticSegmentationMatteTypes { get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [Mac (13, 0), iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("maxPhotoQualityPrioritization", ArgumentSemantic.Assign)] AVCapturePhotoQualityPrioritization MaxPhotoQualityPrioritization { get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("virtualDeviceFusionSupported")] bool VirtualDeviceFusionSupported { [Bind ("isVirtualDeviceFusionSupported")] get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("virtualDeviceConstituentPhotoDeliverySupported")] bool VirtualDeviceConstituentPhotoDeliverySupported { [Bind ("isVirtualDeviceConstituentPhotoDeliverySupported")] get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("virtualDeviceConstituentPhotoDeliveryEnabled")] bool VirtualDeviceConstituentPhotoDeliveryEnabled { [Bind ("isVirtualDeviceConstituentPhotoDeliveryEnabled")] get; set; } @@ -11320,6 +11627,64 @@ interface AVCapturePhotoOutput { [Mac (13, 0)] [Export ("preservesLivePhotoCaptureSuspendedOnSessionStop")] bool PreservesLivePhotoCaptureSuspendedOnSessionStop { get; set; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("zeroShutterLagSupported")] + bool ZeroShutterLagSupported { [Bind ("isZeroShutterLagSupported")] get; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("zeroShutterLagEnabled")] + bool ZeroShutterLagEnabled { [Bind ("isZeroShutterLagEnabled")] get; set; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("responsiveCaptureSupported")] + bool ResponsiveCaptureSupported { [Bind ("isResponsiveCaptureSupported")] get; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("responsiveCaptureEnabled")] + bool ResponsiveCaptureEnabled { [Bind ("isResponsiveCaptureEnabled")] get; set; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("captureReadiness")] + AVCapturePhotoOutputCaptureReadiness CaptureReadiness { get; } + + [NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] + [Export ("autoDeferredPhotoDeliverySupported")] + bool AutoDeferredPhotoDeliverySupported { [Bind ("isAutoDeferredPhotoDeliverySupported")] get; } + + [NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] + [Export ("autoDeferredPhotoDeliveryEnabled")] + bool AutoDeferredPhotoDeliveryEnabled { [Bind ("isAutoDeferredPhotoDeliveryEnabled")] get; set; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("fastCapturePrioritizationSupported")] + bool FastCapturePrioritizationSupported { [Bind ("isFastCapturePrioritizationSupported")] get; set; } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("fastCapturePrioritizationEnabled")] + bool FastCapturePrioritizationEnabled { [Bind ("isFastCapturePrioritizationEnabled")] get; set; } + + [TV (18, 0), NoMac, MacCatalyst (18, 0), iOS (18, 0)] + [Export ("supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType:")] + [return: BindAs (typeof (AVVideoCodecType []))] + NSString [] GetSupportedRawPhotoCodecTypes (CVPixelFormatType rawPixelFormatType, [BindAs (typeof (AVFileTypes))] NSString fileType); + + [TV (18, 0), NoMac, MacCatalyst (18, 0), iOS (18, 0)] + [Export ("availableRawPhotoCodecTypes")] + [BindAs (typeof (AVVideoCodecType []))] + NSString [] AvailableRawPhotoCodecTypes { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("constantColorSupported")] + bool ConstantColorSupported { [Bind ("isConstantColorSupported")] get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("constantColorEnabled")] + bool ConstantColorEnabled { [Bind ("isConstantColorEnabled")] get; set; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("shutterSoundSuppressionSupported")] + bool ShutterSoundSuppressionSupported { [Bind ("isShutterSoundSuppressionSupported")] get; } } /// A type of that captures data to a QuickTime movie. @@ -11327,8 +11692,7 @@ interface AVCapturePhotoOutput { /// Apple documentation for AVCaptureMovieFileOutput [Introduced (PlatformName.MacCatalyst, 14, 0)] [BaseType (typeof (AVCaptureFileOutput))] - [NoTV] - [NoWatch] + [TV (17, 0)] interface AVCaptureMovieFileOutput { [NullAllowed] // by default this property is null [Export ("metadata", ArgumentSemantic.Copy)] @@ -11360,36 +11724,44 @@ interface AVCaptureMovieFileOutput { [Export ("setOutputSettings:forConnection:")] void SetOutputSettings ([NullAllowed] NSDictionary outputSettings, AVCaptureConnection connection); - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("supportedOutputSettingsKeysForConnection:")] string [] GetSupportedOutputSettingsKeys (AVCaptureConnection connection); - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("primaryConstituentDeviceSwitchingBehaviorForRecordingEnabled")] bool PrimaryConstituentDeviceSwitchingBehaviorForRecordingEnabled { [Bind ("isPrimaryConstituentDeviceSwitchingBehaviorForRecordingEnabled")] get; set; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("setPrimaryConstituentDeviceSwitchingBehaviorForRecording:restrictedSwitchingBehaviorConditions:")] void SetPrimaryConstituentDeviceSwitchingBehaviorForRecording (AVCapturePrimaryConstituentDeviceSwitchingBehavior switchingBehavior, AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions restrictedSwitchingBehaviorConditions); - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("primaryConstituentDeviceSwitchingBehaviorForRecording")] AVCapturePrimaryConstituentDeviceSwitchingBehavior PrimaryConstituentDeviceSwitchingBehaviorForRecording { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("primaryConstituentDeviceRestrictedSwitchingBehaviorConditionsForRecording")] AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions PrimaryConstituentDeviceRestrictedSwitchingBehaviorConditionsForRecording { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("spatialVideoCaptureSupported")] + bool SpatialVideoCaptureSupported { [Bind ("isSpatialVideoCaptureSupported")] get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("spatialVideoCaptureEnabled")] + bool SpatialVideoCaptureEnabled { [Bind ("isSpatialVideoCaptureEnabled")] get; set; } } /// AVCaptureOutput that captures still images with their metadata. /// /// Apple documentation for AVCaptureStillImageOutput [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCapturePhotoOutput' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCapturePhotoOutput' instead.")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'AVCapturePhotoOutput' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'AVCapturePhotoOutput' instead.")] [BaseType (typeof (AVCaptureOutput))] interface AVCaptureStillImageOutput { @@ -11472,7 +11844,7 @@ interface AVCaptureStillImageOutput { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV, NoWatch] + [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // init NS_UNAVAILABLE interface AVCaptureDeviceDiscoverySession { @@ -11499,7 +11871,7 @@ interface AVCaptureDeviceDiscoverySession { /// Enumerates the types of device that can capture audiovisual data. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [TV (17, 0), NoWatch] + [TV (17, 0)] enum AVCaptureDeviceType { [NoTV] @@ -11547,21 +11919,32 @@ enum AVCaptureDeviceType { [Field ("AVCaptureDeviceTypeBuiltInDualWideCamera")] BuiltInDualWideCamera, - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("AVCaptureDeviceTypeExternalUnknown")] ExternalUnknown, - [NoWatch, TV (17, 0), NoMac, MacCatalyst (15, 4), iOS (15, 4)] + [TV (17, 0), NoMac, MacCatalyst (15, 4), iOS (15, 4)] [Field ("AVCaptureDeviceTypeBuiltInLiDARDepthCamera")] BuiltInLiDarDepthCamera, - [NoWatch] [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0), Mac (14, 0)] [Field ("AVCaptureDeviceTypeExternal")] External, + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVCaptureDeviceTypeMicrophone")] + Microphone, + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVCaptureDeviceTypeContinuityCamera")] + ContinuityCamera, + + [NoTV, NoMacCatalyst, NoiOS, Mac (13, 0)] + [Field ("AVCaptureDeviceTypeDeskViewCamera")] + DeskViewCamera, } - [NoTV, NoWatch] // matches API that uses it. + [TV (17, 0)] // matches API that uses it. [MacCatalyst (13, 1)] enum AVAuthorizationMediaType { Video, @@ -11573,60 +11956,51 @@ enum AVAuthorizationMediaType { /// Once a capture session has begun, application developers must bracket configuration changes with calls to and . /// /// Apple documentation for AVCaptureDevice -#if WATCH - [Static] -#endif [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV, Watch (6, 0)] + [TV (17, 0)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Cannot instantiate a AVCaptureDevice directly. [DisableDefaultCtor] interface AVCaptureDevice { - [NoWatch] [MacCatalyst (13, 1)] [Export ("uniqueID")] string UniqueID { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("modelID")] string ModelID { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("localizedName")] string LocalizedName { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("connected")] bool Connected { [Bind ("isConnected")] get; } - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] [Static, Export ("devices")] AVCaptureDevice [] Devices { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'AVCaptureDeviceDiscoverySession' instead.")] [Static] [Export ("devicesWithMediaType:")] AVCaptureDevice [] DevicesWithMediaType (string mediaType); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("defaultDeviceWithMediaType:")] [return: NullAllowed] AVCaptureDevice GetDefaultDevice (NSString mediaType); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Wrap ("GetDefaultDevice (mediaType.GetConstant ()!)")] @@ -11634,7 +12008,6 @@ interface AVCaptureDevice { AVCaptureDevice GetDefaultDevice (AVMediaTypes mediaType); #if !NET - [NoWatch] [Obsolete ("Use 'GetDefaultDevice (AVMediaTypes)'.")] [Static] [Wrap ("GetDefaultDevice ((NSString) mediaType)")] @@ -11642,339 +12015,299 @@ interface AVCaptureDevice { AVCaptureDevice DefaultDeviceWithMediaType (string mediaType); #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("deviceWithUniqueID:")] [return: NullAllowed] AVCaptureDevice DeviceWithUniqueID (string deviceUniqueID); - [NoWatch] [MacCatalyst (13, 1)] [Export ("hasMediaType:")] bool HasMediaType (string mediaType); - [NoWatch] [MacCatalyst (13, 1)] [Wrap ("HasMediaType ((string) mediaType.GetConstant ())")] bool HasMediaType (AVMediaTypes mediaType); - [NoWatch] [MacCatalyst (13, 1)] [Export ("lockForConfiguration:")] bool LockForConfiguration (out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Export ("unlockForConfiguration")] void UnlockForConfiguration (); - [NoWatch] [MacCatalyst (13, 1)] [Export ("supportsAVCaptureSessionPreset:")] bool SupportsAVCaptureSessionPreset (string preset); - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCapturePhotoSettings.FlashMode' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCapturePhotoSettings.FlashMode' instead.")] + [NoTV] [Export ("flashMode")] AVCaptureFlashMode FlashMode { get; set; } - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCapturePhotoOutput.SupportedFlashModes' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCapturePhotoOutput.SupportedFlashModes' instead.")] + [NoTV] [Export ("isFlashModeSupported:")] bool IsFlashModeSupported (AVCaptureFlashMode flashMode); - [NoWatch] [MacCatalyst (13, 1)] [Export ("torchMode", ArgumentSemantic.Assign)] AVCaptureTorchMode TorchMode { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("isTorchModeSupported:")] bool IsTorchModeSupported (AVCaptureTorchMode torchMode); - [NoWatch] [MacCatalyst (13, 1)] [Export ("isFocusModeSupported:")] bool IsFocusModeSupported (AVCaptureFocusMode focusMode); - [NoWatch] [MacCatalyst (13, 1)] [Export ("focusMode", ArgumentSemantic.Assign)] AVCaptureFocusMode FocusMode { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("focusPointOfInterestSupported")] bool FocusPointOfInterestSupported { [Bind ("isFocusPointOfInterestSupported")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("focusPointOfInterest", ArgumentSemantic.Assign)] CGPoint FocusPointOfInterest { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("adjustingFocus")] bool AdjustingFocus { [Bind ("isAdjustingFocus")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("exposureMode", ArgumentSemantic.Assign)] AVCaptureExposureMode ExposureMode { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("isExposureModeSupported:")] bool IsExposureModeSupported (AVCaptureExposureMode exposureMode); - [NoWatch] [MacCatalyst (13, 1)] [Export ("exposurePointOfInterestSupported")] bool ExposurePointOfInterestSupported { [Bind ("isExposurePointOfInterestSupported")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("exposurePointOfInterest")] CGPoint ExposurePointOfInterest { get; set; } - [NoWatch] - [NoTV, NoMac, MacCatalyst (15, 4), iOS (15, 4)] + [NoMac, MacCatalyst (15, 4), iOS (15, 4)] [Export ("automaticallyAdjustsFaceDrivenAutoExposureEnabled")] bool AutomaticallyAdjustsFaceDrivenAutoExposureEnabled { get; set; } - [NoWatch] - [NoTV, NoMac, MacCatalyst (15, 4), iOS (15, 4)] + [NoMac, MacCatalyst (15, 4), iOS (15, 4)] [Export ("faceDrivenAutoExposureEnabled")] bool FaceDrivenAutoExposureEnabled { [Bind ("isFaceDrivenAutoExposureEnabled")] get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("adjustingExposure")] bool AdjustingExposure { [Bind ("isAdjustingExposure")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("isWhiteBalanceModeSupported:")] bool IsWhiteBalanceModeSupported (AVCaptureWhiteBalanceMode whiteBalanceMode); - [NoWatch] [MacCatalyst (13, 1)] [Export ("whiteBalanceMode", ArgumentSemantic.Assign)] AVCaptureWhiteBalanceMode WhiteBalanceMode { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("adjustingWhiteBalance")] bool AdjustingWhiteBalance { [Bind ("isAdjustingWhiteBalance")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("position")] AVCaptureDevicePosition Position { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVCaptureDeviceWasConnectedNotification")] [Notification] NSString WasConnectedNotification { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVCaptureDeviceWasDisconnectedNotification")] [Notification] NSString WasDisconnectedNotification { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("AVCaptureMaxAvailableTorchLevel")] float MaxAvailableTorchLevel { get; } // defined as 'float' - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Field ("AVCaptureDeviceSubjectAreaDidChangeNotification")] [Notification] NSString SubjectAreaDidChangeNotification { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("subjectAreaChangeMonitoringEnabled")] bool SubjectAreaChangeMonitoringEnabled { [Bind ("isSubjectAreaChangeMonitoringEnabled")] get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("isFlashAvailable")] bool FlashAvailable { get; } - [NoWatch, NoMac] + [NoMac] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'AVCapturePhotoOutput.IsFlashScene' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVCapturePhotoOutput.IsFlashScene' instead.")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'AVCapturePhotoOutput.IsFlashScene' instead.")] [Export ("isFlashActive")] bool FlashActive { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("isTorchAvailable")] bool TorchAvailable { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("torchLevel")] float TorchLevel { get; } // defined as 'float' // 6.0 - [NoWatch] [MacCatalyst (13, 1)] [Export ("torchActive")] bool TorchActive { [Bind ("isTorchActive")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("setTorchModeOnWithLevel:error:")] bool SetTorchModeLevel (float /* defined as 'float' */ torchLevel, out NSError outError); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("lowLightBoostSupported")] bool LowLightBoostSupported { [Bind ("isLowLightBoostSupported")] get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("lowLightBoostEnabled")] bool LowLightBoostEnabled { [Bind ("isLowLightBoostEnabled")] get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("automaticallyEnablesLowLightBoostWhenAvailable")] bool AutomaticallyEnablesLowLightBoostWhenAvailable { get; set; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("videoZoomFactor")] nfloat VideoZoomFactor { get; set; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("rampToVideoZoomFactor:withRate:")] void RampToVideoZoom (nfloat factor, float /* float, not CGFloat */ rate); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("rampingVideoZoom")] bool RampingVideoZoom { [Bind ("isRampingVideoZoom")] get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("cancelVideoZoomRamp")] void CancelVideoZoomRamp (); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("autoFocusRangeRestrictionSupported")] bool AutoFocusRangeRestrictionSupported { [Bind ("isAutoFocusRangeRestrictionSupported")] get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("autoFocusRangeRestriction")] AVCaptureAutoFocusRangeRestriction AutoFocusRangeRestriction { get; set; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("smoothAutoFocusSupported")] bool SmoothAutoFocusSupported { [Bind ("isSmoothAutoFocusSupported")] get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Export ("smoothAutoFocusEnabled")] bool SmoothAutoFocusEnabled { [Bind ("isSmoothAutoFocusEnabled")] get; set; } - [NoWatch, NoTV, NoMac, MacCatalyst (15, 4), iOS (15, 4)] + [NoMac, MacCatalyst (15, 4), iOS (15, 4)] [Export ("automaticallyAdjustsFaceDrivenAutoFocusEnabled")] bool AutomaticallyAdjustsFaceDrivenAutoFocusEnabled { get; set; } - [NoWatch, NoTV, NoMac, MacCatalyst (15, 4), iOS (15, 4)] + [NoMac, MacCatalyst (15, 4), iOS (15, 4)] [Export ("faceDrivenAutoFocusEnabled")] bool FaceDrivenAutoFocusEnabled { [Bind ("isFaceDrivenAutoFocusEnabled")] get; set; } // Either AVMediaTypeVideo or AVMediaTypeAudio. - [NoWatch] [MacCatalyst (13, 1)] [Static] [Wrap ("RequestAccessForMediaType (mediaType == AVAuthorizationMediaType.Video ? AVMediaTypes.Video.GetConstant ()! : AVMediaTypes.Audio.GetConstant ()!, completion)")] [Async] void RequestAccessForMediaType (AVAuthorizationMediaType mediaType, AVRequestAccessStatus completion); - [NoWatch] [MacCatalyst (13, 1)] [Static, Export ("requestAccessForMediaType:completionHandler:")] [Async] void RequestAccessForMediaType (NSString avMediaTypeToken, AVRequestAccessStatus completion); // Calling this method with any media type other than AVMediaTypeVideo or AVMediaTypeAudio raises an exception. - [NoWatch] [MacCatalyst (13, 1)] [Static] [Wrap ("GetAuthorizationStatus (mediaType == AVAuthorizationMediaType.Video ? AVMediaTypes.Video.GetConstant ()! : AVMediaTypes.Audio.GetConstant ()!)")] AVAuthorizationStatus GetAuthorizationStatus (AVAuthorizationMediaType mediaType); - [NoWatch] [MacCatalyst (13, 1)] [Static, Export ("authorizationStatusForMediaType:")] AVAuthorizationStatus GetAuthorizationStatus (NSString avMediaTypeToken); - [NoWatch] [MacCatalyst (13, 1)] [Export ("activeFormat", ArgumentSemantic.Retain)] AVCaptureDeviceFormat ActiveFormat { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("formats")] AVCaptureDeviceFormat [] Formats { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("hasFlash")] bool HasFlash { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("hasTorch")] bool HasTorch { get; } - [NoiOS, NoWatch, MacCatalyst (15, 0)] + [NoiOS, MacCatalyst (15, 0)] [Export ("inUseByAnotherApplication")] bool InUseByAnotherApplication { [Bind ("isInUseByAnotherApplication")] get; } - [iOS (14, 0), NoWatch] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("suspended")] bool Suspended { [Bind ("isSuspended")] get; } - [NoiOS, NoWatch, MacCatalyst (15, 0)] + [NoiOS, MacCatalyst (15, 0)] [Export ("linkedDevices")] AVCaptureDevice [] LinkedDevices { get; } - [iOS (14, 0), NoWatch] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("manufacturer")] string Manufacturer { get; } - [NoiOS, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Export ("transportControlsSpeed")] float TransportControlsSpeed { get; } // float intended - [NoiOS, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Export ("transportControlsSupported")] bool TransportControlsSupported { get; } - [NoWatch] [NoiOS] // TODO: We can provide a better binding once IOKit is bound kIOAudioDeviceTransportType* [MacCatalyst (15, 0)] [Export ("transportType")] @@ -11982,195 +12315,187 @@ interface AVCaptureDevice { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [NullAllowed, Export ("activeInputSource", ArgumentSemantic.Retain)] AVCaptureDeviceInputSource ActiveInputSource { get; set; } [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("inputSources")] AVCaptureDeviceInputSource [] InputSources { get; } [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("setTransportControlsPlaybackMode:speed:")] void SetTransportControlsPlaybackMode (AVCaptureDeviceTransportControlsPlaybackMode mode, float speed); // Float intended [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("transportControlsPlaybackMode")] AVCaptureDeviceTransportControlsPlaybackMode TransportControlsPlaybackMode { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("activeVideoMinFrameDuration", ArgumentSemantic.Copy)] CMTime ActiveVideoMinFrameDuration { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("activeVideoMaxFrameDuration", ArgumentSemantic.Copy)] CMTime ActiveVideoMaxFrameDuration { get; set; } - [NoMac, NoWatch] + [NoMac] [MacCatalyst (14, 0)] [Export ("lockingFocusWithCustomLensPositionSupported")] bool LockingFocusWithCustomLensPositionSupported { [Bind ("isLockingFocusWithCustomLensPositionSupported")] get; } - [NoMac, NoWatch] + [NoMac] [MacCatalyst (14, 0)] [Export ("lockingWhiteBalanceWithCustomDeviceGainsSupported")] bool LockingWhiteBalanceWithCustomDeviceGainsSupported { [Bind ("isLockingWhiteBalanceWithCustomDeviceGainsSupported")] get; } // From AVCaptureDevice (AVCaptureDeviceType) Category [Internal] - [NoWatch] [MacCatalyst (14, 0)] [Export ("deviceType")] NSString _DeviceType { get; } - [NoWatch] [MacCatalyst (14, 0)] [Wrap ("AVCaptureDeviceTypeExtensions.GetValue (_DeviceType)")] AVCaptureDeviceType DeviceType { get; } [Internal] - [NoWatch] [MacCatalyst (14, 0)] [Static] + [return: NullAllowed] [Export ("defaultDeviceWithDeviceType:mediaType:position:")] - AVCaptureDevice _DefaultDeviceWithDeviceType (NSString deviceType, string mediaType, AVCaptureDevicePosition position); + AVCaptureDevice _DefaultDeviceWithDeviceType (NSString deviceType, [NullAllowed] string mediaType, AVCaptureDevicePosition position); - [NoWatch] [MacCatalyst (14, 0)] [Static] + [return: NullAllowed] [Wrap ("AVCaptureDevice._DefaultDeviceWithDeviceType (deviceType.GetConstant ()!, mediaType, position)")] AVCaptureDevice GetDefaultDevice (AVCaptureDeviceType deviceType, string mediaType, AVCaptureDevicePosition position); // // iOS 8 // - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Field ("AVCaptureLensPositionCurrent")] float FocusModeLensPositionCurrent { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("lensAperture")] float LensAperture { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("exposureDuration")] CMTime ExposureDuration { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("ISO")] float ISO { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("exposureTargetOffset")] float ExposureTargetOffset { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("exposureTargetBias")] float ExposureTargetBias { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("minExposureTargetBias")] float MinExposureTargetBias { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("maxExposureTargetBias")] float MaxExposureTargetBias { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("setExposureModeCustomWithDuration:ISO:completionHandler:")] [Async] void LockExposure (CMTime duration, float /* float, not CGFloat */ ISO, [NullAllowed] Action completionHandler); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("setExposureTargetBias:completionHandler:")] [Async] void SetExposureTargetBias (float /* float, not CGFloat */ bias, [NullAllowed] Action completionHandler); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("lensPosition")] float LensPosition { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("setFocusModeLockedWithLensPosition:completionHandler:")] [Async] void SetFocusModeLocked (float /* float, not CGFloat */ lensPosition, [NullAllowed] Action completionHandler); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("deviceWhiteBalanceGains")] AVCaptureWhiteBalanceGains DeviceWhiteBalanceGains { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("grayWorldDeviceWhiteBalanceGains")] AVCaptureWhiteBalanceGains GrayWorldDeviceWhiteBalanceGains { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("maxWhiteBalanceGain")] float MaxWhiteBalanceGain { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler:")] [Async] void SetWhiteBalanceModeLockedWithDeviceWhiteBalanceGains (AVCaptureWhiteBalanceGains whiteBalanceGains, [NullAllowed] Action completionHandler); - [NoMac, NoWatch] + [NoMac] [MacCatalyst (14, 0)] [Export ("chromaticityValuesForDeviceWhiteBalanceGains:")] AVCaptureWhiteBalanceChromaticityValues GetChromaticityValues (AVCaptureWhiteBalanceGains whiteBalanceGains); - [NoMac, NoWatch] + [NoMac] [MacCatalyst (14, 0)] [Export ("deviceWhiteBalanceGainsForChromaticityValues:")] AVCaptureWhiteBalanceGains GetDeviceWhiteBalanceGains (AVCaptureWhiteBalanceChromaticityValues chromaticityValues); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("temperatureAndTintValuesForDeviceWhiteBalanceGains:")] AVCaptureWhiteBalanceTemperatureAndTintValues GetTemperatureAndTintValues (AVCaptureWhiteBalanceGains whiteBalanceGains); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("deviceWhiteBalanceGainsForTemperatureAndTintValues:")] AVCaptureWhiteBalanceGains GetDeviceWhiteBalanceGains (AVCaptureWhiteBalanceTemperatureAndTintValues tempAndTintValues); - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Field ("AVCaptureExposureDurationCurrent")] CMTime ExposureDurationCurrent { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Field ("AVCaptureExposureTargetBiasCurrent")] float ExposureTargetBiasCurrent { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Field ("AVCaptureISOCurrent")] float ISOCurrent { get; } /* float, not CGFloat */ @@ -12180,70 +12505,70 @@ interface AVCaptureDevice { [Field ("AVCaptureLensPositionCurrent")] float LensPositionCurrent { get; } /* float, not CGFloat */ - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Field ("AVCaptureWhiteBalanceGainsCurrent")] AVCaptureWhiteBalanceGains WhiteBalanceGainsCurrent { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("automaticallyAdjustsVideoHDREnabled")] bool AutomaticallyAdjustsVideoHdrEnabled { get; set; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("videoHDREnabled")] bool VideoHdrEnabled { [Bind ("isVideoHDREnabled")] get; set; } - [NoWatch] [MacCatalyst (14, 0)] [Export ("activeColorSpace", ArgumentSemantic.Assign)] AVCaptureColorSpace ActiveColorSpace { get; set; } // From AVCaptureDevice (AVCaptureDeviceDepthSupport) Category - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("activeDepthDataFormat", ArgumentSemantic.Retain), NullAllowed] AVCaptureDeviceFormat ActiveDepthDataFormat { get; set; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("minAvailableVideoZoomFactor")] nfloat MinAvailableVideoZoomFactor { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("maxAvailableVideoZoomFactor")] nfloat MaxAvailableVideoZoomFactor { get; } // From AVCaptureDevice (AVCaptureDeviceSystemPressure) Category - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("systemPressureState")] AVCaptureSystemPressureState SystemPressureState { get; } [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'VirtualDeviceSwitchOverVideoZoomFactors' instead.")] - [NoWatch, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'VirtualDeviceSwitchOverVideoZoomFactors' instead.")] + [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'VirtualDeviceSwitchOverVideoZoomFactors' instead.")] [Export ("dualCameraSwitchOverVideoZoomFactor")] nfloat DualCameraSwitchOverVideoZoomFactor { get; } // From @interface AVCaptureDeviceDepthSupport (AVCaptureDevice) - [NoMac, NoWatch] + [NoMac] [MacCatalyst (14, 0)] [Export ("activeDepthDataMinFrameDuration", ArgumentSemantic.Assign)] CMTime ActiveDepthDataMinFrameDuration { get; set; } // From @interface AVCaptureDeviceExposure (AVCaptureDevice) - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("activeMaxExposureDuration", ArgumentSemantic.Assign)] CMTime ActiveMaxExposureDuration { get; set; } - [NoTV, NoWatch] + [NoTV] [MacCatalyst (14, 0)] [Static] [Export ("defaultDeviceWithDeviceType:mediaType:position:")] @@ -12251,84 +12576,83 @@ interface AVCaptureDevice { AVCaptureDevice GetDefaultDevice ([BindAs (typeof (AVCaptureDeviceType))] NSString deviceType, [NullAllowed][BindAs (typeof (AVMediaTypes))] NSString mediaType, AVCaptureDevicePosition position); // From AVCaptureDevice_AVCaptureDeviceVirtual - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("virtualDevice")] bool VirtualDevice { [Bind ("isVirtualDevice")] get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("constituentDevices")] AVCaptureDevice [] ConstituentDevices { get; } // from AVCaptureDevice_AVCaptureDeviceCalibration - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Static] [Export ("extrinsicMatrixFromDevice:toDevice:")] [return: NullAllowed] NSData GetExtrinsicMatrix (AVCaptureDevice fromDevice, AVCaptureDevice toDevice); - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("globalToneMappingEnabled")] bool GlobalToneMappingEnabled { [Bind ("isGlobalToneMappingEnabled")] get; set; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("virtualDeviceSwitchOverVideoZoomFactors")] NSNumber [] VirtualDeviceSwitchOverVideoZoomFactors { get; } // From AVCaptureDevice_AVCaptureDeviceVirtual - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [TV (17, 0), MacCatalyst (15, 0), iOS (15, 0)] [Export ("setPrimaryConstituentDeviceSwitchingBehavior:restrictedSwitchingBehaviorConditions:")] void SetPrimaryConstituentDeviceSwitchingBehavior (AVCapturePrimaryConstituentDeviceSwitchingBehavior switchingBehavior, AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions restrictedSwitchingBehaviorConditions); - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("primaryConstituentDeviceSwitchingBehavior")] AVCapturePrimaryConstituentDeviceSwitchingBehavior PrimaryConstituentDeviceSwitchingBehavior { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("primaryConstituentDeviceRestrictedSwitchingBehaviorConditions")] AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions PrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("activePrimaryConstituentDeviceSwitchingBehavior")] AVCapturePrimaryConstituentDeviceSwitchingBehavior ActivePrimaryConstituentDeviceSwitchingBehavior { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("activePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions")] AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions ActivePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions { get; } [NullAllowed] - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("activePrimaryConstituentDevice")] AVCaptureDevice ActivePrimaryConstituentDevice { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("supportedFallbackPrimaryConstituentDevices")] AVCaptureDevice [] SupportedFallbackPrimaryConstituentDevices { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("fallbackPrimaryConstituentDevices", ArgumentSemantic.Assign)] AVCaptureDevice [] FallbackPrimaryConstituentDevices { get; set; } // from AVCaptureDevice_AVCaptureDeviceGeometricDistortionCorrection - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("geometricDistortionCorrectionSupported")] bool GeometricDistortionCorrectionSupported { [Bind ("isGeometricDistortionCorrectionSupported")] get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("geometricDistortionCorrectionEnabled")] bool GeometricDistortionCorrectionEnabled { [Bind ("isGeometricDistortionCorrectionEnabled")] get; set; } // from AVCaptureDevice_AVCaptureDeviceCenterStage - [NoWatch, NoTV] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] @@ -12336,7 +12660,6 @@ interface AVCaptureDevice { [Export ("centerStageControlMode", ArgumentSemantic.Assign)] AVCaptureCenterStageControlMode CenterStageControlMode { get; set; } - [NoWatch, NoTV] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] @@ -12344,67 +12667,155 @@ interface AVCaptureDevice { [Export ("centerStageEnabled")] bool CenterStageEnabled { [Bind ("isCenterStageEnabled")] get; set; } - [NoWatch, NoTV] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] [Export ("centerStageActive")] bool CenterStageActive { [Bind ("isCenterStageActive")] get; } + // From the AVCaptureDeviceCenterStage (AVCaptureDevice) category + [NoTV, MacCatalyst (16, 4), Mac (13, 3), iOS (16, 4)] + [Export ("centerStageRectOfInterest", ArgumentSemantic.Assign)] + CGRect CenterStageRectOfInterest { get; set; } + // AVCaptureDevice_AVCaptureMicrophoneMode - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("preferredMicrophoneMode")] AVCaptureMicrophoneMode PreferredMicrophoneMode { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("activeMicrophoneMode")] AVCaptureMicrophoneMode ActiveMicrophoneMode { get; } // AVCaptureDevice_AVCaptureDevicePortraitEffect - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("portraitEffectEnabled")] bool PortraitEffectEnabled { [Bind ("isPortraitEffectEnabled")] get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("portraitEffectActive")] bool PortraitEffectActive { [Bind ("isPortraitEffectActive")] get; } // AVCaptureDevice_AVCaptureSystemUserInterface - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("showSystemUserInterface:")] void ShowSystemUserInterface (AVCaptureSystemUserInterface systemUserInterface); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("minimumFocusDistance")] nint MinimumFocusDistance { get; } - } + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Static] + [Export ("reactionEffectGesturesEnabled")] + bool ReactionEffectGesturesEnabled { get; } - [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV, NoMac, NoWatch] - enum AVCaptureSystemPressureLevel { - [Field ("AVCaptureSystemPressureLevelNominal")] - Nominal, + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("canPerformReactionEffects")] + bool CanPerformReactionEffects { get; } - [Field ("AVCaptureSystemPressureLevelFair")] - Fair, + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("availableReactionTypes")] + NSSet AvailableReactionTypes { get; } - [Field ("AVCaptureSystemPressureLevelSerious")] - Serious, + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("performEffectForReaction:")] + void PerformEffect (string reactionType); - [Field ("AVCaptureSystemPressureLevelCritical")] - Critical, + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("reactionEffectsInProgress")] + AVCaptureReactionEffectState [] ReactionEffectsInProgress { get; } - [Field ("AVCaptureSystemPressureLevelShutdown")] - Shutdown, - } + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Static] + [Export ("reactionEffectsEnabled")] + bool ReactionEffectsEnabled { get; } - [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoMac] + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Static] + [Export ("studioLightEnabled")] + bool StudioLightEnabled { [Bind ("isStudioLightEnabled")] get; } + + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("studioLightActive")] + bool StudioLightActive { [Bind ("isStudioLightActive")] get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("autoVideoFrameRateEnabled")] + bool AutoVideoFrameRateEnabled { [Bind ("isAutoVideoFrameRateEnabled")] get; set; } + + // From the AVCaptureDeviceDeskViewCamera (AVCaptureDevice) category + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("companionDeskViewCamera")] + [NullAllowed] + AVCaptureDevice CompanionDeskViewCamera { get; } + + // From the AVCaptureDeviceVideoZoom (AVCaptureDevice) category + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (18, 0)] + [Export ("displayVideoZoomFactorMultiplier")] + nfloat DisplayVideoZoomFactorMultiplier { get; } + + // From the AVCaptureDeviceBackgroundReplacement (AVCaptureDevice) category + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Static] + [Export ("backgroundReplacementEnabled")] + bool BackgroundReplacementEnabled { [Bind ("isBackgroundReplacementEnabled")] get; } + + // From the AVCaptureDeviceBackgroundReplacement (AVCaptureDevice) category + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("backgroundReplacementActive")] + bool BackgroundReplacementActive { [Bind ("isBackgroundReplacementActive")] get; } + + // From the AVCaptureDeviceContinuityCamera (AVCaptureDevice) category + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("continuityCamera")] + bool ContinuityCamera { [Bind ("isContinuityCamera")] get; } + + // From the AVCaptureDeviceSpatialCapture (AVCaptureDevice) category + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("spatialCaptureDiscomfortReasons")] + NSSet SpatialCaptureDiscomfortReasons { get; } + + // From the AVCaptureDevicePreferredCamera (AVCaptureDevice) category + [NullAllowed] + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (17, 0)] + [Static] + [Export ("userPreferredCamera", ArgumentSemantic.Assign)] + AVCaptureDevice UserPreferredCamera { get; set; } + + // From the AVCaptureDevicePreferredCamera (AVCaptureDevice) category + [NullAllowed] + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (17, 0)] + [Static] + [Export ("systemPreferredCamera")] + AVCaptureDevice SystemPreferredCamera { get; } + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [TV (17, 0), NoMac] + enum AVCaptureSystemPressureLevel { + [Field ("AVCaptureSystemPressureLevelNominal")] + Nominal, + + [Field ("AVCaptureSystemPressureLevelFair")] + Fair, + + [Field ("AVCaptureSystemPressureLevelSerious")] + Serious, + + [Field ("AVCaptureSystemPressureLevelCritical")] + Critical, + + [Field ("AVCaptureSystemPressureLevelShutdown")] + Shutdown, + } + + [Introduced (PlatformName.MacCatalyst, 14, 0)] + [TV (17, 0), NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptureSystemPressureState { @@ -12423,8 +12834,7 @@ interface AVCaptureSystemPressureState { /// /// Apple documentation for AVCaptureDeviceFormat [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [DisableDefaultCtor] // crash -> immutable, it can be set but it should be selected from tha available formats (not a custom one) [BaseType (typeof (NSObject))] interface AVCaptureDeviceFormat { @@ -12463,6 +12873,7 @@ interface AVCaptureDeviceFormat { [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'IsVideoStabilizationModeSupported (AVCaptureVideoStabilizationMode)' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'IsVideoStabilizationModeSupported (AVCaptureVideoStabilizationMode)' instead.")] + [Deprecated (PlatformName.TvOS, 8, 0, message: "Use 'IsVideoStabilizationModeSupported (AVCaptureVideoStabilizationMode)' instead.")] bool VideoStabilizationSupported { [Bind ("isVideoStabilizationSupported")] get; } [NoMac] @@ -12517,6 +12928,7 @@ interface AVCaptureDeviceFormat { [MacCatalyst (14, 0)] [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'SupportedMaxPhotoDimension' instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'SupportedMaxPhotoDimension' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'SupportedMaxPhotoDimension' instead.")] [Export ("highResolutionStillImageDimensions")] CMVideoDimensions HighResolutionStillImageDimensions { get; } @@ -12524,6 +12936,7 @@ interface AVCaptureDeviceFormat { [MacCatalyst (14, 0)] [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")] [Export ("videoMinZoomFactorForDepthDataDelivery")] nfloat VideoMinZoomFactorForDepthDataDelivery { get; } @@ -12531,6 +12944,7 @@ interface AVCaptureDeviceFormat { [MacCatalyst (14, 0)] [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")] + [Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'SupportedVideoZoomFactorsForDepthDataDelivery' instead.")] [Export ("videoMaxZoomFactorForDepthDataDelivery")] nfloat VideoMaxZoomFactorForDepthDataDelivery { get; } @@ -12545,57 +12959,53 @@ interface AVCaptureDeviceFormat { Class [] UnsupportedCaptureOutputClasses { get; } // from @interface AVCaptureDeviceFormatDepthDataAdditions (AVCaptureDeviceFormat) - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("portraitEffectsMatteStillImageDeliverySupported")] bool PortraitEffectsMatteStillImageDeliverySupported { [Bind ("isPortraitEffectsMatteStillImageDeliverySupported")] get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("highestPhotoQualitySupported")] bool HighestPhotoQualitySupported { [Bind ("isHighestPhotoQualitySupported")] get; } // from AVCaptureDeviceFormat_AVCaptureDeviceFormatMultiCamAdditions - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("multiCamSupported")] bool MultiCamSupported { [Bind ("isMultiCamSupported")] get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("globalToneMappingSupported")] bool GlobalToneMappingSupported { [Bind ("isGlobalToneMappingSupported")] get; } // from AVCaptureDeviceFormat_AVCaptureDeviceFormatGeometricDistortionCorrection - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("geometricDistortionCorrectedVideoFieldOfView")] float GeometricDistortionCorrectedVideoFieldOfView { get; } // from AVCaptureDeviceFormat_AVCaptureDeviceFormatCenterStage - [NoWatch, NoTV] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] [Export ("centerStageSupported")] bool CenterStageSupported { [Bind ("isCenterStageSupported")] get; } - [NoWatch, NoTV] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] [Export ("videoMinZoomFactorForCenterStage")] nfloat VideoMinZoomFactorForCenterStage { get; } - [NoWatch, NoTV] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] [Export ("videoMaxZoomFactorForCenterStage")] nfloat VideoMaxZoomFactorForCenterStage { get; } - [NoWatch, NoTV] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] @@ -12603,17 +13013,17 @@ interface AVCaptureDeviceFormat { [NullAllowed] AVFrameRateRange VideoFrameRateRangeForCenterStage { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("highPhotoQualitySupported")] bool HighPhotoQualitySupported { [Bind ("isHighPhotoQualitySupported")] get; } // AVCaptureDeviceFormat_AVCaptureDeviceFormatPortraitEffect - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [TV (17, 0), MacCatalyst (15, 0), iOS (15, 0)] [Export ("portraitEffectSupported")] bool PortraitEffectSupported { [Bind ("isPortraitEffectSupported")] get; } [NullAllowed] - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0)] [Export ("videoFrameRateRangeForPortraitEffect")] AVFrameRateRange VideoFrameRateRangeForPortraitEffect { get; } @@ -12631,18 +13041,82 @@ interface AVCaptureDeviceFormat { [Export ("secondaryNativeResolutionZoomFactors")] NSNumber [] SecondaryNativeResolutionZoomFactors { get; } + [Deprecated (PlatformName.iOS, 17, 2)] + [Deprecated (PlatformName.TvOS, 17, 2)] + [Deprecated (PlatformName.MacCatalyst, 17, 2)] + [Deprecated (PlatformName.MacOSX, 14, 2)] [iOS (16, 0)] [MacCatalyst (16, 0)] [Mac (13, 0)] [BindAs (typeof (nfloat []))] [Export ("supportedVideoZoomFactorsForDepthDataDelivery")] NSNumber [] SupportedVideoZoomFactorsForDepthDataDelivery { get; } + + // from the AVCaptureDeviceFormatReactionEffects (AVCaptureDeviceFormat) category + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("reactionEffectsSupported")] + bool ReactionEffectsSupported { get; } + + // from the AVCaptureDeviceFormatReactionEffects (AVCaptureDeviceFormat) category + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("videoFrameRateRangeForReactionEffectsInProgress")] + [NullAllowed] + AVFrameRateRange VideoFrameRateRangeForReactionEffectsInProgress { get; } + + [TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] + [Export ("supportedVideoZoomRangesForDepthDataDelivery")] + AVZoomRange [] SupportedVideoZoomRangesForDepthDataDelivery { get; } + + [TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] + [Export ("zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported")] + bool ZoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported { get; } + + // from the AVCaptureDeviceFormatStudioLight (AVCaptureDeviceFormat) category + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("studioLightSupported")] + bool StudioLightSupported { [Bind ("isStudioLightSupported")] get; } + + // from the AVCaptureDeviceFormatStudioLight (AVCaptureDeviceFormat) category + [TV (17, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("videoFrameRateRangeForStudioLight")] + [NullAllowed] + AVFrameRateRange VideoFrameRateRangeForStudioLight { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("systemRecommendedVideoZoomRange")] + [NullAllowed] + AVZoomRange SystemRecommendedVideoZoomRange { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("systemRecommendedExposureBiasRange")] + [NullAllowed] + AVExposureBiasRange SystemRecommendedExposureBiasRange { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("autoVideoFrameRateSupported")] + bool AutoVideoFrameRateSupported { [Bind ("isAutoVideoFrameRateSupported")] get; } + + // From the AVCaptureDeviceFormatSpatialVideoCapture (AVCaptureDeviceFormat) protocol + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("spatialVideoCaptureSupported")] + bool SpatialVideoCaptureSupported { [Bind ("isSpatialVideoCaptureSupported")] get; } + + // From the AVCaptureDeviceFormatBackgroundReplacement (AVCaptureDeviceFormat) category + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("backgroundReplacementSupported")] + bool BackgroundReplacementSupported { [Bind ("isBackgroundReplacementSupported")] get; } + + // From the AVCaptureDeviceFormatBackgroundReplacement (AVCaptureDeviceFormat) category + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("videoFrameRateRangeForBackgroundReplacement")] + [NullAllowed] + AVFrameRateRange VideoFrameRateRangeForBackgroundReplacement { get; } } /// A delegate for the completion handler of . delegate void AVCaptureCompletionHandler (CMSampleBuffer imageDataSampleBuffer, NSError error); - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] enum AVPlayerRateDidChangeReason { [Field ("AVPlayerRateDidChangeReasonSetRateCalled")] @@ -12659,7 +13133,7 @@ enum AVPlayerRateDidChangeReason { } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] enum AVVideoRange { [Field ("AVVideoRangeSDR")] @@ -12673,7 +13147,7 @@ enum AVVideoRange { } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] interface AVPlayerRateDidChangeEventArgs { [Export ("AVPlayerRateDidChangeReasonKey")] NSString RateDidChangeStringReason { get; } @@ -12696,32 +13170,30 @@ enum AVPlayerWaitingReason { [Field ("AVPlayerWaitingWithNoItemToPlayReason")] WaitingWithNoItemToPlay, - [iOS (14, 5), TV (14, 5), MacCatalyst (14, 5), Watch (8, 0)] + [iOS (14, 5), TV (14, 5), MacCatalyst (14, 5)] [Field ("AVPlayerWaitingDuringInterstitialEventReason")] WaitingDuringInterstitialEvent, - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVPlayerWaitingForCoordinatedPlaybackReason")] WaitingForCoordinatedPlayback, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVPlayer { - -#if WATCH - [Notification] -#else [Notification (typeof (AVPlayerRateDidChangeEventArgs))] -#endif - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVPlayerRateDidChangeNotification")] NSString RateDidChangeNotification { get; } [Export ("currentItem"), NullAllowed] AVPlayerItem CurrentItem { get; } + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("defaultRate")] + float DefaultRate { get; set; } + [Export ("rate")] float Rate { get; set; } // defined as 'float' @@ -12856,7 +13328,6 @@ interface AVPlayer { [Deprecated (PlatformName.MacOSX, 15, 0)] [Deprecated (PlatformName.iOS, 15, 0)] [Deprecated (PlatformName.TvOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 15, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Export ("masterClock"), NullAllowed] CMClock MasterClock { get; set; } @@ -12898,7 +13369,7 @@ interface AVPlayer { [Export ("setMediaSelectionCriteria:forMediaCharacteristic:")] void SetMediaSelectionCriteria ([NullAllowed] AVPlayerMediaSelectionCriteria criteria, NSString avMediaCharacteristic); - [NoiOS, NoTV, NoWatch, MacCatalyst (15, 0)] + [NoiOS, NoTV, MacCatalyst (15, 0)] [Export ("audioOutputDeviceUniqueID"), NullAllowed] string AudioOutputDeviceUniqueID { get; set; } @@ -12918,25 +13389,24 @@ interface AVPlayer { [Obsolete ("Use 'AVPlayerWaitingReason' enum instead.")] [iOS (14, 5), TV (14, 5)] [MacCatalyst (14, 5)] - [Watch (8, 0)] [Field ("AVPlayerWaitingDuringInterstitialEventReason")] NSString WaitingDuringInterstitialEventReason { get; } [Obsolete ("Use 'AVPlayerWaitingReason' enum instead.")] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVPlayerWaitingForCoordinatedPlaybackReason")] NSString AVPlayerWaitingForCoordinatedPlaybackReason { get; } #endif // !NET // From AVPlayer (AVPlayerPlaybackCapabilities) Category - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Static] [Export ("availableHDRModes")] AVPlayerHdrMode AvailableHdrModes { get; } - [NoWatch, NoMac] + [NoMac] [MacCatalyst (13, 1)] [Field ("AVPlayerAvailableHDRModesDidChangeNotification")] [Notification] @@ -12944,45 +13414,48 @@ interface AVPlayer { // From AVPlayer (AVPlayerVideoDecoderGPUSupport) Category - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("preferredVideoDecoderGPURegistryID")] ulong PreferredVideoDecoderGpuRegistryId { get; set; } // From AVPlayerVideoDisplaySleepPrevention (AVPlayer) Category - [NoWatch] [MacCatalyst (13, 1)] [Export ("preventsDisplaySleepDuringVideoPlayback")] bool PreventsDisplaySleepDuringVideoPlayback { get; set; } - [TV (13, 4), NoWatch, iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Static] [Export ("eligibleForHDRPlayback")] bool EligibleForHdrPlayback { get; } [Notification] - [TV (13, 4), NoWatch, iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Field ("AVPlayerEligibleForHDRPlaybackDidChangeNotification")] NSString EligibleForHdrPlaybackDidChangeNotification { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("sourceClock", ArgumentSemantic.Retain)] CMClock SourceClock { get; set; } // AVPlayer_AVPlayerBackgroundSupport - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("audiovisualBackgroundPlaybackPolicy", ArgumentSemantic.Assign)] AVPlayerAudiovisualBackgroundPlaybackPolicy AudiovisualBackgroundPlaybackPolicy { get; set; } // AVPlayer_PlaybackCoordination - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("playbackCoordinator", ArgumentSemantic.Strong)] AVPlayerPlaybackCoordinator PlaybackCoordinator { get; } + + // from the AVPlayerOutputSupport (AVPlayer) category + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + [NullAllowed, Export ("videoOutput", ArgumentSemantic.Assign)] + AVPlayerVideoOutput VideoOutput { get; set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVPlayerMediaSelectionCriteria { @@ -13007,7 +13480,6 @@ interface AVPlayerMediaSelectionCriteria { NSString [] PrincipalMediaCharacteristics { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSGenericException *** -[AVTextStyleRule init] Not available. Use initWithTextMarkupAttributes:textSelector: instead @@ -13069,7 +13541,6 @@ interface AVTextStyleRule : NSCopying { NativeHandle Constructor (CMTextMarkupAttributes attributes, string textSelector); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVMetadataGroup { @@ -13086,7 +13557,6 @@ interface AVMetadataGroup { string UniqueID { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVMetadataGroup))] interface AVTimedMetadataGroup : NSMutableCopying { @@ -13109,7 +13579,6 @@ interface AVTimedMetadataGroup : NSMutableCopying { NativeHandle Constructor (CMSampleBuffer sampleBuffer); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVTimedMetadataGroup))] interface AVMutableTimedMetadataGroup { @@ -13128,18 +13597,17 @@ interface AVPlayerItemErrorEventArgs { NSError Error { get; } } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] interface AVPlayerItemTimeJumpedEventArgs { [Export ("AVPlayerItemTimeJumpedOriginatingParticipantKey")] NSString OriginatingParticipant { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // 'init' returns NIL [DisableDefaultCtor] - interface AVPlayerItem : NSCopying { + interface AVPlayerItem : NSCopying, AVMetricEventStreamPublisher { [Export ("status")] AVPlayerItemStatus Status { get; } @@ -13161,7 +13629,6 @@ interface AVPlayerItem : NSCopying { [Export ("audioMix", ArgumentSemantic.Copy), NullAllowed] AVAudioMix AudioMix { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("videoComposition", ArgumentSemantic.Copy), NullAllowed] AVVideoComposition VideoComposition { get; set; } @@ -13192,7 +13659,6 @@ interface AVPlayerItem : NSCopying { [Export ("loadedTimeRanges")] NSValue [] LoadedTimeRanges { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the class 'AVPlayerItemMetadataOutput' instead to get the time metadata info.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the class 'AVPlayerItemMetadataOutput' instead to get the time metadata info.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the class 'AVPlayerItemMetadataOutput' instead to get the time metadata info.")] @@ -13342,7 +13808,6 @@ interface AVPlayerItem : NSCopying { [Export ("seekingWaitsForVideoCompositionRendering")] bool SeekingWaitsForVideoCompositionRendering { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("textStyleRules", ArgumentSemantic.Copy), NullAllowed] AVTextStyleRule [] TextStyleRules { get; set; } @@ -13375,7 +13840,6 @@ interface AVPlayerItem : NSCopying { [Export ("automaticallyLoadedAssetKeys", ArgumentSemantic.Copy)] NSString [] AutomaticallyLoadedAssetKeys { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("customVideoCompositor", ArgumentSemantic.Copy), NullAllowed] IAVVideoCompositing CustomVideoCompositor { get; } @@ -13400,13 +13864,11 @@ interface AVPlayerItem : NSCopying { #region AVPlayerViewControllerAdditions [NoiOS] [NoMac] - [NoWatch] [NoMacCatalyst] [Export ("navigationMarkerGroups", ArgumentSemantic.Copy)] AVNavigationMarkersGroup [] NavigationMarkerGroups { get; set; } [NoMac] - [NoWatch] [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("externalMetadata", ArgumentSemantic.Copy)] @@ -13415,7 +13877,6 @@ interface AVPlayerItem : NSCopying { [iOS (16, 0)] [NoMacCatalyst] [NoMac] - [NoWatch] [Export ("interstitialTimeRanges", ArgumentSemantic.Copy)] AVInterstitialTimeRange [] InterstitialTimeRanges { get; set; } #endregion @@ -13432,12 +13893,11 @@ interface AVPlayerItem : NSCopying { [Export ("mediaDataCollectors")] AVPlayerItemMediaDataCollector [] MediaDataCollectors { get; } - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [NullAllowed, Export ("nextContentProposal", ArgumentSemantic.Assign)] AVContentProposal NextContentProposal { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Internal] [Export ("videoApertureMode")] @@ -13472,58 +13932,62 @@ interface AVPlayerItem : NSCopying { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'AllowedAudioSpatializationFormats' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'AllowedAudioSpatializationFormats' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'AllowedAudioSpatializationFormats' instead.")] [Export ("audioSpatializationAllowed")] bool AudioSpatializationAllowed { [Bind ("isAudioSpatializationAllowed")] get; set; } - [NoWatch, TV (15, 0), iOS (14, 0)] + [TV (15, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("allowedAudioSpatializationFormats", ArgumentSemantic.Assign)] AVAudioSpatializationFormats AllowedAudioSpatializationFormats { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("startsOnFirstEligibleVariant")] bool StartsOnFirstEligibleVariant { get; set; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("variantPreferences", ArgumentSemantic.Assign)] AVVariantPreferences VariantPreferences { get; set; } [iOS (14, 1)] [TV (14, 2)] - [NoWatch] [MacCatalyst (14, 1)] [Export ("appliesPerFrameHDRDisplayMetadata")] bool AppliesPerFrameHdrDisplayMetadata { get; set; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("preferredMaximumResolutionForExpensiveNetworks", ArgumentSemantic.Assign)] CGSize PreferredMaximumResolutionForExpensiveNetworks { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("preferredPeakBitRateForExpensiveNetworks")] double PreferredPeakBitRateForExpensiveNetworks { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("copy")] [return: Release] NSObject Copy (); - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("translatesPlayerInterstitialEvents")] bool TranslatesPlayerInterstitialEvents { get; set; } - [Watch (9, 0), TV (16, 0), NoMac, iOS (16, 0)] + [TV (16, 0), NoMac, iOS (16, 0)] [MacCatalyst (16, 0)] [NullAllowed, Export ("nowPlayingInfo", ArgumentSemantic.Copy)] NSDictionary WeakNowPlayingInfo { get; set; } + + // From the AVPlayerItemIntegratedTimelineSupport (AVPlayerItem) category + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("integratedTimeline")] + AVPlayerItemIntegratedTimeline IntegratedTimeline { get; } } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Flags] [Native] @@ -13534,31 +13998,35 @@ public enum AVVariantPreferences : ulong { [NoiOS] [NoTV] - [NoWatch] - [NoMacCatalyst] [Category] + [MacCatalyst (13, 1)] [BaseType (typeof (AVPlayerItem))] interface AVPlayerItem_AVPlayerItemProtectedContent { + [MacCatalyst (13, 1)] [Export ("isAuthorizationRequiredForPlayback")] bool IsAuthorizationRequiredForPlayback (); + [MacCatalyst (13, 1)] [Export ("isApplicationAuthorizedForPlayback")] bool IsApplicationAuthorizedForPlayback (); + [MacCatalyst (13, 1)] [Export ("isContentAuthorizedForPlayback")] bool IsContentAuthorizedForPlayback (); + [NoMacCatalyst] [Export ("requestContentAuthorizationAsynchronouslyWithTimeoutInterval:completionHandler:")] void RequestContentAuthorizationAsynchronously (/* NSTimeInterval */ double timeoutInterval, Action handler); + [NoMacCatalyst] [Export ("cancelContentAuthorizationRequest")] void CancelContentAuthorizationRequest (); + [NoMacCatalyst] [Export ("contentAuthorizationRequestStatus")] AVContentAuthorizationStatus GetContentAuthorizationRequestStatus (); } - [NoWatch] [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Category] @@ -13575,7 +14043,7 @@ interface AVPlayerItem_AVPlayerInterstitialSupport { AVPlayerItem GetTemplatePlayerItem (); } - [NoWatch, NoMac, NoiOS] + [NoMac, NoiOS] [TV (13, 0)] [NoMacCatalyst] [Category] @@ -13589,7 +14057,6 @@ interface AVPlayerItem_AVPlaybackRestrictions { void CancelPlaybackRestrictionsAuthorizationRequest (); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** initialization method -init cannot be sent to an abstract object of class AVPlayerItemOutput: Create a concrete instance! @@ -13606,13 +14073,11 @@ interface AVPlayerItemOutput { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("itemTimeForCVTimeStamp:")] CMTime GetItemTime (CVTimeStamp timestamp); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // initialization method -init cannot be sent to an abstract object of class AVPlayerItemMediaDataCollector: Create a concrete instance! @@ -13620,7 +14085,6 @@ interface AVPlayerItemOutput { interface AVPlayerItemMediaDataCollector { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVPlayerItemOutput))] interface AVPlayerItemMetadataOutput { @@ -13649,7 +14113,6 @@ interface AVPlayerItemMetadataOutput { interface IAVPlayerItemMetadataOutputPushDelegate { } [BaseType (typeof (NSObject))] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Protocol, Model] interface AVPlayerItemMetadataOutputPushDelegate : AVPlayerItemOutputPushDelegate { @@ -13659,7 +14122,6 @@ interface AVPlayerItemMetadataOutputPushDelegate : AVPlayerItemOutputPushDelegat void DidOutputTimedMetadataGroups (AVPlayerItemMetadataOutput output, AVTimedMetadataGroup [] groups, [NullAllowed] AVPlayerItemTrack track); } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface AVVideoColorPrimaries { @@ -13681,20 +14143,46 @@ interface AVVideoColorPrimaries { NSString Itu_R_2020 { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface AVVideoTransferFunction { +#if !XAMCORE_5_0 [MacCatalyst (13, 1)] + [Obsolete ("Use 'Itu_R_709_2' instead.")] [Field ("AVVideoTransferFunction_ITU_R_709_2")] NSString AVVideoTransferFunction_Itu_R_709_2 { get; } [NoiOS, NoTV, NoMacCatalyst] + [Obsolete ("Use 'Smpte_240M_1995' instead.")] [Field ("AVVideoTransferFunction_SMPTE_240M_1995")] NSString AVVideoTransferFunction_Smpte_240M_1995 { get; } +#endif // XAMCORE_5_0 + + [MacCatalyst (13, 1)] + [Field ("AVVideoTransferFunction_ITU_R_709_2")] + NSString Itu_R_709_2 { get; } + + [NoiOS, NoTV, NoMacCatalyst] + [Field ("AVVideoTransferFunction_SMPTE_240M_1995")] + NSString Smpte_240M_1995 { get; } + + [TV (11, 0), MacCatalyst (13, 1), Mac (10, 13), iOS (11, 0)] + [Field ("AVVideoTransferFunction_SMPTE_ST_2084_PQ")] + NSString Smpte_St_2084_Pq { get; } + + [TV (11, 0), MacCatalyst (13, 1), Mac (10, 13), iOS (11, 0)] + [Field ("AVVideoTransferFunction_ITU_R_2100_HLG")] + NSString Itu_R_2100_Hlg { get; } + + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Field ("AVVideoTransferFunction_Linear")] + NSString Linear { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVVideoTransferFunction_IEC_sRGB")] + NSString Iec_sRgb { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface AVVideoYCbCrMatrix { @@ -13717,7 +14205,6 @@ interface AVVideoYCbCrMatrix { } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("AVColorPropertiesKeys")] interface AVColorProperties { @@ -13726,7 +14213,6 @@ interface AVColorProperties { NSString AVVideoYCbCrMatrix { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Internal] @@ -13744,7 +14230,6 @@ interface AVColorPropertiesKeys { NSString AVVideoYCbCrMatrixKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("AVCleanAperturePropertiesKeys")] interface AVCleanApertureProperties { @@ -13754,7 +14239,6 @@ interface AVCleanApertureProperties { NSNumber VerticalOffset { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Internal] @@ -13772,7 +14256,6 @@ interface AVCleanAperturePropertiesKeys { NSString VerticalOffsetKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("AVPixelAspectRatioPropertiesKeys")] interface AVPixelAspectRatioProperties { @@ -13780,7 +14263,6 @@ interface AVPixelAspectRatioProperties { NSNumber PixelAspectRatioVerticalSpacing { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Internal] [Static] @@ -13792,7 +14274,6 @@ interface AVPixelAspectRatioPropertiesKeys { NSString PixelAspectRatioVerticalSpacingKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("AVCompressionPropertiesKeys")] interface AVCompressionProperties { @@ -13800,7 +14281,6 @@ interface AVCompressionProperties { AVPixelAspectRatioProperties PixelAspectRatio { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Internal] @@ -13812,7 +14292,6 @@ interface AVCompressionPropertiesKeys { NSString PixelAspectRatioKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("AVPlayerItemVideoOutputSettingsKeys")] interface AVPlayerItemVideoOutputSettings { @@ -13831,7 +14310,6 @@ interface AVPlayerItemVideoOutputSettings { NSNumber Height { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Internal] @@ -13860,7 +14338,6 @@ interface AVPlayerItemVideoOutputSettingsKeys { NSString HeightKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVPlayerItemOutput))] interface AVPlayerItemVideoOutput { @@ -13916,7 +14393,6 @@ interface AVPlayerItemVideoOutput { interface IAVPlayerItemOutputPullDelegate { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -13929,7 +14405,6 @@ interface AVPlayerItemOutputPullDelegate { void OutputSequenceWasFlushed (AVPlayerItemOutput output); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -13941,19 +14416,16 @@ interface AVPlayerItemOutputPushDelegate { interface IAVPlayerItemLegibleOutputPushDelegate { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVPlayerItemOutputPushDelegate))] [Model] [Protocol] interface AVPlayerItemLegibleOutputPushDelegate { - [NoWatch] [MacCatalyst (13, 1)] [Export ("legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:")] void DidOutputAttributedStrings (AVPlayerItemLegibleOutput output, NSAttributedString [] strings, CMSampleBuffer [] nativeSamples, CMTime itemTime); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (AVPlayerItemOutput))] interface AVPlayerItemLegibleOutput { @@ -13985,7 +14457,6 @@ interface AVPlayerItemLegibleOutput { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVPlayerItemAccessLog : NSCopying { @@ -14000,7 +14471,6 @@ interface AVPlayerItemAccessLog : NSCopying { NSData ExtendedLogData { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVPlayerItemErrorLog : NSCopying { @@ -14014,7 +14484,6 @@ interface AVPlayerItemErrorLog : NSCopying { NSData ExtendedLogData { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVPlayerItemAccessLogEvent : NSCopying { @@ -14093,7 +14562,6 @@ interface AVPlayerItemAccessLogEvent : NSCopying { [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] [MacCatalyst (13, 1)] [Export ("observedMaxBitrate")] double ObservedMaxBitrate { get; } @@ -14102,7 +14570,6 @@ interface AVPlayerItemAccessLogEvent : NSCopying { [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'ObservedBitrateStandardDeviation' instead.")] [MacCatalyst (13, 1)] [Export ("observedMinBitrate")] double ObservedMinBitrate { get; } @@ -14129,7 +14596,6 @@ interface AVPlayerItemAccessLogEvent : NSCopying { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVPlayerItemErrorLogEvent : NSCopying { @@ -14154,14 +14620,13 @@ interface AVPlayerItemErrorLogEvent : NSCopying { [Export ("errorComment"), NullAllowed] string ErrorComment { get; } - [Watch (10, 5), TV (17, 5), Mac (14, 5), iOS (17, 5), MacCatalyst (17, 5)] + [TV (17, 5), Mac (14, 5), iOS (17, 5), MacCatalyst (17, 5)] [NullAllowed, Export ("allHTTPResponseHeaderFields")] NSDictionary AllHttpResponseHeaderFields { get; } } interface IAVPlayerItemMetadataCollectorPushDelegate { } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -14171,7 +14636,6 @@ interface AVPlayerItemMetadataCollectorPushDelegate { void DidCollectDateRange (AVPlayerItemMetadataCollector metadataCollector, AVDateRangeMetadataGroup [] metadataGroups, NSIndexSet indexesOfNewGroups, NSIndexSet indexesOfModifiedGroups); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVPlayerItemMediaDataCollector))] interface AVPlayerItemMetadataCollector { @@ -14192,7 +14656,6 @@ interface AVPlayerItemMetadataCollector { DispatchQueue DelegateQueue { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (CALayer))] interface AVPlayerLayer { @@ -14226,9 +14689,14 @@ interface AVPlayerLayer { [MacCatalyst (13, 1)] [Export ("pixelBufferAttributes", ArgumentSemantic.Copy), NullAllowed] NSDictionary WeakPixelBufferAttributes { get; set; } + + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("copyDisplayedPixelBuffer")] + [return: NullAllowed] + [return: Release] + CVPixelBuffer CopyDisplayedPixelBuffer (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14242,9 +14710,13 @@ interface AVPlayerLooper { AVPlayerLooper FromPlayer (AVQueuePlayer player, AVPlayerItem itemToLoop); [Export ("initWithPlayer:templateItem:timeRange:")] - [DesignatedInitializer] NativeHandle Constructor (AVQueuePlayer player, AVPlayerItem itemToLoop, CMTimeRange loopRange); + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("initWithPlayer:templateItem:timeRange:existingItemsOrdering:")] + [DesignatedInitializer] + NativeHandle Constructor (AVQueuePlayer player, AVPlayerItem itemToLoop, CMTimeRange loopRange, AVPlayerLooperItemOrdering itemOrdering); + [Export ("disableLooping")] void DisableLooping (); @@ -14261,7 +14733,6 @@ interface AVPlayerLooper { NSError Error { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVPlayerItemTrack { @@ -14277,14 +14748,12 @@ interface AVPlayerItemTrack { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Field ("AVPlayerItemTrackVideoFieldModeDeinterlaceFields")] NSString VideoFieldModeDeinterlaceFields { get; } [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("videoFieldMode"), NullAllowed] string VideoFieldMode { get; set; } @@ -14303,10 +14772,9 @@ enum AVPlayerInterstitialEventRestrictions : ulong { [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] - [Watch (7, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface AVPlayerInterstitialEvent { + interface AVPlayerInterstitialEvent : NSCopying { // Apple changed the API signature ?!? // [Static] // [Export ("interstitialEventWithPrimaryItem:time:templateItems:restrictions:resumptionOffset:")] @@ -14327,61 +14795,151 @@ interface AVPlayerInterstitialEvent { // [Export ("playerInterstitialEventWithPrimaryItem:date:interstitialTemplateItems:restrictions:resumptionOffset:")] // AVPlayerInterstitialEvent GetPlayerInterstitialEvent (AVPlayerItem primaryItem, NSDate date, AVPlayerItem[] interstitialTemplateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset); - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Static] [Export ("interstitialEventWithPrimaryItem:identifier:date:templateItems:restrictions:resumptionOffset:playoutLimit:userDefinedAttributes:")] AVPlayerInterstitialEvent GetPlayerInterstitialEvent (AVPlayerItem primaryItem, [NullAllowed] string identifier, NSDate date, AVPlayerItem [] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset, CMTime playoutLimit, [NullAllowed] NSDictionary userDefinedAttributes); - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Static] [Export ("interstitialEventWithPrimaryItem:identifier:time:templateItems:restrictions:resumptionOffset:playoutLimit:userDefinedAttributes:")] AVPlayerInterstitialEvent GetPlayerInterstitialEvent (AVPlayerItem primaryItem, [NullAllowed] string identifier, CMTime time, AVPlayerItem [] templateItems, AVPlayerInterstitialEventRestrictions restrictions, CMTime resumptionOffset, CMTime playoutLimit, [NullAllowed] NSDictionary userDefinedAttributes); [NullAllowed, Export ("primaryItem", ArgumentSemantic.Weak)] - AVPlayerItem PrimaryItem { get; } + AVPlayerItem PrimaryItem { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } [Export ("time")] - CMTime Time { get; } + CMTime Time { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } [NullAllowed, Export ("date")] - NSDate Date { get; } + NSDate Date { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } [Export ("templateItems")] - AVPlayerItem [] TemplateItems { get; } + AVPlayerItem [] TemplateItems { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } [Export ("restrictions")] - AVPlayerInterstitialEventRestrictions Restrictions { get; } + AVPlayerInterstitialEventRestrictions Restrictions { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } [Export ("resumptionOffset")] - CMTime ResumptionOffset { get; } + CMTime ResumptionOffset { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("identifier")] - string Identifier { get; } + string Identifier { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("playoutLimit")] - CMTime PlayoutLimit { get; } + CMTime PlayoutLimit { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } // not a strong dictionary: // Storage for attributes defined by the client or the content vendor. Attribute names should begin with X- for uniformity with server insertion. - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("userDefinedAttributes")] - NSDictionary UserDefinedAttributes { get; } + NSDictionary UserDefinedAttributes { + get; + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + set; + } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("alignsStartWithPrimarySegmentBoundary")] + bool AlignsStartWithPrimarySegmentBoundary { get; set; } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("alignsResumptionWithPrimarySegmentBoundary")] + bool AlignsResumptionWithPrimarySegmentBoundary { get; set; } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("cue", ArgumentSemantic.Retain)] + string Cue { get; set; } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("willPlayOnce")] + bool WillPlayOnce { get; set; } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Static] + [Export ("interstitialEventWithPrimaryItem:time:")] + AVPlayerInterstitialEvent Create (AVPlayerItem primaryItem, CMTime time); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Static] + [Export ("interstitialEventWithPrimaryItem:date:")] + AVPlayerInterstitialEvent Create (AVPlayerItem primaryItem, NSDate date); + + [MacCatalyst (16, 4), TV (16, 4), Mac (13, 3), iOS (16, 4)] + [NullAllowed, Export ("assetListResponse")] + NSDictionary AssetListResponse { get; } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("timelineOccupancy")] + AVPlayerInterstitialEventTimelineOccupancy TimelineOccupancy { get; set; } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("supplementsPrimaryContent")] + bool SupplementsPrimaryContent { get; set; } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("contentMayVary")] + bool ContentMayVary { get; set; } + + // from the AVPlayerInterstitialEvent_MutableEvents category + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("plannedDuration", ArgumentSemantic.Assign)] + CMTime PlannedDuration { get; set; } } [DisableDefaultCtor] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface AVPlayerInterstitialEventMonitor { [Notification] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVPlayerInterstitialEventMonitorEventsDidChangeNotification")] NSString EventsDidChangeNotification { get; } [Notification] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("AVPlayerInterstitialEventMonitorCurrentEventDidChangeNotification")] NSString CurrentEventDidChangeNotification { get; } @@ -14404,12 +14962,28 @@ interface AVPlayerInterstitialEventMonitor { [NullAllowed, Export ("currentEvent")] AVPlayerInterstitialEvent CurrentEvent { get; } + + [Notification] + [TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [Field ("AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeNotification")] + NSString AssetListResponseStatusDidChangeNotification { get; } + + [TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [Field ("AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeEventKey")] + NSString AssetListResponseStatusDidChangeEventKey { get; } + + [TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [Field ("AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeStatusKey")] + NSString AssetListResponseStatusDidChangeStatusKey { get; } + + [TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [Field ("AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeErrorKey")] + NSString AssetListResponseStatusDidChangeErrorKey { get; } } [DisableDefaultCtor] [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] - [Watch (7, 4)] [BaseType (typeof (AVPlayerInterstitialEventMonitor))] interface AVPlayerInterstitialEventController { [Static] @@ -14426,7 +15000,6 @@ interface AVPlayerInterstitialEventController { void CancelCurrentEvent (CMTime resumptionOffset); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -14444,7 +15017,6 @@ interface AVAsynchronousKeyValueLoading { void LoadValuesAsynchronously (string [] keys, [NullAllowed] Action handler); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVPlayer))] interface AVQueuePlayer { @@ -14560,7 +15132,6 @@ interface AVAudioSettings { NSString AVEncoderAudioQualityForVBRKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (CALayer))] interface AVSampleBufferDisplayLayer { @@ -14572,15 +15143,31 @@ interface AVSampleBufferDisplayLayer { [Export ("videoGravity")] string VideoGravity { get; set; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("status")] AVQueuedSampleBufferRenderingStatus Status { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("error"), NullAllowed] NSError Error { get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("readyForMoreMediaData")] bool ReadyForMoreMediaData { [Bind ("isReadyForMoreMediaData")] get; } + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("enqueueSampleBuffer:")] void Enqueue (CMSampleBuffer sampleBuffer); @@ -14590,12 +15177,24 @@ interface AVSampleBufferDisplayLayer { void EnqueueSampleBuffer (CMSampleBuffer sampleBuffer); #endif + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("flush")] void Flush (); + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("flushAndRemoveImage")] void FlushAndRemoveImage (); + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("requestMediaDataWhenReadyOnQueue:usingBlock:")] void RequestMediaData (DispatchQueue queue, Action handler); @@ -14605,10 +15204,18 @@ interface AVSampleBufferDisplayLayer { void RequestMediaDataWhenReadyOnQueue (DispatchQueue queue, Action enqueuer); #endif + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [Export ("stopRequestingMediaData")] void StopRequestingMediaData (); // TODO: Remove (alongside others) when https://github.com/xamarin/xamarin-macios/issues/3213 is fixed and conformance to 'AVQueuedSampleBufferRendering' is restored. + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [MacCatalyst (13, 1)] [Export ("timebase", ArgumentSemantic.Retain)] CMTimebase Timebase { get; } @@ -14622,36 +15229,52 @@ interface AVSampleBufferDisplayLayer { // AVSampleBufferDisplayLayerImageProtection - [NoWatch] [MacCatalyst (13, 1)] [Export ("preventsCapture")] bool PreventsCapture { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("preventsDisplaySleepDuringVideoPlayback")] bool PreventsDisplaySleepDuringVideoPlayback { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] + [Deprecated (PlatformName.MacOSX, 15, 0)] + [Deprecated (PlatformName.iOS, 18, 0)] + [Deprecated (PlatformName.MacCatalyst, 18, 0)] + [Deprecated (PlatformName.TvOS, 18, 0)] [MacCatalyst (14, 0)] [Export ("requiresFlushToResumeDecoding")] bool RequiresFlushToResumeDecoding { get; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVSampleBufferDisplayLayerRequiresFlushToResumeDecodingDidChangeNotification")] [Notification] NSString RequiresFlushToResumeDecodingDidChangeNotification { get; } - [TV (14, 5), Watch (7, 4), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("AVSampleBufferDisplayLayerOutputObscuredDueToInsufficientExternalProtectionDidChangeNotification")] [Notification] NSString OutputObscuredDueToInsufficientExternalProtectionDidChangeNotification { get; } + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [Export ("readyForDisplay")] + bool ReadyForDisplay { [Bind ("isReadyForDisplay")] get; } + + [Notification] + [TV (17, 4), MacCatalyst (17, 4), Mac (14, 4), iOS (17, 4)] + [Field ("AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification")] + NSString DisplayLayerReadyForDisplayDidChangeNotification { get; } + + // from the AVSampleBufferDisplayLayerRenderer (AVSampleBufferDisplayLayer) category + [Export ("sampleBufferRenderer")] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] + AVSampleBufferVideoRenderer SampleBufferRenderer { get; } + } - [NoWatch] [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Category] @@ -14661,7 +15284,6 @@ interface AVSampleBufferDisplayLayer_ProtectedContent { bool GetOutputObscuredDueToInsufficientExternalProtection (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (CALayer))] interface AVSynchronizedLayer { @@ -14715,15 +15337,24 @@ interface AVSpeechSynthesisVoice : NSSecureCoding { [Field ("AVSpeechSynthesisIPANotationAttribute")] NSString IpaNotationAttribute { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("gender")] AVSpeechSynthesisVoiceGender Gender { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("audioFileSettings")] NSDictionary AudioFileSettings { get; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("voiceTraits")] + AVSpeechSynthesisVoiceTraits VoiceTraits { get; } + + [Notification] + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("AVSpeechSynthesisAvailableVoicesDidChangeNotification")] + NSString AvailableVoicesDidChangeNotification { get; } } [MacCatalyst (13, 1)] @@ -14738,13 +15369,25 @@ interface AVSpeechUtterance : NSCopying, NSSecureCoding { [Export ("speechUtteranceWithAttributedString:")] AVSpeechUtterance FromString (NSAttributedString speechString); + [MacCatalyst (16, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [Static] + [Export ("speechUtteranceWithSSMLRepresentation:")] + [return: NullAllowed] + AVSpeechUtterance FromSsmlRepresentation (string @string); + + [Internal] [Export ("initWithString:")] - NativeHandle Constructor (string speechString); + NativeHandle _InitWithString (string speechString); [MacCatalyst (13, 1)] [Export ("initWithAttributedString:")] NativeHandle Constructor (NSAttributedString speechString); + [MacCatalyst (16, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("initWithSSMLRepresentation:")] + [Internal] + NativeHandle _InitWithSsmlRepresentation (string @string); + [NullAllowed] // by default this property is null [Export ("voice", ArgumentSemantic.Retain)] AVSpeechSynthesisVoice Voice { get; set; } @@ -14780,12 +15423,15 @@ interface AVSpeechUtterance : NSCopying, NSSecureCoding { [Field ("AVSpeechUtteranceDefaultSpeechRate")] float DefaultSpeechRate { get; } // defined as 'float' - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("prefersAssistiveTechnologySettings")] bool PrefersAssistiveTechnologySettings { get; set; } } + delegate void AVSpeechSynthesizerBufferCallback (AVAudioBuffer buffer); + delegate void AVSpeechSynthesizerMarkerCallback (AVSpeechSynthesisMarker [] markers); + [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (AVSpeechSynthesizerDelegate) })] interface AVSpeechSynthesizer { @@ -14803,11 +15449,11 @@ interface AVSpeechSynthesizer { [Export ("paused")] bool Paused { [Bind ("isPaused")] get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0), MacCatalyst (15, 0)] + [TV (13, 0), iOS (13, 0), MacCatalyst (15, 0)] [Export ("usesApplicationAudioSession")] bool UsesApplicationAudioSession { get; set; } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("mixToTelephonyUplink")] bool MixToTelephonyUplink { get; set; } @@ -14815,11 +15461,15 @@ interface AVSpeechSynthesizer { [Export ("speakUtterance:")] void SpeakUtterance (AVSpeechUtterance utterance); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("writeUtterance:toBufferCallback:")] void WriteUtterance (AVSpeechUtterance utterance, Action bufferCallback); + [MacCatalyst (16, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("writeUtterance:toBufferCallback:toMarkerCallback:")] + void WriteUtterance (AVSpeechUtterance utterance, AVSpeechSynthesizerBufferCallback bufferCallback, AVSpeechSynthesizerMarkerCallback markerCallback); + [Export ("stopSpeakingAtBoundary:")] bool StopSpeaking (AVSpeechBoundary boundary); @@ -14833,8 +15483,21 @@ interface AVSpeechSynthesizer { [MacCatalyst (13, 1)] [NullAllowed, Export ("outputChannels", ArgumentSemantic.Retain)] AVAudioSessionChannelDescription [] OutputChannels { get; set; } + + [Async] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Static] + [Export ("requestPersonalVoiceAuthorizationWithCompletionHandler:")] + void RequestPersonalVoiceAuthorization (AVSpeechSynthesizerRequestPersonalVoiceAuthorizationCallback handler); + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Static] + [Export ("personalVoiceAuthorizationStatus")] + AVSpeechSynthesisPersonalVoiceAuthorizationStatus PersonalVoiceAuthorizationStatus { get; } } + delegate void AVSpeechSynthesizerRequestPersonalVoiceAuthorizationCallback (AVSpeechSynthesisPersonalVoiceAuthorizationStatus status); + interface IAVSpeechSynthesizerDelegate { } [MacCatalyst (13, 1)] @@ -14843,32 +15506,61 @@ interface IAVSpeechSynthesizerDelegate { } [Protocol] interface AVSpeechSynthesizerDelegate { [Export ("speechSynthesizer:didStartSpeechUtterance:")] +#if XAMCORE_5_0 + [EventArgs ("AVSpeechSynthesizerUtterance")] +#else [EventArgs ("AVSpeechSynthesizerUterance")] +#endif void DidStartSpeechUtterance (AVSpeechSynthesizer synthesizer, AVSpeechUtterance utterance); [Export ("speechSynthesizer:didFinishSpeechUtterance:")] +#if XAMCORE_5_0 + [EventArgs ("AVSpeechSynthesizerUtterance")] +#else [EventArgs ("AVSpeechSynthesizerUterance")] +#endif void DidFinishSpeechUtterance (AVSpeechSynthesizer synthesizer, AVSpeechUtterance utterance); [Export ("speechSynthesizer:didPauseSpeechUtterance:")] +#if XAMCORE_5_0 + [EventArgs ("AVSpeechSynthesizerUtterance")] +#else [EventArgs ("AVSpeechSynthesizerUterance")] +#endif void DidPauseSpeechUtterance (AVSpeechSynthesizer synthesizer, AVSpeechUtterance utterance); [Export ("speechSynthesizer:didContinueSpeechUtterance:")] +#if XAMCORE_5_0 + [EventArgs ("AVSpeechSynthesizerUtterance")] +#else [EventArgs ("AVSpeechSynthesizerUterance")] +#endif void DidContinueSpeechUtterance (AVSpeechSynthesizer synthesizer, AVSpeechUtterance utterance); [Export ("speechSynthesizer:didCancelSpeechUtterance:")] +#if XAMCORE_5_0 + [EventArgs ("AVSpeechSynthesizerUtterance")] +#else [EventArgs ("AVSpeechSynthesizerUterance")] +#endif void DidCancelSpeechUtterance (AVSpeechSynthesizer synthesizer, AVSpeechUtterance utterance); [Export ("speechSynthesizer:willSpeakRangeOfSpeechString:utterance:")] [EventArgs ("AVSpeechSynthesizerWillSpeak")] +#if XAMCORE_5_0 + void WillSpeakRange (AVSpeechSynthesizer synthesizer, NSRange characterRange, AVSpeechUtterance utterance); +#else void WillSpeakRangeOfSpeechString (AVSpeechSynthesizer synthesizer, NSRange characterRange, AVSpeechUtterance utterance); +#endif + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + [Export ("speechSynthesizer:willSpeakMarker:utterance:")] + [EventArgs ("AVSpeechSynthesizerWillSpeakMarker")] + void WillSpeakMarker (AVSpeechSynthesizer synthesizer, AVSpeechSynthesisMarker marker, AVSpeechUtterance utterance); } /// Singleton object that stores policies for purging assets. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14886,7 +15578,7 @@ interface AVAssetDownloadStorageManager { } /// Specifies how downloaded assets will be purged. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14899,7 +15591,7 @@ interface AVAssetDownloadStorageManagementPolicy : NSCopying, NSMutableCopying { NSDate ExpirationDate { get; [NotImplemented] set; } } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (AVAssetDownloadStorageManagementPolicy))] [DisableDefaultCtor] @@ -14915,7 +15607,6 @@ interface AVMutableAssetDownloadStorageManagementPolicy { /// A URL session task for downloading Live Streaming assets. /// /// Apple documentation for AVAssetDownloadTask - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSUrlSessionTask))] @@ -14940,7 +15631,7 @@ interface AVAssetDownloadTask { } /// An that downloads multiple media elements of a single asset. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSUrlSessionTask))] [DisableDefaultCtor] @@ -14949,7 +15640,6 @@ interface AVAggregateAssetDownloadTask { AVUrlAsset UrlAsset { get; } } - [NoWatch] #if NET [NoTV] [MacCatalyst (13, 1)] @@ -14966,28 +15656,27 @@ interface AVAssetDownloadTaskKeys { [Field ("AVAssetDownloadTaskMediaSelectionKey")] NSString MediaSelectionKey { get; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVAssetDownloadTaskMediaSelectionPrefersMultichannelKey")] NSString MediaSelectionPrefersMultichannelKey { get; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAssetDownloadTaskPrefersHDRKey")] NSString PrefersHdrKey { get; } - [NoWatch, NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("AVAssetDownloadTaskPrefersLosslessAudioKey")] NSString PrefersLosslessAudioKey { get; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("AVAssetDownloadTaskMinimumRequiredPresentationSizeKey")] NSString MinimumRequiredPresentationSizeKey { get; } } - [NoWatch] #if NET [NoTV] [MacCatalyst (13, 1)] @@ -14998,13 +15687,13 @@ interface AVAssetDownloadTaskKeys { interface AVAssetDownloadOptions { NSNumber MinimumRequiredMediaBitrate { get; set; } AVMediaSelection MediaSelection { get; set; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] bool MediaSelectionPrefersMultichannel { get; set; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] bool PrefersHdr { get; set; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] CGSize MinimumRequiredPresentationSize { get; set; } } @@ -15013,7 +15702,6 @@ interface AVAssetDownloadOptions { /// /// Apple documentation for AVAssetDownloadURLSession [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSUrlSession), Name = "AVAssetDownloadURLSession")] @@ -15043,13 +15731,12 @@ interface AVAssetDownloadUrlSession { [return: NullAllowed] AVAssetDownloadTask GetAssetDownloadTask (AVUrlAsset urlAsset, string title, [NullAllowed] NSData artworkData, AVAssetDownloadOptions options); - [NoWatch] [MacCatalyst (13, 1)] [Export ("aggregateAssetDownloadTaskWithURLAsset:mediaSelections:assetTitle:assetArtworkData:options:")] [return: NullAllowed] AVAggregateAssetDownloadTask GetAssetDownloadTask (AVUrlAsset URLAsset, AVMediaSelection [] mediaSelections, string title, [NullAllowed] NSData artworkData, [NullAllowed] NSDictionary options); - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("assetDownloadTaskWithConfiguration:")] AVAssetDownloadTask GetAssetDownloadTask (AVAssetDownloadConfiguration downloadConfiguration); } @@ -15066,7 +15753,6 @@ interface IAVAssetDownloadDelegate { } /// /// Apple documentation for AVAssetDownloadDelegate [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -15097,9 +15783,12 @@ interface AVAssetDownloadDelegate : NSUrlSessionTaskDelegate { [MacCatalyst (15, 0)] [Export ("URLSession:assetDownloadTask:willDownloadVariants:")] void WillDownloadVariants (NSUrlSession session, AVAssetDownloadTask assetDownloadTask, AVAssetVariant [] variants); + + [MacCatalyst (18, 0), Mac (14, 0), iOS (18, 0)] + [Export ("URLSession:assetDownloadTask:willDownloadToURL:")] + void WilllDownloadToUrl (NSUrlSession session, AVAssetDownloadTask assetDownloadTask, NSUrl location); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15171,7 +15860,6 @@ interface AVOutputSettingsAssistant { NSString _PresetHevc3840x2160 { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVMediaSelection : NSCopying, NSMutableCopying { @@ -15187,7 +15875,6 @@ interface AVMediaSelection : NSCopying, NSMutableCopying { bool CriteriaCanBeAppliedAutomaticallyToMediaSelectionGroup (AVMediaSelectionGroup mediaSelectionGroup); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVMediaSelection))] interface AVMutableMediaSelection { @@ -15196,7 +15883,9 @@ interface AVMutableMediaSelection { void SelectMediaOption ([NullAllowed] AVMediaSelectionOption mediaSelectionOption, AVMediaSelectionGroup mediaSelectionGroup); } - [NoWatch] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + delegate void AVAudioSequencerUserCallback (AVMusicTrack track, NSData userData, double timeStamp); + [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAudioSequencer { @@ -15260,12 +15949,30 @@ interface AVAudioSequencer { [Export ("stop")] void Stop (); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("createAndAppendTrack")] + AVMusicTrack CreateAndAppendTrack (); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("removeTrack:")] + bool RemoveTrack (AVMusicTrack track); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("setUserCallback:")] + void SetUserCallback ([NullAllowed] AVAudioSequencerUserCallback userCallback); + + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [Export ("reverseEvents")] + void ReverseEvents (); } - [NoWatch] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + delegate void AVMusicEventEnumerationBlock (AVMusicEvent @event, out double timeStamp, out bool removeEvent); + [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // Docs/headers do not state that init is disallowed but if + [DisableDefaultCtor] // Docs/headers do not state that init is disallowed but if // you get an instance that way and try to use it, it will inmediatelly crash also tested in ObjC app same result interface AVMusicTrack { @@ -15303,6 +16010,46 @@ interface AVMusicTrack { [Export ("timeResolution")] nuint TimeResolution { get; } + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("usesAutomatedParameters")] + bool UsesAutomatedParameters { get; set; } + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("addEvent:atBeat:")] + void AddEvent (AVMusicEvent @event, double beat); + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("moveEventsInRange:byAmount:")] + void MoveEvents (AVBeatRange range, double beatAmount); + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("clearEventsInRange:")] + void ClearEvents (AVBeatRange range); + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("cutEventsInRange:")] + void CutEvents (AVBeatRange range); + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("copyEventsInRange:fromTrack:insertAtBeat:")] + void CopyEvents (AVBeatRange range, AVMusicTrack sourceTrack, double insertStartBeat); + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("copyAndMergeEventsInRange:fromTrack:mergeAtBeat:")] + void CopyAndMergeEvents (AVBeatRange range, AVMusicTrack sourceTrack, double mergeStartBeat); + + // from the AVMusicTrackEditor (AVMusicTrack) category + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("enumerateEventsInRange:usingBlock:")] + void EnumerateEvents (AVBeatRange range, AVMusicEventEnumerationBlock block); } [MacCatalyst (13, 1)] @@ -15340,7 +16087,6 @@ interface AVAudioUnitType { NSString MidiProcessor { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAudioUnitComponent { @@ -15375,35 +16121,35 @@ interface AVAudioUnitComponent { [Export ("audioComponent")] AudioComponent AudioComponent { get; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [MacCatalyst (15, 0), NoiOS, NoTV] [Export ("availableArchitectures")] NSNumber [] AvailableArchitectures { get; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [MacCatalyst (15, 0), NoiOS, NoTV] [Export ("userTagNames", ArgumentSemantic.Copy)] string [] UserTagNames { get; set; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [MacCatalyst (15, 0), NoiOS, NoTV] [NullAllowed, Export ("iconURL")] NSUrl IconUrl { get; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [TV (16, 0), iOS (16, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("icon")] UIImage Icon { get; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [TV (16, 0), iOS (16, 0), MacCatalyst (15, 0)] [Export ("passesAUVal")] bool PassesAUVal { get; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [MacCatalyst (15, 0), NoiOS, NoTV] [Export ("hasCustomView")] bool HasCustomView { get; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [NoTV, Mac (10, 10), iOS (16, 0), MacCatalyst (16, 0)] [Export ("configurationDictionary")] NSDictionary WeakConfigurationDictionary { get; } - [MacCatalyst (15, 0), NoiOS, NoTV, NoWatch] + [MacCatalyst (15, 0), NoiOS, NoTV] [Export ("supportsNumberInputChannels:outputChannels:")] bool SupportsNumberInputChannels (nint numInputChannels, nint numOutputChannels); @@ -15420,7 +16166,6 @@ interface AVAudioUnitComponent { delegate bool AVAudioUnitComponentFilter (AVAudioUnitComponent comp, ref bool stop); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // for binary compatibility this is added in AVCompat.cs w/[Obsolete] @@ -15446,7 +16191,7 @@ interface AVAudioUnitComponentManager { AVAudioUnitComponent [] GetComponents (AudioComponentDescription desc); [Notification] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("AVAudioUnitComponentManagerRegistrationsChangedNotification")] NSString RegistrationsChangedNotification { get; } @@ -15464,8 +16209,7 @@ interface AVAudioUnitManufacturerName { /// Apple documentation for AVCaptureMetadataInput [NoMac] [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] - [NoTV] + [TV (17, 0)] [BaseType (typeof (AVCaptureInput))] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Format description is required. interface AVCaptureMetadataInput { @@ -15483,7 +16227,6 @@ interface AVCaptureMetadataInput { bool AppendTimedMetadataGroup (AVTimedMetadataGroup metadata, out NSError outError); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVAsynchronousCIImageFilteringRequest : NSCopying { @@ -15504,7 +16247,7 @@ interface AVAsynchronousCIImageFilteringRequest : NSCopying { void Finish (NSError error); } - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15534,7 +16277,6 @@ interface AVContentProposal : NSCopying { partial interface IAVContentKeySessionDelegate { } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -15558,7 +16300,7 @@ interface AVContentKeySessionDelegate { [Export ("contentKeySessionContentProtectionSessionIdentifierDidChange:")] void DidChange (AVContentKeySession session); - [NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] [Export ("contentKeySession:didUpdatePersistableContentKey:forContentKeyIdentifier:")] void DidUpdate (AVContentKeySession session, NSData persistableContentKey, NSObject keyIdentifier); @@ -15570,15 +16312,22 @@ interface AVContentKeySessionDelegate { [MacCatalyst (13, 1)] [Export ("contentKeySessionDidGenerateExpiredSessionReport:")] void DidGenerateExpiredSessionReport (AVContentKeySession session); + + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [Export ("contentKeySession:didProvideContentKeyRequests:forInitializationData:")] + void DidProvideContentKeyRequests (AVContentKeySession session, AVContentKeyRequest [] keyRequests, [NullAllowed] NSData initializationData); + + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [Export ("contentKeySession:externalProtectionStatusDidChangeForContentKey:")] + void ExternalProtectionStatusDidChange (AVContentKeySession session, AVContentKey contentKey); } partial interface IAVContentKeyRecipient { } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Protocol] interface AVContentKeyRecipient { - [TV (14, 5), iOS (14, 5), Watch (7, 4)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("contentKeySession:didProvideContentKey:")] void DidProvideContentKey (AVContentKeySession contentKeySession, AVContentKey contentKey); @@ -15588,7 +16337,6 @@ interface AVContentKeyRecipient { bool MayRequireContentKeysForMediaDataProcessing { get; } } - [Watch (7, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -15640,13 +16388,13 @@ interface AVContentKeySession { void RenewExpiringResponseData (AVContentKeyRequest contentKeyRequest); [Async] - [NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] [Export ("makeSecureTokenForExpirationDateOfPersistableContentKey:completionHandler:")] void MakeSecureToken (NSData persistableContentKeyData, Action handler); [Async] - [NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] [Export ("invalidatePersistableContentKey:options:completionHandler:")] void InvalidatePersistableContentKey (NSData persistableContentKeyData, [NullAllowed] NSDictionary options, Action handler); @@ -15658,7 +16406,7 @@ interface AVContentKeySession { void InvalidatePersistableContentKey (NSData persistableContentKeyData, [NullAllowed] AVContentKeySessionServerPlaybackContextOptions options, Action handler); [Async] - [NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] [Export ("invalidateAllPersistableContentKeysForApp:options:completionHandler:")] void InvalidateAllPersistableContentKeys (NSData appIdentifier, [NullAllowed] NSDictionary options, Action handler); @@ -15685,7 +16433,7 @@ interface AVContentKeySession { [Static] [Internal] - [Watch (7, 0), NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] interface AVContentKeySessionServerPlaybackContextOptionKeys { [Field ("AVContentKeySessionServerPlaybackContextOptionProtocolVersions")] @@ -15696,7 +16444,7 @@ interface AVContentKeySessionServerPlaybackContextOptionKeys { } [StrongDictionary ("AVContentKeySessionServerPlaybackContextOptionKeys")] - [Watch (7, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] interface AVContentKeySessionServerPlaybackContextOptions { NSNumber [] ProtocolVersions { get; } @@ -15704,7 +16452,6 @@ interface AVContentKeySessionServerPlaybackContextOptions { NSData ServerChallenge { get; } } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVContentKeySession))] @@ -15719,69 +16466,58 @@ interface AVContentKeySession_AVContentKeyRecipients { IAVContentKeyRecipient [] GetContentKeyRecipients (); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface AVContentKeyRequest { - [Watch (7, 0)] [MacCatalyst (13, 1)] [Field ("AVContentKeyRequestProtocolVersionsKey")] NSString ProtocolVersions { get; } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Export ("status")] AVContentKeyRequestStatus Status { get; } - [Watch (7, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("error")] NSError Error { get; } - [Watch (7, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("identifier")] NSObject Identifier { get; } - [Watch (7, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("initializationData")] NSData InitializationData { get; } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Export ("canProvidePersistableContentKey")] bool CanProvidePersistableContentKey { get; } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Export ("options", ArgumentSemantic.Copy)] NSDictionary Options { get; } - [Watch (7, 0)] [MacCatalyst (13, 1)] [Async] [Export ("makeStreamingContentKeyRequestDataForApp:contentIdentifier:options:completionHandler:")] void MakeStreamingContentKeyRequestData (NSData appIdentifier, [NullAllowed] NSData contentIdentifier, [NullAllowed] NSDictionary options, Action handler); - [Watch (7, 0)] [MacCatalyst (13, 1)] [Export ("processContentKeyResponse:")] void Process (AVContentKeyResponse keyResponse); - [Watch (7, 0)] [MacCatalyst (13, 1)] [Export ("processContentKeyResponseError:")] void Process (NSError error); [Deprecated (PlatformName.iOS, 11, 2, message: "Use the 'NSError' overload instead.")] - [Export ("respondByRequestingPersistableContentKeyRequest"), NoWatch, NoTV, NoMac] + [Export ("respondByRequestingPersistableContentKeyRequest"), NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the 'NSError' overload instead.")] void RespondByRequestingPersistableContentKeyRequest (); - [Watch (7, 0), NoTV] + [TV (17, 0)] [MacCatalyst (13, 1)] [Export ("respondByRequestingPersistableContentKeyRequestAndReturnError:")] bool RespondByRequestingPersistableContentKeyRequest ([NullAllowed] out NSError error); @@ -15791,19 +16527,18 @@ interface AVContentKeyRequest { [Field ("AVContentKeyRequestRequiresValidationDataInSecureTokenKey")] NSString RequiresValidationDataInSecureTokenKey { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("contentKeySpecifier")] AVContentKeySpecifier ContentKeySpecifier { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [NullAllowed, Export ("contentKey")] AVContentKey ContentKey { get; } } [Category] - [Watch (7, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVContentKeyRequest))] interface AVContentKeyRequest_AVContentKeyRequestRenewal { @@ -15811,7 +16546,6 @@ interface AVContentKeyRequest_AVContentKeyRequestRenewal { bool GetRenewsExpiringResponseData (); } - [Watch (7, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (AVContentKeyRequest))] @@ -15822,7 +16556,6 @@ interface AVPersistableContentKeyRequest { } - [Watch (7, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -15845,7 +16578,7 @@ interface AVContentKeyResponse { AVContentKeyResponse _InitWithAuthorizationToken (NSData authorizationTokenData); } - [TV (14, 5), iOS (14, 5), Watch (7, 4)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [BaseType (typeof (NSObject))] interface AVContentKeySpecifier { @@ -15867,15 +16600,23 @@ interface AVContentKeySpecifier { NSDictionary Options { get; } } - [TV (14, 5), iOS (14, 5), Watch (7, 4)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [BaseType (typeof (NSObject))] interface AVContentKey { [Export ("contentKeySpecifier")] AVContentKeySpecifier ContentKeySpecifier { get; } + + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [Export ("externalContentProtectionStatus")] + AVExternalContentProtectionStatus ExternalContentProtectionStatus { get; } + + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [Export ("revoke")] + void Revoke (); + } - [NoWatch] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -15889,12 +16630,16 @@ interface AVRouteDetector { [Export ("multipleRoutesDetected")] bool MultipleRoutesDetected { get; } + + [MacCatalyst (16, 0), NoTV, NoMac, iOS (16, 0)] + [Export ("detectsCustomRoutes")] + bool DetectsCustomRoutes { get; set; } } interface IAVCapturePhotoFileDataRepresentationCustomizer { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoMac] + [TV (17, 0), NoMac] [Protocol] interface AVCapturePhotoFileDataRepresentationCustomizer { [Export ("replacementMetadataForPhoto:")] @@ -15920,14 +16665,14 @@ interface AVCapturePhotoFileDataRepresentationCustomizer { AVSemanticSegmentationMatte GetReplacementSemanticSegmentationMatte (NSString semanticSegmentationMatteType, AVCapturePhoto photo); [Introduced (PlatformName.MacCatalyst, 14, 3)] - [NoWatch, NoTV, NoMac, iOS (14, 3)] + [NoMac, iOS (14, 3)] [Export ("replacementAppleProRAWCompressionSettingsForPhoto:defaultSettings:maximumBitDepth:")] NSDictionary GetReplacementAppleProRawCompressionSettings (AVCapturePhoto photo, NSDictionary defaultSettings, nint maximumBitDepth); } /// Stores captured photo data. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoTV, NoWatch] + [TV (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCapturePhoto { @@ -16012,6 +16757,7 @@ interface AVCapturePhoto { [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetFileDataRepresentation' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GetFileDataRepresentation' instead.")] + [Deprecated (PlatformName.TvOS, 17, 0, message: "Use 'GetFileDataRepresentation' instead.")] [Export ("fileDataRepresentationWithReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData:")] [return: NullAllowed] NSData GetFileDataRepresentation ([NullAllowed] NSDictionary replacementMetadata, [NullAllowed] NSDictionary replacementEmbeddedThumbnailPhotoFormat, [NullAllowed] CVPixelBuffer replacementEmbeddedThumbnailPixelBuffer, [NullAllowed] AVDepthData replacementDepthData); @@ -16022,26 +16768,38 @@ interface AVCapturePhoto { [NullAllowed, Export ("previewCGImageRepresentation")] CGImage PreviewCGImageRepresentation { get; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [NullAllowed, Export ("portraitEffectsMatte")] AVPortraitEffectsMatte PortraitEffectsMatte { get; } - [NoWatch, NoTV, NoMac] + [NoMac] [MacCatalyst (14, 0)] [Export ("fileDataRepresentationWithCustomizer:")] [return: NullAllowed] NSData GetFileDataRepresentation (IAVCapturePhotoFileDataRepresentationCustomizer customizer); - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [Export ("semanticSegmentationMatteForType:")] [return: NullAllowed] AVSemanticSegmentationMatte GetSemanticSegmentationMatte ([BindAs (typeof (AVSemanticSegmentationMatteType))] NSString semanticSegmentationMatteType); + + [NullAllowed] + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("constantColorConfidenceMap")] + CVPixelBuffer ConstantColorConfidenceMap { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("constantColorCenterWeightedMeanConfidenceLevel")] + float ConstantColorCenterWeightedMeanConfidenceLevel { get; } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("constantColorFallbackPhoto")] + bool ConstantColorFallbackPhoto { [Bind ("isConstantColorFallbackPhoto")] get; } } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (6, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVPortraitEffectsMatte { @@ -16068,7 +16826,6 @@ interface AVPortraitEffectsMatte { CVPixelBuffer MattingImage { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -16078,7 +16835,7 @@ interface AVAssetResourceLoadingRequestor { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] enum AVSemanticSegmentationMatteType { [DefaultEnumValue] [Field (null)] @@ -16091,14 +16848,13 @@ enum AVSemanticSegmentationMatteType { Teeth, [Introduced (PlatformName.MacCatalyst, 14, 1)] [iOS (14, 1)] - [Watch (8, 0)] [TV (15, 0)] [Field ("AVSemanticSegmentationMatteTypeGlasses")] Glasses, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVSemanticSegmentationMatte { @@ -16130,7 +16886,7 @@ interface AVSemanticSegmentationMatte { CVPixelBuffer MattingImage { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -16150,7 +16906,7 @@ interface AVCompositionTrackFormatDescriptionReplacement : NSSecureCoding { /// The that contains the supplied audio data when the callback returns. This is a handle for an value. delegate /* OSStatus */ int AVAudioSourceNodeRenderHandlerRaw (IntPtr isSilence, IntPtr timestamp, uint frameCount, IntPtr outputData); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioNode))] [DisableDefaultCtor] @@ -16171,7 +16927,7 @@ interface AVAudioSourceNode : AVAudioMixing { delegate int AVAudioSinkNodeReceiverHandlerRaw (IntPtr timestamp, uint frameCount, IntPtr inputData); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (AVAudioNode))] [DisableDefaultCtor] @@ -16181,7 +16937,7 @@ interface AVAudioSinkNode { NativeHandle Constructor (AVAudioSinkNodeReceiverHandlerRaw receiverHandler); } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface AVVideoCompositionRenderHint { @@ -16193,7 +16949,7 @@ interface AVVideoCompositionRenderHint { CMTime EndCompositionTime { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [TV (17, 0), NoMac, iOS (13, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (AVCaptureSession))] interface AVCaptureMultiCamSession { @@ -16208,8 +16964,7 @@ interface AVCaptureMultiCamSession { float SystemPressureCost { get; } } - [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [MacCatalyst (14, 0), TV (17, 0), iOS (13, 0)] [BaseType (typeof (AVMetadataObject))] [DisableDefaultCtor] interface AVMetadataBodyObject : NSCopying { @@ -16218,28 +16973,28 @@ interface AVMetadataBodyObject : NSCopying { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [BaseType (typeof (AVMetadataBodyObject))] [DisableDefaultCtor] interface AVMetadataCatBodyObject : NSCopying { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [BaseType (typeof (AVMetadataBodyObject))] [DisableDefaultCtor] interface AVMetadataDogBodyObject : NSCopying { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [BaseType (typeof (AVMetadataBodyObject))] [DisableDefaultCtor] interface AVMetadataHumanBodyObject : NSCopying { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [BaseType (typeof (AVMetadataObject))] [DisableDefaultCtor] interface AVMetadataSalientObject : NSCopying { @@ -16247,7 +17002,7 @@ interface AVMetadataSalientObject : NSCopying { nint ObjectId { get; } } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -16259,7 +17014,7 @@ interface AVAssetSegmentReport { AVAssetSegmentTrackReport [] TrackReports { get; } } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -16277,7 +17032,7 @@ interface AVAssetSegmentReportSampleInformation { bool IsSyncSample { get; } } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -16299,7 +17054,7 @@ interface AVAssetSegmentTrackReport { AVAssetSegmentReportSampleInformation FirstVideoSampleInformation { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAudioRoutingArbiter { @@ -16314,7 +17069,7 @@ interface AVAudioRoutingArbiter { void LeaveArbitration (); } - [NoWatch, NoTV] + [TV (17, 0)] [iOS (14, 5)] [MacCatalyst (14, 5)] [Mac (12, 3)] @@ -16325,7 +17080,7 @@ public enum AVCaptureCenterStageControlMode : long { Cooperative = 2, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAssetDownloadConfiguration { @@ -16346,7 +17101,7 @@ interface AVAssetDownloadConfiguration { bool OptimizesAuxiliaryContentConfigurations { get; set; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface AVAssetDownloadContentConfiguration : NSCopying { [Export ("variantQualifiers", ArgumentSemantic.Copy)] @@ -16356,7 +17111,7 @@ interface AVAssetDownloadContentConfiguration : NSCopying { AVMediaSelection [] MediaSelections { get; set; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAssetVariant { @@ -16374,7 +17129,7 @@ interface AVAssetVariant { } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAssetVariantAudioAttributes { @@ -16386,14 +17141,26 @@ interface AVAssetVariantAudioAttributes { AVAssetVariantAudioRenditionSpecificAttributes GetRenditionSpecificAttributes (AVMediaSelectionOption mediaSelectionOption); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface AVAssetVariantAudioRenditionSpecificAttributes { [Export ("channelCount")] nint ChannelCount { get; } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("binaural")] + bool Binaural { [Bind ("isBinaural")] get; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("immersive")] + bool Immersive { [Bind ("isImmersive")] get; } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Export ("downmix")] + bool Downmix { [Bind ("isDownmix")] get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAssetVariantQualifier : NSCopying { @@ -16418,9 +17185,29 @@ interface AVAssetVariantQualifier : NSCopying { [Static] [Export ("predicateForPresentationHeight:operatorType:")] NSPredicate GetPredicateForPresentationHeight (nfloat height, NSPredicateOperatorType operatorType); + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Static] + [Export ("predicateForBinauralAudio:mediaSelectionOption:")] + NSPredicate GetPredicateForBinauralAudio (bool isBinauralAudio, AVMediaSelectionOption mediaSelectionOption); + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Static] + [Export ("predicateForImmersiveAudio:mediaSelectionOption:")] + NSPredicate GetPredicateForImmersiveAudio (bool isImmersiveAudio, AVMediaSelectionOption mediaSelectionOption); + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Static] + [Export ("predicateForDownmixAudio:mediaSelectionOption:")] + NSPredicate GetPredicateForDownmixAudio (bool isDownmixAudio, AVMediaSelectionOption mediaSelectionOption); + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Static] + [Export ("predicateForAudioSampleRate:mediaSelectionOption:operatorType:")] + NSPredicate GetPredicateForAudioSampleRate (double sampleRate, AVMediaSelectionOption mediaSelectionOption, NSPredicateOperatorType operatorType); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAssetVariantVideoAttributes { @@ -16435,9 +17222,13 @@ interface AVAssetVariantVideoAttributes { [Export ("nominalFrameRate")] double NominalFrameRate { get; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("videoLayoutAttributes")] + AVAssetVariantVideoLayoutAttributes [] VideoLayoutAttributes { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface AVCoordinatedPlaybackParticipant { [Export ("suspensionReasons")] @@ -16450,7 +17241,7 @@ interface AVCoordinatedPlaybackParticipant { NSUuid Identifier { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCoordinatedPlaybackSuspension { @@ -16469,7 +17260,7 @@ interface AVCoordinatedPlaybackSuspension { interface IAVPlaybackCoordinatorPlaybackControlDelegate { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -16495,7 +17286,7 @@ interface AVPlaybackCoordinatorPlaybackControlDelegate { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (AVPlaybackCoordinator))] [DisableDefaultCtor] // throws exception interface AVDelegatingPlaybackCoordinator { @@ -16525,7 +17316,7 @@ interface AVDelegatingPlaybackCoordinator { void ReapplyCurrentItemStateToPlaybackControlDelegate (); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (AVDelegatingPlaybackCoordinatorPlaybackControlCommand))] [DisableDefaultCtor] interface AVDelegatingPlaybackCoordinatorBufferingCommand { @@ -16536,7 +17327,7 @@ interface AVDelegatingPlaybackCoordinatorBufferingCommand { NSDate CompletionDueDate { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (AVDelegatingPlaybackCoordinatorPlaybackControlCommand))] [DisableDefaultCtor] interface AVDelegatingPlaybackCoordinatorPauseCommand { @@ -16547,7 +17338,7 @@ interface AVDelegatingPlaybackCoordinatorPauseCommand { float AnticipatedPlaybackRate { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (AVDelegatingPlaybackCoordinatorPlaybackControlCommand))] [DisableDefaultCtor] interface AVDelegatingPlaybackCoordinatorPlayCommand { @@ -16561,7 +17352,7 @@ interface AVDelegatingPlaybackCoordinatorPlayCommand { CMTime HostClockTime { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVDelegatingPlaybackCoordinatorPlaybackControlCommand { @@ -16572,7 +17363,7 @@ interface AVDelegatingPlaybackCoordinatorPlaybackControlCommand { string ExpectedCurrentItemIdentifier { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (AVDelegatingPlaybackCoordinatorPlaybackControlCommand))] [DisableDefaultCtor] interface AVDelegatingPlaybackCoordinatorSeekCommand { @@ -16589,7 +17380,7 @@ interface AVDelegatingPlaybackCoordinatorSeekCommand { NSDate CompletionDueDate { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVPlaybackCoordinator { @@ -16630,7 +17421,7 @@ interface AVPlaybackCoordinator { interface IAVPlayerPlaybackCoordinatorDelegate { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -16641,12 +17432,12 @@ interface AVPlayerPlaybackCoordinatorDelegate { [Export ("playbackCoordinator:identifierForPlayerItem:")] string GetIdentifier (AVPlayerPlaybackCoordinator coordinator, AVPlayerItem playerItem); - [TV (15, 4), NoWatch, Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] + [TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] [Export ("playbackCoordinator:interstitialTimeRangesForPlayerItem:")] NSValue [] GetInterstitialTimeRanges (AVPlayerPlaybackCoordinator coordinator, AVPlayerItem playerItem); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (AVPlaybackCoordinator))] [DisableDefaultCtor] interface AVPlayerPlaybackCoordinator { @@ -16663,14 +17454,14 @@ interface AVPlayerPlaybackCoordinator { interface IAVAssetReaderCaptionValidationHandling { } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [iOS (18, 0), NoTV, MacCatalyst (15, 0)] [Protocol] interface AVAssetReaderCaptionValidationHandling { [Export ("captionAdaptor:didVendCaption:skippingUnsupportedSourceSyntaxElements:")] void DidVendCaption (AVAssetReaderOutputCaptionAdaptor adaptor, AVCaption caption, string [] syntaxElements); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAssetReaderOutputCaptionAdaptor { @@ -16684,12 +17475,12 @@ interface AVAssetReaderOutputCaptionAdaptor { [Export ("assetReaderTrackOutput")] AVAssetReaderTrackOutput AssetReaderTrackOutput { get; } - [NoMacCatalyst] + [MacCatalyst (15, 0)] [Export ("nextCaptionGroup")] [return: NullAllowed] AVCaptionGroup GetNextCaptionGroup (); - [NoMacCatalyst] + [MacCatalyst (15, 0)] [Export ("captionsNotPresentInPreviousGroupsInCaptionGroup:")] AVCaption [] GetCaptionsNotPresentInPreviousGroups (AVCaptionGroup captionGroup); @@ -16702,7 +17493,7 @@ interface AVAssetReaderOutputCaptionAdaptor { NSObject WeakValidationDelegate { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVAssetWriterInputCaptionAdaptor { @@ -16716,16 +17507,14 @@ interface AVAssetWriterInputCaptionAdaptor { [Export ("assetWriterInput")] AVAssetWriterInput AssetWriterInput { get; } - [NoMacCatalyst] [Export ("appendCaption:")] bool AppendCaption (AVCaption caption); - [NoMacCatalyst] [Export ("appendCaptionGroup:")] bool AppendCaptionGroup (AVCaptionGroup captionGroup); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptionGroup { @@ -16742,7 +17531,7 @@ interface AVCaptionGroup { AVCaption [] Captions { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaption : NSCopying, NSMutableCopying, NSSecureCoding { @@ -16794,8 +17583,7 @@ interface AVCaption : NSCopying, NSMutableCopying, NSSecureCoding { AVCaptionRuby GetRuby (nint index, [NullAllowed] out NSRange outRange); } - [NoWatch, NoTV, NoiOS] - [NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [DisableDefaultCtor] [BaseType (typeof (AVCaption))] interface AVMutableCaption { @@ -16865,8 +17653,7 @@ interface AVMutableCaption { AVCaptionAnimation Animation { get; set; } } - [NoWatch, NoTV, NoiOS] - [NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] interface AVCaptionRegion : NSCopying, NSMutableCopying, NSSecureCoding { [Static] @@ -16892,7 +17679,7 @@ interface AVCaptionRegion : NSCopying, NSMutableCopying, NSSecureCoding { [NullAllowed, Export ("identifier")] string Identifier { get; } -#if MONOMAC // needed because the structs are inside a #if too +#if !TVOS [Export ("origin")] AVCaptionPoint Origin { get; } @@ -16910,19 +17697,19 @@ interface AVCaptionRegion : NSCopying, NSMutableCopying, NSSecureCoding { #endif } - [NoWatch, NoTV, NoiOS] - [NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (AVCaptionRegion))] interface AVMutableCaptionRegion { [Export ("initWithIdentifier:")] NativeHandle Constructor (string identifier); -#if MONOMAC // needed structs are inside a #if +#if !TVOS [Export ("origin", ArgumentSemantic.Assign)] AVCaptionPoint Origin { get; set; } [Export ("size", ArgumentSemantic.Assign)] AVCaptionSize Size { get; set; } +#endif [Export ("scroll", ArgumentSemantic.Assign)] AVCaptionRegionScroll Scroll { get; set; } @@ -16932,10 +17719,9 @@ interface AVMutableCaptionRegion { [Export ("writingMode", ArgumentSemantic.Assign)] AVCaptionRegionWritingMode WritingMode { get; set; } -#endif } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptionRuby : NSCopying, NSSecureCoding { @@ -16956,7 +17742,7 @@ interface AVCaptionRuby : NSCopying, NSSecureCoding { AVCaptionRubyAlignment Alignment { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptionRendererScene : NSCopying { @@ -16970,7 +17756,7 @@ interface AVCaptionRendererScene : NSCopying { bool NeedsPeriodicRefresh { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] interface AVCaptionRenderer { [Export ("captions", ArgumentSemantic.Copy)] @@ -16986,7 +17772,7 @@ interface AVCaptionRenderer { void Render (CGContext ctx, CMTime time); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] interface AVCaptionGrouper { [Export ("addCaption:")] @@ -16996,8 +17782,7 @@ interface AVCaptionGrouper { AVCaptionGroup [] FlushAddedCaptionsIntoGroupsUpToTime (CMTime upToTime); } - - [NoiOS, NoTV, NoMacCatalyst, NoWatch] + [iOS (18, 0), NoTV, MacCatalyst (15, 0)] [Static] [Internal] interface AVCaptionSettingsKeys { @@ -17014,7 +17799,7 @@ interface AVCaptionSettingsKeys { NSString UseDropFrameTimeCodeKey { get; } } - [NoiOS, NoTV, NoMacCatalyst, NoWatch] + [iOS (18, 0), NoTV, MacCatalyst (15, 0)] [StrongDictionary ("AVCaptionSettingsKeys")] interface AVCaptionSettings { AVMediaTypes MediaSubType { get; set; } @@ -17024,7 +17809,7 @@ interface AVCaptionSettings { } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptionFormatConformer { @@ -17052,13 +17837,13 @@ interface AVCaptionFormatConformer { AVCaption GetConformedCaption (AVCaption caption, [NullAllowed] out NSError outError); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, iOS (18, 0), MacCatalyst (15, 0)] enum AVCaptionConversionWarningType { [Field ("AVCaptionConversionWarningTypeExcessMediaData")] ExcessMediaData, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptionConversionWarning { @@ -17072,7 +17857,7 @@ interface AVCaptionConversionWarning { AVCaptionConversionAdjustment Adjustment { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptionConversionValidator { @@ -17102,7 +17887,7 @@ interface AVCaptionConversionValidator { AVCaptionConversionWarning [] Warnings { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (AVCaptionConversionAdjustment))] [DisableDefaultCtor] interface AVCaptionConversionTimeRangeAdjustment { @@ -17113,13 +17898,13 @@ interface AVCaptionConversionTimeRangeAdjustment { CMTime DurationOffset { get; } } - [NoiOS, NoWatch, NoTV, NoMacCatalyst] + [iOS (18, 0), MacCatalyst (15, 0), NoTV] enum AVCaptionConversionAdjustmentType { [Field ("AVCaptionConversionAdjustmentTypeTimeRange")] TimeRange, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptionConversionAdjustment { @@ -17127,7 +17912,7 @@ interface AVCaptionConversionAdjustment { string AdjustmentType { get; } } - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [iOS (18, 2), TV (18, 2), Mac (15, 2), MacCatalyst (18, 2)] [Native] enum AVAudioSessionMicrophoneInjectionMode : long { None = 0, @@ -17142,7 +17927,7 @@ public enum AVAudioApplicationRecordPermission : long { Granted = ('g' << 24) + ('r' << 16) + ('n' << 8) + 't', // 'grnt' } - [iOS (18, 2), NoTV, NoMac, NoMacCatalyst] + [iOS (18, 2), TV (18, 2), Mac (15, 2), MacCatalyst (18, 2)] [Native] public enum AVAudioApplicationMicrophoneInjectionPermission : long { ServiceDisabled = ('s' << 24) + ('r' << 16) + ('d' << 8) + 's', // 'srds' @@ -17179,15 +17964,1480 @@ interface AVAudioApplication { [Async] void RequestRecordPermission (Action response); - [NoTV, NoMac, NoMacCatalyst, iOS (18, 2)] + [NoTV, NoMac, MacCatalyst (18, 2), iOS (18, 2)] [Export ("microphoneInjectionPermission")] AVAudioApplicationMicrophoneInjectionPermission MicrophoneInjectionPermission { get; } - [NoTV, NoMac, NoMacCatalyst, iOS (18, 2)] + [NoTV, NoMac, MacCatalyst (18, 2), iOS (18, 2)] [Static] [Export ("requestMicrophoneInjectionPermissionWithCompletionHandler:")] [Async] void RequestMicrophoneInjectionPermission (Action response); + + [Notification] + [Field ("AVAudioApplicationInputMuteStateChangeNotification")] + NSString InputMuteStateChangeNotification { get; } + + [Field ("AVAudioApplicationMuteStateKey")] + NSString MuteStateKey { get; } + } + + [TV (17, 0), NoMacCatalyst, NoMac, NoiOS] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVContinuityDevice { + [Export ("connectionID")] + NSUuid ConnectionId { get; } + + [Export ("connected")] + bool Connected { [Bind ("isConnected")] get; } + + [Export ("videoDevices")] + AVCaptureDevice [] VideoDevices { get; } + + [Export ("audioSessionInputs")] + AVAudioSessionPortDescription [] AudioSessionInputs { get; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVAssetPlaybackAssistant { + [Static] + [Export ("assetPlaybackAssistantWithAsset:")] + AVAssetPlaybackAssistant Create (AVAsset asset); + + [Async] + [Export ("loadPlaybackConfigurationOptionsWithCompletionHandler:")] + void LoadPlaybackConfigurationOptions (AVAssetPlaybackAssistantLoadPlaybackConfigurationOptionsHandler completionHandler); + } + + delegate void AVAssetPlaybackAssistantLoadPlaybackConfigurationOptionsHandler (/* [BindAs (typeof (AVAssetPlaybackConfigurationOption[]))] - doesn't work in delegate */ string [] playbackConfigurationOptions); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVSampleBufferGeneratorBatch { + [Async] + [Export ("makeDataReadyWithCompletionHandler:")] + void MakeDataReady (AVSampleBufferGeneratorBatchMakeReadyCallback completionHandler); + + [Export ("cancel")] + void Cancel (); + } + + delegate void AVSampleBufferGeneratorBatchMakeReadyCallback ([NullAllowed] NSError error); + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVAssetVariantVideoLayoutAttributes { + [Export ("stereoViewComponents")] + CMStereoViewComponents StereoViewComponents { get; } + } + + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVAssetWriterInputTaggedPixelBufferGroupAdaptor { + [Static] + [Export ("assetWriterInputTaggedPixelBufferGroupAdaptorWithAssetWriterInput:sourcePixelBufferAttributes:")] + AVAssetWriterInputTaggedPixelBufferGroupAdaptor Create (AVAssetWriterInput input, [NullAllowed] NSDictionary sourcePixelBufferAttributes); + + [Export ("initWithAssetWriterInput:sourcePixelBufferAttributes:")] + [DesignatedInitializer] + NativeHandle Constructor (AVAssetWriterInput input, [NullAllowed] NSDictionary sourcePixelBufferAttributes); + + [Export ("assetWriterInput")] + AVAssetWriterInput AssetWriterInput { get; } + + [NullAllowed, Export ("sourcePixelBufferAttributes")] + NSDictionary SourcePixelBufferAttributes { get; } + + [NullAllowed, Export ("pixelBufferPool")] + CVPixelBufferPool PixelBufferPool { get; } + + [Export ("appendTaggedPixelBufferGroup:withPresentationTime:")] + bool Append (CMTaggedBufferGroup taggedPixelBufferGroup, CMTime presentationTime); + } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVExternalStorageDevice { + [NullAllowed, Export ("displayName")] + string DisplayName { get; } + + [Export ("freeSize")] + nint FreeSize { get; } + + [Export ("totalSize")] + nint TotalSize { get; } + + [Export ("connected")] + bool Connected { [Bind ("isConnected")] get; } + + [NullAllowed, Export ("uuid")] + NSUuid Uuid { get; } + + [Export ("notRecommendedForCaptureUse")] + bool NotRecommendedForCaptureUse { [Bind ("isNotRecommendedForCaptureUse")] get; } + + [Export ("nextAvailableURLsWithPathExtensions:error:")] + [return: NullAllowed] + NSUrl [] GetNextAvailableUrls (string [] extensionArray, [NullAllowed] out NSError outError); + + // from the AVExternalStorageDeviceAuthorization (AVExternalStorageDevice) category + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Static] + [Export ("authorizationStatus")] + AVAuthorizationStatus AuthorizationStatus { get; } + + // from the AVExternalStorageDeviceAuthorization (AVExternalStorageDevice) category + [Async] + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Static] + [Export ("requestAccessWithCompletionHandler:")] + void RequestAccess (AVExternalStorageDeviceRequestAccessCallback handler); + } + + delegate void AVExternalStorageDeviceRequestAccessCallback (bool granted); + + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVPlayerVideoOutputConfiguration { + [NullAllowed, Export ("sourcePlayerItem", ArgumentSemantic.Weak)] + AVPlayerItem SourcePlayerItem { get; } + + [Export ("dataChannelDescriptions", ArgumentSemantic.Copy)] + NSObject [] DataChannelDescriptions { get; } + + [Export ("activationTime")] + CMTime ActivationTime { get; } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("preferredTransform")] + CGAffineTransform PreferredTransform { get; } + } + + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVPlayerVideoOutput { + [Export ("initWithSpecification:")] + NativeHandle Constructor (AVVideoOutputSpecification specification); + + [Export ("copyTaggedBufferGroupForHostTime:presentationTimeStamp:activeConfiguration:")] + [return: NullAllowed] + [return: Release] + CMTaggedBufferGroup CopyTaggedBufferGroup (CMTime hostTime, [NullAllowed] out CMTime presentationTimeStamp, [NullAllowed] out AVPlayerVideoOutputConfiguration activeConfiguration); + } + + [TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVZoomRange { + [Export ("minZoomFactor")] + nfloat MinZoomFactor { get; } + + [Export ("maxZoomFactor")] + nfloat MaxZoomFactor { get; } + + [Export ("containsZoomFactor:")] + bool ContainsZoomFactor (nfloat zoomFactor); + } + + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVVideoOutputSpecification : NSCopying { + [Export ("initWithTagCollections:")] + [DesignatedInitializer] + NativeHandle Constructor (NSObject [] tagCollections); + + [Export ("preferredTagCollections", ArgumentSemantic.Copy)] + NSObject [] PreferredTagCollections { get; } + + [Deprecated (PlatformName.MacOSX, 15, 2)] + [Deprecated (PlatformName.iOS, 18, 2)] + [Deprecated (PlatformName.TvOS, 18, 2)] + [Deprecated (PlatformName.MacCatalyst, 18, 2)] + [NullAllowed, Export ("defaultPixelBufferAttributes", ArgumentSemantic.Copy)] + NSDictionary DefaultPixelBufferAttributes { get; set; } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [NullAllowed, Export ("defaultOutputSettings", ArgumentSemantic.Copy)] + NSDictionary DefaultOutputSettings { get; set; } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Export ("setOutputSettings:forTagCollection:")] + void SetOutputSettings ([NullAllowed] NSDictionary outputSettings, CMTagCollection tagCollection); + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (NSObject))] + interface AVMusicEvent { } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent))] + interface AVAUPresetEvent { + [Export ("initWithScope:element:dictionary:")] + NativeHandle Constructor (uint scope, uint element, NSDictionary presetDictionary); + + [Export ("scope")] + uint Scope { get; set; } + + [Export ("element")] + uint Element { get; set; } + + [Export ("presetDictionary", ArgumentSemantic.Copy)] + NSDictionary PresetDictionary { get; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent))] + interface AVExtendedNoteOnEvent { + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Field ("AVExtendedNoteOnEventDefaultInstrument")] + uint DefaultInstrument { get; } + + [Export ("initWithMIDINote:velocity:groupID:duration:")] + NativeHandle Constructor (float midiNote, float velocity, uint groupId, double duration); + + [Export ("initWithMIDINote:velocity:instrumentID:groupID:duration:")] + NativeHandle Constructor (float midiNote, float velocity, uint instrumentId, uint groupId, double duration); + + [Export ("midiNote")] + float MidiNote { get; set; } + + [Export ("velocity")] + float Velocity { get; set; } + + [Export ("instrumentID")] + uint InstrumentId { get; set; } + + [Export ("groupID")] + uint GroupId { get; set; } + + [Export ("duration")] + double Duration { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent))] + interface AVExtendedTempoEvent { + [Export ("initWithTempo:")] + NativeHandle Constructor (double tempo); + + [Export ("tempo")] + double Tempo { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent), Name = "AVMIDIChannelEvent")] + interface AVMidiChannelEvent { + [Export ("channel")] + uint Channel { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMidiChannelEvent), Name = "AVMIDIChannelPressureEvent")] + interface AVMidiChannelPressureEvent { + [Export ("initWithChannel:pressure:")] + NativeHandle Constructor (uint channel, uint pressure); + + [Export ("pressure")] + uint Pressure { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMidiChannelEvent), Name = "AVMIDIControlChangeEvent")] + interface AVMidiControlChangeEvent { + [Export ("initWithChannel:messageType:value:")] + NativeHandle Constructor (uint channel, AVMidiControlChangeMessageType messageType, uint value); + + [Export ("messageType")] + AVMidiControlChangeMessageType MessageType { get; } + + [Export ("value")] + uint Value { get; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent), Name = "AVMIDIMetaEvent")] + interface AVMidiMetaEvent { + [Export ("initWithType:data:")] + NativeHandle Constructor (AVMidiMetaEventType type, NSData data); + + [Export ("type")] + AVMidiMetaEventType Type { get; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent), Name = "AVMIDINoteEvent")] + interface AVMidiNoteEvent { + [Export ("initWithChannel:key:velocity:duration:")] + NativeHandle Constructor (uint channel, uint keyNum, uint velocity, double duration); + + [Export ("channel")] + uint Channel { get; set; } + + [Export ("key")] + uint Key { get; set; } + + [Export ("velocity")] + uint Velocity { get; set; } + + [Export ("duration")] + double Duration { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMidiChannelEvent), Name = "AVMIDIPitchBendEvent")] + interface AVMidiPitchBendEvent { + [Export ("initWithChannel:value:")] + NativeHandle Constructor (uint channel, uint value); + + [Export ("value")] + uint Value { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMidiChannelEvent), Name = "AVMIDIPolyPressureEvent")] + interface AVMidiPolyPressureEvent { + [Export ("initWithChannel:key:pressure:")] + NativeHandle Constructor (uint channel, uint key, uint pressure); + + [Export ("key")] + uint Key { get; set; } + + [Export ("pressure")] + uint Pressure { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMidiChannelEvent), Name = "AVMIDIProgramChangeEvent")] + interface AVMidiProgramChangeEvent { + [Export ("initWithChannel:programNumber:")] + NativeHandle Constructor (uint channel, uint programNumber); + + [Export ("programNumber")] + uint ProgramNumber { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent), Name = "AVMIDISysexEvent")] + interface AVMidiSysexEvent { + [Export ("initWithData:")] + NativeHandle Constructor (NSData data); + + [Export ("sizeInBytes")] + uint SizeInBytes { get; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent))] + interface AVParameterEvent { + [Export ("initWithParameterID:scope:element:value:")] + NativeHandle Constructor (uint parameterId, uint scope, uint element, float value); + + [Export ("parameterID")] + uint ParameterId { get; set; } + + [Export ("scope")] + uint Scope { get; set; } + + [Export ("element")] + uint Element { get; set; } + + [Export ("value")] + float Value { get; set; } + } + + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVVideoPerformanceMetrics { + [Export ("totalNumberOfFrames")] + nint TotalNumberOfFrames { get; } + + [Export ("numberOfDroppedFrames")] + nint NumberOfDroppedFrames { get; } + + [Export ("numberOfCorruptedFrames")] + nint NumberOfCorruptedFrames { get; } + + [Export ("numberOfFramesDisplayedUsingOptimizedCompositing")] + nint NumberOfFramesDisplayedUsingOptimizedCompositing { get; } + + [Export ("totalAccumulatedFrameDelay")] + double TotalAccumulatedFrameDelay { get; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AVMusicEvent))] + interface AVMusicUserEvent { + [Export ("initWithData:")] + NativeHandle Constructor (NSData data); + + [Export ("sizeInBytes")] + uint SizeInBytes { get; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (NSObject))] + interface AVSpeechSynthesisMarker : NSSecureCoding, NSCopying { + [Export ("mark", ArgumentSemantic.Assign)] + AVSpeechSynthesisMarkerMark Mark { get; set; } + + [Export ("byteSampleOffset")] + nuint ByteSampleOffset { get; set; } + + [Export ("textRange", ArgumentSemantic.Assign)] + NSRange TextRange { get; set; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("bookmarkName")] + string BookmarkName { get; set; } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("phoneme")] + string Phoneme { get; set; } + + [Export ("initWithMarkerType:forTextRange:atByteSampleOffset:")] + NativeHandle Constructor (AVSpeechSynthesisMarkerMark type, NSRange range, nuint byteSampleOffset); + + [Internal] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("initWithWordRange:atByteSampleOffset:")] + NativeHandle _InitWithWordRange (NSRange range, nint byteSampleOffset); + + [Internal] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("initWithSentenceRange:atByteSampleOffset:")] + NativeHandle _InitWithSentenceRange (NSRange range, nint byteSampleOffset); + + [Internal] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("initWithParagraphRange:atByteSampleOffset:")] + NativeHandle _InitWithParagraphRange (NSRange range, nint byteSampleOffset); + + [Internal] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("initWithPhonemeString:atByteSampleOffset:")] + NativeHandle _InitWithPhonemeString (string phoneme, nint byteSampleOffset); + + [Internal] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Export ("initWithBookmarkName:atByteSampleOffset:")] + NativeHandle _InitWithBookmarkName (string mark, nint byteSampleOffset); + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + delegate void AVSpeechSynthesisProviderOutputBlock (AVSpeechSynthesisMarker [] markers, AVSpeechSynthesisProviderRequest request); + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (AUAudioUnit))] + [DisableDefaultCtor] // introspection: Name: NSInvalidArgumentException Reason: Don't call -[AUAudioUnit init]. + interface AVSpeechSynthesisProviderAudioUnit { + // re-exposed from base class + [Export ("initWithComponentDescription:options:error:")] + [DesignatedInitializer] + [Internal] + NativeHandle _InitWithComponentDescription (AudioComponentDescription componentDescription, AudioComponentInstantiationOptions options, [NullAllowed] out NSError outError); + + [Export ("speechVoices", ArgumentSemantic.Strong)] + AVSpeechSynthesisProviderVoice [] SpeechVoices { get; set; } + + [NullAllowed, Export ("speechSynthesisOutputMetadataBlock", ArgumentSemantic.Copy)] + AVSpeechSynthesisProviderOutputBlock SpeechSynthesisOutputMetadataBlock { get; set; } + + [Export ("synthesizeSpeechRequest:")] + void SynthesizeSpeechRequest (AVSpeechSynthesisProviderRequest speechRequest); + + [Export ("cancelSpeechRequest")] + void CancelSpeechRequest (); + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVSpeechSynthesisProviderRequest : NSSecureCoding, NSCopying { + [Export ("ssmlRepresentation")] + string SsmlRepresentation { get; } + + [Export ("voice")] + AVSpeechSynthesisProviderVoice Voice { get; } + + [Export ("initWithSSMLRepresentation:voice:")] + NativeHandle Constructor (string ssmlRepresentation, AVSpeechSynthesisProviderVoice voice); + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVSpeechSynthesisProviderVoice : NSSecureCoding, NSCopying { + [Export ("name")] + string Name { get; } + + [Export ("identifier")] + string Identifier { get; } + + [Export ("primaryLanguages")] + string [] PrimaryLanguages { get; } + + [Export ("supportedLanguages")] + string [] SupportedLanguages { get; } + + [Export ("voiceSize")] + long VoiceSize { get; set; } + + [Export ("version", ArgumentSemantic.Strong)] + string Version { get; set; } + + [Export ("gender", ArgumentSemantic.Assign)] + AVSpeechSynthesisVoiceGender Gender { get; set; } + + [Export ("age")] + nint Age { get; set; } + + [Export ("initWithName:identifier:primaryLanguages:supportedLanguages:")] + NativeHandle Constructor (string name, string identifier, string [] primaryLanguages, string [] supportedLanguages); + + [Static] + [Export ("updateSpeechVoices")] + void UpdateSpeechVoices (); } + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVCaptureDeviceRotationCoordinator { + [Export ("initWithDevice:previewLayer:")] + NativeHandle Constructor (AVCaptureDevice device, [NullAllowed] CALayer previewLayer); + + [NullAllowed, Export ("device", ArgumentSemantic.Weak)] + AVCaptureDevice Device { get; } + + [NullAllowed, Export ("previewLayer", ArgumentSemantic.Weak)] + CALayer PreviewLayer { get; } + + [Export ("videoRotationAngleForHorizonLevelPreview")] + nfloat VideoRotationAngleForHorizonLevelPreview { get; } + + [Export ("videoRotationAngleForHorizonLevelCapture")] + nfloat VideoRotationAngleForHorizonLevelCapture { get; } + } + + interface IAVCapturePhotoOutputReadinessCoordinatorDelegate { } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false), Model] + [BaseType (typeof (NSObject))] + interface AVCapturePhotoOutputReadinessCoordinatorDelegate { + [Export ("readinessCoordinator:captureReadinessDidChange:")] + void CaptureReadinessDidChange (AVCapturePhotoOutputReadinessCoordinator coordinator, AVCapturePhotoOutputCaptureReadiness captureReadiness); + } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVCapturePhotoOutputReadinessCoordinator { + [Export ("initWithPhotoOutput:")] + NativeHandle Constructor (AVCapturePhotoOutput photoOutput); + + [Wrap ("WeakDelegate")] + [NullAllowed] + IAVCapturePhotoOutputReadinessCoordinatorDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + + [Export ("captureReadiness")] + AVCapturePhotoOutputCaptureReadiness CaptureReadiness { get; } + + [Export ("startTrackingCaptureRequestUsingPhotoSettings:")] + void StartTrackingCaptureRequest (AVCapturePhotoSettings settings); + + [Export ("stopTrackingCaptureRequestUsingPhotoSettingsUniqueID:")] + void StopTrackingCaptureRequest (long settingsUniqueId); + } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [BaseType (typeof (NSObject))] + interface AVCaptureReactionEffectState { + [Export ("reactionType")] + string ReactionType { get; } + + [Export ("startTime")] + CMTime StartTime { get; } + + [Export ("endTime")] + CMTime EndTime { get; } + } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [BaseType (typeof (NSObject))] + interface AVSampleBufferVideoRenderer : AVQueuedSampleBufferRendering { + + [Notification] + [Field ("AVSampleBufferVideoRendererDidFailToDecodeNotification")] + NSString AVSampleBufferVideoRendererDidFailToDecodeNotification { get; } + + [Field ("AVSampleBufferVideoRendererDidFailToDecodeNotificationErrorKey")] + NSString AVSampleBufferVideoRendererDidFailToDecodeNotificationErrorKey { get; } + + [Notification] + [Field ("AVSampleBufferVideoRendererRequiresFlushToResumeDecodingDidChangeNotification")] + NSString RequiresFlushToResumeDecodingDidChangeNotification { get; } + + [Export ("status")] + AVQueuedSampleBufferRenderingStatus Status { get; } + + [NullAllowed, Export ("error")] + NSError Error { get; } + + [Export ("requiresFlushToResumeDecoding")] + bool RequiresFlushToResumeDecoding { get; } + + [Export ("flushWithRemovalOfDisplayedImage:completionHandler:")] + void FlushWithRemovalOfDisplayedImage (bool removeDisplayedImage, [NullAllowed] Action handler); + + // from AVSampleBufferVideoRenderer_AVSampleBufferVideoRendererPixelBufferOutput + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [return: NullAllowed, Release] + [Export ("copyDisplayedPixelBuffer")] + CVPixelBuffer CopyDisplayedPixelBuffer (); + + // from AVSampleBufferVideoRenderer_AVSampleBufferVideoRendererPowerOptimization + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 0)] + [Export ("expectMinimumUpcomingSampleBufferPresentationTime:")] + void ExpectMinimumUpcomingSampleBufferPresentationTime (CMTime minimumUpcomingPresentationTime); + + // from AVSampleBufferVideoRenderer_AVSampleBufferVideoRendererPowerOptimization + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 0)] + [Export ("expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes")] + void ExpectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes (); + + // from AVSampleBufferVideoRenderer_AVSampleBufferVideoRendererPowerOptimization + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 0)] + [Export ("resetUpcomingSampleBufferPresentationTimeExpectations")] + void ResetUpcomingSampleBufferPresentationTimeExpectations (); + + // from AVSampleBufferVideoRendererVideoPerformanceMetrics (AVSampleBufferVideoRenderer) + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [Export ("loadVideoPerformanceMetricsWithCompletionHandler:")] + [Async] + void LoadVideoPerformanceMetrics (AVSampleBufferVideoRendererLoadVideoPerformanceMetricsCallback completionHandler); + } + + delegate void AVSampleBufferVideoRendererLoadVideoPerformanceMetricsCallback ([NullAllowed] AVVideoPerformanceMetrics videoPerformanceMetrics); + + // the property types here are pure guesswork, Apple's documentation or headers don't say anything at all + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [StrongDictionary ("AVAudioSequencerInfoDictionaryKeys")] + interface AVAudioSequencerInfoDictionary { + string Album { get; set; } + double ApproximateDurationInSeconds { get; set; } + string Artist { get; set; } + NSObject ChannelLayout { get; set; } + string Comments { get; set; } + string Composer { get; set; } + string Copyright { get; set; } + string EncodingApplication { get; set; } + string Genre { get; set; } + NSObject Isrc { get; set; } + string KeySignature { get; set; } + string Lyricist { get; set; } + double NominalBitRate { get; set; } + NSObject RecordedDate { get; set; } + double SourceBitDepth { get; set; } + string SourceEncoder { get; set; } + string SubTitle { get; set; } + double Tempo { get; set; } + string TimeSignature { get; set; } + string Title { get; set; } + int TrackNumber { get; set; } + string Year { get; set; } + } + + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Static] + [Internal] + interface AVAudioSequencerInfoDictionaryKeys { + + [Field ("AVAudioSequencerInfoDictionaryKeyAlbum")] + NSString AlbumKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyApproximateDurationInSeconds")] + NSString ApproximateDurationInSecondsKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyArtist")] + NSString ArtistKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyChannelLayout")] + NSString ChannelLayoutKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyComments")] + NSString CommentsKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyComposer")] + NSString ComposerKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyCopyright")] + NSString CopyrightKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyEncodingApplication")] + NSString EncodingApplicationKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyGenre")] + NSString GenreKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyISRC")] + NSString IsrcKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyKeySignature")] + NSString KeySignatureKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyLyricist")] + NSString LyricistKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyNominalBitRate")] + NSString NominalBitRateKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyRecordedDate")] + NSString RecordedDateKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeySourceBitDepth")] + NSString SourceBitDepthKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeySourceEncoder")] + NSString SourceEncoderKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeySubTitle")] + NSString SubTitleKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyTempo")] + NSString TempoKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyTimeSignature")] + NSString TimeSignatureKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyTitle")] + NSString TitleKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyTrackNumber")] + NSString TrackNumberKey { get; } + + [Field ("AVAudioSequencerInfoDictionaryKeyYear")] + NSString YearKey { get; } + } + + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVExternalStorageDeviceDiscoverySession { + [Static] + [NullAllowed, Export ("sharedSession")] + AVExternalStorageDeviceDiscoverySession SharedSession { get; } + + [Export ("externalStorageDevices")] + AVExternalStorageDevice [] ExternalStorageDevices { get; } + + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } + } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVExposureBiasRange { + [Export ("minExposureBias")] + float MinExposureBias { get; } + + [Export ("maxExposureBias")] + float MaxExposureBias { get; } + + [Export ("containsExposureBias:")] + bool ContainsExposureBias (float exposureBias); + } + + delegate void AVCaptureSystemZoomSliderCallback (nfloat videoZoomFactor); + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVCaptureControl))] + [DisableDefaultCtor] // not in headers, but this doesn't seem useful when created from a default ctor + interface AVCaptureSystemZoomSlider { + [Export ("initWithDevice:")] + NativeHandle Constructor (AVCaptureDevice device); + + [Export ("initWithDevice:action:")] + NativeHandle Constructor (AVCaptureDevice device, AVCaptureSystemZoomSliderCallback action); + } + + delegate void AVCaptureSystemExposureBiasSliderCallback (nfloat exposureTargetBias); + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVCaptureControl))] + [DisableDefaultCtor] // not in headers, but this doesn't seem useful when created from a default ctor + interface AVCaptureSystemExposureBiasSlider { + [Export ("initWithDevice:")] + NativeHandle Constructor (AVCaptureDevice device); + + [Export ("initWithDevice:action:")] + NativeHandle Constructor (AVCaptureDevice device, AVCaptureSystemExposureBiasSliderCallback action); + } + + delegate void AVCaptureSliderCallback (float newValue); + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVCaptureControl))] + [DisableDefaultCtor] // not in headers, but this doesn't seem useful when created from a default ctor + interface AVCaptureSlider { + [Export ("initWithLocalizedTitle:symbolName:minValue:maxValue:")] + NativeHandle Constructor (string localizedTitle, string symbolName, float minValue, float maxValue); + + [Export ("initWithLocalizedTitle:symbolName:minValue:maxValue:step:")] + NativeHandle Constructor (string localizedTitle, string symbolName, float minValue, float maxValue, float step); + + [Export ("initWithLocalizedTitle:symbolName:values:")] + NativeHandle Constructor (string localizedTitle, string symbolName, [BindAs (typeof (float []))] NSNumber [] values); + + [Export ("value")] + float Value { get; set; } + + [NullAllowed, Export ("localizedValueFormat")] + string LocalizedValueFormat { get; set; } + + [Export ("prominentValues", ArgumentSemantic.Copy)] + [BindAs (typeof (float []))] + NSNumber [] ProminentValues { get; set; } + + [Export ("localizedTitle")] + string LocalizedTitle { get; } + + [Export ("symbolName")] + string SymbolName { get; } + + [NullAllowed, Export ("accessibilityIdentifier")] + string AccessibilityIdentifier { get; set; } + + [Export ("setActionQueue:action:")] + void SetActionQueue (DispatchQueue actionQueue, AVCaptureSliderCallback action); + } + + delegate void AVCaptureIndexPickerCallback (nint newValue); + delegate string AVCaptureIndexPickerTitleTransform (nint index); + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVCaptureControl))] + interface AVCaptureIndexPicker { + [Export ("initWithLocalizedTitle:symbolName:numberOfIndexes:")] + NativeHandle Constructor (string localizedTitle, string symbolName, nint numberOfIndexes); + + [Export ("initWithLocalizedTitle:symbolName:numberOfIndexes:localizedTitleTransform:")] + NativeHandle Constructor (string localizedTitle, string symbolName, nint numberOfIndexes, AVCaptureIndexPickerTitleTransform localizedTitleTransform); + + [Export ("initWithLocalizedTitle:symbolName:localizedIndexTitles:")] + NativeHandle Constructor (string localizedTitle, string symbolName, string [] localizedIndexTitles); + + [Export ("selectedIndex")] + nint SelectedIndex { get; set; } + + [Export ("localizedTitle")] + string LocalizedTitle { get; } + + [Export ("symbolName")] + string SymbolName { get; } + + [Export ("numberOfIndexes")] + nint NumberOfIndexes { get; } + + [Export ("localizedIndexTitles", ArgumentSemantic.Copy)] + string [] LocalizedIndexTitles { get; } + + [NullAllowed, Export ("accessibilityIdentifier")] + string AccessibilityIdentifier { get; set; } + + [Export ("setActionQueue:action:")] + void SetActionQueue (DispatchQueue actionQueue, AVCaptureIndexPickerCallback action); + } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVCaptureControl { + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemVariantSwitchStartEvent { + [NullAllowed, Export ("fromVariant")] + AVAssetVariant FromVariant { get; } + + [Export ("toVariant")] + AVAssetVariant ToVariant { get; } + + [Export ("loadedTimeRanges")] + [BindAs (typeof (CMTimeRange []))] + NSValue [] LoadedTimeRanges { get; } + } + + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVRenderedCaptionImage { + [Export ("pixelBuffer")] + CVPixelBuffer PixelBuffer { get; } + + [Export ("position")] + CGPoint Position { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVPlayerItemSegment { + [Export ("segmentType")] + AVPlayerItemSegmentType SegmentType { get; } + + [Export ("timeMapping")] + CMTimeMapping TimeMapping { get; } + + [Export ("loadedTimeRanges")] + [BindAs (typeof (CMTimeRange []))] + NSValue [] LoadedTimeRanges { get; } + + [NullAllowed, Export ("startDate")] + NSDate StartDate { get; } + + [NullAllowed, Export ("interstitialEvent")] + AVPlayerInterstitialEvent InterstitialEvent { get; } + } + + [MacCatalyst (18, 0), NoTV, Mac (15, 0), iOS (18, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false), Model] + [BaseType (typeof (NSObject))] + interface AVPlayerItemRenderedLegibleOutputPushDelegate : AVPlayerItemOutputPushDelegate { + [Export ("renderedLegibleOutput:didOutputRenderedCaptionImages:forItemTime:")] + void DidOutputRenderedCaptionImages (AVPlayerItemRenderedLegibleOutput output, AVRenderedCaptionImage [] captionImages, CMTime itemTime); + } + + interface IAVPlayerItemRenderedLegibleOutputPushDelegate { } + + [MacCatalyst (18, 0), NoTV, Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVPlayerItemOutput))] + [DisableDefaultCtor] + interface AVPlayerItemRenderedLegibleOutput { + [Export ("initWithVideoDisplaySize:")] + NativeHandle Constructor (CGSize videoDisplaySize); + + [Export ("setDelegate:queue:")] + void SetDelegate ([NullAllowed] IAVPlayerItemRenderedLegibleOutputPushDelegate @delegate, [NullAllowed] DispatchQueue delegateQueue); + + [Wrap ("WeakDelegate")] + [NullAllowed] + IAVPlayerItemRenderedLegibleOutputPushDelegate Delegate { get; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; } + + [NullAllowed, Export ("delegateQueue")] + DispatchQueue DelegateQueue { get; } + + [Export ("advanceIntervalForDelegateInvocation")] + double AdvanceIntervalForDelegateInvocation { get; set; } + + [Export ("videoDisplaySize", ArgumentSemantic.Assign)] + CGSize VideoDisplaySize { get; set; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVPlayerItemIntegratedTimelineSnapshot { + [Export ("duration")] + CMTime Duration { get; } + + [NullAllowed, Export ("currentSegment")] + AVPlayerItemSegment CurrentSegment { get; } + + [Export ("segments")] + AVPlayerItemSegment [] Segments { get; } + + [Export ("currentTime")] + CMTime CurrentTime { get; } + + [NullAllowed, Export ("currentDate")] + NSDate CurrentDate { get; } + + [Export ("mapTime:toSegment:atSegmentOffset:")] + void Map (CMTime time, out AVPlayerItemSegment timeSegment, out CMTime segmentOffset); + + [Notification] + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVPlayerIntegratedTimelineSnapshotsOutOfSyncNotification")] + NSString SnapshotsOutOfSyncNotification { get; } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Field ("AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonKey")] + NSString SnapshotsOutOfSyncReasonKey { get; } + } + + delegate void AVPlayerItemIntegratedTimelineSeekCallback (bool success); + delegate void AVPlayerItemIntegratedTimelineAddPeriodicTimeObserverCallback (CMTime time); + delegate void AVPlayerItemIntegratedTimelineAddBoundaryTimeObserverCallback (bool success); + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVPlayerItemIntegratedTimeline { + [Export ("currentSnapshot")] + AVPlayerItemIntegratedTimelineSnapshot CurrentSnapshot { get; } + + [Export ("currentTime")] + CMTime CurrentTime { get; } + + [NullAllowed, Export ("currentDate")] + NSDate CurrentDate { get; } + + // From the AVPlayerItemIntegratedTimelineControl (AVPlayerItemIntegratedTimeline) category + [Export ("seekToTime:toleranceBefore:toleranceAfter:completionHandler:")] + [Async] + void SeekToTime (CMTime time, CMTime toleranceBefore, CMTime toleranceAfter, [NullAllowed] AVPlayerItemIntegratedTimelineSeekCallback completionHandler); + + // From the AVPlayerItemIntegratedTimelineControl (AVPlayerItemIntegratedTimeline) category + [Export ("seekToDate:completionHandler:")] + [Async] + void SeekToDate (NSDate date, [NullAllowed] AVPlayerItemIntegratedTimelineSeekCallback completionHandler); + + // From the AVPlayerItemIntegratedTimelineObserver (AVPlayerItemIntegratedTimeline) category + [Export ("addPeriodicTimeObserverForInterval:queue:usingBlock:")] + IAVPlayerItemIntegratedTimelineObserver AddPeriodicTimeObserver (CMTime interval, [NullAllowed] DispatchQueue queue, AVPlayerItemIntegratedTimelineAddPeriodicTimeObserverCallback callback); + + // From the AVPlayerItemIntegratedTimelineObserver (AVPlayerItemIntegratedTimeline) category + [Export ("addBoundaryTimeObserverForSegment:offsetsIntoSegment:queue:usingBlock:")] + IAVPlayerItemIntegratedTimelineObserver AddBoundaryTimeObserver (AVPlayerItemSegment segment, [BindAs (typeof (CMTime []))] NSValue [] offsetsIntoSegment, [NullAllowed] DispatchQueue queue, AVPlayerItemIntegratedTimelineAddBoundaryTimeObserverCallback callback); + + // From the AVPlayerItemIntegratedTimelineObserver (AVPlayerItemIntegratedTimeline) category + [Export ("removeTimeObserver:")] + void RemoveTimeObserver (IAVPlayerItemIntegratedTimelineObserver observer); + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemVariantSwitchEvent { + [NullAllowed, Export ("fromVariant")] + AVAssetVariant FromVariant { get; } + + [Export ("toVariant")] + AVAssetVariant ToVariant { get; } + + [Export ("loadedTimeRanges")] + [BindAs (typeof (CMTimeRange []))] + NSValue [] LoadedTimeRanges { get; } + + [Export ("didSucceed")] + bool DidSucceed { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricPlayerItemRateChangeEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemStallEvent { + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricPlayerItemRateChangeEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemSeekEvent { + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricPlayerItemRateChangeEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemSeekDidCompleteEvent { + [Export ("didSeekInBuffer")] + bool DidSeekInBuffer { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemRateChangeEvent { + [Export ("rate")] + double Rate { get; } + + [Export ("previousRate")] + double PreviousRate { get; } + + [NullAllowed, Export ("variant")] + AVAssetVariant Variant { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemPlaybackSummaryEvent { + [NullAllowed, Export ("errorEvent")] + AVMetricErrorEvent ErrorEvent { get; } + + [Export ("recoverableErrorCount")] + nint RecoverableErrorCount { get; } + + [Export ("stallCount")] + nint StallCount { get; } + + [Export ("variantSwitchCount")] + nint VariantSwitchCount { get; } + + [Export ("playbackDuration")] + nint PlaybackDuration { get; } + + [Export ("mediaResourceRequestCount")] + nint MediaResourceRequestCount { get; } + + [Export ("timeSpentRecoveringFromStall")] + double TimeSpentRecoveringFromStall { get; } + + [Export ("timeSpentInInitialStartup")] + double TimeSpentInInitialStartup { get; } + + [Export ("timeWeightedAverageBitrate")] + nint TimeWeightedAverageBitrate { get; } + + [Export ("timeWeightedPeakBitrate")] + nint TimeWeightedPeakBitrate { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemLikelyToKeepUpEvent { + [NullAllowed, Export ("variant")] + AVAssetVariant Variant { get; } + + [Export ("timeTaken")] + double TimeTaken { get; } + + [Export ("loadedTimeRanges")] + [BindAs (typeof (CMTimeRange []))] + NSValue [] LoadedTimeRanges { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricPlayerItemLikelyToKeepUpEvent))] + [DisableDefaultCtor] + interface AVMetricPlayerItemInitialLikelyToKeepUpEvent { + [Export ("playlistRequestEvents")] + AVMetricHlsPlaylistRequestEvent [] PlaylistRequestEvents { get; } + + [Export ("mediaSegmentRequestEvents")] + AVMetricHlsMediaSegmentRequestEvent [] MediaSegmentRequestEvents { get; } + + [Export ("contentKeyRequestEvents")] + AVMetricContentKeyRequestEvent [] ContentKeyRequestEvents { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricMediaResourceRequestEvent { + [NullAllowed, Export ("url")] + NSUrl Url { get; } + + [NullAllowed, Export ("serverAddress")] + string ServerAddress { get; } + + [Export ("requestStartTime")] + NSDate RequestStartTime { get; } + + [Export ("requestEndTime")] + NSDate RequestEndTime { get; } + + [Export ("responseStartTime")] + NSDate ResponseStartTime { get; } + + [Export ("responseEndTime")] + NSDate ResponseEndTime { get; } + + [Export ("byteRange")] + NSRange ByteRange { get; } + + [Export ("readFromCache")] + bool ReadFromCache { [Bind ("wasReadFromCache")] get; } + + [NullAllowed, Export ("errorEvent")] + AVMetricErrorEvent ErrorEvent { get; } + + [NullAllowed, Export ("networkTransactionMetrics")] + NSUrlSessionTaskMetrics NetworkTransactionMetrics { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent), Name = "AVMetricHLSPlaylistRequestEvent")] + [DisableDefaultCtor] + interface AVMetricHlsPlaylistRequestEvent { + [NullAllowed, Export ("url")] + NSUrl Url { get; } + + [Export ("isMultivariantPlaylist")] + bool IsMultivariantPlaylist { get; } + + [Export ("mediaType")] + string MediaType { get; } + + [NullAllowed, Export ("mediaResourceRequestEvent")] + AVMetricMediaResourceRequestEvent MediaResourceRequestEvent { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent), Name = "AVMetricHLSMediaSegmentRequestEvent")] + [DisableDefaultCtor] + interface AVMetricHlsMediaSegmentRequestEvent { + [NullAllowed, Export ("url")] + NSUrl Url { get; } + + [Export ("isMapSegment")] + bool IsMapSegment { get; } + + [Export ("mediaType")] + string MediaType { get; } + + [Export ("byteRange")] + NSRange ByteRange { get; } + + [Export ("indexFileURL")] + NSUrl IndexFileUrl { get; } + + [NullAllowed, Export ("mediaResourceRequestEvent")] + AVMetricMediaResourceRequestEvent MediaResourceRequestEvent { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVMetricEventStream { + [Static] + [Export ("eventStream")] + AVMetricEventStream Create (); + + [Export ("addPublisher:")] + bool AddPublisher (IAVMetricEventStreamPublisher publisher); + + [Export ("setSubscriber:queue:")] + bool SetSubscriber (IAVMetricEventStreamSubscriber subscriber, [NullAllowed] DispatchQueue queue); + + [Export ("subscribeToMetricEvent:")] + void SubscribeTo (Class metricEventClass); + + [Wrap ("SubscribeTo (new Class (metricEventType))")] + void SubscribeTo (Type metricEventType); + + [Export ("subscribeToMetricEvents:")] + void SubscribeTo (Class [] metricEventsClasses); + + [Wrap ("SubscribeTo (Class.FromTypes (metricEventsTypes))")] + void SubscribeTo (Type [] metricEventsTypes); + + [Export ("subscribeToAllMetricEvents")] + void SubscribeToAll (); + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVMetricEvent : NSSecureCoding { + [Export ("date")] + NSDate Date { get; } + + [Export ("mediaTime")] + CMTime MediaTime { get; } + + [NullAllowed, Export ("sessionID")] + string SessionId { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricErrorEvent { + [Export ("didRecover")] + bool DidRecover { get; } + + [Export ("error")] + NSError Error { get; } + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [BaseType (typeof (AVMetricEvent))] + [DisableDefaultCtor] + interface AVMetricContentKeyRequestEvent { + [Export ("contentKeySpecifier")] + AVContentKeySpecifier ContentKeySpecifier { get; } + + [Export ("mediaType")] + string MediaType { get; } + + [Export ("isClientInitiated")] + bool IsClientInitiated { get; } + + [NullAllowed, Export ("mediaResourceRequestEvent")] + AVMetricMediaResourceRequestEvent MediaResourceRequestEvent { get; } + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + [BaseType (typeof (AVMetadataBodyObject))] + interface AVMetadataHumanFullBodyObject : NSCopying { + } + + [NoMac, NoTV, NoMacCatalyst, iOS (17, 0)] + [BaseType (typeof (AVCapturePhoto))] + [DisableDefaultCtor] + interface AVCaptureDeferredPhotoProxy { + } + + [TV (18, 0), MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface AVMetricEventStreamPublisher { + } + + interface IAVMetricEventStreamPublisher { } + + [TV (18, 0), MacCatalyst (15, 0), Mac (12, 0), iOS (18, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface AVMetricEventStreamSubscriber { + [Abstract] + [Export ("publisher:didReceiveEvent:")] + void DidReceiveEvent (IAVMetricEventStreamPublisher publisher, AVMetricEvent @event); + } + + interface IAVMetricEventStreamSubscriber { } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Native] + public enum AVPlayerItemSegmentType : long { + Primary = 0, + Interstitial = 1, + } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Native] + public enum AVCaptureMultichannelAudioMode : long { + None = 0, + Stereo = 1, + FirstOrderAmbisonics = 2, + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + enum AVPlayerIntegratedTimelineSnapshotsOutOfSyncReason { + [Field ("AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonSegmentsChanged")] + SegmentsChanged, + + [Field ("AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonCurrentSegmentChanged")] + CurrentSegmentChanged, + + [Field ("AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonLoadedTimeRangesChanged")] + LoadedTimeRangesChanged, + } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + enum AVSpatialCaptureDiscomfortReason { + [Field ("AVSpatialCaptureDiscomfortReasonNotEnoughLight")] + NotEnoughLight, + + [Field ("AVSpatialCaptureDiscomfortReasonSubjectTooClose")] + SubjectTooClose, + } + + [MacCatalyst (17, 0), NoTV, Mac (14, 0), iOS (17, 0)] + [NativeName ("AVVideoCompositionPerFrameHDRDisplayMetadataPolicy")] + enum AVVideoCompositionPerFrameHdrDisplayMetadataPolicy { + [Field ("AVVideoCompositionPerFrameHDRDisplayMetadataPolicyPropagate")] + Propagate, + + [Field ("AVVideoCompositionPerFrameHDRDisplayMetadataPolicyGenerate")] + Generate, + } + + [TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false), Model] + [BaseType (typeof (NSObject))] + interface AVCaptureSessionControlsDelegate { + [Abstract] + [Export ("sessionControlsDidBecomeActive:")] + void DidBecomeActive (AVCaptureSession session); + + [Abstract] + [Export ("sessionControlsWillEnterFullscreenAppearance:")] + void WillEnterFullscreenAppearance (AVCaptureSession session); + + [Abstract] + [Export ("sessionControlsWillExitFullscreenAppearance:")] + void WillExitFullscreenAppearance (AVCaptureSession session); + + [Abstract] + [Export ("sessionControlsDidBecomeInactive:")] + void DidBecomeInactive (AVCaptureSession session); + } + + interface IAVCaptureSessionControlsDelegate { } + + [MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), iOS (18, 0)] + [Protocol (BackwardsCompatibleCodeGeneration = false)] + interface AVPlayerItemIntegratedTimelineObserver { + } + + interface IAVPlayerItemIntegratedTimelineObserver { } + + delegate void AVCaptureDeskViewApplicationPresentHandler ([NullAllowed] NSError error); + + [NoTV, NoiOS, MacCatalyst (16, 1), Mac (13, 0)] + [BaseType (typeof (NSObject))] + interface AVCaptureDeskViewApplication { + [Export ("presentWithCompletionHandler:")] + [Async] + void Present ([NullAllowed] AVCaptureDeskViewApplicationPresentHandler completionHandler); + + [Export ("presentWithLaunchConfiguration:completionHandler:")] + [Async] + void Present (AVCaptureDeskViewApplicationLaunchConfiguration launchConfiguration, [NullAllowed] AVCaptureDeskViewApplicationPresentHandler completionHandler); + } + + [NoTV, NoiOS, MacCatalyst (16, 1), Mac (13, 0)] + [BaseType (typeof (NSObject))] + interface AVCaptureDeskViewApplicationLaunchConfiguration { + [Export ("mainWindowFrame", ArgumentSemantic.Assign)] + CGRect MainWindowFrame { get; set; } + + [Export ("requiresSetUpModeCompletion")] + bool RequiresSetUpModeCompletion { get; set; } + } + + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface AVMediaExtensionProperties : NSCopying { + [Export ("extensionIdentifier")] + string ExtensionIdentifier { get; } + + [Export ("extensionName")] + string ExtensionName { get; } + + [Export ("containingBundleName")] + string ContainingBundleName { get; } + + [Export ("extensionURL")] + NSUrl ExtensionUrl { get; } + + [Export ("containingBundleURL")] + NSUrl ContainingBundleUrl { get; } + } } diff --git a/src/avkit.cs b/src/avkit.cs index c3a80553e48a..505c5c5f7ccb 100644 --- a/src/avkit.cs +++ b/src/avkit.cs @@ -37,7 +37,7 @@ using UIMenuElement = Foundation.NSObject; #endif // !MONOMAC -#if TVOS || WATCH +#if TVOS using AVCustomRoutingController = Foundation.NSObject; using AVCustomRoutingEvent = Foundation.NSObject; using AVCustomRoutingActionItem = Foundation.NSObject; @@ -50,7 +50,7 @@ #endif namespace AVKit { - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] enum AVVideoFrameAnalysisType : ulong { AVVideoFrameAnalysisTypeNone = 0, @@ -80,7 +80,7 @@ interface AVPictureInPictureController { [Export ("initWithPlayerLayer:")] NativeHandle Constructor (AVPlayerLayer playerLayer); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithContentSource:")] [DesignatedInitializer] NativeHandle Constructor (AVPictureInPictureControllerContentSource contentSource); @@ -134,26 +134,26 @@ interface AVPictureInPictureController { [Export ("pictureInPictureButtonStopImageCompatibleWithTraitCollection:")] UIImage CreateStopButton ([NullAllowed] UITraitCollection traitCollection); - [NoWatch, iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("requiresLinearPlayback")] bool RequiresLinearPlayback { get; set; } - [NoWatch, NoMac, NoiOS, MacCatalyst (15, 0)] + [NoMac, NoiOS, MacCatalyst (15, 0)] [Export ("canStopPictureInPicture")] bool CanStopPictureInPicture { get; } [iOS (14, 2)] - [NoWatch, NoTV, NoMac, MacCatalyst (15, 0)] + [NoTV, NoMac, MacCatalyst (15, 0)] [Export ("canStartPictureInPictureAutomaticallyFromInline")] bool CanStartPictureInPictureAutomaticallyFromInline { get; set; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("invalidatePlaybackState")] void InvalidatePlaybackState (); [NullAllowed] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("contentSource", ArgumentSemantic.Strong)] AVPictureInPictureControllerContentSource ContentSource { get; set; } } @@ -278,56 +278,56 @@ interface AVPlayerViewController { #endregion [NullAllowed] - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("contentProposalViewController", ArgumentSemantic.Assign)] AVContentProposalViewController ContentProposalViewController { get; set; } - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("skippingBehavior", ArgumentSemantic.Assign)] AVPlayerViewControllerSkippingBehavior SkippingBehavior { get; set; } - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("skipForwardEnabled")] bool SkipForwardEnabled { [Bind ("isSkipForwardEnabled")] get; set; } - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("skipBackwardEnabled")] bool SkipBackwardEnabled { [Bind ("isSkipBackwardEnabled")] get; set; } // From AVPlayerViewControllerControls category - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("playbackControlsIncludeTransportBar")] bool PlaybackControlsIncludeTransportBar { get; set; } - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("playbackControlsIncludeInfoViews")] bool PlaybackControlsIncludeInfoViews { get; set; } [NullAllowed] - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'CustomInfoViewControllers' instead.")] [NoMacCatalyst] [Export ("customInfoViewController", ArgumentSemantic.Assign)] UIViewController CustomInfoViewController { get; set; } - [NoiOS, NoMac, NoWatch] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("appliesPreferredDisplayCriteriaAutomatically")] bool AppliesPreferredDisplayCriteriaAutomatically { get; set; } - [TV (13, 0), NoWatch] + [TV (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("pixelBufferAttributes", ArgumentSemantic.Copy)] NSDictionary PixelBufferAttributes { get; set; } - [NoiOS, TV (13, 0), NoWatch] + [NoiOS, TV (13, 0)] [NoMacCatalyst] [NullAllowed, Export ("customOverlayViewController", ArgumentSemantic.Strong)] UIViewController CustomOverlayViewController { get; set; } @@ -338,51 +338,52 @@ interface AVPlayerViewController { bool ShowsTimecodes { get; set; } [iOS (14, 2)] - [NoWatch, NoTV, MacCatalyst (15, 0)] + [NoTV, MacCatalyst (15, 0)] [Export ("canStartPictureInPictureAutomaticallyFromInline")] bool CanStartPictureInPictureAutomaticallyFromInline { get; set; } - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("contextualActions", ArgumentSemantic.Copy)] UIAction [] ContextualActions { get; set; } - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("infoViewActions", ArgumentSemantic.Copy)] + [NullAllowed] UIAction [] InfoViewActions { get; set; } - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("customInfoViewControllers", ArgumentSemantic.Copy)] UIViewController [] CustomInfoViewControllers { get; set; } - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("transportBarCustomMenuItems", ArgumentSemantic.Copy)] UIMenuElement [] TransportBarCustomMenuItems { get; set; } - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Export ("transportBarIncludesTitleView")] bool TransportBarIncludesTitleView { get; set; } - [NoWatch, NoTV, MacCatalyst (16, 0), NoMac, iOS (16, 0)] + [NoTV, MacCatalyst (16, 0), NoMac, iOS (16, 0)] [Export ("allowsVideoFrameAnalysis")] bool AllowsVideoFrameAnalysis { get; set; } - [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoWatch, TV (16, 0)] + [iOS (16, 0), MacCatalyst (16, 0), NoMac, TV (16, 0)] [Export ("speeds", ArgumentSemantic.Copy)] AVPlaybackSpeed [] Speeds { get; set; } - [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoWatch, TV (16, 0)] + [iOS (16, 0), MacCatalyst (16, 0), NoMac, TV (16, 0)] [NullAllowed, Export ("selectedSpeed")] AVPlaybackSpeed SelectedSpeed { get; } - [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoWatch, TV (16, 0)] + [iOS (16, 0), MacCatalyst (16, 0), NoMac, TV (16, 0)] [Export ("selectSpeed:")] void SelectSpeed (AVPlaybackSpeed speed); - [iOS (17, 0), MacCatalyst (18, 0), NoTV, NoWatch, NoMac] + [iOS (17, 0), MacCatalyst (18, 0), NoTV, NoMac] [Export ("videoFrameAnalysisTypes")] AVVideoFrameAnalysisType VideoFrameAnalysisTypes { get; set; } - [iOS (17, 0), MacCatalyst (18, 0), NoTV, NoWatch, NoMac] + [iOS (17, 0), MacCatalyst (18, 0), NoTV, NoMac] [Export ("toggleLookupAction")] UIAction ToggleLookupAction { get; } } @@ -441,7 +442,6 @@ interface AVPlayerViewControllerDelegate { [iOS (16, 0)] [NoMac] [NoMacCatalyst] - [NoWatch] [Export ("playerViewController:didPresentInterstitialTimeRange:")] void DidPresentInterstitialTimeRange (AVPlayerViewController playerViewController, AVInterstitialTimeRange interstitial); @@ -465,7 +465,6 @@ interface AVPlayerViewControllerDelegate { [iOS (16, 0)] [NoMac] - [NoWatch] [NoMacCatalyst] [Export ("playerViewController:willPresentInterstitialTimeRange:")] void WillPresentInterstitialTimeRange (AVPlayerViewController playerViewController, AVInterstitialTimeRange interstitial); @@ -488,77 +487,77 @@ interface AVPlayerViewControllerDelegate { [Export ("playerViewController:didSelectExternalSubtitleOptionLanguage:")] void DidSelectExternalSubtitleOptionLanguage (AVPlayerViewController playerViewController, string language); - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("playerViewController:timeToSeekAfterUserNavigatedFromTime:toTime:")] CMTime GetTimeToSeekAfterUserNavigated (AVPlayerViewController playerViewController, CMTime oldTime, CMTime targetTime); - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("skipToNextItemForPlayerViewController:")] void SkipToNextItem (AVPlayerViewController playerViewController); - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("skipToPreviousItemForPlayerViewController:")] void SkipToPreviousItem (AVPlayerViewController playerViewController); - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("playerViewController:shouldPresentContentProposal:")] bool ShouldPresentContentProposal (AVPlayerViewController playerViewController, AVContentProposal proposal); - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("playerViewController:didAcceptContentProposal:")] void DidAcceptContentProposal (AVPlayerViewController playerViewController, AVContentProposal proposal); - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("playerViewController:didRejectContentProposal:")] void DidRejectContentProposal (AVPlayerViewController playerViewController, AVContentProposal proposal); - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Export ("playerViewController:willTransitionToVisibilityOfTransportBar:withAnimationCoordinator:")] void WillTransitionToVisibilityOfTransportBar (AVPlayerViewController playerViewController, bool visible, IAVPlayerViewControllerAnimationCoordinator coordinator); - [iOS (13, 0), NoTV, NoWatch, NoMac] + [iOS (13, 0), NoTV, NoMac] [MacCatalyst (13, 1)] [Export ("playerViewController:willBeginFullScreenPresentationWithAnimationCoordinator:"), EventArgs ("AVPlayerViewFullScreenPresentationWillBegin")] void WillBeginFullScreenPresentation (AVPlayerViewController playerViewController, IUIViewControllerTransitionCoordinator coordinator); - [iOS (13, 0), NoTV, NoWatch, NoMac] + [iOS (13, 0), NoTV, NoMac] [MacCatalyst (13, 1)] [Export ("playerViewController:willEndFullScreenPresentationWithAnimationCoordinator:"), EventArgs ("AVPlayerViewFullScreenPresentationWillEnd")] void WillEndFullScreenPresentation (AVPlayerViewController playerViewController, IUIViewControllerTransitionCoordinator coordinator); - [TV (13, 0), NoiOS, NoWatch, NoMac] + [TV (13, 0), NoiOS, NoMac] [NoMacCatalyst] [Export ("nextChannelInterstitialViewControllerForPlayerViewController:")] UIViewController GetNextChannelInterstitialViewController (AVPlayerViewController playerViewController); - [TV (13, 0), NoiOS, NoWatch, NoMac] + [TV (13, 0), NoiOS, NoMac] [NoMacCatalyst] [Export ("playerViewController:skipToNextChannel:"), EventArgs ("AVPlayerViewSkipToNextChannel")] void SkipToNextChannel (AVPlayerViewController playerViewController, Action completion); - [TV (13, 0), NoiOS, NoWatch, NoMac] + [TV (13, 0), NoiOS, NoMac] [NoMacCatalyst] [Export ("playerViewController:skipToPreviousChannel:"), EventArgs ("AVPlayerViewSkipToPreviousChannel")] void SkipToPreviousChannel (AVPlayerViewController playerViewController, Action completion); - [TV (13, 0), NoiOS, NoWatch, NoMac] + [TV (13, 0), NoiOS, NoMac] [NoMacCatalyst] [Export ("previousChannelInterstitialViewControllerForPlayerViewController:")] UIViewController GetPreviousChannelInterstitialViewController (AVPlayerViewController playerViewController); - [iOS (15, 0), NoTV, NoMac, NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), NoTV, NoMac, MacCatalyst (15, 0)] [Export ("playerViewController:restoreUserInterfaceForFullScreenExitWithCompletionHandler:")] void RestoreUserInterfaceForFullScreenExit (AVPlayerViewController playerViewController, Action completionHandler); } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVAudioSession))] @@ -571,7 +570,7 @@ interface AVAudioSession_AVPlaybackRouteSelecting { interface IAVPlayerViewControllerAnimationCoordinator { } - [NoiOS, NoWatch, NoMac] + [NoiOS, NoMac] [NoMacCatalyst] [Protocol] interface AVPlayerViewControllerAnimationCoordinator { @@ -581,7 +580,7 @@ interface AVPlayerViewControllerAnimationCoordinator { void AddCoordinatedAnimations (Action animations, Action completion); } - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [NoMacCatalyst] [BaseType (typeof (NSView))] interface AVPlayerView { @@ -664,38 +663,42 @@ interface AVPlayerView { [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } - [Mac (13, 0), NoWatch, NoiOS, NoMacCatalyst, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [Export ("speeds", ArgumentSemantic.Copy)] AVPlaybackSpeed [] Speeds { get; set; } - [Mac (13, 0), NoWatch, NoiOS, NoMacCatalyst, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [NullAllowed, Export ("selectedSpeed")] AVPlaybackSpeed SelectedSpeed { get; } - [Mac (13, 0), NoWatch, NoiOS, NoMacCatalyst, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [Export ("selectSpeed:")] void SelectSpeed (AVPlaybackSpeed speed); - [NoWatch, NoTV, NoMacCatalyst, NoiOS, Mac (13, 0)] + [NoTV, NoMacCatalyst, NoiOS, Mac (13, 0)] [Export ("allowsVideoFrameAnalysis")] bool AllowsVideoFrameAnalysis { get; set; } - [Mac (13, 0), NoWatch, NoiOS, NoMacCatalyst, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [Export ("allowsMagnification")] bool AllowsMagnification { get; set; } - [Mac (13, 0), NoWatch, NoiOS, NoMacCatalyst, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [Export ("magnification")] nfloat Magnification { get; set; } - [Mac (13, 0), NoWatch, NoiOS, NoMacCatalyst, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [Export ("setMagnification:centeredAtPoint:")] void SetMagnification (nfloat magnification, CGPoint centeredAtPoint); + + [Mac (14, 0)] + [Export ("videoFrameAnalysisTypes")] + AVVideoFrameAnalysisType VideoFrameAnalysisTypes { get; set; } } interface IAVPlayerViewPictureInPictureDelegate { } - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [NoMacCatalyst] #if NET [Protocol, Model] @@ -727,7 +730,7 @@ interface AVPlayerViewPictureInPictureDelegate { bool ShouldAutomaticallyDismiss (AVPlayerView playerView); } - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [NoMacCatalyst] [BaseType (typeof (NSView))] interface AVCaptureView { @@ -756,7 +759,7 @@ interface AVCaptureView { interface IAVCaptureViewDelegate { } - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [Protocol, Model] [NoMacCatalyst] [BaseType (typeof (NSObject))] @@ -769,7 +772,6 @@ interface AVCaptureViewDelegate { [iOS (16, 0)] [NoMac] [NoMacCatalyst] - [NoWatch] [BaseType (typeof (NSObject))] interface AVInterstitialTimeRange : NSCopying, NSSecureCoding { [Export ("initWithTimeRange:")] @@ -805,7 +807,7 @@ interface AVNavigationMarkersGroup { } [NoMac] - [NoiOS, NoWatch] + [NoiOS] [NoMacCatalyst] [BaseType (typeof (UIViewController))] interface AVContentProposalViewController { @@ -834,7 +836,7 @@ interface AVContentProposalViewController { [Static] [NoMac] - [NoiOS, NoWatch] + [NoiOS] [NoMacCatalyst] interface AVKitMetadataIdentifier { @@ -885,7 +887,7 @@ interface AVRoutePickerView { [Export ("activeTintColor", ArgumentSemantic.Assign), NullAllowed] UIColor ActiveTintColor { get; set; } - [NoiOS, NoMac, NoWatch, NoMacCatalyst] + [NoiOS, NoMac, NoMacCatalyst] [Export ("routePickerButtonStyle", ArgumentSemantic.Assign)] AVRoutePickerViewButtonStyle RoutePickerButtonStyle { get; set; } @@ -895,32 +897,32 @@ interface AVRoutePickerView { [Export ("prioritizesVideoDevices")] bool PrioritizesVideoDevices { get; set; } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("routePickerButtonColorForState:")] NSColor GetRoutePickerButtonColor (AVRoutePickerViewButtonState state); - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("setRoutePickerButtonColor:forState:")] void SetRoutePickerButtonColor ([NullAllowed] NSColor color, AVRoutePickerViewButtonState state); - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("routePickerButtonBordered")] bool RoutePickerButtonBordered { [Bind ("isRoutePickerButtonBordered")] get; set; } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [NullAllowed, Export ("player", ArgumentSemantic.Assign)] AVPlayer Player { get; set; } - [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("customRoutingController", ArgumentSemantic.Assign)] AVCustomRoutingController CustomRoutingController { get; set; } } - [NoiOS, NoMac, NoWatch, NoMacCatalyst] + [NoiOS, NoMac, NoMacCatalyst] [Native] public enum AVRoutePickerViewButtonStyle : long { System, @@ -948,7 +950,7 @@ interface AVRoutePickerViewDelegate { void DidEndPresentingRoutes (AVRoutePickerView routePickerView); } - [NoiOS, NoMac, NoWatch] + [NoiOS, NoMac] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -980,7 +982,7 @@ interface AVDisplayManager { bool DisplayCriteriaMatchingEnabled { [Bind ("isDisplayCriteriaMatchingEnabled")] get; } } - [NoiOS, NoMac, NoWatch] + [NoiOS, NoMac] [NoMacCatalyst] [Category] [BaseType (typeof (UIWindow))] @@ -990,7 +992,7 @@ interface UIWindow_AVAdditions { AVDisplayManager GetAVDisplayManager (); } - [NoTV, NoWatch, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UIViewController))] interface AVPictureInPictureVideoCallViewController { [DesignatedInitializer] @@ -998,7 +1000,7 @@ interface AVPictureInPictureVideoCallViewController { NativeHandle Constructor ([NullAllowed] string nibName, [NullAllowed] NSBundle bundle); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVPictureInPictureControllerContentSource { @@ -1009,19 +1011,16 @@ interface AVPictureInPictureControllerContentSource { AVPlayerLayer PlayerLayer { get; } // interface AVPictureInPictureControllerContentSource_VideoCallSupport - [NoWatch, NoTV, NoMac] - [NoMacCatalyst] // doc as available, intro fails on macOS 12 beta 6 + [NoTV, NoMac] [Export ("initWithActiveVideoCallSourceView:contentViewController:")] NativeHandle Constructor (UIView sourceView, AVPictureInPictureVideoCallViewController contentViewController); [NullAllowed] - [NoWatch, NoTV, NoMac] - [NoMacCatalyst] // doc as available, intro fails on macOS 12 beta 6 + [NoTV, NoMac] [Export ("activeVideoCallSourceView", ArgumentSemantic.Weak)] UIView ActiveVideoCallSourceView { get; } - [NoWatch, NoTV, NoMac] - [NoMacCatalyst] // doc as available, intro fails on macOS 12 beta 6 + [NoTV, NoMac] [Export ("activeVideoCallContentViewController")] AVPictureInPictureVideoCallViewController ActiveVideoCallContentViewController { get; } @@ -1042,7 +1041,7 @@ interface AVPictureInPictureControllerContentSource { interface IAVPictureInPictureSampleBufferPlaybackDelegate { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -1102,7 +1101,6 @@ interface AVPlayerViewDelegate { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Native] public enum AVCaptureViewControlsStyle : long { @@ -1114,7 +1112,6 @@ public enum AVCaptureViewControlsStyle : long { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Native] public enum AVPlayerViewTrimResult : long { @@ -1122,7 +1119,7 @@ public enum AVPlayerViewTrimResult : long { CancelButton, } - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVPlaybackSpeed { @@ -1143,7 +1140,7 @@ interface AVPlaybackSpeed { string LocalizedNumericName { get; } } - [iOS (17, 2), NoMac, NoMacCatalyst, NoTV, NoWatch] + [iOS (17, 2), NoMac, MacCatalyst (17, 2), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptureEvent { @@ -1151,7 +1148,7 @@ interface AVCaptureEvent { AVCaptureEventPhase Phase { get; } } - [iOS (17, 2), NoMac, NoMacCatalyst, NoTV, NoWatch] + [iOS (17, 2), NoMac, MacCatalyst (17, 2), NoTV] [Native] public enum AVCaptureEventPhase : ulong { Began, @@ -1159,7 +1156,7 @@ public enum AVCaptureEventPhase : ulong { Cancelled, } - [iOS (17, 2), NoMac, NoMacCatalyst, NoTV, NoWatch] + [iOS (17, 2), NoMac, MacCatalyst (17, 2), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCaptureEventInteraction : UIInteraction { @@ -1172,4 +1169,37 @@ interface AVCaptureEventInteraction : UIInteraction { [Export ("enabled")] bool Enabled { [Bind ("isEnabled")] get; set; } } + + [TV (17, 0), NoMac, NoiOS, NoMacCatalyst] + [BaseType (typeof (UIViewController))] + interface AVContinuityDevicePickerViewController { + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } + + [Wrap ("WeakDelegate")] + [NullAllowed] + IAVContinuityDevicePickerViewControllerDelegate Delegate { get; set; } + + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + NSObject WeakDelegate { get; set; } + } + + [TV (17, 0), NoMac, NoiOS, NoMacCatalyst] + [Protocol (BackwardsCompatibleCodeGeneration = false), Model] + [BaseType (typeof (NSObject))] + interface AVContinuityDevicePickerViewControllerDelegate { + [Export ("continuityDevicePickerWillBeginPresenting:")] + void WillBeginPresenting (AVContinuityDevicePickerViewController pickerViewController); + + [Export ("continuityDevicePicker:didConnectDevice:")] + void DidConnectDevice (AVContinuityDevicePickerViewController pickerViewController, AVContinuityDevice device); + + [Export ("continuityDevicePickerDidCancel:")] + void DidCancel (AVContinuityDevicePickerViewController pickerViewController); + + [Export ("continuityDevicePickerDidEndPresenting:")] + void DidEndPresenting (AVContinuityDevicePickerViewController pickerViewController); + } + interface IAVContinuityDevicePickerViewControllerDelegate { } } diff --git a/src/avrouting.cs b/src/avrouting.cs index b31fcaee1635..9e00217b9d6a 100644 --- a/src/avrouting.cs +++ b/src/avrouting.cs @@ -22,7 +22,7 @@ namespace AVRouting { - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV, NoWatch] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Native] public enum AVCustomRoutingEventReason : long { Activate = 0, @@ -30,7 +30,7 @@ public enum AVCustomRoutingEventReason : long { Reactivate, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface AVCustomDeviceRoute { [Internal] @@ -41,7 +41,7 @@ interface AVCustomDeviceRoute { NSUuid BluetoothIdentifier { get; } } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface AVCustomRoutingActionItem { [Export ("type", ArgumentSemantic.Copy)] @@ -51,7 +51,7 @@ interface AVCustomRoutingActionItem { string OverrideTitle { get; set; } } - [NoWatch, NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface AVCustomRoutingPartialIP { @@ -66,7 +66,7 @@ interface AVCustomRoutingPartialIP { NativeHandle Constructor (NSData address, NSData mask); } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface AVCustomRoutingController { [Wrap ("WeakDelegate")] @@ -78,7 +78,7 @@ interface AVCustomRoutingController { [Export ("authorizedRoutes")] AVCustomDeviceRoute [] AuthorizedRoutes { get; } - [NoWatch, NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] [Export ("knownRouteIPs", ArgumentSemantic.Strong)] AVCustomRoutingPartialIP [] KnownRouteIPs { get; set; } @@ -94,7 +94,7 @@ interface AVCustomRoutingController { [Export ("isRouteActive:")] bool IsRouteActive (AVCustomDeviceRoute route); - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Notification, Field ("AVCustomRoutingControllerAuthorizedRoutesDidChangeNotification")] NSString AuthorizedRoutesDidChangeNotification { get; } } @@ -110,7 +110,7 @@ namespace AVKit { interface IAVCustomRoutingControllerDelegate { } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -135,7 +135,7 @@ namespace AVRouting { #endif - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface AVCustomRoutingEvent { [Export ("reason")] diff --git a/src/backgroundassets.cs b/src/backgroundassets.cs index 823cffee6354..d5dc0fb046f5 100644 --- a/src/backgroundassets.cs +++ b/src/backgroundassets.cs @@ -18,7 +18,7 @@ #endif namespace BackgroundAssets { - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum BADownloadState : long { Failed = -1, @@ -28,7 +28,7 @@ public enum BADownloadState : long { Finished, } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum BAContentRequest : long { Install = 1, @@ -36,7 +36,7 @@ public enum BAContentRequest : long { Periodic, } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [ErrorDomain ("BAErrorDomain")] [Native] public enum BAErrorCode : long { @@ -58,7 +58,7 @@ public enum BAErrorCode : long { SessionDownloadNotPermittedBeforeAppLaunch = 206, } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface BADownload : NSCoding, NSSecureCoding, NSCopying { @@ -84,7 +84,7 @@ interface BADownload : NSCoding, NSSecureCoding, NSCopying { BADownload CopyAsNonEssential (); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface BAAppExtensionInfo : NSSecureCoding { @@ -94,13 +94,13 @@ interface BAAppExtensionInfo : NSSecureCoding { [Export ("restrictedDownloadSizeRemaining", ArgumentSemantic.Strong)] NSNumber RestrictedDownloadSizeRemaining { get; } - [NoWatch, NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] [NullAllowed] [Export ("restrictedEssentialDownloadSizeRemaining", ArgumentSemantic.Strong)] NSNumber RestrictedEssentialDownloadSizeRemaining { get; } } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface BADownloaderExtension { @@ -125,7 +125,7 @@ interface BADownloaderExtension { interface IBADownloadManagerDelegate { } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol][Model] #else @@ -153,7 +153,7 @@ interface BADownloadManagerDelegate { void Finished (BADownload download, NSUrl fileUrl); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface BADownloadManager { @@ -194,7 +194,7 @@ interface BADownloadManager { void PerformWithExclusiveControlBeforeDate (NSDate date, Action performHandler); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (BADownload), Name = "BAURLDownload")] [DisableDefaultCtor] interface BAUrlDownload { diff --git a/src/backgroundtasks.cs b/src/backgroundtasks.cs index baad88bcfead..20fc79e77bea 100644 --- a/src/backgroundtasks.cs +++ b/src/backgroundtasks.cs @@ -18,7 +18,7 @@ namespace BackgroundTasks { - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (BGTaskRequest))] [DisableDefaultCtor] @@ -27,7 +27,7 @@ interface BGAppRefreshTaskRequest { NativeHandle Constructor (string identifier); } - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (BGTaskRequest))] [DisableDefaultCtor] @@ -43,7 +43,7 @@ interface BGProcessingTaskRequest { } [Abstract] - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -55,7 +55,7 @@ interface BGTaskRequest : NSCopying { NSDate EarliestBeginDate { get; set; } } - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -70,21 +70,21 @@ interface BGTask { void SetTaskCompleted (bool success); } - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (BGTask))] [DisableDefaultCtor] interface BGAppRefreshTask { } - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (BGTask))] [DisableDefaultCtor] interface BGProcessingTask { } - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -111,11 +111,11 @@ interface BGTaskScheduler { void GetPending (Action completionHandler); } - [TV (17, 0), NoWatch, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (BGProcessingTask))] interface BGHealthResearchTask { } - [TV (17, 0), NoWatch, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (BGProcessingTaskRequest))] interface BGHealthResearchTaskRequest { [Export ("protectionTypeOfRequiredData")] diff --git a/src/bgen/Attributes.cs b/src/bgen/Attributes.cs index 89ac0ac635f6..961151889bbd 100644 --- a/src/bgen/Attributes.cs +++ b/src/bgen/Attributes.cs @@ -143,6 +143,8 @@ public BaseTypeAttribute (Type t) // too many objects, but two cases in particular that users keep // trampling on: UIAlertView and UIActionSheet public string KeepRefUntil { get; set; } + + public bool IsStubClass { get; set; } } // @@ -935,9 +937,6 @@ void GeneratePlatformDefine (StringBuilder builder) case PlatformName.TvOS: builder.AppendLine ("#if __TVOS__"); break; - case PlatformName.WatchOS: - builder.AppendLine ("#if __WATCHOS__"); - break; case PlatformName.MacOSX: builder.AppendLine ("#if __MACOS__"); break; @@ -1089,6 +1088,7 @@ public UnavailableAttribute (PlatformName platform, string message = null) } } +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class TVAttribute : IntroducedAttribute { public TVAttribute (byte major, byte minor) : base (PlatformName.TvOS, (int) major, (int) minor) @@ -1101,6 +1101,9 @@ public TVAttribute (byte major, byte minor, byte subminor) } } +#if !XAMCORE_5_0 +[Obsolete ("Do not use, watchOS is not supported in .NET")] +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class WatchAttribute : IntroducedAttribute { public WatchAttribute (byte major, byte minor) : base (PlatformName.WatchOS, (int) major, (int) minor) @@ -1112,7 +1115,9 @@ public WatchAttribute (byte major, byte minor, byte subminor) { } } +#endif // XAMCORE_5_0 +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class MacCatalystAttribute : IntroducedAttribute { public MacCatalystAttribute (byte major, byte minor) : base (PlatformName.MacCatalyst, (int) major, (int) minor) @@ -1125,6 +1130,7 @@ public MacCatalystAttribute (byte major, byte minor, byte subminor) } } +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoMacAttribute : UnavailableAttribute { public NoMacAttribute () : base (PlatformName.MacOSX) @@ -1132,6 +1138,7 @@ public NoMacAttribute () } } +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoiOSAttribute : UnavailableAttribute { public NoiOSAttribute () : base (PlatformName.iOS) @@ -1139,13 +1146,18 @@ public NoiOSAttribute () } } +#if !XAMCORE_5_0 +[Obsolete ("Do not use, watchOS is not supported in .NET")] +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoWatchAttribute : UnavailableAttribute { public NoWatchAttribute () : base (PlatformName.WatchOS) { } } +#endif // XAMCORE_5_0 +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoTVAttribute : UnavailableAttribute { public NoTVAttribute () : base (PlatformName.TvOS) @@ -1153,6 +1165,7 @@ public NoTVAttribute () } } +[AttributeUsage (AttributeTargets.All, AllowMultiple = false)] public sealed class NoMacCatalystAttribute : UnavailableAttribute { public NoMacCatalystAttribute () : base (PlatformName.MacCatalyst) diff --git a/src/bgen/BindingTouch.cs b/src/bgen/BindingTouch.cs index 4d47eda6123e..8a6ca641537c 100644 --- a/src/bgen/BindingTouch.cs +++ b/src/bgen/BindingTouch.cs @@ -264,8 +264,8 @@ public bool TryInitializeApi (BindingTouchConfig config, [NotNullWhen (true)] ou config.CoreSources.Insert (i - 1, config.Sources [i]); } - if (config.ApiSources.Count == 0) { - Console.WriteLine ("Error: no api file provided"); + if (config.ApiSources.Count == 0 && string.IsNullOrEmpty (compiled_api_definition_assembly)) { + Console.WriteLine ("Error: no api file provided, nor a compiled api definition assembly"); ShowHelp (config.OptionSet); return false; } @@ -273,8 +273,11 @@ public bool TryInitializeApi (BindingTouchConfig config, [NotNullWhen (true)] ou if (config.TemporaryFileDirectory is null) config.TemporaryFileDirectory = GetWorkDir (); - string firstApiDefinitionName = Path.GetFileNameWithoutExtension (config.ApiSources [0]); - firstApiDefinitionName = firstApiDefinitionName.Replace ('-', '_'); // This is not exhaustive, but common. + var firstApiDefinitionName = string.Empty; + if (config.ApiSources.Count > 0) { + firstApiDefinitionName = Path.GetFileNameWithoutExtension (config.ApiSources [0]); + firstApiDefinitionName = firstApiDefinitionName.Replace ('-', '_'); // This is not exhaustive, but common. + } if (outfile is null) outfile = firstApiDefinitionName + ".dll"; diff --git a/src/bgen/Caches/NamespaceCache.cs b/src/bgen/Caches/NamespaceCache.cs index 9ce97d9dc208..3896030f5fe5 100644 --- a/src/bgen/Caches/NamespaceCache.cs +++ b/src/bgen/Caches/NamespaceCache.cs @@ -49,8 +49,6 @@ public NamespaceCache (PlatformName currentPlatform, string customObjCRuntimeNS, UINamespaces.Add ("GameKit"); if (Frameworks.HaveNewsstandKit) UINamespaces.Add ("NewsstandKit"); - if (Frameworks.HaveiAd) - UINamespaces.Add ("iAd"); if (Frameworks.HaveQuickLook) UINamespaces.Add ("QuickLook"); if (Frameworks.HaveEventKitUI) @@ -101,10 +99,6 @@ public NamespaceCache (PlatformName currentPlatform, string customObjCRuntimeNS, ImplicitNamespaces.Add ("AVFoundation"); if (Frameworks.HaveOpenGL) ImplicitNamespaces.Add ("OpenGL"); -#if !NET - if (Frameworks.HaveQTKit) - ImplicitNamespaces.Add ("QTKit"); -#endif if (Frameworks.HaveAppKit) ImplicitNamespaces.Add ("AppKit"); if (Frameworks.HaveCloudKit && CurrentPlatform != PlatformName.WatchOS && CurrentPlatform != PlatformName.TvOS && CurrentPlatform != PlatformName.iOS) diff --git a/src/bgen/Caches/TypeCache.cs b/src/bgen/Caches/TypeCache.cs index a97441c5a1cb..3e7dba13ef8a 100644 --- a/src/bgen/Caches/TypeCache.cs +++ b/src/bgen/Caches/TypeCache.cs @@ -112,6 +112,9 @@ public class TypeCache { public Type? CMClock { get; } public Type? CMFormatDescription { get; } public Type? CMSampleBuffer { get; } + public Type? CMTag { get; } + public Type? CMTagCollection { get; } + public Type? CMTaggedBufferGroup { get; } public Type? CMTime { get; } public Type? CMTimebase { get; } public Type? CMTimeMapping { get; } @@ -274,6 +277,9 @@ public TypeCache (MetadataLoadContext universe, Frameworks frameworks, PlatformN CMClock = ConditionalLookup (platformAssembly, "CoreMedia", "CMClock"); CMFormatDescription = ConditionalLookup (platformAssembly, "CoreMedia", "CMFormatDescription"); CMSampleBuffer = ConditionalLookup (platformAssembly, "CoreMedia", "CMSampleBuffer"); + CMTag = ConditionalLookup (platformAssembly, "CoreMedia", "CMTag"); + CMTagCollection = ConditionalLookup (platformAssembly, "CoreMedia", "CMTagCollection"); + CMTaggedBufferGroup = ConditionalLookup (platformAssembly, "CoreMedia", "CMTaggedBufferGroup"); CMTime = ConditionalLookup (platformAssembly, "CoreMedia", "CMTime"); CMTimebase = ConditionalLookup (platformAssembly, "CoreMedia", "CMTimebase"); CMTimeMapping = ConditionalLookup (platformAssembly, "CoreMedia", "CMTimeMapping"); diff --git a/src/bgen/Frameworks.cs b/src/bgen/Frameworks.cs index 4d85a13df2d8..4fba81fb8bb8 100644 --- a/src/bgen/Frameworks.cs +++ b/src/bgen/Frameworks.cs @@ -22,9 +22,6 @@ bool GetValue (string framework) case PlatformName.iOS: frameworks = iosframeworks; break; - case PlatformName.WatchOS: - frameworks = watchosframeworks; - break; case PlatformName.TvOS: frameworks = tvosframeworks; break; diff --git a/src/bgen/Generator.cs b/src/bgen/Generator.cs index f07290779d3e..c16da26d7be5 100644 --- a/src/bgen/Generator.cs +++ b/src/bgen/Generator.cs @@ -1536,6 +1536,7 @@ void ThrowIfExceptions () if (exceptions.All (v => v is BindingException pe && !pe.Error)) { foreach (var e in exceptions) ErrorHelper.Show (e); + return; } throw new AggregateException (exceptions); @@ -1820,6 +1821,7 @@ void GenerateStrongDictionaryTypes () print ("namespace {0} {{", dictType.Namespace); indent++; + WriteDocumentation (dictType); PrintPlatformAttributes (dictType); PrintExperimentalAttribute (dictType); print ("public partial class {0} : DictionaryContainer {{", typeName); @@ -1844,6 +1846,7 @@ void GenerateStrongDictionaryTypes () keyname = keyContainerType + "." + keyname + "!"; } + WriteDocumentation (pi); PrintPlatformAttributes (pi); string modifier = pi.IsInternal (this) ? "internal" : "public"; @@ -3431,7 +3434,7 @@ void GenerateTypeLowering (MethodInfo mi, bool null_allowed_override, out String void GenerateArgumentChecks (MethodInfo mi, bool null_allowed_override, PropertyInfo propInfo = null) { if (AttributeManager.IsNullable (mi)) - ErrorHelper.Show (new BindingException (1118, false, mi)); + exceptions.Add (ErrorHelper.CreateWarning (1118, mi)); foreach (var pi in mi.GetParameters ()) { var safe_name = pi.Name.GetSafeParamName (); @@ -4188,7 +4191,7 @@ void GenerateProperty (Type type, PropertyInfo pi, List instance_fields_ var ba = GetBindAttribute (setter); bool null_allowed = AttributeManager.IsNullable (setter); if (null_allowed) - ErrorHelper.Show (new BindingException (1118, false, setter)); + exceptions.Add (ErrorHelper.CreateWarning (1118, setter)); null_allowed |= AttributeManager.IsNullable (pi); var not_implemented_attr = AttributeManager.GetCustomAttribute (setter); string sel; @@ -4863,6 +4866,9 @@ void GenerateProtocolTypes (Type type, string class_visibility, string TypeName, var extensionMethods = optionalInstanceMethods.Concat (requiredInstanceMethods.Where (v => IsRequired (v, out var generateExtensionMethod) && generateExtensionMethod)); var extensionProperties = optionalInstanceProperties.Concat (requiredInstanceProperties.Where (v => IsRequired (v, out var generateExtensionMethod) && generateExtensionMethod)); + // disable CS1573, which can happen when the original member in the api definition has xml comments and we copy that xml comment into the generated interface - because we may add parameters to method signatures, and the new parameters won't have an xml comment. + print ("#pragma warning disable CS1573"); // Parameter 'This' has no matching param tag in the XML comment for '...' (but other parameters do) + WriteDocumentation (type); PrintAttributes (type, platform: true, preserve: true, advice: true); @@ -5153,12 +5159,16 @@ void GenerateProtocolTypes (Type type, string class_visibility, string TypeName, print ("}"); print (""); + print ("#pragma warning restore CS1573"); + // avoid (for unified) all the metadata for empty static classes, we can introduce them later when required bool include_extensions = false; if (backwardsCompatibleCodeGeneration) include_extensions = extensionMethods.Any () || extensionProperties.Any () || requiredInstanceAsyncMethods.Any (); if (include_extensions) { - // extension methods + // disable CS1573, which can happen when the original member in the api definition has xml comments and we copy that xml comment into the generated extension member - because we may add parameters to method signatures, and the new parameters won't have an xml comment. + print ("#pragma warning disable CS1573"); // Parameter 'This' has no matching param tag in the XML comment for '...' (but other parameters do) + // extension methods if (BindingTouch.SupportsXmlDocumentation) { print ($"/// Extension methods to the interface to support all the methods from the {protocol_name} protocol."); print ($"/// "); @@ -5199,6 +5209,7 @@ void GenerateProtocolTypes (Type type, string class_visibility, string TypeName, indent--; print ("}"); print (""); + print ("#pragma warning restore CS1573"); } // Add API from base interfaces we also need to implement. @@ -5722,7 +5733,7 @@ public void Generate (Type type) is_direct_binding = false; is_direct_binding_value = "false"; } - print ("[Register(\"{0}\", {1})]", register_name, is_direct_binding == false ? "false" : "true"); + print ($"[Register(\"{register_name}\", {(is_direct_binding == false ? "false" : "true")}{(bta.IsStubClass ? ", IsStubClass = true" : string.Empty)})]"); } if (is_abstract || need_abstract.ContainsKey (type)) { // Don't mark [Abstract] classes as abstract in .NET, we might need to create instances of them at some point. @@ -6257,6 +6268,7 @@ public void Generate (Type type) print ("static {0}? _{1};", fieldTypeName, field_pi.Name); } + WriteDocumentation (field_pi); PrintAttributes (field_pi, preserve: true, advice: true); PrintObsoleteAttributes (field_pi); print ("[Field (\"{0}\", \"{1}\")]", fieldAttr.SymbolName, library_path ?? library_name); @@ -6344,6 +6356,8 @@ public void Generate (Type type) print ("return Dlfcn.GetNFloat (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType == TypeCache.CoreGraphics_CGSize) { print ("return Dlfcn.GetCGSize (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); + } else if (field_pi.PropertyType == TypeCache.CMTag) { + print ("return Dlfcn.GetStruct (Libraries.{2}.Handle, \"{1}\");", field_pi.Name, fieldAttr.SymbolName, library_name); } else if (field_pi.PropertyType.IsEnum) { var btype = field_pi.PropertyType.GetEnumUnderlyingType (); if (smartEnumTypeName is not null) { diff --git a/src/bgen/Models/MarshalTypeList.cs b/src/bgen/Models/MarshalTypeList.cs index ea7a3250cada..bd550df7b0dc 100644 --- a/src/bgen/Models/MarshalTypeList.cs +++ b/src/bgen/Models/MarshalTypeList.cs @@ -66,6 +66,8 @@ public void Load (TypeCache typeCache, Frameworks frameworks) Add (new MarshalType (typeCache.CMFormatDescription!, create: "CMFormatDescription.Create (", closingCreate: ", %OWNS%)!")); Add (typeCache.CMAudioFormatDescription); Add (typeCache.CMVideoFormatDescription); + Add (typeCache.CMTaggedBufferGroup); + Add (typeCache.CMTagCollection); } if (frameworks.HaveAudioUnit) Add (typeCache.AudioUnit); diff --git a/src/browserenginekit.cs b/src/browserenginekit.cs index 17a73ede54b2..e5788e8b1abf 100644 --- a/src/browserenginekit.cs +++ b/src/browserenginekit.cs @@ -52,7 +52,7 @@ using OS_xpc_object = Foundation.NSObject; namespace BrowserEngineKit { - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BELayerHierarchyHandle : NSSecureCoding @@ -66,7 +66,7 @@ interface BELayerHierarchyHandle : NSSecureCoding OS_xpc_object CreateXpcRepresentation (); } - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BELayerHierarchy @@ -86,7 +86,7 @@ interface BELayerHierarchy void Invalidate (); } - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof (UIView))] interface BELayerHierarchyHostingView { @@ -94,7 +94,7 @@ interface BELayerHierarchyHostingView BELayerHierarchyHandle LayerHierarchyHandle { get; set; } } - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BELayerHierarchyHostingTransactionCoordinator : NSSecureCoding @@ -123,7 +123,7 @@ interface BELayerHierarchyHostingTransactionCoordinator : NSSecureCoding void Commit (); } - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(UIContextMenuConfiguration))] [DisableDefaultCtor] interface BEContextMenuConfiguration @@ -138,7 +138,7 @@ interface BEContextMenuConfiguration delegate bool BEDragInteractionDelegateGetDragItemsCallback (UIDragItem[] items); - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof (UIDragInteractionDelegate))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] interface BEDragInteractionDelegate @@ -152,7 +152,7 @@ interface BEDragInteractionDelegate interface IBEDragInteractionDelegate {} - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof (UIDragInteraction))] interface BEDragInteraction { @@ -168,7 +168,7 @@ interface BEDragInteraction NativeHandle Constructor (IBEDragInteractionDelegate @delegate); } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof (UIScrollViewDelegate))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] interface BEScrollViewDelegate @@ -183,7 +183,7 @@ interface BEScrollViewDelegate interface IBEScrollViewDelegate {} - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(UIScrollView))] interface BEScrollView { @@ -195,7 +195,7 @@ interface BEScrollView NSObject WeakDelegate { get; set; } } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Native] public enum BEScrollViewScrollUpdatePhase : long { @@ -205,7 +205,7 @@ public enum BEScrollViewScrollUpdatePhase : long Cancelled, } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BEScrollViewScrollUpdate @@ -225,7 +225,7 @@ interface BEScrollViewScrollUpdate delegate void BEWebContentProcessCreateCallback ([NullAllowed] BEWebContentProcess proces, [NullAllowed] NSError error); - [NoWatch, NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] + [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BEWebContentProcess @@ -257,7 +257,7 @@ interface BEWebContentProcess IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error); // Inlined from the CapabilityInvalidationHandler (BEWebContentProcess) category - [NoWatch, NoTV, NoMac, iOS (17,6), MacCatalyst (17, 6)] + [NoTV, NoMac, iOS (17,6), MacCatalyst (17, 6)] [Export ("grantCapability:error:invalidationHandler:")] [return: NullAllowed] IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error, Action invalidationHandler); @@ -265,7 +265,7 @@ interface BEWebContentProcess delegate void BENetworkingProcessCreateCallback ([NullAllowed] BENetworkingProcess proces, [NullAllowed] NSError error); - [NoWatch, NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] + [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BENetworkingProcess @@ -294,7 +294,7 @@ interface BENetworkingProcess IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error); // Inlined from the CapabilityInvalidationHandler (BENetworkingProcess) category - [NoWatch, NoMac, NoTV, iOS (17, 6), MacCatalyst (17, 6)] + [NoMac, NoTV, iOS (17, 6), MacCatalyst (17, 6)] [Export ("grantCapability:error:invalidationHandler:")] [return: NullAllowed] IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error, Action invalidationHandler); @@ -302,7 +302,7 @@ interface BENetworkingProcess delegate void BERenderingProcessCreateCallback ([NullAllowed] BERenderingProcess proces, [NullAllowed] NSError error); - [NoWatch, NoTV, Mac (14, 3), iOS (17,4), MacCatalyst (17, 4)] + [NoTV, Mac (14, 3), iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BERenderingProcess @@ -334,14 +334,14 @@ interface BERenderingProcess IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error); // Inlined from the CapabilityInvalidationHandler (BERenderingProcess) category - [NoWatch, NoTV, NoMac, iOS (17,6), MacCatalyst (17, 6)] + [NoTV, NoMac, iOS (17,6), MacCatalyst (17, 6)] [Export ("grantCapability:error:invalidationHandler:")] [return: NullAllowed] IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error, Action invalidationHandler); } // Headers say this is available on macOS 14.3, but the BETextInput type isn't, so just remove this type from macOS as well. - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] interface BETextInputDelegate @@ -373,7 +373,7 @@ interface BETextInputDelegate interface IBETextInputDelegate {} - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Native] public enum BEKeyPressState : long { @@ -381,7 +381,7 @@ public enum BEKeyPressState : long Up = 2, } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BEKeyEntry @@ -399,7 +399,7 @@ interface BEKeyEntry double Timestamp { get; } } - [NoWatch, TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] [Native] public enum BEGestureType : long { @@ -415,7 +415,7 @@ public enum BEGestureType : long ForceTouch = 15, } - [NoWatch, TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] [Native] public enum BESelectionTouchPhase : long { @@ -428,7 +428,7 @@ public enum BESelectionTouchPhase : long } [Flags] - [NoWatch, TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] [Native] public enum BESelectionFlags : ulong { @@ -438,7 +438,7 @@ public enum BESelectionFlags : ulong PhraseBoundaryChanged = 1uL << 2, } - [NoWatch, TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BETextAlternatives @@ -450,7 +450,7 @@ interface BETextAlternatives string[] AlternativeStrings { get; } } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Flags] [Native] public enum BETextReplacementOptions : ulong @@ -459,7 +459,7 @@ public enum BETextReplacementOptions : ulong AddUnderline = 1uL << 0, } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Flags] [Native] public enum BEKeyModifierFlags : long @@ -469,7 +469,7 @@ public enum BEKeyModifierFlags : long CapsLock, } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface BEResponderEditActions : UIResponderStandardEditActions { @@ -498,7 +498,7 @@ interface BEResponderEditActions : UIResponderStandardEditActions void TransliterateChinese ([NullAllowed] NSObject sender); } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface BETextSelectionDirectionNavigation { @@ -519,7 +519,7 @@ interface BETextSelectionDirectionNavigation void ExtendInStorageDirection (UITextStorageDirection direction, UITextGranularity granularity); } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface BEExtendedTextInputTraits : UITextInputTraits { @@ -546,7 +546,7 @@ interface IBEExtendedTextInputTraits {} delegate void BETextInputRequestTextContextForAutocorrectionCallback (BETextDocumentContext context); delegate void BETextInputRequestTextRectsCallback (UITextSelectionRect[] rects); - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BEResponderEditActions { @@ -611,17 +611,17 @@ interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BERespon [Export ("automaticallyPresentEditMenu")] bool AutomaticallyPresentEditMenu { get; } - [NoWatch, NoTV] + [NoTV] [Abstract] [Export ("requestPreferredArrowDirectionForEditMenuWithCompletionHandler:")] void RequestPreferredArrowDirectionForEditMenuWithCompletionHandler (Action completionHandler); - [NoWatch, NoTV] + [NoTV] [Abstract] [Export ("systemWillPresentEditMenuWithAnimator:")] void SystemWillPresentEditMenu (IUIEditMenuInteractionAnimating animator); - [NoWatch, NoTV] + [NoTV] [Abstract] [Export ("systemWillDismissEditMenuWithAnimator:")] void SystemWillDismissEditMenu (IUIEditMenuInteractionAnimating animator); @@ -831,7 +831,7 @@ interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BERespon interface IBETextInput {} - [NoWatch, TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BETextSuggestion @@ -843,7 +843,7 @@ interface BETextSuggestion string InputText { get; } } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(BETextSuggestion))] [DisableDefaultCtor] interface BEAutoFillTextSuggestion @@ -852,7 +852,7 @@ interface BEAutoFillTextSuggestion NSDictionary Contents { get; } } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] interface BETextInteraction : UIInteraction { @@ -901,22 +901,22 @@ interface BETextInteraction : UIInteraction [Export ("textSelectionDisplayInteraction")] UITextSelectionDisplayInteraction TextSelectionDisplayInteraction { get; } - [NoWatch, NoTV] + [NoTV] [Wrap ("WeakContextMenuInteractionDelegate")] [NullAllowed] IUIContextMenuInteractionDelegate ContextMenuInteractionDelegate { get; set; } - [NoWatch, NoTV] + [NoTV] [NullAllowed, Export ("contextMenuInteractionDelegate", ArgumentSemantic.Weak)] NSObject WeakContextMenuInteractionDelegate { get; set; } - [NoWatch, NoTV] + [NoTV] [Export ("contextMenuInteraction")] UIContextMenuInteraction ContextMenuInteraction { get; } } // Headers say this is available on macOS 14.3, but the BETextInteraction type isn't, so just remove this type from macOS as well. - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] interface BETextInteractionDelegate @@ -932,7 +932,7 @@ interface BETextInteractionDelegate interface IBETextInteractionDelegate {} - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BEKeyEntryContext @@ -955,7 +955,7 @@ interface BEKeyEntryContext } [Flags] - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [Native] public enum BETextDocumentRequestOptions : long { @@ -967,7 +967,7 @@ public enum BETextDocumentRequestOptions : long AutocorrectedRanges = 1L << 7, } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BETextDocumentRequest @@ -982,7 +982,7 @@ interface BETextDocumentRequest nint GranularityCount { get; set; } } - [NoWatch, TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BETextDocumentContext @@ -1000,7 +1000,7 @@ interface BETextDocumentContext NSValue[] AutocorrectedRanges { get; set; } } - [NoWatch, NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] + [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface BEProcessCapabilityGrant { @@ -1015,7 +1015,7 @@ interface BEProcessCapabilityGrant interface IBEProcessCapabilityGrant {} - [NoWatch, NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BEMediaEnvironment @@ -1041,7 +1041,7 @@ interface BEMediaEnvironment AVCaptureSession MakeCaptureSession ([NullAllowed] out NSError error); } - [NoWatch, NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] + [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BEProcessCapability @@ -1067,7 +1067,7 @@ interface BEProcessCapability IBEProcessCapabilityGrant Request ([NullAllowed] out NSError error); } - [NoWatch, TV (17, 5), Mac (14, 5), iOS (17,5), MacCatalyst (17, 5)] + [TV (17, 5), Mac (14, 5), iOS (17,5), MacCatalyst (17, 5)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface BEWebAppManifest @@ -1083,7 +1083,7 @@ interface BEWebAppManifest NSUrl ManifestUrl { get; } } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum BEAccessibilityPressedState : long { @@ -1094,7 +1094,7 @@ public enum BEAccessibilityPressedState : long } [Flags] - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum BEAccessibilityContainerType : ulong { @@ -1113,7 +1113,7 @@ public enum BEAccessibilityContainerType : ulong DescriptionList = 1uL << 11, } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Category] [BaseType (typeof (NSObject))] interface NSObject_BEAccessibility @@ -1195,7 +1195,7 @@ interface NSObject_BEAccessibility } [BackingFieldType (typeof (ulong))] - [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoMac, MacCatalyst (18, 0)] + [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoMac] public enum BEAccessibilityTrait : long { [Field ("BEAccessibilityTraitMenuItem")] MenuItem, @@ -1214,7 +1214,7 @@ public enum BEAccessibilityTrait : long { } [BackingFieldType (typeof (uint))] - [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoMac, MacCatalyst (18, 0)] + [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoMac] public enum BEAccessibilityNotification : long { [Field ("BEAccessibilitySelectionChangedNotification")] SelectionChanged, diff --git a/src/build/dotnet/generator-frameworks.g.cs b/src/build/dotnet/generator-frameworks.g.cs index 267cd0c0cd52..5f219d24ed25 100644 --- a/src/build/dotnet/generator-frameworks.g.cs +++ b/src/build/dotnet/generator-frameworks.g.cs @@ -29,7 +29,6 @@ partial class Frameworks { "CallKit", "CarPlay", "CFNetwork", - "Chip", "Cinematic", "ClassKit", "CloudKit", @@ -71,7 +70,6 @@ partial class Frameworks { "HealthKit", "HealthKitUI", "HomeKit", - "iAd", "IdentityLookup", "IdentityLookupUI", "ImageIO", @@ -145,7 +143,6 @@ partial class Frameworks { "Vision", "VisionKit", "WatchConnectivity", - "WatchKit", "WebKit", "XKit", }; @@ -170,7 +167,6 @@ partial class Frameworks { "BusinessChat", "CallKit", "CFNetwork", - "Chip", "Cinematic", "ClassKit", "CloudKit", @@ -183,6 +179,7 @@ partial class Frameworks { "CoreData", "CoreFoundation", "CoreGraphics", + "CoreHaptics", "CoreImage", "CoreLocation", "CoreMedia", @@ -254,7 +251,6 @@ partial class Frameworks { "PhotosUI", "PrintCore", "PushKit", - "QTKit", "QuartzComposer", "QuickLook", "QuickLookThumbnailing", @@ -291,63 +287,6 @@ partial class Frameworks { "XKit", }; // GENERATED FILE - DO NOT EDIT - internal readonly HashSet watchosframeworks = new HashSet { - "Accelerate", - "Accessibility", - "AuthenticationServices", - "AVFoundation", - "CallKit", - "Chip", - "ClockKit", - "CloudKit", - "Compression", - "Contacts", - "CoreBluetooth", - "CoreData", - "CoreFoundation", - "CoreGraphics", - "CoreLocation", - "CoreMedia", - "CoreMidi", - "CoreML", - "CoreMotion", - "CoreText", - "CoreVideo", - "CryptoTokenKit", - "DeviceCheck", - "EventKit", - "Foundation", - "GameKit", - "HealthKit", - "HomeKit", - "ImageIO", - "Intents", - "LocalAuthentication", - "MapKit", - "MediaPlayer", - "MobileCoreServices", - "NaturalLanguage", - "NearbyInteraction", - "Network", - "OSLog", - "PassKit", - "PushKit", - "SafetyKit", - "SceneKit", - "Security", - "ShazamKit", - "SoundAnalysis", - "SpriteKit", - "StoreKit", - "Symbols", - "UIKit", - "UniformTypeIdentifiers", - "UserNotifications", - "WatchConnectivity", - "WatchKit", - "XKit", - }; - // GENERATED FILE - DO NOT EDIT internal readonly HashSet tvosframeworks = new HashSet { "Accelerate", "Accessibility", @@ -361,7 +300,6 @@ partial class Frameworks { "BackgroundTasks", "BrowserEngineKit", "CFNetwork", - "Chip", "Cinematic", "CloudKit", "Compression", @@ -595,10 +533,8 @@ partial class Frameworks { bool? _CallKit; bool? _CarPlay; bool? _CFNetwork; - bool? _Chip; bool? _Cinematic; bool? _ClassKit; - bool? _ClockKit; bool? _CloudKit; bool? _Compression; bool? _Contacts; @@ -645,7 +581,6 @@ partial class Frameworks { bool? _HealthKit; bool? _HealthKitUI; bool? _HomeKit; - bool? _iAd; bool? _IdentityLookup; bool? _IdentityLookupUI; bool? _ImageCaptureCore; @@ -697,7 +632,6 @@ partial class Frameworks { bool? _PrintCore; bool? _PushKit; bool? _PushToTalk; - bool? _QTKit; bool? _QuartzComposer; bool? _QuickLook; bool? _QuickLookThumbnailing; @@ -738,7 +672,6 @@ partial class Frameworks { bool? _Vision; bool? _VisionKit; bool? _WatchConnectivity; - bool? _WatchKit; bool? _WebKit; bool? _XKit; public bool HaveAccelerate { get { if (!_Accelerate.HasValue) _Accelerate = GetValue ("Accelerate"); return _Accelerate.Value; } } @@ -768,10 +701,8 @@ partial class Frameworks { public bool HaveCallKit { get { if (!_CallKit.HasValue) _CallKit = GetValue ("CallKit"); return _CallKit.Value; } } public bool HaveCarPlay { get { if (!_CarPlay.HasValue) _CarPlay = GetValue ("CarPlay"); return _CarPlay.Value; } } public bool HaveCFNetwork { get { if (!_CFNetwork.HasValue) _CFNetwork = GetValue ("CFNetwork"); return _CFNetwork.Value; } } - public bool HaveChip { get { if (!_Chip.HasValue) _Chip = GetValue ("Chip"); return _Chip.Value; } } public bool HaveCinematic { get { if (!_Cinematic.HasValue) _Cinematic = GetValue ("Cinematic"); return _Cinematic.Value; } } public bool HaveClassKit { get { if (!_ClassKit.HasValue) _ClassKit = GetValue ("ClassKit"); return _ClassKit.Value; } } - public bool HaveClockKit { get { if (!_ClockKit.HasValue) _ClockKit = GetValue ("ClockKit"); return _ClockKit.Value; } } public bool HaveCloudKit { get { if (!_CloudKit.HasValue) _CloudKit = GetValue ("CloudKit"); return _CloudKit.Value; } } public bool HaveCompression { get { if (!_Compression.HasValue) _Compression = GetValue ("Compression"); return _Compression.Value; } } public bool HaveContacts { get { if (!_Contacts.HasValue) _Contacts = GetValue ("Contacts"); return _Contacts.Value; } } @@ -818,7 +749,6 @@ partial class Frameworks { public bool HaveHealthKit { get { if (!_HealthKit.HasValue) _HealthKit = GetValue ("HealthKit"); return _HealthKit.Value; } } public bool HaveHealthKitUI { get { if (!_HealthKitUI.HasValue) _HealthKitUI = GetValue ("HealthKitUI"); return _HealthKitUI.Value; } } public bool HaveHomeKit { get { if (!_HomeKit.HasValue) _HomeKit = GetValue ("HomeKit"); return _HomeKit.Value; } } - public bool HaveiAd { get { if (!_iAd.HasValue) _iAd = GetValue ("iAd"); return _iAd.Value; } } public bool HaveIdentityLookup { get { if (!_IdentityLookup.HasValue) _IdentityLookup = GetValue ("IdentityLookup"); return _IdentityLookup.Value; } } public bool HaveIdentityLookupUI { get { if (!_IdentityLookupUI.HasValue) _IdentityLookupUI = GetValue ("IdentityLookupUI"); return _IdentityLookupUI.Value; } } public bool HaveImageCaptureCore { get { if (!_ImageCaptureCore.HasValue) _ImageCaptureCore = GetValue ("ImageCaptureCore"); return _ImageCaptureCore.Value; } } @@ -870,7 +800,6 @@ partial class Frameworks { public bool HavePrintCore { get { if (!_PrintCore.HasValue) _PrintCore = GetValue ("PrintCore"); return _PrintCore.Value; } } public bool HavePushKit { get { if (!_PushKit.HasValue) _PushKit = GetValue ("PushKit"); return _PushKit.Value; } } public bool HavePushToTalk { get { if (!_PushToTalk.HasValue) _PushToTalk = GetValue ("PushToTalk"); return _PushToTalk.Value; } } - public bool HaveQTKit { get { if (!_QTKit.HasValue) _QTKit = GetValue ("QTKit"); return _QTKit.Value; } } public bool HaveQuartzComposer { get { if (!_QuartzComposer.HasValue) _QuartzComposer = GetValue ("QuartzComposer"); return _QuartzComposer.Value; } } public bool HaveQuickLook { get { if (!_QuickLook.HasValue) _QuickLook = GetValue ("QuickLook"); return _QuickLook.Value; } } public bool HaveQuickLookThumbnailing { get { if (!_QuickLookThumbnailing.HasValue) _QuickLookThumbnailing = GetValue ("QuickLookThumbnailing"); return _QuickLookThumbnailing.Value; } } @@ -911,7 +840,6 @@ partial class Frameworks { public bool HaveVision { get { if (!_Vision.HasValue) _Vision = GetValue ("Vision"); return _Vision.Value; } } public bool HaveVisionKit { get { if (!_VisionKit.HasValue) _VisionKit = GetValue ("VisionKit"); return _VisionKit.Value; } } public bool HaveWatchConnectivity { get { if (!_WatchConnectivity.HasValue) _WatchConnectivity = GetValue ("WatchConnectivity"); return _WatchConnectivity.Value; } } - public bool HaveWatchKit { get { if (!_WatchKit.HasValue) _WatchKit = GetValue ("WatchKit"); return _WatchKit.Value; } } public bool HaveWebKit { get { if (!_WebKit.HasValue) _WebKit = GetValue ("WebKit"); return _WebKit.Value; } } public bool HaveXKit { get { if (!_XKit.HasValue) _XKit = GetValue ("XKit"); return _XKit.Value; } } } diff --git a/src/callkit.cs b/src/callkit.cs index 6239aa80ba98..0ea59236e079 100644 --- a/src/callkit.cs +++ b/src/callkit.cs @@ -20,7 +20,7 @@ namespace CallKit { /// Enumerates call directory states. - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [Native] public enum CXCallDirectoryEnabledStatus : long { @@ -30,7 +30,7 @@ public enum CXCallDirectoryEnabledStatus : long { } /// Enumerates Call Kit errors. - [NoMac, MacCatalyst (14, 0), Watch (9, 0)] + [NoMac, MacCatalyst (14, 0)] [ErrorDomain ("CXErrorDomain")] [Native] public enum CXErrorCode : long { @@ -89,7 +89,7 @@ public enum CXErrorCodeCallDirectoryManagerError : long { UnexpectedIncrementalRemoval = 8, } - [iOS (14, 5), Watch (9, 0), NoTV, NoMac] + [iOS (14, 5), NoTV, NoMac] [Introduced (PlatformName.MacCatalyst, 14, 5)] [ErrorDomain ("CXErrorDomainNotificationServiceExtension")] [Native] @@ -147,7 +147,7 @@ public enum CXHandleType : long { /// A unique identifier for a VOIP user. /// /// Apple documentation for CXHandle - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -170,7 +170,7 @@ interface CXHandle : NSCopying, NSSecureCoding { /// Base class for CallKit actions, such as those taken when a call begins or ends, a call is put on hold, and so on. /// Developers manage the life cycle of a call by sending and receiving objects that derive from to and from and objects. /// Apple documentation for CXAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // designated @@ -200,7 +200,7 @@ interface CXAction : NSCopying, NSSecureCoding { /// /// objects are passed to the developer's method when the user answers a call. /// Apple documentation for CXAnswerCallAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (CXCallAction))] [DisableDefaultCtor] @@ -217,7 +217,7 @@ interface CXAnswerCallAction { /// Represents a CallKit call. /// /// Apple documentation for CXCall - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -245,7 +245,7 @@ interface CXCall { /// Base class for objects that contain the information that is needed to perform an action on a call. /// /// Apple documentation for CXCallAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (CXAction))] [DisableDefaultCtor] @@ -262,7 +262,7 @@ interface CXCallAction { /// Informs the system about in-band user actions, such as reqeusts to start a call, or to put a call on hold. /// /// Apple documentation for CXCallController - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CXCallController { @@ -292,7 +292,7 @@ interface CXCallController { /// Extension context for a call directory. /// /// Apple documentation for CXCallDirectoryExtensionContext - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSExtensionContext))] interface CXCallDirectoryExtensionContext { @@ -307,7 +307,7 @@ interface CXCallDirectoryExtensionContext { [Export ("completeRequestWithCompletionHandler:")] void CompleteRequest ([NullAllowed] Action completion); - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak), NoWatch] + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] [MacCatalyst (13, 1)] ICXCallDirectoryExtensionContextDelegate Delegate { get; set; } @@ -335,7 +335,7 @@ interface CXCallDirectoryExtensionContext { interface ICXCallDirectoryExtensionContextDelegate { } /// Apple documentation for CXCallDirectoryExtensionContextDelegate - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [Protocol] [Model] @@ -350,7 +350,7 @@ interface CXCallDirectoryExtensionContextDelegate { /// Manages a call directory extension. /// /// Apple documentation for CXCallDirectoryManager - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CXCallDirectoryManager { @@ -367,7 +367,7 @@ interface CXCallDirectoryManager { [Export ("getEnabledStatusForExtensionWithIdentifier:completionHandler:")] void GetEnabledStatusForExtension (string identifier, Action completion); - [NoWatch, NoTV, NoMac, iOS (13, 4), MacCatalyst (14, 0)] + [NoTV, NoMac, iOS (13, 4), MacCatalyst (14, 0)] [Async] [Export ("openSettingsWithCompletionHandler:")] void OpenSettings ([NullAllowed] Action completion); @@ -376,7 +376,7 @@ interface CXCallDirectoryManager { /// Call directory extension provider. /// /// Apple documentation for CXCallDirectoryProvider - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CXCallDirectoryProvider : NSExtensionRequestHandling { @@ -389,7 +389,7 @@ interface ICXCallObserverDelegate { } /// Delegate object that responds to call changes. /// /// Apple documentation for CXCallObserverDelegate - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -403,7 +403,7 @@ interface CXCallObserverDelegate { /// Observer for the calls in a . /// /// Apple documentation for CXCallObserver - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CXCallObserver { @@ -418,7 +418,7 @@ interface CXCallObserver { /// Contains values with which to update a call's parameters. /// /// Apple documentation for CXCallUpdate - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CXCallUpdate : NSCopying { @@ -449,7 +449,7 @@ interface CXCallUpdate : NSCopying { /// /// objects are passed to the developer's method when a call is ended. /// Apple documentation for CXEndCallAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction))] @@ -466,7 +466,7 @@ interface CXEndCallAction { /// Contains the information that is needed to play a DTMF signal that represents a touch tone. /// /// Apple documentation for CXPlayDTMFCallAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction), Name = "CXPlayDTMFCallAction")] @@ -493,7 +493,7 @@ interface ICXProviderDelegate { } /// Apple documentation for CXProviderDelegate [Protocol, Model] - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CXProviderDelegate { @@ -548,7 +548,6 @@ interface CXProviderDelegate { /// /// Apple documentation for CXProvider [NoMac] - [Watch (9, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -577,7 +576,7 @@ interface CXProvider { [Export ("reportOutgoingCallWithUUID:connectedAtDate:")] void ReportConnectedOutgoingCall (NSUuid uuid, [NullAllowed] NSDate dateConnected); - [NoWatch, NoTV, NoMac, iOS (14, 5)] + [NoTV, NoMac, iOS (14, 5)] [Introduced (PlatformName.MacCatalyst, 14, 5)] [Static, Async] [Export ("reportNewIncomingVoIPPushPayload:completion:")] @@ -599,7 +598,6 @@ interface CXProvider { /// Contains values that control miscellaneous call properties, such as the ringtone, whether the call supports video, the maximum number of callers, and so on. /// /// Apple documentation for CXProviderConfiguration - [Watch (9, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -654,7 +652,6 @@ interface CXProviderConfiguration : NSCopying { /// objects are passed to the developer's method when the user joins a call. /// Apple documentation for CXSetGroupCallAction [NoMac] - [Watch (9, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CXCallAction))] [DisableDefaultCtor] @@ -672,7 +669,7 @@ interface CXSetGroupCallAction { /// /// objects are passed to the developer's method when the user puts a call on hold or takes a call off hold. /// Apple documentation for CXSetHeldCallAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction))] @@ -689,7 +686,7 @@ interface CXSetHeldCallAction { /// Contains the information that is necessary to mute or unmute a call. /// /// Apple documentation for CXSetMutedCallAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (CXCallAction))] [DisableDefaultCtor] @@ -710,7 +707,7 @@ interface CXSetMutedCallAction { /// Contains the information that is necessary to start a call. /// /// Apple documentation for CXStartCallAction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (CXCallAction))] @@ -738,7 +735,7 @@ interface CXStartCallAction { /// Runs a group of Call Kit actions atomically. /// /// Apple documentation for CXTransaction - [NoMac, Watch (9, 0)] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // there's a designated initializer that does not accept null diff --git a/src/carplay.cs b/src/carplay.cs index a47e6da4b6c8..2cebc0388688 100644 --- a/src/carplay.cs +++ b/src/carplay.cs @@ -25,7 +25,7 @@ interface NSUnitLength : NSUnit { } interface NSUnitAngle : NSUnit { } /// Enumerates the styles for a T:CarPlay.CPAlert object's action button. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] enum CPAlertActionStyle : ulong { Default = 0, @@ -34,7 +34,7 @@ enum CPAlertActionStyle : ulong { } /// Enumerates the kinds of . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] enum CPBarButtonType : ulong { Text, @@ -42,7 +42,7 @@ enum CPBarButtonType : ulong { } /// Enumerates the directions of panning the navigation map. - [Flags, NoWatch, NoTV, NoMac] + [Flags, NoTV, NoMac] [Native] enum CPPanDirection : long { None = 0, @@ -53,7 +53,7 @@ enum CPPanDirection : long { } /// Enumerates the reasons why a navigation alert was dismissed. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] enum CPNavigationAlertDismissalContext : ulong { Timeout = 0, @@ -62,7 +62,7 @@ enum CPNavigationAlertDismissalContext : ulong { } /// Enumerates the reasons why the current trip has been paused. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] enum CPTripPauseReason : ulong { Arrived = 1, @@ -73,7 +73,7 @@ enum CPTripPauseReason : ulong { } /// Flagging enumeration that describes how the UI might be limited. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Flags] [Native] enum CPLimitableUserInterface : ulong { @@ -81,7 +81,7 @@ enum CPLimitableUserInterface : ulong { Lists = 1uL << 1, } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [Flags] [Native] enum CPContentStyle : ulong { @@ -89,7 +89,7 @@ enum CPContentStyle : ulong { Dark = 1uL << 1, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Flags] [Native] enum CPManeuverDisplayStyle : long { @@ -100,7 +100,7 @@ enum CPManeuverDisplayStyle : long { InstructionOnly, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] enum CPTimeRemainingColor : ulong { Default = 0, @@ -109,28 +109,28 @@ enum CPTimeRemainingColor : ulong { Red, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Native] enum CPTripEstimateStyle : ulong { Light = 0, Dark, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Native] public enum CPBarButtonStyle : long { None, Rounded, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Native] public enum CPInformationTemplateLayout : long { Leading = 0, TwoColumn, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Native] public enum CPListItemAccessoryType : long { None = 0, @@ -138,14 +138,14 @@ public enum CPListItemAccessoryType : long { Cloud, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Native] public enum CPListItemPlayingIndicatorLocation : long { Leading = 0, Trailing, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Native] public enum CPMessageLeadingItem : long { None = 0, @@ -153,14 +153,14 @@ public enum CPMessageLeadingItem : long { Star, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Native] public enum CPMessageTrailingItem : long { None, Mute, } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Native] public enum CPTextButtonStyle : long { Normal = 0, @@ -168,14 +168,14 @@ public enum CPTextButtonStyle : long { Confirm, } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum CPAssistantCellPosition : long { Top = 0, Bottom, } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum CPAssistantCellVisibility : long { Off = 0, @@ -183,14 +183,14 @@ public enum CPAssistantCellVisibility : long { Always, } - [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV, NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV] [Native] public enum CPAssistantCellActionType : long { PlayMedia = 0, StartCall, } - [NoWatch, NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] [Native] public enum CPInstrumentClusterSetting : ulong { Unspecified, @@ -199,7 +199,7 @@ public enum CPInstrumentClusterSetting : ulong { UserPreference, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum CPLaneStatus : long { NotGood = 0, @@ -207,7 +207,7 @@ public enum CPLaneStatus : long { Preferred, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum CPManeuverType : ulong { NoTurn = 0, @@ -266,21 +266,21 @@ public enum CPManeuverType : ulong { ChangeHighwayRight = 53, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum CPJunctionType : ulong { Intersection = 0, Roundabout = 1, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum CPTrafficSide : ulong { Right = 0, Left = 1, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum CPManeuverState : long { Continue = 0, @@ -290,7 +290,7 @@ public enum CPManeuverState : long { } /// An action that is displayed on a button in an alert. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPAlertAction : NSSecureCoding { @@ -298,7 +298,7 @@ interface CPAlertAction : NSSecureCoding { [Export ("initWithTitle:style:handler:")] NativeHandle Constructor (string title, CPAlertActionStyle style, Action handler); - [NoWatch, NoTV, NoMac, iOS (16, 0)] + [NoTV, NoMac, iOS (16, 0)] [Export ("initWithTitle:color:handler:")] NativeHandle Constructor (string title, UIColor color, Action handler); @@ -312,7 +312,7 @@ interface CPAlertAction : NSSecureCoding { Action Handler { get; } [NullAllowed] - [NoWatch, NoTV, NoMac, iOS (16, 0)] + [NoTV, NoMac, iOS (16, 0)] [Export ("color", ArgumentSemantic.Copy)] UIColor Color { get; } } @@ -320,7 +320,7 @@ interface CPAlertAction : NSSecureCoding { delegate void CPBarButtonHandler (CPBarButton button); /// A button in the navigation bar. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPBarButton : NSSecureCoding { @@ -360,7 +360,7 @@ interface CPBarButton : NSSecureCoding { /// Interface defining necessary methods for the protocol. interface ICPBarButtonProviding { } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Protocol] interface CPBarButtonProviding { @@ -380,7 +380,7 @@ interface CPBarButtonProviding { } /// A menu item displayed in a . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPGridButton : NSSecureCoding { @@ -401,7 +401,7 @@ interface CPGridButton : NSSecureCoding { /// /// subclass that displays a menu in grid form. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPGridTemplate : CPBarButtonProviding { @@ -429,7 +429,7 @@ interface CPGridTemplate : CPBarButtonProviding { } /// A system-created controller object (similar, but not derived from, ). - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPInterfaceController { @@ -537,7 +537,7 @@ interface CPInterfaceController { interface ICPInterfaceControllerDelegate { } /// Default implementation of , the delegate object for objects. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] #if NET [Protocol, Model] #else @@ -566,7 +566,7 @@ interface ICPApplicationDelegate { } [Introduced (PlatformName.iOS, 12, 0)] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'CPTemplateApplicationSceneDelegate' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CPTemplateApplicationSceneDelegate' instead.")] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] #if NET [Protocol, Model] #else @@ -591,7 +591,7 @@ interface CPApplicationDelegate : UIApplicationDelegate { } /// A line in a . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPListItem : CPSelectableListItem, NSSecureCoding { @@ -668,7 +668,7 @@ interface CPListItem : CPSelectableListItem, NSSecureCoding { } /// Organizational element within a . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPListSection : NSSecureCoding { @@ -744,7 +744,7 @@ interface CPListSection : NSSecureCoding { /// /// that presents a hierarchical menu of choices. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPListTemplate : CPBarButtonProviding { @@ -818,7 +818,7 @@ interface ICPListTemplateDelegate { } /// Abstract implementation of , the delegate object for objects. [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CPListItem.Handler' instead.")] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CPListItem.Handler' instead.")] #if NET [Protocol, Model] @@ -834,7 +834,7 @@ interface CPListTemplateDelegate { } /// A step in a . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] interface CPManeuver : NSCopying, NSSecureCoding { @@ -935,7 +935,7 @@ interface CPManeuver : NSCopying, NSSecureCoding { } /// A button displayed on the . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPMapButton : NSSecureCoding { @@ -959,7 +959,7 @@ interface CPMapButton : NSSecureCoding { /// /// subclass that displays a map. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPMapTemplate : CPBarButtonProviding { @@ -1032,7 +1032,7 @@ interface CPMapTemplate : CPBarButtonProviding { interface ICPMapTemplateDelegate { } /// Default implementation of , providing the delegate object for objects. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] #if NET [Protocol, Model] #else @@ -1107,7 +1107,7 @@ interface CPMapTemplateDelegate { } /// A banner displayed with high-priority. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPNavigationAlert : NSSecureCoding { @@ -1149,7 +1149,7 @@ interface CPNavigationAlert : NSSecureCoding { } /// A session that may involve planning, updating, and executing a trip. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPNavigationSession { @@ -1203,7 +1203,7 @@ interface CPNavigationSession { /// /// subclass showing the destination search results. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (CPTemplate))] interface CPSearchTemplate { @@ -1220,7 +1220,7 @@ interface ICPSearchTemplateDelegate { } delegate void CPSearchTemplateDelegateUpdateHandler (CPListItem [] searchResults); /// Delegate object for the class. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] #if NET [Protocol, Model] #else @@ -1242,7 +1242,7 @@ interface CPSearchTemplateDelegate { } /// Class that responds to user-interface configuration changes. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPSessionConfiguration { @@ -1270,7 +1270,7 @@ interface CPSessionConfiguration { interface ICPSessionConfigurationDelegate { } /// Abstract implementation of I:Carlay.ICPSessionConfigurationDelegate. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] #if NET [Protocol, Model] #else @@ -1292,7 +1292,7 @@ interface CPSessionConfigurationDelegate { /// Abstract base class for CarPlay user interface templates. [Abstract] - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] interface CPTemplate : NSSecureCoding { [NullAllowed, Export ("userInfo", ArgumentSemantic.Strong)] @@ -1318,7 +1318,7 @@ interface CPTemplate : NSSecureCoding { } /// A possible route for the trip. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPRouteChoice : NSCopying, NSSecureCoding { @@ -1343,7 +1343,7 @@ interface CPRouteChoice : NSCopying, NSSecureCoding { } /// A journey from to . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPTrip : NSSecureCoding { @@ -1369,7 +1369,7 @@ interface CPTrip : NSSecureCoding { string [] DestinationNameVariants { get; set; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] interface CPVoiceControlState : NSSecureCoding { @@ -1391,7 +1391,7 @@ interface CPVoiceControlState : NSSecureCoding { /// /// subclass for displaying the voice control indicator. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPVoiceControlTemplate { @@ -1409,7 +1409,7 @@ interface CPVoiceControlTemplate { string ActiveStateIdentifier { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPImageSet : NSSecureCoding { @@ -1426,7 +1426,7 @@ interface CPImageSet : NSSecureCoding { interface ICPTemplateApplicationSceneDelegate { } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] #if NET [Protocol, Model] #else @@ -1459,7 +1459,7 @@ interface CPTemplateApplicationSceneDelegate : UISceneDelegate { void ContentStyleDidChange (UIUserInterfaceStyle contentStyle); } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [BaseType (typeof (UIScene))] interface CPTemplateApplicationScene { [Export ("initWithSession:connectionOptions:")] @@ -1487,7 +1487,7 @@ interface CPTemplateApplicationScene { NSString SessionRoleApplication { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (UIWindow))] interface CPWindow { @@ -1503,7 +1503,7 @@ interface CPWindow { } /// Estimates of time and distance requirements for requested navigation. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPTravelEstimates : NSSecureCoding { @@ -1528,7 +1528,7 @@ interface CPTravelEstimates : NSSecureCoding { double TimeRemaining { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (NSObject))] interface CPTripPreviewTextConfiguration : NSSecureCoding { @@ -1545,7 +1545,7 @@ interface CPTripPreviewTextConfiguration : NSSecureCoding { string OverviewButtonTitle { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPActionSheetTemplate { @@ -1563,7 +1563,7 @@ interface CPActionSheetTemplate { CPAlertAction [] Actions { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPAlertTemplate { @@ -1583,7 +1583,7 @@ interface CPAlertTemplate { nuint MaximumActionCount { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 4)] + [NoTV, NoMac, iOS (13, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPDashboardButton : NSSecureCoding { @@ -1602,7 +1602,7 @@ interface CPDashboardButton : NSSecureCoding { string [] SubtitleVariants { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 4)] + [NoTV, NoMac, iOS (13, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPDashboardController { @@ -1613,7 +1613,7 @@ interface CPDashboardController { interface ICPTemplateApplicationDashboardSceneDelegate { } - [NoWatch, NoTV, NoMac, iOS (13, 4)] + [NoTV, NoMac, iOS (13, 4)] #if NET [Protocol, Model] #else @@ -1629,7 +1629,7 @@ interface CPTemplateApplicationDashboardSceneDelegate : UISceneDelegate { void DidDisconnectDashboardController (CPTemplateApplicationDashboardScene templateApplicationDashboardScene, CPDashboardController dashboardController, UIWindow window); } - [NoWatch, NoTV, NoMac, iOS (13, 4)] + [NoTV, NoMac, iOS (13, 4)] [BaseType (typeof (UIScene))] interface CPTemplateApplicationDashboardScene { @@ -1654,7 +1654,7 @@ interface CPTemplateApplicationDashboardScene { UIWindow DashboardWindow { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPButton { @@ -1675,7 +1675,7 @@ interface CPButton { CGSize MaximumImageSize { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] interface CPContact : NSSecureCoding { [Export ("initWithName:image:")] @@ -1697,7 +1697,7 @@ interface CPContact : NSSecureCoding { string InformativeText { get; set; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPButton))] [DisableDefaultCtor] interface CPContactCallButton { @@ -1709,7 +1709,7 @@ interface CPContactCallButton { NativeHandle Constructor ([NullAllowed] Action handler); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPButton))] [DisableDefaultCtor] interface CPContactDirectionsButton { @@ -1721,7 +1721,7 @@ interface CPContactDirectionsButton { NativeHandle Constructor ([NullAllowed] Action handler); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPContactTemplate : CPBarButtonProviding { @@ -1733,7 +1733,7 @@ interface CPContactTemplate : CPBarButtonProviding { CPContact Contact { get; set; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPInformationItem : NSSecureCoding { @@ -1748,7 +1748,7 @@ interface CPInformationItem : NSSecureCoding { string Detail { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPInformationTemplate : CPBarButtonProviding { @@ -1771,7 +1771,7 @@ interface CPInformationTemplate : CPBarButtonProviding { delegate void CPListImageRowItemHandler (CPListImageRowItem item, nint index, [BlockCallback] Action completionBlock); - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPListImageRowItem : CPSelectableListItem { @@ -1806,7 +1806,7 @@ interface CPListImageRowItem : CPSelectableListItem { new string Text { get; set; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPTextButton { @@ -1821,7 +1821,7 @@ interface CPTextButton { CPTextButtonStyle TextStyle { get; set; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPBarButton))] interface CPMessageComposeBarButton { [Static] @@ -1833,7 +1833,7 @@ interface CPMessageComposeBarButton { NativeHandle Constructor (UIImage image); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] interface CPMessageListItem : CPListTemplateItem { [Internal] @@ -1869,7 +1869,7 @@ interface CPMessageListItem : CPListTemplateItem { new string Text { get; set; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPMessageListItemLeadingConfiguration { @@ -1886,7 +1886,7 @@ interface CPMessageListItemLeadingConfiguration { NativeHandle Constructor (CPMessageLeadingItem leadingItem, [NullAllowed] UIImage leadingImage, bool unread); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPMessageListItemTrailingConfiguration { @@ -1900,7 +1900,7 @@ interface CPMessageListItemTrailingConfiguration { NativeHandle Constructor (CPMessageTrailingItem trailingItem, [NullAllowed] UIImage trailingImage); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPNowPlayingButton : NSSecureCoding { @@ -1917,7 +1917,7 @@ interface CPNowPlayingButton : NSSecureCoding { CGSize MaximumImageSize { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPNowPlayingButton))] [DisableDefaultCtor] interface CPNowPlayingImageButton { @@ -1931,7 +1931,7 @@ interface CPNowPlayingImageButton { UIImage Image { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPPointOfInterest : NSSecureCoding { @@ -1993,7 +1993,7 @@ interface CPPointOfInterest : NSSecureCoding { interface ICPPointOfInterestTemplateDelegate { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] #if NET [Protocol, Model] #else @@ -2009,7 +2009,7 @@ interface CPPointOfInterestTemplateDelegate { void DidSelectPointOfInterest (CPPointOfInterestTemplate pointOfInterestTemplate, CPPointOfInterest pointOfInterest); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPPointOfInterestTemplate : CPBarButtonProviding { @@ -2039,7 +2039,7 @@ interface CPPointOfInterestTemplate : CPBarButtonProviding { interface ICPTabBarTemplateDelegate { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] #if NET [Protocol, Model] #else @@ -2053,7 +2053,7 @@ interface CPTabBarTemplateDelegate { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPTabBarTemplate { @@ -2091,7 +2091,7 @@ interface CPTabBarTemplate { interface ICPNowPlayingTemplateObserver { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Protocol] interface CPNowPlayingTemplateObserver { [Export ("nowPlayingTemplateUpNextButtonTapped:")] @@ -2101,7 +2101,7 @@ interface CPNowPlayingTemplateObserver { void AlbumArtistButtonTapped (CPNowPlayingTemplate nowPlayingTemplate); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPTemplate))] [DisableDefaultCtor] interface CPNowPlayingTemplate { @@ -2131,7 +2131,7 @@ interface CPNowPlayingTemplate { void UpdateNowPlayingButtons (CPNowPlayingButton [] nowPlayingButtons); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPButton))] [DisableDefaultCtor] interface CPContactMessageButton { @@ -2146,35 +2146,35 @@ interface CPContactMessageButton { string PhoneOrEmail { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPNowPlayingButton))] interface CPNowPlayingShuffleButton { [Export ("initWithHandler:")] NativeHandle Constructor ([NullAllowed] Action handler); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPNowPlayingButton))] interface CPNowPlayingAddToLibraryButton { [Export ("initWithHandler:")] NativeHandle Constructor ([NullAllowed] Action handler); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPNowPlayingButton))] interface CPNowPlayingMoreButton { [Export ("initWithHandler:")] NativeHandle Constructor ([NullAllowed] Action handler); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPNowPlayingButton))] interface CPNowPlayingPlaybackRateButton { [Export ("initWithHandler:")] NativeHandle Constructor ([NullAllowed] Action handler); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPNowPlayingButton))] interface CPNowPlayingRepeatButton { [Export ("initWithHandler:")] @@ -2183,7 +2183,7 @@ interface CPNowPlayingRepeatButton { interface ICPListTemplateItem { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Protocol] interface CPListTemplateItem { [Abstract] @@ -2206,7 +2206,7 @@ interface ICPSelectableListItem { } delegate void CPSelectableListItemHandler (ICPSelectableListItem item, [BlockCallback] Action completionBlock); - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [Protocol] interface CPSelectableListItem : CPListTemplateItem { [Abstract] @@ -2214,7 +2214,7 @@ interface CPSelectableListItem : CPListTemplateItem { CPSelectableListItemHandler Handler { get; set; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [BaseType (typeof (CPInformationItem))] [DisableDefaultCtor] interface CPInformationRatingItem { @@ -2229,7 +2229,7 @@ interface CPInformationRatingItem { NSNumber MaximumRating { get; } } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPAssistantCellConfiguration : NSSecureCoding { @@ -2246,7 +2246,7 @@ interface CPAssistantCellConfiguration : NSSecureCoding { CPAssistantCellActionType AssistantAction { get; } } - [NoWatch, NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPInstrumentClusterController { @@ -2276,7 +2276,7 @@ interface CPInstrumentClusterController { interface ICPInstrumentClusterControllerDelegate { } - [NoWatch, NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] #if NET [Protocol, Model] #else @@ -2308,7 +2308,7 @@ interface CPInstrumentClusterControllerDelegate { interface ICPTemplateApplicationInstrumentClusterSceneDelegate { } - [NoWatch, NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] #if NET [Protocol, Model] #else @@ -2327,7 +2327,7 @@ interface CPTemplateApplicationInstrumentClusterSceneDelegate : UISceneDelegate void ContentStyleDidChange (UIUserInterfaceStyle contentStyle); } - [NoWatch, NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] [BaseType (typeof (UIScene))] [DisableDefaultCtor] interface CPTemplateApplicationInstrumentClusterScene { @@ -2353,7 +2353,7 @@ interface CPTemplateApplicationInstrumentClusterScene { UIUserInterfaceStyle ContentStyle { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4)] + [NoTV, NoMac, iOS (17, 4)] [NoMacCatalyst] // We don't expose CarPlay on Mac Catalyst for the moment // [MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2405,7 +2405,7 @@ NSMeasurement [] SecondaryAngles { NSMeasurement [] Angles { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] interface CPLaneGuidance : NSCopying, NSSecureCoding { @@ -2417,7 +2417,7 @@ interface CPLaneGuidance : NSCopying, NSSecureCoding { } // @interface CPRouteInformation : NSObject - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CPRouteInformation { diff --git a/src/chip.cs b/src/chip.cs deleted file mode 100644 index 30f3e2e147c2..000000000000 --- a/src/chip.cs +++ /dev/null @@ -1,4050 +0,0 @@ -#if !NET // Excluded from dotnet6 due to native API is not stable -using CoreFoundation; -using ObjCRuntime; -using Foundation; -using Security; - -using System; - -#if !NET -using NativeHandle = System.IntPtr; -#endif - -namespace Chip { - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [Native] - public enum ChipOnboardingPayloadType : ulong { - QRCode = 0, - ManualCode, - Nfc, - Admin, - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [Native] - public enum ChipPairingStatus : ulong { - SecurePairingSuccess = 0, - SecurePairingFailed, - UnknownStatus, - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [ErrorDomain ("CHIPErrorDomain")] - [Native] - public enum ChipErrorCode : long { - Success = 0, - UndefinedError = 1, - InvalidStringLength = 2, - InvalidIntegerValue = 3, - InvalidArgument = 4, - InvalidMessageLength = 5, - InvalidState = 6, - WrongAddressType = 7, - IntegrityCheckFailed = 8, - DuplicateExists = 9, - UnsupportedAttribute = 10, - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [Flags] - [Native] - public enum ChipRendezvousInformationFlags : ulong { - None = 0, - SoftAP = 1uL << 0, - Ble = 1uL << 1, - OnNetwork = 1uL << 2, - AllMask = SoftAP | Ble | OnNetwork, - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [Native] - public enum ChipCommissioningFlow : ulong { - Standard = 0, - UserActionRequired = 1, - Custom = 2, - Invalid = 3, - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [Native] - public enum ChipOptionalQRCodeInfoType : ulong { - Unknown, - String, - Int32, - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (NSObject), Name = "CHIPDevice")] - [DisableDefaultCtor] - interface ChipDevice { - [Export ("openPairingWindow:error:")] - bool OpenPairingWindow (nuint duration, [NullAllowed] out NSError error); - - [Export ("openPairingWindowWithPIN:discriminator:setupPIN:error:")] - [return: NullAllowed] - string OpenPairingWindow (nuint duration, nuint discriminator, nuint setupPin, [NullAllowed] out NSError error); - - [Export ("isActive")] - bool IsActive { get; } - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (NSObject), Name = "CHIPCluster")] - [DisableDefaultCtor] - interface ChipCluster { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - delegate void ChipResponseHandler ([NullAllowed] NSError error, [NullAllowed] NSDictionary data); - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPApplicationBasic")] - [DisableDefaultCtor] - interface ChipApplicationBasic { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("changeStatus:responseHandler:")] - void ChangeStatus (byte status, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeVendorNameWithResponseHandler:")] - void ReadAttributeVendorName (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeVendorIdWithResponseHandler:")] - void ReadAttributeVendorId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeApplicationNameWithResponseHandler:")] - void ReadAttributeApplicationName (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductIdWithResponseHandler:")] - void ReadAttributeProductId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeApplicationIdWithResponseHandler:")] - void ReadAttributeApplication (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCatalogVendorIdWithResponseHandler:")] - void ReadAttributeCatalogVendorId (ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed, use 'ReadAttributeApplicationStatus' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ReadAttributeApplicationSatus (ChipResponseHandler responseHandler); -#endif - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeApplicationStatusWithResponseHandler:")] - void ReadAttributeApplicationStatus (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPBarrierControl")] - [DisableDefaultCtor] - interface ChipBarrierControl { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("barrierControlGoToPercent:responseHandler:")] - void GoToPercent (byte percentOpen, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("barrierControlStop:")] - void Stop (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeBarrierMovingStateWithResponseHandler:")] - void ReadAttributeBarrierMovingState (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeBarrierSafetyStatusWithResponseHandler:")] - void ReadAttributeBarrierSafetyStatus (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeBarrierCapabilitiesWithResponseHandler:")] - void ReadAttributeBarrierCapabilities (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeBarrierPositionWithResponseHandler:")] - void ReadAttributeBarrierPosition (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPBasic")] - [DisableDefaultCtor] - interface ChipBasic { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Export ("mfgSpecificPing:")] - void GetMfgSpecificPing (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeInteractionModelVersionWithResponseHandler:")] - void ReadAttributeInteractionModelVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeVendorNameWithResponseHandler:")] - void ReadAttributeVendorName (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeVendorIDWithResponseHandler:")] - void ReadAttributeVendorId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductNameWithResponseHandler:")] - void ReadAttributeProductName (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductIDWithResponseHandler:")] - void ReadAttributeProductId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeUserLabelWithResponseHandler:")] - void ReadAttributeUserLabel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeUserLabelWithValue:responseHandler:")] - void WriteAttributeUserLabel (string value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLocationWithResponseHandler:")] - void ReadAttributeLocation (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeLocationWithValue:responseHandler:")] - void WriteAttributeLocation (string value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeHardwareVersionWithResponseHandler:")] - void ReadAttributeHardwareVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeHardwareVersionStringWithResponseHandler:")] - void ReadAttributeHardwareVersionString (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSoftwareVersionWithResponseHandler:")] - void ReadAttributeSoftwareVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSoftwareVersionStringWithResponseHandler:")] - void ReadAttributeSoftwareVersionString (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeManufacturingDateWithResponseHandler:")] - void ReadAttributeManufacturingDate (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePartNumberWithResponseHandler:")] - void ReadAttributePartNumber (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductURLWithResponseHandler:")] - void ReadAttributeProductUrl (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductLabelWithResponseHandler:")] - void ReadAttributeProductLabel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSerialNumberWithResponseHandler:")] - void ReadAttributeSerialNumber (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLocalConfigDisabledWithResponseHandler:")] - void ReadAttributeLocalConfigDisabled (ChipResponseHandler responseHandler); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Wrap ("WriteAttributeLocalConfigDisabled (Convert.ToBoolean(value), responseHandler)", IsVirtual = true)] - void WriteAttributeLocalConfigDisabled (byte value, ChipResponseHandler responseHandler); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeLocalConfigDisabledWithValue:responseHandler:")] - void WriteAttributeLocalConfigDisabled (bool disabled, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeReachableWithResponseHandler:")] - void ReadAttributeReachable (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPBinding")] - [DisableDefaultCtor] - interface ChipBinding { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Wrap ("Bind (nodeId, groupId, (ushort) endpointId, (uint) clusterId, responseHandler)", IsVirtual = true)] - void Bind (ulong nodeId, ushort groupId, byte endpointId, ushort clusterId, ChipResponseHandler responseHandler); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("bind:groupId:endpointId:clusterId:responseHandler:")] - void Bind (ulong nodeId, ushort groupId, ushort endpointId, uint clusterId, ChipResponseHandler responseHandler); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Wrap ("Unbind (nodeId, groupId, (ushort) endpointId, (uint) clusterId, responseHandler)", IsVirtual = true)] - void Unbind (ulong nodeId, ushort groupId, byte endpointId, ushort clusterId, ChipResponseHandler responseHandler); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("unbind:groupId:endpointId:clusterId:responseHandler:")] - void Unbind (ulong nodeId, ushort groupId, ushort endpointId, uint clusterId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPColorControl")] - [DisableDefaultCtor] - interface ChipColorControl { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("colorLoopSet:action:direction:time:startHue:optionsMask:optionsOverride:responseHandler:")] - void ColorLoopSet (byte updateFlags, byte action, byte direction, ushort time, ushort startHue, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("enhancedMoveHue:rate:optionsMask:optionsOverride:responseHandler:")] - void EnhancedMoveHue (byte moveMode, ushort rate, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("enhancedMoveToHue:direction:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void EnhancedMoveToHue (ushort enhancedHue, byte direction, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("enhancedMoveToHueAndSaturation:saturation:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void EnhancedMoveToHueAndSaturation (ushort enhancedHue, byte saturation, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("enhancedStepHue:stepSize:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void EnhancedStepHue (byte stepMode, ushort stepSize, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveColor:rateY:optionsMask:optionsOverride:responseHandler:")] - void MoveColor (short rateX, short rateY, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveColorTemperature:rate:colorTemperatureMinimum:colorTemperatureMaximum:optionsMask:optionsOverride:responseHandler:")] - void MoveColorTemperature (byte moveMode, ushort rate, ushort colorTemperatureMinimum, ushort colorTemperatureMaximum, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveHue:rate:optionsMask:optionsOverride:responseHandler:")] - void MoveHue (byte moveMode, byte rate, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveSaturation:rate:optionsMask:optionsOverride:responseHandler:")] - void MoveSaturation (byte moveMode, byte rate, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveToColor:colorY:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void MoveToColor (ushort colorX, ushort colorY, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveToColorTemperature:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void MoveToColorTemperature (ushort colorTemperature, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveToHue:direction:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void MoveToHue (byte hue, byte direction, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveToHueAndSaturation:saturation:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void MoveToHueAndSaturation (byte hue, byte saturation, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveToSaturation:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void MoveToSaturation (byte saturation, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stepColor:stepY:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void StepColor (short stepX, short stepY, ushort transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stepColorTemperature:stepSize:transitionTime:colorTemperatureMinimum:colorTemperatureMaximum:optionsMask:optionsOverride:responseHandler:")] - void StepColorTemperature (byte stepMode, ushort stepSize, ushort transitionTime, ushort colorTemperatureMinimum, ushort colorTemperatureMaximum, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stepHue:stepSize:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void StepHue (byte stepMode, byte stepSize, byte transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stepSaturation:stepSize:transitionTime:optionsMask:optionsOverride:responseHandler:")] - void StepSaturation (byte stepMode, byte stepSize, byte transitionTime, byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stopMoveStep:optionsOverride:responseHandler:")] - void StopMoveStep (byte optionsMask, byte optionsOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentHueWithResponseHandler:")] - void ReadAttributeCurrentHue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentHueWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentHue (ushort minInterval, ushort maxInterval, byte change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentHueWithResponseHandler:")] - void ReportAttributeCurrentHue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentSaturationWithResponseHandler:")] - void ReadAttributeCurrentSaturation (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentSaturationWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentSaturation (ushort minInterval, ushort maxInterval, byte change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentSaturationWithResponseHandler:")] - void ReportAttributeCurrentSaturation (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRemainingTimeWithResponseHandler:")] - void ReadAttributeRemainingTime (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentXWithResponseHandler:")] - void ReadAttributeCurrentX (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentXWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentX (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentXWithResponseHandler:")] - void ReportAttributeCurrentX (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentYWithResponseHandler:")] - void ReadAttributeCurrentY (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentYWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentY (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentYWithResponseHandler:")] - void ReportAttributeCurrentY (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeDriftCompensationWithResponseHandler:")] - void ReadAttributeDriftCompensation (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCompensationTextWithResponseHandler:")] - void ReadAttributeCompensationText (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorTemperatureWithResponseHandler:")] - void ReadAttributeColorTemperature (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeColorTemperatureWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeColorTemperature (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeColorTemperatureWithResponseHandler:")] - void ReportAttributeColorTemperature (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorModeWithResponseHandler:")] - void ReadAttributeColorMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorControlOptionsWithResponseHandler:")] - void ReadAttributeColorControlOptions (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorControlOptionsWithValue:responseHandler:")] - void WriteAttributeColorControlOptions (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNumberOfPrimariesWithResponseHandler:")] - void ReadAttributeNumberOfPrimaries (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary1XWithResponseHandler:")] - void ReadAttributePrimary1X (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary1YWithResponseHandler:")] - void ReadAttributePrimary1Y (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary1IntensityWithResponseHandler:")] - void ReadAttributePrimary1Intensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary2XWithResponseHandler:")] - void ReadAttributePrimary2X (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary2YWithResponseHandler:")] - void ReadAttributePrimary2Y (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary2IntensityWithResponseHandler:")] - void ReadAttributePrimary2Intensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary3XWithResponseHandler:")] - void ReadAttributePrimary3X (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary3YWithResponseHandler:")] - void ReadAttributePrimary3Y (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary3IntensityWithResponseHandler:")] - void ReadAttributePrimary3Intensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary4XWithResponseHandler:")] - void ReadAttributePrimary4X (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary4YWithResponseHandler:")] - void ReadAttributePrimary4Y (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary4IntensityWithResponseHandler:")] - void ReadAttributePrimary4Intensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary5XWithResponseHandler:")] - void ReadAttributePrimary5X (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary5YWithResponseHandler:")] - void ReadAttributePrimary5Y (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary5IntensityWithResponseHandler:")] - void ReadAttributePrimary5Intensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary6XWithResponseHandler:")] - void ReadAttributePrimary6X (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary6YWithResponseHandler:")] - void ReadAttributePrimary6Y (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePrimary6IntensityWithResponseHandler:")] - void ReadAttributePrimary6Intensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeWhitePointXWithResponseHandler:")] - void ReadAttributeWhitePointX (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeWhitePointXWithValue:responseHandler:")] - void WriteAttributeWhitePointX (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeWhitePointYWithResponseHandler:")] - void ReadAttributeWhitePointY (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeWhitePointYWithValue:responseHandler:")] - void WriteAttributeWhitePointY (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointRXWithResponseHandler:")] - void ReadAttributeColorPointRX (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointRXWithValue:responseHandler:")] - void WriteAttributeColorPointRX (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointRYWithResponseHandler:")] - void ReadAttributeColorPointRY (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointRYWithValue:responseHandler:")] - void WriteAttributeColorPointRY (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointRIntensityWithResponseHandler:")] - void ReadAttributeColorPointRIntensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointRIntensityWithValue:responseHandler:")] - void WriteAttributeColorPointRIntensity (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointGXWithResponseHandler:")] - void ReadAttributeColorPointGX (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointGXWithValue:responseHandler:")] - void WriteAttributeColorPointGX (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointGYWithResponseHandler:")] - void ReadAttributeColorPointGY (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointGYWithValue:responseHandler:")] - void WriteAttributeColorPointGY (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointGIntensityWithResponseHandler:")] - void ReadAttributeColorPointGIntensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointGIntensityWithValue:responseHandler:")] - void WriteAttributeColorPointGIntensity (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointBXWithResponseHandler:")] - void ReadAttributeColorPointBX (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointBXWithValue:responseHandler:")] - void WriteAttributeColorPointBX (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointBYWithResponseHandler:")] - void ReadAttributeColorPointBY (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointBYWithValue:responseHandler:")] - void WriteAttributeColorPointBY (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorPointBIntensityWithResponseHandler:")] - void ReadAttributeColorPointBIntensity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeColorPointBIntensityWithValue:responseHandler:")] - void WriteAttributeColorPointBIntensity (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeEnhancedCurrentHueWithResponseHandler:")] - void ReadAttributeEnhancedCurrentHue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeEnhancedColorModeWithResponseHandler:")] - void ReadAttributeEnhancedColorMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorLoopActiveWithResponseHandler:")] - void ReadAttributeColorLoopActive (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorLoopDirectionWithResponseHandler:")] - void ReadAttributeColorLoopDirection (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorLoopTimeWithResponseHandler:")] - void ReadAttributeColorLoopTime (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorLoopStartEnhancedHueWithResponseHandler:")] - void ReadAttributeColorLoopStartEnhancedHue (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorLoopStoredEnhancedHueWithResponseHandler:")] - void ReadAttributeColorLoopStoredEnhancedHue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorCapabilitiesWithResponseHandler:")] - void ReadAttributeColorCapabilities (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorTempPhysicalMinWithResponseHandler:")] - void ReadAttributeColorTempPhysicalMin (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeColorTempPhysicalMaxWithResponseHandler:")] - void ReadAttributeColorTempPhysicalMax (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCoupleColorTempToLevelMinMiredsWithResponseHandler:")] - void ReadAttributeCoupleColorTempToLevelMinMireds (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeStartUpColorTemperatureMiredsWithResponseHandler:")] - void ReadAttributeStartUpColorTemperatureMireds (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeStartUpColorTemperatureMiredsWithValue:responseHandler:")] - void WriteAttributeStartUpColorTemperatureMireds (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPDescriptor")] - [DisableDefaultCtor] - interface ChipDescriptor { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeDeviceListWithResponseHandler:")] - void ReadAttributeDeviceList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeServerListWithResponseHandler:")] - void ReadAttributeServerList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClientListWithResponseHandler:")] - void ReadAttributeClientList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePartsListWithResponseHandler:")] - void ReadAttributePartsList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPDiagnosticLogs")] - [DisableDefaultCtor] - interface ChipDiagnosticLogs { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Export ("retrieveLogsRequest:requestedProtocol:transferFileDesignator:responseHandler:")] - void RetrieveLogsRequest (byte intent, byte requestedProtocol, NSData transferFileDesignator, ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPDoorLock")] - [DisableDefaultCtor] - interface ChipDoorLock { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearAllPins:")] - void ClearAllPins (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearAllRfids:")] - void ClearAllRfids (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearHolidaySchedule:responseHandler:")] - void ClearHolidaySchedule (byte scheduleId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearPin:responseHandler:")] - void ClearPin (ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearRfid:responseHandler:")] - void ClearRfid (ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearWeekdaySchedule:userId:responseHandler:")] - void ClearWeekdaySchedule (byte scheduleId, ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearYeardaySchedule:userId:responseHandler:")] - void ClearYeardaySchedule (byte scheduleId, ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getHolidaySchedule:responseHandler:")] - void GetHolidaySchedule (byte scheduleId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getLogRecord:responseHandler:")] - void GetLogRecord (ushort logIndex, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getPin:responseHandler:")] - void GetPin (ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getRfid:responseHandler:")] - void GetRfid (ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getUserType:responseHandler:")] - void GetUserType (ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getWeekdaySchedule:userId:responseHandler:")] - void GetWeekdaySchedule (byte scheduleId, ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getYeardaySchedule:userId:responseHandler:")] - void GetYeardaySchedule (byte scheduleId, ushort userId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("lockDoor:responseHandler:")] - void LockDoor (string pin, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setHolidaySchedule:localStartTime:localEndTime:operatingModeDuringHoliday:responseHandler:")] - void SetHolidaySchedule (byte scheduleId, uint localStartTime, uint localEndTime, byte operatingModeDuringHoliday, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setPin:userStatus:userType:pin:responseHandler:")] - void SetPin (ushort userId, byte userStatus, byte userType, string pin, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setRfid:userStatus:userType:id:responseHandler:")] - void SetRfid (ushort userId, byte userStatus, byte userType, string id, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setUserType:userType:responseHandler:")] - void SetUserType (ushort userId, byte userType, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setWeekdaySchedule:userId:daysMask:startHour:startMinute:endHour:endMinute:responseHandler:")] - void SetWeekdaySchedule (byte scheduleId, ushort userId, byte daysMask, byte startHour, byte startMinute, byte endHour, byte endMinute, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setYeardaySchedule:userId:localStartTime:localEndTime:responseHandler:")] - void SetYeardaySchedule (byte scheduleId, ushort userId, uint localStartTime, uint localEndTime, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("unlockDoor:responseHandler:")] - void UnlockDoor (string pin, ChipResponseHandler responseHandler); - [Async (ResultTypeName = "ChipReadAttributeResult")] - - [Export ("unlockWithTimeout:pin:responseHandler:")] - void UnlockWithTimeout (ushort timeoutInSeconds, string pin, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLockStateWithResponseHandler:")] - void ReadAttributeLockState (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeLockStateWithMinInterval:maxInterval:responseHandler:")] - void ConfigureAttributeLockState (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeLockStateWithResponseHandler:")] - void ReportAttributeLockState (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLockTypeWithResponseHandler:")] - void ReadAttributeLockType (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeActuatorEnabledWithResponseHandler:")] - void ReadAttributeActuatorEnabled (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPGroupKeyManagement")] - [DisableDefaultCtor] - interface ChipGroupKeyManagement { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeGroupsWithResponseHandler:")] - void ReadAttributeGroups (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeGroupKeysWithResponseHandler:")] - void ReadAttributeGroupKeys (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPGroups")] - [DisableDefaultCtor] - interface ChipGroups { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("addGroup:groupName:responseHandler:")] - void AddGroup (ushort groupId, string groupName, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("addGroupIfIdentifying:groupName:responseHandler:")] - void AddGroupIfIdentifying (ushort groupId, string groupName, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getGroupMembership:groupList:responseHandler:")] - void GetGroupMembership (byte groupCount, ushort groupList, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("removeAllGroups:")] - void RemoveAllGroups (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("removeGroup:responseHandler:")] - void RemoveGroup (ushort groupId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("viewGroup:responseHandler:")] - void ViewGroup (ushort groupId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNameSupportWithResponseHandler:")] - void ReadAttributeNameSupport (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPIdentify")] - [DisableDefaultCtor] - interface ChipIdentify { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("identify:responseHandler:")] - void Identify (ushort identifyTime, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("identifyQuery:")] - void IdentifyQuery (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeIdentifyTimeWithResponseHandler:")] - void ReadAttributeIdentifyTime (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeIdentifyTimeWithValue:responseHandler:")] - void WriteAttributeIdentifyTime (ushort value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPLevelControl")] - [DisableDefaultCtor] - interface ChipLevelControl { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("move:rate:optionMask:optionOverride:responseHandler:")] - void Move (byte moveMode, byte rate, byte optionMask, byte optionOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveToLevel:transitionTime:optionMask:optionOverride:responseHandler:")] - void MoveToLevel (byte level, ushort transitionTime, byte optionMask, byte optionOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveToLevelWithOnOff:transitionTime:responseHandler:")] - void MoveToLevelWithOnOff (byte level, ushort transitionTime, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("moveWithOnOff:rate:responseHandler:")] - void MoveWithOnOff (byte moveMode, byte rate, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("step:stepSize:transitionTime:optionMask:optionOverride:responseHandler:")] - void Step (byte stepMode, byte stepSize, ushort transitionTime, byte optionMask, byte optionOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stepWithOnOff:stepSize:transitionTime:responseHandler:")] - void StepWithOnOff (byte stepMode, byte stepSize, ushort transitionTime, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stop:optionOverride:responseHandler:")] - void Stop (byte optionMask, byte optionOverride, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stopWithOnOff:")] - void StopWithOnOff (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentLevelWithResponseHandler:")] - void ReadAttributeCurrentLevel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentLevelWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentLevel (ushort minInterval, ushort maxInterval, byte change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentLevelWithResponseHandler:")] - void ReportAttributeCurrentLevel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPNetworkCommissioning")] - [DisableDefaultCtor] - interface ChipNetworkCommissioning { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("addThreadNetwork:breadcrumb:timeoutMs:responseHandler:")] - void AddThreadNetwork (NSData operationalDataset, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("addWiFiNetwork:credentials:breadcrumb:timeoutMs:responseHandler:")] - void AddWiFiNetwork (NSData ssid, NSData credentials, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("disableNetwork:breadcrumb:timeoutMs:responseHandler:")] - void DisableNetwork (NSData networkId, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("enableNetwork:breadcrumb:timeoutMs:responseHandler:")] - void EnableNetwork (NSData networkId, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getLastNetworkCommissioningResult:responseHandler:")] - void GetLastNetworkCommissioningResult (uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("removeNetwork:breadcrumb:timeoutMs:responseHandler:")] - void RemoveNetwork (NSData networkId, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("scanNetworks:breadcrumb:timeoutMs:responseHandler:")] - void ScanNetworks (NSData ssid, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("updateThreadNetwork:breadcrumb:timeoutMs:responseHandler:")] - void UpdateThreadNetwork (NSData operationalDataset, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("updateWiFiNetwork:credentials:breadcrumb:timeoutMs:responseHandler:")] - void UpdateWiFiNetwork (NSData ssid, NSData credentials, ulong breadcrumb, uint timeoutMs, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeFeatureMapWithResponseHandler:")] - void ReadAttributeFeatureMap (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPOtaSoftwareUpdateProvider")] - [DisableDefaultCtor] - interface ChipOtaSoftwareUpdateProvider { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("applyUpdateRequest:newVersion:responseHandler:")] - void ApplyUpdateRequest (NSData updateToken, uint newVersion, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("notifyUpdateApplied:currentVersion:responseHandler:")] - void NotifyUpdateApplied (NSData updateToken, uint currentVersion, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("queryImage:productId:imageType:hardwareVersion:currentVersion:protocolsSupported:location:requestorCanConsent:metadataForProvider:responseHandler:")] - void QueryImage (ushort vendorId, ushort productId, ushort imageType, ushort hardwareVersion, uint currentVersion, byte protocolsSupported, string location, bool requestorCanConsent, NSData metadataForProvider, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPOccupancySensing")] - [DisableDefaultCtor] - interface ChipOccupancySensing { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOccupancyWithResponseHandler:")] - void ReadAttributeOccupancy (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeOccupancyWithMinInterval:maxInterval:responseHandler:")] - void ConfigureAttributeOccupancy (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeOccupancyWithResponseHandler:")] - void ReportAttributeOccupancy (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOccupancySensorTypeWithResponseHandler:")] - void ReadAttributeOccupancySensorType (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOccupancySensorTypeBitmapWithResponseHandler:")] - void ReadAttributeOccupancySensorTypeBitmap (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPOnOff")] - [DisableDefaultCtor] - interface ChipOnOff { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("off:")] - void Off (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("offWithEffect:effectVariant:responseHandler:")] - void OffWithEffect (byte effectId, byte effectVariant, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("on:")] - void On (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("onWithRecallGlobalScene:")] - void OnWithRecallGlobalScene (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("onWithTimedOff:onTime:offWaitTime:responseHandler:")] - void OnWithTimedOff (byte onOffControl, ushort onTime, ushort offWaitTime, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("toggle:")] - void Toggle (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOnOffWithResponseHandler:")] - void ReadAttributeOnOff (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeOnOffWithMinInterval:maxInterval:responseHandler:")] - void ConfigureAttributeOnOff (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeOnOffWithResponseHandler:")] - void ReportAttributeOnOff (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeGlobalSceneControlWithResponseHandler:")] - void ReadAttributeGlobalSceneControl (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOnTimeWithResponseHandler:")] - void ReadAttributeOnTime (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeOnTimeWithValue:responseHandler:")] - void WriteAttributeOnTime (ushort value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOffWaitTimeWithResponseHandler:")] - void ReadAttributeOffWaitTime (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeOffWaitTimeWithValue:responseHandler:")] - void WriteAttributeOffWaitTime (ushort value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeStartUpOnOffWithResponseHandler:")] - void ReadAttributeStartUpOnOff (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeStartUpOnOffWithValue:responseHandler:")] - void WriteAttributeStartUpOnOff (byte value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeFeatureMapWithResponseHandler:")] - void ReadAttributeFeatureMap (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPOnOffSwitchConfiguration")] - [DisableDefaultCtor] - interface ChipOnOffSwitchConfiguration { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSwitchTypeWithResponseHandler:")] - void ReadAttributeSwitchType (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSwitchActionsWithResponseHandler:")] - void ReadAttributeSwitchActions (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeSwitchActionsWithValue:responseHandler:")] - void WriteAttributeSwitchActions (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPOperationalCredentials")] - [DisableDefaultCtor] - interface ChipOperationalCredentials { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void AddOpCert (NSData noc, NSData iCACertificate, NSData iPKValue, ulong caseAdminNode, ushort adminVendorId, ChipResponseHandler responseHandler); -#endif - - // Parameter names are left to match header files. Without documentation, we cannot know what the parameters signify for certain. - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("addNOC:iPKValue:caseAdminNode:adminVendorId:responseHandler:")] - void AddNoc (NSData nocArray, NSData iPKValue, ulong caseAdminNode, ushort adminVendorId, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("addTrustedRootCertificate:responseHandler:")] - void AddTrustedRootCertificate (NSData rootCertificate, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("opCSRRequest:responseHandler:")] - void OpCsrRequest (NSData csrNonce, ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - void RemoveAllFabrics (ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - void SetFabric (ushort vendorId, ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - void RemoveFabric (ulong fabricId, ulong nodeId, ushort vendorId, ChipResponseHandler responseHandler); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("removeFabric:responseHandler:")] - void RemoveFabric (byte fabricIndex, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("removeTrustedRootCertificate:responseHandler:")] - void RemoveTrustedRootCertificate (NSData trustedRootIdentifier, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("updateFabricLabel:responseHandler:")] - void UpdateFabricLabel (string label, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("updateNOC:responseHandler:")] - void UpdateNoc (NSData nocArray, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeFabricsListWithResponseHandler:")] - void ReadAttributeFabricsList (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSupportedFabricsWithResponseHandler:")] - void ReadAttributeSupportedFabrics (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCommissionedFabricsWithResponseHandler:")] - void ReadAttributeCommissionedFabrics (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPPressureMeasurement")] - [DisableDefaultCtor] - interface ChipPressureMeasurement { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMeasuredValueWithResponseHandler:")] - void ReadAttributeMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeMeasuredValueWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeMeasuredValue (ushort minInterval, ushort maxInterval, short change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeMeasuredValueWithResponseHandler:")] - void ReportAttributeMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMinMeasuredValueWithResponseHandler:")] - void ReadAttributeMinMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxMeasuredValueWithResponseHandler:")] - void ReadAttributeMaxMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPPumpConfigurationAndControl")] - [DisableDefaultCtor] - interface ChipPumpConfigurationAndControl { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxPressureWithResponseHandler:")] - void ReadAttributeMaxPressure (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxSpeedWithResponseHandler:")] - void ReadAttributeMaxSpeed (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxFlowWithResponseHandler:")] - void ReadAttributeMaxFlow (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeEffectiveOperationModeWithResponseHandler:")] - void ReadAttributeEffectiveOperationMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeEffectiveControlModeWithResponseHandler:")] - void ReadAttributeEffectiveControlMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCapacityWithResponseHandler:")] - void ReadAttributeCapacity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCapacityWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCapacity (ushort minInterval, ushort maxInterval, short change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCapacityWithResponseHandler:")] - void ReportAttributeCapacity (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOperationModeWithResponseHandler:")] - void ReadAttributeOperationMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeOperationModeWithValue:responseHandler:")] - void WriteAttributeOperationMode (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPScenes")] - [DisableDefaultCtor] - interface ChipScenes { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Wrap ("AddScene (groupId, sceneId, transitionTime, sceneName, (uint) clusterId, length, value, responseHandler)", IsVirtual = true)] - void AddScene (ushort groupId, byte sceneId, ushort transitionTime, string sceneName, ushort clusterId, byte length, byte value, ChipResponseHandler responseHandler); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("addScene:sceneId:transitionTime:sceneName:clusterId:length:value:responseHandler:")] - void AddScene (ushort groupId, byte sceneId, ushort transitionTime, string sceneName, uint clusterId, byte length, byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getSceneMembership:responseHandler:")] - void GetSceneMembership (ushort groupId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("recallScene:sceneId:transitionTime:responseHandler:")] - void RecallScene (ushort groupId, byte sceneId, ushort transitionTime, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("removeAllScenes:responseHandler:")] - void RemoveAllScenes (ushort groupId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("removeScene:sceneId:responseHandler:")] - void RemoveScene (ushort groupId, byte sceneId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("storeScene:sceneId:responseHandler:")] - void StoreScene (ushort groupId, byte sceneId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("viewScene:sceneId:responseHandler:")] - void ViewScene (ushort groupId, byte sceneId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSceneCountWithResponseHandler:")] - void ReadAttributeSceneCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentSceneWithResponseHandler:")] - void ReadAttributeCurrentScene (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentGroupWithResponseHandler:")] - void ReadAttributeCurrentGroup (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSceneValidWithResponseHandler:")] - void ReadAttributeSceneValid (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNameSupportWithResponseHandler:")] - void ReadAttributeNameSupport (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPSwitch")] - [DisableDefaultCtor] - interface ChipSwitch { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNumberOfPositionsWithResponseHandler:")] - void ReadAttributeNumberOfPositions (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentPositionWithResponseHandler:")] - void ReadAttributeCurrentPosition (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentPositionWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentPosition (ushort minInterval, ushort maxInterval, byte change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentPositionWithResponseHandler:")] - void ReportAttributeCurrentPosition (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPTemperatureMeasurement")] - [DisableDefaultCtor] - interface ChipTemperatureMeasurement { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMeasuredValueWithResponseHandler:")] - void ReadAttributeMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeMeasuredValueWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeMeasuredValue (ushort minInterval, ushort maxInterval, short change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeMeasuredValueWithResponseHandler:")] - void ReportAttributeMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMinMeasuredValueWithResponseHandler:")] - void ReadAttributeMinMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxMeasuredValueWithResponseHandler:")] - void ReadAttributeMaxMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPThermostat")] - [DisableDefaultCtor] - interface ChipThermostat { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("clearWeeklySchedule:")] - void ClearWeeklySchedule (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getRelayStatusLog:")] - void GetRelayStatusLog (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getWeeklySchedule:modeToReturn:responseHandler:")] - void GetWeeklySchedule (byte daysToReturn, byte modeToReturn, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setWeeklySchedule:dayOfWeekForSequence:modeForSequence:payload:responseHandler:")] - void SetWeeklySchedule (byte numberOfTransitionsForSequence, byte dayOfWeekForSequence, byte modeForSequence, byte payload, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("setpointRaiseLower:amount:responseHandler:")] - void SetpointRaiseLower (byte mode, sbyte amount, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLocalTemperatureWithResponseHandler:")] - void ReadAttributeLocalTemperature (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeLocalTemperatureWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeLocalTemperature (ushort minInterval, ushort maxInterval, short change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeLocalTemperatureWithResponseHandler:")] - void ReportAttributeLocalTemperature (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeAbsMinHeatSetpointLimitWithResponseHandler:")] - void ReadAttributeAbsMinHeatSetpointLimit (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeAbsMaxHeatSetpointLimitWithResponseHandler:")] - void ReadAttributeAbsMaxHeatSetpointLimit (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeAbsMinCoolSetpointLimitWithResponseHandler:")] - void ReadAttributeAbsMinCoolSetpointLimit (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeAbsMaxCoolSetpointLimitWithResponseHandler:")] - void ReadAttributeAbsMaxCoolSetpointLimit (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOccupiedCoolingSetpointWithResponseHandler:")] - void ReadAttributeOccupiedCoolingSetpoint (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeOccupiedCoolingSetpointWithValue:responseHandler:")] - void WriteAttributeOccupiedCoolingSetpoint (short value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMinHeatSetpointLimitWithResponseHandler:")] - void ReadAttributeMinHeatSetpointLimit (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeMinHeatSetpointLimitWithValue:responseHandler:")] - void WriteAttributeMinHeatSetpointLimit (short value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxHeatSetpointLimitWithResponseHandler:")] - void ReadAttributeMaxHeatSetpointLimit (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeMaxHeatSetpointLimitWithValue:responseHandler:")] - void WriteAttributeMaxHeatSetpointLimit (short value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMinCoolSetpointLimitWithResponseHandler:")] - void ReadAttributeMinCoolSetpointLimit (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeMinCoolSetpointLimitWithValue:responseHandler:")] - void WriteAttributeMinCoolSetpointLimit (short value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxCoolSetpointLimitWithResponseHandler:")] - void ReadAttributeMaxCoolSetpointLimit (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeMaxCoolSetpointLimitWithValue:responseHandler:")] - void WriteAttributeMaxCoolSetpointLimit (short value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOccupiedHeatingSetpointWithResponseHandler:")] - void ReadAttributeOccupiedHeatingSetpoint (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeOccupiedHeatingSetpointWithValue:responseHandler:")] - void WriteAttributeOccupiedHeatingSetpoint (short value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeControlSequenceOfOperationWithResponseHandler:")] - void ReadAttributeControlSequenceOfOperation (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeControlSequenceOfOperationWithValue:responseHandler:")] - void WriteAttributeControlSequenceOfOperation (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSystemModeWithResponseHandler:")] - void ReadAttributeSystemMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeSystemModeWithValue:responseHandler:")] - void WriteAttributeSystemMode (byte value, ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeStartOfWeekWithResponseHandler:")] - void ReadAttributeStartOfWeek (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNumberOfWeeklyTransitionsWithResponseHandler:")] - void ReadAttributeNumberOfWeeklyTransitions (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNumberOfDailyTransitionsWithResponseHandler:")] - void ReadAttributeNumberOfDailyTransitions (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeFeatureMapWithResponseHandler:")] - void ReadAttributeFeatureMap (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (NSObject), Name = "CHIPOnboardingPayloadParser")] - [DisableDefaultCtor] - interface ChipOnboardingPayloadParser { - [Static] - [Export ("setupPayloadForOnboardingPayload:ofType:error:")] - [return: NullAllowed] - ChipSetupPayload SetupPayload (string onboardingPayload, ChipOnboardingPayloadType type, [NullAllowed] out NSError error); - } - - interface IChipDevicePairingDelegate { } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] -#if NET - [Protocol, Model] -#else - [Protocol, Model (AutoGeneratedName = true)] -#endif - [BaseType (typeof (NSObject), Name = "CHIPDevicePairingDelegate")] - interface ChipDevicePairingDelegate { - [Export ("onStatusUpdate:")] - void OnStatusUpdate (ChipPairingStatus status); - - [Export ("onPairingComplete:")] - void OnPairingComplete ([NullAllowed] NSError error); - - [Export ("onPairingDeleted:")] - void OnPairingDeleted ([NullAllowed] NSError error); - - [Export ("onAddressUpdated:")] - void OnAddressUpdated ([NullAllowed] NSError error); - } - - interface IChipKeypair { } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] -#if NET - [Protocol, Model] -#else - [Protocol, Model (AutoGeneratedName = true)] -#endif - [BaseType (typeof (NSObject), Name = "CHIPKeypair")] - interface ChipKeypair { - [Abstract] - [Export ("initialize")] - bool Initialize (); - - [Abstract] - [Export ("ECDSA_sign_hash:")] - NSData EcdsaSignHash (NSData hash); - - [Abstract] - [Export ("pubkey")] - IntPtr /* SecKeyRef _Nullable */ GetPubKeyRef (); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (NSObject), Name = "CHIPManualSetupPayloadParser")] - [DisableDefaultCtor] - interface ChipManualSetupPayloadParser { - [Export ("initWithDecimalStringRepresentation:")] - NativeHandle Constructor (string decimalStringRepresentation); - - [Export ("populatePayload:")] - [return: NullAllowed] - ChipSetupPayload PopulatePayload ([NullAllowed] out NSError error); - } - - interface IChipPersistentStorageDelegate { } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] -#if NET - [Protocol, Model] -#else - [Protocol, Model (AutoGeneratedName = true)] -#endif - [BaseType (typeof (NSObject), Name = "CHIPPersistentStorageDelegate")] - interface ChipPersistentStorageDelegate { - [Abstract] - [Export ("CHIPGetKeyValue:")] - [return: NullAllowed] - string GetValue (string key); - - [Abstract] - [Export ("CHIPSetKeyValue:value:")] - void SetValue (string key, string value); - - [Abstract] - [Export ("CHIPDeleteKeyValue:")] - void DeleteValue (string key); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (NSObject), Name = "CHIPOptionalQRCodeInfo")] - [DisableDefaultCtor] - interface ChipOptionalQRCodeInfo { - [Export ("infoType", ArgumentSemantic.Strong)] - NSNumber InfoType { get; set; } - - [Export ("tag", ArgumentSemantic.Strong)] - NSNumber Tag { get; set; } - - [Export ("integerValue", ArgumentSemantic.Strong)] - NSNumber IntegerValue { get; set; } - - [Export ("stringValue", ArgumentSemantic.Strong)] - string StringValue { get; set; } - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (NSObject), Name = "CHIPSetupPayload")] - [DisableDefaultCtor] - interface ChipSetupPayload { - [Export ("version", ArgumentSemantic.Strong)] - NSNumber Version { get; set; } - - [Export ("vendorID", ArgumentSemantic.Strong)] - NSNumber VendorId { get; set; } - - [Export ("productID", ArgumentSemantic.Strong)] - NSNumber ProductId { get; set; } - - [Export ("commissioningFlow", ArgumentSemantic.Assign)] - ChipCommissioningFlow CommissioningFlow { get; set; } - - [Export ("rendezvousInformation", ArgumentSemantic.Assign)] - ChipRendezvousInformationFlags RendezvousInformation { get; set; } - - [Export ("discriminator", ArgumentSemantic.Strong)] - NSNumber Discriminator { get; set; } - - [Export ("setUpPINCode", ArgumentSemantic.Strong)] - NSNumber SetUpPinCode { get; set; } - - [Export ("serialNumber", ArgumentSemantic.Strong)] - string SerialNumber { get; set; } - - [Export ("getAllOptionalVendorData:")] - [return: NullAllowed] - ChipOptionalQRCodeInfo [] GetAllOptionalVendorData ([NullAllowed] out NSError error); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (NSObject), Name = "CHIPThreadOperationalDataset")] - [DisableDefaultCtor] - interface ChipThreadOperationalDataset { - [NullAllowed, Export ("networkName")] - string NetworkName { get; } - - [NullAllowed, Export ("extendedPANID", ArgumentSemantic.Copy)] - NSData ExtendedPanId { get; } - - [NullAllowed, Export ("masterKey", ArgumentSemantic.Copy)] - NSData MasterKey { get; } - - // API names are left to match header files. - // PSK is likely pre-shared key, but without documentation, we cannot know for certain. - [NullAllowed, Export ("PSKc", ArgumentSemantic.Copy)] - NSData PSKc { get; } - - [Export ("channel")] - ushort Channel { get; set; } - - [NullAllowed, Export ("panID", ArgumentSemantic.Copy)] - NSData PanId { get; } - - [Export ("initWithNetworkName:extendedPANID:masterKey:PSKc:channel:panID:")] - IntPtr Constructor (string networkName, NSData extendedPanId, NSData masterKey, NSData PSKc, ushort channel, NSData panId); - - [Export ("initWithData:")] - IntPtr Constructor (NSData data); - - [Export ("asData")] - NSData GetAsData (); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (NSObject), Name = "CHIPQRCodeSetupPayloadParser")] - [DisableDefaultCtor] - interface ChipQRCodeSetupPayloadParser { - [Export ("initWithBase38Representation:")] - NativeHandle Constructor (string base38Representation); - - [Export ("populatePayload:")] - [return: NullAllowed] - ChipSetupPayload PopulatePayload ([NullAllowed] out NSError error); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPAccountLogin")] - [DisableDefaultCtor] - interface ChipAccountLogin { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("getSetupPIN:responseHandler:")] - void GetSetupPin (string tempAccountIdentifier, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("login:setupPIN:responseHandler:")] - void Login (string tempAccountIdentifier, string setupPin, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPAdministratorCommissioning")] - [DisableDefaultCtor] - interface ChipAdministratorCommissioning { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("openBasicCommissioningWindow:responseHandler:")] - void OpenBasicCommissioningWindow (ushort commissioningTimeout, ChipResponseHandler responseHandler); - - // Parameter names are left to match header files. - // pAKEVerifier may relate to key derivation, but without documentation, we cannot know for certain. - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("openCommissioningWindow:pAKEVerifier:discriminator:iterations:salt:passcodeID:responseHandler:")] - void OpenCommissioningWindow (ushort commissioningTimeout, NSData pAKEVerifier, ushort discriminator, uint iterations, NSData salt, ushort passcodeId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("revokeCommissioning:")] - void RevokeCommissioning (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPApplicationLauncher")] - [DisableDefaultCtor] - interface ChipApplicationLauncher { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("launchApp:catalogVendorId:applicationId:responseHandler:")] - void LaunchApp (string data, ushort catalogVendorId, string applicationId, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeApplicationLauncherListWithResponseHandler:")] - void ReadAttributeApplicationLauncherList (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCatalogVendorIdWithResponseHandler:")] - void ReadAttributeCatalogVendorId (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeApplicationIdWithResponseHandler:")] - void ReadAttributeApplicationId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPAudioOutput")] - [DisableDefaultCtor] - interface ChipAudioOutput { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("renameOutput:name:responseHandler:")] - void RenameOutput (byte index, string name, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("selectOutput:responseHandler:")] - void SelectOutput (byte index, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeAudioOutputListWithResponseHandler:")] - void ReadAttributeAudioOutputList (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentAudioOutputWithResponseHandler:")] - void ReadAttributeCurrentAudioOutput (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPBinaryInputBasic")] - [DisableDefaultCtor] - interface ChipBinaryInputBasic { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOutOfServiceWithResponseHandler:")] - void ReadAttributeOutOfService (ChipResponseHandler responseHandler); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Wrap ("WriteAttributeOutOfService (Convert.ToBoolean(value), responseHandler)", IsVirtual = true)] - void WriteAttributeOutOfService (byte value, ChipResponseHandler responseHandler); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeOutOfServiceWithValue:responseHandler:")] - void WriteAttributeOutOfService (bool boolValue, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePresentValueWithResponseHandler:")] - void ReadAttributePresentValue (ChipResponseHandler responseHandler); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Wrap ("WriteAttributePresentValue (Convert.ToBoolean(value), responseHandler)", IsVirtual = true)] - void WriteAttributePresentValue (byte value, ChipResponseHandler responseHandler); -#endif - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributePresentValueWithValue:responseHandler:")] - void WriteAttributePresentValue (bool boolValue, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributePresentValueWithMinInterval:maxInterval:responseHandler:")] - void ConfigureAttributePresentValue (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributePresentValueWithResponseHandler:")] - void ReportAttributePresentValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeStatusFlagsWithResponseHandler:")] - void ReadAttributeStatusFlags (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeStatusFlagsWithMinInterval:maxInterval:responseHandler:")] - void ConfigureAttributeStatusFlags (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeStatusFlagsWithResponseHandler:")] - void ReportAttributeStatusFlags (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPBridgedDeviceBasic")] - [DisableDefaultCtor] - interface ChipBridgedDeviceBasic { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeVendorNameWithResponseHandler:")] - void ReadAttributeVendorName (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeVendorIDWithResponseHandler:")] - void ReadAttributeVendorId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductNameWithResponseHandler:")] - void ReadAttributeProductName (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeUserLabelWithResponseHandler:")] - void ReadAttributeUserLabel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeUserLabelWithValue:responseHandler:")] - void WriteAttributeUserLabel (string value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeHardwareVersionWithResponseHandler:")] - void ReadAttributeHardwareVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeHardwareVersionStringWithResponseHandler:")] - void ReadAttributeHardwareVersionString (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSoftwareVersionWithResponseHandler:")] - void ReadAttributeSoftwareVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSoftwareVersionStringWithResponseHandler:")] - void ReadAttributeSoftwareVersionString (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeManufacturingDateWithResponseHandler:")] - void ReadAttributeManufacturingDate (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePartNumberWithResponseHandler:")] - void ReadAttributePartNumber (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductURLWithResponseHandler:")] - void ReadAttributeProductUrl (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeProductLabelWithResponseHandler:")] - void ReadAttributeProductLabel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSerialNumberWithResponseHandler:")] - void ReadAttributeSerialNumber (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeReachableWithResponseHandler:")] - void ReadAttributeReachable (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPContentLauncher")] - [DisableDefaultCtor] - interface ChipContentLauncher { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("launchContent:data:responseHandler:")] - void LaunchContent (bool autoPlay, string data, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("launchURL:displayString:responseHandler:")] - void LaunchUrl (string contentUrl, string displayString, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeAcceptsHeaderListWithResponseHandler:")] - void ReadAttributeAcceptsHeaderList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSupportedStreamingTypesWithResponseHandler:")] - void ReadAttributeSupportedStreamingTypes (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPElectricalMeasurement")] - [DisableDefaultCtor] - interface ChipElectricalMeasurement { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMeasurementTypeWithResponseHandler:")] - void ReadAttributeMeasurementType (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTotalActivePowerWithResponseHandler:")] - void ReadAttributeTotalActivePower (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRmsVoltageWithResponseHandler:")] - void ReadAttributeRmsVoltage (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRmsVoltageMinWithResponseHandler:")] - void ReadAttributeRmsVoltageMin (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRmsVoltageMaxWithResponseHandler:")] - void ReadAttributeRmsVoltageMax (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRmsCurrentWithResponseHandler:")] - void ReadAttributeRmsCurrent (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRmsCurrentMinWithResponseHandler:")] - void ReadAttributeRmsCurrentMin (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRmsCurrentMaxWithResponseHandler:")] - void ReadAttributeRmsCurrentMax (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeActivePowerWithResponseHandler:")] - void ReadAttributeActivePower (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeActivePowerMinWithResponseHandler:")] - void ReadAttributeActivePowerMin (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeActivePowerMaxWithResponseHandler:")] - void ReadAttributeActivePowerMax (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPEthernetNetworkDiagnostics")] - [DisableDefaultCtor] - interface ChipEthernetNetworkDiagnostics { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("resetCounts:")] - void ResetCounts (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePacketRxCountWithResponseHandler:")] - void ReadAttributePacketRxCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePacketTxCountWithResponseHandler:")] - void ReadAttributePacketTxCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxErrCountWithResponseHandler:")] - void ReadAttributeTxErrCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCollisionCountWithResponseHandler:")] - void ReadAttributeCollisionCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOverrunCountWithResponseHandler:")] - void ReadAttributeOverrunCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPFixedLabel")] - [DisableDefaultCtor] - interface ChipFixedLabel { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLabelListWithResponseHandler:")] - void ReadAttributeLabelList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPFlowMeasurement")] - [DisableDefaultCtor] - interface ChipFlowMeasurement { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMeasuredValueWithResponseHandler:")] - void ReadAttributeMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMinMeasuredValueWithResponseHandler:")] - void ReadAttributeMinMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxMeasuredValueWithResponseHandler:")] - void ReadAttributeMaxMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPGeneralDiagnostics")] - [DisableDefaultCtor] - interface ChipGeneralDiagnostics { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNetworkInterfacesWithResponseHandler:")] - void ReadAttributeNetworkInterfaces (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRebootCountWithResponseHandler:")] - void ReadAttributeRebootCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPKeypadInput")] - [DisableDefaultCtor] - interface ChipKeypadInput { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("sendKey:responseHandler:")] - void SendKey (byte keyCode, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPMediaInput")] - [DisableDefaultCtor] - interface ChipMediaInput { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("hideInputStatus:")] - void HideInputStatus (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("renameInput:name:responseHandler:")] - void RenameInput (byte index, string name, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("selectInput:responseHandler:")] - void SelectInput (byte index, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("showInputStatus:")] - void ShowInputStatus (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMediaInputListWithResponseHandler:")] - void ReadAttributeMediaInputList (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentMediaInputWithResponseHandler:")] - void ReadAttributeCurrentMediaInput (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPMediaPlayback")] - [DisableDefaultCtor] - interface ChipMediaPlayback { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaFastForward:")] - void FastForward (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaNext:")] - void Next (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaPause:")] - void Pause (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaPlay:")] - void Play (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaPrevious:")] - void Previous (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaRewind:")] - void Rewind (ChipResponseHandler responseHandler); - - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaSeek:responseHandler:")] - void MediaSeek (ulong position, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaSkipBackward:responseHandler:")] - void SkipBackward (ulong deltaPositionMilliseconds, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaSkipForward:responseHandler:")] - void SkipForward (ulong deltaPositionMilliseconds, ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void SkipSeek (ulong position, ChipResponseHandler responseHandler); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaStartOver:")] - void StartOver (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("mediaStop:")] - void Stop (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPRelativeHumidityMeasurement")] - [DisableDefaultCtor] - interface ChipRelativeHumidityMeasurement { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMeasuredValueWithResponseHandler:")] - void ReadAttributeMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeMeasuredValueWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeMeasuredValue (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeMeasuredValueWithResponseHandler:")] - void ReportAttributeMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMinMeasuredValueWithResponseHandler:")] - void ReadAttributeMinMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMaxMeasuredValueWithResponseHandler:")] - void ReadAttributeMaxMeasuredValue (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPSoftwareDiagnostics")] - [DisableDefaultCtor] - interface ChipSoftwareDiagnostics { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("resetWatermarks:")] - void ResetWatermarks (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentHeapHighWatermarkWithResponseHandler:")] - void ReadAttributeCurrentHeapHighWatermark (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPTargetNavigator")] - [DisableDefaultCtor] - interface ChipTargetNavigator { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("navigateTarget:data:responseHandler:")] - void NavigateTarget (byte target, string data, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTargetNavigatorListWithResponseHandler:")] - void ReadAttributeTargetNavigatorList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPThermostatUserInterfaceConfiguration")] - [DisableDefaultCtor] - interface ChipThermostatUserInterfaceConfiguration { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTemperatureDisplayModeWithResponseHandler:")] - void ReadAttributeTemperatureDisplayMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeTemperatureDisplayModeWithValue:responseHandler:")] - void WriteAttributeTemperatureDisplayMode (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeKeypadLockoutWithResponseHandler:")] - void ReadAttributeKeypadLockout (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeKeypadLockoutWithValue:responseHandler:")] - void WriteAttributeKeypadLockout (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeScheduleProgrammingVisibilityWithResponseHandler:")] - void ReadAttributeScheduleProgrammingVisibility (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeScheduleProgrammingVisibilityWithValue:responseHandler:")] - void WriteAttributeScheduleProgrammingVisibility (byte value, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPTvChannel")] - [DisableDefaultCtor] - interface ChipTvChannel { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("changeChannel:responseHandler:")] - void ChangeChannel (string match, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("changeChannelByNumber:minorNumber:responseHandler:")] - void ChangeChannelByNumber (ushort majorNumber, ushort minorNumber, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("skipChannel:responseHandler:")] - void SkipChannel (ushort count, ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTvChannelListWithResponseHandler:")] - void ReadAttributeTvChannelList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTvChannelLineupWithResponseHandler:")] - void ReadAttributeTvChannelLineup (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentTvChannelWithResponseHandler:")] - void ReadAttributeCurrentTvChannel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPThreadNetworkDiagnostics")] - [DisableDefaultCtor] - interface ChipThreadNetworkDiagnostics { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("resetCounts:")] - void ResetCounts (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeChannelWithResponseHandler:")] - void ReadAttributeChannel (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRoutingRoleWithResponseHandler:")] - void ReadAttributeRoutingRole (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNetworkNameWithResponseHandler:")] - void ReadAttributeNetworkName (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePanIdWithResponseHandler:")] - void ReadAttributePanId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeExtendedPanIdWithResponseHandler:")] - void ReadAttributeExtendedPanId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeMeshLocalPrefixWithResponseHandler:")] - void ReadAttributeMeshLocalPrefix (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOverrunCountWithResponseHandler:")] - void ReadAttributeOverrunCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeNeighborTableListWithResponseHandler:")] - void ReadAttributeNeighborTableList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRouteTableListWithResponseHandler:")] - void ReadAttributeRouteTableList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePartitionIdWithResponseHandler:")] - void ReadAttributePartitionId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeWeightingWithResponseHandler:")] - void ReadAttributeWeighting (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeDataVersionWithResponseHandler:")] - void ReadAttributeDataVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeStableDataVersionWithResponseHandler:")] - void ReadAttributeStableDataVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLeaderRouterIdWithResponseHandler:")] - void ReadAttributeLeaderRouterId (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeDetachedRoleCountWithResponseHandler:")] - void ReadAttributeDetachedRoleCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeChildRoleCountWithResponseHandler:")] - void ReadAttributeChildRoleCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRouterRoleCountWithResponseHandler:")] - void ReadAttributeRouterRoleCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeLeaderRoleCountWithResponseHandler:")] - void ReadAttributeLeaderRoleCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeAttachAttemptCountWithResponseHandler:")] - void ReadAttributeAttachAttemptCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributePartitionIdChangeCountWithResponseHandler:")] - void ReadAttributePartitionIdChangeCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeBetterPartitionAttachAttemptCountWithResponseHandler:")] - void ReadAttributeBetterPartitionAttachAttemptCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeParentChangeCountWithResponseHandler:")] - void ReadAttributeParentChangeCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxTotalCountWithResponseHandler:")] - void ReadAttributeTxTotalCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxUnicastCountWithResponseHandler:")] - void ReadAttributeTxUnicastCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxBroadcastCountWithResponseHandler:")] - void ReadAttributeTxBroadcastCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxAckRequestedCountWithResponseHandler:")] - void ReadAttributeTxAckRequestedCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxAckedCountWithResponseHandler:")] - void ReadAttributeTxAckedCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxNoAckRequestedCountWithResponseHandler:")] - void ReadAttributeTxNoAckRequestedCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxDataCountWithResponseHandler:")] - void ReadAttributeTxDataCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxDataPollCountWithResponseHandler:")] - void ReadAttributeTxDataPollCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxBeaconCountWithResponseHandler:")] - void ReadAttributeTxBeaconCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxBeaconRequestCountWithResponseHandler:")] - void ReadAttributeTxBeaconRequestCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxOtherCountWithResponseHandler:")] - void ReadAttributeTxOtherCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxRetryCountWithResponseHandler:")] - void ReadAttributeTxRetryCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxDirectMaxRetryExpiryCountWithResponseHandler:")] - void ReadAttributeTxDirectMaxRetryExpiryCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxIndirectMaxRetryExpiryCountWithResponseHandler:")] - void ReadAttributeTxIndirectMaxRetryExpiryCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxErrCcaCountWithResponseHandler:")] - void ReadAttributeTxErrCcaCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxErrAbortCountWithResponseHandler:")] - void ReadAttributeTxErrAbortCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTxErrBusyChannelCountWithResponseHandler:")] - void ReadAttributeTxErrBusyChannelCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxTotalCountWithResponseHandler:")] - void ReadAttributeRxTotalCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxUnicastCountWithResponseHandler:")] - void ReadAttributeRxUnicastCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxBroadcastCountWithResponseHandler:")] - void ReadAttributeRxBroadcastCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxDataCountWithResponseHandler:")] - void ReadAttributeRxDataCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxDataPollCountWithResponseHandler:")] - void ReadAttributeRxDataPollCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxBeaconCountWithResponseHandler:")] - void ReadAttributeRxBeaconCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxBeaconRequestCountWithResponseHandler:")] - void ReadAttributeRxBeaconRequestCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxOtherCountWithResponseHandler:")] - void ReadAttributeRxOtherCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxAddressFilteredCountWithResponseHandler:")] - void ReadAttributeRxAddressFilteredCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxDestAddrFilteredCountWithResponseHandler:")] - void ReadAttributeRxDestAddrFilteredCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxDuplicatedCountWithResponseHandler:")] - void ReadAttributeRxDuplicatedCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxErrNoFrameCountWithResponseHandler:")] - void ReadAttributeRxErrNoFrameCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxErrUnknownNeighborCountWithResponseHandler:")] - void ReadAttributeRxErrUnknownNeighborCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxErrInvalidSrcAddrCountWithResponseHandler:")] - void ReadAttributeRxErrInvalidSrcAddrCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxErrSecCountWithResponseHandler:")] - void ReadAttributeRxErrSecCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxErrFcsCountWithResponseHandler:")] - void ReadAttributeRxErrFcsCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRxErrOtherCountWithResponseHandler:")] - void ReadAttributeRxErrOtherCount (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSecurityPolicyWithResponseHandler:")] - void ReadAttributeSecurityPolicy (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeChannelMaskWithResponseHandler:")] - void ReadAttributeChannelMask (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOperationalDatasetComponentsWithResponseHandler:")] - void ReadAttributeOperationalDatasetComponents (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeActiveNetworkFaultsListWithResponseHandler:")] - void ReadAttributeActiveNetworkFaultsList (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPWakeOnLan")] - [DisableDefaultCtor] - interface ChipWakeOnLan { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeWakeOnLanMacAddressWithResponseHandler:")] - void ReadAttributeWakeOnLanMacAddress (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [BaseType (typeof (ChipCluster), Name = "CHIPWiFiNetworkDiagnostics")] - [DisableDefaultCtor] - interface ChipWiFiNetworkDiagnostics { - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("resetCounts:")] - void ResetCounts (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeBssidWithResponseHandler:")] - void ReadAttributeBssid (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSecurityTypeWithResponseHandler:")] - void ReadAttributeSecurityType (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeWiFiVersionWithResponseHandler:")] - void ReadAttributeWiFiVersion (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeChannelNumberWithResponseHandler:")] - void ReadAttributeChannelNumber (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeRssiWithResponseHandler:")] - void ReadAttributeRssi (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - [Obsoleted (PlatformName.iOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.TvOS, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacCatalyst, 16, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.MacOSX, 13, 0, message: Constants.ChipRemoved)] - [Obsoleted (PlatformName.WatchOS, 9, 0, message: Constants.ChipRemoved)] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] - [BaseType (typeof (ChipCluster), Name = "CHIPWindowCovering")] - [DisableDefaultCtor] - interface ChipWindowCovering { - [Mac (12, 1), Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Export ("initWithDevice:endpoint:queue:")] - [DesignatedInitializer] - NativeHandle Constructor (ChipDevice device, ushort endpoint, DispatchQueue queue); - -#if !NET - [Deprecated (PlatformName.iOS, 15, 2)] - [Deprecated (PlatformName.TvOS, 15, 2)] - [Deprecated (PlatformName.WatchOS, 8, 3)] - [Deprecated (PlatformName.MacOSX, 12, 1)] - [Deprecated (PlatformName.MacCatalyst, 15, 2)] - [Wrap ("this (device, (ushort) endpoint, queue)")] - NativeHandle Constructor (ChipDevice device, byte endpoint, DispatchQueue queue); -#endif - -#if !NET - [Obsolete ("This method is removed, use 'DownOrClose' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void DownClose (ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void GoToLiftPercentage (byte percentageLiftValue, ChipResponseHandler responseHandler); -#endif - - [Internal] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("windowCoveringGoToLiftValue:responseHandler:")] - void _OldGoToLiftValue (ushort liftValue, ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void GoToTiltPercentage (byte percentageTiltValue, ChipResponseHandler responseHandler); -#endif - - [Internal] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("windowCoveringGoToTiltValue:responseHandler:")] - void _OldGoToTiltValue (ushort tiltValue, ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed, use 'StopMotion' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void Stop (ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed, use 'UpOrOpen' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void UpOpen (ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed, use 'ReadAttributeType' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ReadAttributeWindowCoveringType (ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ConfigureAttributeWindowCoveringType (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ReportAttributeWindowCoveringType (ChipResponseHandler responseHandler); -#endif - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("downOrClose:")] - void DownOrClose (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("goToLiftPercentage:liftPercent100thsValue:responseHandler:")] - void GoToLiftPercentage (byte liftPercentageValue, ushort liftPercent100thsValue, ChipResponseHandler responseHandler); - - [Internal] - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("goToLiftValue:responseHandler:")] - void _NewGoToLiftValue (ushort liftValue, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("goToTiltPercentage:tiltPercent100thsValue:responseHandler:")] - void GoToTiltPercentage (byte tiltPercentageValue, ushort tiltPercent100thsValue, ChipResponseHandler responseHandler); - - [Internal] - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("goToTiltValue:responseHandler:")] - void _NewGoToTiltValue (ushort tiltValue, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("stopMotion:")] - void StopMotion (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("upOrOpen:")] - void UpOrOpen (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTypeWithResponseHandler:")] - void ReadAttributeType (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentPositionLiftWithResponseHandler:")] - void ReadAttributeCurrentPositionLift (ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed, use 'ConfigureAttributeCurrentPositionLiftPercentage' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ConfigureAttributeCurrentPositionLift (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed, use 'ReportAttributeCurrentPositionLiftPercentage' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ReportAttributeCurrentPositionLift (ChipResponseHandler responseHandler); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentPositionTiltWithResponseHandler:")] - void ReadAttributeCurrentPositionTilt (ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed, use 'ConfigureAttributeCurrentPositionTiltPercentage' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ConfigureAttributeCurrentPositionTilt (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed, use 'ReportAttributeCurrentPositionTiltPercentage' instead.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ReportAttributeCurrentPositionTilt (ChipResponseHandler responseHandler); -#endif - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeConfigStatusWithResponseHandler:")] - void ReadAttributeConfigStatus (ChipResponseHandler responseHandler); - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ConfigureAttributeConfigStatus (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); -#endif - -#if !NET - [Obsolete ("This method is removed.")] - [Wrap ("throw new InvalidOperationException (Constants.RemovedFromChip)", IsVirtual = true)] - [NoMac] // fails on macOS 12 beta 6 - [Async (ResultTypeName = "ChipReadAttributeResult")] - void ReportAttributeConfigStatus (ChipResponseHandler responseHandler); -#endif - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentPositionLiftPercentageWithResponseHandler:")] - void ReadAttributeCurrentPositionLiftPercentage (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentPositionLiftPercentageWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentPositionLiftPercentage (ushort minInterval, ushort maxInterval, byte change, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentPositionLiftPercentageWithResponseHandler:")] - void ReportAttributeCurrentPositionLiftPercentage (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentPositionTiltPercentageWithResponseHandler:")] - void ReadAttributeCurrentPositionTiltPercentage (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentPositionTiltPercentageWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentPositionTiltPercentage (ushort minInterval, ushort maxInterval, byte change, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentPositionTiltPercentageWithResponseHandler:")] - void ReportAttributeCurrentPositionTiltPercentage (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeOperationalStatusWithResponseHandler:")] - void ReadAttributeOperationalStatus (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeOperationalStatusWithMinInterval:maxInterval:responseHandler:")] - void ConfigureAttributeOperationalStatus (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeOperationalStatusWithResponseHandler:")] - void ReportAttributeOperationalStatus (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTargetPositionLiftPercent100thsWithResponseHandler:")] - void ReadAttributeTargetPositionLiftPercent100ths (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeTargetPositionLiftPercent100thsWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeTargetPositionLiftPercent100ths (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeTargetPositionLiftPercent100thsWithResponseHandler:")] - void ReportAttributeTargetPositionLiftPercent100ths (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeTargetPositionTiltPercent100thsWithResponseHandler:")] - void ReadAttributeTargetPositionTiltPercent100ths (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeTargetPositionTiltPercent100thsWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeTargetPositionTiltPercent100ths (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeTargetPositionTiltPercent100thsWithResponseHandler:")] - void ReportAttributeTargetPositionTiltPercent100ths (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeEndProductTypeWithResponseHandler:")] - void ReadAttributeEndProductType (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentPositionLiftPercent100thsWithResponseHandler:")] - void ReadAttributeCurrentPositionLiftPercent100ths (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentPositionLiftPercent100thsWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentPositionLiftPercent100ths (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentPositionLiftPercent100thsWithResponseHandler:")] - void ReportAttributeCurrentPositionLiftPercent100ths (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeCurrentPositionTiltPercent100thsWithResponseHandler:")] - void ReadAttributeCurrentPositionTiltPercent100ths (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeCurrentPositionTiltPercent100thsWithMinInterval:maxInterval:change:responseHandler:")] - void ConfigureAttributeCurrentPositionTiltPercent100ths (ushort minInterval, ushort maxInterval, ushort change, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeCurrentPositionTiltPercent100thsWithResponseHandler:")] - void ReportAttributeCurrentPositionTiltPercent100ths (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeInstalledOpenLimitLiftWithResponseHandler:")] - void ReadAttributeInstalledOpenLimitLift (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeInstalledClosedLimitLiftWithResponseHandler:")] - void ReadAttributeInstalledClosedLimitLift (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeInstalledOpenLimitTiltWithResponseHandler:")] - void ReadAttributeInstalledOpenLimitTilt (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeInstalledClosedLimitTiltWithResponseHandler:")] - void ReadAttributeInstalledClosedLimitTilt (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeModeWithResponseHandler:")] - void ReadAttributeMode (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("writeAttributeModeWithValue:responseHandler:")] - void WriteAttributeMode (byte value, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeSafetyStatusWithResponseHandler:")] - void ReadAttributeSafetyStatus (ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("configureAttributeSafetyStatusWithMinInterval:maxInterval:responseHandler:")] - void ConfigureAttributeSafetyStatus (ushort minInterval, ushort maxInterval, ChipResponseHandler responseHandler); - - [NoMac, Watch (8, 3), TV (15, 2), iOS (15, 2), MacCatalyst (15, 2)] - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("reportAttributeSafetyStatusWithResponseHandler:")] - void ReportAttributeSafetyStatus (ChipResponseHandler responseHandler); - - [Async (ResultTypeName = "ChipReadAttributeResult")] - [Export ("readAttributeClusterRevisionWithResponseHandler:")] - void ReadAttributeClusterRevision (ChipResponseHandler responseHandler); - } - - -} -#endif // !NET diff --git a/src/cinematic.cs b/src/cinematic.cs index c8cb0aab0cc8..a105308cbb79 100644 --- a/src/cinematic.cs +++ b/src/cinematic.cs @@ -15,7 +15,7 @@ namespace Cinematic { - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [ErrorDomain ("CNCinematicErrorDomain")] [Native] public enum CNCinematicErrorCode : long { @@ -28,7 +28,7 @@ public enum CNCinematicErrorCode : long { Cancelled = 7, } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [Native] public enum CNRenderingQuality : long { Thumbnail, @@ -37,7 +37,7 @@ public enum CNRenderingQuality : long { ExportHigh, } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0)] [Native] public enum CNDetectionType : long { Unknown = 0, @@ -54,7 +54,7 @@ public enum CNDetectionType : long { Custom = 102, } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNAssetInfo { @@ -110,14 +110,14 @@ interface CNAssetInfo { NSNumber [] SampleDataTrackIds { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (CNAssetInfo))] interface CNCompositionInfo { [Export ("insertTimeRange:ofCinematicAssetInfo:atTime:error:")] bool InsertTimeRange (CMTimeRange timeRange, CNAssetInfo assetInfo, CMTime startTime, [NullAllowed] out NSError outError); } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNRenderingSessionAttributes { @@ -130,7 +130,7 @@ interface CNRenderingSessionAttributes { nint RenderingVersion { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNRenderingSessionFrameAttributes : NSCopying, NSMutableCopying { @@ -147,7 +147,7 @@ interface CNRenderingSessionFrameAttributes : NSCopying, NSMutableCopying { float FNumber { get; set; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNRenderingSession { @@ -184,7 +184,7 @@ interface CNRenderingSession { NSNumber [] DestinationPixelFormatTypes { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNDetection : NSCopying { @@ -226,7 +226,7 @@ interface CNDetection : NSCopying { float DisparityInNormalizedRect (CGRect normalizedRect, CVPixelBuffer sourceDisparity, CNDetectionType detectionType, float priorDisparity); } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNDecision : NSCopying { @@ -257,7 +257,7 @@ interface CNDecision : NSCopying { bool StrongDecision { [Bind ("isStrongDecision")] get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNDetectionTrack : NSCopying { @@ -288,7 +288,7 @@ interface CNDetectionTrack : NSCopying { CNDetection [] GetDetectionsInTimeRange (CMTimeRange timeRange); } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (CNDetectionTrack))] interface CNFixedDetectionTrack { [Export ("initWithFocusDisparity:")] @@ -304,7 +304,7 @@ interface CNFixedDetectionTrack { CNDetection OriginalDetection { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (CNDetectionTrack))] interface CNCustomDetectionTrack { [Export ("initWithDetections:smooth:")] @@ -314,7 +314,7 @@ interface CNCustomDetectionTrack { CNDetection [] AllDetections { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNScript { @@ -407,7 +407,7 @@ interface CNScript { CNDetectionTrack [] AddedDetectionTracks { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNScriptChanges { @@ -427,7 +427,7 @@ interface CNScriptChanges { CNDetectionTrack [] AddedDetectionTracks { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNScriptFrame : NSCopying { @@ -452,7 +452,7 @@ interface CNScriptFrame : NSCopying { CNDetection GetBestDetectionForGroupId (long detectionGroupId); } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] interface CNBoundsPrediction : NSCopying, NSMutableCopying { [Export ("normalizedBounds", ArgumentSemantic.Assign)] @@ -462,7 +462,7 @@ interface CNBoundsPrediction : NSCopying, NSMutableCopying { float Confidence { get; set; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), NoMacCatalyst] + [TV (17, 0), Mac (14, 0), iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNObjectTracker { diff --git a/src/classkit.cs b/src/classkit.cs index 7ea46fa415a1..37b19ec3a65c 100644 --- a/src/classkit.cs +++ b/src/classkit.cs @@ -21,7 +21,7 @@ namespace ClassKit { /// Enumerates activity outcome types. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Native] enum CLSBinaryValueType : long { TrueFalse = 0, @@ -33,7 +33,7 @@ enum CLSBinaryValueType : long { /// Enumerates curriculum units. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Native] enum CLSContextType : long { None = 0, @@ -62,7 +62,7 @@ enum CLSContextType : long { /// Enumerates ClassKit error codes. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Native] [ErrorDomain ("CLSErrorCodeDomain")] public enum CLSErrorCode : long { @@ -82,7 +82,7 @@ public enum CLSErrorCode : long { /// Enumerates topics for contexts. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] enum CLSContextTopic { [Field ("CLSContextTopicMath")] Math, @@ -107,7 +107,7 @@ enum CLSContextTopic { [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [Native] public enum CLSProgressReportingCapabilityKind : long { Duration = 0, @@ -119,7 +119,7 @@ public enum CLSProgressReportingCapabilityKind : long { /// Contains keys for accessing error data. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Static] interface CLSErrorUserInfoKeys { @@ -136,7 +136,7 @@ interface CLSErrorUserInfoKeys { /// Enumerates key paths for retrieving ClassKit contexts. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Static] interface CLSPredicateKeyPath { [Field ("CLSPredicateKeyPathDateCreated")] @@ -160,7 +160,7 @@ interface CLSPredicateKeyPath { /// Base class for ClassKit objects. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLSObject : NSSecureCoding { @@ -174,7 +174,7 @@ interface CLSObject : NSSecureCoding { /// Encapsulates and interaction between the student and a task for a context. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (CLSObject))] [DisableDefaultCtor] interface CLSActivity { @@ -217,7 +217,7 @@ interface CLSActivity { /// Base class for activity items. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (CLSObject))] [DisableDefaultCtor] interface CLSActivityItem { @@ -230,7 +230,7 @@ interface CLSActivityItem { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (CLSActivityItem))] [DisableDefaultCtor] interface CLSBinaryItem { @@ -248,7 +248,7 @@ interface CLSBinaryItem { /// A node in a ClassKit context hierarchy. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (CLSObject))] [DisableDefaultCtor] interface CLSContext { @@ -386,7 +386,7 @@ interface ICLSDataStoreDelegate { } /// ClassKit contexts are used to arrange nested content, such as chapters and sections of a lesson plan, in order to organize and track student progress and tests. ClassKit supports a maximum of 8 layers of content nesting. /// [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Protocol, Model] [BaseType (typeof (NSObject))] interface CLSDataStoreDelegate { @@ -399,7 +399,7 @@ interface CLSDataStoreDelegate { /// Manages ClassKit data by operating on hierarchical contexts, such as acts, chapters, sections, and so on. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLSDataStore { @@ -454,7 +454,7 @@ interface CLSDataStore { /// Represents a quantitative data item. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (CLSActivityItem))] [DisableDefaultCtor] interface CLSQuantityItem { @@ -469,7 +469,7 @@ interface CLSQuantityItem { /// Represents a score for a test or quiz. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [BaseType (typeof (CLSActivityItem))] [DisableDefaultCtor] interface CLSScoreItem { @@ -486,7 +486,7 @@ interface CLSScoreItem { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Protocol] interface CLSContextProvider { [Abstract] @@ -495,7 +495,7 @@ interface CLSContextProvider { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [BaseType (typeof (CLSObject))] [DisableDefaultCtor] interface CLSProgressReportingCapability { diff --git a/src/clockkit.cs b/src/clockkit.cs index c5f0d057debe..45c6c5b84621 100644 --- a/src/clockkit.cs +++ b/src/clockkit.cs @@ -19,7 +19,6 @@ namespace ClockKit { - [Watch (7, 0)] [ErrorDomain ("CLKWatchFaceLibraryErrorDomain")] [Native] public enum CLKWatchFaceLibraryErrorCode : long { @@ -29,26 +28,21 @@ public enum CLKWatchFaceLibraryErrorCode : long { FaceNotAvailable = 4, } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (NSObject))] interface CLKComplication : NSCopying { [Export ("family")] CLKComplicationFamily Family { get; } - [Watch (7, 0)] [Export ("identifier")] string Identifier { get; } - [Watch (7, 0)] [Export ("userInfo"), NullAllowed] NSDictionary UserInfo { get; } - [Watch (7, 0)] [Export ("userActivity"), NullAllowed] NSUserActivity UserActivity { get; } - [Watch (7, 0)] [Field ("CLKDefaultComplicationIdentifier")] NSString DefaultComplicationIdentifier { get; } } @@ -60,81 +54,61 @@ interface ICLKComplicationDataSource { } interface CLKComplicationDataSource { [Abstract] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'CLKComplicationDataSource.GetTimelineEndDate' instead.")] [Export ("getSupportedTimeTravelDirectionsForComplication:withHandler:")] void GetSupportedTimeTravelDirections (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel are not longer supported.")] [Export ("getTimelineStartDateForComplication:withHandler:")] void GetTimelineStartDate (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("getTimelineEndDateForComplication:withHandler:")] void GetTimelineEndDate (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("getPrivacyBehaviorForComplication:withHandler:")] void GetPrivacyBehavior (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("getTimelineAnimationBehaviorForComplication:withHandler:")] void GetTimelineAnimationBehavior (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (6, 0)] [Export ("getAlwaysOnTemplateForComplication:withHandler:")] void GetAlwaysOnTemplate (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Abstract] [Export ("getCurrentTimelineEntryForComplication:withHandler:")] void GetCurrentTimelineEntry (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel are not longer supported.")] [Export ("getTimelineEntriesForComplication:beforeDate:limit:withHandler:")] void GetTimelineEntriesBeforeDate (CLKComplication complication, NSDate beforeDate, nuint limit, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("getTimelineEntriesForComplication:afterDate:limit:withHandler:")] void GetTimelineEntriesAfterDate (CLKComplication complication, NSDate afterDate, nuint limit, Action handler); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'WKRefreshBackgroundTask' instead.")] [Export ("getNextRequestedUpdateDateWithHandler:")] void GetNextRequestedUpdateDate (Action handler); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'WKRefreshBackgroundTask' instead.")] [Export ("requestedUpdateDidBegin")] void RequestedUpdateDidBegin (); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'WKRefreshBackgroundTask' instead.")] [Export ("requestedUpdateBudgetExhausted")] void RequestedUpdateBudgetExhausted (); // this was @required in watchOS 2.x but is now deprecated and downgraded to @optional in watchOS 3 (betas) - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'GetLocalizableSampleTemplate' instead.")] [Export ("getPlaceholderTemplateForComplication:withHandler:")] void GetPlaceholderTemplate (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("getLocalizableSampleTemplateForComplication:withHandler:")] void GetLocalizableSampleTemplate (CLKComplication complication, Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [Export ("getComplicationDescriptorsWithHandler:")] void GetComplicationDescriptors (Action handler); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [Export ("handleSharedComplicationDescriptors:")] void HandleSharedComplicationDescriptors (CLKComplicationDescriptor [] complicationDescriptors); - [Watch (9, 0), NoiOS] + [NoiOS] [Export ("widgetMigrator")] CLKComplicationWidgetMigrator WidgetMigrator { get; } } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // Default constructor not allowed for ClockKit.CLKComplicationServer : Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: You cannot alloc/init new instances of CLKComplicationServer. Use +sharedInstance. interface CLKComplicationServer { @@ -150,11 +124,9 @@ interface CLKComplicationServer { [Export ("activeComplications"), NullAllowed] CLKComplication [] ActiveComplications { get; } - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel is not longer supported.")] [Export ("earliestTimeTravelDate")] NSDate EarliestTimeTravelDate { get; } - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Backwards extension and time travel is not longer supported.")] [Export ("latestTimeTravelDate")] NSDate LatestTimeTravelDate { get; } @@ -164,12 +136,10 @@ interface CLKComplicationServer { [Export ("extendTimelineForComplication:")] void ExtendTimeline (CLKComplication complication); - [Watch (7, 0)] [Export ("reloadComplicationDescriptors")] void ReloadComplicationDescriptors (); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLKComplicationTemplate : NSCopying { @@ -177,46 +147,38 @@ interface CLKComplicationTemplate : NSCopying { [NullAllowed, Export ("tintColor", ArgumentSemantic.Copy)] UIColor TintColor { get; set; } - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use the provided factories instead.")] [Export ("init")] NativeHandle Constructor (); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularSmallSimpleText { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:")] NativeHandle Constructor (CLKTextProvider textProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:")] CLKComplicationTemplateModularSmallSimpleText Create (CLKTextProvider textProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularSmallSimpleImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:")] NativeHandle Constructor (CLKImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:")] CLKComplicationTemplateModularSmallSimpleImage Create (CLKImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularSmallRingText { @@ -229,17 +191,14 @@ interface CLKComplicationTemplateModularSmallRingText { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:fillFraction:ringStyle:")] CLKComplicationTemplateModularSmallRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularSmallRingImage { @@ -252,17 +211,14 @@ interface CLKComplicationTemplateModularSmallRingImage { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:fillFraction:ringStyle:")] CLKComplicationTemplateModularSmallRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularSmallStackText { @@ -275,17 +231,14 @@ interface CLKComplicationTemplateModularSmallStackText { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } - [Watch (7, 0)] [Export ("initWithLine1TextProvider:line2TextProvider:")] NativeHandle Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1TextProvider:line2TextProvider:")] CLKComplicationTemplateModularSmallStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularSmallStackImage { @@ -298,17 +251,14 @@ interface CLKComplicationTemplateModularSmallStackImage { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } - [Watch (7, 0)] [Export ("initWithLine1ImageProvider:line2TextProvider:")] NativeHandle Constructor (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1ImageProvider:line2TextProvider:")] CLKComplicationTemplateModularSmallStackImage Create (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularSmallColumnsText { @@ -330,17 +280,14 @@ interface CLKComplicationTemplateModularSmallColumnsText { [Export ("highlightColumn2")] bool HighlightColumn2 { get; set; } - [Watch (7, 0)] [Export ("initWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] NativeHandle Constructor (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] CLKComplicationTemplateModularSmallColumnsText Create (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularLargeStandardBody { @@ -358,44 +305,35 @@ interface CLKComplicationTemplateModularLargeStandardBody { [Export ("headerImageProvider", ArgumentSemantic.Copy)] CLKImageProvider HeaderImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithHeaderTextProvider:body1TextProvider:")] NativeHandle Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Export ("initWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] NativeHandle Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); - [Watch (7, 0)] [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] NativeHandle Constructor ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] NativeHandle Constructor ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderTextProvider:body1TextProvider:")] CLKComplicationTemplateModularLargeStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] CLKComplicationTemplateModularLargeStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] CLKComplicationTemplateModularLargeStandardBody Create ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] CLKComplicationTemplateModularLargeStandardBody Create ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularLargeTallBody { @@ -405,17 +343,14 @@ interface CLKComplicationTemplateModularLargeTallBody { [Export ("bodyTextProvider", ArgumentSemantic.Copy)] CLKTextProvider BodyTextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithHeaderTextProvider:bodyTextProvider:")] NativeHandle Constructor (CLKTextProvider headerTextProvider, CLKTextProvider bodyTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderTextProvider:bodyTextProvider:")] CLKComplicationTemplateModularLargeTallBody Create (CLKTextProvider headerTextProvider, CLKTextProvider bodyTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularLargeTable { @@ -441,26 +376,21 @@ interface CLKComplicationTemplateModularLargeTable { [Export ("column2Alignment")] CLKComplicationColumnAlignment Column2Alignment { get; set; } - [Watch (7, 0)] [Export ("initWithHeaderTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] NativeHandle Constructor (CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); - [Watch (7, 0)] [Export ("initWithHeaderImageProvider:headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] NativeHandle Constructor ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] CLKComplicationTemplateModularLargeTable Create (CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderImageProvider:headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] CLKComplicationTemplateModularLargeTable Create ([NullAllowed] CLKImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateModularLargeColumns { @@ -497,26 +427,21 @@ interface CLKComplicationTemplateModularLargeColumns { [Export ("column2Alignment")] CLKComplicationColumnAlignment Column2Alignment { get; set; } - [Watch (7, 0)] [Export ("initWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:row3Column1TextProvider:row3Column2TextProvider:")] NativeHandle Constructor (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); - [Watch (7, 0)] [Export ("initWithRow1ImageProvider:row1Column1TextProvider:row1Column2TextProvider:row2ImageProvider:row2Column1TextProvider:row2Column2TextProvider:row3ImageProvider:row3Column1TextProvider:row3Column2TextProvider:")] NativeHandle Constructor ([NullAllowed] CLKImageProvider row1ImageProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, [NullAllowed] CLKImageProvider row2ImageProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, [NullAllowed] CLKImageProvider row3ImageProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:row3Column1TextProvider:row3Column2TextProvider:")] CLKComplicationTemplateModularLargeColumns Create (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithRow1ImageProvider:row1Column1TextProvider:row1Column2TextProvider:row2ImageProvider:row2Column1TextProvider:row2Column2TextProvider:row3ImageProvider:row3Column1TextProvider:row3Column2TextProvider:")] CLKComplicationTemplateModularLargeColumns Create ([NullAllowed] CLKImageProvider row1ImageProvider, CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, [NullAllowed] CLKImageProvider row2ImageProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider, [NullAllowed] CLKImageProvider row3ImageProvider, CLKTextProvider row3Column1TextProvider, CLKTextProvider row3Column2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateUtilitarianSmallFlat { @@ -527,43 +452,35 @@ interface CLKComplicationTemplateUtilitarianSmallFlat { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:")] NativeHandle Constructor (CLKTextProvider textProvider); - [Watch (7, 0)] [Export ("initWithTextProvider:imageProvider:")] NativeHandle Constructor (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:")] CLKComplicationTemplateUtilitarianSmallFlat Create (CLKTextProvider textProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:imageProvider:")] CLKComplicationTemplateUtilitarianSmallFlat Create (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateUtilitarianSmallSquare { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:")] NativeHandle Constructor (CLKImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:")] CLKComplicationTemplateUtilitarianSmallSquare Create (CLKImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateUtilitarianSmallRingText { @@ -576,17 +493,14 @@ interface CLKComplicationTemplateUtilitarianSmallRingText { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:fillFraction:ringStyle:")] CLKComplicationTemplateUtilitarianSmallRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateUtilitarianSmallRingImage { @@ -599,17 +513,14 @@ interface CLKComplicationTemplateUtilitarianSmallRingImage { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:fillFraction:ringStyle:")] CLKComplicationTemplateUtilitarianSmallRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateUtilitarianLargeFlat { @@ -620,60 +531,49 @@ interface CLKComplicationTemplateUtilitarianLargeFlat { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:")] NativeHandle Constructor (CLKTextProvider textProvider); - [Watch (7, 0)] [Export ("initWithTextProvider:imageProvider:")] NativeHandle Constructor (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:")] CLKComplicationTemplateUtilitarianLargeFlat Create (CLKTextProvider textProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:imageProvider:")] CLKComplicationTemplateUtilitarianLargeFlat Create (CLKTextProvider textProvider, [NullAllowed] CLKImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateCircularSmallSimpleText { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:")] NativeHandle Constructor (CLKTextProvider textProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:")] CLKComplicationTemplateCircularSmallSimpleText Create (CLKTextProvider textProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateCircularSmallSimpleImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:")] NativeHandle Constructor (CLKImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:")] CLKComplicationTemplateCircularSmallSimpleImage Create (CLKImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateCircularSmallRingText { @@ -686,17 +586,14 @@ interface CLKComplicationTemplateCircularSmallRingText { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:fillFraction:ringStyle:")] CLKComplicationTemplateCircularSmallRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateCircularSmallRingImage { @@ -709,17 +606,14 @@ interface CLKComplicationTemplateCircularSmallRingImage { [Export ("ringStyle")] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:fillFraction:ringStyle:")] CLKComplicationTemplateCircularSmallRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateCircularSmallStackText { @@ -729,17 +623,14 @@ interface CLKComplicationTemplateCircularSmallStackText { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithLine1TextProvider:line2TextProvider:")] NativeHandle Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1TextProvider:line2TextProvider:")] CLKComplicationTemplateCircularSmallStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateCircularSmallStackImage { @@ -749,51 +640,42 @@ interface CLKComplicationTemplateCircularSmallStackImage { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithLine1ImageProvider:line2TextProvider:")] NativeHandle Constructor (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1ImageProvider:line2TextProvider:")] CLKComplicationTemplateCircularSmallStackImage Create (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateExtraLargeSimpleText { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:")] NativeHandle Constructor (CLKTextProvider textProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:")] CLKComplicationTemplateExtraLargeSimpleText Create (CLKTextProvider textProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateExtraLargeSimpleImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:")] NativeHandle Constructor (CLKImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:")] CLKComplicationTemplateExtraLargeSimpleImage Create (CLKImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateExtraLargeRingText { @@ -806,17 +688,14 @@ interface CLKComplicationTemplateExtraLargeRingText { [Export ("ringStyle", ArgumentSemantic.Assign)] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:fillFraction:ringStyle:")] CLKComplicationTemplateExtraLargeRingText Create (CLKTextProvider textProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateExtraLargeRingImage { @@ -829,17 +708,14 @@ interface CLKComplicationTemplateExtraLargeRingImage { [Export ("ringStyle", ArgumentSemantic.Assign)] CLKComplicationRingStyle RingStyle { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:fillFraction:ringStyle:")] NativeHandle Constructor (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:fillFraction:ringStyle:")] CLKComplicationTemplateExtraLargeRingImage Create (CLKImageProvider imageProvider, float fillFraction, CLKComplicationRingStyle ringStyle); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateExtraLargeStackText { @@ -852,17 +728,14 @@ interface CLKComplicationTemplateExtraLargeStackText { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } - [Watch (7, 0)] [Export ("initWithLine1TextProvider:line2TextProvider:")] NativeHandle Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1TextProvider:line2TextProvider:")] CLKComplicationTemplateExtraLargeStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateExtraLargeStackImage { @@ -875,17 +748,14 @@ interface CLKComplicationTemplateExtraLargeStackImage { [Export ("highlightLine2")] bool HighlightLine2 { get; set; } - [Watch (7, 0)] [Export ("initWithLine1ImageProvider:line2TextProvider:")] NativeHandle Constructor (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1ImageProvider:line2TextProvider:")] CLKComplicationTemplateExtraLargeStackImage Create (CLKImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateExtraLargeColumnsText { @@ -907,17 +777,14 @@ interface CLKComplicationTemplateExtraLargeColumnsText { [Export ("highlightColumn2")] bool HighlightColumn2 { get; set; } - [Watch (7, 0)] [Export ("initWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] NativeHandle Constructor (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithRow1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:")] CLKComplicationTemplateExtraLargeColumnsText Create (CLKTextProvider row1Column1TextProvider, CLKTextProvider row1Column2TextProvider, CLKTextProvider row2Column1TextProvider, CLKTextProvider row2Column2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (NSObject))] interface CLKComplicationTimelineEntry { @@ -939,12 +806,10 @@ interface CLKComplicationTimelineEntry { string TimelineAnimationGroup { get; set; } } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLKImageProvider : NSCopying { - [Deprecated (PlatformName.WatchOS, 7, 0)] [Export ("init")] NativeHandle Constructor (); @@ -972,16 +837,13 @@ interface CLKImageProvider : NSCopying { [NullAllowed, Export ("twoPieceImageForeground", ArgumentSemantic.Retain)] UIImage TwoPieceImageForeground { get; set; } - [Watch (7, 0)] [Export ("initWithOnePieceImage:")] NativeHandle Constructor (UIImage onePieceImage); - [Watch (7, 0)] [Export ("initWithOnePieceImage:twoPieceImageBackground:twoPieceImageForeground:")] NativeHandle Constructor (UIImage onePieceImage, [NullAllowed] UIImage twoPieceImageBackground, [NullAllowed] UIImage twoPieceImageForeground); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLKTextProvider : NSCopying { @@ -1019,7 +881,6 @@ interface CLKTextProvider : NSCopying { string AccessibilityLabel { get; set; } } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKTextProvider))] interface CLKSimpleTextProvider { @@ -1042,20 +903,16 @@ interface CLKSimpleTextProvider { [Export ("shortText")] string ShortText { get; set; } - [Watch (7, 0)] [Export ("initWithText:")] NativeHandle Constructor (string text); - [Watch (7, 0)] [Export ("initWithText:shortText:")] NativeHandle Constructor (string text, [NullAllowed] string shortText); - [Watch (7, 0)] [Export ("initWithText:shortText:accessibilityLabel:")] NativeHandle Constructor (string text, [NullAllowed] string shortText, [NullAllowed] string accessibilityLabel); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKTextProvider))] interface CLKDateTextProvider { @@ -1077,20 +934,16 @@ interface CLKDateTextProvider { [Export ("timeZone", ArgumentSemantic.Retain)] NSTimeZone TimeZone { get; set; } - [Watch (6, 0)] [Export ("uppercase")] bool Uppercase { get; set; } - [Watch (7, 0)] [Export ("initWithDate:units:")] NativeHandle Constructor (NSDate date, NSCalendarUnit calendarUnits); - [Watch (7, 0)] [Export ("initWithDate:units:timeZone:")] NativeHandle Constructor (NSDate date, NSCalendarUnit calendarUnits, [NullAllowed] NSTimeZone timeZone); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKTextProvider))] interface CLKTimeTextProvider { @@ -1109,16 +962,13 @@ interface CLKTimeTextProvider { [Export ("timeZone", ArgumentSemantic.Retain)] NSTimeZone TimeZone { get; set; } - [Watch (7, 0)] [Export ("initWithDate:")] NativeHandle Constructor (NSDate date); - [Watch (7, 0)] [Export ("initWithDate:timeZone:")] NativeHandle Constructor (NSDate date, [NullAllowed] NSTimeZone timeZone); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKTextProvider))] interface CLKTimeIntervalTextProvider { @@ -1140,16 +990,13 @@ interface CLKTimeIntervalTextProvider { [Export ("timeZone", ArgumentSemantic.Retain)] NSTimeZone TimeZone { get; set; } - [Watch (7, 0)] [Export ("initWithStartDate:endDate:")] NativeHandle Constructor (NSDate startDate, NSDate endDate); - [Watch (7, 0)] [Export ("initWithStartDate:endDate:timeZone:")] NativeHandle Constructor (NSDate startDate, NSDate endDate, [NullAllowed] NSTimeZone timeZone); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [BaseType (typeof (CLKTextProvider))] interface CLKRelativeDateTextProvider { @@ -1166,20 +1013,16 @@ interface CLKRelativeDateTextProvider { [Export ("calendarUnits")] NSCalendarUnit CalendarUnits { get; set; } - [Watch (7, 0)] [Export ("initWithDate:style:units:")] NativeHandle Constructor (NSDate date, CLKRelativeDateStyle style, NSCalendarUnit calendarUnits); - [Watch (7, 0)] [Export ("initWithDate:relativeToDate:style:units:")] NativeHandle Constructor (NSDate date, [NullAllowed] NSDate relativeDate, CLKRelativeDateStyle style, NSCalendarUnit calendarUnits); - [Watch (7, 0)] [Static] [Export ("textProviderWithDate:relativeToDate:style:units:")] CLKRelativeDateTextProvider Create (NSDate date, [NullAllowed] NSDate relativeToDate, CLKRelativeDateStyle style, NSCalendarUnit calendarUnits); - [Watch (7, 0)] [Export ("relativeToDate", ArgumentSemantic.Retain), NullAllowed] NSDate RelativeToDate { get; set; } } @@ -1190,13 +1033,10 @@ interface CLKLaunchOptionsKeys { [Field ("CLKLaunchedTimelineEntryDateKey")] NSString LaunchedTimelineEntryDate { get; } - [Watch (7, 0)] [Field ("CLKLaunchedComplicationIdentifierKey")] NSString LaunchedComplicationIdentifierKey { get; } } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicBezelCircularText { [Export ("circularTemplate", ArgumentSemantic.Copy)] @@ -1205,35 +1045,27 @@ interface CLKComplicationTemplateGraphicBezelCircularText { [NullAllowed, Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithCircularTemplate:")] NativeHandle Constructor (CLKComplicationTemplateGraphicCircular circularTemplate); - [Watch (7, 0)] [Export ("initWithCircularTemplate:textProvider:")] NativeHandle Constructor (CLKComplicationTemplateGraphicCircular circularTemplate, [NullAllowed] CLKTextProvider textProvider); - [Watch (7, 0)] [Static] [Export ("templateWithCircularTemplate:")] CLKComplicationTemplateGraphicBezelCircularText Create (CLKComplicationTemplateGraphicCircular circularTemplate); - [Watch (7, 0)] [Static] [Export ("templateWithCircularTemplate:textProvider:")] CLKComplicationTemplateGraphicBezelCircularText Create (CLKComplicationTemplateGraphicCircular circularTemplate, [NullAllowed] CLKTextProvider textProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [Abstract] // An abstract superclass for all the circular graphic templates. [DisableDefaultCtor] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicCircular { } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularClosedGaugeImage { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1242,18 +1074,14 @@ interface CLKComplicationTemplateGraphicCircularClosedGaugeImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithGaugeProvider:imageProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:imageProvider:")] CLKComplicationTemplateGraphicCircularClosedGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularClosedGaugeText { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1262,35 +1090,27 @@ interface CLKComplicationTemplateGraphicCircularClosedGaugeText { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithGaugeProvider:centerTextProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider centerTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:centerTextProvider:")] CLKComplicationTemplateGraphicCircularClosedGaugeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:")] NativeHandle Constructor (CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:")] CLKComplicationTemplateGraphicCircularImage Create (CLKFullColorImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularOpenGaugeImage { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1302,18 +1122,14 @@ interface CLKComplicationTemplateGraphicCircularOpenGaugeImage { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithGaugeProvider:bottomImageProvider:centerTextProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider bottomImageProvider, CLKTextProvider centerTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:bottomImageProvider:centerTextProvider:")] CLKComplicationTemplateGraphicCircularOpenGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider bottomImageProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularOpenGaugeRangeText { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1328,18 +1144,14 @@ interface CLKComplicationTemplateGraphicCircularOpenGaugeRangeText { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithGaugeProvider:leadingTextProvider:trailingTextProvider:centerTextProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider leadingTextProvider, CLKTextProvider trailingTextProvider, CLKTextProvider centerTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:leadingTextProvider:trailingTextProvider:centerTextProvider:")] CLKComplicationTemplateGraphicCircularOpenGaugeRangeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider leadingTextProvider, CLKTextProvider trailingTextProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1351,35 +1163,27 @@ interface CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText { [Export ("centerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider CenterTextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithGaugeProvider:bottomTextProvider:centerTextProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider bottomTextProvider, CLKTextProvider centerTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:bottomTextProvider:centerTextProvider:")] CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider bottomTextProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicCornerCircularImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithImageProvider:")] NativeHandle Constructor (CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithImageProvider:")] CLKComplicationTemplateGraphicCornerCircularImage Create (CLKFullColorImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicCornerGaugeImage { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1394,27 +1198,21 @@ interface CLKComplicationTemplateGraphicCornerGaugeImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithGaugeProvider:imageProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Export ("initWithGaugeProvider:leadingTextProvider:trailingTextProvider:imageProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:imageProvider:")] CLKComplicationTemplateGraphicCornerGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:leadingTextProvider:trailingTextProvider:imageProvider:")] CLKComplicationTemplateGraphicCornerGaugeImage Create (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKFullColorImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicCornerGaugeText { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1429,27 +1227,21 @@ interface CLKComplicationTemplateGraphicCornerGaugeText { [Export ("outerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider OuterTextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithGaugeProvider:outerTextProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, CLKTextProvider outerTextProvider); - [Watch (7, 0)] [Export ("initWithGaugeProvider:leadingTextProvider:trailingTextProvider:outerTextProvider:")] NativeHandle Constructor (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKTextProvider outerTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:outerTextProvider:")] CLKComplicationTemplateGraphicCornerGaugeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider outerTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithGaugeProvider:leadingTextProvider:trailingTextProvider:outerTextProvider:")] CLKComplicationTemplateGraphicCornerGaugeText Create (CLKGaugeProvider gaugeProvider, [NullAllowed] CLKTextProvider leadingTextProvider, [NullAllowed] CLKTextProvider trailingTextProvider, CLKTextProvider outerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicCornerStackText { [Export ("innerTextProvider", ArgumentSemantic.Copy)] @@ -1458,18 +1250,14 @@ interface CLKComplicationTemplateGraphicCornerStackText { [Export ("outerTextProvider", ArgumentSemantic.Copy)] CLKTextProvider OuterTextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithInnerTextProvider:outerTextProvider:")] NativeHandle Constructor (CLKTextProvider innerTextProvider, CLKTextProvider outerTextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithInnerTextProvider:outerTextProvider:")] CLKComplicationTemplateGraphicCornerStackText Create (CLKTextProvider innerTextProvider, CLKTextProvider outerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicCornerTextImage { [Export ("textProvider", ArgumentSemantic.Copy)] @@ -1478,18 +1266,14 @@ interface CLKComplicationTemplateGraphicCornerTextImage { [Export ("imageProvider", ArgumentSemantic.Copy)] CLKFullColorImageProvider ImageProvider { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:imageProvider:")] NativeHandle Constructor (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:imageProvider:")] CLKComplicationTemplateGraphicCornerTextImage Create (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicRectangularLargeImage { [Export ("imageProvider", ArgumentSemantic.Copy)] @@ -1498,18 +1282,14 @@ interface CLKComplicationTemplateGraphicRectangularLargeImage { [Export ("textProvider", ArgumentSemantic.Copy)] CLKTextProvider TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithTextProvider:imageProvider:")] NativeHandle Constructor (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); - [Watch (7, 0)] [Static] [Export ("templateWithTextProvider:imageProvider:")] CLKComplicationTemplateGraphicRectangularLargeImage Create (CLKTextProvider textProvider, CLKFullColorImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicRectangularStandardBody { [NullAllowed, Export ("headerImageProvider", ArgumentSemantic.Copy)] @@ -1524,45 +1304,35 @@ interface CLKComplicationTemplateGraphicRectangularStandardBody { [NullAllowed, Export ("body2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Body2TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithHeaderTextProvider:body1TextProvider:")] NativeHandle Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Export ("initWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] NativeHandle Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); - [Watch (7, 0)] [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] NativeHandle Constructor ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] NativeHandle Constructor ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderTextProvider:body1TextProvider:")] CLKComplicationTemplateGraphicRectangularStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderTextProvider:body1TextProvider:body2TextProvider:")] CLKComplicationTemplateGraphicRectangularStandardBody Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:")] CLKComplicationTemplateGraphicRectangularStandardBody Create ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:")] CLKComplicationTemplateGraphicRectangularStandardBody Create ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, [NullAllowed] CLKTextProvider body2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicRectangularTextGauge { [NullAllowed, Export ("headerImageProvider", ArgumentSemantic.Copy)] @@ -1577,27 +1347,21 @@ interface CLKComplicationTemplateGraphicRectangularTextGauge { [Export ("gaugeProvider", ArgumentSemantic.Copy)] CLKGaugeProvider GaugeProvider { get; set; } - [Watch (7, 0)] [Export ("initWithHeaderTextProvider:body1TextProvider:gaugeProvider:")] NativeHandle Constructor (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); - [Watch (7, 0)] [Export ("initWithHeaderImageProvider:headerTextProvider:body1TextProvider:gaugeProvider:")] NativeHandle Constructor ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderTextProvider:body1TextProvider:gaugeProvider:")] CLKComplicationTemplateGraphicRectangularTextGauge Create (CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); - [Watch (7, 0)] [Static] [Export ("templateWithHeaderImageProvider:headerTextProvider:body1TextProvider:gaugeProvider:")] CLKComplicationTemplateGraphicRectangularTextGauge Create ([NullAllowed] CLKFullColorImageProvider headerImageProvider, CLKTextProvider headerTextProvider, CLKTextProvider body1TextProvider, CLKGaugeProvider gaugeProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLKFullColorImageProvider : NSCopying { @@ -1605,7 +1369,6 @@ interface CLKFullColorImageProvider : NSCopying { [Export ("providerWithFullColorImage:")] CLKFullColorImageProvider Create (UIImage image); - [Watch (6, 0)] [Static] [Export ("providerWithFullColorImage:tintedImageProvider:")] CLKFullColorImageProvider Create (UIImage image, [NullAllowed] CLKImageProvider tintedImageProvider); @@ -1613,28 +1376,22 @@ interface CLKFullColorImageProvider : NSCopying { [Export ("image", ArgumentSemantic.Retain)] UIImage Image { get; set; } - [Watch (6, 0)] [NullAllowed, Export ("tintedImageProvider", ArgumentSemantic.Retain)] CLKImageProvider TintedImageProvider { get; set; } [NullAllowed, Export ("accessibilityLabel", ArgumentSemantic.Retain)] string AccessibilityLabel { get; set; } - [Watch (7, 0)] [Export ("init")] NativeHandle Constructor (); - [Watch (7, 0)] [Export ("initWithFullColorImage:")] NativeHandle Constructor (UIImage fullColorImage); - [Watch (7, 0)] [Export ("initWithFullColorImage:tintedImageProvider:")] NativeHandle Constructor (UIImage fullColorImage, [NullAllowed] CLKImageProvider tintedImageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (NSObject))] [Abstract] // An abstract superclass that... [DisableDefaultCtor] @@ -1649,13 +1406,10 @@ interface CLKGaugeProvider : NSCopying { [BindAs (typeof (float []))] // between 0.0 and 1.0 NSNumber [] GaugeColorLocations { get; } - [Watch (5, 2)] [NullAllowed, Export ("accessibilityLabel")] string AccessibilityLabel { get; set; } } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKGaugeProvider))] [DisableDefaultCtor] interface CLKSimpleGaugeProvider { @@ -1674,8 +1428,6 @@ interface CLKSimpleGaugeProvider { float FillFractionEmpty { get; } } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (5, 0)] [BaseType (typeof (CLKGaugeProvider))] [DisableDefaultCtor] interface CLKTimeIntervalGaugeProvider { @@ -1700,8 +1452,6 @@ interface CLKTimeIntervalGaugeProvider { float EndFillFraction { get; } } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (6, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularStackText { @@ -1711,18 +1461,14 @@ interface CLKComplicationTemplateGraphicCircularStackText { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithLine1TextProvider:line2TextProvider:")] NativeHandle Constructor (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1TextProvider:line2TextProvider:")] CLKComplicationTemplateGraphicCircularStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (6, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicCircular))] interface CLKComplicationTemplateGraphicCircularStackImage { @@ -1732,17 +1478,15 @@ interface CLKComplicationTemplateGraphicCircularStackImage { [Export ("line2TextProvider", ArgumentSemantic.Copy)] CLKTextProvider Line2TextProvider { get; set; } - [Watch (7, 0)] [Export ("initWithLine1ImageProvider:line2TextProvider:")] NativeHandle Constructor (CLKFullColorImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); - [Watch (7, 0)] [Static] [Export ("templateWithLine1ImageProvider:line2TextProvider:")] CLKComplicationTemplateGraphicCircularStackImage Create (CLKFullColorImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [BaseType (typeof (NSObject))] interface CLKWatchFaceLibrary { [Async] @@ -1750,8 +1494,6 @@ interface CLKWatchFaceLibrary { void AddWatchFace (NSUrl fileUrl, Action handler); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicRectangularFullImage : NSSecureCoding { [Export ("imageProvider", ArgumentSemantic.Copy)] @@ -1766,13 +1508,10 @@ interface CLKComplicationTemplateGraphicRectangularFullImage : NSSecureCoding { } [Advice ("This class is an abstract super class in the runtime. Do use one of its children.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplate))] interface CLKComplicationTemplateGraphicExtraLargeCircular : NSSecureCoding { } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularStackText { [Export ("line1TextProvider", ArgumentSemantic.Copy)] @@ -1789,8 +1528,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularStackText { CLKComplicationTemplateGraphicExtraLargeCircularStackText Create (CLKTextProvider line1TextProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularStackImage { [Export ("line1ImageProvider", ArgumentSemantic.Copy)] @@ -1807,8 +1544,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularStackImage { CLKComplicationTemplateGraphicExtraLargeCircularStackImage Create (CLKFullColorImageProvider line1ImageProvider, CLKTextProvider line2TextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeSimpleText { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1828,8 +1563,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeSimpleText { CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeSimpleText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider bottomTextProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeRangeText { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1852,8 +1585,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeRangeText { CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeRangeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider leadingTextProvider, CLKTextProvider trailingTextProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeImage { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1873,8 +1604,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeImage { CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider bottomImageProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularImage { [Export ("imageProvider", ArgumentSemantic.Copy)] @@ -1888,8 +1617,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularImage { CLKComplicationTemplateGraphicExtraLargeCircularImage Create (CLKFullColorImageProvider imageProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeText { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1906,8 +1633,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeText { CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeText Create (CLKGaugeProvider gaugeProvider, CLKTextProvider centerTextProvider); } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] - [Watch (7, 0)] [BaseType (typeof (CLKComplicationTemplateGraphicExtraLargeCircular))] interface CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeImage { [Export ("gaugeProvider", ArgumentSemantic.Copy)] @@ -1924,7 +1649,6 @@ interface CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeImage { CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeImage Create (CLKGaugeProvider gaugeProvider, CLKFullColorImageProvider imageProvider); } - [Watch (7, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLKComplicationDescriptor : NSCopying, NSSecureCoding { @@ -1944,24 +1668,21 @@ interface CLKComplicationDescriptor : NSCopying, NSSecureCoding { [NullAllowed, Export ("userActivity")] NSUserActivity UserActivity { get; } - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("initWithIdentifier:displayName:supportedFamilies:")] NativeHandle Constructor (string identifier, string displayName, [BindAs (typeof (CLKComplicationFamily []))] NSNumber [] supportedFamilies); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("initWithIdentifier:displayName:supportedFamilies:userInfo:")] NativeHandle Constructor (string identifier, string displayName, [BindAs (typeof (CLKComplicationFamily []))] NSNumber [] supportedFamilies, NSDictionary userInfo); - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use WidgetKit instead.")] [Export ("initWithIdentifier:displayName:supportedFamilies:userActivity:")] NativeHandle Constructor (string identifier, string displayName, [BindAs (typeof (CLKComplicationFamily []))] NSNumber [] supportedFamilies, NSUserActivity userActivity); } - [Watch (9, 0), NoiOS] + [NoiOS] [BaseType (typeof (NSObject))] interface CLKComplicationWidgetMigrationConfiguration : NSCopying { } - [Watch (9, 0), NoiOS] + [NoiOS] [Protocol] [BaseType (typeof (NSObject))] interface CLKComplicationWidgetMigrator { @@ -1970,7 +1691,7 @@ interface CLKComplicationWidgetMigrator { void GetWidgetConfiguration (CLKComplicationDescriptor complicationDescriptor, Action completionHandler); } - [Watch (9, 0), NoiOS] + [NoiOS] [BaseType (typeof (CLKComplicationWidgetMigrationConfiguration))] [DisableDefaultCtor] interface CLKComplicationIntentWidgetMigrationConfiguration { @@ -1995,7 +1716,7 @@ interface CLKComplicationIntentWidgetMigrationConfiguration { } - [Watch (9, 0), NoiOS] + [NoiOS] [BaseType (typeof (CLKComplicationWidgetMigrationConfiguration))] [DisableDefaultCtor] interface CLKComplicationStaticWidgetMigrationConfiguration { diff --git a/src/cloudkit.cs b/src/cloudkit.cs index 0488be7e6acd..9a36cb4bc4af 100644 --- a/src/cloudkit.cs +++ b/src/cloudkit.cs @@ -79,7 +79,6 @@ interface CKUserIdentity : NSSecureCoding, NSCopying { [NoTV] [MacCatalyst (13, 1)] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] [Deprecated (PlatformName.iOS, 18, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Please read Apple's document about 'Sharing CloudKit Data with Other iCloud Users'.")] @@ -106,7 +105,6 @@ interface CKShareMetadata : NSCopying, NSSecureCoding { [Export ("share", ArgumentSemantic.Strong)] CKShare Share { get; } - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'HierarchicalRootRecordId' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'HierarchicalRootRecordId' instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'HierarchicalRootRecordId' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'HierarchicalRootRecordId' instead.")] @@ -114,12 +112,10 @@ interface CKShareMetadata : NSCopying, NSSecureCoding { [Export ("rootRecordID", ArgumentSemantic.Copy)] CKRecordID RootRecordID { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("participantRole", ArgumentSemantic.Assign)] CKShareParticipantRole ParticipantRole { get; } - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ParticipantRole' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ParticipantRole' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ParticipantRole' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ParticipantRole' instead.")] @@ -139,7 +135,7 @@ interface CKShareMetadata : NSCopying, NSSecureCoding { [NullAllowed, Export ("rootRecord", ArgumentSemantic.Strong)] CKRecord RootRecord { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("hierarchicalRootRecordID", ArgumentSemantic.Copy)] CKRecordID HierarchicalRootRecordId { get; } } @@ -155,7 +151,7 @@ interface CKShare { [DesignatedInitializer] NativeHandle Constructor (CKRecord rootRecord, CKRecordID shareID); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithRecordZoneID:")] [DesignatedInitializer] NativeHandle Constructor (CKRecordZoneID recordZoneId); @@ -204,12 +200,10 @@ interface CKShareParticipant : NSSecureCoding, NSCopying { [Export ("userIdentity", ArgumentSemantic.Strong)] CKUserIdentity UserIdentity { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("role", ArgumentSemantic.Assign)] CKShareParticipantRole Role { get; set; } - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'Role' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'Role' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'Role' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Role' instead.")] @@ -233,7 +227,6 @@ interface CKShareParticipant : NSSecureCoding, NSCopying { [BaseType (typeof (NSObject))] interface CKContainer { - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CurrentUserDefaultName' instead.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'CurrentUserDefaultName' instead.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CurrentUserDefaultName' instead.")] @@ -282,7 +275,6 @@ interface CKContainer { [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.TvOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] - [Deprecated (PlatformName.WatchOS, 10, 0)] [Export ("statusForApplicationPermission:completionHandler:")] [Async] void StatusForApplicationPermission (CKApplicationPermissions applicationPermission, Action completionHandler); @@ -291,7 +283,6 @@ interface CKContainer { [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.TvOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] - [Deprecated (PlatformName.WatchOS, 10, 0)] [Export ("requestApplicationPermission:completionHandler:")] [Async] void RequestApplicationPermission (CKApplicationPermissions applicationPermission, Action completionHandler); @@ -303,7 +294,6 @@ interface CKContainer { [Deprecated (PlatformName.MacOSX, 14, 0)] [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] - [Deprecated (PlatformName.WatchOS, 10, 0)] [NoTV] [MacCatalyst (13, 1)] [Export ("discoverAllIdentitiesWithCompletionHandler:")] @@ -314,7 +304,6 @@ interface CKContainer { [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.TvOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] - [Deprecated (PlatformName.WatchOS, 10, 0)] [MacCatalyst (13, 1)] [Export ("discoverUserIdentityWithEmailAddress:completionHandler:")] [Async] @@ -324,7 +313,6 @@ interface CKContainer { [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.TvOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] - [Deprecated (PlatformName.WatchOS, 10, 0)] [MacCatalyst (13, 1)] [Export ("discoverUserIdentityWithPhoneNumber:completionHandler:")] [Async] @@ -334,7 +322,6 @@ interface CKContainer { [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.TvOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] - [Deprecated (PlatformName.WatchOS, 10, 0)] [MacCatalyst (13, 1)] [Export ("discoverUserIdentityWithUserRecordID:completionHandler:")] [Async] @@ -429,25 +416,21 @@ interface CKDatabase { void DeleteRecordZone (CKRecordZoneID zoneId, Action completionHandler); [Export ("fetchSubscriptionWithID:completionHandler:")] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Async] void FetchSubscription (string subscriptionId, Action completionHandler); - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("fetchAllSubscriptionsWithCompletionHandler:")] [Async] void FetchAllSubscriptions (Action completionHandler); - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("saveSubscription:completionHandler:")] [Async] void SaveSubscription (CKSubscription subscription, Action completionHandler); [Export ("deleteSubscriptionWithID:completionHandler:")] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Async] void DeleteSubscription (string subscriptionID, CKDatabaseDeleteSubscriptionHandler completionHandler); @@ -456,7 +439,7 @@ interface CKDatabase { [MacCatalyst (13, 1)] [BaseType (typeof (CKOperation))] [DisableDefaultCtor] -#if NET || WATCH +#if NET [Abstract] // as per docs #endif interface CKDatabaseOperation { @@ -468,7 +451,6 @@ interface CKDatabaseOperation { #if !NET // This type is no longer in the headers. - [NoWatch] [NoTV] [Obsoleted (PlatformName.iOS, 14, 0, message: "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKDiscoverAllUserIdentitiesOperation' instead.")] @@ -489,7 +471,6 @@ interface CKDiscoverAllContactsOperation { [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKUserIdentity' instead.")] [Obsoleted (PlatformName.MacOSX, 10, 16, message: "Use 'CKUserIdentity' instead.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CKUserIdentity' instead.")] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // designated interface CKDiscoveredUserInfo : NSCoding, NSCopying, NSSecureCoding { @@ -523,7 +504,7 @@ interface CKErrorFields { [Field ("CKErrorRetryAfterKey")] NSString ErrorRetryAfterKey { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("CKErrorUserDidResetEncryptedDataKey")] NSString UserDidResetEncryptedDataKey { get; } } @@ -535,14 +516,12 @@ interface CKServerChangeToken : NSCopying, NSSecureCoding { } - [NoWatch] [MacCatalyst (13, 1)] delegate void CKFetchRecordChangesHandler (CKServerChangeToken serverChangeToken, NSData clientChangeTokenData, NSError operationError); [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKFetchRecordZoneChangesOperation' instead.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'CKFetchRecordZoneChangesOperation' instead.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CKFetchRecordZoneChangesOperation' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKFetchRecordZoneChangesOperation' instead.")] [BaseType (typeof (CKDatabaseOperation))] @@ -605,7 +584,7 @@ CKFetchRecordChangesHandler AllChangesReported { [MacCatalyst (13, 1)] delegate void CKFetchRecordZoneChangesFetchCompletedHandler (CKRecordZoneID recordZoneID, CKServerChangeToken serverChangeToken, NSData clientChangeTokenData, bool moreComing, NSError recordZoneError); - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] delegate void CKFetchRecordZoneChangesRecordWasChangedHandler (CKRecordID recordId, CKRecord record, NSError error); [MacCatalyst (13, 1)] @@ -616,7 +595,6 @@ interface CKFetchRecordZoneChangesOperation { [Export ("init")] NativeHandle Constructor (); - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use the overload with the 'NSDictionary' parameter instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use the overload with the 'NSDictionary' parameter instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload with the 'NSDictionary' parameter instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the overload with the 'NSDictionary' parameter instead.")] @@ -624,7 +602,6 @@ interface CKFetchRecordZoneChangesOperation { [Export ("initWithRecordZoneIDs:optionsByRecordZoneID:")] NativeHandle Constructor (CKRecordZoneID [] recordZoneIDs, [NullAllowed] NSDictionary optionsByRecordZoneID); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("initWithRecordZoneIDs:configurationsByRecordZoneID:")] NativeHandle Constructor (CKRecordZoneID [] recordZoneIDs, [NullAllowed] NSDictionary configurationsByRecordZoneID); @@ -633,7 +610,6 @@ interface CKFetchRecordZoneChangesOperation { [Export ("recordZoneIDs", ArgumentSemantic.Copy)] CKRecordZoneID [] RecordZoneIDs { get; set; } - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ConfigurationsByRecordZoneID' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ConfigurationsByRecordZoneID' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ConfigurationsByRecordZoneID' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ConfigurationsByRecordZoneID' instead.")] @@ -641,7 +617,6 @@ interface CKFetchRecordZoneChangesOperation { [NullAllowed, Export ("optionsByRecordZoneID", ArgumentSemantic.Copy)] NSDictionary OptionsByRecordZoneID { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("configurationsByRecordZoneID", ArgumentSemantic.Copy)] NSDictionary ConfigurationsByRecordZoneID { get; set; } @@ -649,7 +624,6 @@ interface CKFetchRecordZoneChangesOperation { [Export ("fetchAllChanges")] bool FetchAllChanges { get; set; } - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'RecordWasChangedHandler' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'RecordWasChangedHandler' instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'RecordWasChangedHandler' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'RecordWasChangedHandler' instead.")] @@ -670,12 +644,11 @@ interface CKFetchRecordZoneChangesOperation { Action ChangesCompleted { get; set; } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("recordWasChangedBlock", ArgumentSemantic.Copy)] CKFetchRecordZoneChangesRecordWasChangedHandler RecordWasChangedHandler { get; set; } } - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'CKFetchRecordZoneChangesConfiguration' instead.")] @@ -693,7 +666,6 @@ interface CKFetchRecordZoneChangesOptions : NSSecureCoding, NSCopying { string [] DesiredKeys { get; set; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CKFetchRecordZoneChangesConfiguration : NSSecureCoding, NSCopying { @@ -712,11 +684,7 @@ interface CKFetchRecordZoneChangesConfiguration : NSSecureCoding, NSCopying { delegate void CKFetchRecordsCompletedHandler (NSDictionary recordsByRecordId, NSError error); [MacCatalyst (13, 1)] -#if WATCH - [DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility -#else [DesignatedDefaultCtor] -#endif [BaseType (typeof (CKDatabaseOperation))] interface CKFetchRecordsOperation { @@ -760,16 +728,12 @@ CKFetchRecordsCompletedHandler Completed { [MacCatalyst (13, 1)] delegate void CKRecordZoneCompleteHandler (NSDictionary recordZonesByZoneId, NSError operationError); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKRecordZonePerRecordZoneCompletionHandler (CKRecordZoneID recordZoneId, CKRecordZone recordZone, NSError error); [MacCatalyst (13, 1)] [BaseType (typeof (CKDatabaseOperation))] -#if WATCH - [DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility -#else [DesignatedDefaultCtor] -#endif interface CKFetchRecordZonesOperation { [Export ("initWithRecordZoneIDs:")] @@ -791,19 +755,17 @@ CKRecordZoneCompleteHandler Completed { CKFetchRecordZonesOperation FetchAllRecordZonesOperation (); [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perRecordZoneCompletionBlock", ArgumentSemantic.Copy)] CKRecordZonePerRecordZoneCompletionHandler PerRecordZoneCompletionHandler { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] delegate void CKFetchSubscriptionsCompleteHandler (NSDictionary subscriptionsBySubscriptionId, NSError operationError); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKFetchSubscriptionsPerSubscriptionCompletionHandler (NSString subscriptionId, CKSubscription subscription, NSError error); - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CKDatabaseOperation))] [DisableDefaultCtor] // designated @@ -832,13 +794,13 @@ CKFetchSubscriptionsCompleteHandler Completed { CKFetchSubscriptionsOperation FetchAllSubscriptionsOperation (); [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perSubscriptionCompletionBlock", ArgumentSemantic.Copy)] CKFetchSubscriptionsPerSubscriptionCompletionHandler PerSubscriptionCompletionHandler { get; set; } } [MacCatalyst (13, 1)] -#if NET || WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it +#if NET // does not work on watchOS, existiong init* does not allow null to be used to fake it [DisableDefaultCtor] #endif [BaseType (typeof (NSSortDescriptor))] @@ -854,18 +816,14 @@ interface CKLocationSortDescriptor : NSSecureCoding { [MacCatalyst (13, 1)] delegate void CKModifyRecordsOperationHandler (CKRecord [] savedRecords, CKRecordID [] deletedRecordIds, NSError operationError); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKModifyRecordsOperationPerRecordSaveHandler (CKRecordID recordId, CKRecord record, NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKModifyRecordsOperationPerRecordDeleteHandler (CKRecordID recordId, NSError error); [MacCatalyst (13, 1)] -#if WATCH - [DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility -#else [DesignatedDefaultCtor] -#endif [BaseType (typeof (CKDatabaseOperation))] interface CKModifyRecordsOperation { @@ -894,7 +852,6 @@ Action PerRecordProgress { set; } - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'PerRecordResultHandler' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'PerRecordResultHandler' instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'PerRecordResultHandler' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'PerRecordResultHandler' instead.")] @@ -917,12 +874,12 @@ CKModifyRecordsOperationHandler Completed { bool Atomic { get; set; } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perRecordSaveBlock", ArgumentSemantic.Copy)] CKModifyRecordsOperationPerRecordSaveHandler PerRecordSaveHandler { get; set; } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perRecordDeleteBlock", ArgumentSemantic.Copy)] CKModifyRecordsOperationPerRecordDeleteHandler PerRecordDeleteHandler { get; set; } @@ -931,18 +888,14 @@ CKModifyRecordsOperationHandler Completed { [MacCatalyst (13, 1)] delegate void CKModifyRecordZonesHandler (CKRecordZone [] savedRecordZones, CKRecordZoneID [] deletedRecordZoneIds, NSError operationError); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKModifyRecordZonesPerRecordZoneSaveHandler (CKRecordZoneID zoneId, CKRecordZone zone, NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKModifyRecordZonesPerRecordZoneDeleteHandler (CKRecordZoneID zoneId, NSError error); [MacCatalyst (13, 1)] -#if WATCH - [DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility -#else [DesignatedDefaultCtor] -#endif [BaseType (typeof (CKDatabaseOperation))] interface CKModifyRecordZonesOperation { @@ -965,12 +918,12 @@ CKModifyRecordZonesHandler Completed { } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perRecordZoneSaveBlock", ArgumentSemantic.Copy)] CKModifyRecordZonesPerRecordZoneSaveHandler PerRecordZoneSaveHandler { get; set; } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perRecordZoneDeleteBlock", ArgumentSemantic.Copy)] CKModifyRecordZonesPerRecordZoneDeleteHandler PerRecordZoneDeleteHandler { get; set; } } @@ -978,13 +931,12 @@ CKModifyRecordZonesHandler Completed { [MacCatalyst (13, 1)] delegate void CKModifySubscriptionsHandler (CKSubscription [] savedSubscriptions, string [] deletedSubscriptionIds, NSError operationError); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKModifySubscriptionsPerSubscriptionSaveHandler (NSString subscriptionId, CKSubscription subscription, NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKModifySubscriptionsPerSubscriptionDeleteHandler (NSString subscriptionId, NSError error); - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CKDatabaseOperation))] [DisableDefaultCtor] // designated @@ -1013,12 +965,12 @@ CKModifySubscriptionsHandler Completed { } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perSubscriptionSaveBlock", ArgumentSemantic.Copy)] CKModifySubscriptionsPerSubscriptionSaveHandler PerSubscriptionSaveHandler { get; set; } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("perSubscriptionDeleteBlock", ArgumentSemantic.Copy)] CKModifySubscriptionsPerSubscriptionDeleteHandler PerSubscriptionDeleteHandler { get; set; } } @@ -1033,7 +985,7 @@ interface CKNotificationID : NSCopying, NSSecureCoding, NSCoding { [MacCatalyst (13, 1)] [DisableDefaultCtor] // NSInvalidArgumentException Reason: CKNotification is not meant for direct instantiation [BaseType (typeof (NSObject))] -#if NET || WATCH +#if NET [Abstract] // as per doc #endif interface CKNotification : NSSecureCoding { @@ -1054,7 +1006,6 @@ interface CKNotification : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use the UserNotifications framework instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use the UserNotifications framework instead.")] [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("alertBody")] @@ -1063,7 +1014,6 @@ interface CKNotification : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use the UserNotifications framework instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use the UserNotifications framework instead.")] [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("alertLocalizationKey")] @@ -1072,7 +1022,6 @@ interface CKNotification : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use the UserNotifications framework instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use the UserNotifications framework instead.")] [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("alertLocalizationArgs", ArgumentSemantic.Copy)] @@ -1081,7 +1030,6 @@ interface CKNotification : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use the UserNotifications framework instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use the UserNotifications framework instead.")] [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("alertActionLocalizationKey")] @@ -1090,7 +1038,6 @@ interface CKNotification : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use the UserNotifications framework instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use the UserNotifications framework instead.")] [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("alertLaunchImage")] @@ -1100,7 +1047,6 @@ interface CKNotification : NSSecureCoding { [Deprecated (PlatformName.iOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.TvOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use the UserNotifications framework instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use the UserNotifications framework instead.")] [MacCatalyst (13, 1)] [NullAllowed, Export ("badge", ArgumentSemantic.Copy)] NSNumber Badge { get; } @@ -1108,7 +1054,6 @@ interface CKNotification : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use the UserNotifications framework instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use the UserNotifications framework instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use the UserNotifications framework instead.")] [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("soundName")] @@ -1158,7 +1103,7 @@ interface CKNotification : NSSecureCoding { [NullAllowed, Export ("subtitleLocalizationArgs", ArgumentSemantic.Copy)] string [] SubtitleLocalizationArgs { get; } - [Watch (7, 0), TV (14, 0), Mac (10, 16), iOS (14, 0)] + [TV (14, 0), Mac (10, 16), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("subscriptionOwnerUserRecordID", ArgumentSemantic.Copy)] CKRecordID SubscriptionOwnerUserRecordId { get; } @@ -1234,7 +1179,7 @@ interface CKOperationConfiguration : NSSecureCoding, NSCopying { [MacCatalyst (13, 1)] [BaseType (typeof (NSOperation))] [DisableDefaultCtor] -#if NET || WATCH +#if NET [Abstract] // as per docs #endif interface CKOperation { @@ -1251,7 +1196,6 @@ interface CKOperation { [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CKOperationConfiguration' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKOperationConfiguration' instead.")] [NullAllowed, Export ("container", ArgumentSemantic.Retain)] @@ -1259,7 +1203,6 @@ interface CKOperation { [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CKOperationConfiguration' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKOperationConfiguration' instead.")] [Export ("allowsCellularAccess", ArgumentSemantic.UnsafeUnretained)] @@ -1272,7 +1215,6 @@ interface CKOperation { [Export ("longLived")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CKOperationConfiguration' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKOperationConfiguration' instead.")] @@ -1281,7 +1223,6 @@ interface CKOperation { [Export ("timeoutIntervalForRequest")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CKOperationConfiguration' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKOperationConfiguration' instead.")] @@ -1290,7 +1231,6 @@ interface CKOperation { [Export ("timeoutIntervalForResource")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CKOperationConfiguration' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CKOperationConfiguration' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CKOperationConfiguration' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CKOperationConfiguration' instead.")] @@ -1355,16 +1295,12 @@ interface CKQuery : NSSecureCoding, NSCopying { NSSortDescriptor [] SortDescriptors { get; set; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void CKQueryOperationRecordMatchedHandler (CKRecordID recordId, CKRecord record, NSError error); [MacCatalyst (13, 1)] [BaseType (typeof (CKDatabaseOperation))] -#if WATCH - [DisableDefaultCtor] // does not work on watchOS, working stub provided to ease source compatibility -#else [DesignatedDefaultCtor] -#endif interface CKQueryOperation { [Field ("CKQueryOperationMaximumResults")] @@ -1395,7 +1331,6 @@ interface CKQueryOperation { [NullAllowed] string [] DesiredKeys { get; set; } - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'RecordMatchedHandler' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'RecordMatchedHandler' instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'RecordMatchedHandler' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'RecordMatchedHandler' instead.")] @@ -1415,7 +1350,7 @@ Action Completed { } [NullAllowed] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("recordMatchedBlock", ArgumentSemantic.Copy)] CKQueryOperationRecordMatchedHandler RecordMatchedHandler { get; set; } } @@ -1470,7 +1405,7 @@ interface CKRecord : NSSecureCoding, NSCopying { [Field ("CKRecordTypeShare")] NSString TypeShare { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("CKRecordNameZoneWideShare")] NSString NameZoneWideShare { get; } @@ -1569,7 +1504,7 @@ interface CKRecordID : NSSecureCoding, NSCopying { } [MacCatalyst (13, 1)] -#if NET || WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it +#if NET // does not work on watchOS, existiong init* does not allow null to be used to fake it [DisableDefaultCtor] #endif [BaseType (typeof (NSObject))] @@ -1594,7 +1529,7 @@ interface CKRecordZone : NSSecureCoding, NSCopying { [Export ("defaultRecordZone")] CKRecordZone DefaultRecordZone (); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("share", ArgumentSemantic.Copy)] CKReference Share { get; } } @@ -1634,7 +1569,6 @@ interface CKReference : NSSecureCoding, NSCopying, CKRecordValue { CKRecordID RecordId { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (CKSubscription))] @@ -1643,7 +1577,6 @@ interface CKQuerySubscription : NSSecureCoding, NSCopying { [Deprecated (PlatformName.iOS, 10, 0)] [Deprecated (PlatformName.TvOS, 10, 0)] [Deprecated (PlatformName.MacCatalyst, 10, 0)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Export ("initWithRecordType:predicate:options:")] NativeHandle Constructor (string recordType, NSPredicate predicate, CKQuerySubscriptionOptions querySubscriptionOptions); @@ -1664,7 +1597,6 @@ interface CKQuerySubscription : NSSecureCoding, NSCopying { CKQuerySubscriptionOptions SubscriptionOptions { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (CKSubscription))] @@ -1674,7 +1606,6 @@ interface CKRecordZoneSubscription : NSSecureCoding, NSCopying { [Deprecated (PlatformName.iOS, 10, 0)] [Deprecated (PlatformName.TvOS, 10, 0)] [Deprecated (PlatformName.MacCatalyst, 10, 0)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Export ("initWithZoneID:")] NativeHandle Constructor (CKRecordZoneID zoneID); @@ -1690,7 +1621,6 @@ interface CKRecordZoneSubscription : NSSecureCoding, NSCopying { string RecordType { get; set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (CKSubscription))] @@ -1700,7 +1630,6 @@ interface CKDatabaseSubscription : NSSecureCoding, NSCopying { [Deprecated (PlatformName.iOS, 10, 0)] [Deprecated (PlatformName.TvOS, 10, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Export ("init")] NativeHandle Constructor (); @@ -1712,7 +1641,6 @@ interface CKDatabaseSubscription : NSSecureCoding, NSCopying { string RecordType { get; set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] // objc_exception_throw on [CKSubscription init] [BaseType (typeof (NSObject))] @@ -1720,14 +1648,12 @@ interface CKSubscription : NSSecureCoding, NSCopying { #if !NET // This constructor does not exist in the headers (anymore?) - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CKQuerySubscription'.")] [Export ("initWithRecordType:predicate:options:")] NativeHandle Constructor (string recordType, NSPredicate predicate, CKSubscriptionOptions subscriptionOptions); // This constructor does not exist in the headers (anymore?) - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CKQuerySubscription'.")] [Export ("initWithRecordType:predicate:subscriptionID:options:")] @@ -1740,7 +1666,6 @@ interface CKSubscription : NSSecureCoding, NSCopying { [Export ("subscriptionType", ArgumentSemantic.UnsafeUnretained)] CKSubscriptionType SubscriptionType { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CKQuerySubscription'.")] @@ -1750,7 +1675,6 @@ interface CKSubscription : NSSecureCoding, NSCopying { [Export ("recordType")] string RecordType { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'CKQuerySubscription'.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CKQuerySubscription'.")] @@ -1765,7 +1689,6 @@ interface CKSubscription : NSSecureCoding, NSCopying { [Export ("notificationInfo", ArgumentSemantic.Copy)] CKNotificationInfo NotificationInfo { get; set; } - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'CKRecordZoneSubscription'.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Use 'CKRecordZoneSubscription'.")] [Deprecated (PlatformName.MacOSX, 10, 12, message: "Use 'CKRecordZoneSubscription'.")] @@ -1776,7 +1699,6 @@ interface CKSubscription : NSSecureCoding, NSCopying { CKRecordZoneID ZoneID { get; set; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CKNotificationInfo : NSSecureCoding, NSCopying, NSCoding { @@ -1905,7 +1827,6 @@ interface CKFetchWebAuthTokenOperation { [Obsoleted (PlatformName.iOS, 17, 0)] [Obsoleted (PlatformName.TvOS, 17, 0)] [Obsoleted (PlatformName.MacCatalyst, 17, 0)] - [Obsoleted (PlatformName.WatchOS, 10, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CKOperation))] [DisableDefaultCtor] // designated @@ -1933,7 +1854,6 @@ interface CKDiscoverUserIdentitiesOperation { [Deprecated (PlatformName.MacOSX, 14, 0)] [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] - [Deprecated (PlatformName.WatchOS, 10, 0)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (CKOperation))] @@ -1950,7 +1870,7 @@ interface CKDiscoverAllUserIdentitiesOperation { Action Completed { get; set; } } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] delegate void CKFetchShareParticipantsOperationPerShareParticipantCompletionHandler (CKUserIdentityLookupInfo identityLookupInfo, CKShareParticipant participant, NSError error); [MacCatalyst (13, 1)] @@ -1968,7 +1888,6 @@ interface CKFetchShareParticipantsOperation { [Export ("userIdentityLookupInfos", ArgumentSemantic.Copy)] CKUserIdentityLookupInfo [] UserIdentityLookupInfos { get; set; } - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'PerShareParticipantCompletionHandler' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'PerShareParticipantCompletionHandler' instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'PerShareParticipantCompletionHandler' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'PerShareParticipantCompletionHandler' instead.")] @@ -1980,7 +1899,7 @@ interface CKFetchShareParticipantsOperation { Action Completed { get; set; } [NullAllowed] - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("perShareParticipantCompletionBlock", ArgumentSemantic.Copy)] CKFetchShareParticipantsOperationPerShareParticipantCompletionHandler PerShareParticipantCompletionBlock { get; set; } } @@ -2081,12 +2000,12 @@ interface CKFetchDatabaseChangesOperation { [NullAllowed, Export ("fetchDatabaseChangesCompletionBlock", ArgumentSemantic.Copy)] CKFetchDatabaseChangesCompletionHandler ChangesCompleted { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("recordZoneWithIDWasDeletedDueToUserEncryptedDataResetBlock", ArgumentSemantic.Copy)] Action RecordZoneWithIdWasDeletedDueToUserEncryptedDataReset { get; set; } } - [NoTV, NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKAllowedSharingOptions : NSSecureCoding, NSCopying { @@ -2104,7 +2023,7 @@ interface CKAllowedSharingOptions : NSSecureCoding, NSCopying { CKAllowedSharingOptions StandardOptions { get; } } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSystemSharingUIObserver { @@ -2119,7 +2038,7 @@ interface CKSystemSharingUIObserver { Action SystemSharingUIDidStopSharingHandler { get; set; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CKSyncEngineSendChangesScope : NSCopying { [NullAllowed, Export ("zoneIDs", ArgumentSemantic.Copy)] @@ -2149,7 +2068,7 @@ interface CKSyncEngineSendChangesScope : NSCopying { bool ContainsPendingRecordZoneChange (CKSyncEnginePendingRecordZoneChange pendingRecordZoneChange); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CKSyncEngineFetchChangesScope : NSCopying { [NullAllowed, Export ("zoneIDs", ArgumentSemantic.Copy)] @@ -2166,12 +2085,12 @@ interface CKSyncEngineFetchChangesScope : NSCopying { [Export ("initWithExcludedZoneIDs:")] NativeHandle _InitWithExcludedZoneIds (NSSet zoneIds); - [Watch (10, 2), TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] + [TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] [Export ("containsZoneID:")] bool Contains (CKRecordZoneID zoneId); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineFetchChangesContext { @@ -2182,7 +2101,7 @@ interface CKSyncEngineFetchChangesContext { CKSyncEngineFetchChangesOptions Options { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineEvent { @@ -2226,7 +2145,7 @@ interface CKSyncEngineEvent { CKSyncEngineDidSendChangesEvent DidSendChangesEvent { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineAccountChangeEvent { [Export ("changeType", ArgumentSemantic.Assign)] @@ -2239,12 +2158,12 @@ interface CKSyncEngineAccountChangeEvent { CKRecordID CurrentUser { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineStateSerialization : NSSecureCoding { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineConfiguration { @@ -2271,21 +2190,21 @@ interface CKSyncEngineConfiguration { string SubscriptionId { get; set; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineWillSendChangesEvent { [Export ("context", ArgumentSemantic.Strong)] CKSyncEngineSendChangesContext Context { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineWillFetchRecordZoneChangesEvent { [Export ("zoneID", ArgumentSemantic.Copy)] CKRecordZoneID ZoneId { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineSendChangesContext { @@ -2298,7 +2217,7 @@ interface CKSyncEngineSendChangesContext { interface ICKSyncEngineDelegate { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -2319,14 +2238,14 @@ interface CKSyncEngineDelegate { CKSyncEngineFetchChangesOptions SyncEngine (CKSyncEngine syncEngine, CKSyncEngineFetchChangesContext context); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineDidSendChangesEvent { [Export ("context", ArgumentSemantic.Strong)] CKSyncEngineSendChangesContext Context { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEnginePendingRecordZoneChange { @@ -2341,7 +2260,7 @@ interface CKSyncEnginePendingRecordZoneChange { CKSyncEnginePendingRecordZoneChangeType Type { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CKSyncEngineFetchChangesOptions : NSCopying { [Export ("scope", ArgumentSemantic.Copy)] @@ -2357,14 +2276,14 @@ interface CKSyncEngineFetchChangesOptions : NSCopying { NativeHandle Constructor ([NullAllowed] CKSyncEngineFetchChangesScope scope); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineStateUpdateEvent { [Export ("stateSerialization", ArgumentSemantic.Copy)] CKSyncEngineStateSerialization StateSerialization { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineFetchedDatabaseChangesEvent { [Export ("modifications", ArgumentSemantic.Copy)] @@ -2374,7 +2293,7 @@ interface CKSyncEngineFetchedDatabaseChangesEvent { CKSyncEngineFetchedZoneDeletion [] Deletions { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineFetchedRecordZoneChangesEvent { [Export ("modifications", ArgumentSemantic.Copy)] @@ -2384,7 +2303,7 @@ interface CKSyncEngineFetchedRecordZoneChangesEvent { CKSyncEngineFetchedRecordDeletion [] Deletions { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineSentDatabaseChangesEvent { [Export ("savedZones", ArgumentSemantic.Copy)] @@ -2400,17 +2319,17 @@ interface CKSyncEngineSentDatabaseChangesEvent { NSDictionary FailedZoneDeletes { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineWillFetchChangesEvent { - [Watch (10, 2), TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] + [TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] [Export ("context", ArgumentSemantic.Strong)] CKSyncEngineFetchChangesContext Context { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineSentRecordZoneChangesEvent { [Export ("savedRecords", ArgumentSemantic.Copy)] @@ -2426,7 +2345,7 @@ interface CKSyncEngineSentRecordZoneChangesEvent { NSDictionary FailedRecordDeletes { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CKSyncEngineSendChangesOptions : NSCopying { [Export ("scope", ArgumentSemantic.Copy)] @@ -2439,7 +2358,7 @@ interface CKSyncEngineSendChangesOptions : NSCopying { NativeHandle Constructor ([NullAllowed] CKSyncEngineSendChangesScope scope); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineFailedRecordSave { @@ -2450,7 +2369,7 @@ interface CKSyncEngineFailedRecordSave { NSError Error { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngine { @@ -2484,17 +2403,17 @@ interface CKSyncEngine { void CancelOperations ([NullAllowed] Action completionHandler); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineDidFetchChangesEvent { - [Watch (10, 2), TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] + [TV (17, 2), MacCatalyst (17, 2), Mac (14, 2), iOS (17, 2)] [Export ("context", ArgumentSemantic.Strong)] CKSyncEngineFetchChangesContext Context { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEngineEvent))] interface CKSyncEngineDidFetchRecordZoneChangesEvent { [Export ("zoneID", ArgumentSemantic.Copy)] @@ -2504,7 +2423,7 @@ interface CKSyncEngineDidFetchRecordZoneChangesEvent { NSError Error { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineRecordZoneChangeBatch { @@ -2524,7 +2443,7 @@ interface CKSyncEngineRecordZoneChangeBatch { bool AtomicByZone { get; set; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineFetchedZoneDeletion { @@ -2535,7 +2454,7 @@ interface CKSyncEngineFetchedZoneDeletion { CKSyncEngineZoneDeletionReason Reason { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineFetchedRecordDeletion { @@ -2546,7 +2465,7 @@ interface CKSyncEngineFetchedRecordDeletion { string RecordType { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineFailedZoneSave { @@ -2557,7 +2476,7 @@ interface CKSyncEngineFailedZoneSave { NSError Error { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEngineState { @@ -2586,7 +2505,7 @@ interface CKSyncEngineState { void RemovePendingDatabaseChanges (CKSyncEnginePendingDatabaseChange [] changes); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CKSyncEnginePendingDatabaseChange { @@ -2597,7 +2516,7 @@ interface CKSyncEnginePendingDatabaseChange { CKSyncEnginePendingDatabaseChangeType Type { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEnginePendingDatabaseChange))] interface CKSyncEnginePendingZoneSave { [Export ("initWithZone:")] @@ -2607,7 +2526,7 @@ interface CKSyncEnginePendingZoneSave { CKRecordZone Zone { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CKSyncEnginePendingDatabaseChange))] interface CKSyncEnginePendingZoneDelete { [Export ("initWithZoneID:")] diff --git a/src/contacts.cs b/src/contacts.cs index c87a195a7f36..eb0e8f89a5f2 100644 --- a/src/contacts.cs +++ b/src/contacts.cs @@ -369,13 +369,13 @@ interface CNContactFormatter : NSSecureCoding { NSString ContactPropertyAttribute { get; } [Static] - [iOS (14, 0), Watch (7, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("descriptorForRequiredKeysForDelimiter")] ICNKeyDescriptor RequiredKeysForDelimiter { get; } [Static] - [iOS (14, 0), Watch (7, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("descriptorForRequiredKeysForNameOrder")] ICNKeyDescriptor RequiredKeysForNameOrder { get; } @@ -472,1017 +472,1017 @@ interface CNLabelContactRelationKey { [Field ("CNLabelContactRelationDaughter")] NSString Daughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationColleague")] NSString Colleague { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationTeacher")] NSString Teacher { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSibling")] NSString Sibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerSibling")] NSString YoungerSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderSibling")] NSString ElderSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerSister")] NSString YoungerSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungestSister")] NSString YoungestSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderSister")] NSString ElderSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationEldestSister")] NSString EldestSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerBrother")] NSString YoungerBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungestBrother")] NSString YoungestBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderBrother")] NSString ElderBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationEldestBrother")] NSString EldestBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationMaleFriend")] NSString MaleFriend { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationFemaleFriend")] NSString FemaleFriend { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationWife")] NSString Wife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationHusband")] NSString Husband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationMalePartner")] NSString MalePartner { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationFemalePartner")] NSString FemalePartner { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGirlfriendOrBoyfriend")] NSString GirlfriendOrBoyfriend { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGirlfriend")] NSString Girlfriend { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBoyfriend")] NSString Boyfriend { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandparent")] NSString Grandparent { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandmother")] NSString Grandmother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandmotherMothersMother")] NSString GrandmotherMothersMother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandmotherFathersMother")] NSString GrandmotherFathersMother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandfather")] NSString Grandfather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandfatherMothersFather")] NSString GrandfatherMothersFather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandfatherFathersFather")] NSString GrandfatherFathersFather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGreatGrandparent")] NSString GreatGrandparent { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGreatGrandmother")] NSString GreatGrandmother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGreatGrandfather")] NSString GreatGrandfather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandchild")] NSString Grandchild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGranddaughter")] NSString Granddaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGranddaughterDaughtersDaughter")] NSString GranddaughterDaughtersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGranddaughterSonsDaughter")] NSString GranddaughterSonsDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandson")] NSString Grandson { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandsonDaughtersSon")] NSString GrandsonDaughtersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandsonSonsSon")] NSString GrandsonSonsSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGreatGrandchild")] NSString GreatGrandchild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGreatGranddaughter")] NSString GreatGranddaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGreatGrandson")] NSString GreatGrandson { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentInLaw")] NSString ParentInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationMotherInLaw")] NSString MotherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationMotherInLawWifesMother")] NSString MotherInLawWifesMother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationMotherInLawHusbandsMother")] NSString MotherInLawHusbandsMother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationFatherInLaw")] NSString FatherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationFatherInLawWifesFather")] NSString FatherInLawWifesFather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationFatherInLawHusbandsFather")] NSString FatherInLawHusbandsFather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCoParentInLaw")] NSString CoParentInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCoMotherInLaw")] NSString CoMotherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCoFatherInLaw")] NSString CoFatherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSiblingInLaw")] NSString SiblingInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerSiblingInLaw")] NSString YoungerSiblingInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderSiblingInLaw")] NSString ElderSiblingInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLaw")] NSString SisterInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerSisterInLaw")] NSString YoungerSisterInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderSisterInLaw")] NSString ElderSisterInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawSpousesSister")] NSString SisterInLawSpousesSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawWifesSister")] NSString SisterInLawWifesSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawHusbandsSister")] NSString SisterInLawHusbandsSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawBrothersWife")] NSString SisterInLawBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawYoungerBrothersWife")] NSString SisterInLawYoungerBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawElderBrothersWife")] NSString SisterInLawElderBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLaw")] NSString BrotherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerBrotherInLaw")] NSString YoungerBrotherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderBrotherInLaw")] NSString ElderBrotherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawSpousesBrother")] NSString BrotherInLawSpousesBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawHusbandsBrother")] NSString BrotherInLawHusbandsBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawWifesBrother")] NSString BrotherInLawWifesBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawSistersHusband")] NSString BrotherInLawSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawYoungerSistersHusband")] NSString BrotherInLawYoungerSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawElderSistersHusband")] NSString BrotherInLawElderSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawWifesBrothersWife")] NSString SisterInLawWifesBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSisterInLawHusbandsBrothersWife")] NSString SisterInLawHusbandsBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawWifesSistersHusband")] NSString BrotherInLawWifesSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationBrotherInLawHusbandsSistersHusband")] NSString BrotherInLawHusbandsSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCoSiblingInLaw")] NSString CoSiblingInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCoSisterInLaw")] NSString CoSisterInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCoBrotherInLaw")] NSString CoBrotherInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationChildInLaw")] NSString ChildInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationDaughterInLaw")] NSString DaughterInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSonInLaw")] NSString SonInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousin")] NSString Cousin { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousin")] NSString YoungerCousin { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousin")] NSString ElderCousin { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationMaleCousin")] NSString MaleCousin { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationFemaleCousin")] NSString FemaleCousin { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinParentsSiblingsChild")] NSString CousinParentsSiblingsChild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinParentsSiblingsSon")] NSString CousinParentsSiblingsSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinParentsSiblingsSon")] NSString YoungerCousinParentsSiblingsSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinParentsSiblingsSon")] NSString ElderCousinParentsSiblingsSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinParentsSiblingsDaughter")] NSString CousinParentsSiblingsDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinParentsSiblingsDaughter")] NSString YoungerCousinParentsSiblingsDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinParentsSiblingsDaughter")] NSString ElderCousinParentsSiblingsDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinMothersSistersDaughter")] NSString CousinMothersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinMothersSistersDaughter")] NSString YoungerCousinMothersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinMothersSistersDaughter")] NSString ElderCousinMothersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinMothersSistersSon")] NSString CousinMothersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinMothersSistersSon")] NSString YoungerCousinMothersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinMothersSistersSon")] NSString ElderCousinMothersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinMothersBrothersDaughter")] NSString CousinMothersBrothersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinMothersBrothersDaughter")] NSString YoungerCousinMothersBrothersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinMothersBrothersDaughter")] NSString ElderCousinMothersBrothersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinMothersBrothersSon")] NSString CousinMothersBrothersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinMothersBrothersSon")] NSString YoungerCousinMothersBrothersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinMothersBrothersSon")] NSString ElderCousinMothersBrothersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinFathersSistersDaughter")] NSString CousinFathersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinFathersSistersDaughter")] NSString YoungerCousinFathersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinFathersSistersDaughter")] NSString ElderCousinFathersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinFathersSistersSon")] NSString CousinFathersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinFathersSistersSon")] NSString YoungerCousinFathersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinFathersSistersSon")] NSString ElderCousinFathersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinFathersBrothersDaughter")] NSString CousinFathersBrothersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinFathersBrothersDaughter")] NSString YoungerCousinFathersBrothersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinFathersBrothersDaughter")] NSString ElderCousinFathersBrothersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinFathersBrothersSon")] NSString CousinFathersBrothersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinFathersBrothersSon")] NSString YoungerCousinFathersBrothersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinFathersBrothersSon")] NSString ElderCousinFathersBrothersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinGrandparentsSiblingsChild")] NSString CousinGrandparentsSiblingsChild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinGrandparentsSiblingsDaughter")] NSString CousinGrandparentsSiblingsDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinGrandparentsSiblingsSon")] NSString CousinGrandparentsSiblingsSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinMothersSiblingsSonOrFathersSistersSon")] NSString YoungerCousinMothersSiblingsSonOrFathersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinMothersSiblingsSonOrFathersSistersSon")] NSString ElderCousinMothersSiblingsSonOrFathersSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationYoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter")] NSString YoungerCousinMothersSiblingsDaughterOrFathersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationElderCousinMothersSiblingsDaughterOrFathersSistersDaughter")] NSString ElderCousinMothersSiblingsDaughterOrFathersSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsSibling")] NSString ParentsSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsYoungerSibling")] NSString ParentsYoungerSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsElderSibling")] NSString ParentsElderSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsSiblingMothersSibling")] NSString ParentsSiblingMothersSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsSiblingMothersYoungerSibling")] NSString ParentsSiblingMothersYoungerSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsSiblingMothersElderSibling")] NSString ParentsSiblingMothersElderSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsSiblingFathersSibling")] NSString ParentsSiblingFathersSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsSiblingFathersYoungerSibling")] NSString ParentsSiblingFathersYoungerSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationParentsSiblingFathersElderSibling")] NSString ParentsSiblingFathersElderSibling { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAunt")] NSString Aunt { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntParentsSister")] NSString AuntParentsSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntParentsYoungerSister")] NSString AuntParentsYoungerSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntParentsElderSister")] NSString AuntParentsElderSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntFathersSister")] NSString AuntFathersSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntFathersYoungerSister")] NSString AuntFathersYoungerSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntFathersElderSister")] NSString AuntFathersElderSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntFathersBrothersWife")] NSString AuntFathersBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntFathersYoungerBrothersWife")] NSString AuntFathersYoungerBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntFathersElderBrothersWife")] NSString AuntFathersElderBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntMothersSister")] NSString AuntMothersSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntMothersYoungerSister")] NSString AuntMothersYoungerSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntMothersElderSister")] NSString AuntMothersElderSister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationAuntMothersBrothersWife")] NSString AuntMothersBrothersWife { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandaunt")] NSString Grandaunt { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncle")] NSString Uncle { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleParentsBrother")] NSString UncleParentsBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleParentsYoungerBrother")] NSString UncleParentsYoungerBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleParentsElderBrother")] NSString UncleParentsElderBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleMothersBrother")] NSString UncleMothersBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleMothersYoungerBrother")] NSString UncleMothersYoungerBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleMothersElderBrother")] NSString UncleMothersElderBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleMothersSistersHusband")] NSString UncleMothersSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleFathersBrother")] NSString UncleFathersBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleFathersYoungerBrother")] NSString UncleFathersYoungerBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleFathersElderBrother")] NSString UncleFathersElderBrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleFathersSistersHusband")] NSString UncleFathersSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleFathersYoungerSistersHusband")] NSString UncleFathersYoungerSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationUncleFathersElderSistersHusband")] NSString UncleFathersElderSistersHusband { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGranduncle")] NSString Granduncle { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSiblingsChild")] NSString SiblingsChild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNiece")] NSString Niece { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNieceSistersDaughter")] NSString NieceSistersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNieceBrothersDaughter")] NSString NieceBrothersDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNieceSistersDaughterOrWifesSiblingsDaughter")] NSString NieceSistersDaughterOrWifesSiblingsDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNieceBrothersDaughterOrHusbandsSiblingsDaughter")] NSString NieceBrothersDaughterOrHusbandsSiblingsDaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNephew")] NSString Nephew { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNephewSistersSon")] NSString NephewSistersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNephewBrothersSon")] NSString NephewBrothersSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNephewBrothersSonOrHusbandsSiblingsSon")] NSString NephewBrothersSonOrHusbandsSiblingsSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNephewSistersSonOrWifesSiblingsSon")] NSString NephewSistersSonOrWifesSiblingsSon { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandniece")] NSString Grandniece { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandnieceSistersGranddaughter")] NSString GrandnieceSistersGranddaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandnieceBrothersGranddaughter")] NSString GrandnieceBrothersGranddaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandnephew")] NSString Grandnephew { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandnephewSistersGrandson")] NSString GrandnephewSistersGrandson { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandnephewBrothersGrandson")] NSString GrandnephewBrothersGrandson { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepparent")] NSString Stepparent { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepfather")] NSString Stepfather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepmother")] NSString Stepmother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepchild")] NSString Stepchild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepson")] NSString Stepson { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepdaughter")] NSString Stepdaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepbrother")] NSString Stepbrother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationStepsister")] NSString Stepsister { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationMotherInLawOrStepmother")] NSString MotherInLawOrStepmother { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationFatherInLawOrStepfather")] NSString FatherInLawOrStepfather { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationDaughterInLawOrStepdaughter")] NSString DaughterInLawOrStepdaughter { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSonInLawOrStepson")] NSString SonInLawOrStepson { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationCousinOrSiblingsChild")] NSString CousinOrSiblingsChild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNieceOrCousin")] NSString NieceOrCousin { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationNephewOrCousin")] NSString NephewOrCousin { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGrandchildOrSiblingsChild")] NSString GrandchildOrSiblingsChild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationGreatGrandchildOrSiblingsGrandchild")] NSString GreatGrandchildOrSiblingsGrandchild { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationDaughterInLawOrSisterInLaw")] NSString DaughterInLawOrSisterInLaw { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelContactRelationSonInLawOrBrotherInLaw")] NSString SonInLawOrBrotherInLaw { get; } - [iOS (14, 0), Watch (7, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("CNLabelContactRelationGranddaughterOrNiece")] NSString GranddaughterOrNiece { get; } - [iOS (14, 0), Watch (7, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("CNLabelContactRelationGrandsonOrNephew")] NSString GrandsonOrNephew { get; } @@ -1498,7 +1498,7 @@ interface CNLabelContactRelationKey { interface ICNChangeHistoryEventVisitor { } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface CNChangeHistoryEventVisitor { @@ -1540,7 +1540,7 @@ interface CNChangeHistoryEventVisitor { void RemoveSubgroupFromGroup (CNChangeHistoryRemoveSubgroupFromGroupEvent @event); } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1549,12 +1549,12 @@ interface CNChangeHistoryEvent : NSCopying, NSSecureCoding { void AcceptEventVisitor (ICNChangeHistoryEventVisitor visitor); } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] interface CNChangeHistoryDropEverythingEvent { } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1566,7 +1566,7 @@ interface CNChangeHistoryAddContactEvent { string ContainerIdentifier { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1575,7 +1575,7 @@ interface CNChangeHistoryUpdateContactEvent { CNContact Contact { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1584,7 +1584,7 @@ interface CNChangeHistoryDeleteContactEvent { string ContactIdentifier { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1596,7 +1596,7 @@ interface CNChangeHistoryAddGroupEvent { string ContainerIdentifier { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1605,7 +1605,7 @@ interface CNChangeHistoryUpdateGroupEvent { CNGroup Group { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1614,7 +1614,7 @@ interface CNChangeHistoryDeleteGroupEvent { string GroupIdentifier { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1626,7 +1626,7 @@ interface CNChangeHistoryAddMemberToGroupEvent { CNGroup Group { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1638,7 +1638,7 @@ interface CNChangeHistoryRemoveMemberFromGroupEvent { CNGroup Group { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1650,7 +1650,7 @@ interface CNChangeHistoryAddSubgroupToGroupEvent { CNGroup Group { get; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNChangeHistoryEvent))] [DisableDefaultCtor] @@ -1664,13 +1664,12 @@ interface CNChangeHistoryRemoveSubgroupFromGroupEvent { // this type is new in Xcode11 but is decorated with earlier versions since it's used as a // base type for older types (and that confuse the generator for 32bits availability) - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CNFetchRequest { } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (CNFetchRequest))] interface CNChangeHistoryFetchRequest : NSSecureCoding { @@ -1694,7 +1693,7 @@ interface CNChangeHistoryFetchRequest : NSSecureCoding { string [] ExcludedTransactionAuthors { get; set; } } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1731,27 +1730,27 @@ interface CNContactStore { [return: NullAllowed] CNContact GetUnifiedContact (string identifier, NSArray keys, [NullAllowed] out NSError error); - [NoiOS, NoWatch] + [NoiOS] [NoMacCatalyst] [Export ("unifiedMeContactWithKeysToFetch:error:")] [Protected] // we cannot use ICNKeyDescriptor as Apple (and others) can adopt it from categories [return: NullAllowed] NSObject GetUnifiedMeContact (NSArray keys, [NullAllowed] out NSError error); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("enumeratorForContactFetchRequest:error:")] [return: NullAllowed] CNFetchResult> GetEnumeratorForContact (CNContactFetchRequest request, [NullAllowed] out NSError error); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("enumeratorForChangeHistoryFetchRequest:error:")] [return: NullAllowed] CNFetchResult> GetEnumeratorForChangeHistory (CNChangeHistoryFetchRequest request, [NullAllowed] out NSError error); -#if !NET && !WATCH +#if !NET [Obsolete ("Use the overload that takes 'CNContactStoreListContactsHandler' instead.")] [Export ("enumerateContactsWithFetchRequest:error:usingBlock:")] bool EnumerateContacts (CNContactFetchRequest fetchRequest, out NSError error, CNContactStoreEnumerateContactsHandler handler); @@ -1769,12 +1768,11 @@ interface CNContactStore { [return: NullAllowed] CNContainer [] GetContainers ([NullAllowed] NSPredicate predicate, [NullAllowed] out NSError error); -#if !WATCH [Export ("executeSaveRequest:error:")] [return: NullAllowed] bool ExecuteSaveRequest (CNSaveRequest saveRequest, [NullAllowed] out NSError error); -#endif - [Watch (6, 0), iOS (13, 0)] + + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed] [Export ("currentHistoryToken", ArgumentSemantic.Copy)] @@ -1951,7 +1949,6 @@ interface CNGroup_PredicatesExtension { [Obsolete ("Use 'CNGroup.CreatePredicateForSubgroupsInGroup' instead.")] [NoiOS] - [NoWatch] [Static] [Export ("predicateForSubgroupsInGroupWithIdentifier:")] NSPredicate GetPredicateForSubgroupsInGroup (string parentGroupIdentifier); @@ -1986,7 +1983,6 @@ interface CNGroup : NSCopying, NSMutableCopying, NSSecureCoding { NSPredicate CreatePredicateForGroups (string [] identifiers); [NoiOS] - [NoWatch] [NoMacCatalyst] [Static] #if NET @@ -2146,7 +2142,7 @@ interface CNLabelKey { [Field ("CNLabelWork")] NSString Work { get; } - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("CNLabelSchool")] NSString School { get; } @@ -2366,7 +2362,7 @@ interface CNLabelPhoneNumberKey { [Field ("CNLabelPhoneNumberiPhone")] NSString iPhone { get; } - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("CNLabelPhoneNumberAppleWatch")] NSString AppleWatch { get; } @@ -2519,7 +2515,6 @@ interface CNPostalAddressFormatter { NSString LocalizedPropertyNameAttribute { get; } } -#if !WATCH /// A request that performs a save operation for contacts. /// /// Apple documentation for CNSaveRequest @@ -2569,7 +2564,6 @@ interface CNSaveRequest { [Export ("shouldRefetchContacts")] bool ShouldRefetchContacts { get; set; } } -#endif // !WATCH /// A profile for a social network, such as Facebook or Twitter. /// diff --git a/src/contactsui.cs b/src/contactsui.cs index 9443d5831886..21e5fb594382 100644 --- a/src/contactsui.cs +++ b/src/contactsui.cs @@ -143,7 +143,6 @@ CNContact Contact { get; [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] set; } diff --git a/src/coreanimation.cs b/src/coreanimation.cs index ab4bd812def3..929bd78831e8 100644 --- a/src/coreanimation.cs +++ b/src/coreanimation.cs @@ -49,7 +49,7 @@ using Metal; using SceneKit; // For SCNAnimationEvent -#if __WATCHOS__ || __TVOS__ +#if __TVOS__ using CAEdrMetadata = Foundation.NSObject; #endif @@ -115,7 +115,6 @@ interface ICAMediaTiming { } [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CAConstraintLayoutManager : NSCoding { @@ -126,7 +125,6 @@ interface CAConstraintLayoutManager : NSCoding { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface CAConstraint : NSSecureCoding { @@ -190,7 +188,6 @@ interface CADisplayLink { [Obsoleted (PlatformName.iOS, 10, 0, message: "Use 'PreferredFramesPerSecond' property.")] [Obsoleted (PlatformName.TvOS, 10, 0, message: "Use 'PreferredFramesPerSecond' property.")] - [Obsoleted (PlatformName.WatchOS, 3, 0, message: "Use 'PreferredFramesPerSecond' property.")] [Obsoleted (PlatformName.MacCatalyst, 13, 1, message: "Use 'PreferredFramesPerSecond' property.")] [NoMac] [Export ("frameInterval")] @@ -205,14 +202,13 @@ interface CADisplayLink { [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'PreferredFrameRateRange' property.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'PreferredFrameRateRange' property.")] - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'PreferredFrameRateRange' property.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'PreferredFrameRateRange' property.")] [NoMac] [Export ("preferredFramesPerSecond")] nint PreferredFramesPerSecond { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("preferredFrameRateRange", ArgumentSemantic.Assign)] CAFrameRateRange PreferredFrameRateRange { get; set; } } @@ -365,7 +361,6 @@ interface CALayer : CAMediaTiming, NSSecureCoding { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("layoutManager", ArgumentSemantic.Retain)] [NullAllowed] @@ -590,28 +585,24 @@ interface CALayer : CAMediaTiming, NSSecureCoding { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("autoresizingMask")] CAAutoresizingMask AutoresizingMask { get; set; } [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("resizeSublayersWithOldSize:")] void ResizeSublayers (CGSize oldSize); [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("resizeWithOldSuperlayerSize:")] void Resize (CGSize oldSuperlayerSize); [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("constraints")] [NullAllowed] @@ -619,7 +610,6 @@ interface CALayer : CAMediaTiming, NSSecureCoding { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("addConstraint:")] void AddConstraint (CAConstraint c); @@ -649,20 +639,17 @@ interface CALayer : CAMediaTiming, NSSecureCoding { [Export ("compositingFilter", ArgumentSemantic.Strong)] NSObject CompositingFilter { get; set; } - [NoWatch] // headers not updated [MacCatalyst (13, 1)] [Export ("maskedCorners", ArgumentSemantic.Assign)] CACornerMask MaskedCorners { get; set; } [BindAs (typeof (CACornerCurve))] - [NoWatch] // headers not updated [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("cornerCurve")] NSString CornerCurve { get; set; } - [NoWatch] // headers not updated [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -670,7 +657,6 @@ interface CALayer : CAMediaTiming, NSSecureCoding { [Export ("cornerCurveExpansionFactor:")] nfloat GetCornerCurveExpansionFactor ([BindAs (typeof (CACornerCurve))] NSString curve); - [NoWatch] [NoTV] [iOS (17, 0)] [MacCatalyst (17, 0)] @@ -678,13 +664,12 @@ interface CALayer : CAMediaTiming, NSSecureCoding { [Export ("wantsExtendedDynamicRangeContent")] bool WantsExtendedDynamicRangeContent { get; set; } - [Mac (15, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (15, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0)] [Export ("toneMapMode")] [BindAs (typeof (CAToneMapMode))] NSString ToneMapMode { get; set; } } - [NoWatch] // headers not updated [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -696,7 +681,7 @@ enum CACornerCurve { Continuous, } - [Mac (15, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (15, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0)] enum CAToneMapMode { [DefaultEnumValue] [Field ("CAToneMapModeAutomatic")] @@ -748,52 +733,44 @@ interface CAMetalLayer { [Export ("presentsWithTransaction")] bool PresentsWithTransaction { [Bind ("presentsWithTransaction")] get; set; } - [NoWatch] [NoTV] [NoiOS] [MacCatalyst (13, 1)] [Export ("displaySyncEnabled")] bool DisplaySyncEnabled { get; set; } - [NoWatch] // headers not updated [MacCatalyst (13, 1)] [Export ("allowsNextDrawableTimeout")] bool AllowsNextDrawableTimeout { get; set; } - [NoWatch] // headers not updated [MacCatalyst (13, 1)] [Export ("maximumDrawableCount")] nuint MaximumDrawableCount { get; set; } - [NoWatch] // headers not updated [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("colorspace", ArgumentSemantic.Assign)] CGColorSpace ColorSpace { get; set; } - [NoWatch] // headers not updated [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("preferredDevice")] IMTLDevice PreferredDevice { get; } - [NoWatch] [iOS (16, 0)] [NoTV] [MacCatalyst (16, 0)] [NullAllowed, Export ("EDRMetadata", ArgumentSemantic.Strong)] CAEdrMetadata EdrMetadata { get; set; } - [NoWatch] [NoTV] [iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("wantsExtendedDynamicRangeContent")] bool WantsExtendedDynamicRangeContent { get; set; } - [NoWatch] [TV (16, 0)] [iOS (16, 0)] [MacCatalyst (16, 0)] @@ -1249,8 +1226,6 @@ interface ICALayerDelegate { } [Protocol (FormalSince = "10.0")] #elif MONOMAC [Protocol (FormalSince = "10.12")] -#elif WATCH - [Protocol (FormalSince = "3.0")] #else [Protocol] #endif @@ -1299,7 +1274,6 @@ interface CALayerDelegate { /// Apple documentation for CAEAGLLayer [NoMac][NoMacCatalyst] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'CAMetalLayer' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'CAMetalLayer' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'CAMetalLayer' instead.")] [BaseType (typeof (CALayer))] interface CAEAGLLayer : EAGLDrawable { @@ -1419,7 +1393,6 @@ interface CAAnimation : CAAction, CAMediaTiming, NSSecureCoding, NSMutableCopyin #region SceneKitAdditions - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("animationWithSCNAnimation:")] @@ -1444,7 +1417,7 @@ interface CAAnimation : CAAction, CAMediaTiming, NSSecureCoding, NSMutableCopyin #endregion - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("preferredFrameRateRange", ArgumentSemantic.Assign)] CAFrameRateRange PreferredFrameRateRange { get; set; } } @@ -1457,8 +1430,6 @@ interface ICAAnimationDelegate { } [Protocol (FormalSince = "10.0")] #elif MONOMAC [Protocol (FormalSince = "10.12")] -#elif WATCH - [Protocol (FormalSince = "3.0")] #else [Synthetic] #endif @@ -1551,23 +1522,23 @@ interface CASpringAnimation { [Export ("initialVelocity")] nfloat InitialVelocity { get; set; } - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)] [Export ("settlingDuration")] double /* CFTimeInterval */ SettlingDuration { get; } - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)] [Export ("allowsOverdamping")] bool AllowsOverdamping { get; set; } - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)] [Export ("initWithPerceptualDuration:bounce:")] NativeHandle Constructor (double /* CFTimeInterval */ perceptualDuration, nfloat bounce); - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)] [Export ("perceptualDuration")] double /* CFTimeInterval */ PerceptualDuration { get; } - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)] [Export ("bounce")] nfloat Bounce { get; } } @@ -1814,12 +1785,10 @@ enum CAGradientLayerType { [Field ("kCAGradientLayerAxial")] Axial, - [NoWatch] [MacCatalyst (13, 1)] [Field ("kCAGradientLayerRadial")] Radial, - [NoWatch] [MacCatalyst (13, 1)] [Field ("kCAGradientLayerConic")] Conic, @@ -1910,7 +1879,6 @@ interface CAValueFunction : NSSecureCoding { [NoiOS] [NoTV] - [NoWatch] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'CAMetalLayer' instead.")] [NoMacCatalyst] [BaseType (typeof (CALayer))] @@ -2294,7 +2262,6 @@ interface CARenderer { void SetDestination (IMTLTexture tex); } - [NoWatch] [iOS (16, 0)] [NoTV] [MacCatalyst (16, 0)] @@ -2327,7 +2294,7 @@ interface CAEdrMetadata : NSCopying, NSSecureCoding { } [BaseType (typeof (NSObject))] - [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoWatch] + [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)] [DisableDefaultCtor] interface CAMetalDisplayLinkUpdate { [Export ("drawable")] @@ -2342,7 +2309,7 @@ interface CAMetalDisplayLinkUpdate { [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] - [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoWatch] + [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)] interface CAMetalDisplayLinkDelegate { [Abstract] [Export ("metalDisplayLink:needsUpdate:")] @@ -2352,7 +2319,7 @@ interface CAMetalDisplayLinkDelegate { interface ICAMetalDisplayLinkDelegate { } [BaseType (typeof (NSObject))] - [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoWatch] + [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)] [DisableDefaultCtor] interface CAMetalDisplayLink { [Export ("initWithMetalLayer:")] diff --git a/src/corebluetooth.cs b/src/corebluetooth.cs index 7bade79a4a39..d85e544c3ddf 100644 --- a/src/corebluetooth.cs +++ b/src/corebluetooth.cs @@ -52,7 +52,7 @@ interface CBManager { CBManagerState State { get; } [Internal] - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [NoTV] [NoMac] [MacCatalyst (13, 1)] @@ -60,7 +60,7 @@ interface CBManager { CBManagerAuthorization _IAuthorization { get; } [Internal] - [iOS (13, 1), Watch (6, 1)] + [iOS (13, 1)] [NoTV] [NoMac] [MacCatalyst (13, 1)] @@ -70,14 +70,13 @@ interface CBManager { [TV (13, 0)] [NoiOS] - [NoWatch] [NoMacCatalyst] [Static] [Export ("authorization", ArgumentSemantic.Assign)] CBManagerAuthorization Authorization { get; } } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [StrongDictionary ("CBConnectionEventMatchingOptionsKeys")] interface CBConnectionEventMatchingOptions { @@ -85,7 +84,7 @@ interface CBConnectionEventMatchingOptions { CBUUID [] ServiceUuids { get; set; } } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Internal] @@ -103,13 +102,13 @@ interface CBConnectPeripheralOptions { bool NotifyOnDisconnection { get; set; } [MacCatalyst (13, 1)] bool NotifyOnNotification { get; set; } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] bool EnableTransportBridging { get; set; } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] bool RequiresAncs { get; set; } - [iOS (17, 0), TV (17, 0), Watch (10, 0), Mac (14, 0), MacCatalyst (17, 0)] + [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)] bool EnableAutoReconnect { get; } } @@ -124,15 +123,15 @@ interface CBConnectPeripheralOptionsKeys { [MacCatalyst (13, 1)] [Field ("CBConnectPeripheralOptionNotifyOnNotificationKey")] NSString NotifyOnNotificationKey { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Field ("CBConnectPeripheralOptionEnableTransportBridgingKey")] NSString EnableTransportBridgingKey { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Field ("CBConnectPeripheralOptionRequiresANCS")] NSString RequiresAncsKey { get; } - [iOS (17, 0), TV (17, 0), Watch (10, 0), Mac (14, 0), MacCatalyst (17, 0)] + [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)] [Field ("CBConnectPeripheralOptionEnableAutoReconnect")] NSString EnableAutoReconnectKey { get; } } @@ -198,7 +197,6 @@ interface CBCentralManager { NSString OptionNotifyOnNotificationKey { get; } #endif - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("CBConnectPeripheralOptionStartDelayKey")] NSString OptionStartDelayKey { get; } @@ -231,7 +229,7 @@ interface CBCentralManager { [MacCatalyst (13, 1)] NSString OptionShowPowerAlertKey { get; } - [iOS (16, 0), NoMac, TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [iOS (16, 0), NoMac, TV (16, 0), MacCatalyst (16, 0)] [Field ("CBCentralManagerOptionDeviceAccessForMedia")] NSString OptionDeviceAccessForMedia { get; } @@ -243,19 +241,19 @@ interface CBCentralManager { [Export ("isScanning")] bool IsScanning { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("supportsFeatures:")] bool SupportsFeatures (CBCentralManagerFeature features); [EditorBrowsable (EditorBrowsableState.Advanced)] - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Export ("registerForConnectionEventsWithOptions:")] void RegisterForConnectionEvents ([NullAllowed] NSDictionary options); - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Wrap ("RegisterForConnectionEvents (options.GetDictionary ())")] void RegisterForConnectionEvents ([NullAllowed] CBConnectionEventMatchingOptions options); @@ -356,7 +354,6 @@ interface CBCentralManagerDelegate { #if !NET [NoTV] - [NoWatch] // Available in iOS 5.0 through iOS 8.4. Deprecated in iOS 7.0. [Deprecated (PlatformName.iOS, 7, 0)] [Obsoleted (PlatformName.iOS, 8, 4)] @@ -367,7 +364,6 @@ interface CBCentralManagerDelegate { #if !NET [NoTV] - [NoWatch] // Available in iOS 5.0 through iOS 8.4. Deprecated in iOS 7.0. [Deprecated (PlatformName.iOS, 7, 0)] [Obsoleted (PlatformName.iOS, 8, 4)] @@ -395,17 +391,17 @@ interface CBCentralManagerDelegate { [Export ("centralManager:willRestoreState:"), EventArgs ("CBWillRestore")] void WillRestoreState (CBCentralManager central, NSDictionary dict); - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Export ("centralManager:connectionEventDidOccur:forPeripheral:"), EventArgs ("CBPeripheralConnectionEvent")] void ConnectionEventDidOccur (CBCentralManager central, CBConnectionEvent connectionEvent, CBPeripheral peripheral); - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Export ("centralManager:didUpdateANCSAuthorizationForPeripheral:"), EventArgs ("CBAncsAuthorizationUpdate")] void DidUpdateAncsAuthorization (CBCentralManager central, CBPeripheral peripheral); - [iOS (17, 0), TV (17, 0), Watch (10, 0), Mac (14, 0), MacCatalyst (17, 0), EventArgs ("CBPeripheralDiconnectionEvent")] + [iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0), EventArgs ("CBPeripheralDiconnectionEvent")] [Export ("centralManager:didDisconnectPeripheral:timestamp:isReconnecting:error:")] void DidDisconnectPeripheral (CBCentralManager central, CBPeripheral peripheral, double timestamp, bool isReconnecting, [NullAllowed] NSError error); } @@ -486,7 +482,6 @@ interface CBCharacteristic { interface CBMutableCharacteristic { [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [DesignatedInitializer] [Export ("initWithType:properties:value:permissions:")] @@ -541,7 +536,6 @@ interface CBDescriptor { [DisableDefaultCtor] interface CBMutableDescriptor { [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [DesignatedInitializer] [Export ("initWithType:value:")] @@ -570,7 +564,6 @@ interface CBPeripheral : NSCopying { [Deprecated (PlatformName.iOS, 8, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Export ("RSSI", ArgumentSemantic.Retain)] @@ -579,7 +572,6 @@ interface CBPeripheral : NSCopying { #if !NET [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0)] [Obsoleted (PlatformName.iOS, 9, 0)] [Export ("isConnected")] @@ -642,7 +634,7 @@ interface CBPeripheral : NSCopying { [Export ("openL2CAPChannel:")] void OpenL2CapChannel (ushort psm); - [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] [Export ("ancsAuthorized")] bool AncsAuthorized { get; } @@ -712,7 +704,6 @@ interface CBPeripheralDelegate { #if !NET [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0)] [Obsoleted (PlatformName.iOS, 8, 4)] [NoMacCatalyst] @@ -773,7 +764,6 @@ interface CBService { [DisableDefaultCtor] interface CBMutableService { [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [DesignatedInitializer] [Export ("initWithType:primary:")] @@ -813,7 +803,6 @@ interface CBUUID : NSCopying { [Deprecated (PlatformName.MacOSX, 10, 13)] [Deprecated (PlatformName.iOS, 9, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -849,7 +838,6 @@ interface CBUUID : NSCopying { [Obsoleted (PlatformName.MacOSX, 10, 13)] [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] NSString CBUUIDValidRangeString { get; } @@ -863,7 +851,7 @@ interface CBUUID : NSCopying { NSString CharacteristicValidRangeString { get; } #endif - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("CBUUIDCharacteristicObservationScheduleString")] NSString CharacteristicObservationScheduleString { get; } @@ -907,7 +895,6 @@ interface CBATTRequest { interface CBCentral : NSCopying { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("identifier")] NSUuid Identifier { get; } @@ -929,14 +916,12 @@ interface CBPeripheralManager { NativeHandle Constructor (); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithDelegate:queue:")] [PostGet ("WeakDelegate")] NativeHandle Constructor ([NullAllowed] ICBPeripheralManagerDelegate peripheralDelegate, [NullAllowed] DispatchQueue queue); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [DesignatedInitializer] [Export ("initWithDelegate:queue:options:")] @@ -1081,7 +1066,6 @@ interface CBPeer : NSCopying { #if !NET [Internal] [NoTV] - [NoWatch] [NoMac] [Deprecated (PlatformName.iOS, 7, 0)] [Obsoleted (PlatformName.iOS, 9, 0)] diff --git a/src/coredata.cs b/src/coredata.cs index 5186d8fe1038..5b807e12de6c 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -14,9 +14,7 @@ #if MONOMAC using AppKit; #endif -#if !WATCH using CoreSpotlight; -#endif #if !NET using NativeHandle = System.IntPtr; @@ -57,21 +55,20 @@ interface UserInfoKeys { [Field ("NSAffectedStoresErrorKey")] NSString AffectedStoresForErrorKey { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSPersistentStoreStagedMigrationManagerOptionKey")] NSString StagedMigrationManagerOptionKey { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0), MacCatalyst (17, 0)] + [TV (14, 0), iOS (14, 0), MacCatalyst (17, 0)] [Field ("NSPersistentStoreDeferredLightweightMigrationOptionKey")] NSString DeferredLightweightMigrationOptionKey { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSPersistentStoreModelVersionChecksumKey")] NSString ModelVersionChecksumKey { get; } } /// Enumerates valid keys for the user information dictionary used in and . - [NoWatch] [NoTV] [Native] // NUInteger -> NSPersistentStoreCoordinator.h [Deprecated (PlatformName.iOS, 10, 0, message: "Please see the release notes and Core Data documentation.")] @@ -244,12 +241,12 @@ interface NSAttributeDescription { [Export ("allowsExternalBinaryDataStorage")] bool AllowsExternalBinaryDataStorage { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("preservesValueInHistoryOnDeletion")] bool PreservesValueInHistoryOnDeletion { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("allowsCloudEncryption")] bool AllowsCloudEncryption { get; set; } } @@ -342,7 +339,6 @@ interface NSEntityDescription : NSCoding, NSCopying { [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'NSEntityDescription.Indexes' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSEntityDescription.Indexes' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'NSEntityDescription.Indexes' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'NSEntityDescription.Indexes' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSEntityDescription.Indexes' instead.")] NSPropertyDescription [] CompoundIndexes { get; set; } @@ -839,7 +835,6 @@ interface NSManagedObject : NSFetchRequestResult { [Export ("didChangeValueForKey:withSetMutation:usingObjects:")] void DidChangeValueForKey (string inKey, NSKeyValueSetMutationKind inMutationKind, NSSet inObjects); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("observationInfo")] @@ -954,7 +949,7 @@ interface NSQueryGenerationToken : NSSecureCoding, NSCopying { [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSManagedObjectContext : NSCoding -#if !WATCH && !TVOS +#if !TVOS , NSLocking #endif #if MONOMAC @@ -1068,7 +1063,6 @@ interface NSManagedObjectContext : NSCoding bool Save (out NSError error); #pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Lock()' does not hide an accessible member. The new keyword is not required. - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use a queue style context and 'PerformAndWait' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use a queue style context and 'PerformAndWait' instead.")] @@ -1079,7 +1073,6 @@ interface NSManagedObjectContext : NSCoding #pragma warning restore #pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Unlock()' does not hide an accessible member. The new keyword is not required. - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use a queue style context and 'PerformAndWait' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use a queue style context and 'PerformAndWait' instead.")] @@ -1089,7 +1082,6 @@ interface NSManagedObjectContext : NSCoding new void Unlock (); #pragma warning restore - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use a queue style context and 'Perform' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use a queue style context and 'Perform' instead.")] @@ -1197,19 +1189,19 @@ interface NSManagedObjectContext : NSCoding string TransactionAuthor { get; set; } [Notification (typeof (NSManagedObjectsIdsChangedEventArgs))] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSManagedObjectContextDidMergeChangesObjectIDsNotification")] NSString DidMergeChangesObjectIdsNotification { get; } [Notification (typeof (NSManagedObjectsIdsChangedEventArgs))] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSManagedObjectContextDidSaveObjectIDsNotification")] NSString DidSaveObjectIdsNotification { get; } } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] interface NSManagedObjectsIdsChangedEventArgs { [Export ("NSDeletedObjectIDsKey")] @@ -1386,13 +1378,13 @@ interface NSManagedObjectModel : NSCoding, NSCopying { NSDictionary EntityVersionHashesByName { get; } #endif - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("checksumsForVersionedModelAtURL:error:")] [return: NullAllowed] NSDictionary ChecksumsForVersionedModel (NSUrl modelUrl, [NullAllowed] out NSError error); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("versionChecksum")] string VersionChecksum { get; } } @@ -1605,19 +1597,19 @@ interface NSPersistentHistoryChange : NSCopying { [NullAllowed, Export ("updatedProperties", ArgumentSemantic.Copy)] NSSet UpdatedProperties { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [NullAllowed, Export ("entityDescription")] NSEntityDescription EntityDescription { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [NullAllowed, Export ("fetchRequest")] NSFetchRequest FetchRequest { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("entityDescriptionWithContext:")] @@ -1665,13 +1657,13 @@ interface NSPersistentHistoryChangeRequest { [NullAllowed, Export ("token", ArgumentSemantic.Strong)] NSPersistentHistoryToken Token { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("fetchHistoryWithFetchRequest:")] NSPersistentHistoryChangeRequest FetchHistory (NSFetchRequest fetchRequest); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("fetchRequest", ArgumentSemantic.Strong)] NSFetchRequest FetchRequest { get; set; } @@ -1722,28 +1714,27 @@ interface NSPersistentHistoryTransaction : NSCopying { [Export ("objectIDNotification")] NSNotification ObjectIdNotification { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("entityDescriptionWithContext:")] [return: NullAllowed] NSEntityDescription GetEntityDescription (NSManagedObjectContext context); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [NullAllowed, Export ("entityDescription")] NSEntityDescription EntityDescription { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [NullAllowed, Export ("fetchRequest")] NSFetchRequest FetchRequest { get; } } -#if !WATCH - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInternalInconsistencyException Reason: NSCoreDataCoreSpotlightDelegate requires the use of the initializer initForStoreWithDescription:model: @@ -1782,23 +1773,22 @@ interface NSCoreDataCoreSpotlightDelegate { void ReindexSearchableItems (CSSearchableIndex searchableIndex, string [] identifiers, Action acknowledgementHandler); [Async] - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("deleteSpotlightIndexWithCompletionHandler:")] void DeleteSpotlightIndex (Action completionHandler); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("indexingEnabled")] bool IndexingEnabled { [Bind ("isIndexingEnabled")] get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("startSpotlightIndexing")] void StartSpotlightIndexing (); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("stopSpotlightIndexing")] void StopSpotlightIndexing (); } -#endif // NSPersistentStore is an abstract type according to Apple's documentation, but Apple // also have internal subclasses of NSPersistentStore, and in those cases our closest @@ -1878,20 +1868,18 @@ interface NSPersistentStore { [Field ("NSPersistentStoreSaveConflictsErrorKey")] NSString SaveConflictsErrorKey { get; } -#if !WATCH - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("coreSpotlightExporter")] NSCoreDataCoreSpotlightDelegate CoreSpotlightExporter { get; } -#endif - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("NSPersistentStoreRemoteChangeNotificationPostOptionKey")] NSString RemoteChangeNotificationPostOptionKey { get; } [Notification (typeof (NSPersistentStoreRemoteChangeEventArgs))] - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("NSPersistentStoreRemoteChangeNotification")] NSString StoreRemoteChangeNotification { get; } @@ -1958,7 +1946,7 @@ interface NSPersistentStoreDescription : NSCopying { NativeHandle Constructor (NSUrl url); // NSPersistentStoreDescription_NSPersistentCloudKitContainerAdditions category - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("cloudKitContainerOptions", ArgumentSemantic.Strong)] NSPersistentCloudKitContainerOptions CloudKitContainerOptions { get; set; } @@ -2016,9 +2004,9 @@ interface NSPersistentContainer { [BaseType (typeof (NSObject))] [DisableDefaultCtor] // iOS8 -> Core Data: warning: client failed to call designated initializer on NSPersistentStoreCoordinator partial interface NSPersistentStoreCoordinator -#if !WATCH && !TVOS +#if !TVOS : NSLocking -#endif // !WATCH +#endif // !TVOS { [Static, Export ("registeredStoreTypes", ArgumentSemantic.Strong)] @@ -2116,7 +2104,6 @@ partial interface NSPersistentStoreCoordinator NSManagedObjectID ManagedObjectIDForURIRepresentation (NSUrl url); #pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Lock()' does not hide an accessible member. The new keyword is not required. - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'PerformAndWait' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'PerformAndWait' instead.")] @@ -2127,7 +2114,6 @@ partial interface NSPersistentStoreCoordinator #pragma warning restore #pragma warning disable 0109 // warning CS0109: The member 'NSManagedObjectContext.Unlock()' does not hide an accessible member. The new keyword is not required. - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'PerformAndWait' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'PerformAndWait' instead.")] @@ -2137,7 +2123,6 @@ partial interface NSPersistentStoreCoordinator new void Unlock (); #pragma warning restore - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'Perform' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'Perform' instead.")] @@ -2148,7 +2133,6 @@ partial interface NSPersistentStoreCoordinator [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 5)] [Static, Export ("metadataForPersistentStoreWithURL:error:")] @@ -2160,7 +2144,6 @@ partial interface NSPersistentStoreCoordinator [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSXMLStoreType")] NSString XMLStoreType { get; } @@ -2196,7 +2179,6 @@ partial interface NSPersistentStoreCoordinator [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSValidateXMLStoreOption")] NSString ValidateXMLStoreOption { get; } @@ -2251,7 +2233,6 @@ partial interface NSPersistentStoreCoordinator NSObject ExecuteRequestwithContexterror (NSPersistentStoreRequest request, NSManagedObjectContext context, out NSError error); #endif - [NoWatch] [NoTV] [Notification] [Deprecated (PlatformName.iOS, 10, 0, message: "Please see the release notes and Core Data documentation.")] @@ -2260,7 +2241,6 @@ partial interface NSPersistentStoreCoordinator [Field ("NSPersistentStoreDidImportUbiquitousContentChangesNotification")] NSString DidImportUbiquitousContentChangesNotification { get; } - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 10, 0, message: "Please see the release notes and Core Data documentation.")] [MacCatalyst (13, 1)] @@ -2268,7 +2248,6 @@ partial interface NSPersistentStoreCoordinator [Field ("NSPersistentStoreUbiquitousContentNameKey")] NSString PersistentStoreUbiquitousContentNameKey { get; } - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 10, 0, message: "Please see the release notes and Core Data documentation.")] [MacCatalyst (13, 1)] @@ -2287,13 +2266,11 @@ partial interface NSPersistentStoreCoordinator // 7.0 - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Field ("NSPersistentStoreUbiquitousPeerTokenOption")] NSString PersistentStoreUbiquitousPeerTokenOption { get; } - [NoWatch] [NoTV] [Static] [Deprecated (PlatformName.iOS, 10, 0, message: "Please see the release notes and Core Data documentation.")] @@ -2308,26 +2285,22 @@ partial interface NSPersistentStoreCoordinator [Field ("NSPersistentStoreCoordinatorStoresWillChangeNotification")] NSString StoresWillChangeNotification { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Field ("NSPersistentStoreRebuildFromUbiquitousContentOption")] NSString RebuildFromUbiquitousContentOption { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Field ("NSPersistentStoreRemoveUbiquitousMetadataOption")] NSString RemoveUbiquitousMetadataOption { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Field ("NSPersistentStoreUbiquitousContainerIdentifierKey")] [Obsolete ("Use 'UbiquitousContainerIdentifierKey' instead.")] NSString eUbiquitousContainerIdentifierKey { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Field ("NSPersistentStoreUbiquitousContainerIdentifierKey")] @@ -2335,7 +2308,7 @@ partial interface NSPersistentStoreCoordinator // 11.0 - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSCoreDataCoreSpotlightExporter")] NSString CoreSpotlightExporter { get; } @@ -2365,27 +2338,26 @@ partial interface NSPersistentStoreCoordinator bool ReplacePersistentStore (NSUrl destinationUrl, [NullAllowed] NSDictionary destinationOptions, NSUrl sourceUrl, [NullAllowed] NSDictionary sourceOptions, string storeType, out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("currentPersistentHistoryTokenFromStores:")] [return: NullAllowed] NSPersistentHistoryToken GetCurrentPersistentHistoryToken ([NullAllowed] NSObject [] stores); - [Watch (7, 0), TV (14, 0), iOS (14, 0), MacCatalyst (14, 0)] + [TV (14, 0), iOS (14, 0), MacCatalyst (14, 0)] [Export ("finishDeferredLightweightMigration:")] bool FinishDeferredLightweightMigration ([NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0), MacCatalyst (14, 0)] + [TV (14, 0), iOS (14, 0), MacCatalyst (14, 0)] [Export ("finishDeferredLightweightMigrationTask:")] bool FinishDeferredLightweightMigrationTask ([NullAllowed] out NSError error); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("managedObjectIDFromUTF8String:length:")] NSManagedObjectID GetManagedObjectId (IntPtr utf8String, nuint length); } interface NSPersistentStoreCoordinatorStoreChangeEventArgs { - [NoWatch] [NoTV] [Export ("NSPersistentStoreUbiquitousTransitionTypeKey")] [Deprecated (PlatformName.iOS, 10, 0, message: "Please see the release notes and Core Data documentation.")] @@ -2501,7 +2473,6 @@ interface NSPropertyDescription : NSCoding, NSCopying { [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'NSEntityDescription.Indexes' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSEntityDescription.Indexes' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'NSEntityDescription.Indexes' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'NSEntityDescription.Indexes' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSEntityDescription.Indexes' instead.")] bool Indexed { [Bind ("isIndexed")] get; set; } @@ -2725,7 +2696,7 @@ interface NSConstraintConflict { #endif delegate bool NSBatchInsertRequestManagedObjectHandler (NSManagedObject managedObject); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSPersistentStoreRequest))] [DisableDefaultCtor] // NSInternalInconsistencyException Reason: -init results in undefined behavior for NSBatchInsertRequest @@ -2733,29 +2704,28 @@ interface NSBatchInsertRequest { [Deprecated (PlatformName.iOS, 14, 0, message: "Use another constructor instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use another constructor instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use another constructor instead.")] [Deprecated (PlatformName.MacOSX, 10, 16, message: "Use another constructor instead.")] [NoMacCatalyst] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use another constructor instead.")] [Export ("init")] NativeHandle Constructor (); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithEntity:dictionaryHandler:")] NativeHandle Constructor (NSEntityDescription entity, NSBatchInsertRequestDictionaryHandler handler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithEntity:managedObjectHandler:")] NativeHandle Constructor (NSEntityDescription entity, NSBatchInsertRequestManagedObjectHandler handler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithEntityName:dictionaryHandler:")] NativeHandle Constructor (string entityName, NSBatchInsertRequestDictionaryHandler handler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithEntityName:managedObjectHandler:")] NativeHandle Constructor (string entityName, NSBatchInsertRequestManagedObjectHandler handler); @@ -2784,30 +2754,30 @@ interface NSBatchInsertRequest { [Export ("initWithEntity:objects:")] NativeHandle Constructor (NSEntityDescription entity, NSDictionary [] dictionaries); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("dictionaryHandler", ArgumentSemantic.Copy)] NSBatchInsertRequestDictionaryHandler DictionaryHandler { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("managedObjectHandler", ArgumentSemantic.Copy)] NSBatchInsertRequestManagedObjectHandler ManagedObjectHandler { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("batchInsertRequestWithEntityName:dictionaryHandler:")] NSBatchInsertRequest CreateBatchInsertRequest (string entityName, NSBatchInsertRequestDictionaryHandler handler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("batchInsertRequestWithEntityName:managedObjectHandler:")] NSBatchInsertRequest CreateBatchInsertRequest (string entityName, NSBatchInsertRequestManagedObjectHandler handler); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSPersistentStoreResult))] interface NSBatchInsertResult { @@ -2818,7 +2788,7 @@ interface NSBatchInsertResult { NSBatchInsertRequestResultType ResultType { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSAttributeDescription))] interface NSDerivedAttributeDescription : NSSecureCoding { @@ -2826,22 +2796,22 @@ interface NSDerivedAttributeDescription : NSSecureCoding { NSExpression DerivationExpression { get; set; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSPersistentCloudKitContainerShareManagedObjectsHandler (NSSet sharedObjectIds, CKShare share, CKContainer container, NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSPersistentCloudKitContainerFetchParticipantsMatchingLookupInfosHandler (NSArray fetchedParticipants, NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSPersistentCloudKitContainerPersistUpdatedShareHandler (CKShare persistedShare, NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSPersistentCloudKitContainerPurgeObjectsAndRecordsInZoneHandler (CKRecordZoneID purgedZoneId, NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSPersistentCloudKitContainerAcceptShareInvitationsHandler (NSArray acceptedShareMetadatas, NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSPersistentContainer))] [DisableDefaultCtor] @@ -2868,60 +2838,60 @@ interface NSPersistentCloudKitContainer { [Export ("recordIDsForManagedObjectIDs:")] NSDictionary GetRecordIds (NSManagedObjectID [] managedObjectIds); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("canUpdateRecordForManagedObjectWithID:")] bool CanUpdateRecord (NSManagedObjectID objectID); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("canDeleteRecordForManagedObjectWithID:")] bool CanDeleteRecord (NSManagedObjectID objectID); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("canModifyManagedObjectsInStore:")] bool CanModifyManagedObjects (NSPersistentStore store); // NSPersistentCloudKitContainer_Sharing [Async (ResultTypeName = "NSPersistentCloudKitContainerAcceptShareInvitationsResult")] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("acceptShareInvitationsFromMetadata:intoPersistentStore:completion:")] void AcceptShareInvitations (CKShareMetadata [] metadata, NSPersistentStore persistentStore, [NullAllowed] NSPersistentCloudKitContainerAcceptShareInvitationsHandler handler); [Async (ResultTypeName = "NSPersistentCloudKitContainerPurgeObjectsAndRecordsInZone")] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("purgeObjectsAndRecordsInZoneWithID:inPersistentStore:completion:")] void PurgeObjectsAndRecordsInZone (CKRecordZoneID zoneId, [NullAllowed] NSPersistentStore persistentStore, [NullAllowed] NSPersistentCloudKitContainerPurgeObjectsAndRecordsInZoneHandler handler); [Async (ResultTypeName = "NSPersistentCloudKitContainerPersistUpdatedShareResult")] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("persistUpdatedShare:inPersistentStore:completion:")] void PersistUpdatedShare (CKShare share, NSPersistentStore persistentStore, [NullAllowed] NSPersistentCloudKitContainerPersistUpdatedShareHandler handler); [Async (ResultTypeName = "NSPersistentCloudKitContainerFetchParticipantsMatchingLookupInfosResult")] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("fetchParticipantsMatchingLookupInfos:intoPersistentStore:completion:")] void FetchParticipantsMatchingLookupInfos (CKUserIdentityLookupInfo [] lookupInfos, NSPersistentStore persistentStore, NSPersistentCloudKitContainerFetchParticipantsMatchingLookupInfosHandler handler); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("fetchSharesMatchingObjectIDs:error:")] [return: NullAllowed] NSDictionary FetchSharesMatchingObjectIds (NSManagedObjectID [] objectIDs, [NullAllowed] out NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("fetchSharesInPersistentStore:error:")] [return: NullAllowed] CKShare [] FetchSharesInPersistentStore ([NullAllowed] NSPersistentStore persistentStore, [NullAllowed] out NSError error); [Async (ResultTypeName = "NSPersistentCloudKitContainerShareManagedObjectsResult")] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("shareManagedObjects:toShare:completion:")] void ShareManagedObjects (NSManagedObject [] managedObjects, [NullAllowed] CKShare share, NSPersistentCloudKitContainerShareManagedObjectsHandler handler); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2933,13 +2903,13 @@ interface NSPersistentCloudKitContainerOptions { [DesignatedInitializer] NativeHandle Constructor (string containerIdentifier); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("databaseScope", ArgumentSemantic.Assign)] CKDatabaseScope DatabaseScope { get; set; } } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2973,7 +2943,7 @@ interface NSPersistentCloudKitContainerEvent : NSCopying { NSString UserInfoKey { get; } } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSPersistentStoreRequest))] interface NSPersistentCloudKitContainerEventRequest { @@ -2997,7 +2967,7 @@ interface NSPersistentCloudKitContainerEventRequest { NSFetchRequest FetchRequest (); } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSPersistentStoreResult))] [DisableDefaultCtor] @@ -3009,7 +2979,7 @@ interface NSPersistentCloudKitContainerEventResult { NSPersistentCloudKitContainerEventResultType ResultType { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSStagedMigrationManager { @@ -3024,14 +2994,14 @@ interface NSStagedMigrationManager { NativeHandle Constructor (NSMigrationStage [] stages); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface NSMigrationStage { [NullAllowed, Export ("label")] string Label { get; set; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSManagedObjectModelReference { @@ -3054,7 +3024,7 @@ interface NSManagedObjectModelReference { NativeHandle Constructor (string modelName, [NullAllowed] NSBundle bundle, string versionChecksum); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSMigrationStage))] [DisableDefaultCtor] interface NSLightweightMigrationStage { @@ -3066,14 +3036,14 @@ interface NSLightweightMigrationStage { NativeHandle Constructor (string [] versionChecksums); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSAttributeDescription))] interface NSCompositeAttributeDescription { [Export ("elements", ArgumentSemantic.Copy)] NSAttributeDescription [] Elements { get; set; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSMigrationStage))] [DisableDefaultCtor] interface NSCustomMigrationStage { diff --git a/src/corefoundation.cs b/src/corefoundation.cs index 0dc6f18d887a..fbe8280ffdfe 100644 --- a/src/corefoundation.cs +++ b/src/corefoundation.cs @@ -74,7 +74,6 @@ interface DispatchData { IntPtr free { get; } } -#if !WATCH /// Provides the necessary methods needed for accessing the system's global proxy configuration settings and resolving a list of proxies to use for connecting to a URL. [Partial] interface CFNetwork { @@ -82,7 +81,6 @@ interface CFNetwork { [Field ("kCFErrorDomainCFNetwork", "CFNetwork")] NSString ErrorDomain { get; } } -#endif enum CFStringTransform { [Field ("kCFStringTransformStripCombiningMarks")] diff --git a/src/coregraphics.cs b/src/coregraphics.cs index 31fbd105ef4c..6fefdd3d743e 100644 --- a/src/coregraphics.cs +++ b/src/coregraphics.cs @@ -10,7 +10,7 @@ namespace CoreGraphics { - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum CGToneMapping : uint { Default = 0, ImageSpecificLumaScaling, @@ -107,7 +107,6 @@ interface CGPDFInfo { [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Internal] [Field ("kCGPDFContextCreateLinearizedPDF")] @@ -115,7 +114,6 @@ interface CGPDFInfo { [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Internal] [Field ("kCGPDFContextCreatePDFA")] @@ -163,12 +161,12 @@ interface CGColorSpaceNames { [Field ("kCGColorSpaceITUR_709")] NSString ItuR_709 { get; } - [Mac (12, 1), iOS (15, 2), TV (15, 2), Watch (8, 3)] + [Mac (12, 1), iOS (15, 2), TV (15, 2)] [MacCatalyst (15, 2)] [Field ("kCGColorSpaceITUR_709_PQ")] NSString ItuR_709_PQ { get; } - [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [Mac (13, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] [Field ("kCGColorSpaceITUR_709_HLG")] NSString ItuR_709_Hlg { get; } @@ -176,7 +174,7 @@ interface CGColorSpaceNames { [Field ("kCGColorSpaceITUR_2020")] NSString ItuR_2020 { get; } - [Mac (12, 1), iOS (15, 2), TV (15, 2), Watch (8, 3)] + [Mac (12, 1), iOS (15, 2), TV (15, 2)] [MacCatalyst (15, 2)] [Field ("kCGColorSpaceITUR_2020_sRGBGamma")] NSString ItuR_2020_sRgbGamma { get; } @@ -215,7 +213,6 @@ interface CGColorSpaceNames { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Now accessible as GenericCmyk.")] [Field ("kCGColorSpaceGenericCMYK")] @@ -223,7 +220,6 @@ interface CGColorSpaceNames { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Now accessible as AdobeRgb1998.")] [Field ("kCGColorSpaceAdobeRGB1998")] @@ -231,7 +227,6 @@ interface CGColorSpaceNames { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Now accessible as Srgb.")] [Field ("kCGColorSpaceSRGB")] @@ -239,7 +234,6 @@ interface CGColorSpaceNames { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Now accessible as GenericRgb.")] [Field ("kCGColorSpaceGenericRGB")] @@ -247,7 +241,6 @@ interface CGColorSpaceNames { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Now accessible as GenericRgb.")] [Field ("kCGColorSpaceGenericRGBLinear")] @@ -259,43 +252,38 @@ interface CGColorSpaceNames { [iOS (12, 3)] [TV (12, 3)] - [Watch (5, 3)] [MacCatalyst (13, 1)] [Field ("kCGColorSpaceExtendedLinearITUR_2020")] NSString ExtendedLinearItur_2020 { get; } - [iOS (14, 1), TV (14, 2), Watch (7, 1)] + [iOS (14, 1), TV (14, 2)] [MacCatalyst (14, 1)] [Field ("kCGColorSpaceExtendedITUR_2020")] NSString ExtendedItur_2020 { get; } [iOS (12, 3)] [TV (12, 3)] - [Watch (5, 3)] [MacCatalyst (13, 1)] [Field ("kCGColorSpaceExtendedLinearDisplayP3")] NSString ExtendedLinearDisplayP3 { get; } - [iOS (14, 1), TV (14, 2), Watch (7, 1)] + [iOS (14, 1), TV (14, 2)] [MacCatalyst (14, 1)] [Field ("kCGColorSpaceExtendedDisplayP3")] NSString ExtendedDisplayP3 { get; } - [Watch (5, 0)] [Deprecated (PlatformName.MacOSX, 10, 15, 4, message: "Use 'Itur_2100_PQ' instead.")] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'Itur_2100_PQ' instead.")] [Deprecated (PlatformName.TvOS, 13, 4, message: "Use 'Itur_2100_PQ' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'Itur_2100_PQ' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Itur_2100_PQ' instead.")] [Field ("kCGColorSpaceITUR_2020_PQ_EOTF")] NSString Itur_2020_PQ_Eotf { get; } - [iOS (13, 4), TV (13, 4), Watch (6, 2)] + [iOS (13, 4), TV (13, 4)] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'Itur_2100_PQ' instead.")] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'Itur_2100_PQ' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'Itur_2100_PQ' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'Itur_2100_PQ' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'Itur_2100_PQ' instead.")] [Field ("kCGColorSpaceITUR_2020_PQ")] @@ -303,35 +291,30 @@ interface CGColorSpaceNames { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [Deprecated (PlatformName.MacOSX, 10, 15, 4)] [Deprecated (PlatformName.iOS, 13, 4)] [Deprecated (PlatformName.TvOS, 13, 4)] - [Deprecated (PlatformName.WatchOS, 6, 2)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Field ("kCGColorSpaceDisplayP3_PQ_EOTF")] NSString DisplayP3_PQ_Eotf { get; } - [iOS (13, 4), TV (13, 4), Watch (6, 2)] + [iOS (13, 4), TV (13, 4)] [MacCatalyst (13, 1)] [Field ("kCGColorSpaceDisplayP3_PQ")] NSString DisplayP3_PQ { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGColorSpaceDisplayP3_HLG")] NSString DisplayP3_Hlg { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'Itur_2100_PQ' instead.")] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'Itur_2100_PQ' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'Itur_2100_PQ' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'Itur_2100_PQ' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'Itur_2100_PQ' instead.")] [Field ("kCGColorSpaceITUR_2020_HLG")] @@ -339,31 +322,29 @@ interface CGColorSpaceNames { [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGColorSpaceITUR_2100_HLG")] NSString Itur_2100_Hlg { get; } [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGColorSpaceITUR_2100_PQ")] NSString Itur_2100_PQ { get; } - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGColorSpaceExtendedRange")] NSString ExtendedRange { get; } - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGColorSpaceLinearDisplayP3")] NSString LinearDisplayP3 { get; } - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGColorSpaceLinearITUR_2020")] NSString LinearItur_2020 { get; } - [Mac (15, 0), iOS (18, 0), TV (18, 0), Watch (11, 0), MacCatalyst (18, 0)] + [Mac (15, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0)] [Field ("kCGColorSpaceCoreMedia709")] NSString CoreMedia709 { get; } } @@ -424,7 +405,6 @@ interface CGPDFOutlineOptions { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] [Internal] @@ -444,7 +424,6 @@ interface CGPdfTagPropertyKeys { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [StrongDictionary ("CGPdfTagPropertyKeys")] interface CGPdfTagProperties { @@ -458,7 +437,6 @@ interface CGPdfTagProperties { // macOS 10.5 [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] enum CGConstantColor { [Field ("kCGColorWhite")] @@ -470,7 +448,7 @@ enum CGConstantColor { } // Adding suffix *Keys to avoid possible name clash - [NoiOS, NoTV, NoWatch, MacCatalyst (13, 1)] + [NoiOS, NoTV, MacCatalyst (13, 1)] [Static] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use ScreenCaptureKit instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use ScreenCaptureKit instead.")] @@ -501,7 +479,7 @@ interface CGDisplayStreamKeys { NSString YCbCrMatrix { get; } } - [NoiOS, NoTV, NoWatch, MacCatalyst (13, 1)] + [NoiOS, NoTV, MacCatalyst (13, 1)] [Static] interface CGDisplayStreamYCbCrMatrixOptionKeys { @@ -516,7 +494,7 @@ interface CGDisplayStreamYCbCrMatrixOptionKeys { } #if NET - [NoiOS, NoTV, NoWatch, MacCatalyst (13, 1)] + [NoiOS, NoTV, MacCatalyst (13, 1)] [StrongDictionary ("CGSessionKeys")] interface CGSessionProperties { uint UserId { get; } @@ -527,7 +505,7 @@ interface CGSessionProperties { } #endif - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Partial] partial interface CGToneMappingOptionKeys { [Internal] @@ -559,7 +537,7 @@ partial interface CGToneMappingOptionKeys { NSString ExrToneMappingGammaKneeHighKey { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [StrongDictionary ("CGToneMappingOptionKeys")] interface CGToneMappingOptions { bool Use100nitsHlgOotf { get; set; } @@ -571,7 +549,7 @@ interface CGToneMappingOptions { float ExrToneMappingGammaKneeHigh { get; set; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Partial] [Internal] interface CoreGraphicsFields { diff --git a/src/corehaptics.cs b/src/corehaptics.cs index 44d8149d93ff..dd6df1f4d4a5 100644 --- a/src/corehaptics.cs +++ b/src/corehaptics.cs @@ -281,7 +281,7 @@ interface CHHapticEngine { [DesignatedInitializer] NativeHandle Constructor ([NullAllowed] out NSError error); - [NoMac, NoTV] + [NoMac] // AVAudioSession is not available on macOS. [MacCatalyst (13, 1)] [Export ("initWithAudioSession:error:")] [DesignatedInitializer] @@ -322,7 +322,7 @@ interface CHHapticEngine { [Export ("playPatternFromData:error:")] bool PlayPattern (NSData data, [NullAllowed] out NSError outError); - [TV (16, 0), NoWatch, MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Export ("playsAudioOnly")] bool PlaysAudioOnly { get; set; } } @@ -371,11 +371,11 @@ partial interface CHHapticPatternDefinitionKeys { [Field ("CHHapticPatternKeyParameterCurveControlPoints")] NSString ParameterCurveControlPointsKey { get; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("CHHapticPatternKeyEventWaveformUseVolumeEnvelope")] NSString EventWaveformUseVolumeEnvelopeKey { get; } - [TV (16, 0), NoWatch, MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("CHHapticPatternKeyEventWaveformLoopEnabled")] NSString EventWaveformLoopEnabledKey { get; } } @@ -404,7 +404,7 @@ partial interface CHHapticPatternDefinition { [Export ("ParameterCurveControlPointsKey")] NSObject WeakParameterCurveControlPoints { get; set; } [Advice ("The default value is true.")] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] bool EventWaveformUseVolumeEnvelope { get; set; } } @@ -428,7 +428,7 @@ interface CHHapticPattern { [Wrap ("this (patternDefinition.GetDictionary ()!, out outError)")] NativeHandle Constructor (CHHapticPatternDefinition patternDefinition, [NullAllowed] out NSError outError); - [TV (16, 0), NoWatch, MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Export ("initWithContentsOfURL:error:")] NativeHandle Constructor (NSUrl url, [NullAllowed] out NSError error); @@ -444,18 +444,18 @@ interface CHHapticPattern { [Static] [Internal] - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] partial interface CHHapticAudioResourceKeys { [Field ("CHHapticAudioResourceKeyUseVolumeEnvelope")] NSString UseVolumeEnvelopeKey { get; } - [TV (16, 0), NoWatch, MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("CHHapticAudioResourceKeyLoopEnabled")] NSString LoopEnabledKey { get; } } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [StrongDictionary ("CHHapticAudioResourceKeys")] partial interface CHHapticAudioResourceDefinition { [Advice ("The default value is true.")] diff --git a/src/coreimage.cs b/src/coreimage.cs index 798d35cc86f5..be8db0eee89f 100644 --- a/src/coreimage.cs +++ b/src/coreimage.cs @@ -326,7 +326,6 @@ interface CIContext { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Internal, Export ("createCGLayerWithSize:info:")] [return: NullAllowed] @@ -340,7 +339,6 @@ interface CIContext { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("reclaimResources")] void ReclaimResources (); @@ -391,7 +389,6 @@ interface CIContext { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("offlineGPUCount")] [Static] @@ -399,7 +396,6 @@ interface CIContext { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 14)] [Export ("contextForOfflineGPUAtIndex:")] @@ -653,7 +649,6 @@ string Name { void RegisterFilterName (string name, NSObject constructorObject, NSDictionary classAttributes); #else [MacCatalyst (13, 1)] - [NoWatch] [Static] [Export ("registerFilterName:constructor:classAttributes:")] #if NET @@ -666,7 +661,6 @@ string Name { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("apply:arguments:options:")] [return: NullAllowed] @@ -674,7 +668,6 @@ string Name { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("viewForUIConfiguration:excludedKeys:")] IKFilterUIView GetFilterUIView (NSDictionary configurationOptions, [NullAllowed] NSArray excludedKeys); @@ -1507,7 +1500,6 @@ interface CIUIParameterSet { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Static] interface CIFilterApply { @@ -1535,7 +1527,6 @@ interface CIFilterApply { [iOS (17, 0)] [MacCatalyst (17, 0)] #endif - [NoWatch] [NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1781,7 +1772,6 @@ interface CIImage : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11)] [Static] @@ -1790,7 +1780,6 @@ interface CIImage : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11)] [Static] @@ -1940,7 +1929,6 @@ interface CIImage : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'CIImage (CGImage)' instead.")] [Export ("initWithCGLayer:")] @@ -1948,7 +1936,6 @@ interface CIImage : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'CIImage (CGImage)' instead.")] [EditorBrowsable (EditorBrowsableState.Advanced)] @@ -1957,7 +1944,6 @@ interface CIImage : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("this (layer, options.GetDictionary ())")] NativeHandle Constructor (CGLayer layer, [NullAllowed] CIImageInitializationOptions options); @@ -2046,21 +2032,18 @@ interface CIImage : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("initWithBitmapImageRep:")] NativeHandle Constructor (NSImageRep imageRep); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("drawAtPoint:fromRect:operation:fraction:")] void Draw (CGPoint point, CGRect srcRect, NSCompositingOperation op, nfloat delta); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("drawInRect:fromRect:operation:fraction:")] void Draw (CGRect dstRect, CGRect srcRect, NSCompositingOperation op, nfloat delta); @@ -2088,7 +2071,6 @@ interface CIImage : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("definition")] CIFilterShape Definition { get; } @@ -2747,7 +2729,6 @@ interface CIKernel { string Name { get; } [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("setROISelector:")] @@ -2866,7 +2847,6 @@ interface CIImageAccumulator { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [BaseType (typeof (NSObject))] interface CIPlugIn { @@ -3483,7 +3463,6 @@ interface CIAreaHistogram : CIAreaHistogramProtocol { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [CoreImageFilterProperty ("outputImageMPS")] CIImage OutputImageMps { get; } diff --git a/src/corelocation.cs b/src/corelocation.cs index 6898bf1941f6..07b38a503d6e 100644 --- a/src/corelocation.cs +++ b/src/corelocation.cs @@ -34,7 +34,6 @@ namespace CoreLocation { /// An enumeration whose values specify whether the device is inside or outside a region or unknown. [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] // NSInteger -> CLRegion.h public enum CLRegionState : long { @@ -48,7 +47,6 @@ public enum CLRegionState : long { /// The returned value of varies based on power output and the physical environment. It is difficult to translate these qualitative values into absolute physical distances. /// [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] // NSInteger -> CLRegion.h public enum CLProximity : long { @@ -60,9 +58,9 @@ public enum CLProximity : long { [ErrorDomain ("CLLocationPushServiceErrorDomain")] #if NET // Apple fixed this in Xcode 13.1 - [iOS (15,0), NoTV, NoMacCatalyst, NoMac, NoWatch] + [iOS (15,0), NoTV, NoMacCatalyst, NoMac] #else - [iOS (15, 0), NoTV, MacCatalyst (15, 0), NoMac, NoWatch] + [iOS (15, 0), NoTV, MacCatalyst (15, 0), NoMac] #endif [Native] public enum CLLocationPushServiceError : long { @@ -73,17 +71,17 @@ public enum CLLocationPushServiceError : long { UnsupportedPlatform = 4, } - [Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] [Native] public enum CLMonitoringState : ulong { Unknown, Satisfied, Unsatisfied, - [NoWatch, Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2), NoTV] + [Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2), NoTV] Unmonitored, } - [Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] [Native] public enum CLLiveUpdateConfiguration : long { Default = 0, @@ -101,7 +99,6 @@ public enum CLLiveUpdateConfiguration : long { /// /// Apple documentation for CLHeading [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // will crash, see CoreLocation.cs for compatibility stubs @@ -147,7 +144,7 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [Export ("course")] double Course { get; } - [Watch (6, 2), TV (13, 4), iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("courseAccuracy")] double CourseAccuracy { get; } @@ -157,7 +154,7 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [Export ("speed")] double Speed { get; } - [Watch (6, 2), TV (13, 4), iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("speedAccuracy")] double SpeedAccuracy { get; } @@ -177,19 +174,18 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [Export ("initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:speed:timestamp:")] NativeHandle Constructor (CLLocationCoordinate2D coordinate, double altitude, double hAccuracy, double vAccuracy, double course, double speed, NSDate timestamp); - [Watch (6, 2), TV (13, 4), iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:")] NativeHandle Constructor (CLLocationCoordinate2D coordinate, double altitude, double hAccuracy, double vAccuracy, double course, double courseAccuracy, double speed, double speedAccuracy, NSDate timestamp); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo:")] NativeHandle Constructor (CLLocationCoordinate2D coordinate, double altitude, double horizontalAccuracy, double verticalAccuracy, double course, double courseAccuracy, double speed, double speedAccuracy, NSDate timestamp, CLLocationSourceInformation sourceInfo); // Apple keep changing the 'introduction' of this field (5.0->8.0->5.0) but it was not available in 6.1 // nor in 7.0 - but it works on my iPad3 running iOS 7.1 [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Field ("kCLErrorUserInfoAlternateRegionKey")] NSString ErrorUserInfoAlternateRegionKey { get; } @@ -218,7 +214,7 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [Field ("kCLLocationAccuracyThreeKilometers")] double AccuracyThreeKilometers { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("kCLLocationAccuracyReduced")] double AccuracyReduced { get; } @@ -227,11 +223,11 @@ partial interface CLLocation : NSSecureCoding, NSCopying, CKRecordValue { [NullAllowed, Export ("floor", ArgumentSemantic.Copy)] CLFloor Floor { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("ellipsoidalAltitude")] double EllipsoidalAltitude { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("sourceInformation")] CLLocationSourceInformation SourceInformation { get; } } @@ -263,7 +259,6 @@ partial interface CLLocationManager { [NullAllowed, Export ("location", ArgumentSemantic.Copy)] CLLocation Location { get; } - // __WATCHOS_PROHIBITED removed in Xcode 8.0 beta 2, assuming it's valid for 3.0+ [NoTV] [MacCatalyst (13, 1)] [Export ("startUpdatingLocation")] @@ -276,30 +271,25 @@ partial interface CLLocationManager { bool LocationServicesEnabled { get; } [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("headingFilter", ArgumentSemantic.Assign)] double HeadingFilter { get; set; } [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("startUpdatingHeading")] void StartUpdatingHeading (); [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("stopUpdatingHeading")] void StopUpdatingHeading (); [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("dismissHeadingCalibrationDisplay")] void DismissHeadingCalibrationDisplay (); - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 6, 0)] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Set the purpose using the NSLocationUsageDescription key in the Info.plist instead.")] @@ -311,18 +301,15 @@ partial interface CLLocationManager { string Purpose { get; set; } [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("headingAvailable"), Static] bool HeadingAvailable { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("significantLocationChangeMonitoringAvailable"), Static] bool SignificantLocationChangeMonitoringAvailable { get; } - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'IsMonitoringAvailable' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'IsMonitoringAvailable' instead.")] @@ -331,7 +318,6 @@ partial interface CLLocationManager { [Export ("regionMonitoringAvailable"), Static] bool RegionMonitoringAvailable { get; } - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 6, 0, message: "Use 'IsMonitoringAvailable' and 'AuthorizationStatus' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'IsMonitoringAvailable' and 'AuthorizationStatus' instead.")] @@ -341,42 +327,35 @@ partial interface CLLocationManager { bool RegionMonitoringEnabled { get; } [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("headingOrientation", ArgumentSemantic.Assign)] CLDeviceOrientation HeadingOrientation { get; set; } [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("heading", ArgumentSemantic.Copy)] CLHeading Heading { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("maximumRegionMonitoringDistance")] double MaximumRegionMonitoringDistance { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("monitoredRegions", ArgumentSemantic.Copy)] NSSet MonitoredRegions { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("startMonitoringSignificantLocationChanges")] void StartMonitoringSignificantLocationChanges (); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("stopMonitoringSignificantLocationChanges")] void StopMonitoringSignificantLocationChanges (); - [NoWatch] [NoTV] [NoMac] [Deprecated (PlatformName.iOS, 6, 0)] @@ -385,7 +364,6 @@ partial interface CLLocationManager { [Export ("startMonitoringForRegion:desiredAccuracy:")] void StartMonitoring (CLRegion region, double desiredAccuracy); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.iOS, 17, 0, message: "Use 'void RemoveCondition (string identifier)' instead.")] @@ -394,7 +372,7 @@ partial interface CLLocationManager { [Export ("stopMonitoringForRegion:")] void StopMonitoring (CLRegion region); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("authorizationStatus")] CLAuthorizationStatus AuthorizationStatus { get; } @@ -402,13 +380,11 @@ partial interface CLLocationManager { [Deprecated (PlatformName.iOS, 14, 0, message: "Use the instance property 'AuthorizationStatus' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use the instance 'AuthorizationStatus' property instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use the instance property AuthorizationStatus' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use instance property 'AuthorizationStatus' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use the instance property 'AuthorizationStatus' instead.")] [Export ("authorizationStatus")] [Static] CLAuthorizationStatus Status { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.iOS, 17, 0, message: "Use 'void AddCondition (CLCondition condition, string identifier)' instead.")] @@ -422,13 +398,11 @@ partial interface CLLocationManager { [Export ("activityType", ArgumentSemantic.Assign)] CLActivityType ActivityType { get; set; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("pausesLocationUpdatesAutomatically", ArgumentSemantic.Assign)] bool PausesLocationUpdatesAutomatically { get; set; } - [NoWatch] [NoTV] [NoMac] [Deprecated (PlatformName.iOS, 13, 0, message: "Not used anymore. Call will not have any effect.")] @@ -437,7 +411,6 @@ partial interface CLLocationManager { [Export ("allowDeferredLocationUpdatesUntilTraveled:timeout:")] void AllowDeferredLocationUpdatesUntil (double distance, double timeout); - [NoWatch] [NoTV] [NoMac] [Deprecated (PlatformName.iOS, 13, 0, message: "Not used anymore. Call will not have any effect.")] @@ -446,7 +419,6 @@ partial interface CLLocationManager { [Export ("disallowDeferredLocationUpdates")] void DisallowDeferredLocationUpdates (); - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 13, 0, message: "Not used anymore. It will always return 'false'.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Not used anymore. It will always return 'false'.")] @@ -460,13 +432,11 @@ partial interface CLLocationManager { [Field ("CLTimeIntervalMax")] double MaxTimeInterval { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Static, Export ("isMonitoringAvailableForClass:")] bool IsMonitoringAvailable (Class regionClass); - [NoWatch] [NoTV] [NoMac] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'RangedBeaconConstraints' instead.")] @@ -475,12 +445,11 @@ partial interface CLLocationManager { [Export ("rangedRegions", ArgumentSemantic.Copy)] NSSet RangedRegions { get; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("rangedBeaconConstraints", ArgumentSemantic.Copy)] NSSet RangedBeaconConstraints { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.iOS, 17, 0, message: "Use the class 'CLMonitor' instead.")] @@ -489,7 +458,6 @@ partial interface CLLocationManager { [Export ("requestStateForRegion:")] void RequestState (CLRegion region); - [NoWatch] [NoTV] [NoMac] [NoMacCatalyst] @@ -498,12 +466,11 @@ partial interface CLLocationManager { [Export ("startRangingBeaconsInRegion:")] void StartRangingBeacons (CLBeaconRegion region); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("startRangingBeaconsSatisfyingConstraint:")] void StartRangingBeacons (CLBeaconIdentityConstraint constraint); - [NoWatch] [NoTV] [NoMac] [NoMacCatalyst] @@ -512,12 +479,11 @@ partial interface CLLocationManager { [Export ("stopRangingBeaconsInRegion:")] void StopRangingBeacons (CLBeaconRegion region); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("stopRangingBeaconsSatisfyingConstraint:")] void StopRangingBeacons (CLBeaconIdentityConstraint constraint); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Static] @@ -533,13 +499,11 @@ partial interface CLLocationManager { [Export ("requestAlwaysAuthorization")] void RequestAlwaysAuthorization (); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("startMonitoringVisits")] void StartMonitoringVisits (); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("stopMonitoringVisits")] @@ -550,7 +514,7 @@ partial interface CLLocationManager { [Export ("allowsBackgroundLocationUpdates")] bool AllowsBackgroundLocationUpdates { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("showsBackgroundLocationIndicator")] bool ShowsBackgroundLocationIndicator { get; set; } @@ -559,39 +523,39 @@ partial interface CLLocationManager { [Export ("requestLocation")] void RequestLocation (); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("accuracyAuthorization")] CLAccuracyAuthorization AccuracyAuthorization { get; } [Async] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("requestTemporaryFullAccuracyAuthorizationWithPurposeKey:completion:")] void RequestTemporaryFullAccuracyAuthorization (string purposeKey, [NullAllowed] Action completion); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("requestTemporaryFullAccuracyAuthorizationWithPurposeKey:")] void RequestTemporaryFullAccuracyAuthorization (string purposeKey); - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("authorizedForWidgetUpdates")] bool IsAuthorizedForWidgetUpdates { [Bind ("isAuthorizedForWidgetUpdates")] get; } [Async] - [NoWatch, NoTV, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] [iOS (15, 0)] [Export ("startMonitoringLocationPushesWithCompletion:")] void StartMonitoringLocationPushes ([NullAllowed] Action completion); - [NoWatch, NoTV, NoMac, NoMacCatalyst] + [NoTV, NoMac, NoMacCatalyst] [iOS (15, 0)] [Export ("stopMonitoringLocationPushes")] void StopMonitoringLocationPushes (); - [Watch (9, 1), NoTV, NoMac, NoiOS, NoMacCatalyst] + [NoTV, NoMac, NoiOS, NoMacCatalyst] [Export ("requestHistoricalLocationsWithPurposeKey:sampleCount:completionHandler:")] void RequestHistoricalLocations (string purposeKey, nint sampleCount, RequestHistoricalLocationsCompletionHandler handler); } @@ -602,7 +566,6 @@ interface ICLLocationManagerDelegate { } [Model] [Protocol] partial interface CLLocationManagerDelegate { - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 6, 0)] [MacCatalyst (13, 1)] @@ -611,13 +574,11 @@ partial interface CLLocationManagerDelegate { void UpdatedLocation (CLLocationManager manager, CLLocation newLocation, CLLocation oldLocation); [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("locationManager:didUpdateHeading:"), EventArgs ("CLHeadingUpdated")] void UpdatedHeading (CLLocationManager manager, CLHeading newHeading); [NoTV] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("locationManagerShouldDisplayHeadingCalibration:"), DelegateName ("CLLocationManagerEventArgs"), DefaultValue (true)] bool ShouldDisplayHeadingCalibration (CLLocationManager manager); @@ -625,37 +586,31 @@ partial interface CLLocationManagerDelegate { [Export ("locationManager:didFailWithError:"), EventArgs ("NSError", true)] void Failed (CLLocationManager manager, NSError error); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManager:didEnterRegion:"), EventArgs ("CLRegion")] void RegionEntered (CLLocationManager manager, CLRegion region); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManager:didExitRegion:"), EventArgs ("CLRegion")] void RegionLeft (CLLocationManager manager, CLRegion region); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManager:monitoringDidFailForRegion:withError:"), EventArgs ("CLRegionError")] void MonitoringFailed (CLLocationManager manager, [NullAllowed] CLRegion region, NSError error); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManager:didStartMonitoringForRegion:"), EventArgs ("CLRegion")] void DidStartMonitoringForRegion (CLLocationManager manager, CLRegion region); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManager:didDetermineState:forRegion:"), EventArgs ("CLRegionStateDetermined")] void DidDetermineState (CLLocationManager manager, CLRegionState state, CLRegion region); - [NoWatch] [NoTV] [NoMac] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'DidRangeBeaconsSatisfyingConstraint' instead.")] @@ -664,13 +619,12 @@ partial interface CLLocationManagerDelegate { [Export ("locationManager:didRangeBeacons:inRegion:"), EventArgs ("CLRegionBeaconsRanged")] void DidRangeBeacons (CLLocationManager manager, CLBeacon [] beacons, CLBeaconRegion region); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("locationManager:didRangeBeacons:satisfyingConstraint:")] [EventArgs ("CLRegionBeaconsConstraintRanged")] void DidRangeBeaconsSatisfyingConstraint (CLLocationManager manager, CLBeacon [] beacons, CLBeaconIdentityConstraint beaconConstraint); - [NoWatch] [NoTV] [NoMac] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'DidFailRangingBeacons' instead.")] @@ -679,13 +633,12 @@ partial interface CLLocationManagerDelegate { [Export ("locationManager:rangingBeaconsDidFailForRegion:withError:"), EventArgs ("CLRegionBeaconsFailed")] void RangingBeaconsDidFailForRegion (CLLocationManager manager, CLBeaconRegion region, NSError error); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("locationManager:didFailRangingBeaconsForConstraint:error:")] [EventArgs ("CLRegionBeaconsConstraintFailed")] void DidFailRangingBeacons (CLLocationManager manager, CLBeaconIdentityConstraint beaconConstraint, NSError error); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManager:didVisit:"), EventArgs ("CLVisited")] @@ -694,7 +647,6 @@ partial interface CLLocationManagerDelegate { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'DidChangeAuthorization' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'DidChangeAuthorization' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'DidChangeAuthorization' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'DidChangeAuthorization' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'DidChangeAuthorization' instead.")] [Export ("locationManager:didChangeAuthorizationStatus:"), EventArgs ("CLAuthorizationChanged")] void AuthorizationChanged (CLLocationManager manager, CLAuthorizationStatus status); @@ -702,25 +654,22 @@ partial interface CLLocationManagerDelegate { [Export ("locationManager:didUpdateLocations:"), EventArgs ("CLLocationsUpdated")] void LocationsUpdated (CLLocationManager manager, CLLocation [] locations); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManagerDidPauseLocationUpdates:"), EventArgs ("")] void LocationUpdatesPaused (CLLocationManager manager); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManagerDidResumeLocationUpdates:"), EventArgs ("")] void LocationUpdatesResumed (CLLocationManager manager); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("locationManager:didFinishDeferredUpdatesWithError:"), EventArgs ("NSError", true)] void DeferredUpdatesFinished (CLLocationManager manager, [NullAllowed] NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("locationManagerDidChangeAuthorization:")] void DidChangeAuthorization (CLLocationManager manager); @@ -788,7 +737,6 @@ partial interface CLRegion : NSSecureCoding, NSCopying { [BaseType (typeof (NSObject))] [DisableDefaultCtor] // will crash, see CoreLocation.cs for compatibility stubs interface CLPlacemark : NSSecureCoding, NSCopying { - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CLPlacemark' properties to access data.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CLPlacemark' properties to access data.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'CLPlacemark' properties to access data.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'CLPlacemark' properties to access data.")] @@ -858,7 +806,6 @@ interface CLPlacemark : NSSecureCoding, NSCopying { [MacCatalyst (13, 1)] [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'CLCircularGeographicCondition' instead.")] [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'CLCircularGeographicCondition' instead.")] - [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'CLCircularGeographicCondition' instead.")] [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'CLCircularGeographicCondition' instead.")] [BaseType (typeof (CLRegion))] #if MONOMAC @@ -889,7 +836,6 @@ partial interface CLCircularRegion { /// /// /// Apple documentation for CLBeaconRegion - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'CLBeaconIdentityCondition' instead.")] @@ -975,7 +921,6 @@ partial interface CLBeaconRegion { } /// - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -1030,7 +975,6 @@ interface CLGeocoder { [Async] void ReverseGeocodeLocation (CLLocation location, [NullAllowed] NSLocale locale, CLGeocodeCompletionHandler completionHandler); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GeocodeAddress (string, CLRegion, NSLocale, CLGeocodeCompletionHandler)' instead.")] @@ -1071,7 +1015,6 @@ interface CLGeocoder { /// Relates a location and radius with an arrival and departure time. /// /// Apple documentation for CLVisit - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -1090,7 +1033,7 @@ interface CLVisit : NSSecureCoding, NSCopying { double HorizontalAccuracy { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'CLBeaconIdentityCondition' instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use 'CLBeaconIdentityCondition' instead.")] @@ -1121,9 +1064,9 @@ interface CLBeaconIdentityConstraint : NSCopying, NSSecureCoding { } #if NET // Apple fixed this in Xcode 13.1 - [iOS (15,0), NoTV, NoMacCatalyst, NoMac, NoWatch] + [iOS (15,0), NoTV, NoMacCatalyst, NoMac] #else - [iOS (15, 0), NoTV, MacCatalyst (15, 0), NoMac, NoWatch] + [iOS (15, 0), NoTV, MacCatalyst (15, 0), NoMac] #endif [Protocol] interface CLLocationPushServiceExtension { @@ -1135,7 +1078,7 @@ interface CLLocationPushServiceExtension { void ServiceExtensionWillTerminate (); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface CLLocationSourceInformation : NSCopying, NSSecureCoding { [Export ("initWithSoftwareSimulationState:andExternalAccessoryState:")] @@ -1148,13 +1091,12 @@ interface CLLocationSourceInformation : NSCopying, NSSecureCoding { bool IsProducedByAccessory { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CLUpdate { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'Stationary' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'Stationary' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'Stationary' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'Stationary' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'Stationary' instead.")] [Export ("isStationary")] bool IsStationary { get; } @@ -1162,44 +1104,44 @@ interface CLUpdate { [NullAllowed, Export ("location")] CLLocation Location { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationDenied")] bool AuthorizationDenied { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationDeniedGlobally")] bool AuthorizationDeniedGlobally { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationRestricted")] bool AuthorizationRestricted { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("stationary")] bool Stationary { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("insufficientlyInUse")] bool InsufficientlyInUse { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("locationUnavailable")] bool LocationUnavailable { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("accuracyLimited")] bool AccuracyLimited { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("serviceSessionRequired")] bool ServiceSessionRequired { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationRequestInProgress")] bool AuthorizationRequestInProgress { get; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLMonitoringRecord : NSSecureCoding { @@ -1210,7 +1152,7 @@ interface CLMonitoringRecord : NSSecureCoding { CLMonitoringEvent LastEvent { get; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLMonitoringEvent : NSSecureCoding { @@ -1226,48 +1168,48 @@ interface CLMonitoringEvent : NSSecureCoding { [Export ("date", ArgumentSemantic.Strong)] NSDate Date { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationDenied")] bool AuthorizationDenied { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationDeniedGlobally")] bool AuthorizationDeniedGlobally { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationRestricted")] bool AuthorizationRestricted { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("insufficientlyInUse")] bool InsufficientlyInUse { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("accuracyLimited")] bool AccuracyLimited { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("conditionUnsupported")] bool ConditionUnsupported { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("conditionLimitExceeded")] bool ConditionLimitExceeded { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("persistenceUnavailable")] bool PersistenceUnavailable { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("serviceSessionRequired")] bool ServiceSessionRequired { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("authorizationRequestInProgress")] bool AuthorizationRequestInProgress { get; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CLMonitorConfiguration { [Export ("name")] @@ -1284,7 +1226,7 @@ interface CLMonitorConfiguration { CLMonitorConfiguration Create (string name, DispatchQueue queue, Action eventHandler); } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLMonitor { @@ -1313,7 +1255,7 @@ interface CLMonitor { CLMonitoringRecord GetMonitoringRecord (string identifier); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLLocationUpdater { @@ -1337,11 +1279,11 @@ interface CLLocationUpdater { void Invalidate (); } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CLCondition : NSSecureCoding, NSCopying { } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CLCondition))] interface CLCircularGeographicCondition : NSSecureCoding { [Export ("center")] @@ -1354,7 +1296,7 @@ interface CLCircularGeographicCondition : NSSecureCoding { NativeHandle Constructor (CLLocationCoordinate2D center, double radius); } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CLCondition))] [DisableDefaultCtor] interface CLBeaconIdentityCondition : NSCopying, NSSecureCoding { @@ -1381,26 +1323,26 @@ interface CLBeaconIdentityCondition : NSCopying, NSSecureCoding { delegate void CLBackgroundActivitySessionCreateHandler (CLBackgroundActivitySessionDiagnostic diagnostic); - [Watch (10, 0), TV (18, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [TV (18, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLBackgroundActivitySession { - [Watch (10, 0), NoMac, iOS (17, 0)] + [NoMac, iOS (17, 0)] [Export ("invalidate")] void Invalidate (); - [Watch (10, 0), NoMac, iOS (17, 0)] + [NoMac, iOS (17, 0)] [Static] [Export ("backgroundActivitySession")] CLBackgroundActivitySession Create (); - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("backgroundActivitySessionWithQueue:handler:")] CLBackgroundActivitySession Create (DispatchQueue queue, CLBackgroundActivitySessionCreateHandler handler); } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] interface CLBackgroundActivitySessionDiagnostic { [Export ("authorizationDenied")] @@ -1415,17 +1357,15 @@ interface CLBackgroundActivitySessionDiagnostic { [Export ("insufficientlyInUse")] bool InsufficientlyInUse { get; } - [NoWatch] [Export ("serviceSessionRequired")] bool ServiceSessionRequired { get; } - [NoWatch] [Export ("authorizationRequestInProgress")] bool AuthorizationRequestInProgress { get; } } [Native] - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] public enum CLServiceSessionAuthorizationRequirement : long { None = 0, WhenInUse = 1, @@ -1433,7 +1373,7 @@ public enum CLServiceSessionAuthorizationRequirement : long { Always = 2, } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLServiceSessionDiagnostic { @@ -1464,7 +1404,7 @@ interface CLServiceSessionDiagnostic { delegate void CLServiceSessionCreateHandler (CLServiceSessionDiagnostic diagnostic); - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface CLServiceSession { diff --git a/src/corelocationui.cs b/src/corelocationui.cs index 458b97cd5e7d..4ac647c5c194 100644 --- a/src/corelocationui.cs +++ b/src/corelocationui.cs @@ -11,7 +11,7 @@ namespace CoreLocationUI { - [NoTV, NoMac, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum CLLocationButtonIcon : long { None = 0, @@ -19,7 +19,7 @@ public enum CLLocationButtonIcon : long { ArrowOutline, } - [NoTV, NoMac, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum CLLocationButtonLabel : long { None = 0, @@ -30,7 +30,7 @@ public enum CLLocationButtonLabel : long { ShareMyCurrentLocation, } - [NoTV, NoMac, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UIControl))] interface CLLocationButton : NSSecureCoding { diff --git a/src/coremedia.cs b/src/coremedia.cs index 7bf75c881737..b9b57c837f45 100644 --- a/src/coremedia.cs +++ b/src/coremedia.cs @@ -5,6 +5,8 @@ // using System; + +using CoreFoundation; using Foundation; using ObjCRuntime; @@ -13,7 +15,6 @@ namespace CoreMedia { /// Class that manages the repetitive allocation and deallocation of large blocks of memory. /// /// - [Watch (6, 0)] [MacCatalyst (13, 1)] [Partial] interface CMMemoryPool { @@ -23,13 +24,13 @@ interface CMMemoryPool { IntPtr AgeOutPeriodSelector { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] public enum CMFormatDescriptionProjectionKind { [Field ("kCMFormatDescriptionProjectionKind_Rectilinear")] Rectilinear, } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] public enum CMFormatDescriptionViewPackingKind { [Field ("kCMFormatDescriptionViewPackingKind_SideBySide")] SideBySide, @@ -40,7 +41,6 @@ public enum CMFormatDescriptionViewPackingKind { [Static] [Internal] - [Watch (6, 0)] [MacCatalyst (13, 1)] interface CMTextMarkupAttributesKeys { [Internal] @@ -78,7 +78,6 @@ interface CMTextMarkupAttributesKeys { [Static] [Internal] - [Watch (6, 0)] [MacCatalyst (13, 1)] interface CMSampleAttachmentKey { [Field ("kCMSampleAttachmentKey_NotSync")] @@ -215,18 +214,17 @@ interface CMSampleAttachmentKey { [Field ("kCMSampleBufferAttachmentKey_ForceKeyFrame")] NSString ForceKeyFrameKey { get; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Field ("kCMSampleAttachmentKey_HDR10PlusPerFrameData")] NSString Hdr10PlusPerFrameDataKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Field ("kCMSampleAttachmentKey_PostDecodeProcessingMetadata")] NSString PostDecodeProcessingMetadataKey { get; } } /// The keys for attachments. - [Watch (6, 0)] [MacCatalyst (13, 1)] [StrongDictionary ("CMSampleAttachmentKey")] interface CMSampleBufferAttachmentSettings { @@ -264,16 +262,15 @@ interface CMSampleBufferAttachmentSettings { [MacCatalyst (13, 1)] bool ForceKeyFrame { get; set; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] NSData Hdr10PlusPerFrameData { get; set; } // it is a CFData, but that is a toll-free bridged - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] NSDictionary PostDecodeProcessingMetadata { get; set; } // it is a CFDictionary, but that is a toll-free bridged } [Internal] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] interface CMHevcTemporalLevelInfoKeys { @@ -300,7 +297,6 @@ interface CMHevcTemporalLevelInfoKeys { NSString LevelIndexKey { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [StrongDictionary ("CMHevcTemporalLevelInfoKeys")] interface CMHevcTemporalLevelInfoSettings { @@ -316,7 +312,6 @@ interface CMHevcTemporalLevelInfoSettings { #if false // right now the generator can't add fields in a partial struct - [Watch (6,0)] [Partial] interface CMTime { [Field ("kCMTimeValueKey")] @@ -332,4 +327,168 @@ interface CMTime { NSString FlagsKey { get; } } #endif + + [Flags] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + public enum CMStereoViewComponents : ulong { + None = 0x0, + LeftEye = 1uL << 0, + RightEye = 1uL << 1, + } + + [Flags] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + public enum CMStereoViewInterpretationOptions : ulong { + Default = 0, + StereoOrderReversed = 1uL << 0, + AdditionalViews = 1uL << 1, + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + public enum CMTagCollectionError { + Success = 0, + ParamErr = -15740, + AllocationFailed = -15741, + InternalError = -15742, + InvalidTag = -15743, + InvalidTagCollectionDictionary = -15744, + InvalidTagCollectionData = -15745, + TagNotFound = -15746, + InvalidTagCollectionDataVersion = -15747, + ExhaustedBufferSize = -15748, + NotYetImplemented = -15749, + } + + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + public enum CMTaggedBufferGroupError { + Success = 0, + ParamErr = -15780, + AllocationFailed = -15781, + InternalError = -15782, + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + public enum CMTagError { + Success = 0, + ParamErr = -15730, + AllocationFailed = -15731, + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + public enum CMTagCategory : uint { + Undefined = 0, + MediaType = ('m' << 24) + ('d' << 16) + ('i' << 8) + 'a', // 'mdia' + MediaSubType = ('m' << 24) + ('s' << 16) + ('u' << 8) + 'b', // 'msub' + TrackId = ('t' << 24) + ('r' << 16) + ('a' << 8) + 'k', // 'trak' + ChannelId = ('v' << 24) + ('c' << 16) + ('h' << 8) + 'n', // 'vchn' + VideoLayerId = ('v' << 24) + ('l' << 16) + ('a' << 8) + 'y', // 'vlay' + PixelFormat = ('p' << 24) + ('i' << 16) + ('x' << 8) + 'f', // 'pixf' + PackingType = ('p' << 24) + ('a' << 16) + ('c' << 8) + 'k', // 'pack' + ProjectionType = ('p' << 24) + ('r' << 16) + ('o' << 8) + 'j', // 'proj' + StereoView = ('e' << 24) + ('y' << 16) + ('e' << 8) + 's', // 'eyes' + StereoViewInterpretation = ('e' << 24) + ('y' << 16) + ('i' << 8) + 'p', // 'eyip' + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + public enum CMTagDataType : uint { + Invalid = 0, + SInt64 = 2, + Float64 = 3, + OSType = 5, + Flags = 7, + } + + [Internal] + [Partial] + interface CMTagCollectionConstants { + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + [Field ("kCMTagCollectionTagsArrayKey")] + NSString ArrayKey { get; } + } + + [Internal] + [Partial] + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + interface CMTagConstants { + [Field ("kCMTagInvalid")] + CMTag Invalid { get; } + + [Field ("kCMTagMediaTypeVideo")] + CMTag MediaTypeVideo { get; } + + [Field ("kCMTagMediaSubTypeMebx")] + CMTag MediaSubTypeMebx { get; } + + [Field ("kCMTagMediaTypeAudio")] + CMTag MediaTypeAudio { get; } + + [Field ("kCMTagMediaTypeMetadata")] + CMTag MediaTypeMetadata { get; } + + [Field ("kCMTagStereoLeftEye")] + CMTag StereoLeftEye { get; } + + [Field ("kCMTagStereoRightEye")] + CMTag StereoRightEye { get; } + + [Field ("kCMTagStereoLeftAndRightEye")] + CMTag StereoLeftAndRightEye { get; } + + [Field ("kCMTagStereoNone")] + CMTag StereoNone { get; } + + [Field ("kCMTagStereoInterpretationOrderReversed")] + CMTag StereoInterpretationOrderReversed { get; } + + [Field ("kCMTagProjectionTypeRectangular")] + CMTag ProjectionTypeRectangular { get; } + + [Field ("kCMTagProjectionTypeEquirectangular")] + CMTag ProjectionTypeEquirectangular { get; } + + [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Mac (15, 0)] + [Field ("kCMTagProjectionTypeHalfEquirectangular")] + CMTag ProjectionTypeHalfEquirectangular { get; } + + [Field ("kCMTagProjectionTypeFisheye")] + CMTag ProjectionTypeFisheye { get; } + + [Field ("kCMTagPackingTypeNone")] + CMTag PackingTypeNone { get; } + + [Field ("kCMTagPackingTypeSideBySide")] + CMTag PackingTypeSideBySide { get; } + + [Field ("kCMTagPackingTypeOverUnder")] + CMTag PackingTypeOverUnder { get; } + + [Field ("kCMTagValueKey")] + NSString ValueKey { get; } + + [Field ("kCMTagCategoryKey")] + NSString CategoryKey { get; } + + [Field ("kCMTagDataTypeKey")] + NSString DataTypeKey { get; } + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + public enum CMProjectionType : ulong { + Rectangular = ('r' << 24) + ('e' << 16) + ('c' << 8) + 't', // 'rect', + Equirectangular = ('e' << 24) + ('q' << 16) + ('u' << 8) + 'i', // 'equi', + HalfEquirectangular = ('h' << 24) + ('e' << 16) + ('q' << 8) + 'u', // 'hequ', + Fisheye = ('f' << 24) + ('i' << 16) + ('s' << 8) + 'h', // 'fish', + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + public enum CMPackingType : ulong { + None = ('n' << 24) + ('o' << 16) + ('n' << 8) + 'e', // 'none', + SideBySide = ('s' << 24) + ('i' << 16) + ('d' << 8) + 'e', // 'side', + OverUnder = ('o' << 24) + ('v' << 16) + ('e' << 8) + 'r', // 'over', + } + + [MacCatalyst (17, 0), TV (17, 0), Mac (14, 0), iOS (17, 0)] + public enum CMTaggedBufferGroupFormatType { + TaggedBufferGroup = ('t' << 24) + ('b' << 16) + ('g' << 8) + 'r', // 'tbgr', + } } diff --git a/src/coremidi.cs b/src/coremidi.cs index 34ba857343d7..588c903dd1be 100644 --- a/src/coremidi.cs +++ b/src/coremidi.cs @@ -41,7 +41,7 @@ using NativeHandle = System.IntPtr; #endif -#if TVOS || WATCH +#if TVOS using MidiEndpoint = System.Object; using MidiCIDeviceIdentification = System.Object; using MidiCIDeviceIdentification_Blittable = System.Object; @@ -53,7 +53,6 @@ namespace CoreMidi { - [Watch (8, 0)] [TV (15, 0)] [MacCatalyst (13, 1)] // NSUInteger -> MIDINetworkSession.h @@ -64,7 +63,7 @@ public enum MidiNetworkConnectionPolicy : ulong { Anyone, } - [iOS (14, 0), TV (15, 0), Watch (8, 0)] + [iOS (14, 0), TV (15, 0)] [MacCatalyst (14, 0)] [NativeName ("MIDIProtocolID")] public enum MidiProtocolId { @@ -72,7 +71,7 @@ public enum MidiProtocolId { Protocol_2_0 = 2, } - [iOS (14, 0), TV (15, 0), Watch (8, 0)] + [iOS (14, 0), TV (15, 0)] [MacCatalyst (14, 0)] [NativeName ("MIDICVStatus")] public enum MidiCVStatus : uint { @@ -94,7 +93,7 @@ public enum MidiCVStatus : uint { PerNoteMgmt = 15, } - [iOS (14, 0), TV (15, 0), Watch (8, 0)] + [iOS (14, 0), TV (15, 0)] [MacCatalyst (14, 0)] [NativeName ("MIDIMessageType")] public enum MidiMessageType : uint { @@ -109,7 +108,6 @@ public enum MidiMessageType : uint { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'Stream' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'Stream' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'Stream' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'Stream' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'Stream' instead.")] UnknownF = Stream, #endif @@ -117,7 +115,7 @@ public enum MidiMessageType : uint { Invalid = 0xFF, } - [iOS (14, 0), TV (15, 0), Watch (8, 0)] + [iOS (14, 0), TV (15, 0)] [MacCatalyst (14, 0)] [NativeName ("MIDISysExStatus")] public enum MidiSysExStatus : uint { @@ -129,7 +127,7 @@ public enum MidiSysExStatus : uint { MixedDataSetPayload = 9, } - [iOS (14, 0), TV (15, 0), Watch (8, 0)] + [iOS (14, 0), TV (15, 0)] [MacCatalyst (14, 0)] [NativeName ("MIDISystemStatus")] public enum MidiSystemStatus : uint { @@ -147,7 +145,7 @@ public enum MidiSystemStatus : uint { SystemReset = 255, } - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)] [NativeName ("MIDINoteAttribute")] public enum MidiNoteAttribute : byte { None = 0, @@ -156,7 +154,7 @@ public enum MidiNoteAttribute : byte { Pitch = 3, } - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)] [NativeName ("MIDIPerNoteManagementOptions")] [Flags] public enum MidiPerNoteManagementOptions : byte { @@ -164,26 +162,26 @@ public enum MidiPerNoteManagementOptions : byte { Detach = 1 << 1, } - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)] [NativeName ("MIDIProgramChangeOptions")] [Flags] public enum MidiProgramChangeOptions : byte { BankValid = 1 << 0, } - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0), Watch (8, 0)] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (15, 0)] [NativeName ("MIDIUtilityStatus")] public enum MidiUtilityStatus : uint { Noop = 0, JitterReductionClock = 1, JitterReductionTimestamp = 2, - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] DeltaClockstampTicksPerQuarterNote = 0x3, - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] TicksSinceLastEvent = 0x4 } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("UMPStreamMessageStatus")] public enum UmpStreamMessageStatus : uint { EndpointDiscovery = 0x00, @@ -200,7 +198,7 @@ public enum UmpStreamMessageStatus : uint { EndOfClip = 0x21, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDIUMPFunctionBlockMIDI1Info")] public enum MidiUmpFunctionBlockMidi1Info { NotMidi1 = 0, @@ -208,7 +206,7 @@ public enum MidiUmpFunctionBlockMidi1Info { RestrictedBandwidth = 2 } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDIUMPFunctionBlockUIHint")] public enum MidiUmpFunctionBlockUIHint { Unknown = 0, @@ -217,7 +215,7 @@ public enum MidiUmpFunctionBlockUIHint { SenderReceiver = 3 } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDIUMPFunctionBlockDirection")] public enum MidiUmpFunctionBlockDirection { Unknown = 0, @@ -226,7 +224,7 @@ public enum MidiUmpFunctionBlockDirection { Bidirectional = 3 } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("UMPStreamMessageFormat")] public enum UmpStreamMessageFormat : byte { Complete = 0x00, @@ -235,7 +233,7 @@ public enum UmpStreamMessageFormat : byte { End = 0x03 } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICICategoryOptions")] public enum MidiCICategoryOptions : byte /* MIDIUInteger7 = typedef UInt8 MIDIUInteger7; //! 7 bits usable; allowed values 0x0~0x7F */ { ProtocolNegotiation = (1 << 1), @@ -244,7 +242,7 @@ public enum MidiCICategoryOptions : byte /* MIDIUInteger7 = typedef UInt8 MIDIUI ProcessInquirySupported = (1 << 4), } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICIDeviceType")] public enum MidiCIDeviceType : byte /* UInt8 */ { Unknown = 0, @@ -253,7 +251,7 @@ public enum MidiCIDeviceType : byte /* UInt8 */ { UsbMidi, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICIProfileMessageType")] public enum MidiCIProfileMessageType : byte /* MIDIUInteger7 = typedef UInt8 MIDIUInteger7; //! 7 bits usable; allowed values 0x0~0x7F */ { ProfileInquiry = 0x20, @@ -269,7 +267,7 @@ public enum MidiCIProfileMessageType : byte /* MIDIUInteger7 = typedef UInt8 MID ProfileSpecificData = 0x2F, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICIPropertyExchangeMessageType")] public enum MidiCIPropertyExchangeMessageType : byte /* MIDIUInteger7 = typedef UInt8 MIDIUInteger7; //! 7 bits usable; allowed values 0x0~0x7F */ { InquiryPropertyExchangeCapabilities = 0x30, @@ -285,7 +283,7 @@ public enum MidiCIPropertyExchangeMessageType : byte /* MIDIUInteger7 = typedef Notify = 0x3F, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICIProcessInquiryMessageType")] public enum MidiCIProcessInquiryMessageType : byte /* MIDIUInteger7 = typedef UInt8 MIDIUInteger7; //! 7 bits usable; allowed values 0x0~0x7F */ { InquiryProcessInquiryCapabilities = 0x40, @@ -295,7 +293,7 @@ public enum MidiCIProcessInquiryMessageType : byte /* MIDIUInteger7 = typedef UI EndOfMidiMessageReport = 0x44, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICIManagementMessageType")] public enum MidiCIManagementMessageType : byte /* MIDIUInteger7 = typedef UInt8 MIDIUInteger7; //! 7 bits usable; allowed values 0x0~0x7F */ { Discovery = 0x70, @@ -307,7 +305,7 @@ public enum MidiCIManagementMessageType : byte /* MIDIUInteger7 = typedef UInt8 MIDICINAK = 0x7F, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICIProfileType")] public enum MidiCIProfileType : byte /* UInt8 */ { SingleChannel = 1, @@ -316,7 +314,7 @@ public enum MidiCIProfileType : byte /* UInt8 */ { Multichannel = 4, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDIUMPCIObjectBackingType")] public enum MidiUmpCIObjectBackingType : byte /* UInt8 */ { Unknown = 0, @@ -325,7 +323,7 @@ public enum MidiUmpCIObjectBackingType : byte /* UInt8 */ { UsbMidi, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDICIPropertyExchangeRequestID")] public enum MidiCIPropertyExchangeRequestID : byte /* UInt8 */ { BadRequest = 0xFF, @@ -335,7 +333,6 @@ public enum MidiCIPropertyExchangeRequestID : byte /* UInt8 */ { /// /// Apple documentation for MIDINetworkHost [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "MIDINetworkHost")] [DisableDefaultCtor] @@ -375,7 +372,6 @@ interface MidiNetworkHost { /// Global methods and constants for using CoreMidi. [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Static] interface Midi { @@ -395,7 +391,6 @@ interface Midi { /// /// Apple documentation for MIDINetworkConnection [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject), Name = "MIDINetworkConnection")] @@ -411,7 +406,6 @@ interface MidiNetworkConnection { /// /// Apple documentation for MIDINetworkSession [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "MIDINetworkSession")] // default 'init' crash the application @@ -480,7 +474,7 @@ interface MidiNetworkSession { } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "MIDICIProfile")] [DisableDefaultCtor] @@ -500,18 +494,18 @@ interface MidiCIProfile : NSSecureCoding { NativeHandle Constructor (NSData data); /* Notifications */ - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MIDICIProfileWasUpdatedNotification")] [Notification] NSString WasUpdatedNotification { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MIDICIProfileWasRemovedNotification")] [Notification] NSString WasRemovedNotification { get; } } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "MIDICIProfileState")] [DisableDefaultCtor] @@ -543,7 +537,7 @@ interface MidiCIProfileState : NSSecureCoding { delegate void MidiCIProfileSpecificDataHandler (MidiCISession session, byte channel, MidiCIProfile profile, NSData data); delegate void MidiCISessionDisconnectHandler (MidiCISession session, NSError error); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "MIDICISession")] [DisableDefaultCtor] @@ -623,7 +617,7 @@ interface MidiCISession { MidiCIProfileSpecificDataHandler ProfileSpecificDataHandler { get; set; } } - [iOS (14, 0), NoTV, NoWatch] + [iOS (14, 0), NoTV] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject), Name = "MIDICIDeviceInfo")] [DisableDefaultCtor] @@ -658,7 +652,7 @@ interface MidiCIDeviceInfo : NSSecureCoding { NativeHandle Constructor (MidiEndpoint midiDestination, NSData manufacturer, NSData family, NSData modelNumber, NSData revisionLevel); } - [iOS (14, 0), NoTV, NoWatch] + [iOS (14, 0), NoTV] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject), Name = "MIDICIDiscoveredNode")] [DisableDefaultCtor] @@ -689,7 +683,7 @@ interface MidiCIDiscoveredNode : NSSecureCoding { delegate void MidiCIDiscoveryResponseDelegate (MidiCIDiscoveredNode [] discoveredNodes); - [iOS (14, 0), NoTV, NoWatch] + [iOS (14, 0), NoTV] [MacCatalyst (14, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject), Name = "MIDICIDiscoveryManager")] @@ -707,7 +701,7 @@ interface MidiCIDiscoveryManager { interface IMidiCIProfileResponderDelegate { } - [iOS (14, 0), NoTV, NoWatch] + [iOS (14, 0), NoTV] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -731,7 +725,7 @@ interface MidiCIProfileResponderDelegate { void HandleData (MidiCIProfile profile, byte channel, NSData inData); } - [iOS (14, 0), NoTV, NoWatch] + [iOS (14, 0), NoTV] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject), Name = "MIDICIResponder")] [DisableDefaultCtor] @@ -770,212 +764,212 @@ interface MidiCIResponder { [Internal] enum MidiProperty { - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyName")] Name, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyManufacturer")] Manufacturer, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyModel")] Model, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyUniqueID")] UniqueId, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyDeviceID")] DeviceId, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyReceiveChannels")] ReceiveChannels, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyTransmitChannels")] TransmitChannels, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyMaxSysExSpeed")] MaxSysExSpeed, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyAdvanceScheduleTimeMuSec")] AdvanceScheduleTimeMuSec, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyIsEmbeddedEntity")] IsEmbeddedEntity, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyIsBroadcast")] IsBroadcast, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertySingleRealtimeEntity")] SingleRealtimeEntity, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyConnectionUniqueID")] ConnectionUniqueId, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyOffline")] Offline, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyPrivate")] Private, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyDriverOwner")] DriverOwner, - [NoiOS, NoTV, NoMacCatalyst, NoWatch] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kMIDIPropertyFactoryPatchNameFile")] FactoryPatchNameFile, - [NoiOS, NoTV, NoMacCatalyst, NoWatch] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kMIDIPropertyUserPatchNameFile")] UserPatchNameFile, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyNameConfiguration")] NameConfiguration, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyNameConfigurationDictionary")] NameConfigurationDictionary, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyImage")] Image, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyDriverVersion")] DriverVersion, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertySupportsGeneralMIDI")] SupportsGeneralMidi, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertySupportsMMC")] SupportsMmc, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyCanRoute")] CanRoute, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyReceivesClock")] ReceivesClock, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyReceivesMTC")] ReceivesMtc, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyReceivesNotes")] ReceivesNotes, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyReceivesProgramChanges")] ReceivesProgramChanges, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyReceivesBankSelectMSB")] ReceivesBankSelectMsb, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyReceivesBankSelectLSB")] ReceivesBankSelectLsb, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyTransmitsClock")] TransmitsClock, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyTransmitsMTC")] TransmitsMtc, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyTransmitsNotes")] TransmitsNotes, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyTransmitsProgramChanges")] TransmitsProgramChanges, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyTransmitsBankSelectMSB")] TransmitsBankSelectMsb, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyTransmitsBankSelectLSB")] TransmitsBankSelectLsb, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyPanDisruptsStereo")] PanDisruptsStereo, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyIsSampler")] IsSampler, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyIsDrumMachine")] IsDrumMachine, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyIsMixer")] IsMixer, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyIsEffectUnit")] IsEffectUnit, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyMaxReceiveChannels")] MaxReceiveChannels, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyMaxTransmitChannels")] MaxTransmitChannels, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyDriverDeviceEditorApp")] DriverDeviceEditorApp, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertySupportsShowControl")] SupportsShowControl, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyDisplayName")] DisplayName, - [NoTV, NoWatch] + [NoTV] [Field ("kMIDIPropertyProtocolID")] ProtocolId, - [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), NoTV, NoWatch] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), NoTV] [Field ("kMIDIPropertyUMPActiveGroupBitmap")] UmpActiveGroupBitmap, - [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), NoTV, NoWatch] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), NoTV] [Field ("kMIDIPropertyUMPCanTransmitGroupless")] UmpCanTransmitGroupless, - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoTV, NoWatch] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoTV] [Field ("kMIDIPropertyAssociatedEndpoint")] AssociatedEndpoint, } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "MIDICIDevice")] [DisableDefaultCtor] interface MidiCIDevice { @@ -1021,7 +1015,7 @@ interface MidiCIDevice { } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "MIDICIDeviceManager")] [DisableDefaultCtor] interface MidiCIDeviceManager { @@ -1034,7 +1028,7 @@ interface MidiCIDeviceManager { } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "MIDIUMPCIProfile")] [DisableDefaultCtor] interface MidiUmpCIProfile { @@ -1066,7 +1060,7 @@ interface MidiUmpCIProfile { bool SetProfileState (bool isEnabled, ushort enabledChannelCount, out NSError error); } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "MIDI2DeviceInfo")] [DisableDefaultCtor] interface Midi2DeviceInfo { @@ -1087,14 +1081,14 @@ interface Midi2DeviceInfo { } [Flags] - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NativeName ("MIDIUMPProtocolOptions")] public enum MidiUmpProtocolOptions : byte /* MIDIUInteger4 */ { SupportedProtocolMidi1 = 1, SupportedProtocolMidi2 = 1 << 1, } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "MIDIUMPEndpoint")] [DisableDefaultCtor] interface MidiUmpEndpoint { @@ -1148,7 +1142,7 @@ interface MidiUmpEndpoint { NSString WasUpdatedNotification { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "MIDIUMPFunctionBlock")] [DisableDefaultCtor] interface MidiUmpFunctionBlock { @@ -1191,7 +1185,7 @@ interface MidiUmpFunctionBlock { NSString WasUpdatedNotification { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] interface MidiCIDeviceManagerDictionaryKey { [Field ("MIDICIDeviceObjectKey")] @@ -1201,7 +1195,7 @@ interface MidiCIDeviceManagerDictionaryKey { NSString CIProfileObjectKey { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] interface MidiUmpEndpointManagerDictionaryKey { [Field ("MIDIUMPEndpointObjectKey")] @@ -1211,7 +1205,7 @@ interface MidiUmpEndpointManagerDictionaryKey { NSString UmpFunctionBlockObject { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "MIDIUMPEndpointManager")] [DisableDefaultCtor] interface MidiUmpEndpointManager { @@ -1225,7 +1219,7 @@ interface MidiUmpEndpointManager { delegate void MidiReceiveBlock (IntPtr eventList, IntPtr srcConnRefCon); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (MidiUmpEndpoint), Name = "MIDIUMPMutableEndpoint")] [DisableDefaultCtor] interface MidiUmpMutableEndpoint { @@ -1248,7 +1242,7 @@ interface MidiUmpMutableEndpoint { bool SetEnabled (bool isEnabled, out NSError error); } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (MidiUmpFunctionBlock), Name = "MIDIUMPMutableFunctionBlock")] [DisableDefaultCtor] interface MidiUmpMutableFunctionBlock { diff --git a/src/coreml.cs b/src/coreml.cs index 24070cf74d87..4aa02e78fc69 100644 --- a/src/coreml.cs +++ b/src/coreml.cs @@ -15,16 +15,9 @@ using Foundation; using ImageIO; -#if !WATCH using Metal; using Vision; using CoreImage; -#else -using IMTLCommandBuffer = global::Foundation.NSObject; // Won't be used just to make compilation happy. -using IMTLTexture = global::Foundation.NSObject; // Won't be used just to make compilation happy. -using IMTLDevice = global::Foundation.NSObject; -using VNImageCropAndScaleOption = global::System.nuint; -#endif #if !NET using NativeHandle = System.IntPtr; @@ -43,10 +36,9 @@ public enum MLFeatureType : long { Image = 4, MultiArray = 5, Dictionary = 6, - [Watch (5, 0)] [MacCatalyst (13, 1)] Sequence = 7, - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] State = 8, } @@ -76,7 +68,7 @@ public enum MLMultiArrayDataType : long { // added in xcode12 but it's the same a `Double` and can be used in earlier versions Float64 = 0x10000 | 64, Float32 = 0x10000 | 32, - [iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] Float16 = 0x10000 | 16, // added in xcode12 but it's the same a `Float32` and can be used in earlier versions Float = 0x10000 | 32, @@ -84,7 +76,6 @@ public enum MLMultiArrayDataType : long { } /// Enumerates the form of a . - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MLImageSizeConstraintType : long { @@ -94,7 +85,6 @@ public enum MLImageSizeConstraintType : long { } /// Enumerates the form of a . - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MLMultiArrayShapeConstraintType : long { @@ -103,7 +93,6 @@ public enum MLMultiArrayShapeConstraintType : long { Range = 3, } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Native] public enum MLComputeUnits : long { @@ -113,7 +102,7 @@ public enum MLComputeUnits : long { CPUAndNeuralEngine = 3, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum MLTaskState : long { @@ -124,7 +113,7 @@ public enum MLTaskState : long { Failed = 5, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Flags] [Native] @@ -134,7 +123,7 @@ public enum MLUpdateProgressEvent : ulong { MiniBatchEnd = 1L << 2, } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum MLReshapeFrequencyHint : long { Frequent = 0, @@ -181,12 +170,11 @@ interface MLFeatureDescription : NSCopying, NSSecureCoding { [NullAllowed, Export ("dictionaryConstraint", ArgumentSemantic.Assign)] MLDictionaryConstraint DictionaryConstraint { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("sequenceConstraint")] MLSequenceConstraint SequenceConstraint { get; } - [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [NullAllowed, Export ("stateConstraint")] MLStateConstraint StateConstraint { get; } } @@ -237,7 +225,6 @@ interface MLFeatureValue : NSCopying, NSSecureCoding { [NullAllowed, Export ("imageBufferValue")] CVPixelBuffer ImageBufferValue { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("sequenceValue")] MLSequence SequenceValue { get; } @@ -246,7 +233,6 @@ interface MLFeatureValue : NSCopying, NSSecureCoding { [Export ("featureValueWithPixelBuffer:")] MLFeatureValue Create (CVPixelBuffer value); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithSequence:")] @@ -282,112 +268,112 @@ interface MLFeatureValue : NSCopying, NSSecureCoding { // From MLFeatureValue (MLImageConversion) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithImageAtURL:pixelsWide:pixelsHigh:pixelFormatType:options:error:")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (url, pixelsWide, pixelsHigh, pixelFormatType, imageOptions.GetDictionary (), out error)")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithImageAtURL:constraint:options:error:")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, MLImageConstraint constraint, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (url, constraint, imageOptions.GetDictionary (), out error)")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, MLImageConstraint constraint, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithCGImage:pixelsWide:pixelsHigh:pixelFormatType:options:error:")] [return: NullAllowed] MLFeatureValue Create (CGImage image, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (image, pixelsWide, pixelsHigh, pixelFormatType, imageOptions.GetDictionary (), out error)")] [return: NullAllowed] MLFeatureValue Create (CGImage image, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithCGImage:constraint:options:error:")] [return: NullAllowed] MLFeatureValue Create (CGImage image, MLImageConstraint constraint, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (image, constraint, imageOptions.GetDictionary (), out error)")] [return: NullAllowed] MLFeatureValue Create (CGImage image, MLImageConstraint constraint, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithImageAtURL:orientation:pixelsWide:pixelsHigh:pixelFormatType:options:error:")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, CGImagePropertyOrientation orientation, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (url, orientation, pixelsWide, pixelsHigh, pixelFormatType, imageOptions.GetDictionary (), out error)")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, CGImagePropertyOrientation orientation, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithImageAtURL:orientation:constraint:options:error:")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, CGImagePropertyOrientation orientation, MLImageConstraint constraint, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (url, orientation, constraint, imageOptions.GetDictionary (), out error)")] [return: NullAllowed] MLFeatureValue Create (NSUrl url, CGImagePropertyOrientation orientation, MLImageConstraint constraint, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithCGImage:orientation:pixelsWide:pixelsHigh:pixelFormatType:options:error:")] [return: NullAllowed] MLFeatureValue Create (CGImage image, CGImagePropertyOrientation orientation, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (image, orientation, pixelsWide, pixelsHigh, pixelFormatType, imageOptions.GetDictionary (), out error)")] [return: NullAllowed] MLFeatureValue Create (CGImage image, CGImagePropertyOrientation orientation, nint pixelsWide, nint pixelsHigh, CVPixelFormatType pixelFormatType, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("featureValueWithCGImage:orientation:constraint:options:error:")] [return: NullAllowed] MLFeatureValue Create (CGImage image, CGImagePropertyOrientation orientation, MLImageConstraint constraint, [NullAllowed] NSDictionary options, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("Create (image, orientation, constraint, imageOptions.GetDictionary (), out error)")] @@ -395,7 +381,7 @@ interface MLFeatureValue : NSCopying, NSSecureCoding { MLFeatureValue Create (CGImage image, CGImagePropertyOrientation orientation, MLImageConstraint constraint, [NullAllowed] MLFeatureValueImageOption imageOptions, [NullAllowed] out NSError error); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Internal] [Static] @@ -408,7 +394,7 @@ interface MLFeatureValueImageOptionKeys { NSString CropAndScaleKey { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [StrongDictionary ("MLFeatureValueImageOptionKeys")] interface MLFeatureValueImageOption { @@ -427,7 +413,6 @@ interface MLModel { [Export ("modelDescription")] MLModelDescription ModelDescription { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("configuration")] MLModelConfiguration Configuration { get; } @@ -437,7 +422,6 @@ interface MLModel { [return: NullAllowed] MLModel Create (NSUrl url, out NSError error); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] [Export ("modelWithContentsOfURL:configuration:error:")] @@ -452,25 +436,24 @@ interface MLModel { [return: NullAllowed] IMLFeatureProvider GetPrediction (IMLFeatureProvider input, MLPredictionOptions options, out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("predictionsFromBatch:error:")] [return: NullAllowed] IMLBatchProvider GetPredictions (IMLBatchProvider inputBatch, [NullAllowed] out NSError error); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("predictionsFromBatch:options:error:")] [return: NullAllowed] IMLBatchProvider GetPredictions (IMLBatchProvider inputBatch, MLPredictionOptions options, out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("parameterValueForKey:error:")] [return: NullAllowed] NSObject GetParameterValue (MLParameterKey key, [NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Async] @@ -478,7 +461,7 @@ interface MLModel { void LoadContents (NSUrl url, MLModelConfiguration configuration, Action handler); [Async (ResultTypeName = "MLModelCompilationLoadResult")] - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("loadModelAsset:configuration:completionHandler:")] void Load (MLModelAsset asset, MLModelConfiguration configuration, Action handler); @@ -495,23 +478,23 @@ interface MLModel { NSUrl CompileModel (NSUrl modelUrl, out NSError error); [Async (ResultTypeName = "MLModelCompilationResult")] - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("compileModelAtURL:completionHandler:")] void CompileModel (NSUrl modelUrl, Action handler); [Async] - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("predictionFromFeatures:completionHandler:")] void GetPrediction (IMLFeatureProvider input, Action completionHandler); [Async] - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("predictionFromFeatures:options:completionHandler:")] void GetPrediction (IMLFeatureProvider input, MLPredictionOptions options, Action completionHandler); // from the category MLComputeDevice (MLModel) - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("availableComputeDevices", ArgumentSemantic.Copy)] IMLComputeDeviceProtocol [] AvailableComputeDevices { get; } @@ -544,31 +527,31 @@ interface MLModelDescription : NSSecureCoding { [Wrap ("_Metadata")] MLModelMetadata Metadata { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("classLabels", ArgumentSemantic.Copy)] NSObject [] ClassLabels { get; } // From MLModelDescription (MLUpdateAdditions) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("isUpdatable")] bool IsUpdatable { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("trainingInputDescriptionsByName")] NSDictionary TrainingInputDescriptionsByName { get; } // From MLModelDescription (MLParameters) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("parameterDescriptionsByKey")] NSDictionary ParameterDescriptionsByKey { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("stateDescriptionsByName")] NSDictionary StateDescriptionsByName { get; } } @@ -614,7 +597,6 @@ interface MLMultiArray : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 13, 0, message: "Use 'GetBytes (Action)' or 'GetMutableBytes' async methods instead.")] [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'GetBytes (Action)' or 'GetMutableBytes' async methods instead.")] [Deprecated (PlatformName.TvOS, 16, 0, message: "Use 'GetBytes (Action)' or 'GetMutableBytes' async methods instead.")] - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use 'GetBytes (Action)' or 'GetMutableBytes' async methods instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'GetBytes (Action)' or 'GetMutableBytes' async methods instead.")] [Export ("dataPointer")] IntPtr DataPointer { get; } @@ -634,7 +616,7 @@ interface MLMultiArray : NSSecureCoding { nint Count { get; } [NullAllowed] - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("pixelBuffer")] CVPixelBuffer PixelBuffer { get; } @@ -643,14 +625,14 @@ interface MLMultiArray : NSSecureCoding { [Export ("initWithShape:dataType:error:")] NativeHandle Constructor (NSNumber [] shape, MLMultiArrayDataType dataType, out NSError error); - [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Export ("initWithShape:dataType:strides:")] NativeHandle Constructor (NSNumber [] shape, MLMultiArrayDataType dataType, NSNumber [] strides); [Export ("initWithDataPointer:shape:dataType:strides:deallocator:error:")] NativeHandle Constructor (IntPtr dataPointer, NSNumber [] shape, MLMultiArrayDataType dataType, NSNumber [] strides, [NullAllowed] Action deallocator, out NSError error); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("initWithPixelBuffer:shape:")] IntPtr Constructor (CVPixelBuffer pixelBuffer, NSNumber [] shape); @@ -682,24 +664,24 @@ interface MLMultiArray : NSSecureCoding { // @interface Concatenating (MLMultiArray) - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("multiArrayByConcatenatingMultiArrays:alongAxis:dataType:")] MLMultiArray Concat (MLMultiArray [] multiArrays, nint axis, MLMultiArrayDataType dataType); [Async (ResultTypeName = "MLMultiArrayDataPointer")] - [Watch (8, 5), TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] + [TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] [Export ("getBytesWithHandler:")] void GetBytes (Action handler); [Async (ResultTypeName = "MLMultiArrayMutableDataPointer")] - [Watch (8, 5), TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] + [TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] [Export ("getMutableBytesWithHandler:")] void GetMutableBytes (Action> handler); // From MLMultiArray (Transferring) category - [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Export ("transferToMultiArray:")] void TransferToMultiArray (MLMultiArray destinationMultiArray); } @@ -729,7 +711,6 @@ interface MLImageConstraint : NSSecureCoding { [Export ("pixelFormatType")] uint PixelFormatType { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("sizeConstraint")] MLImageSizeConstraint SizeConstraint { get; } @@ -748,7 +729,6 @@ interface MLMultiArrayConstraint : NSSecureCoding { [Export ("dataType")] MLMultiArrayDataType DataType { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("shapeConstraint")] MLMultiArrayShapeConstraint ShapeConstraint { get; } @@ -759,7 +739,6 @@ interface MLMultiArrayConstraint : NSSecureCoding { [BaseType (typeof (NSObject))] interface MLPredictionOptions { - [Deprecated (PlatformName.WatchOS, 8, 0, message: "Use 'MLModelConfiguration.ComputeUnits' instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'MLModelConfiguration.ComputeUnits' instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use 'MLModelConfiguration.ComputeUnits' instead.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use 'MLModelConfiguration.ComputeUnits' instead.")] @@ -768,13 +747,12 @@ interface MLPredictionOptions { bool UsesCpuOnly { get; set; } // Leaving it intentionally as NSDictionary to make it easier to use the lowlevel apis. - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("outputBackings", ArgumentSemantic.Copy)] NSDictionary OutputBackings { get; set; } } /// Interface defining methods necessary for a custom model layer. - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface MLCustomLayer { @@ -802,7 +780,6 @@ interface MLCustomLayer { } /// An backed by an array. - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -821,7 +798,6 @@ interface MLArrayBatchProvider : MLBatchProvider { interface IMLBatchProvider { } /// Interface defining the protocol for providing data in batches to the model. - [Watch (5, 0)] [MacCatalyst (13, 1)] [Protocol] interface MLBatchProvider { @@ -836,7 +812,6 @@ interface MLBatchProvider { } /// Interface defining a custom CoreML model. - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] #if NET @@ -861,7 +836,6 @@ interface MLCustomModel { } /// Describes one acceptable image size for the CoreML model inputs. - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -875,7 +849,6 @@ interface MLImageSize : NSSecureCoding { } /// Description of the constraint on image sizes for a CoreML model. - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -895,7 +868,6 @@ interface MLImageSizeConstraint : NSSecureCoding { } /// Describes the constraints on the shape of the multidimensional array allowed by the model. - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -912,7 +884,6 @@ interface MLMultiArrayShapeConstraint : NSSecureCoding { } /// Encodes a sequence as a single input. - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -941,7 +912,6 @@ interface MLSequence : NSSecureCoding { } /// A constraint on sequences of features. - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -954,7 +924,6 @@ interface MLSequenceConstraint : NSCopying, NSSecureCoding { NSRange CountRange { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MLModelConfiguration : NSCopying, NSSecureCoding { @@ -962,40 +931,40 @@ interface MLModelConfiguration : NSCopying, NSSecureCoding { [Export ("computeUnits", ArgumentSemantic.Assign)] MLComputeUnits ComputeUnits { get; set; } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("optimizationHints", ArgumentSemantic.Copy)] MLOptimizationHints OptimizationHints { get; set; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("modelDisplayName")] string ModelDisplayName { get; set; } // From MLModelConfiguration (MLGPUConfigurationOptions) - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowLowPrecisionAccumulationOnGPU")] bool AllowLowPrecisionAccumulationOnGpu { get; set; } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("preferredMetalDevice", ArgumentSemantic.Assign)] IMTLDevice PreferredMetalDevice { get; set; } // From MLModelConfiguration (MLModelParameterAdditions) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("parameters", ArgumentSemantic.Assign)] NSDictionary Parameters { get; set; } // From MLModelConfiguration (MultiFunctions) - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("functionName", ArgumentSemantic.Copy), NullAllowed] string FunctionName { get; set; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1008,7 +977,7 @@ interface MLKey : NSCopying, NSSecureCoding { string Scope { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MLKey))] [DisableDefaultCtor] @@ -1027,7 +996,7 @@ interface MLMetricKey { MLMetricKey MiniBatchIndex { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1043,7 +1012,7 @@ interface MLNumericConstraint : NSSecureCoding { NSSet EnumeratedNumbers { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1059,7 +1028,7 @@ interface MLParameterDescription : NSSecureCoding { MLNumericConstraint NumericConstraint { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MLKey))] [DisableDefaultCtor] @@ -1132,7 +1101,7 @@ interface MLParameterKey { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1154,7 +1123,7 @@ interface MLTask { void Cancel (); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1176,7 +1145,7 @@ interface MLUpdateContext { NSDictionary Parameters { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1186,7 +1155,7 @@ interface MLUpdateProgressHandlers { NativeHandle Constructor (MLUpdateProgressEvent interestedEvents, [NullAllowed] Action progressHandler, Action completionHandler); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MLTask))] [DisableDefaultCtor] @@ -1202,14 +1171,14 @@ interface MLUpdateTask { [return: NullAllowed] MLUpdateTask Create (NSUrl modelUrl, IMLBatchProvider trainingData, [NullAllowed] MLModelConfiguration configuration, MLUpdateProgressHandlers progressHandlers, [NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("updateTaskForModelAtURL:trainingData:completionHandler:error:")] [return: NullAllowed] MLUpdateTask Create (NSUrl modelUrl, IMLBatchProvider trainingData, Action completionHandler, [NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("updateTaskForModelAtURL:trainingData:progressHandlers:error:")] @@ -1222,7 +1191,7 @@ interface MLUpdateTask { interface IMLWritable { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface MLWritable { @@ -1239,7 +1208,6 @@ interface MLWritable { [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelCollection { @@ -1276,7 +1244,6 @@ interface MLModelCollection { [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelCollectionEntry { @@ -1295,36 +1262,36 @@ interface MLModelCollectionEntry { delegate void MLModelAssetGetModelDescriptionCompletionHandler ([NullAllowed] MLModelDescription modelDescription, [NullAllowed] NSError error); delegate void MLModelAssetGetFunctionNamesCompletionHandler ([NullAllowed] string [] functionNames, [NullAllowed] NSError error); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelAsset { - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Static] [Export ("modelAssetWithSpecificationData:error:")] [return: NullAllowed] MLModelAsset Create (NSData specificationData, [NullAllowed] out NSError error); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("modelAssetWithURL:error:")] [return: NullAllowed] MLModelAsset Create (NSUrl compiledModelUrl, [NullAllowed] out NSError error); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("modelDescriptionWithCompletionHandler:")] void GetModelDescription (MLModelAssetGetModelDescriptionCompletionHandler handler); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("modelDescriptionOfFunctionNamed:completionHandler:")] void GetModelDescription (string functionName, MLModelAssetGetModelDescriptionCompletionHandler handler); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("functionNamesWithCompletionHandler:")] void GetFunctionNames (MLModelAssetGetFunctionNamesCompletionHandler handler); - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("modelAssetWithSpecificationData:blobMapping:error:")] [return: NullAllowed] @@ -1334,12 +1301,12 @@ interface MLModelAsset { interface IMLComputeDeviceProtocol { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface MLComputeDeviceProtocol { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLNeuralEngineComputeDevice : MLComputeDeviceProtocol { @@ -1347,13 +1314,13 @@ interface MLNeuralEngineComputeDevice : MLComputeDeviceProtocol { nint TotalCoreCount { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject), Name = "MLCPUComputeDevice")] [DisableDefaultCtor] interface MLCpuComputeDevice : MLComputeDeviceProtocol { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject), Name = "MLGPUComputeDevice")] [DisableDefaultCtor] interface MLGpuComputeDevice : MLComputeDeviceProtocol { @@ -1361,7 +1328,7 @@ interface MLGpuComputeDevice : MLComputeDeviceProtocol { IMTLDevice MetalDevice { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLComputePlan { @@ -1392,7 +1359,7 @@ interface MLComputePlan { delegate void MLStateGetMultiArrayForStateHandler (MLMultiArray buffer); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLState { @@ -1402,7 +1369,7 @@ interface MLState { delegate void MLStateGetPredictionCompletionHandler ([NullAllowed] IMLFeatureProvider output, NSError error); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Category] [BaseType (typeof (MLModel))] interface MLModel_MLState { @@ -1423,7 +1390,7 @@ interface MLModel_MLState { IMLFeatureProvider GetPrediction (IMLFeatureProvider inputFeatures, MLState state, MLPredictionOptions options, MLStateGetPredictionCompletionHandler completionHandler); } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLStateConstraint : NSSecureCoding { @@ -1435,14 +1402,14 @@ interface MLStateConstraint : NSSecureCoding { MLMultiArrayDataType DataType { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum MLSpecializationStrategy : long { Default = 0, FastPrediction = 1, } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLComputePlanCost { @@ -1451,7 +1418,7 @@ interface MLComputePlanCost { double Weight { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLComputePlanDeviceUsage { @@ -1463,7 +1430,7 @@ interface MLComputePlanDeviceUsage { IMLComputeDeviceProtocol PreferredComputeDevice { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructure { @@ -1486,7 +1453,7 @@ interface MLModelStructure { MLModelStructurePipeline Pipeline { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureNeuralNetwork { @@ -1495,7 +1462,7 @@ interface MLModelStructureNeuralNetwork { MLModelStructureNeuralNetworkLayer [] Layers { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureNeuralNetworkLayer { @@ -1513,7 +1480,7 @@ interface MLModelStructureNeuralNetworkLayer { string [] OutputNames { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructurePipeline { @@ -1525,7 +1492,7 @@ interface MLModelStructurePipeline { MLModelStructure [] SubModels { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgram { @@ -1533,7 +1500,7 @@ interface MLModelStructureProgram { NSDictionary Functions { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramArgument { @@ -1542,7 +1509,7 @@ interface MLModelStructureProgramArgument { MLModelStructureProgramBinding [] Bindings { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramBinding { @@ -1554,7 +1521,7 @@ interface MLModelStructureProgramBinding { MLModelStructureProgramValue Value { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramBlock { @@ -1569,7 +1536,7 @@ interface MLModelStructureProgramBlock { MLModelStructureProgramOperation [] Operations { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramFunction { @@ -1581,7 +1548,7 @@ interface MLModelStructureProgramFunction { MLModelStructureProgramBlock Block { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramNamedValueType { @@ -1593,7 +1560,7 @@ interface MLModelStructureProgramNamedValueType { MLModelStructureProgramValueType Type { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramOperation { @@ -1611,28 +1578,28 @@ interface MLModelStructureProgramOperation { MLModelStructureProgramBlock [] Blocks { get; } } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramValue { // Empty class!! } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MLModelStructureProgramValueType { // Empty class!! } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] interface MLOptimizationHints : NSCopying, NSSecureCoding { [Export ("reshapeFrequency", ArgumentSemantic.Assign)] MLReshapeFrequencyHint ReshapeFrequency { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("specializationStrategy", ArgumentSemantic.Assign)] MLSpecializationStrategy SpecializationStrategy { get; set; } } diff --git a/src/coremotion.cs b/src/coremotion.cs index f1d3632cea1a..e8952421744c 100644 --- a/src/coremotion.cs +++ b/src/coremotion.cs @@ -260,7 +260,6 @@ interface CMDeviceMotion : NSSecureCoding { double Heading { get; } [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Export ("sensorLocation")] CMDeviceMotionSensorLocation SensorLocation { get; } @@ -305,12 +304,10 @@ interface CMMagnetometerData : NSSecureCoding { delegate void CMMagnetometerHandler (CMMagnetometerData magnetometerData, NSError error); /// The delegate for use with . - [NoWatch] [MacCatalyst (13, 1)] delegate void CMStepQueryHandler (nint numberOfSteps, NSError error); /// The delegate used with . - [NoWatch] [MacCatalyst (13, 1)] delegate void CMStepUpdateHandler (nint numberOfSteps, NSDate timestamp, NSError error); @@ -320,7 +317,6 @@ interface CMMagnetometerData : NSSecureCoding { /// /// Apple documentation for CMStepCounter [NoMac] - [NoWatch] [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'CMPedometer' instead.")] [MacCatalyst (13, 1)] @@ -557,18 +553,18 @@ interface CMAltimeter { [Export ("authorizationStatus")] CMAuthorizationStatus AuthorizationStatus { get; } - [Watch (8, 0), NoTV, NoMac, iOS (15, 0)] + [NoTV, NoMac, iOS (15, 0)] [NoMacCatalyst] [Static] [Export ("isAbsoluteAltitudeAvailable")] bool IsAbsoluteAltitudeAvailable { get; } - [Watch (8, 0), NoTV, NoMac, iOS (15, 0)] + [NoTV, NoMac, iOS (15, 0)] [NoMacCatalyst] [Export ("startAbsoluteAltitudeUpdatesToQueue:withHandler:")] void StartAbsoluteAltitudeUpdates (NSOperationQueue queue, Action handler); - [Watch (8, 0), NoTV, NoMac, iOS (15, 0)] + [NoTV, NoMac, iOS (15, 0)] [NoMacCatalyst] [Export ("stopAbsoluteAltitudeUpdates")] void StopAbsoluteAltitudeUpdates (); @@ -583,7 +579,7 @@ public enum CMAuthorizationStatus : long { Authorized, } - [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4), TV (15, 4)] + [iOS (15, 4), MacCatalyst (15, 4), TV (15, 4)] [Native] public enum CMOdometerOriginDevice : long { Unknown = 0, @@ -614,7 +610,6 @@ interface CMSensorRecorder { [Export ("isAccelerometerRecordingAvailable")] bool IsAccelerometerRecordingAvailable { get; } - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CMSensorRecorder.AuthorizationStatus' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CMSensorRecorder.AuthorizationStatus' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CMSensorRecorder.AuthorizationStatus' instead.")] [Static] @@ -657,7 +652,7 @@ interface CMPedometerEvent : NSSecureCoding, NSCopying { CMPedometerEventType Type { get; } } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -676,7 +671,7 @@ interface CMDyskineticSymptomResult : NSCopying, NSSecureCoding { float PercentLikely { get; } } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -707,18 +702,15 @@ interface CMTremorResult : NSCopying, NSSecureCoding { float PercentStrong { get; } } - [NoMac] - [Watch (5, 0), NoTV, NoMac, NoiOS] + [NoTV, NoMac, NoiOS] [NoMacCatalyst] delegate void CMDyskineticSymptomResultHandler (CMDyskineticSymptomResult [] dyskineticSymptomResult, NSError error); - [NoMac] - [Watch (5, 0), NoTV, NoMac, NoiOS] + [NoTV, NoMac, NoiOS] [NoMacCatalyst] delegate void CMTremorResultHandler (CMTremorResult [] tremorResults, NSError error); - [NoMac] - [Watch (5, 0), NoTV, NoMac, NoiOS] + [NoTV, NoMac, NoiOS] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface CMMovementDisorderManager { @@ -800,7 +792,6 @@ public enum CMMotionActivityConfidence : long { } [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Native] public enum CMDeviceMotionSensorLocation : long { @@ -809,7 +800,7 @@ public enum CMDeviceMotionSensorLocation : long { HeadphoneRight, } - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum CMHighFrequencyHeartRateDataConfidence : long { Low = 0, @@ -819,13 +810,11 @@ public enum CMHighFrequencyHeartRateDataConfidence : long { } [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [NoMac] delegate void CMHeadphoneDeviceMotionHandler ([NullAllowed] CMDeviceMotion motion, [NullAllowed] NSError error); [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Mac (13, 0)] [BaseType (typeof (NSObject))] @@ -860,15 +849,15 @@ interface CMHeadphoneMotionManager { [Export ("stopDeviceMotionUpdates")] void StopDeviceMotionUpdates (); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("connectionStatusActive")] bool ConnectionStatusActive { [Bind ("isConnectionStatusActive")] get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("startConnectionStatusUpdates")] void StartConnectionStatusUpdates (); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("stopConnectionStatusUpdates")] void StopConnectionStatusUpdates (); } @@ -876,7 +865,6 @@ interface CMHeadphoneMotionManager { interface ICMHeadphoneMotionManagerDelegate { } [iOS (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Mac (13, 0)] #if NET @@ -894,7 +882,7 @@ interface CMHeadphoneMotionManagerDelegate { void DidDisconnect (CMHeadphoneMotionManager manager); } - [Watch (7, 0), NoMac, iOS (14, 0)] + [NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (CMLogItem))] [DisableDefaultCtor] @@ -904,7 +892,7 @@ interface CMRotationRateData { CMRotationRate RotationRate { get; } } - [Watch (7, 0), NoMac, iOS (14, 0)] + [NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (CMRotationRateData))] [DisableDefaultCtor] @@ -914,7 +902,7 @@ interface CMRecordedRotationRateData { NSDate StartDate { get; } } - [Watch (7, 2), NoTV, NoMac, NoiOS] + [NoTV, NoMac, NoiOS] [NoMacCatalyst] [Native] enum CMFallDetectionEventUserResolution : long { @@ -924,7 +912,7 @@ enum CMFallDetectionEventUserResolution : long { Unresponsive, } - [Watch (7, 2), NoTV, NoMac, NoiOS] + [NoTV, NoMac, NoiOS] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -937,7 +925,7 @@ interface CMFallDetectionEvent { CMFallDetectionEventUserResolution Resolution { get; } } - [Watch (7, 2), NoTV, NoMac, NoiOS] + [NoTV, NoMac, NoiOS] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface CMFallDetectionManager { @@ -962,7 +950,7 @@ interface CMFallDetectionManager { interface ICMFallDetectionDelegate { } - [Watch (7, 2), NoTV, NoMac, NoiOS] + [NoTV, NoMac, NoiOS] [NoMacCatalyst] #if NET [Protocol, Model] @@ -980,7 +968,7 @@ interface CMFallDetectionDelegate { } [DisableDefaultCtor] // will crash - [Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (CMLogItem))] interface CMAbsoluteAltitudeData { [Export ("altitude")] @@ -998,7 +986,7 @@ interface NSUnitPressure : NSUnit { } interface NSUnitTemperature : NSUnit { } interface NSUnitLength : NSUnit { } - [Watch (8, 5), NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] [BaseType (typeof (CMLogItem))] [DisableDefaultCtor] interface CMAmbientPressureData { @@ -1010,7 +998,7 @@ interface CMAmbientPressureData { NSMeasurement Temperature { get; } } - [Watch (8, 5), NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] [BaseType (typeof (CMAmbientPressureData))] [DisableDefaultCtor] interface CMRecordedPressureData { @@ -1022,7 +1010,7 @@ interface CMRecordedPressureData { NSDate StartDate { get; } } - [Mac (13, 0), iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), NoMacCatalyst, NoTV] [Native] public enum CMWaterSubmersionState : long { Unknown = 0, @@ -1030,7 +1018,7 @@ public enum CMWaterSubmersionState : long { Submerged, } - [Mac (13, 0), iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), NoMacCatalyst, NoTV] [Native] public enum CMWaterSubmersionDepthState : long { Unknown = 0, @@ -1042,7 +1030,7 @@ public enum CMWaterSubmersionDepthState : long { SensorDepthError = 600, } - [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionEvent : NSSecureCoding, NSCopying { [Export ("date")] @@ -1052,7 +1040,7 @@ interface CMWaterSubmersionEvent : NSSecureCoding, NSCopying { CMWaterSubmersionState State { get; } } - [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionMeasurement : NSSecureCoding, NSCopying { [Export ("date")] @@ -1071,7 +1059,7 @@ interface CMWaterSubmersionMeasurement : NSSecureCoding, NSCopying { CMWaterSubmersionDepthState SubmersionState { get; } } - [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, NoTV] [BaseType (typeof (NSObject))] interface CMWaterTemperature : NSSecureCoding, NSCopying { [Export ("date")] @@ -1086,7 +1074,7 @@ interface CMWaterTemperature : NSSecureCoding, NSCopying { interface ICMWaterSubmersionManagerDelegate { } - [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, NoTV] #if NET [Protocol, Model] #else @@ -1111,7 +1099,7 @@ interface CMWaterSubmersionManagerDelegate { void ErrorOccurred (CMWaterSubmersionManager manager, NSError error); } - [NoMac, iOS (16, 0), NoMacCatalyst, Watch (9, 0), NoTV] + [NoMac, iOS (16, 0), NoMacCatalyst, NoTV] [BaseType (typeof (NSObject))] interface CMWaterSubmersionManager { [Wrap ("WeakDelegate")] @@ -1133,7 +1121,7 @@ interface CMWaterSubmersionManager { NSMeasurement MaximumDepth { get; } } - [Watch (10, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface CMBatchedSensorManager { [Static] @@ -1194,50 +1182,50 @@ interface CMOdometerData : NSSecureCoding, NSCopying { [Export ("endDate", ArgumentSemantic.Strong)] NSDate EndDate { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] [Export ("deltaDistance")] double DeltaDistance { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] [Export ("deltaDistanceAccuracy")] double DeltaDistanceAccuracy { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] [Export ("speed")] double Speed { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] [Export ("speedAccuracy")] double SpeedAccuracy { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] [Export ("gpsDate", ArgumentSemantic.Strong)] NSDate GpsDate { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] [Export ("deltaAltitude")] double DeltaAltitude { get; } - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] [Export ("verticalAccuracy")] double VerticalAccuracy { get; } - [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4)] + [iOS (15, 4), MacCatalyst (15, 4)] [Export ("originDevice", ArgumentSemantic.Assign)] CMOdometerOriginDevice OriginDevice { get; } - [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4)] + [iOS (15, 4), MacCatalyst (15, 4)] [NullAllowed] [Export ("slope", ArgumentSemantic.Strong)] NSNumber Slope { get; } - [Watch (8, 4), iOS (15, 4), MacCatalyst (15, 4)] + [iOS (15, 4), MacCatalyst (15, 4)] [NullAllowed] [Export ("maxAbsSlope", ArgumentSemantic.Strong)] NSNumber MaxAbsSlope { get; } } - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (CMLogItem))] interface CMHighFrequencyHeartRateData { [Export ("heartRate")] @@ -1251,19 +1239,19 @@ interface CMHighFrequencyHeartRateData { } [Native] - [Watch (11, 0), NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum CMHeadphoneActivityStatus : long { Disconnected = 0, Connected, } - [Watch (11, 0), NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] delegate void CMHeadphoneActivityStatusHandler (CMHeadphoneActivityStatus status, [NullAllowed] NSError error); - [Watch (11, 0), NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] delegate void CMHeadphoneActivityHandler ([NullAllowed] CMMotionActivity activity, [NullAllowed] NSError error); - [Watch (11, 0), NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] interface CMHeadphoneActivityManager { [Static] diff --git a/src/corenfc.cs b/src/corenfc.cs index d6aad51016eb..bcabf9246b31 100644 --- a/src/corenfc.cs +++ b/src/corenfc.cs @@ -58,7 +58,7 @@ public enum NFCReaderError : long { NdefReaderSessionErrorZeroLengthMessage = 403, } - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] /// Enumerates the kinds of NFC tags that can be read (currently only ISO-15693). [MacCatalyst (13, 1)] [Native] @@ -75,7 +75,7 @@ public enum NFCTagType : ulong { MiFare = 4, } - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] /// Enumerates the kinds of content-type available to objects. [MacCatalyst (13, 1)] public enum NFCTypeNameFormat : byte { // uint8_t @@ -88,7 +88,7 @@ public enum NFCTypeNameFormat : byte { // uint8_t Unchanged = 0x06, } - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] /// A for reading ISO-15693 vicinity cards. [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] @@ -112,7 +112,7 @@ interface NFCIso15693ReaderSession { void RestartPolling (); } - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] /// Subclass of that contains further configuration for commands to ISO-15693 tags. [MacCatalyst (13, 1)] [BaseType (typeof (NFCTagCommandConfiguration), Name = "NFCISO15693CustomCommandConfiguration")] @@ -134,7 +134,7 @@ interface NFCIso15693CustomCommandConfiguration { NativeHandle Constructor (nuint manufacturerCode, nuint customCommandCode, [NullAllowed] NSData requestParameters, nuint maximumRetries, double retryInterval); } - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NFCTagCommandConfiguration), Name = "NFCISO15693ReadMultipleBlocksConfiguration")] interface NFCIso15693ReadMultipleBlocksConfiguration { @@ -161,7 +161,7 @@ interface INFCIso15693Tag { } delegate void NFCIso15693TagGetMultipleBlockSecurityStatusCallback (NSNumber [] securityStatus, NSError error); delegate void NFCIso15693TagGetSystemInfoAndUidCallback (NSData uid, nint dsfid, nint afi, nint blockSize, nint blockCount, nint icReference, NSError error); - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] /// Implements with data associated with an ISO-15693 vicinity card. [MacCatalyst (13, 1)] [Protocol (Name = "NFCISO15693Tag")] @@ -625,7 +625,7 @@ interface NFCReaderSessionContract { /// The delegate-object interface for objects. interface INFCReaderSessionDelegate { } - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] /// Delegate object for objects. [MacCatalyst (13, 1)] [Protocol, Model] @@ -715,7 +715,7 @@ interface NFCTag : NSSecureCoding, NSCopying { #endif } - //[NoTV, NoWatch, NoMac] + //[NoTV, NoMac] /// Parameters for sending a command to an NFC tag. [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] diff --git a/src/corespotlight.cs b/src/corespotlight.cs index d0072d011a69..2151a172872a 100644 --- a/src/corespotlight.cs +++ b/src/corespotlight.cs @@ -86,12 +86,12 @@ interface CSSearchableIndex { NativeHandle Constructor (string name, [NullAllowed] NSString protectionClass); [EditorBrowsable (EditorBrowsableState.Advanced)] - [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoTV, NoWatch] + [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoTV] [Export ("initWithName:protectionClass:bundleIdentifier:options:")] NativeHandle Constructor (string name, [NullAllowed] NSString protectionClass, string bundleIdentifier, nint options); [Wrap ("this (name, protectionClass.GetConstant (), bundleIdentifier, options)")] - [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoTV, NoWatch] + [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoTV] NativeHandle Constructor (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options); [Export ("indexSearchableItems:completionHandler:")] @@ -232,11 +232,11 @@ interface CSSearchableItem : NSSecureCoding, NSCopying { [Export ("attributeSet", ArgumentSemantic.Strong)] CSSearchableItemAttributeSet AttributeSet { get; set; } - [NoTV, iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0), NoWatch] + [NoTV, iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0)] [Export ("compareByRank:")] NSComparisonResult CompareByRank (CSSearchableItem other); - [NoTV, NoWatch] + [NoTV] [Export ("isUpdate", ArgumentSemantic.Assign)] bool IsUpdate { get; set; } } @@ -1278,11 +1278,11 @@ interface CSSuggestion : NSSecureCoding, NSCopying { [Export ("compareByRank:")] NSComparisonResult CompareByRank (CSSuggestion other); - [iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoTV, NoWatch] + [iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoTV] [Export ("score")] NSNumber Score { get; } - [iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoTV, NoWatch] + [iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoTV] [Export ("suggestionDataSources")] NSObject [] SuggestionDataSources { get; } } diff --git a/src/coretext.cs b/src/coretext.cs index 693c4529e9f9..bb02cfff3cd8 100644 --- a/src/coretext.cs +++ b/src/coretext.cs @@ -46,12 +46,12 @@ interface CTFontFeatureSelectorKey { [Field ("kCTFontFeatureSelectorSettingKey")] NSString Setting { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Field ("kCTFontFeatureSampleTextKey")] NSString SampleText { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Field ("kCTFontFeatureTooltipTextKey")] NSString TooltipText { get; } @@ -103,7 +103,6 @@ interface CTTypesetterOptionKey { NSString ForceEmbeddingLevel { get; } #endif - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCTTypesetterOptionAllowUnboundedLayout")] NSString AllowUnboundedLayout { get; } @@ -114,12 +113,12 @@ interface CTFontManagerErrorKeys { [Field ("kCTFontManagerErrorFontURLsKey")] NSString FontUrlsKey { get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("kCTFontManagerErrorFontDescriptorsKey")] NSString FontDescriptorsKey { get; } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("kCTFontManagerErrorFontAssetNameKey")] NSString FontAssetNameKey { get; } @@ -227,7 +226,7 @@ interface CTFontDescriptorAttributeKey { [Field ("kCTFontEnabledAttribute")] NSString Enabled { get; } - [iOS (13, 0), NoTV, NoWatch, MacCatalyst (13, 1), NoMac] + [iOS (13, 0), NoTV, MacCatalyst (13, 1), NoMac] [Field ("kCTFontRegistrationUserInfoAttribute")] NSString RegistrationUserInfo { get; } } @@ -454,18 +453,18 @@ interface CTStringAttributeKey { [Field ("kCTRubyAnnotationAttributeName")] NSString RubyAnnotation { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCTAdaptiveImageProviderAttributeName")] NSString AdaptiveImageProvider { get; } #endif - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("kCTTrackingAttributeName")] NSString TrackingAttributeName { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface CTAdaptiveImageProviding { [Abstract] diff --git a/src/corevideo.cs b/src/corevideo.cs index fa439996ba14..2f0e1844d458 100644 --- a/src/corevideo.cs +++ b/src/corevideo.cs @@ -10,9 +10,7 @@ using CoreGraphics; using Foundation; using ObjCRuntime; -#if !WATCH using Metal; -#endif namespace CoreVideo { @@ -264,36 +262,36 @@ interface CVImageBuffer : CVBuffer { [Field ("kCVImageBufferContentLightLevelInfoKey")] NSString ContentLightLevelInfoKey { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("kCVImageBufferAlphaChannelModeKey")] NSString AlphaChannelModeKey { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("kCVImageBufferRegionOfInterestKey")] NSString RegionOfInterestKey { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("kCVImageBufferAmbientViewingEnvironmentKey")] NSString AmbientViewingEnvironmentKey { get; } - [Watch (10, 2), TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [Field ("kCVImageBufferLogTransferFunctionKey")] NSString LogTransferFunctionKey { get; } - [Watch (10, 2), TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [Field ("kCVImageBufferLogTransferFunction_AppleLog")] NSString LogTransferFunctionAppleLogKey { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCVImageBufferSceneIlluminationKey")] NSString SceneIlluminationKey { get; } - [Mac (15, 0), NoiOS, NoTV, NoWatch, NoMacCatalyst] + [Mac (15, 0), NoiOS, NoTV, NoMacCatalyst] [Field ("kCVImageBufferPostDecodeProcessingSequenceMetadataKey")] NSString PostDecodeProcessingSequenceMetadataKey { get; } - [Mac (15, 0), NoiOS, NoTV, NoWatch, NoMacCatalyst] + [Mac (15, 0), NoiOS, NoTV, NoMacCatalyst] [Field ("kCVImageBufferPostDecodeProcessingFrameMetadataKey")] NSString PostDecodeProcessingFrameMetadataKey { get; } } @@ -333,7 +331,6 @@ enum CVImageBufferTransferFunction { [Field ("kCVImageBufferTransferFunction_ITU_R_2100_HLG")] ItuR2100Hlg, - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCVImageBufferTransferFunction_Linear")] Linear, @@ -453,13 +450,11 @@ interface CVPixelBuffer { NSString PlaneAlignmentKey { get; } [NoMac] - [NoWatch] [NoMacCatalyst] [Field ("kCVPixelBufferOpenGLESCompatibilityKey")] NSString OpenGLESCompatibilityKey { get; } [NoMac] - [NoWatch] [NoMacCatalyst] [Field ("kCVPixelBufferOpenGLESTextureCacheCompatibilityKey")] NSString OpenGLESTextureCacheCompatibilityKey { get; } @@ -468,51 +463,51 @@ interface CVPixelBuffer { [Field ("kCVPixelBufferMetalCompatibilityKey")] NSString MetalCompatibilityKey { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kCVPixelBufferOpenGLTextureCacheCompatibilityKey")] NSString OpenGLTextureCacheCompatibilityKey { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_BlackLevel")] NSString ProResRawKey_BlackLevel { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_ColorMatrix")] NSString ProResRawKey_ColorMatrix { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_GainFactor")] NSString ProResRawKey_GainFactor { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_RecommendedCrop")] NSString ProResRawKey_RecommendedCrop { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_SenselSitingOffsets")] NSString ProResRawKey_SenselSitingOffsets { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_WhiteBalanceBlueFactor")] NSString ProResRawKey_WhiteBalanceBlueFactor { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_WhiteBalanceCCT")] NSString ProResRawKey_WhiteBalanceCct { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_WhiteBalanceRedFactor")] NSString ProResRawKey_WhiteBalanceRedFactor { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_WhiteLevel")] NSString ProResRawKey_WhiteLevel { get; } - [NoWatch, NoTV, iOS (14, 0), MacCatalyst (15, 0)] + [NoTV, iOS (14, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferVersatileBayerKey_BayerPattern")] NSString VersatileBayerKey_BayerPattern { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Field ("kCVPixelBufferProResRAWKey_MetadataExtension")] NSString MetadataExtension { get; } } @@ -528,7 +523,6 @@ interface CVPixelBufferPool { } /// Cache to manage CVMetalTexture objects. - [NoWatch] [MacCatalyst (13, 1)] [Partial] interface CVMetalTextureCache { @@ -537,7 +531,7 @@ interface CVMetalTextureCache { [Field ("kCVMetalTextureCacheMaximumTextureAgeKey")] IntPtr MaxTextureAge { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("kCVMetalTextureStorageMode")] NSString StorageMode { get; } @@ -551,7 +545,6 @@ interface CVMetalTextureCache { // IntPtr MaxTextureAge { get; } // } - [NoWatch] [MacCatalyst (13, 1)] [Static, Internal] interface CVMetalTextureAttributesKeys { @@ -560,14 +553,13 @@ interface CVMetalTextureAttributesKeys { NSString UsageKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("CVMetalTextureAttributesKeys")] interface CVMetalTextureAttributes { // Create stub DictionaryContainer class } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] public enum CVVersatileBayerPattern : uint { Rggb = 0, @@ -576,14 +568,13 @@ public enum CVVersatileBayerPattern : uint { Bggr = 3, } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static, Internal] interface CVMetalBufferCacheAttributeKeys { [Field ("kCVMetalBufferCacheMaximumBufferAgeKey")] NSString MaximumBufferAgeKey { get; } } - [NoWatch] [StrongDictionary ("CVMetalBufferCacheAttributeKeys")] interface CVMetalBufferCacheAttributes { double MaximumBufferAge { get; } @@ -615,7 +606,7 @@ interface CVPixelFormatKeys { [Field ("kCVPixelFormatContainsGrayscale")] NSString ContainsGrayscale { get; } - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (16, 0), Watch (9, 0)] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (16, 0)] [Field ("kCVPixelFormatContainsSenselArray")] NSString ContainsSenselArray { get; } @@ -673,14 +664,14 @@ interface CVPixelFormatKeys { [Field ("kCVPixelFormatOpenGLCompatibility")] NSString OpenGLCompatibility { get; } - [NoWatch, NoMacCatalyst, NoMac] + [NoMacCatalyst, NoMac] [Field ("kCVPixelFormatOpenGLESCompatibility")] NSString OpenGlesCompatibility { get; } [Field ("kCVPixelFormatFillExtendedPixelsCallback")] NSString FillExtendedPixelsCallback { get; } - [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), TV (18, 0), Watch (11, 0)] + [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), TV (18, 0)] [Field ("kCVPixelFormatBitsPerComponent")] NSString BitsPerComponent { get; } } @@ -740,7 +731,7 @@ interface CVPixelFormatDescription { bool ContainsGrayscale { get; set; } - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (16, 0), Watch (9, 0)] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), TV (16, 0)] #if XAMCORE_5_0 bool ContainsSenselArray { get; set; } #else @@ -785,12 +776,12 @@ interface CVPixelFormatDescription { bool OpenGLCompatibility { get; set; } - [NoWatch, NoMacCatalyst, NoMac] + [NoMacCatalyst, NoMac] bool OpenGlesCompatibility { get; set; } NSData FillExtendedPixelsCallback { get; set; } - [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), TV (18, 0), Watch (11, 0)] + [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), TV (18, 0)] int BitsPerComponent { get; set; } } } diff --git a/src/cryptotokenkit.cs b/src/cryptotokenkit.cs index 301d9358c5ab..7da6fd74417a 100644 --- a/src/cryptotokenkit.cs +++ b/src/cryptotokenkit.cs @@ -19,7 +19,7 @@ namespace CryptoTokenKit { #endif [Native] [ErrorDomain ("TKErrorDomain")] - [iOS (9, 0), Mac (10, 10), MacCatalyst (13, 1), TV (9, 0), Watch (2, 0)] + [iOS (9, 0), Mac (10, 10), MacCatalyst (13, 1), TV (9, 0)] public enum TKErrorCode : long { NotImplemented = -1, @@ -36,7 +36,7 @@ public enum TKErrorCode : long #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [Native] public enum TKSmartCardSlotState : long { @@ -50,7 +50,7 @@ public enum TKSmartCardSlotState : long #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINCharset")] public enum TKSmartCardPinCharset : long { @@ -62,7 +62,7 @@ public enum TKSmartCardPinCharset : long #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINEncoding")] public enum TKSmartCardPinEncoding : long { @@ -74,7 +74,7 @@ public enum TKSmartCardPinEncoding : long #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINJustification")] public enum TKSmartCardPinJustification : long { @@ -86,7 +86,7 @@ public enum TKSmartCardPinJustification : long [Experimental ("APL0001")] #endif [Flags] - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINCompletion")] public enum TKSmartCardPinCompletion : ulong { @@ -99,7 +99,7 @@ public enum TKSmartCardPinCompletion : ulong [Experimental ("APL0001")] #endif [Flags] - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINConfirmation")] public enum TKSmartCardPinConfirmation : ulong { @@ -112,7 +112,7 @@ public enum TKSmartCardPinConfirmation : ulong [Experimental ("APL0001")] #endif [Flags] - [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [Native] public enum TKSmartCardProtocol : ulong { @@ -126,7 +126,7 @@ public enum TKSmartCardProtocol : ulong #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Native] public enum TKTokenOperation : long { @@ -140,7 +140,7 @@ public enum TKTokenOperation : long #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 12), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 12), MacCatalyst (13, 1), TV (13, 0)] [Protocol] interface TKSmartCardTokenDriverDelegate : TKTokenDriverDelegate { @@ -158,7 +158,7 @@ interface ITKSmartCardTokenDriverDelegate {} #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Protocol] interface TKSmartCardUserInteractionDelegate { @@ -192,7 +192,7 @@ interface ITKSmartCardUserInteractionDelegate {} #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Protocol, Model] [BaseType (typeof(NSObject))] interface TKTokenDelegate @@ -214,12 +214,12 @@ interface ITKTokenDelegate {} #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Protocol, Model] [BaseType (typeof(NSObject))] interface TKTokenDriverDelegate { - [Watch (7,0), TV (14,0), Mac (10,15), iOS (14,0)] + [TV (14,0), Mac (10,15), iOS (14,0)] [Export ("tokenDriver:tokenForConfiguration:error:")] [return: NullAllowed] TKToken GetToken (TKTokenDriver driver, TKTokenConfiguration configuration, [NullAllowed] out NSError error); @@ -236,7 +236,7 @@ interface ITKTokenDriverDelegate {} #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Protocol, Model] [BaseType (typeof(NSObject))] interface TKTokenSessionDelegate @@ -269,7 +269,7 @@ interface ITKTokenSessionDelegate {} #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTlvRecord), Name = "TKBERTLVRecord")] interface TKBerTlvRecord { @@ -287,7 +287,7 @@ interface TKBerTlvRecord #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTlvRecord), Name = "TKCompactTLVRecord")] interface TKCompactTlvRecord { @@ -298,7 +298,7 @@ interface TKCompactTlvRecord #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTlvRecord), Name = "TKSimpleTLVRecord")] interface TKSimpleTlvRecord { @@ -319,7 +319,7 @@ interface TKSimpleTlvRecord #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(NSObject))] interface TKSmartCard { @@ -390,7 +390,7 @@ interface TKSmartCard #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(NSObject), Name = "TKSmartCardATR")] [DisableDefaultCtor] interface TKSmartCardAtr @@ -429,7 +429,7 @@ interface TKSmartCardAtr #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(NSObject), Name = "TKSmartCardATRInterfaceGroup")] interface TKSmartCardAtrInterfaceGroup { @@ -452,7 +452,7 @@ interface TKSmartCardAtrInterfaceGroup #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKTokenSession @@ -475,7 +475,7 @@ interface TKTokenSession #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(NSObject), Name = "TKSmartCardPINFormat")] interface TKSmartCardPinFormat { @@ -510,7 +510,7 @@ interface TKSmartCardPinFormat #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(NSObject))] interface TKSmartCardSlot { @@ -542,7 +542,7 @@ interface TKSmartCardSlot #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKSmartCardSlotManager @@ -567,7 +567,7 @@ interface TKSmartCardSlotManager #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKToken))] interface TKSmartCardToken { @@ -582,7 +582,7 @@ interface TKSmartCardToken #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof (TKTokenDriver))] interface TKSmartCardTokenDriver { @@ -591,7 +591,7 @@ interface TKSmartCardTokenDriver #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTokenSession))] interface TKSmartCardTokenSession { @@ -607,7 +607,7 @@ interface TKSmartCardTokenSession #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(NSObject))] interface TKSmartCardUserInteraction { @@ -635,7 +635,7 @@ interface TKSmartCardUserInteraction #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(TKSmartCardUserInteraction), Name = "TKSmartCardUserInteractionForPINOperation")] interface TKSmartCardUserInteractionForPinOperation { @@ -659,7 +659,7 @@ interface TKSmartCardUserInteractionForPinOperation #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof(TKSmartCardUserInteractionForPinOperation), Name = "TKSmartCardUserInteractionForSecurePINChange")] interface TKSmartCardUserInteractionForSecurePinChange { @@ -670,7 +670,7 @@ interface TKSmartCardUserInteractionForSecurePinChange #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0), Watch (8, 0)] + [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof (TKSmartCardUserInteractionForPinOperation), Name = "TKSmartCardUserInteractionForSecurePINVerification")] interface TKSmartCardUserInteractionForSecurePinVerification { @@ -679,7 +679,7 @@ interface TKSmartCardUserInteractionForSecurePinVerification #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject), Name = "TKTLVRecord")] [DisableDefaultCtor] interface TKTlvRecord @@ -707,7 +707,7 @@ interface TKTlvRecord #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKToken @@ -726,7 +726,7 @@ interface TKToken [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] NSObject WeakDelegate { get; set; } - [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0)] [Export ("configuration")] TKTokenConfiguration Configuration { get; } @@ -737,7 +737,7 @@ interface TKToken #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] interface TKTokenAuthOperation : NSSecureCoding { @@ -748,7 +748,7 @@ interface TKTokenAuthOperation : NSSecureCoding #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKTokenConfiguration @@ -774,7 +774,7 @@ interface TKTokenConfiguration #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] interface TKTokenDriver { @@ -789,7 +789,7 @@ interface TKTokenDriver #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKTokenDriverConfiguration @@ -814,7 +814,7 @@ interface TKTokenDriverConfiguration #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKTokenKeyAlgorithm @@ -829,7 +829,7 @@ interface TKTokenKeyAlgorithm #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTokenKeychainItem))] interface TKTokenKeychainCertificate { @@ -844,7 +844,7 @@ interface TKTokenKeychainCertificate #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKTokenKeychainContents @@ -867,7 +867,7 @@ interface TKTokenKeychainContents #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKTokenKeychainItem @@ -889,7 +889,7 @@ interface TKTokenKeychainItem #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTokenKeychainItem))] interface TKTokenKeychainKey { @@ -931,7 +931,7 @@ interface TKTokenKeychainKey #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] interface TKTokenKeyExchangeParameters { @@ -945,7 +945,7 @@ interface TKTokenKeyExchangeParameters #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTokenAuthOperation))] interface TKTokenPasswordAuthOperation { @@ -956,7 +956,7 @@ interface TKTokenPasswordAuthOperation #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(TKTokenAuthOperation), Name = "TKTokenSmartCardPINAuthOperation")] interface TKTokenSmartCardPinAuthOperation { @@ -979,7 +979,7 @@ interface TKTokenSmartCardPinAuthOperation #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof(NSObject))] interface TKTokenWatcher { @@ -991,18 +991,17 @@ interface TKTokenWatcher [Deprecated (PlatformName.iOS, 11, 0, "Use the default constructor followed by a call to the 'SetInsertionHandler' method.")] [Deprecated (PlatformName.TvOS, 11, 0, "Use the default constructor followed by a call to the 'SetInsertionHandler' method.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, "Use the default constructor followed by a call to the 'SetInsertionHandler' method.")] - [Deprecated (PlatformName.WatchOS, 4, 0, "Use the default constructor followed by a call to the 'SetInsertionHandler' method.")] [Export ("initWithInsertionHandler:")] NativeHandle Constructor (Action insertionHandler); - [iOS (11, 0), Mac (10, 13), MacCatalyst (13, 1), TV (11, 0), Watch (4, 0)] + [iOS (11, 0), Mac (10, 13), MacCatalyst (13, 1), TV (11, 0)] [Export ("setInsertionHandler:")] void SetInsertionHandler (Action insertionHandler); [Export ("addRemovalHandler:forTokenID:")] void AddRemovalHandler (Action removalHandler, string tokenId); - [iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), TV (15, 0)] [Export ("tokenInfoForTokenID:")] [return: NullAllowed] TKTokenWatcherTokenInfo GetTokenInfo (string tokenId); @@ -1011,7 +1010,7 @@ interface TKTokenWatcher #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - [iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), TV (15, 0)] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface TKTokenWatcherTokenInfo diff --git a/src/devicecheck.cs b/src/devicecheck.cs index 9136740da8e0..c42a681d3dae 100644 --- a/src/devicecheck.cs +++ b/src/devicecheck.cs @@ -14,7 +14,6 @@ namespace DeviceCheck { - [Watch (9, 0)] [MacCatalyst (13, 1)] [ErrorDomain ("DCErrorDomain")] [Native] @@ -29,12 +28,10 @@ public enum DCError : long { /// The generated token. /// The error that was encountered, or if no error occurred. /// A completion handler for DeviceCheck token generation. - [Watch (9, 0)] [MacCatalyst (13, 1)] delegate void DCDeviceGenerateTokenCompletionHandler ([NullAllowed] NSData token, [NullAllowed] NSError error); /// A device representation for associating users and devices with tracking data. - [Watch (9, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] // From the documentation it seems the only way to create a usable instance is to use the static CurrentDevice property. [BaseType (typeof (NSObject))] @@ -52,7 +49,6 @@ interface DCDevice { void GenerateToken (DCDeviceGenerateTokenCompletionHandler completion); } - [Watch (9, 0)] [iOS (14, 0)] [TV (15, 0)] [MacCatalyst (14, 5)] diff --git a/src/devicediscoveryextension.cs b/src/devicediscoveryextension.cs index 8bb2490943f1..0e2f8404ab8b 100644 --- a/src/devicediscoveryextension.cs +++ b/src/devicediscoveryextension.cs @@ -22,7 +22,7 @@ namespace DeviceDiscoveryExtension { [Static] - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] interface DDDeviceProtocolStrings { [Field ("DDDeviceProtocolStringInvalid")] NSString Invalid { get; } @@ -31,7 +31,7 @@ interface DDDeviceProtocolStrings { NSString Dial { get; } } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface DDDevice { @@ -98,7 +98,7 @@ interface DDDevice { string Ssid { get; set; } } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface DDDeviceEvent { @@ -112,7 +112,7 @@ interface DDDeviceEvent { DDEventType EventType { get; } } - [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [Mac (15, 0), iOS (16, 0), MacCatalyst (18, 0), NoTV] [BaseType (typeof (NSObject))] interface DDDiscoverySession { [Export ("reportEvent:")] diff --git a/src/devicediscoveryui.cs b/src/devicediscoveryui.cs index c5726126d261..e8ac71f850e7 100644 --- a/src/devicediscoveryui.cs +++ b/src/devicediscoveryui.cs @@ -26,7 +26,7 @@ namespace DeviceDiscoveryUI { [Internal] delegate void _DevicePickerCompletionHandler ([NullAllowed] OS_nw_endpoint endpoint, [NullAllowed] OS_nw_error error); - [NoMac, NoiOS, NoMacCatalyst, NoWatch, TV (16, 0)] + [NoMac, NoiOS, NoMacCatalyst, TV (16, 0)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] interface DDDevicePickerViewController { diff --git a/src/eventkit.cs b/src/eventkit.cs index 3ab42cd1ba56..00c950adde57 100644 --- a/src/eventkit.cs +++ b/src/eventkit.cs @@ -9,7 +9,7 @@ // Copyright 2012-2015, Xamarin Inc. // -#if !WATCH && !MONOMAC +#if !MONOMAC using AddressBook; #endif using ObjCRuntime; @@ -24,7 +24,7 @@ using UIKit; #endif -#if !WATCH && !MONOMAC +#if !MONOMAC using EKAlarmType = Foundation.NSObject; #else using ABAddressBook = Foundation.NSObject; @@ -43,7 +43,7 @@ namespace EventKit { /// The base-class for persistent Event Kit classes. /// /// Apple documentation for EKObject - [iOS (13, 0), MacCatalyst (13, 1), Watch (6, 0), NoTV] + [iOS (13, 0), MacCatalyst (13, 1), NoTV] [BaseType (typeof (NSObject))] [Abstract] interface EKObject { @@ -177,7 +177,7 @@ interface EKSource { [Export ("calendarsForEntityType:")] NSSet GetCalendars (EKEntityType entityType); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("isDelegate", ArgumentSemantic.Assign)] bool IsDelegate { get; } } @@ -237,14 +237,12 @@ interface EKAlarm : NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("type")] EKAlarmType Type { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [NullAllowed] [Export ("emailAddress")] @@ -252,7 +250,6 @@ interface EKAlarm : NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [NullAllowed] [Export ("soundName")] @@ -260,7 +257,6 @@ interface EKAlarm : NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 9)] [NullAllowed] @@ -285,7 +281,6 @@ interface EKCalendar { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("color", ArgumentSemantic.Copy)] NSColor Color { get; set; } @@ -375,7 +370,6 @@ interface EKEvent { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Replaced by 'BirthdayContactIdentifier'.")] [NullAllowed] @@ -417,7 +411,6 @@ interface EKParticipant : NSCopying { EKParticipantType ParticipantType { get; } [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Replaced by 'ContactPredicate'.")] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Replaced by 'ContactPredicate'.")] @@ -562,7 +555,7 @@ NativeHandle Constructor (EKRecurrenceFrequency type, nint interval, [NullAllowe /// [BaseType (typeof (NSObject))] interface EKEventStore { - [iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("initWithSources:")] NativeHandle Constructor (EKSource [] sources); @@ -579,12 +572,10 @@ interface EKEventStore { [Export ("defaultCalendarForNewEvents"), NullAllowed] EKCalendar DefaultCalendarForNewEvents { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("saveEvent:span:error:")] bool SaveEvent (EKEvent theEvent, EKSpan span, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Export ("removeEvent:span:error:")] bool RemoveEvents (EKEvent theEvent, EKSpan span, out NSError error); @@ -617,27 +608,22 @@ interface EKEventStore { [Export ("calendarWithIdentifier:")] EKCalendar GetCalendar (string identifier); - [NoWatch] [MacCatalyst (13, 1)] [Export ("saveCalendar:commit:error:")] bool SaveCalendar (EKCalendar calendar, bool commit, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Export ("removeCalendar:commit:error:")] bool RemoveCalendar (EKCalendar calendar, bool commit, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Export ("saveEvent:span:commit:error:")] bool SaveEvent (EKEvent ekEvent, EKSpan span, bool commit, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Export ("removeEvent:span:commit:error:")] bool RemoveEvent (EKEvent ekEvent, EKSpan span, bool commit, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Export ("commit:")] bool Commit (out NSError error); @@ -645,7 +631,6 @@ interface EKEventStore { [Export ("reset")] void Reset (); - [NoWatch] [MacCatalyst (13, 1)] [Export ("refreshSourcesIfNecessary")] void RefreshSourcesIfNecessary (); @@ -680,25 +665,21 @@ interface EKEventStore { [Export ("predicateForRemindersInCalendars:")] NSPredicate PredicateForReminders ([NullAllowed] EKCalendar [] calendars); - [NoWatch] [MacCatalyst (13, 1)] [Export ("removeReminder:commit:error:")] bool RemoveReminder (EKReminder reminder, bool commit, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] [Export ("saveReminder:commit:error:")] bool SaveReminder (EKReminder reminder, bool commit, out NSError error); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 9)] [Export ("initWithAccessToEntityTypes:")] NativeHandle Constructor (EKEntityMask accessToEntityTypes); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("delegateSources")] EKSource [] DelegateSources { get; } @@ -706,23 +687,22 @@ interface EKEventStore { [MacCatalyst (13, 1)] [Deprecated (PlatformName.iOS, 17, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")] [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use RequestFullAccessToEvents, RequestWriteOnlyAccessToEvents, or RequestFullAccessToReminders.")] [Export ("requestAccessToEntityType:completion:")] [Async] void RequestAccess (EKEntityType entityType, Action completionHandler); - [Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("requestFullAccessToEventsWithCompletion:")] [Async] void RequestFullAccessToEvents (EKEventStoreRequestAccessCompletionHandler completion); - [Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("requestWriteOnlyAccessToEventsWithCompletion:")] [Async] void RequestWriteOnlyAccessToEvents (EKEventStoreRequestAccessCompletionHandler completion); - [Watch (10, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("requestFullAccessToRemindersWithCompletion:")] [Async] void RequestFullAccessToReminders (EKEventStoreRequestAccessCompletionHandler completion); @@ -771,7 +751,7 @@ interface EKReminder { EKReminder Create (EKEventStore eventStore); } - [iOS (15, 0), Watch (8, 0), MacCatalyst (15, 0), NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface EKVirtualConferenceDescriptor { @@ -792,7 +772,7 @@ interface EKVirtualConferenceDescriptor { delegate void VirtualConferenceRoomTypeHandler (NSArray virtualConferenceRoomTypeDescriptor, NSError error); delegate void VirtualConferenceHandler (EKVirtualConferenceDescriptor virtualConferenceDescriptor, NSError error); - [iOS (15, 0), Watch (8, 0), MacCatalyst (15, 0), NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] [BaseType (typeof (NSObject))] interface EKVirtualConferenceProvider : NSExtensionRequestHandling { [Async] @@ -804,7 +784,7 @@ interface EKVirtualConferenceProvider : NSExtensionRequestHandling { void FetchVirtualConference (string identifier, VirtualConferenceHandler handler); } - [iOS (15, 0), Watch (8, 0), MacCatalyst (15, 0), NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface EKVirtualConferenceRoomTypeDescriptor { @@ -819,7 +799,7 @@ interface EKVirtualConferenceRoomTypeDescriptor { string Identifier { get; } } - [iOS (15, 0), Watch (8, 0), MacCatalyst (15, 0), NoTV] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] [BaseType (typeof (NSObject), Name = "EKVirtualConferenceURLDescriptor")] [DisableDefaultCtor] interface EKVirtualConferenceUrlDescriptor { diff --git a/src/extensionkit.cs b/src/extensionkit.cs index e772377fd26c..e41a7069907f 100644 --- a/src/extensionkit.cs +++ b/src/extensionkit.cs @@ -20,7 +20,7 @@ #endif namespace ExtensionKit { - [Mac (13, 0), NoiOS, NoMacCatalyst, NoWatch, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [BaseType (typeof (UIViewController))] interface EXAppExtensionBrowserViewController { [DesignatedInitializer] @@ -30,7 +30,7 @@ interface EXAppExtensionBrowserViewController { interface IEXHostViewControllerDelegate { } - [Mac (13, 0), NoiOS, NoMacCatalyst, NoWatch, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] #if NET [Protocol, Model] #else @@ -52,7 +52,7 @@ interface EXHostViewControllerDelegate { } // @interface EXHostViewController : NSViewController - [Mac (13, 0), NoiOS, NoMacCatalyst, NoWatch, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [BaseType (typeof (UIViewController))] interface EXHostViewController { [DesignatedInitializer] diff --git a/src/fileprovider.cs b/src/fileprovider.cs index 533444346b86..dcaaeb19e0bf 100644 --- a/src/fileprovider.cs +++ b/src/fileprovider.cs @@ -38,7 +38,6 @@ namespace FileProvider { /// The members of this class can be used from a background thread. /// /// Apple documentation for NSFileProviderExtension - [NoWatch] [NoTV] [NoMac] [Unavailable (PlatformName.MacCatalyst)] @@ -261,12 +260,10 @@ enum NSFileProviderItemCapabilities : ulong { Deleting = 1 << 5, [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] Evicting = 1 << 6, [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] ExcludingFromSync = 1 << 7, AddingSubItems = Writing, @@ -281,20 +278,20 @@ enum NSFileProviderItemCapabilities : ulong { #endif } - [Flags, NoWatch, NoTV, NoMacCatalyst, NoiOS, Mac (12, 3)] + [Flags, NoTV, NoMacCatalyst, NoiOS, Mac (12, 3)] [Native] public enum NSFileProviderMaterializationFlags : ulong { KnownSparseRanges = 1uL << 0, } - [Flags, NoWatch, NoTV, NoMacCatalyst, NoiOS, Mac (12, 3)] + [Flags, NoTV, NoMacCatalyst, NoiOS, Mac (12, 3)] [Native] public enum NSFileProviderFetchContentsOptions : ulong { StrictVersioning = 1uL << 0, } [Native] - [iOS (16, 0), Mac (13, 0), NoWatch, NoTV, NoMacCatalyst] + [iOS (16, 0), Mac (13, 0), NoTV, NoMacCatalyst] public enum NSFileProviderContentPolicy : long { Inherited, [NoiOS, NoMacCatalyst] @@ -368,7 +365,7 @@ interface NSFileProviderDomain { bool Hidden { [Bind ("isHidden")] get; set; } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Export ("testingModes", ArgumentSemantic.Assign)] NSFileProviderDomainTestingModes TestingModes { get; set; } @@ -377,19 +374,19 @@ interface NSFileProviderDomain { [Field ("NSFileProviderDomainDidChange")] NSString DidChange { get; } - [NoWatch, NoTV, iOS (16, 0), NoMacCatalyst] + [NoTV, iOS (16, 0), NoMacCatalyst] [NullAllowed, Export ("backingStoreIdentity")] NSData BackingStoreIdentity { get; } - [NoWatch, NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] + [NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] [Export ("replicated")] bool Replicated { [Bind ("isReplicated")] get; } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0), Mac (13, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0), Mac (13, 0)] [Export ("supportsSyncingTrash")] bool SupportsSyncingTrash { get; set; } - [NoWatch, NoTV, NoMacCatalyst, Mac (13, 3), iOS (16, 4)] + [NoTV, NoMacCatalyst, Mac (13, 3), iOS (16, 4)] [NullAllowed, Export ("volumeUUID")] NSUuid VolumeUuid { get; } @@ -618,7 +615,7 @@ interface NSFileProviderItem { [Export ("typeAndCreator")] NSFileProviderTypeAndCreator TypeAndCreator { get; } - [NoWatch, NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] + [NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] [Export ("contentPolicy")] NSFileProviderContentPolicy ContentPolicy { get; } } @@ -708,18 +705,18 @@ interface NSFileProviderManager { void SignalErrorResolved (NSError error, Action completionHandler); [Unavailable (PlatformName.MacCatalyst)] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Export ("globalProgressForKind:")] NSProgress GetGlobalProgress (NSString kind); // NSString intended. [Unavailable (PlatformName.MacCatalyst)] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Field ("NSFileProviderMaterializedSetDidChange")] [Notification] NSString MaterializedSetDidChange { get; } [Unavailable (PlatformName.MacCatalyst)] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Field ("NSFileProviderPendingSetDidChange")] [Notification] NSString PendingSetDidChange { get; } @@ -777,20 +774,20 @@ interface NSFileProviderManager { #endregion [Unavailable (PlatformName.MacCatalyst)] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Export ("enumeratorForPendingItems")] INSFileProviderPendingSetEnumerator GetEnumeratorForPendingItems (); // From NSFileProviderManager (TestingModeInteractive) Category [Unavailable (PlatformName.MacCatalyst)] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Export ("listAvailableTestingOperationsWithError:")] [return: NullAllowed] INSFileProviderTestingOperation [] ListAvailableTestingOperations ([NullAllowed] out NSError error); [Unavailable (PlatformName.MacCatalyst)] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Export ("runTestingOperations:error:")] [return: NullAllowed] NSDictionary GetRunTestingOperations (INSFileProviderTestingOperation [] operations, [NullAllowed] out NSError error); @@ -802,17 +799,17 @@ interface NSFileProviderManager { void RemoveDomain (NSFileProviderDomain domain, NSFileProviderDomainRemovalMode mode, Action completionHandler); [Async] - [iOS (16, 0), Mac (13, 0), NoWatch, NoTV, NoMacCatalyst] + [iOS (16, 0), Mac (13, 0), NoTV, NoMacCatalyst] [Export ("getServiceWithName:itemIdentifier:completionHandler:")] void GetService (string serviceName, string itemIdentifier, Action completionHandler); [Async] - [NoWatch, NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] + [NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] [Export ("requestModificationOfFields:forItemWithIdentifier:options:completionHandler:")] void RequestModification (NSFileProviderItemFields fields, string itemIdentifier, NSFileProviderModifyItemOptions options, Action completionHandler); [Async] - [NoWatch, NoTV, NoMacCatalyst, NoiOS, Mac (13, 0)] + [NoTV, NoMacCatalyst, NoiOS, Mac (13, 0)] [Export ("requestDownloadForItemWithIdentifier:requestedRange:completionHandler:")] void RequestDownload (string itemIdentifier, NSRange rangeToMaterialize, Action completionHandler); } @@ -820,7 +817,7 @@ interface NSFileProviderManager { interface INSFileProviderPendingSetEnumerator { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderPendingSetEnumerator : NSFileProviderEnumerator { @@ -835,7 +832,7 @@ interface NSFileProviderPendingSetEnumerator : NSFileProviderEnumerator { #if XAMCORE_5_0 [Abstract] #endif - [NoWatch, NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] + [NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] [Export ("maximumSizeReached")] bool MaximumSizeReached { [Bind ("isMaximumSizeReached")] get; } } @@ -860,7 +857,7 @@ interface NSFileProviderServiceSource { [return: NullAllowed] NSXpcListenerEndpoint MakeListenerEndpoint (out NSError error); - [NoWatch, NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] + [NoTV, NoMacCatalyst, Mac (13, 0), iOS (16, 0)] [Export ("restricted")] bool Restricted { [Bind ("isRestricted")] get; } } @@ -880,7 +877,7 @@ interface NSFileProviderItemVersion { [Export ("metadataVersion")] NSData MetadataVersion { get; } - [NoWatch, NoTV, NoMacCatalyst, iOS (16, 0)] + [NoTV, NoMacCatalyst, iOS (16, 0)] [Static] [Export ("beforeFirstSyncComponent")] NSData BeforeFirstSyncComponent { get; } @@ -975,7 +972,7 @@ interface NSFileProviderRequest { [Export ("requestingExecutable", ArgumentSemantic.Copy)] NSUrl RequestingExecutable { get; } - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [NoMacCatalyst] [NullAllowed, Export ("domainVersion")] NSFileProviderDomainVersion DomainVersion { get; } @@ -1097,7 +1094,7 @@ interface NSFileProviderReplicatedExtension : NSFileProviderEnumerating { void MaterializedItemsDidChange (Action completionHandler); [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Export ("pendingItemsDidChangeWithCompletionHandler:")] void PendingItemsDidChange (Action completionHandler); } @@ -1105,7 +1102,7 @@ interface NSFileProviderReplicatedExtension : NSFileProviderEnumerating { interface INSFileProviderDomainState { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderDomainState { @@ -1118,7 +1115,7 @@ interface NSFileProviderDomainState { NSDictionary UserInfo { get; } } - [NoWatch, NoTV, iOS (15, 0), NoMacCatalyst] + [NoTV, iOS (15, 0), NoMacCatalyst] [Flags] [Native] public enum NSFileProviderDomainTestingModes : ulong { @@ -1127,7 +1124,7 @@ public enum NSFileProviderDomainTestingModes : ulong { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSFileProviderDomainVersion : NSSecureCoding { @@ -1140,7 +1137,7 @@ interface NSFileProviderDomainVersion : NSSecureCoding { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Native] public enum NSFileProviderTestingOperationType : long { Ingestion = 0, @@ -1156,7 +1153,7 @@ public enum NSFileProviderTestingOperationType : long { interface INSFileProviderTestingOperation : global::ObjCRuntime.INativeObject { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderTestingOperation { @@ -1206,7 +1203,7 @@ interface NSFileProviderTestingOperation { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Native] public enum NSFileProviderTestingOperationSide : ulong { Disk = 0, @@ -1216,7 +1213,7 @@ public enum NSFileProviderTestingOperationSide : ulong { interface INSFileProviderTestingIngestion { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderTestingIngestion : NSFileProviderTestingOperation { @@ -1235,7 +1232,7 @@ interface NSFileProviderTestingIngestion : NSFileProviderTestingOperation { interface INSFileProviderTestingLookup { } - [NoWatch, NoTV, iOS (16, 0), NoMacCatalyst] + [NoTV, iOS (16, 0), NoMacCatalyst] [Protocol] interface NSFileProviderTestingLookup : NSFileProviderTestingOperation { @@ -1250,7 +1247,7 @@ interface NSFileProviderTestingLookup : NSFileProviderTestingOperation { interface INSFileProviderTestingCreation { } - [NoWatch, NoTV, iOS (16, 0), NoMacCatalyst] + [NoTV, iOS (16, 0), NoMacCatalyst] [Protocol] interface NSFileProviderTestingCreation : NSFileProviderTestingOperation { @@ -1270,7 +1267,7 @@ interface NSFileProviderTestingCreation : NSFileProviderTestingOperation { interface INSFileProviderTestingModification { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderTestingModification : NSFileProviderTestingOperation { @@ -1302,7 +1299,7 @@ interface NSFileProviderTestingModification : NSFileProviderTestingOperation { interface INSFileProviderTestingDeletion { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderTestingDeletion : NSFileProviderTestingOperation { @@ -1330,7 +1327,7 @@ interface NSFileProviderTestingDeletion : NSFileProviderTestingOperation { interface INSFileProviderTestingContentFetch { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderTestingContentFetch : NSFileProviderTestingOperation { @@ -1346,7 +1343,7 @@ interface NSFileProviderTestingContentFetch : NSFileProviderTestingOperation { interface INSFileProviderTestingChildrenEnumeration { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderTestingChildrenEnumeration : NSFileProviderTestingOperation { @@ -1362,7 +1359,7 @@ interface NSFileProviderTestingChildrenEnumeration : NSFileProviderTestingOperat interface INSFileProviderTestingCollisionResolution { } [NoMacCatalyst] - [NoWatch, NoTV, iOS (16, 0)] + [NoTV, iOS (16, 0)] [Protocol] interface NSFileProviderTestingCollisionResolution : NSFileProviderTestingOperation { @@ -1375,7 +1372,7 @@ interface NSFileProviderTestingCollisionResolution : NSFileProviderTestingOperat INSFileProviderItem RenamedItem { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface NSFileProviderUserInteractionSuppressing { [Abstract] @@ -1390,7 +1387,7 @@ interface NSFileProviderUserInteractionSuppressing { interface INSFileProviderPartialContentFetching { } delegate void NSFileProviderPartialContentFetchingCompletionHandler (NSUrl fileContents, INSFileProviderItem item, NSRange retrievedRange, NSFileProviderMaterializationFlags flags, NSError error); - [NoWatch, NoTV, NoMacCatalyst, NoiOS, Mac (12, 3)] + [NoTV, NoMacCatalyst, NoiOS, Mac (12, 3)] [Protocol] interface NSFileProviderPartialContentFetching { @@ -1399,14 +1396,14 @@ interface NSFileProviderPartialContentFetching { NSProgress FetchPartialContents (string itemIdentifier, NSFileProviderItemVersion requestedVersion, NSFileProviderRequest request, NSRange requestedRange, nuint alignment, NSFileProviderFetchContentsOptions options, NSFileProviderPartialContentFetchingCompletionHandler completionHandler); } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Native] public enum NSFileProviderKnownFolders : ulong { Desktop = 1 << 0, Documents = 1 << 1, } - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [BaseType (typeof (NSObject))] interface NSFileProviderKnownFolderLocation { [Export ("initWithParentItemIdentifier:filename:")] @@ -1416,7 +1413,7 @@ interface NSFileProviderKnownFolderLocation { NativeHandle Constructor (string existing); } - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [BaseType (typeof (NSObject))] interface NSFileProviderKnownFolderLocations { [Export ("shouldCreateBinaryCompatibilitySymlink", ArgumentSemantic.Assign)] @@ -1429,10 +1426,10 @@ interface NSFileProviderKnownFolderLocations { NSFileProviderKnownFolderLocation DocumentsLocation { get; set; } } - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] delegate void NSFileProviderManagerKnownFoldersCallback ([NullAllowed] NSError error); - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Category] [BaseType (typeof (NSFileProviderManager))] interface NSFileProviderManager_KnownFolders { @@ -1443,10 +1440,10 @@ interface NSFileProviderManager_KnownFolders { void ReleaseKnownFolders (NSFileProviderKnownFolderLocations knownFolders, string localizedReason, NSFileProviderManagerKnownFoldersCallback completionHandler); } - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] delegate void NSFileProviderKnownFolderLocationCallback (INSFileProviderKnownFolderSupporting result, [NullAllowed] NSError error); - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface NSFileProviderKnownFolderSupporting { [Abstract] @@ -1456,7 +1453,7 @@ interface NSFileProviderKnownFolderSupporting { interface INSFileProviderKnownFolderSupporting { } - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Category] [BaseType (typeof (NSFileProviderManager))] interface NSFileProviderManager_StateDirectory { @@ -1465,7 +1462,7 @@ interface NSFileProviderManager_StateDirectory { NSUrl GetStateDirectoryUrl (out NSError error); } - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Native] public enum NSFileProviderVolumeUnsupportedReason : ulong { None = 0, @@ -1477,7 +1474,7 @@ public enum NSFileProviderVolumeUnsupportedReason : ulong { Quarantined = 1 << 5, } - [NoTV, NoWatch, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Category] [BaseType (typeof (NSFileProviderManager))] interface NSFileProviderManager_ExternalDomain { diff --git a/src/foundation.cs b/src/foundation.cs index 88a3466c9985..258609434527 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -30,7 +30,11 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // + #define DOUBLE_BLOCKS + +global using nfloat = global::System.Runtime.InteropServices.NFloat; + using ObjCRuntime; using CloudKit; using CoreData; @@ -48,10 +52,8 @@ #if !TVOS using Contacts; #endif -#if !WATCH using CoreAnimation; using CoreSpotlight; -#endif using CoreMedia; using SceneKit; using Security; @@ -105,19 +107,7 @@ using NSImage = Foundation.NSObject; #endif -#if WATCH -// dummy usings to make code compile without having the actual types available (for [NoWatch] to work) -using NSAppleEventSendOptions = Foundation.NSObject; -using NSBezierPath = Foundation.NSObject; -using NSImage = Foundation.NSObject; -using CSSearchableItemAttributeSet = Foundation.NSObject; -#endif - -#if WATCH -using CIBarcodeDescriptor = Foundation.NSObject; -#else using CoreImage; -#endif #if !IOS using APActivationPayload = Foundation.NSObject; @@ -129,7 +119,7 @@ using NSImage = Foundation.NSObject; #endif -#if IOS || WATCH || TVOS +#if IOS || TVOS using NSAppearance = UIKit.UIAppearance; using NSColor = UIKit.UIColor; using NSNotificationSuspensionBehavior = Foundation.NSObject; @@ -195,7 +185,6 @@ interface NSArray : NSSecureCoding, NSMutableCopying, INSFastEnumeration, CKReco [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Write (NSUrl, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Write (NSUrl, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Write (NSUrl, out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Write (NSUrl, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Write (NSUrl, out NSError)' instead.")] [Export ("writeToFile:atomically:")] @@ -203,7 +192,6 @@ interface NSArray : NSSecureCoding, NSMutableCopying, INSFastEnumeration, CKReco [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSMutableArray.FromFile' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSMutableArray.FromFile' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSMutableArray.FromFile' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSMutableArray.FromFile' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSMutableArray.FromFile' instead.")] [Export ("arrayWithContentsOfFile:")] @@ -252,38 +240,38 @@ interface NSArray : NSSecureCoding, NSMutableCopying, INSFastEnumeration, CKReco NSArray FromUrl (NSUrl url, out NSError error); #if false // https://github.com/xamarin/xamarin-macios/issues/15577 - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Internal] [Export ("differenceFromArray:withOptions:")] NativeHandle _GetDifference (NSArray other, NSOrderedCollectionDifferenceCalculationOptions options); - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Wrap ("Runtime.GetNSObject (_GetDifference (NSArray.FromNSObjects (other), options))")] [return: NullAllowed] NSOrderedCollectionDifference GetDifference (NSObject[] other, NSOrderedCollectionDifferenceCalculationOptions options); [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("differenceFromArray:")] NativeHandle _GetDifference (NSArray other); - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Wrap ("Runtime.GetNSObject (_GetDifference(NSArray.FromNSObjects (other)))")] [return: NullAllowed] NSOrderedCollectionDifference GetDifference (NSObject[] other); - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("arrayByApplyingDifference:")] [return: NullAllowed] NativeHandle _GetArrayByApplyingDifference (NSOrderedCollectionDifference difference); - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Wrap ("NSArray.ArrayFromHandle (_GetArrayByApplyingDifference (difference))")] [return: NullAllowed] NSObject[] GetArrayByApplyingDifference (NSOrderedCollectionDifference difference); [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("differenceFromArray:withOptions:usingEquivalenceTest:")] NativeHandle _GetDifferenceFromArray (NSArray other, NSOrderedCollectionDifferenceCalculationOptions options, /* Func block */ ref BlockLiteral block); #endif @@ -298,14 +286,12 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin , NSItemProviderReading, NSItemProviderWriting #endif { -#if !WATCH // Inlined from the NSAttributedStringAttachmentConveniences category [Static, Export ("attributedStringWithAttachment:")] NSAttributedString FromAttachment (NSTextAttachment attachment); -#endif // Inlined from the NSAttributedStringAttachmentConveniences category - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static, Export ("attributedStringWithAttachment:attributes:")] NSAttributedString FromAttachment (NSTextAttachment attachment, NSDictionary attributes); @@ -408,28 +394,24 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("initWithDocFormat:documentAttributes:")] NativeHandle Constructor (NSData wordDocFormat, out NSDictionary docAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("initWithHTML:baseURL:documentAttributes:")] NativeHandle Constructor (NSData htmlData, NSUrl baseUrl, out NSDictionary docAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("drawWithRect:options:")] void DrawString (CGRect rect, NSStringDrawingOptions options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSAttributedString (NSUrl, NSDictionary, out NSDictionary, ref NSError)' instead.")] [Export ("initWithPath:documentAttributes:")] @@ -437,7 +419,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSAttributedString (NSUrl, NSDictionary, out NSDictionary, ref NSError)' instead.")] [Export ("initWithURL:documentAttributes:")] @@ -445,98 +426,84 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Internal, Export ("initWithRTF:documentAttributes:")] IntPtr InitWithRtf (NSData data, out NSDictionary resultDocumentAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Internal, Export ("initWithRTFD:documentAttributes:")] IntPtr InitWithRtfd (NSData data, out NSDictionary resultDocumentAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Internal, Export ("initWithHTML:documentAttributes:")] IntPtr InitWithHTML (NSData data, out NSDictionary resultDocumentAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("initWithHTML:options:documentAttributes:")] NativeHandle Constructor (NSData data, [NullAllowed] NSDictionary options, out NSDictionary resultDocumentAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("this (data, options.GetDictionary (), out resultDocumentAttributes)")] NativeHandle Constructor (NSData data, NSAttributedStringDocumentAttributes options, out NSDictionary resultDocumentAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("initWithRTFDFileWrapper:documentAttributes:")] NativeHandle Constructor (NSFileWrapper wrapper, out NSDictionary resultDocumentAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("containsAttachments")] bool ContainsAttachments { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("fontAttributesInRange:")] NSDictionary GetFontAttributes (NSRange range); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("rulerAttributesInRange:")] NSDictionary GetRulerAttributes (NSRange range); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("lineBreakBeforeIndex:withinRange:")] nuint GetLineBreak (nuint beforeIndex, NSRange aRange); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("lineBreakByHyphenatingBeforeIndex:withinRange:")] nuint GetLineBreakByHyphenating (nuint beforeIndex, NSRange aRange); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("doubleClickAtIndex:")] NSRange DoubleClick (nuint index); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("nextWordFromIndex:forward:")] nuint GetNextWord (nuint fromIndex, bool isForward); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSDataDetector' instead.")] [Export ("URLAtIndex:effectiveRange:")] @@ -544,28 +511,24 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("rangeOfTextBlock:atIndex:")] NSRange GetRange (NSTextBlock textBlock, nuint index); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("rangeOfTextTable:atIndex:")] NSRange GetRange (NSTextTable textTable, nuint index); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("rangeOfTextList:atIndex:")] NSRange GetRange (NSTextList textList, nuint index); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("itemNumberInTextList:atIndex:")] nint GetItemNumber (NSTextList textList, nuint index); @@ -622,56 +585,48 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("RTFFromRange:documentAttributes:")] NSData GetRtf (NSRange range, [NullAllowed] NSDictionary options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("this.GetRtf (range, options.GetDictionary ())")] NSData GetRtf (NSRange range, NSAttributedStringDocumentAttributes options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("RTFDFromRange:documentAttributes:")] NSData GetRtfd (NSRange range, [NullAllowed] NSDictionary options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("this.GetRtfd (range, options.GetDictionary ())")] NSData GetRtfd (NSRange range, NSAttributedStringDocumentAttributes options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("RTFDFileWrapperFromRange:documentAttributes:")] NSFileWrapper GetRtfdFileWrapper (NSRange range, [NullAllowed] NSDictionary options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("this.GetRtfdFileWrapper (range, options.GetDictionary ())")] NSFileWrapper GetRtfdFileWrapper (NSRange range, NSAttributedStringDocumentAttributes options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("docFormatFromRange:documentAttributes:")] NSData GetDocFormat (NSRange range, [NullAllowed] NSDictionary options); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("this.GetDocFormat (range, options.GetDictionary ())")] NSData GetDocFormat (NSRange range, NSAttributedStringDocumentAttributes options); @@ -702,13 +657,12 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin bool ContainsAttachmentsInRange (NSRange range); // Inlined from the NSAttributedStringKitAdditions category - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("prefersRTFDInRange:")] bool PrefersRtfdInRange (NSRange range); // inlined from NSAttributedStringWebKitAdditions category (since they are all static members) - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -719,7 +673,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [EditorBrowsable (EditorBrowsableState.Advanced)] void LoadFromHtml (NSUrlRequest request, NSDictionary options, NSAttributedStringCompletionHandler completionHandler); - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -728,7 +681,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [Wrap ("LoadFromHtml (request, options.GetDictionary ()!, completionHandler)")] void LoadFromHtml (NSUrlRequest request, NSAttributedStringDocumentAttributes options, NSAttributedStringCompletionHandler completionHandler); - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -739,7 +691,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [EditorBrowsable (EditorBrowsableState.Advanced)] void LoadFromHtml (NSUrl fileUrl, NSDictionary options, NSAttributedStringCompletionHandler completionHandler); - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -748,7 +699,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [Wrap ("LoadFromHtml (fileUrl, options.GetDictionary ()!, completionHandler)")] void LoadFromHtml (NSUrl fileUrl, NSAttributedStringDocumentAttributes options, NSAttributedStringCompletionHandler completionHandler); - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -759,7 +709,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [EditorBrowsable (EditorBrowsableState.Advanced)] void LoadFromHtml (string @string, NSDictionary options, NSAttributedStringCompletionHandler completionHandler); - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -768,7 +717,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [Wrap ("LoadFromHtml (@string, options.GetDictionary ()!, completionHandler)")] void LoadFromHtml (string @string, NSAttributedStringDocumentAttributes options, NSAttributedStringCompletionHandler completionHandler); - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -779,7 +727,6 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [EditorBrowsable (EditorBrowsableState.Advanced)] void LoadFromHtml (NSData data, NSDictionary options, NSAttributedStringCompletionHandler completionHandler); - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -788,25 +735,51 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin [Wrap ("LoadFromHtml (data, options.GetDictionary ()!, completionHandler)")] void LoadFromHtml (NSData data, NSAttributedStringDocumentAttributes options, NSAttributedStringCompletionHandler completionHandler); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] +#if !XAMCORE_5_0 + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithContentsOfMarkdownFileAtURL:options:baseURL:error:")] NativeHandle Constructor (NSUrl markdownFile, [NullAllowed] NSAttributedStringMarkdownParsingOptions options, [NullAllowed] NSUrl baseUrl, [NullAllowed] out NSError error); +#endif + + [Internal] + [Sealed] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [Export ("initWithContentsOfMarkdownFileAtURL:options:baseURL:error:")] + NativeHandle _InitWithContentsOfMarkdownFile (NSUrl markdownFile, [NullAllowed] NSAttributedStringMarkdownParsingOptions options, [NullAllowed] NSUrl baseUrl, [NullAllowed] out NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] +#if !XAMCORE_5_0 + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithMarkdown:options:baseURL:error:")] NativeHandle Constructor (NSData markdown, [NullAllowed] NSAttributedStringMarkdownParsingOptions options, [NullAllowed] NSUrl baseUrl, [NullAllowed] out NSError error); +#endif + + [Internal] + [Sealed] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [Export ("initWithMarkdown:options:baseURL:error:")] + NativeHandle _InitWithMarkdown (NSData markdown, [NullAllowed] NSAttributedStringMarkdownParsingOptions options, [NullAllowed] NSUrl baseUrl, [NullAllowed] out NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] +#if !XAMCORE_5_0 + [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithMarkdownString:options:baseURL:error:")] NativeHandle Constructor (string markdownString, [NullAllowed] NSAttributedStringMarkdownParsingOptions options, [NullAllowed] NSUrl baseUrl, [NullAllowed] out NSError error); +#endif - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [Internal] + [Sealed] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [Export ("initWithMarkdownString:options:baseURL:error:")] + NativeHandle _InitWithMarkdownString (string markdownString, [NullAllowed] NSAttributedStringMarkdownParsingOptions options, [NullAllowed] NSUrl baseUrl, [NullAllowed] out NSError error); + + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("attributedStringByInflectingString")] NSAttributedString AttributedStringByInflectingString { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("boundingRectWithSize:options:")] CGRect BoundingRectWithSize (CGSize size, NSStringDrawingOptions options); @@ -834,7 +807,7 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin NSString TextLayoutSectionsAttribute { get; } #endif // !XAMCORE_5_0 - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [Deprecated (PlatformName.MacOSX, 10, 11)] [NoMacCatalyst] [Field ("NSUnderlineByWordMask", "AppKit")] @@ -846,7 +819,7 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin #else [Field ("NSTextScalingDocumentAttribute", "UIKit")] #endif - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] NSString TextScalingDocumentAttribute { get; } #endif // !XAMCORE_5_0 @@ -857,7 +830,7 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin #else [Field ("NSSourceTextScalingDocumentAttribute", "UIKit")] #endif - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] NSString SourceTextScalingDocumentAttribute { get; } #endif // !XAMCORE_5_0 @@ -868,20 +841,20 @@ partial interface NSAttributedString : NSCoding, NSMutableCopying, NSSecureCodin #else [Field ("NSCocoaVersionDocumentAttribute", "UIKit")] #endif - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] NSString CocoaVersionDocumentAttribute { get; } #endif // !XAMCORE_5_0 // Inlined from the NSAttributedStringAdaptiveImageGlyphConveniences category - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("attributedStringWithAdaptiveImageGlyph:attributes:")] NSAttributedString Create (NSAdaptiveImageGlyph adaptiveImageGlyph, NSDictionary attributes); } // we follow the API found in swift - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] public enum NSAttributedStringNameKey { [Field ("NSAlternateDescriptionAttributeName")] @@ -902,7 +875,7 @@ public enum NSAttributedStringNameKey { [Field ("NSLanguageIdentifierAttributeName")] LanguageIdentifier, - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Field ("NSMarkdownSourcePositionAttributeName")] MarkdownSourcePosition, @@ -916,24 +889,24 @@ public enum NSAttributedStringNameKey { [Field ("NSReplacementIndexAttributeName")] ReplacementIndex, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSInflectionAgreementArgumentAttributeName")] InflectionAgreementArgument, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSInflectionAgreementConceptAttributeName")] InflectionAgreementConcept, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSInflectionReferentConceptAttributeName")] InflectionReferentConcept, - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSLocalizedNumberFormatAttributeName")] LocalizedNumberFormat, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum NSGrammaticalCase : long { NotSet = 0, @@ -953,7 +926,7 @@ public enum NSGrammaticalCase : long { Translative, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum NSGrammaticalPronounType : long { NotSet = 0, @@ -962,7 +935,7 @@ public enum NSGrammaticalPronounType : long { Possessive, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum NSGrammaticalDefiniteness : long { NotSet = 0, @@ -970,7 +943,7 @@ public enum NSGrammaticalDefiniteness : long { Definite, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum NSGrammaticalDetermination : long { NotSet = 0, @@ -978,7 +951,7 @@ public enum NSGrammaticalDetermination : long { Dependent, } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum NSGrammaticalPerson : long { NotSet = 0, @@ -987,7 +960,6 @@ public enum NSGrammaticalPerson : long { Third, } - [NoWatch] [NoTV] // really inside WebKit [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -1364,7 +1336,6 @@ interface NSCalendar : NSSecureCoding, NSCopying { [Deprecated (PlatformName.MacOSX, 10, 1, message: "Use NSCalendar and NSDateComponents.")] [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [BaseType (typeof (NSDate))] interface NSCalendarDate { @@ -1801,25 +1772,25 @@ interface NSCoder { [NullAllowed, Export ("error", ArgumentSemantic.Copy)] NSError Error { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("decodeArrayOfObjectsOfClass:forKey:")] [return: NullAllowed] NSObject [] DecodeArrayOfObjects (Class @class, string key); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("decodeArrayOfObjectsOfClasses:forKey:")] [return: NullAllowed] NSObject [] DecodeArrayOfObjects (NSSet classes, string key); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:")] [return: NullAllowed] NSDictionary DecodeDictionary (Class keyClass, Class objectClass, string key); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:")] [return: NullAllowed] @@ -1938,7 +1909,6 @@ interface NSData : NSSecureCoding, NSMutableCopying, CKRecordValue { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Save (NSUrl,bool)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Save (NSUrl,bool)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Save (NSUrl,bool)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Save (NSUrl,bool)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Save (NSUrl,bool)' instead.")] [Export ("writeToFile:atomically:")] @@ -1985,13 +1955,13 @@ interface NSData : NSSecureCoding, NSMutableCopying, CKRecordValue { // NSDataCompression (NSData) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("decompressedDataUsingAlgorithm:error:")] [return: NullAllowed] NSData Decompress (NSDataCompressionAlgorithm algorithm, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("compressedDataUsingAlgorithm:error:")] [return: NullAllowed] @@ -2081,7 +2051,7 @@ interface NSDateComponents : NSSecureCoding, NSCopying, INSCopying, INSSecureCod [Export ("yearForWeekOfYear")] nint YearForWeekOfYear { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("dayOfYear")] nint DayOfYear { get; set; } @@ -2142,19 +2112,19 @@ interface NSByteCountFormatter { [Export ("formattingContext")] NSFormattingContext FormattingContext { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("stringForObjectValue:")] [return: NullAllowed] string GetString ([NullAllowed] NSObject obj); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("stringFromMeasurement:countStyle:")] string Create (NSUnitInformationStorage measurement, NSByteCountFormatterCountStyle countStyle); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("stringFromMeasurement:")] string Create (NSUnitInformationStorage measurement); @@ -2428,13 +2398,12 @@ interface NSFileHandle : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'ReadToEnd (out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ReadToEnd (out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'ReadToEnd (out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'ReadToEnd (out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ReadToEnd (out NSError)' instead.")] [Export ("readDataToEndOfFile")] NSData ReadDataToEndOfFile (); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("readDataToEndOfFileAndReturnError:")] [return: NullAllowed] @@ -2442,13 +2411,12 @@ interface NSFileHandle : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Read (nuint, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Read (nuint, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Read (nuint, out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Read (nuint, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Read (nuint, out NSError)' instead.")] [Export ("readDataOfLength:")] NSData ReadDataOfLength (nuint length); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("readDataUpToLength:error:")] [return: NullAllowed] @@ -2456,91 +2424,84 @@ interface NSFileHandle : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Write (out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Write (out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Write (out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Write (out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Write (out NSError)' instead.")] [Export ("writeData:")] void WriteData (NSData data); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("writeData:error:")] bool Write (NSData data, [NullAllowed] out NSError error); [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'GetOffset (out ulong, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GetOffset (out ulong, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'GetOffset (out ulong, out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'GetOffset (out ulong, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GetOffset (out ulong, out NSError)' instead.")] [Export ("offsetInFile")] ulong OffsetInFile (); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("getOffset:error:")] bool GetOffset (out ulong offsetInFile, [NullAllowed] out NSError error); [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'SeekToEnd (out ulong, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'SeekToEnd (out ulong, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'SeekToEnd (out ulong, out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'SeekToEnd (out ulong, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SeekToEnd (out ulong, out NSError)' instead.")] [Export ("seekToEndOfFile")] ulong SeekToEndOfFile (); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("seekToEndReturningOffset:error:")] bool SeekToEnd ([NullAllowed] out ulong offsetInFile, [NullAllowed] out NSError error); [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Seek (ulong, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Seek (ulong, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Seek (ulong, out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Seek (ulong, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Seek (ulong, out NSError)' instead.")] [Export ("seekToFileOffset:")] void SeekToFileOffset (ulong offset); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("seekToOffset:error:")] bool Seek (ulong offset, [NullAllowed] out NSError error); [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Truncate (ulong, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Truncate (ulong, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Truncate (ulong, out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Truncate (ulong, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Truncate (ulong, out NSError)' instead.")] [Export ("truncateFileAtOffset:")] void TruncateFileAtOffset (ulong offset); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("truncateAtOffset:error:")] bool Truncate (ulong offset, [NullAllowed] out NSError error); [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Synchronize (out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Synchronize (out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Synchronize (out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Synchronize (out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Synchronize (out NSError)' instead.")] [Export ("synchronizeFile")] void SynchronizeFile (); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("synchronizeAndReturnError:")] bool Synchronize ([NullAllowed] out NSError error); [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'Close (out NSError)' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'Close (out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'Close (out NSError)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'Close (out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Close (out NSError)' instead.")] [Export ("closeFile")] void CloseFile (); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("closeAndReturnError:")] bool Close ([NullAllowed] out NSError error); @@ -2739,7 +2700,7 @@ interface NSPersonNameComponentsFormatter { [return: NullAllowed] NSPersonNameComponents GetComponents (string @string); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("locale", ArgumentSemantic.Copy)] NSLocale Locale { get; set; } } @@ -2898,7 +2859,6 @@ interface NSKeyedArchiver { // hack so we can decorate the default .ctor with availability attributes [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSKeyedArchiver (bool)' instead.")] [MacCatalyst (13, 1)] @@ -2907,7 +2867,6 @@ interface NSKeyedArchiver { NativeHandle Constructor (); [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'NSKeyedArchiver (bool)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSKeyedArchiver (bool)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSKeyedArchiver (bool)' instead.")] @@ -2925,7 +2884,6 @@ interface NSKeyedArchiver { #endif [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] @@ -2938,7 +2896,6 @@ interface NSKeyedArchiver { #endif [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ArchivedDataWithRootObject (NSObject, bool, out NSError)' instead.")] @@ -3021,7 +2978,6 @@ interface NSKeyedUnarchiver { [Export ("initForReadingWithData:")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSKeyedUnarchiver (NSData, out NSError)' instead.")] @@ -3030,7 +2986,6 @@ interface NSKeyedUnarchiver { [Static, Export ("unarchiveObjectWithData:")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GetUnarchivedObject ()' instead.")] @@ -3038,7 +2993,6 @@ interface NSKeyedUnarchiver { NSObject UnarchiveObject (NSData data); [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GetUnarchivedObject ()' instead.")] [Static, Export ("unarchiveTopLevelObjectWithData:error:")] @@ -3049,7 +3003,6 @@ interface NSKeyedUnarchiver { [Static, Export ("unarchiveObjectWithFile:")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GetUnarchivedObject ()' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GetUnarchivedObject ()' instead.")] @@ -3084,28 +3037,28 @@ interface NSKeyedUnarchiver { bool GetRequiresSecureCoding (); #endif - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("unarchivedArrayOfObjectsOfClass:fromData:error:")] [return: NullAllowed] NSObject [] GetUnarchivedArray (Class @class, NSData data, [NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("unarchivedArrayOfObjectsOfClasses:fromData:error:")] [return: NullAllowed] NSObject [] GetUnarchivedArray (NSSet classes, NSData data, [NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("unarchivedDictionaryWithKeysOfClass:objectsOfClass:fromData:error:")] [return: NullAllowed] NSDictionary GetUnarchivedDictionary (Class keyClass, Class valueClass, NSData data, [NullAllowed] out NSError error); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("unarchivedDictionaryWithKeysOfClasses:objectsOfClasses:fromData:error:")] @@ -3205,28 +3158,24 @@ interface NSMetadataQuery { // Scope constants for defined search locations [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSMetadataQueryUserHomeScope")] NSString UserHomeScope { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSMetadataQueryLocalComputerScope")] NSString LocalComputerScope { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSMetadataQueryLocalDocumentsScope")] NSString LocalDocumentsScope { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSMetadataQueryNetworkScope")] NSString NetworkScope { get; } @@ -3328,623 +3277,623 @@ interface NSMetadataQuery { [Field ("NSMetadataUbiquitousItemURLInLocalContainerKey")] NSString UbiquitousItemURLInLocalContainerKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemKeywordsKey")] NSString KeywordsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemTitleKey")] NSString TitleKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAuthorsKey")] NSString AuthorsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemEditorsKey")] NSString EditorsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemParticipantsKey")] NSString ParticipantsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemProjectsKey")] NSString ProjectsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemDownloadedDateKey")] NSString DownloadedDateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemWhereFromsKey")] NSString WhereFromsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCommentKey")] NSString CommentKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCopyrightKey")] NSString CopyrightKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemLastUsedDateKey")] NSString LastUsedDateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemContentCreationDateKey")] NSString ContentCreationDateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemContentModificationDateKey")] NSString ContentModificationDateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemDateAddedKey")] NSString DateAddedKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemDurationSecondsKey")] NSString DurationSecondsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemContactKeywordsKey")] NSString ContactKeywordsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemVersionKey")] NSString VersionKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPixelHeightKey")] NSString PixelHeightKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPixelWidthKey")] NSString PixelWidthKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPixelCountKey")] NSString PixelCountKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemColorSpaceKey")] NSString ColorSpaceKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemBitsPerSampleKey")] NSString BitsPerSampleKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemFlashOnOffKey")] NSString FlashOnOffKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemFocalLengthKey")] NSString FocalLengthKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAcquisitionMakeKey")] NSString AcquisitionMakeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAcquisitionModelKey")] NSString AcquisitionModelKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemISOSpeedKey")] NSString IsoSpeedKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemOrientationKey")] NSString OrientationKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemLayerNamesKey")] NSString LayerNamesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemWhiteBalanceKey")] NSString WhiteBalanceKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemApertureKey")] NSString ApertureKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemProfileNameKey")] NSString ProfileNameKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemResolutionWidthDPIKey")] NSString ResolutionWidthDpiKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemResolutionHeightDPIKey")] NSString ResolutionHeightDpiKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemExposureModeKey")] NSString ExposureModeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemExposureTimeSecondsKey")] NSString ExposureTimeSecondsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemEXIFVersionKey")] NSString ExifVersionKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCameraOwnerKey")] NSString CameraOwnerKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemFocalLength35mmKey")] NSString FocalLength35mmKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemLensModelKey")] NSString LensModelKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemEXIFGPSVersionKey")] NSString ExifGpsVersionKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAltitudeKey")] NSString AltitudeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemLatitudeKey")] NSString LatitudeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemLongitudeKey")] NSString LongitudeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemSpeedKey")] NSString SpeedKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemTimestampKey")] NSString TimestampKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSTrackKey")] NSString GpsTrackKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemImageDirectionKey")] NSString ImageDirectionKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemNamedLocationKey")] NSString NamedLocationKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSStatusKey")] NSString GpsStatusKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSMeasureModeKey")] NSString GpsMeasureModeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSDOPKey")] NSString GpsDopKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSMapDatumKey")] NSString GpsMapDatumKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSDestLatitudeKey")] NSString GpsDestLatitudeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSDestLongitudeKey")] NSString GpsDestLongitudeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSDestBearingKey")] NSString GpsDestBearingKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSDestDistanceKey")] NSString GpsDestDistanceKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSProcessingMethodKey")] NSString GpsProcessingMethodKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSAreaInformationKey")] NSString GpsAreaInformationKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSDateStampKey")] NSString GpsDateStampKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGPSDifferentalKey")] NSString GpsDifferentalKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCodecsKey")] NSString CodecsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemMediaTypesKey")] NSString MediaTypesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemStreamableKey")] NSString StreamableKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemTotalBitRateKey")] NSString TotalBitRateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemVideoBitRateKey")] NSString VideoBitRateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAudioBitRateKey")] NSString AudioBitRateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemDeliveryTypeKey")] NSString DeliveryTypeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAlbumKey")] NSString AlbumKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemHasAlphaChannelKey")] NSString HasAlphaChannelKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemRedEyeOnOffKey")] NSString RedEyeOnOffKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemMeteringModeKey")] NSString MeteringModeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemMaxApertureKey")] NSString MaxApertureKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemFNumberKey")] NSString FNumberKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemExposureProgramKey")] NSString ExposureProgramKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemExposureTimeStringKey")] NSString ExposureTimeStringKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemHeadlineKey")] NSString HeadlineKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemInstructionsKey")] NSString InstructionsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCityKey")] NSString CityKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemStateOrProvinceKey")] NSString StateOrProvinceKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCountryKey")] NSString CountryKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemTextContentKey")] NSString TextContentKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAudioSampleRateKey")] NSString AudioSampleRateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAudioChannelCountKey")] NSString AudioChannelCountKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemTempoKey")] NSString TempoKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemKeySignatureKey")] NSString KeySignatureKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemTimeSignatureKey")] NSString TimeSignatureKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAudioEncodingApplicationKey")] NSString AudioEncodingApplicationKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemComposerKey")] NSString ComposerKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemLyricistKey")] NSString LyricistKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAudioTrackNumberKey")] NSString AudioTrackNumberKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemRecordingDateKey")] NSString RecordingDateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemMusicalGenreKey")] NSString MusicalGenreKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemIsGeneralMIDISequenceKey")] NSString IsGeneralMidiSequenceKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemRecordingYearKey")] NSString RecordingYearKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemOrganizationsKey")] NSString OrganizationsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemLanguagesKey")] NSString LanguagesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemRightsKey")] NSString RightsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPublishersKey")] NSString PublishersKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemContributorsKey")] NSString ContributorsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCoverageKey")] NSString CoverageKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemSubjectKey")] NSString SubjectKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemThemeKey")] NSString ThemeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemDescriptionKey")] NSString DescriptionKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemIdentifierKey")] NSString IdentifierKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAudiencesKey")] NSString AudiencesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemNumberOfPagesKey")] NSString NumberOfPagesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPageWidthKey")] NSString PageWidthKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPageHeightKey")] NSString PageHeightKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemSecurityMethodKey")] NSString SecurityMethodKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCreatorKey")] NSString CreatorKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemEncodingApplicationsKey")] NSString EncodingApplicationsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemDueDateKey")] NSString DueDateKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemStarRatingKey")] NSString StarRatingKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPhoneNumbersKey")] NSString PhoneNumbersKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemEmailAddressesKey")] NSString EmailAddressesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemInstantMessageAddressesKey")] NSString InstantMessageAddressesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemKindKey")] NSString KindKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemRecipientsKey")] NSString RecipientsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemFinderCommentKey")] NSString FinderCommentKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemFontsKey")] NSString FontsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAppleLoopsRootKeyKey")] NSString AppleLoopsRootKeyKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAppleLoopsKeyFilterTypeKey")] NSString AppleLoopsKeyFilterTypeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAppleLoopsLoopModeKey")] NSString AppleLoopsLoopModeKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAppleLoopDescriptorsKey")] NSString AppleLoopDescriptorsKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemMusicalInstrumentCategoryKey")] NSString MusicalInstrumentCategoryKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemMusicalInstrumentNameKey")] NSString MusicalInstrumentNameKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemCFBundleIdentifierKey")] NSString CFBundleIdentifierKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemInformationKey")] NSString InformationKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemDirectorKey")] NSString DirectorKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemProducerKey")] NSString ProducerKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemGenreKey")] NSString GenreKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemPerformersKey")] NSString PerformersKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemOriginalFormatKey")] NSString OriginalFormatKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemOriginalSourceKey")] NSString OriginalSourceKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAuthorEmailAddressesKey")] NSString AuthorEmailAddressesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemRecipientEmailAddressesKey")] NSString RecipientEmailAddressesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemAuthorAddressesKey")] NSString AuthorAddressesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemRecipientAddressesKey")] NSString RecipientAddressesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemIsLikelyJunkKey")] NSString IsLikelyJunkKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemExecutableArchitecturesKey")] NSString ExecutableArchitecturesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemExecutablePlatformKey")] NSString ExecutablePlatformKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemApplicationCategoriesKey")] NSString ApplicationCategoriesKey { get; } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Field ("NSMetadataItemIsApplicationManagedKey")] NSString IsApplicationManagedKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousItemIsSharedKey")] NSString UbiquitousItemIsSharedKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemCurrentUserRoleKey")] NSString UbiquitousSharedItemCurrentUserRoleKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey")] NSString UbiquitousSharedItemCurrentUserPermissionsKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemOwnerNameComponentsKey")] NSString UbiquitousSharedItemOwnerNameComponentsKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey")] NSString UbiquitousSharedItemMostRecentEditorNameComponentsKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemRoleOwner")] NSString UbiquitousSharedItemRoleOwner { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemRoleParticipant")] NSString UbiquitousSharedItemRoleParticipant { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemPermissionsReadOnly")] NSString UbiquitousSharedItemPermissionsReadOnly { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSMetadataUbiquitousSharedItemPermissionsReadWrite")] NSString UbiquitousSharedItemPermissionsReadWrite { get; } @@ -4005,7 +3954,6 @@ interface NSMetadataItem { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [DesignatedInitializer] [Export ("initWithURL:")] @@ -4125,7 +4073,7 @@ interface NSMutableArray { NSMutableArray FromUrl (NSUrl url); #if false // https://github.com/xamarin/xamarin-macios/issues/15577 - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("applyDifference:")] void ApplyDifference (NSOrderedCollectionDifference difference); #endif @@ -4161,7 +4109,6 @@ interface NSMutableAttributedString { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("AddAttributes (attributes.GetDictionary ()!, range)")] void AddAttributes (NSStringAttributes attributes, NSRange range); @@ -4278,18 +4225,18 @@ interface NSMutableData { // NSMutableDataCompression (NSMutableData) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("decompressUsingAlgorithm:error:")] bool Decompress (NSDataCompressionAlgorithm algorithm, [NullAllowed] out NSError error); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("compressUsingAlgorithm:error:")] bool Compress (NSDataCompressionAlgorithm algorithm, [NullAllowed] out NSError error); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSDataCompressionAlgorithm : long { @@ -4357,20 +4304,20 @@ interface NSDate : NSSecureCoding, NSCopying, CKRecordValue { // NSDate_SensorKit - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("dateWithSRAbsoluteTime:")] NSDate CreateFromSRAbsoluteTime (double time); - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithSRAbsoluteTime:")] NativeHandle Constructor (double srAbsoluteTime); - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("srAbsoluteTime")] @@ -4386,7 +4333,6 @@ interface NSDate : NSSecureCoding, NSCopying, CKRecordValue { interface NSDictionary : NSSecureCoding, NSMutableCopying, NSFetchRequestResult, INSFastEnumeration { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSMutableDictionary.FromFile' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSMutableDictionary.FromFile' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSMutableDictionary.FromFile' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSMutableDictionary.FromFile' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSMutableDictionary.FromFile' instead.")] [Export ("dictionaryWithContentsOfFile:")] @@ -4395,7 +4341,6 @@ interface NSDictionary : NSSecureCoding, NSMutableCopying, NSFetchRequestResult, [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSMutableDictionary.FromUrl' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSMutableDictionary.FromUrl' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSMutableDictionary.FromUrl' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSMutableDictionary.FromUrl' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSMutableDictionary.FromUrl' instead.")] [Export ("dictionaryWithContentsOfURL:")] @@ -4434,7 +4379,6 @@ interface NSDictionary : NSSecureCoding, NSMutableCopying, NSFetchRequestResult, [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSMutableDictionary(string)' constructor instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSMutableDictionary(string)' constructor instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSMutableDictionary(string)' constructor instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSMutableDictionary(string)' constructor instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSMutableDictionary(string)' constructor instead.")] [Export ("initWithContentsOfFile:")] @@ -4445,7 +4389,6 @@ interface NSDictionary : NSSecureCoding, NSMutableCopying, NSFetchRequestResult, [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSMutableDictionary(NSUrl)' constructor instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSMutableDictionary(NSUrl)' constructor instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSMutableDictionary(NSUrl)' constructor instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSMutableDictionary(NSUrl)' constructor instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSMutableDictionary(NSUrl)' constructor instead.")] [Export ("initWithContentsOfURL:")] @@ -4519,7 +4462,6 @@ interface NSDictionary : NSSecureCoding, NSMutableCopying, NSFetchRequestResult, [Deprecated (PlatformName.MacOSX, 10, 15)] [Deprecated (PlatformName.iOS, 13, 0)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Deprecated (PlatformName.TvOS, 13, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Export ("writeToFile:atomically:")] @@ -4527,7 +4469,6 @@ interface NSDictionary : NSSecureCoding, NSMutableCopying, NSFetchRequestResult, [Deprecated (PlatformName.MacOSX, 10, 15)] [Deprecated (PlatformName.iOS, 13, 0)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Deprecated (PlatformName.TvOS, 13, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Export ("writeToURL:atomically:")] @@ -4583,7 +4524,7 @@ interface NSError : NSSecureCoding, NSCopying { [Export ("helpAnchor")] string HelpAnchor { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("underlyingErrors", ArgumentSemantic.Copy)] NSError [] UnderlyingErrors { get; } @@ -4604,15 +4545,11 @@ interface NSError : NSSecureCoding, NSCopying { NSString NSUrlErrorDomain { get; } #if NET - [NoWatch] [MacCatalyst (13, 1)] -#else - [Obsoleted (PlatformName.WatchOS, 7, 0)] #endif [Field ("NSNetServicesErrorDomain")] NSString NSNetServicesErrorDomain { get; } - [NoWatch] [Field ("NSNetServicesErrorCode")] NSString NSNetServicesErrorCode { get; } @@ -4625,17 +4562,15 @@ interface NSError : NSSecureCoding, NSCopying { [Field ("kCLErrorDomain", "CoreLocation")] NSString CoreLocationErrorDomain { get; } -#if !WATCH [Field ("kCFErrorDomainCFNetwork", "CFNetwork")] NSString CFNetworkErrorDomain { get; } -#endif [NoMac, NoTV] [MacCatalyst (13, 1)] [Field ("CMErrorDomain", "CoreMotion")] NSString CoreMotionErrorDomain { get; } - [NoMac, NoTV, NoWatch] + [NoMac, NoTV] [iOS (12, 0)] [NoMacCatalyst] // We don't expose CarPlay on Mac Catalyst for the moment // [MacCatalyst (14, 0)] [Field ("CarPlayErrorDomain", "CarPlay")] @@ -4644,7 +4579,7 @@ interface NSError : NSSecureCoding, NSCopying { [Field ("NSUnderlyingErrorKey")] NSString UnderlyingErrorKey { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("NSMultipleUnderlyingErrorsKey")] NSString MultipleUnderlyingErrorsKey { get; } @@ -4699,14 +4634,12 @@ interface NSError : NSSecureCoding, NSCopying { [NoMacCatalyst] [NoTV] - [NoWatch] [Static] [Export ("fileProviderErrorForCollisionWithItem:")] NSError GetFileProviderError (INSFileProviderItem existingItem); [NoMacCatalyst] [NoTV] - [NoWatch] [Static] [Export ("fileProviderErrorForNonExistentItemWithIdentifier:")] NSError GetFileProviderError (string nonExistentItemIdentifier); @@ -4714,7 +4647,6 @@ interface NSError : NSSecureCoding, NSCopying { [iOS (16, 0)] [NoMacCatalyst] [NoTV] - [NoWatch] [Static] [Export ("fileProviderErrorForRejectedDeletionOfItem:")] NSError GetFileProviderErrorForRejectedDeletion (INSFileProviderItem updatedVersion); @@ -4763,7 +4695,7 @@ interface NSException : NSSecureCoding, NSCopying { string [] CallStackSymbols { get; } } -#if !NET && !WATCH +#if !NET [Obsolete ("NSExpressionHandler is deprecated, please use FromFormat (string, NSObject[]) instead.")] delegate void NSExpressionHandler (NSObject evaluatedObject, NSExpression [] expressions, NSMutableDictionary context); #endif @@ -4790,7 +4722,7 @@ interface NSExpression : NSSecureCoding, NSCopying { [Static, Export ("expressionWithFormat:")] NSExpression FromFormat (string expressionFormat); -#if !NET && !WATCH +#if !NET [Obsolete ("Use 'FromFormat (string, NSObject[])' instead.")] [Static, Export ("expressionWithFormat:argumentArray:")] NSExpression FromFormat (string format, NSExpression [] parameters); @@ -4819,7 +4751,7 @@ interface NSExpression : NSSecureCoding, NSCopying { [Static, Export ("expressionForFunction:selectorName:arguments:")] NSExpression FromFunction (NSExpression target, string name, NSExpression [] parameters); -#if !NET && !WATCH +#if !NET [Obsolete ("Use 'FromFunction (NSExpressionCallbackHandler, NSExpression[])' instead.")] [Static, Export ("expressionForBlock:arguments:")] NSExpression FromFunction (NSExpressionHandler target, [NullAllowed] NSExpression [] parameters); @@ -4972,10 +4904,7 @@ partial interface NSExtensionItem : NSCopying, NSSecureCoding { [BaseType (typeof (NSObject))] interface NSNull : NSSecureCoding, NSCopying -#if !WATCH - , CAAction -#endif - { + , CAAction { [Export ("null"), Static] [Internal] NSNull _Null { get; } @@ -5013,7 +4942,6 @@ interface NSLengthFormatter { [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NaturalLanguage.*' API instead.")] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'NaturalLanguage.*' API instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'NaturalLanguage.*' API instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'NaturalLanguage.*' API instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'NaturalLanguage.*' API instead.")] [BaseType (typeof (NSObject))] @@ -5381,11 +5309,11 @@ interface NSLocale : NSSecureCoding, NSCopying { [return: NullAllowed] string GetLocalizedCalendarIdentifier (string calendarIdentifier); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("languageIdentifier")] string LanguageIdentifier { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("regionCode")] string RegionCode { get; } } @@ -5538,23 +5466,22 @@ interface NSRunLoop { [Obsolete ("Use the 'NSRunLoopMode' enum instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSXpcConnection' instead.")] - [NoiOS, NoWatch, NoTV, MacCatalyst (15, 0)] + [NoiOS, NoTV, MacCatalyst (15, 0)] [Field ("NSConnectionReplyMode")] NSString NSRunLoopConnectionReplyMode { get; } [Obsolete ("Use the 'NSRunLoopMode' enum instead.")] - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [Field ("NSModalPanelRunLoopMode", "AppKit")] NSString NSRunLoopModalPanelMode { get; } [Obsolete ("Use the 'NSRunLoopMode' enum instead.")] - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [Field ("NSEventTrackingRunLoopMode", "AppKit")] NSString NSRunLoopEventTracking { get; } [Obsolete ("Use the 'NSRunLoopMode' enum instead.")] [NoMac] - [NoWatch] [Field ("UITrackingRunLoopMode", "UIKit")] NSString UITrackingRunLoopMode { get; } #endif @@ -5833,10 +5760,6 @@ interface NSUbiquitousKeyValueStoreChangeEventArgs { } [BaseType (typeof (NSObject))] -#if WATCH - [Advice (Constants.UnavailableOnWatchOS)] - [DisableDefaultCtor] // "NSUbiquitousKeyValueStore is unavailable" is printed to the log. -#endif interface NSUbiquitousKeyValueStore { [Static] [Export ("defaultStore")] @@ -5931,7 +5854,7 @@ interface NSUuid : NSSecureCoding, NSCopying { [Export ("UUIDString")] string AsString (); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("compare:")] NSComparisonResult Compare (NSUuid otherUuid); } @@ -6015,7 +5938,6 @@ partial interface NSUserActivity [Export ("eligibleForPublicIndexing")] bool EligibleForPublicIndexing { [Bind ("isEligibleForPublicIndexing")] get; set; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [NullAllowed] @@ -6028,7 +5950,6 @@ partial interface NSUserActivity // From NSUserActivity (CIBarcodeDescriptor) - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("detectedBarcodeDescriptor", ArgumentSemantic.Copy)] CIBarcodeDescriptor DetectedBarcodeDescriptor { get; } @@ -6036,18 +5957,18 @@ partial interface NSUserActivity // From NSUserActivity (CLSDeepLinks) [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [Export ("isClassKitDeepLink")] bool IsClassKitDeepLink { get; } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV] + [NoTV] [NullAllowed, Export ("contextIdentifierPath", ArgumentSemantic.Strong)] string [] ContextIdentifierPath { get; } // From NSUserActivity (IntentsAdditions) - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("suggestedInvocationPhrase")] string SuggestedInvocationPhrase { @@ -6061,24 +5982,24 @@ string SuggestedInvocationPhrase { set; } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Export ("eligibleForPrediction")] bool EligibleForPrediction { [Bind ("isEligibleForPrediction")] get; set; } - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("persistentIdentifier")] string PersistentIdentifier { get; set; } - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] [Async] [Export ("deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:")] void DeleteSavedUserActivities (string [] persistentIdentifiers, Action handler); - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] [Async] @@ -6087,14 +6008,14 @@ string SuggestedInvocationPhrase { // Inlined from NSUserActivity (UISceneActivationConditions) - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("targetContentIdentifier")] string TargetContentIdentifier { get; set; } #if HAS_APPCLIP // Inlined from NSUserActivity (AppClip) - [iOS (14,0)][NoTV][NoMac][NoWatch] + [iOS (14,0)][NoTV][NoMac] [MacCatalyst (14, 0)] [Export ("appClipActivationPayload", ArgumentSemantic.Strong)] [NullAllowed] @@ -6312,7 +6233,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying #endif { [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'NSUrlComponents' instead.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Use 'NSUrlComponents' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'NSUrlComponents' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSUrlComponents' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSUrlComponents' instead.")] @@ -6340,7 +6260,7 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Static] NSUrl _FromStringRelative (string url, NSUrl relative); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("URLWithString:encodingInvalidCharacters:")] [return: NullAllowed] @@ -6378,7 +6298,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Deprecated (PlatformName.MacOSX, 10, 15, message: "Always return 'null'. Use and parse 'Path' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Always return 'null'. Use and parse 'Path' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Always return 'null'. Use and parse 'Path' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Always return 'null'. Use and parse 'Path' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Always return 'null'. Use and parse 'Path' instead.")] [Export ("parameterString")] @@ -6476,7 +6395,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying /* These methods come from NURL_AppKitAdditions */ [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("URLFromPasteboard:")] [Static] @@ -6485,7 +6403,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("writeToPasteboard:")] void WriteToPasteboard (NSPasteboard pasteboard); @@ -6579,7 +6496,6 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'ContentTypeKey' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'ContentTypeKey' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'ContentTypeKey' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'ContentTypeKey' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'ContentTypeKey' instead.")] [Field ("NSURLTypeIdentifierKey")] @@ -6682,7 +6598,7 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLFileResourceTypeKey")] NSString FileResourceTypeKey { get; } - [Watch (9, 4), TV (16, 4), Mac (13, 3), iOS (16, 4)] + [TV (16, 4), Mac (13, 3), iOS (16, 4)] [MacCatalyst (16, 4)] [Field ("NSURLFileIdentifierKey")] NSString FileIdentifierKey { get; } @@ -6803,32 +6719,32 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLVolumeSupportsAccessPermissionsKey")] NSString VolumeSupportsAccessPermissionsKey { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSURLVolumeSupportsFileProtectionKey")] NSString VolumeSupportsFileProtectionKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLVolumeAvailableCapacityForImportantUsageKey")] NSString VolumeAvailableCapacityForImportantUsageKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLVolumeAvailableCapacityForOpportunisticUsageKey")] NSString VolumeAvailableCapacityForOpportunisticUsageKey { get; } - [Watch (9, 4), TV (16, 4), Mac (13, 3), iOS (16, 4)] + [TV (16, 4), Mac (13, 3), iOS (16, 4)] [MacCatalyst (16, 4)] [Field ("NSURLVolumeTypeNameKey")] NSString VolumeTypeNameKey { get; } - [Watch (9, 4), TV (16, 4), Mac (13, 3), iOS (16, 4)] + [TV (16, 4), Mac (13, 3), iOS (16, 4)] [MacCatalyst (16, 4)] [Field ("NSURLVolumeSubtypeKey")] NSString VolumeSubtypeKey { get; } - [Watch (9, 4), TV (16, 4), Mac (13, 3), iOS (16, 4)] + [TV (16, 4), Mac (13, 3), iOS (16, 4)] [MacCatalyst (16, 4)] [Field ("NSURLVolumeMountFromLocationKey")] NSString VolumeMountFromLocationKey { get; } @@ -6867,47 +6783,47 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLUbiquitousItemPercentUploadedKey")] NSString UbiquitousItemPercentUploadedKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousItemIsSharedKey")] NSString UbiquitousItemIsSharedKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemCurrentUserRoleKey")] NSString UbiquitousSharedItemCurrentUserRoleKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemCurrentUserPermissionsKey")] NSString UbiquitousSharedItemCurrentUserPermissionsKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemOwnerNameComponentsKey")] NSString UbiquitousSharedItemOwnerNameComponentsKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey")] NSString UbiquitousSharedItemMostRecentEditorNameComponentsKey { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemRoleOwner")] NSString UbiquitousSharedItemRoleOwner { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemRoleParticipant")] NSString UbiquitousSharedItemRoleParticipant { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemPermissionsReadOnly")] NSString UbiquitousSharedItemPermissionsReadOnly { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Field ("NSURLUbiquitousSharedItemPermissionsReadWrite")] NSString UbiquitousSharedItemPermissionsReadWrite { get; } @@ -6983,7 +6899,7 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLUbiquitousItemContainerDisplayNameKey")] NSString UbiquitousItemContainerDisplayNameKey { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("NSURLUbiquitousItemIsExcludedFromSyncKey")] NSString UbiquitousItemIsExcludedFromSyncKey { get; } @@ -7059,50 +6975,44 @@ partial interface NSUrl : NSSecureCoding, NSCopying [Field ("NSURLFileProtectionCompleteUntilFirstUserAuthentication")] NSString FileProtectionCompleteUntilFirstUserAuthentication { get; } - [Watch (10, 0), TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSURLFileProtectionCompleteWhenUserInactive")] NSString FileProtectionCompleteWhenUserInactive { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSURLDirectoryEntryCountKey")] NSString DirectoryEntryCountKey { get; } - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSURLContentTypeKey")] NSString ContentTypeKey { get; } - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSURLFileContentIdentifierKey")] NSString FileContentIdentifierKey { get; } - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSURLIsPurgeableKey")] NSString IsPurgeableKey { get; } - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSURLIsSparseKey")] NSString IsSparseKey { get; } - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSURLMayHaveExtendedAttributesKey")] NSString MayHaveExtendedAttributesKey { get; } - [Watch (7, 0)] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -7192,13 +7102,12 @@ interface NSUrlCache { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the overload that accepts an 'NSUrl' parameter instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the overload that accepts an 'NSUrl' parameter instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the overload that accepts an 'NSUrl' parameter instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the overload that accepts an 'NSUrl' parameter instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the overload that accepts an 'NSUrl' parameter instead.")] [Export ("initWithMemoryCapacity:diskCapacity:diskPath:")] NativeHandle Constructor (nuint memoryCapacity, nuint diskCapacity, [NullAllowed] string diskPath); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithMemoryCapacity:diskCapacity:directoryURL:")] NativeHandle Constructor (nuint memoryCapacity, nuint diskCapacity, [NullAllowed] NSUrl directoryUrl); @@ -7260,7 +7169,7 @@ partial interface NSUrlComponents : NSCopying { [Static, Export ("componentsWithString:")] NSUrlComponents FromString (string urlString); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("componentsWithString:encodingInvalidCharacters:")] [return: NullAllowed] @@ -7317,7 +7226,7 @@ partial interface NSUrlComponents : NSCopying { [Export ("percentEncodedHost", ArgumentSemantic.Copy)] string PercentEncodedHost { get; set; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [NullAllowed, Export ("encodedHost")] string EncodedHost { get; set; } @@ -7452,7 +7361,6 @@ interface NSUrlConnection : bool CanHandleRequest (NSUrlRequest request); [return: NullAllowed] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'NSUrlSession' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'NSUrlSession' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSUrlSession' instead.")] @@ -7510,7 +7418,6 @@ interface NSUrlConnection : [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'NSUrlSession' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'NSUrlSession' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSUrlSession' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSUrlSession' instead.")] [Static] @@ -7521,7 +7428,6 @@ interface NSUrlConnection : [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'NSUrlSession.CreateDataTask' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'NSUrlSession.CreateDataTask' instead.")] [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use 'NSUrlSession.CreateDataTask' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSUrlSession.CreateDataTask' instead.")] [Static] @@ -7889,34 +7795,33 @@ partial interface NSUrlSession { [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use the Network.framework instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use the Network.framework instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use the Network.framework instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use the Network.framework instead.")] [Export ("streamTaskWithNetService:")] NSUrlSessionStreamTask CreateBidirectionalStream (NSNetService service); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("webSocketTaskWithURL:")] NSUrlSessionWebSocketTask CreateWebSocketTask (NSUrl url); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("webSocketTaskWithURL:protocols:")] NSUrlSessionWebSocketTask CreateWebSocketTask (NSUrl url, string [] protocols); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("webSocketTaskWithRequest:")] NSUrlSessionWebSocketTask CreateWebSocketTask (NSUrlRequest request); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("uploadTaskWithResumeData:")] [return: ForcedType] NSUrlSessionUploadTask CreateUploadTask (NSData resumeData); [Async (ResultTypeName = "NSUrlSessionUploadTaskResumeRequest")] - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("uploadTaskWithResumeData:completionHandler:")] [return: ForcedType] NSUrlSessionUploadTask CreateUploadTask (NSData resumeData, Action completionHandler); @@ -7971,7 +7876,6 @@ interface NSUrlSessionStreamTask { [Deprecated (PlatformName.MacOSX, 10, 15, message: "A secure (TLS) connection cannot become drop back to insecure (non-TLS).")] [Deprecated (PlatformName.iOS, 13, 0, message: "A secure (TLS) connection cannot become drop back to insecure (non-TLS).")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "A secure (TLS) connection cannot become drop back to insecure (non-TLS).")] [Deprecated (PlatformName.TvOS, 13, 0, message: "A secure (TLS) connection cannot become drop back to insecure (non-TLS).")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "A secure (TLS) connection cannot become drop back to insecure (non-TLS).")] [Export ("stopSecureConnection")] @@ -7984,7 +7888,6 @@ interface NSUrlSessionStreamTask { partial interface NSUrlSessionTask : NSCopying, NSProgressReporting { [Deprecated (PlatformName.MacOSX, 10, 15, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.iOS, 13, 0, message: "This type is not meant to be user created.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This type is not meant to be user created.")] [Export ("init")] @@ -8040,7 +7943,7 @@ partial interface NSUrlSessionTask : NSCopying, NSProgressReporting { [Export ("priority")] float Priority { get; set; } /* float, not CGFloat */ - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("prefersIncrementalDelivery")] bool PrefersIncrementalDelivery { get; set; } @@ -8057,11 +7960,11 @@ partial interface NSUrlSessionTask : NSCopying, NSProgressReporting { [Export ("countOfBytesClientExpectsToReceive")] long CountOfBytesClientExpectsToReceive { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("delegate", ArgumentSemantic.Retain)] NSObject WeakDelegate { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Wrap ("WeakDelegate")] [NullAllowed] INSUrlSessionTaskDelegate Delegate { get; set; } @@ -8089,7 +7992,6 @@ interface NSUrlSessionTaskPriority { partial interface NSUrlSessionDataTask { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSURLSession.CreateDataTask' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSURLSession.CreateDataTask' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSURLSession.CreateDataTask' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSURLSession.CreateDataTask' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSURLSession.CreateDataTask' instead.")] [Export ("init")] @@ -8102,18 +8004,17 @@ partial interface NSUrlSessionDataTask { partial interface NSUrlSessionUploadTask { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSURLSession.CreateUploadTask' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSURLSession.CreateUploadTask' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSURLSession.CreateUploadTask' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSURLSession.CreateUploadTask' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSURLSession.CreateUploadTask' instead.")] [Export ("init")] NativeHandle Constructor (); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("NSURLSessionUploadTaskResumeData")] NSString ResumeDataKey { get; } [Async] - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("cancelByProducingResumeData:")] void CancelByProducingResumeData (Action completionHandler); } @@ -8124,7 +8025,6 @@ partial interface NSUrlSessionUploadTask { partial interface NSUrlSessionDownloadTask { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'NSURLSession.CreateDownloadTask' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'NSURLSession.CreateDownloadTask' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'NSURLSession.CreateDownloadTask' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'NSURLSession.CreateDownloadTask' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'NSURLSession.CreateDownloadTask' instead.")] [Export ("init")] @@ -8136,7 +8036,6 @@ partial interface NSUrlSessionDownloadTask { [Internal] [Static] - [NoWatch] [MacCatalyst (13, 1)] interface ProxyConfigurationDictionaryKeys { [Field ("kCFNetworkProxiesHTTPEnable")] @@ -8160,7 +8059,6 @@ interface ProxyConfigurationDictionaryKeys { NSString HttpsProxyPortKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("ProxyConfigurationDictionaryKeys")] interface ProxyConfigurationDictionary { @@ -8220,7 +8118,6 @@ partial interface NSUrlSessionConfiguration : NSCopying { [Export ("connectionProxyDictionary", ArgumentSemantic.Copy)] NSDictionary ConnectionProxyDictionary { get; set; } - [NoWatch] [MacCatalyst (13, 1)] ProxyConfigurationDictionary StrongConnectionProxyDictionary { [Wrap ("new ProxyConfigurationDictionary (ConnectionProxyDictionary!)")] @@ -8231,26 +8128,24 @@ ProxyConfigurationDictionary StrongConnectionProxyDictionary { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'TlsMinimumSupportedProtocolVersion' instead.")] [Export ("TLSMinimumSupportedProtocol")] SslProtocol TLSMinimumSupportedProtocol { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("TLSMinimumSupportedProtocolVersion", ArgumentSemantic.Assign)] TlsProtocolVersion TlsMinimumSupportedProtocolVersion { get; set; } [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'TlsMaximumSupportedProtocolVersion' instead.")] [Export ("TLSMaximumSupportedProtocol")] SslProtocol TLSMaximumSupportedProtocol { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("TLSMaximumSupportedProtocolVersion", ArgumentSemantic.Assign)] TlsProtocolVersion TlsMaximumSupportedProtocolVersion { get; set; } @@ -8301,7 +8196,7 @@ ProxyConfigurationDictionary StrongConnectionProxyDictionary { [Export ("shouldUseExtendedBackgroundIdleMode")] bool ShouldUseExtendedBackgroundIdleMode { get; set; } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Export ("multipathServiceType", ArgumentSemantic.Assign)] NSUrlSessionMultipathServiceType MultipathServiceType { get; set; } @@ -8310,17 +8205,17 @@ ProxyConfigurationDictionary StrongConnectionProxyDictionary { [Export ("waitsForConnectivity")] bool WaitsForConnectivity { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowsExpensiveNetworkAccess")] bool AllowsExpensiveNetworkAccess { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowsConstrainedNetworkAccess")] bool AllowsConstrainedNetworkAccess { get; set; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("requiresDNSSECValidation")] bool RequiresDnsSecValidation { get; set; } @@ -8380,16 +8275,16 @@ partial interface NSUrlSessionTaskDelegate { [Export ("URLSession:taskIsWaitingForConnectivity:")] void TaskIsWaitingForConnectivity (NSUrlSession session, NSUrlSessionTask task); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("URLSession:didCreateTask:")] void DidCreateTask (NSUrlSession session, NSUrlSessionTask task); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("URLSession:task:didReceiveInformationalResponse:")] void DidReceiveInformationalResponse (NSUrlSession session, NSUrlSessionTask task, NSHttpUrlResponse response); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("URLSession:task:needNewBodyStreamFromOffset:completionHandler:")] void NeedNewBodyStream (NSUrlSession session, NSUrlSessionTask task, long offset, Action completionHandler); } @@ -8492,11 +8387,11 @@ interface NSUndoManager { [Export ("canRedo")] bool CanRedo { get; } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("undoCount")] nuint UndoCount { get; } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("redoCount")] nuint RedoCount { get; } @@ -8593,17 +8488,17 @@ interface NSUndoManager { [Export ("registerUndoWithTarget:handler:")] void RegisterUndo (NSObject target, Action undoHandler); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("undoActionUserInfoValueForKey:")] [return: NullAllowed] NSObject GetUndoActionUserInfoValue (string key); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("redoActionUserInfoValueForKey:")] [return: NullAllowed] NSObject GetRedoActionUserInfoValue (string key); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("setActionUserInfoValue:forKey:")] void SetActionUserInfoValue ([NullAllowed] NSObject info, string key); } @@ -8732,12 +8627,12 @@ interface NSUrlRequest : NSSecureCoding, NSMutableCopying { [Export ("allowsCellularAccess")] bool AllowsCellularAccess { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowsExpensiveNetworkAccess")] bool AllowsExpensiveNetworkAccess { get; [NotImplemented] set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowsConstrainedNetworkAccess")] bool AllowsConstrainedNetworkAccess { get; [NotImplemented] set; } @@ -8761,22 +8656,22 @@ interface NSUrlRequest : NSSecureCoding, NSMutableCopying { [Export ("HTTPShouldHandleCookies")] bool ShouldHandleCookies { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("assumesHTTP3Capable")] bool AssumesHttp3Capable { get; [NotImplemented] set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("attribution")] NSURLRequestAttribution Attribution { get; } // macOS is documented out of sync with iOS here - [Watch (9, 1), TV (16, 1), Mac (13, 0), iOS (16, 1)] + [TV (16, 1), Mac (13, 0), iOS (16, 1)] [MacCatalyst (16, 1)] [Export ("requiresDNSSECValidation")] bool RequiresDnsSecValidation { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("allowsPersistentDNS")] bool AllowsPersistentDns { get; } @@ -8964,32 +8859,32 @@ interface NSMutableUrlRequest { [Export ("allowsCellularAccess")] bool AllowsCellularAccess { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowsExpensiveNetworkAccess")] bool AllowsExpensiveNetworkAccess { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("allowsConstrainedNetworkAccess")] bool AllowsConstrainedNetworkAccess { get; set; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("assumesHTTP3Capable")] bool AssumesHttp3Capable { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("attribution", ArgumentSemantic.Assign)] NSURLRequestAttribution Attribution { get; set; } // Documented as 16.0 but did not work until 16.1 - https://github.com/xamarin/maccore/issues/2608 - https://feedbackassistant.apple.com/feedback/10897552 - [Watch (9, 1), TV (16, 1), Mac (13, 0), iOS (16, 1)] + [TV (16, 1), Mac (13, 0), iOS (16, 1)] [MacCatalyst (16, 1)] [Export ("requiresDNSSECValidation")] bool RequiresDnsSecValidation { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("allowsPersistentDNS")] bool AllowsPersistentDns { get; set; } @@ -9155,7 +9050,6 @@ interface NSStream { [Static, Export ("getBoundStreamsWithBufferSize:inputStream:outputStream:")] void GetBoundStreams (nuint bufferSize, out NSInputStream inputStream, out NSOutputStream outputStream); - [NoWatch] [MacCatalyst (13, 1)] [Static, Export ("getStreamsToHostWithName:port:inputStream:outputStream:")] void GetStreamsToHost (string hostname, nint port, out NSInputStream inputStream, out NSOutputStream outputStream); @@ -9183,35 +9077,30 @@ interface NSString2 : NSSecureCoding, NSMutableCopying, CKRecordValue [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Bind ("sizeWithAttributes:")] CGSize StringSize ([NullAllowed] NSDictionary attributedStringAttributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Bind ("boundingRectWithSize:options:attributes:")] CGRect BoundingRectWithSize (CGSize size, NSStringDrawingOptions options, NSDictionary attributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Bind ("drawAtPoint:withAttributes:")] void DrawString (CGPoint point, NSDictionary attributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Bind ("drawInRect:withAttributes:")] void DrawString (CGRect rect, NSDictionary attributes); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Bind ("drawWithRect:options:attributes:")] void DrawString (CGRect rect, NSStringDrawingOptions options, NSDictionary attributes); @@ -9716,7 +9605,6 @@ interface NSObject2 : NSObjectProtocol { #endif [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("valueClassForBinding:")] Class GetBindingValueClass (NSString binding); @@ -9724,7 +9612,6 @@ interface NSObject2 : NSObjectProtocol { #if !NET [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Use 'Bind (NSString binding, NSObject observable, string keyPath, [NullAllowed] NSDictionary options)' instead.")] [Export ("bind:toObject:withKeyPath:options:")] @@ -9732,7 +9619,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Use 'Unbind (NSString binding)' instead.")] [Export ("unbind:")] @@ -9740,7 +9626,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Use 'GetBindingValueClass (NSString binding)' instead.")] [Export ("valueClassForBinding:")] @@ -9748,7 +9633,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Use 'GetBindingInfo (NSString binding)' instead.")] [Export ("infoForBinding:")] @@ -9756,7 +9640,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Use 'GetBindingOptionDescriptions (NSString aBinding)' instead.")] [Export ("optionDescriptionsForBinding:")] @@ -9765,7 +9648,6 @@ interface NSObject2 : NSObjectProtocol { [Static] [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Wrap ("GetDefaultPlaceholder (marker, (NSString) binding)")] NSObject GetDefaultPlaceholder (NSObject marker, string binding); @@ -9773,7 +9655,6 @@ interface NSObject2 : NSObjectProtocol { [Static] [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Obsolete ("Use 'SetDefaultPlaceholder (NSObject placeholder, NSObject marker, NSString binding)' instead.")] [Wrap ("SetDefaultPlaceholder (placeholder, marker, (NSString) binding)")] @@ -9781,12 +9662,11 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("exposedBindings")] NSString [] ExposedBindings (); #else - [NoiOS][NoMacCatalyst][NoWatch][NoTV] + [NoiOS][NoMacCatalyst][NoTV] [Export ("exposedBindings")] NSString[] ExposedBindings { get; } #endif @@ -9796,7 +9676,6 @@ interface NSObject2 : NSObjectProtocol { #endif [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("bind:toObject:withKeyPath:options:")] void Bind (NSString binding, NSObject observable, string keyPath, [NullAllowed] NSDictionary options); @@ -9806,7 +9685,6 @@ interface NSObject2 : NSObjectProtocol { #endif [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("unbind:")] void Unbind (NSString binding); @@ -9816,7 +9694,6 @@ interface NSObject2 : NSObjectProtocol { #endif [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("infoForBinding:")] NSDictionary GetBindingInfo (NSString binding); @@ -9826,7 +9703,6 @@ interface NSObject2 : NSObjectProtocol { #endif [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("optionDescriptionsForBinding:")] NSObject [] GetBindingOptionDescriptions (NSString aBinding); @@ -9834,7 +9710,6 @@ interface NSObject2 : NSObjectProtocol { // NSPlaceholders (informal) protocol [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 15)] [Static] @@ -9843,7 +9718,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, 10, 15)] [Static] @@ -9852,7 +9726,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, message: "Now on 'NSEditor' protocol.")] [Export ("objectDidEndEditing:")] @@ -9860,7 +9733,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, message: "Now on 'NSEditor' protocol.")] [Export ("commitEditing")] @@ -9868,7 +9740,6 @@ interface NSObject2 : NSObjectProtocol { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Deprecated (PlatformName.MacOSX, message: "Now on 'NSEditor' protocol.")] [Export ("commitEditingWithDelegate:didCommitSelector:contextInfo:")] @@ -9908,12 +9779,10 @@ interface NSObject2 : NSObjectProtocol { [Static, Export ("cancelPreviousPerformRequestsWithTarget:selector:object:")] void CancelPreviousPerformRequest (NSObject aTarget, Selector selector, [NullAllowed] NSObject argument); - [NoWatch] [MacCatalyst (13, 1)] [Export ("prepareForInterfaceBuilder")] void PrepareForInterfaceBuilder (); - [NoWatch] [MacCatalyst (13, 1)] #if MONOMAC // comes from NSNibAwaking category and does not requires calling super @@ -9923,22 +9792,22 @@ interface NSObject2 : NSObjectProtocol { [Export ("awakeFromNib")] void AwakeFromNib (); - [NoWatch, TV (13, 0), iOS (13, 0), NoMac] + [TV (13, 0), iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Export ("accessibilityRespondsToUserInteraction")] bool AccessibilityRespondsToUserInteraction { get; set; } - [NoWatch, TV (13, 0), iOS (13, 0), NoMac] + [TV (13, 0), iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Export ("accessibilityUserInputLabels", ArgumentSemantic.Strong)] string [] AccessibilityUserInputLabels { get; set; } - [NoWatch, TV (13, 0), iOS (13, 0), NoMac] + [TV (13, 0), iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Export ("accessibilityAttributedUserInputLabels", ArgumentSemantic.Copy)] NSAttributedString [] AccessibilityAttributedUserInputLabels { get; set; } - [NoWatch, TV (13, 0), iOS (13, 0), NoMac] + [TV (13, 0), iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [NullAllowed, Export ("accessibilityTextualContext", ArgumentSemantic.Strong)] string AccessibilityTextualContext { get; set; } @@ -9946,7 +9815,6 @@ interface NSObject2 : NSObjectProtocol { [BaseType (typeof (NSObject))] [DisableDefaultCtor] - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] @@ -10121,7 +9989,6 @@ interface NSOperation { [Export ("threadPriority")] [Deprecated (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.WatchOS, 2, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -10173,7 +10040,6 @@ interface NSOperationQueue : NSProgressReporting { [Deprecated (PlatformName.MacOSX, 10, 15, 0, message: "This API should not be used as it is subject to race conditions. If synchronization is needed use 'AddBarrier' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "This API should not be used as it is subject to race conditions. If synchronization is needed use 'AddBarrier' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "This API should not be used as it is subject to race conditions. If synchronization is needed use 'AddBarrier' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "This API should not be used as it is subject to race conditions. If synchronization is needed use 'AddBarrier' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This API should not be used as it is subject to race conditions. If synchronization is needed use 'AddBarrier' instead.")] [Export ("operations")] @@ -10181,13 +10047,12 @@ interface NSOperationQueue : NSProgressReporting { [Deprecated (PlatformName.MacOSX, 10, 15)] [Deprecated (PlatformName.iOS, 13, 0)] - [Deprecated (PlatformName.WatchOS, 6, 0)] [Deprecated (PlatformName.TvOS, 13, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Export ("operationCount")] nint OperationCount { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("addBarrierBlock:")] void AddBarrier (Action barrier); @@ -10323,39 +10188,39 @@ interface NSOrderedSet : NSSecureCoding, NSMutableCopying { NSOrderedSet GetReverseOrderedSet (); #if false // https://github.com/xamarin/xamarin-macios/issues/15577 - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Wrap ("Runtime.GetNSObject (_GetDifference (other, options))")] [return: NullAllowed] NSOrderedCollectionDifference GetDifference (NSOrderedSet other, NSOrderedCollectionDifferenceCalculationOptions options); [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("differenceFromOrderedSet:withOptions:")] IntPtr _GetDifference (NSOrderedSet other, NSOrderedCollectionDifferenceCalculationOptions options); - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Wrap ("Runtime.GetNSObject (_GetDifference (other))")] [return: NullAllowed] NSOrderedCollectionDifference GetDifference (NSOrderedSet other); [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("differenceFromOrderedSet:")] IntPtr _GetDifference (NSOrderedSet other); - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Wrap ("Runtime.GetNSObject (_GetOrderedSet (difference))")] [return: NullAllowed] NSOrderedSet GetOrderedSet (NSOrderedCollectionDifference difference); [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("orderedSetByApplyingDifference:")] [return: NullAllowed] IntPtr _GetOrderedSet (NSOrderedCollectionDifference difference); [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("differenceFromOrderedSet:withOptions:usingEquivalenceTest:")] /* NSOrderedCollectionDifference*/ IntPtr _GetDifference (NSOrderedSet other, NSOrderedCollectionDifferenceCalculationOptions options, /* Func */ ref BlockLiteral block); #endif @@ -10501,12 +10366,12 @@ interface NSMutableOrderedSet { #if false // https://github.com/xamarin/xamarin-macios/issues/15577 [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("applyDifference:")] void _ApplyDifference (IntPtr difference); [Sealed] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("applyDifference:")] void ApplyDifference (NSOrderedCollectionDifference difference); #endif @@ -10677,22 +10542,22 @@ interface NSHttpCookie { [Field ("NSHTTPCookiePort")] NSString KeyPort { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("NSHTTPCookieSameSitePolicy")] NSString KeySameSitePolicy { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("NSHTTPCookieSameSiteLax")] NSString KeySameSiteLax { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("NSHTTPCookieSameSiteStrict")] NSString KeySameSiteStrict { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("sameSitePolicy")] NSString SameSitePolicy { get; } @@ -10776,7 +10641,7 @@ interface NSHttpUrlResponse { [Static] string LocalizedStringForStatusCode (nint statusCode); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("valueForHTTPHeaderField:")] [return: NullAllowed] @@ -10900,7 +10765,6 @@ partial interface NSBundle { // Additions from AppKit [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("loadNibNamed:owner:topLevelObjects:")] bool LoadNibNamed (string nibName, [NullAllowed] NSObject owner, out NSArray topLevelObjects); @@ -10908,7 +10772,6 @@ partial interface NSBundle { // https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSBundle_AppKitAdditions/Reference/Reference.html [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Static] [Deprecated (PlatformName.MacOSX, 10, 8)] @@ -10917,35 +10780,30 @@ partial interface NSBundle { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("pathForImageResource:")] string PathForImageResource (string resource); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("pathForSoundResource:")] string PathForSoundResource (string resource); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("URLForImageResource:")] NSUrl GetUrlForImageResource (string resource); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("contextHelpForKey:")] NSAttributedString GetContextHelp (string key); // http://developer.apple.com/library/ios/#documentation/uikit/reference/NSBundle_UIKitAdditions/Introduction/Introduction.html [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [Export ("loadNibNamed:owner:options:")] NSArray LoadNib (string nibName, [NullAllowed] NSObject owner, [NullAllowed] NSDictionary options); @@ -11029,7 +10887,7 @@ partial interface NSBundle { [Export ("setPreservationPriority:forTags:")] void SetPreservationPriority (double priority, NSSet tags); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("localizedAttributedStringForKey:value:table:")] NSAttributedString GetLocalizedAttributedString (string key, [NullAllowed] string value, [NullAllowed] string tableName); @@ -11118,19 +10976,16 @@ interface NSIndexPath : NSCoding, NSSecureCoding, NSCopying { // see monotouch/src/UIKit/Addition.cs for int-returning Row/Section properties [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [Export ("row")] nint LongRow { get; } [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [Export ("section")] nint LongSection { get; } [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("indexPathForRow:inSection:")] @@ -11138,18 +10993,15 @@ interface NSIndexPath : NSCoding, NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("section")] nint Section { get; } - [NoWatch] [Static] [MacCatalyst (13, 1)] [Export ("indexPathForItem:inSection:")] NSIndexPath FromItemSection (nint item, nint section); - [NoWatch] [Export ("item")] [MacCatalyst (13, 1)] nint Item { get; } @@ -11292,15 +11144,15 @@ partial interface NSItemProvider : NSCopying { [Field ("NSItemProviderErrorDomain")] NSString ErrorDomain { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Export ("sourceFrame")] CGRect SourceFrame { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Export ("containerFrame")] CGRect ContainerFrame { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("preferredPresentationSize")] CGSize PreferredPresentationSize { @@ -11310,11 +11162,11 @@ CGSize PreferredPresentationSize { set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Export ("registerCloudKitShareWithPreparationHandler:")] void RegisterCloudKitShare (CloudKitRegistrationPreparationAction preparationHandler); - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Export ("registerCloudKitShare:container:")] void RegisterCloudKitShare (CKShare share, CKContainer container); @@ -11346,7 +11198,7 @@ CGSize PreferredPresentationSize { [Async (ResultTypeName = "LoadInPlaceResult"), Export ("loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:")] NSProgress LoadInPlaceFileRepresentation (string typeIdentifier, LoadInPlaceFileRepresentationHandler completionHandler); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("suggestedName")] string SuggestedName { get; set; } @@ -11381,13 +11233,13 @@ CGSize PreferredPresentationSize { // NSItemProvider_UIKitAdditions category - [NoWatch, NoTV] + [NoTV] [NoMac] [MacCatalyst (13, 1)] [NullAllowed, Export ("teamData", ArgumentSemantic.Copy)] NSData TeamData { get; set; } - [NoWatch, NoTV] + [NoTV] [NoMac] [MacCatalyst (13, 1)] [Export ("preferredPresentationStyle", ArgumentSemantic.Assign)] @@ -11395,52 +11247,52 @@ CGSize PreferredPresentationSize { // extension methods from CloudKit - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("registerCKShareWithContainer:allowedSharingOptions:preparationHandler:")] void RegisterCKShare (CKContainer container, CKAllowedSharingOptions allowedOptions, Action preparationHandler); - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("registerCKShare:container:allowedSharingOptions:")] void RegisterCKShare (CKShare share, CKContainer container, CKAllowedSharingOptions allowedOptions); // from interface UTType (NSItemProvider) - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("initWithContentsOfURL:contentType:openInPlace:coordinated:visibility:")] NativeHandle Constructor (NSUrl fileUrl, [NullAllowed] UTType contentType, bool openInPlace, bool coordinated, NSItemProviderRepresentationVisibility visibility); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("registerDataRepresentationForContentType:visibility:loadHandler:")] void RegisterDataRepresentation (UTType contentType, NSItemProviderRepresentationVisibility visibility, NSItemProviderUTTypeLoadDelegate loadHandler); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("registerFileRepresentationForContentType:visibility:openInPlace:loadHandler:")] void RegisterFileRepresentation (UTType contentType, NSItemProviderRepresentationVisibility visibility, bool openInPlace, NSItemProviderUTTypeLoadDelegate loadHandler); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("registeredContentTypes", ArgumentSemantic.Copy)] UTType [] RegisteredContentTypes { get; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("registeredContentTypesForOpenInPlace", ArgumentSemantic.Copy)] UTType [] RegisteredContentTypesForOpenInPlace { get; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("registeredContentTypesConformingToContentType:")] UTType [] RegisteredContentTypesConforming (UTType contentType); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("loadDataRepresentationForContentType:completionHandler:")] NSProgress LoadDataRepresentation (UTType contentType, ItemProviderDataCompletionHandler completionHandler); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("loadFileRepresentationForContentType:openInPlace:completionHandler:")] NSProgress LoadFileRepresentation (UTType contentType, bool openInPlace, LoadFileRepresentationHandler completionHandler); } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] delegate NSProgress NSItemProviderUTTypeLoadDelegate ([BlockCallback] ItemProviderDataCompletionHandler completionHandler); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] delegate void LoadFileRepresentationHandler (NSUrl fileUrl, bool openInPlace, NSError error); delegate NSProgress RegisterFileRepresentationLoadHandler ([BlockCallback] RegisterFileRepresentationCompletionHandler completionHandler); delegate void RegisterFileRepresentationCompletionHandler (NSUrl fileUrl, bool coordinated, NSError error); @@ -11626,7 +11478,6 @@ interface NSMutableIndexSet : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use the Network.framework instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use the Network.framework instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use the Network.framework instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use the Network.framework instead.")] [DisableDefaultCtor] // the instance just crash when trying to call selectors @@ -11691,7 +11542,6 @@ interface NSNetService { [Export ("resolve")] [Deprecated (PlatformName.iOS, 2, 0, message: "Use 'Resolve (double)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 4, message: "Use 'Resolve (double)' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Resolve (double)' instead.")] void Resolve (); @@ -11737,7 +11587,6 @@ interface NSNetService { interface INSNetServiceDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [Model, BaseType (typeof (NSObject))] [Protocol] @@ -11773,7 +11622,6 @@ interface NSNetServiceDelegate { [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use the Network.framework instead.")] [Deprecated (PlatformName.iOS, 15, 0, message: "Use the Network.framework instead.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Use the Network.framework instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Use the Network.framework instead.")] [BaseType (typeof (NSObject), @@ -11827,7 +11675,6 @@ interface NSNetServiceBrowser { interface INSNetServiceBrowserDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [Model, BaseType (typeof (NSObject))] [Protocol] @@ -11913,7 +11760,6 @@ interface NSNotificationCenter { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -11943,7 +11789,6 @@ interface NSDistributedLock { /// Allows notifications to be sent to objects in other tasks. [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [BaseType (typeof (NSNotificationCenter))] interface NSDistributedNotificationCenter { @@ -12024,7 +11869,6 @@ partial interface NSValue : NSSecureCoding, NSCopying { [Deprecated (PlatformName.MacOSX, 10, 13, message: "Potential for buffer overruns. Use 'StoreValueAtAddress (IntPtr, nuint)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Potential for buffer overruns. Use 'StoreValueAtAddress (IntPtr, nuint)' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Potential for buffer overruns. Use 'StoreValueAtAddress (IntPtr, nuint)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Potential for buffer overruns. Use 'StoreValueAtAddress (IntPtr, nuint)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Potential for buffer overruns. Use 'StoreValueAtAddress (IntPtr, nuint)' instead.")] [Export ("getValue:")] void StoreValueAtAddress (IntPtr value); @@ -12069,32 +11913,26 @@ partial interface NSValue : NSSecureCoding, NSCopying { [Export ("rangeValue")] NSRange RangeValue { get; } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static, Export ("valueWithCMTime:")] NSValue FromCMTime (CMTime time); - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("CMTimeValue")] CMTime CMTimeValue { get; } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static, Export ("valueWithCMTimeMapping:")] NSValue FromCMTimeMapping (CMTimeMapping timeMapping); - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("CMTimeMappingValue")] CMTimeMapping CMTimeMappingValue { get; } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static, Export ("valueWithCMTimeRange:")] NSValue FromCMTimeRange (CMTimeRange timeRange); - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("CMTimeRangeValue")] CMTimeRange CMTimeRangeValue { get; } @@ -12220,20 +12058,17 @@ partial interface NSValue : NSSecureCoding, NSCopying { [Export ("MKCoordinateSpanValue")] MapKit.MKCoordinateSpan CoordinateSpanValue { get; } -#if !WATCH [Export ("valueWithCATransform3D:")] [Static] NSValue FromCATransform3D (CoreAnimation.CATransform3D transform); [Export ("CATransform3DValue")] CoreAnimation.CATransform3D CATransform3DValue { get; } -#endif [iOS (16, 0)] [Mac (13, 0)] [MacCatalyst (16, 0)] [TV (16, 0)] - [Watch (9, 0)] [Export ("CMVideoDimensionsValue")] CMVideoDimensions CMVideoDimensionsValue { get; } @@ -12241,7 +12076,6 @@ partial interface NSValue : NSSecureCoding, NSCopying { [Mac (13, 0)] [MacCatalyst (16, 0)] [TV (16, 0)] - [Watch (9, 0)] [Export ("valueWithCMVideoDimensions:")] [Static] NSValue FromCMVideoDimensions (CMVideoDimensions value); @@ -12339,7 +12173,6 @@ interface NSValueTransformer { NSString IsNotNilTransformerName { get; } [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] @@ -12347,20 +12180,17 @@ interface NSValueTransformer { NSString UnarchiveFromDataTransformerName { get; } [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SecureUnarchiveFromDataTransformerName' instead.")] [Field ("NSKeyedUnarchiveFromDataTransformerName")] NSString KeyedUnarchiveFromDataTransformerName { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("NSSecureUnarchiveFromDataTransformerName")] NSString SecureUnarchiveFromDataTransformerName { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSValueTransformer))] interface NSSecureUnarchiveFromDataTransformer { @@ -12756,7 +12586,7 @@ interface NSNumberFormatter { [Export ("partialStringValidationEnabled")] bool PartialStringValidationEnabled { [Bind ("isPartialStringValidationEnabled")] get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("minimumGroupingDigits")] nint MinimumGroupingDigits { get; set; } } @@ -13000,7 +12830,6 @@ interface NSPortDelegate { [MacCatalyst (15, 0)] interface NSPortMessage { [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (15, 0)] [DesignatedInitializer] @@ -13009,7 +12838,6 @@ interface NSPortMessage { [NullAllowed] [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (15, 0)] [Export ("components")] @@ -13020,7 +12848,6 @@ interface NSPortMessage { // but the type is used (from NSPort[Delegate]) but not _itself_ documented // The selectors Apple *currently* dislike are removed from the iOS build [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (15, 0)] [Export ("sendBeforeDate:")] @@ -13028,7 +12855,6 @@ interface NSPortMessage { [NullAllowed] [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (15, 0)] [Export ("receivePort")] @@ -13036,14 +12862,12 @@ interface NSPortMessage { [NullAllowed] [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (15, 0)] [Export ("sendPort")] NSPort SendPort { get; } [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (15, 0)] [Export ("msgid")] @@ -13173,35 +12997,30 @@ interface NSProcessInfo { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("enableSuddenTermination")] void EnableSuddenTermination (); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("disableSuddenTermination")] void DisableSuddenTermination (); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("enableAutomaticTermination:")] void EnableAutomaticTermination (string reason); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("disableAutomaticTermination:")] void DisableAutomaticTermination (string reason); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("automaticTerminationSupportEnabled")] bool AutomaticTerminationSupportEnabled { get; set; } @@ -13231,12 +13050,12 @@ interface NSProcessInfo { NSString ThermalStateDidChangeNotification { get; } #region NSProcessInfoPlatform (NSProcessInfo) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("macCatalystApp")] bool IsMacCatalystApplication { [Bind ("isMacCatalystApp")] get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("iOSAppOnMac")] bool IsiOSApplicationOnMac { [Bind ("isiOSAppOnMac")] get; } @@ -13244,11 +13063,10 @@ interface NSProcessInfo { [Field ("NSProcessInfoPerformanceProfileDidChangeNotification", "Metal")] [Notification] - [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] NSString PerformanceProfileDidChangeNotification { get; } } - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] @@ -13356,49 +13174,42 @@ partial interface NSProgress { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("publish")] void Publish (); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("unpublish")] void Unpublish (); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("setAcknowledgementHandler:forAppBundleIdentifier:")] void SetAcknowledgementHandler (Action acknowledgementHandler, string appBundleIdentifier); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Static, Export ("addSubscriberForFileURL:withPublishingHandler:")] NSObject AddSubscriberForFile (NSUrl url, Action publishingHandler); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Static, Export ("removeSubscriber:")] void RemoveSubscriber (NSObject subscriber); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("acknowledgeWithSuccess:")] void AcknowledgeWithSuccess (bool success); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("old")] bool Old { [Bind ("isOld")] get; } @@ -13427,7 +13238,7 @@ partial interface NSProgress { [Field ("NSProgressFileOperationKindCopying")] NSString FileOperationKindCopying { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("NSProgressFileOperationKindUploading")] NSString FileOperationKindUploading { get; } @@ -13441,27 +13252,24 @@ partial interface NSProgress { [Field ("NSProgressFileCompletedCountKey")] NSString FileCompletedCountKey { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("NSProgressFileOperationKindDuplicating")] NSString FileOperationKindDuplicatingKey { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSProgressFileAnimationImageKey")] NSString FileAnimationImageKey { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSProgressFileAnimationImageOriginalRectKey")] NSString FileAnimationImageOriginalRectKey { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("NSProgressFileIconKey")] NSString FileIconKey { get; } @@ -13607,7 +13415,7 @@ interface NSFileCoordinator { [Export ("purposeIdentifier")] string PurposeIdentifier { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("itemAtURL:didChangeUbiquityAttributes:")] void ItemUbiquityAttributesChanged (NSUrl url, NSSet attributes); @@ -13932,7 +13740,6 @@ partial interface NSFileManager { [Export ("getRelationship:ofDirectoryAtURL:toItemAtURL:error:")] bool GetRelationship (out NSUrlRelationship outRelationship, NSUrl directoryURL, NSUrl otherURL, out NSError error); - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] @@ -13940,7 +13747,7 @@ partial interface NSFileManager { [Export ("unmountVolumeAtURL:options:completionHandler:")] void UnmountVolume (NSUrl url, NSFileManagerUnmountOptions mask, Action completionHandler); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Async, Export ("getFileProviderServicesForItemAtURL:completionHandler:")] void GetFileProviderServices (NSUrl url, Action, NSError> completionHandler); @@ -14021,7 +13828,6 @@ interface NSFileManagerDelegate { [BaseType (typeof (NSFileManager))] interface NSFileManager_NSUserInformation { - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] @@ -14032,7 +13838,6 @@ interface NSFileManager_NSUserInformation { [Export ("temporaryDirectory")] NSUrl GetTemporaryDirectory (); - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] @@ -14076,7 +13881,7 @@ partial interface NSFilePresenter { [Export ("accommodatePresentedItemDeletionWithCompletionHandler:")] void AccommodatePresentedItemDeletion (Action completionHandler); - [NoWatch, NoTV, Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("accommodatePresentedItemEvictionWithCompletionHandler:")] void AccommodatePresentedItemEviction (Action completionHandler); @@ -14116,12 +13921,12 @@ partial interface NSFilePresenter { [Export ("presentedSubitemAtURL:didResolveConflictVersion:")] void PresentedSubitemResolvedConflictVersion (NSUrl url, NSFileVersion version); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("presentedItemDidChangeUbiquityAttributes:")] void PresentedItemChangedUbiquityAttributes (NSSet attributes); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("observedPresentedItemUbiquityAttributes", ArgumentSemantic.Strong)] NSSet PresentedItemObservedUbiquityAttributes { get; } @@ -14156,7 +13961,6 @@ interface NSFileVersion { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("discardable")] bool Discardable { [Bind ("isDiscardable")] get; set; } @@ -14193,7 +13997,6 @@ interface NSFileVersion { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [return: NullAllowed] [Static] @@ -14202,7 +14005,6 @@ interface NSFileVersion { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Static] [Export ("temporaryDirectoryURLForNewVersionOfItemAtURL:")] @@ -14218,7 +14020,7 @@ interface NSFileVersion { [Export ("removeOtherVersionsOfItemAtURL:error:")] bool RemoveOtherVersions (NSUrl url, out NSError outError); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("originatorNameComponents", ArgumentSemantic.Copy)] NSPersonNameComponents OriginatorNameComponents { get; } @@ -14303,7 +14105,6 @@ interface NSFileWrapper : NSSecureCoding { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("icon", ArgumentSemantic.Retain)] NSImage Icon { get; set; } @@ -14325,7 +14126,7 @@ interface NSDirectoryEnumerator { [Export ("level")] nint Level { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("isEnumeratingDirectoryPostOrder")] bool IsEnumeratingDirectoryPostOrder { get; } @@ -14364,7 +14165,6 @@ interface NSPredicate : NSSecureCoding, NSCopying { [Static] [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("predicateFromMetadataQueryString:")] NSPredicate FromMetadataQueryString (string query); @@ -14414,7 +14214,6 @@ partial interface NSPredicateSupport_NSMutableSet { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [BaseType (typeof (NSObject), Name = "NSURLDownload")] interface NSUrlDownload { @@ -14448,7 +14247,6 @@ interface NSUrlDownload { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [BaseType (typeof (NSObject))] [Model] @@ -14960,7 +14758,6 @@ partial interface NSBundle { // - (NSImage *)imageForResource:(NSString *)name NS_AVAILABLE_MAC(10_7); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("imageForResource:")] NSImage ImageForResource (string name); @@ -15096,21 +14893,20 @@ interface NSUnitTemperature : NSSecureCoding { partial interface NSFileManager { - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Export ("trashItemAtURL:resultingItemURL:error:")] bool TrashItem (NSUrl url, out NSUrl resultingItemUrl, out NSError error); [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Static] [Export ("fileManagerWithAuthorization:")] NSFileManager FromAuthorization (NSWorkspaceAuthorization authorization); } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15125,13 +14921,13 @@ interface NSFileProviderService { #if MONOMAC partial interface NSFilePresenter { - [NoiOS][NoMacCatalyst][NoWatch][NoTV] + [NoiOS][NoMacCatalyst][NoTV] [NullAllowed] [Export ("primaryPresentedItemURL")] NSUrl PrimaryPresentedItemUrl { get; } } - [NoiOS][NoMacCatalyst][NoWatch][NoTV] + [NoiOS][NoMacCatalyst][NoTV] [Deprecated (PlatformName.MacOSX, 12, 0, message : "Use the Network.framework instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15192,7 +14988,6 @@ partial interface NSHost { [MacCatalyst (15, 0)] [NoiOS] [NoTV] - [NoWatch] partial interface NSScriptCommand : NSCoding { [Internal] @@ -15219,7 +15014,6 @@ partial interface NSScriptCommand : NSCoding { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [StrongDictionary ("NSScriptCommandArgumentDescriptionKeys")] partial interface NSScriptCommandArgumentDescription { @@ -15230,7 +15024,6 @@ partial interface NSScriptCommandArgumentDescription { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [StrongDictionary ("NSScriptCommandDescriptionDictionaryKeys")] partial interface NSScriptCommandDescriptionDictionary { @@ -15244,7 +15037,6 @@ partial interface NSScriptCommandDescriptionDictionary { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -15301,7 +15093,7 @@ partial interface NSScriptCommandDescription : NSCoding { IntPtr CreateCommandInstancePtr (); } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] [MacCatalyst (13, 1)] @@ -15355,7 +15147,7 @@ interface NSAffineTransform : NSSecureCoding, NSCopying { [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSXpcConnection' instead.")] [NoMacCatalyst] - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSConnection { @@ -15469,7 +15261,7 @@ interface INSConnectionDelegate { } [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSXpcConnection' instead.")] [NoMacCatalyst] - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -15495,7 +15287,7 @@ interface NSConnectionDelegate { [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'NSXpcConnection' instead.")] [NoMacCatalyst] - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSDistantObjectRequest { @@ -15513,7 +15305,7 @@ interface NSDistantObjectRequest { } [NoMacCatalyst] - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [Deprecated (PlatformName.MacOSX, 10, 13)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15536,7 +15328,7 @@ interface NSPortNameServer { bool RemovePort (string portName); } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface NSAppleEventDescriptor : NSSecureCoding, NSCopying { @@ -15746,7 +15538,7 @@ interface NSAppleEventDescriptor : NSSecureCoding, NSCopying { NSUrl FileURLValue { get; } } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface NSAppleEventManager { @@ -15788,7 +15580,7 @@ interface NSAppleEventManager { NSString WillProcessFirstEventNotification { get; } } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -15914,7 +15706,7 @@ interface NSTask { NSString DidTerminateNotification { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] [Advice ("'NSUserNotification' usages should be replaced with 'UserNotifications' framework.")] @@ -15998,7 +15790,7 @@ interface NSUserNotification : NSCoding, NSCopying { NSUserNotificationAction AdditionalActivationAction { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] [Advice ("'NSUserNotification' usages should be replaced with 'UserNotifications' framework.")] interface NSUserNotificationAction : NSCopying { @@ -16013,7 +15805,7 @@ interface NSUserNotificationAction : NSCopying { string Title { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (NSUserNotificationCenterDelegate) })] @@ -16061,7 +15853,7 @@ interface NSUserNotificationCenter { interface INSUserNotificationCenterDelegate { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -16077,7 +15869,7 @@ interface NSUserNotificationCenterDelegate { bool ShouldPresentNotification (NSUserNotificationCenter center, NSUserNotification notification); } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -16149,7 +15941,6 @@ interface NSUrlSessionTaskTransactionMetrics { [Deprecated (PlatformName.MacOSX, 10, 15, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.iOS, 13, 0, message: "This type is not meant to be user created.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This type is not meant to be user created.")] [Export ("init")] @@ -16206,68 +15997,68 @@ interface NSUrlSessionTaskTransactionMetrics { [Export ("resourceFetchType", ArgumentSemantic.Assign)] NSUrlSessionTaskMetricsResourceFetchType ResourceFetchType { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("countOfRequestHeaderBytesSent")] long CountOfRequestHeaderBytesSent { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("countOfRequestBodyBytesSent")] long CountOfRequestBodyBytesSent { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("countOfRequestBodyBytesBeforeEncoding")] long CountOfRequestBodyBytesBeforeEncoding { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("countOfResponseHeaderBytesReceived")] long CountOfResponseHeaderBytesReceived { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("countOfResponseBodyBytesReceived")] long CountOfResponseBodyBytesReceived { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("countOfResponseBodyBytesAfterDecoding")] long CountOfResponseBodyBytesAfterDecoding { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("localAddress")] string LocalAddress { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("localPort", ArgumentSemantic.Copy)] // 0-1023 [BindAs (typeof (ushort?))] NSNumber LocalPort { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("remoteAddress")] string RemoteAddress { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("remotePort", ArgumentSemantic.Copy)] // 0-1023 [BindAs (typeof (ushort?))] NSNumber RemotePort { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("negotiatedTLSProtocolVersion", ArgumentSemantic.Copy)] // It is a 2-byte sequence in host byte order. but it refers to (nicer) `tls_protocol_version_t` [BindAs (typeof (SslProtocol?))] NSNumber NegotiatedTlsProtocolVersion { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("negotiatedTLSCipherSuite", ArgumentSemantic.Copy)] // It is a 2-byte sequence in host byte order. but it refers to (nicer) `tls_ciphersuite_t` @@ -16278,27 +16069,27 @@ interface NSUrlSessionTaskTransactionMetrics { #endif NSNumber NegotiatedTlsCipherSuite { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("cellular")] bool Cellular { [Bind ("isCellular")] get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("expensive")] bool Expensive { [Bind ("isExpensive")] get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("constrained")] bool Constrained { [Bind ("isConstrained")] get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("multipath")] bool Multipath { [Bind ("isMultipath")] get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("domainResolutionProtocol")] NSUrlSessionTaskMetricsDomainResolutionProtocol DomainResolutionProtocol { get; } @@ -16311,7 +16102,6 @@ interface NSUrlSessionTaskMetrics { [Deprecated (PlatformName.MacOSX, 10, 15, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.iOS, 13, 0, message: "This type is not meant to be user created.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "This type is not meant to be user created.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This type is not meant to be user created.")] [Export ("init")] @@ -16532,25 +16322,25 @@ interface NSUnitDuration : NSSecureCoding { [Export ("baseUnit")] NSDimension BaseUnit { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("milliseconds", ArgumentSemantic.Copy)] NSUnitDuration Milliseconds { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("microseconds", ArgumentSemantic.Copy)] NSUnitDuration Microseconds { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("nanoseconds", ArgumentSemantic.Copy)] NSUnitDuration Nanoseconds { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("picoseconds", ArgumentSemantic.Copy)] @@ -16782,7 +16572,7 @@ interface NSUnitFrequency : NSSecureCoding { [Export ("baseUnit")] NSDimension BaseUnit { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("framesPerSecond", ArgumentSemantic.Copy)] @@ -17357,7 +17147,6 @@ interface NSMeasurementFormatter : NSSecureCoding { interface NSXpcConnection { [Export ("initWithServiceName:")] [NoiOS] - [NoWatch] [NoTV] [NoMacCatalyst] NativeHandle Constructor (string xpcServiceName); @@ -17367,7 +17156,6 @@ interface NSXpcConnection { [Export ("initWithMachServiceName:options:")] [NoiOS] - [NoWatch] [NoTV] [NoMacCatalyst] NativeHandle Constructor (string machServiceName, NSXpcConnectionOptions options); @@ -17424,7 +17212,6 @@ interface NSXpcConnection { [Export ("scheduleSendBarrierBlock:")] [iOS (13, 0)] - [Watch (6, 0)] [TV (13, 0)] [MacCatalyst (13, 1)] void ScheduleSendBarrier (Action block); @@ -17439,12 +17226,12 @@ interface NSXpcConnection { [Export ("synchronousRemoteObjectProxyWithErrorHandler:"), Internal] IntPtr _CreateSynchronousRemoteObjectProxy ([BlockCallback] Action errorHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("activate")] void Activate (); - [NoWatch, NoTV, NoiOS, Mac (13, 0)] + [NoTV, NoiOS, Mac (13, 0)] [NoMacCatalyst] [Export ("setCodeSigningRequirement:")] void SetCodeSigningRequirement (string requirement); @@ -17467,7 +17254,6 @@ interface NSXpcListener { [DesignatedInitializer] [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] NativeHandle Constructor (string machServiceName); @@ -17491,12 +17277,12 @@ interface NSXpcListener { [Export ("invalidate")] void Invalidate (); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("activate")] void Activate (); - [NoWatch, NoTV, NoiOS, Mac (13, 0)] + [NoTV, NoiOS, Mac (13, 0)] [NoMacCatalyst] [Export ("setConnectionCodeSigningRequirement:")] void SetConnectionCodeSigningRequirement (string requirement); @@ -17537,7 +17323,7 @@ interface NSXpcInterface { interface NSXpcListenerEndpoint : NSSecureCoding { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSFormatter))] interface NSListFormatter { @@ -17562,7 +17348,7 @@ interface NSListFormatter { string GetString ([NullAllowed] NSObject obj); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSRelativeDateTimeFormatterStyle : long { @@ -17570,7 +17356,7 @@ enum NSRelativeDateTimeFormatterStyle : long { Named, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSRelativeDateTimeFormatterUnitsStyle : long { @@ -17580,7 +17366,7 @@ enum NSRelativeDateTimeFormatterUnitsStyle : long { Abbreviated, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSFormatter))] interface NSRelativeDateTimeFormatter { @@ -17614,7 +17400,7 @@ interface NSRelativeDateTimeFormatter { string GetString ([NullAllowed] NSObject obj); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSCollectionChangeType : long { @@ -17622,7 +17408,7 @@ enum NSCollectionChangeType : long { Remove, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSOrderedCollectionDifferenceCalculationOptions : ulong { @@ -17631,7 +17417,7 @@ enum NSOrderedCollectionDifferenceCalculationOptions : ulong { InferMoves = (1uL << 2), } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSDimension))] [DisableDefaultCtor] // NSGenericException Reason: -init should never be called on NSUnit! @@ -17788,7 +17574,7 @@ interface NSUnitInformationStorage : NSSecureCoding { NSUnitInformationStorage Kibibits { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSUrlSessionWebSocketMessageType : long { @@ -17796,7 +17582,7 @@ enum NSUrlSessionWebSocketMessageType : long { String = 1, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "NSURLSessionWebSocketMessage")] [DisableDefaultCtor] @@ -17820,7 +17606,7 @@ interface NSUrlSessionWebSocketMessage { string String { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSUrlSessionWebSocketCloseCode : long { @@ -17839,7 +17625,7 @@ enum NSUrlSessionWebSocketCloseCode : long { TlsHandshakeFailure = 1015, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSUrlSessionTask), Name = "NSURLSessionWebSocketTask")] [DisableDefaultCtor] @@ -17870,7 +17656,7 @@ interface NSUrlSessionWebSocketTask { NSData CloseReason { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol][Model] @@ -17888,7 +17674,7 @@ interface NSUrlSessionWebSocketDelegate { void DidClose (NSUrlSession session, NSUrlSessionWebSocketTask webSocketTask, NSUrlSessionWebSocketCloseCode closeCode, [NullAllowed] NSData reason); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NSUrlErrorNetworkUnavailableReason : long { @@ -17897,7 +17683,7 @@ enum NSUrlErrorNetworkUnavailableReason : long { Constrained = 2, } - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [NoMacCatalyst] [Native] public enum NSBackgroundActivityResult : long { @@ -17909,7 +17695,7 @@ public enum NSBackgroundActivityResult : long { delegate void NSBackgroundActivityCompletionAction ([BlockCallback] NSBackgroundActivityCompletionHandler handler); - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -17943,7 +17729,7 @@ interface NSBackgroundActivityScheduler { bool ShouldDefer { get; } } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum NSUrlSessionTaskMetricsDomainResolutionProtocol : long { @@ -17956,7 +17742,6 @@ public enum NSUrlSessionTaskMetricsDomainResolutionProtocol : long { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [Native] public enum NSNotificationSuspensionBehavior : ulong { @@ -17968,7 +17753,6 @@ public enum NSNotificationSuspensionBehavior : ulong { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (15, 0)] [Flags] [Native] @@ -17977,7 +17761,6 @@ public enum NSNotificationFlags : ulong { PostToAllSessions = (1 << 1), } - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] @@ -17988,7 +17771,7 @@ public enum NSFileManagerUnmountOptions : ulong { WithoutUI = 1 << 1, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSPresentationIntent : NSCopying, NSSecureCoding { @@ -18077,7 +17860,7 @@ interface NSPresentationIntent : NSCopying, NSSecureCoding { bool IsEquivalent (NSPresentationIntent other); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface NSAttributedStringMarkdownParsingOptions : NSCopying { [Export ("allowsExtendedAttributes")] @@ -18092,13 +17875,13 @@ interface NSAttributedStringMarkdownParsingOptions : NSCopying { [NullAllowed, Export ("languageCode")] string LanguageCode { get; set; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("appliesSourcePositionAttributes")] bool AppliesSourcePositionAttributes { get; set; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSInflectionRule : NSCopying, NSSecureCoding { @@ -18106,20 +17889,20 @@ interface NSInflectionRule : NSCopying, NSSecureCoding { [Export ("automaticRule")] NSInflectionRule AutomaticRule { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("canInflectLanguage:")] bool CanInflectLanguage (string language); - [Watch (8, 0), TV (15, 0), iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("canInflectPreferredLocalization")] bool CanInflectPreferredLocalization { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSInflectionRule))] interface NSInflectionRuleExplicit { [Export ("initWithMorphology:")] @@ -18130,7 +17913,7 @@ interface NSInflectionRuleExplicit { NSMorphology Morphology { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface NSMorphology : NSCopying, NSSecureCoding { [Export ("grammaticalGender", ArgumentSemantic.Assign)] @@ -18146,7 +17929,6 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.MacCatalyst, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] - [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Export ("customPronounForLanguage:")] [return: NullAllowed] NSMorphologyCustomPronoun GetCustomPronoun (string language); @@ -18155,7 +17937,6 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.MacCatalyst, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] - [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] [Export ("setCustomPronoun:forLanguage:error:")] bool SetCustomPronoun ([NullAllowed] NSMorphologyCustomPronoun features, string language, [NullAllowed] out NSError error); @@ -18166,23 +17947,23 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Export ("userMorphology")] NSMorphology UserMorphology { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("grammaticalCase", ArgumentSemantic.Assign)] NSGrammaticalCase GrammaticalCase { get; set; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("determination", ArgumentSemantic.Assign)] NSGrammaticalDetermination Determination { get; set; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("grammaticalPerson", ArgumentSemantic.Assign)] NSGrammaticalPerson GrammaticalPerson { get; set; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("pronounType", ArgumentSemantic.Assign)] NSGrammaticalPronounType PronounType { get; set; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("definiteness", ArgumentSemantic.Assign)] NSGrammaticalDefiniteness Definiteness { get; set; } } @@ -18191,8 +17972,7 @@ interface NSMorphology : NSCopying, NSSecureCoding { [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.MacCatalyst, 17, 0, message: "Use 'NSTermOfAddress' instead.")] [Obsoleted (PlatformName.TvOS, 17, 0, message: "Use 'NSTermOfAddress' instead.")] - [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'NSTermOfAddress' instead.")] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface NSMorphologyCustomPronoun : NSCopying, NSSecureCoding { [Static] @@ -18222,7 +18002,7 @@ interface NSMorphologyCustomPronoun : NSCopying, NSSecureCoding { #if false // https://github.com/xamarin/xamarin-macios/issues/15577 interface NSOrderedCollectionChange : NSOrderedCollectionChange {} - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSOrderedCollectionChange @@ -18269,7 +18049,7 @@ interface NSOrderedCollectionChange interface NSOrderedCollectionDifference : NSOrderedCollectionDifference {} - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [BaseType (typeof (NSObject))] interface NSOrderedCollectionDifference : INSFastEnumeration { @@ -18307,13 +18087,13 @@ interface NSOrderedCollectionDifference : INSFastEnumeration NativeHandle _GetDifference (/* Func, NSOrderedCollectionChange>*/ ref BlockLiteral block); [Internal] - [Watch (6,0), TV (13,0), iOS (13,0)] + [TV (13,0), iOS (13,0)] [Export ("inverseDifference")] NativeHandle _InverseDifference (); } #endif - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface NSAttributedStringMarkdownSourcePosition : NSCopying, NSSecureCoding { @@ -18336,7 +18116,7 @@ interface NSAttributedStringMarkdownSourcePosition : NSCopying, NSSecureCoding { NSRange RangeInString (string @string); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTermOfAddress : NSCopying, NSSecureCoding { @@ -18364,11 +18144,11 @@ interface NSTermOfAddress : NSCopying, NSSecureCoding { [Static] [Export ("currentUser")] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] NSTermOfAddress CurrentUser { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSMorphologyPronoun : NSCopying, NSSecureCoding { @@ -18443,80 +18223,80 @@ float DefaultTabInterval { [iOS (13, 0)] float CocoaVersion { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] int Converted { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string FileType { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Title { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Company { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Copyright { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Subject { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Author { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string [] Keywords { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Comment { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Editor { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] NSDate CreationTime { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] NSDate ModificationTime { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Manager { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string Category { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] NSAppearance Appearance { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] float LeftMargin { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] float RightMargin { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] float TopMargin { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] float BottomMargin { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string [] ExcludedElements { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string TextEncodingName { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] int PrefixSpaces { get; set; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSKeyValueSharedObserversSnapshot { } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSKeyValueSharedObservers { @@ -18534,14 +18314,14 @@ interface NSKeyValueSharedObservers { } [Category, BaseType (typeof (NSObject))] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] interface NSKeyValueSharedObserverRegistration_NSObject { [Export ("setSharedObservers:")] void SetSharedObservers ([NullAllowed] NSKeyValueSharedObserversSnapshot sharedObservers); } [BaseType (typeof (NSObject))] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [DisableDefaultCtor] interface NSLocalizedNumberFormatRule : NSCopying, NSSecureCoding { [Static] diff --git a/src/frameworks.sources b/src/frameworks.sources index 1e2c71eae1cc..fbe6e6aae8dd 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1,11 +1,10 @@ # # The source files used to build the platform assemblies: # -# Xamarin.iOS: monotouch.dll and Xamarin.iOS.dll -# Xamarin.Mac: XamMac.dll and Xamarin.Mac.dll -# Xamarin.WatchOS: Xamarin.WatchOS.dll -# Xamarin.TVOS: Xamarin.TVOS.dll -# Xamarin.MacCatalyst: Xamarin.MacCatalyst.dll +# Microsoft.iOS.dll +# Microsoft.macOS.dll +# Microsoft.tvOS.dll +# Microsoft.MacCatalyst.dll # # First we build an assembly that contains the bare-bones code required # to compile the bindings. This is core.dll, and the source code is listed @@ -249,13 +248,12 @@ AVFOUNDATION_CORE_SOURCES = \ AVFoundation/AVUrlAssetOptions.cs \ AVFoundation/AVVideoSettings.cs \ AVFoundation/AVTypes.cs \ + AVFoundation/AVAudioVoiceProcessingOtherAudioDuckingConfiguration.cs \ AVFOUNDATION_SOURCES = \ AVFoundation/AVAssetDownloadStorageManagementPolicy.cs \ AVFoundation/AVAssetDownloadTask.cs \ AVFoundation/AVAssetDownloadUrlSession.cs \ - AVFoundation/AVAssetImageGenerator.cs \ - AVFoundation/AVAssetReaderVideoCompositionOutput.cs \ AVFoundation/AVAssetResourceLoadingDataRequest.cs \ AVFoundation/AVAudioBuffer.cs \ AVFoundation/AVAudioChannelLayout.cs \ @@ -278,22 +276,24 @@ AVFOUNDATION_SOURCES = \ AVFoundation/AVContentKeyResponse.cs \ AVFoundation/AVDepthData.cs \ AVFoundation/AVLayerVideoGravity.cs \ - AVFoundation/AVMetadataItemFilter.cs \ AVFoundation/AVMetadataMachineReadableCodeObject.cs \ AVFoundation/AVMetadataObject.cs \ AVFoundation/AVOutputSettingsAssistant.cs \ AVFoundation/AVPlayerItem.cs \ AVFoundation/AVPlayerItemVideoOutput.cs \ AVFoundation/AVPlayerLayer.cs \ - AVFoundation/AVPlayerViewController.cs \ AVFoundation/AVSampleBufferExtensions.cs \ AVFoundation/AVSampleCursor.cs \ AVFoundation/AVSpeechSynthesizer.cs \ + AVFoundation/AVSpeechSynthesisMarker.cs \ + AVFoundation/AVSpeechSynthesisProviderAudioUnit.cs \ + AVFoundation/AVSpeechUtterance.cs \ AVFoundation/AVTextStyleRule.cs \ AVFoundation/Events.cs \ AVFoundation/AVPlayerLooper.cs \ AVFoundation/AudioRendererWasFlushedAutomaticallyEventArgs.cs \ AVFoundation/AVCaptureReactionType.rgen.cs \ + AVFoundation/CMTagCollectionVideoOutputPreset.cs \ # AVKit @@ -347,11 +347,6 @@ CARPLAY_SOURCES = \ CarPlay/CPNavigationAlert.cs \ CarPlay/CPMessageListItem.cs \ -# Chip - -CHIP_SOURCES = \ - Chip/ChipCompat.cs \ - # ClassKit CLASSKIT_SOURCES = \ @@ -483,6 +478,7 @@ COREFOUNDATION_SOURCES = \ CoreFoundation/CFArray.cs \ CoreFoundation/CFBoolean.cs \ CoreFoundation/CFBundle.cs \ + CoreFoundation/CFComparisonResult.cs \ CoreFoundation/CFData.cs \ CoreFoundation/CFDataBuffer.cs \ CoreFoundation/CFDictionary.cs \ @@ -604,6 +600,9 @@ COREMEDIA_CORE_SOURCES = \ CoreMedia/CMFormatDescription.cs \ CoreMedia/CMSampleBuffer.cs \ CoreMedia/CMSync.cs \ + CoreMedia/CMTag.cs \ + CoreMedia/CMTagCollection.cs \ + CoreMedia/CMTaggedBufferGroup.cs \ CoreMedia/CMTextMarkupAttributes.cs \ CoreMedia/CMTime.cs \ CoreMedia/CoreMedia.cs \ @@ -914,7 +913,6 @@ FOUNDATION_SOURCES = \ Foundation/NSUnit.cs \ Foundation/NSUrl.cs \ Foundation/NSUrlComponents.cs \ - Foundation/NSUrlConnection.cs \ Foundation/NSUrlCredential.cs \ Foundation/NSUrlDownload.cs \ Foundation/NSUrlProtectionSpace.cs \ @@ -1033,14 +1031,6 @@ HOMEKIT_SOURCES = \ HomeKit/HMHome.cs \ HomeKit/HMService.cs \ -# iAd - -IAD_API_SOURCES = \ - iAd/iAd.cs \ - -IAD_SOURCES = \ - iAd/ADCompat.cs \ - # ImageCaptureKit IMAGECAPTURECORE_API_SOURCES = \ ImageCaptureCore/Defs.cs \ @@ -1198,7 +1188,6 @@ MEDIAPLAYER_SOURCES = \ MediaPlayer/MPMediaItem.cs \ MediaPlayer/MPMediaItemArtwork.cs \ MediaPlayer/MPMediaQuery.cs \ - MediaPlayer/MPMoviePlayerController.cs \ MediaPlayer/MPNowPlayingInfoCenter.cs \ MediaPlayer/MPRemoteCommandCenter.cs \ MediaPlayer/MPSkipIntervalCommand.cs \ @@ -1570,11 +1559,6 @@ PRINTCORE_SOURCES = \ # PushToTalk PUSHTOTALK_SOURCES = \ PushToTalk/Compat.cs \ - -# QTKit - -QTKIT_SOURCES = \ - QTKit/QTCompat.cs \ # QuickLook @@ -1795,7 +1779,6 @@ UIKIT_SOURCES = \ UIKit/Compat.cs \ UIKit/NSLayoutManager.cs \ AppKit/NSLayoutManager.cs \ - UIKit/NSTextAttachmentContainer.cs \ UIKit/UIAccessibility.cs \ UIKit/UIAccessibilityCustomAction.cs \ UIKit/UIActionSheet.cs \ @@ -1922,41 +1905,6 @@ VISION_SOURCES = \ WATCHCONNECTIVITY_API_SOURCES = \ WatchConnectivity/WCEnums.cs \ -# WatchKit - -WATCHKIT_API_SOURCES = \ - WatchKit/WKDefs.cs \ - -WATCHKIT_CORE_SOURCES = \ - WatchKit/WKInterfaceController.cs \ - -WATCHKIT_SOURCES = \ - WatchKit/WKAccessibility.cs \ - WatchKit/WKInterfaceDevice.cs \ - WatchKit/iOS/WKAccessibility.cs \ - WatchKit/iOS/WKAccessibilityImageRegion.cs \ - WatchKit/iOS/WKErrorCode.cs \ - WatchKit/iOS/WKImageAnimatable.cs \ - WatchKit/iOS/WKInterfaceButton.cs \ - WatchKit/iOS/WKInterfaceController.cs \ - WatchKit/iOS/WKInterfaceDate.cs \ - WatchKit/iOS/WKInterfaceDevice.cs \ - WatchKit/iOS/WKInterfaceGroup.cs \ - WatchKit/iOS/WKInterfaceImage.cs \ - WatchKit/iOS/WKInterfaceLabel.cs \ - WatchKit/iOS/WKInterfaceMap.cs \ - WatchKit/iOS/WKInterfaceMapPinColor.cs \ - WatchKit/iOS/WKInterfaceObject.cs \ - WatchKit/iOS/WKInterfaceSeparator.cs \ - WatchKit/iOS/WKInterfaceSlider.cs \ - WatchKit/iOS/WKInterfaceSwitch.cs \ - WatchKit/iOS/WKInterfaceTable.cs \ - WatchKit/iOS/WKInterfaceTimer.cs \ - WatchKit/iOS/WKMenuItemIcon.cs \ - WatchKit/iOS/WKTextInputMode.cs \ - WatchKit/iOS/WKUserNotificationInterfaceController.cs \ - WatchKit/iOS/WKUserNotificationInterfaceType.cs \ - # WebKit WEBKIT_API_SOURCES = \ @@ -1989,6 +1937,7 @@ SHARED_CORE_SOURCES = \ MinimumVersions.cs \ MonoPInvokeCallbackAttribute.cs \ ObjCBindings/BindingTypeAttribute.cs \ + ObjCBindings/BindingTypeTag.cs \ ObjCBindings/ExportAttribute.cs \ ObjCBindings/ExportTag.cs \ ObjCBindings/FieldAttribute.cs \ @@ -2129,7 +2078,6 @@ MACOS_FRAMEWORKS = \ BrowserEngineKit \ CallKit \ CFNetwork \ - Chip \ Cinematic \ ClassKit \ CloudKit \ @@ -2138,6 +2086,7 @@ MACOS_FRAMEWORKS = \ CoreAnimation \ CoreAudioKit \ CoreGraphics \ + CoreHaptics \ CoreImage \ CoreLocation \ CoreMotion \ @@ -2198,7 +2147,6 @@ MACOS_FRAMEWORKS = \ PhotosUI \ PrintCore \ PushKit \ - QTKit \ QuartzComposer \ QuickLook \ QuickLookThumbnailing \ @@ -2250,7 +2198,6 @@ IOS_FRAMEWORKS = \ CallKit \ CarPlay \ CFNetwork \ - Chip \ Cinematic \ ClassKit \ CloudKit \ @@ -2343,39 +2290,7 @@ IOS_FRAMEWORKS = \ Vision \ VisionKit \ WatchConnectivity \ - WatchKit \ WebKit \ - iAd \ - -WATCHOS_FRAMEWORKS = \ - $(COMMON_FRAMEWORKS) \ - CallKit \ - Chip \ - ClockKit \ - CloudKit \ - Contacts \ - CoreGraphics \ - CoreLocation \ - CoreMotion \ - CoreText \ - EventKit \ - HealthKit \ - HomeKit \ - ImageIO \ - Intents \ - LocalAuthentication \ - MapKit \ - MediaPlayer \ - MobileCoreServices \ - NearbyInteraction \ - PassKit \ - PushKit \ - SafetyKit \ - Security \ - UIKit XKit \ - UserNotifications \ - WatchConnectivity \ - WatchKit \ TVOS_FRAMEWORKS = \ $(COMMON_FRAMEWORKS) \ @@ -2387,7 +2302,6 @@ TVOS_FRAMEWORKS = \ BackgroundTasks \ BrowserEngineKit \ CFNetwork \ - Chip \ Cinematic \ CloudKit \ CoreAnimation \ @@ -2544,26 +2458,6 @@ MACCATALYST_FRAMEWORKS = \ VisionKit \ WebKit \ -# List frameworks that have been removed in .NET - -# Chip is intentionally removed from .NET because the API -# is not final and it keeps breaking on every new Xcode release. - -DOTNET_REMOVED_IOS_FRAMEWORKS = \ - Chip \ - iAd \ - WatchKit \ - -DOTNET_REMOVED_MACOS_FRAMEWORKS = \ - Chip \ - QTKit \ - -DOTNET_REMOVED_TVOS_FRAMEWORKS = \ - Chip \ - -DOTNET_REMOVED_MACCATALYST_FRAMEWORKS = \ - Chip \ - # # Compute the SOURCES variables. # @@ -2578,11 +2472,6 @@ MACOS_DOTNET_API_SOURCES := $(sort $(foreach framework,$(shell echo $(MACOS_ MACOS_DOTNET_APIS := $(sort $(foreach framework,$(shell echo $(MACOS_FRAMEWORKS) | tr '[:upper:]' '[:lower:]'),$(framework).cs) $(MACOS_DOTNET_API_SOURCES)) MACOS_DOTNET_SOURCES := $(sort $(foreach framework,$(shell echo $(MACOS_FRAMEWORKS) | tr '[:lower:]' '[:upper:]'),$($(framework)_SOURCES)) $(SHARED_SOURCES) $(MACOS_DOTNET_CORE_SOURCES)) -WATCHOS_DOTNET_CORE_SOURCES := $(sort $(foreach framework,$(shell echo $(WATCHOS_FRAMEWORKS) | tr '[:lower:]' '[:upper:]'),$($(framework)_CORE_SOURCES)) $(SHARED_CORE_SOURCES)) -WATCHOS_DOTNET_API_SOURCES := $(sort $(foreach framework,$(shell echo $(WATCHOS_FRAMEWORKS) | tr '[:lower:]' '[:upper:]'),$($(framework)_API_SOURCES)) $(SHARED_API_SOURCES)) -WATCHOS_DOTNET_APIS := $(sort $(foreach framework,$(shell echo $(WATCHOS_FRAMEWORKS) | tr '[:upper:]' '[:lower:]'),$(framework).cs) $(WATCHOS_DOTNET_API_SOURCES)) -WATCHOS_DOTNET_SOURCES := $(sort $(foreach framework,$(shell echo $(WATCHOS_FRAMEWORKS) | tr '[:lower:]' '[:upper:]'),$($(framework)_SOURCES)) $(SHARED_SOURCES) $(WATCHOS_DOTNET_CORE_SOURCES)) - TVOS_DOTNET_CORE_SOURCES := $(sort $(foreach framework,$(shell echo $(TVOS_FRAMEWORKS) | tr '[:lower:]' '[:upper:]'),$($(framework)_CORE_SOURCES)) $(SHARED_CORE_SOURCES)) TVOS_DOTNET_API_SOURCES := $(sort $(foreach framework,$(shell echo $(TVOS_FRAMEWORKS) | tr '[:lower:]' '[:upper:]'),$($(framework)_API_SOURCES)) $(SHARED_API_SOURCES)) TVOS_DOTNET_APIS := $(sort $(foreach framework,$(shell echo $(TVOS_FRAMEWORKS) | tr '[:upper:]' '[:lower:]'),$(framework).cs) $(TVOS_DOTNET_API_SOURCES)) @@ -2603,11 +2492,6 @@ MACOS_API_SOURCES := $(MACOS_DOTNET_API_SOURCES) MACOS_APIS := $(MACOS_DOTNET_APIS) MACOS_SOURCES := $(MACOS_DOTNET_SOURCES) -WATCHOS_CORE_SOURCES := $(WATCHOS_DOTNET_CORE_SOURCES) -WATCHOS_API_SOURCES := $(WATCHOS_DOTNET_API_SOURCES) -WATCHOS_APIS := $(WATCHOS_DOTNET_APIS) -WATCHOS_SOURCES := $(WATCHOS_DOTNET_SOURCES) - TVOS_CORE_SOURCES := $(TVOS_DOTNET_CORE_SOURCES) TVOS_API_SOURCES := $(TVOS_DOTNET_API_SOURCES) TVOS_APIS := $(TVOS_DOTNET_APIS) diff --git a/src/gamecontroller.cs b/src/gamecontroller.cs index 968b9f84cd91..02468c4ce624 100644 --- a/src/gamecontroller.cs +++ b/src/gamecontroller.cs @@ -1074,7 +1074,7 @@ interface GCPhysicalInputProfile { [Export ("mappedPhysicalInputNamesForElementAlias:")] NSSet GetMappedPhysicalInputNames (string elementAlias); - [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("valueDidChangeHandler", ArgumentSemantic.Copy)] Action ValueDidChangeHandler { get; set; } } @@ -1163,31 +1163,31 @@ interface GCInput { [Field ("GCInputButtonShare")] NSString ButtonShare { get; } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("GCInputLeftPaddle")] NSString /* IGCButtonElementName */ LeftPaddle { get; } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("GCInputPedalAccelerator")] NSString /* IGCButtonElementName */ PedalAccelerator { get; } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("GCInputPedalBrake")] NSString /* IGCButtonElementName */ PedalBrake { get; } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("GCInputPedalClutch")] NSString /* IGCButtonElementName */ PedalClutch { get; } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("GCInputRightPaddle")] NSString /* IGCButtonElementName */ RightPaddle { get; } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("GCInputShifter")] NSString /* IGCPhysicalInputElementName */ Shifter { get; } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("GCInputSteeringWheel")] NSString /* IGCAxisElementName */ SteeringWheel { get; } } @@ -2207,7 +2207,7 @@ enum GCInputMicroGamepad { delegate GCVirtualControllerElementConfiguration GCVirtualControllerElementUpdateBlock (GCVirtualControllerElementConfiguration configuration); - [NoTV, NoMac, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface GCVirtualController { @@ -2233,7 +2233,7 @@ interface GCVirtualController { void UpdateConfiguration (string element, GCVirtualControllerElementUpdateBlock configuration); } - [NoTV, NoMac, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface GCVirtualControllerConfiguration { [Export ("elements", ArgumentSemantic.Strong)] @@ -2244,7 +2244,7 @@ interface GCVirtualControllerConfiguration { bool Hidden { [Bind ("isHidden")] get; set; } } - [NoTV, NoMac, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface GCVirtualControllerElementConfiguration { [Export ("hidden")] @@ -2294,12 +2294,12 @@ interface GCProductCategory { [Field ("GCProductCategoryKeyboard")] NSString Keyboard { get; } - [iOS (16, 0), Mac (13, 0), NoWatch, TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] [Field ("GCProductCategoryHID")] NSString GCProductCategoryHid { get; } } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface GCRacingWheel : GCDevice { @@ -2332,7 +2332,7 @@ interface GCRacingWheel : GCDevice { NSString DidDisconnectNotification { get; } } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [BaseType (typeof (GCRacingWheelInputState))] interface GCRacingWheelInput : GCDevicePhysicalInput { // Sealed since GCDevicePhysicalInput.Capture returns IGCDevicePhysicalInputState @@ -2344,7 +2344,7 @@ interface GCRacingWheelInput : GCDevicePhysicalInput { IGCDevicePhysicalInputStateDiff WheelInputNextInputState { get; } } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface GCRacingWheelInputState : GCDevicePhysicalInputState { [Export ("wheel")] @@ -2363,7 +2363,7 @@ interface GCRacingWheelInputState : GCDevicePhysicalInputState { GCGearShifterElement Shifter { get; } } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface GCSteeringWheelElement : GCAxisElement { @@ -2372,7 +2372,7 @@ interface GCSteeringWheelElement : GCAxisElement { } // There are issues with the Generic Types listed here: https://github.com/xamarin/xamarin-macios/issues/15725 - // [iOS (16,0), Mac (13,0), NoWatch, TV (16,0), MacCatalyst (16,0)] + // [iOS (16,0), Mac (13,0), TV (16,0), MacCatalyst (16,0)] // [BaseType (typeof (NSObject))] // [DisableDefaultCtor] // interface GCPhysicalInputElementCollection // : INSFastEnumeration // # no generator support for FastEnumeration - https://bugzilla.xamarin.com/show_bug.cgi?id=4391 @@ -2396,7 +2396,7 @@ interface GCSteeringWheelElement : GCAxisElement { interface IGCDevicePhysicalInputState { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCDevicePhysicalInputState { [Abstract] @@ -2444,7 +2444,7 @@ interface GCDevicePhysicalInputState { interface IGCAxisInput { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCAxisInput { [Abstract] @@ -2474,7 +2474,7 @@ interface GCAxisInput { interface IGCAxisElement { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCAxisElement : GCPhysicalInputElement { [Abstract] @@ -2488,7 +2488,7 @@ interface GCAxisElement : GCPhysicalInputElement { interface IGCButtonElement { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCButtonElement : GCPhysicalInputElement { [Abstract] @@ -2505,7 +2505,7 @@ interface GCButtonElement : GCPhysicalInputElement { interface IGCDevicePhysicalInput { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCDevicePhysicalInput : GCDevicePhysicalInputState { #if !XAMCORE_5_0 @@ -2539,7 +2539,7 @@ interface GCDevicePhysicalInput : GCDevicePhysicalInputState { interface IGCDevicePhysicalInputStateDiff { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCDevicePhysicalInputStateDiff { [Abstract] @@ -2553,7 +2553,7 @@ interface GCDevicePhysicalInputStateDiff { interface IGCDirectionPadElement { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCDirectionPadElement : GCPhysicalInputElement { [Abstract] @@ -2583,7 +2583,7 @@ interface GCDirectionPadElement : GCPhysicalInputElement { interface IGCLinearInput { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCLinearInput { [Abstract] @@ -2613,7 +2613,7 @@ interface GCLinearInput { interface IGCPhysicalInputElement { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCPhysicalInputElement { [Abstract] @@ -2631,7 +2631,7 @@ interface GCPhysicalInputElement { interface IGCPressedStateInput { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCPressedStateInput { [Abstract] @@ -2653,7 +2653,7 @@ interface GCPressedStateInput { interface IGCRelativeInput { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCRelativeInput { [Abstract] @@ -2679,7 +2679,7 @@ interface GCRelativeInput { interface IGCSwitchElement { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCSwitchElement : GCPhysicalInputElement { [Abstract] @@ -2689,7 +2689,7 @@ interface GCSwitchElement : GCPhysicalInputElement { interface IGCSwitchPositionInput { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCSwitchPositionInput { [Abstract] @@ -2723,7 +2723,7 @@ interface GCSwitchPositionInput { interface IGCTouchedStateInput { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Protocol] interface GCTouchedStateInput { [Abstract] @@ -2743,7 +2743,7 @@ interface GCTouchedStateInput { double LastTouchedStateLatency { get; } } - [NoiOS, Mac (13, 0), NoWatch, NoTV, MacCatalyst (16, 0)] + [NoiOS, Mac (13, 0), NoTV, MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface GCGearShifterElement : GCPhysicalInputElement { @@ -2755,13 +2755,13 @@ interface GCGearShifterElement : GCPhysicalInputElement { } [Static] - [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] interface GCControllerUserCustomizations { [Notification, Field ("GCControllerUserCustomizationsDidChangeNotification")] NSString DidChangeNotification { get; } } - [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Native] enum GCUIEventTypes : ulong { None = 0U, @@ -2769,7 +2769,7 @@ enum GCUIEventTypes : ulong { } #if IOS || MACCATALYST - [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface GCEventInteraction : UIInteraction { @@ -2782,7 +2782,7 @@ interface GCEventInteraction : UIInteraction { } #endif // IOS || MACCATALYST - [NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch] + [NoTV, NoMac, iOS (18, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface GCGameControllerActivationContext { @@ -2790,7 +2790,7 @@ interface GCGameControllerActivationContext { string PreviousApplicationBundleId { get; } } - [NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch] + [NoTV, NoMac, iOS (18, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] interface GCGameControllerSceneDelegate { @@ -2799,7 +2799,7 @@ interface GCGameControllerSceneDelegate { void DidActivateGameController (UIScene scene, GCGameControllerActivationContext context); } - [NoTV, NoMac, iOS (18, 0), NoMacCatalyst, NoWatch] + [NoTV, NoMac, iOS (18, 0), NoMacCatalyst] [Category] [BaseType (typeof (UISceneConnectionOptions))] interface UISceneConnectionOptions_GameController { diff --git a/src/gamekit.cs b/src/gamekit.cs index d739cf2d98de..8481c3ce6f1b 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -69,14 +69,6 @@ namespace GameKit { delegate void GKChallengeComposeHandler2 (UIViewController composeController, bool issuedChallenge, [NullAllowed] GKPlayer [] sentPlayers); #endif -#if WATCH - // hacks to let [NoWatch] work properly - interface UIAppearance {} - interface UIViewController {} - interface UINavigationController {} - interface UIWindow {} -#endif - /// Interface representing the required methods (if any) of the protocol . /// /// This interface contains the required methods (if any) from the protocol defined by . @@ -89,7 +81,6 @@ interface IGKVoiceChatClient { } /// /// Apple documentation for GKVoiceChatClient [NoMac] - [NoWatch] // only exposed thru GKVoiceChatService (not in 3.0) [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'GKVoiceChat' instead.")] [MacCatalyst (13, 1)] @@ -126,7 +117,6 @@ interface GKVoiceChatClient { /// /// Apple documentation for GKVoiceChatService [NoMac] - [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [NoTV] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -187,7 +177,6 @@ interface GKVoiceChatService { /// /// Apple documentation for GKSession [NoTV] - [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'MultipeerConnectivity.MCSession' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'MultipeerConnectivity.MCSession' instead.")] @@ -280,7 +269,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("timeScope", ArgumentSemantic.Assign)] GKLeaderboardTimeScope TimeScope { get; set; } @@ -288,7 +276,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("playerScope", ArgumentSemantic.Assign)] GKLeaderboardPlayerScope PlayerScope { get; set; } @@ -296,12 +283,10 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("maxRange", ArgumentSemantic.Assign)] nint MaxRange { get; } - [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'Identifier' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'Identifier' instead.")] @@ -318,7 +303,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("range", ArgumentSemantic.Assign)] NSRange Range { get; set; } @@ -326,7 +310,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("scores", ArgumentSemantic.Retain)] [NullAllowed] @@ -335,7 +318,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("localPlayerScore", ArgumentSemantic.Retain)] [NullAllowed] @@ -344,12 +326,10 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderboards' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderboards' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderboards' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderboards' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadLeaderboards' instead.")] [Export ("init")] NativeHandle Constructor (); - [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [Deprecated (PlatformName.iOS, 8, 0, message: "Use '.ctor (GKPlayer [] players)' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use '.ctor (GKPlayer [] players)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use '.ctor (GKPlayer [] players)' instead.")] @@ -361,14 +341,12 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("loadScoresWithCompletionHandler:")] [Async] void LoadScores ([NullAllowed] GKScoresLoadedHandler scoresLoadedHandler); [NoTV] - [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [Deprecated (PlatformName.iOS, 6, 0, message: "Use 'LoadLeaderboards' instead.")] [Deprecated (PlatformName.MacOSX, 10, 9, message: "Use 'LoadLeaderboards' instead.")] [MacCatalyst (13, 1)] @@ -379,7 +357,6 @@ interface GKLeaderboard { void LoadCategories ([NullAllowed] GKCategoryHandler categoryHandler); [NoTV] - [NoWatch] // deprecated in 2.0 (but framework not added before 3.0) [Static] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'SetDefaultLeaderboard' on 'GKLocalPlayer' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'SetDefaultLeaderboard' on 'GKLocalPlayer' instead.")] @@ -396,7 +373,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadLeaderBoards(string[] leaderboardIDs, GKLeaderboardsHandler completionHandler)' instead.")] [Export ("loadLeaderboardsWithCompletionHandler:")] [Async] @@ -405,7 +381,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [NullAllowed] @@ -413,7 +388,6 @@ interface GKLeaderboard { string Identifier { get; set; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("loadImageWithCompletionHandler:")] [Async] @@ -422,7 +396,6 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("initWithPlayers:")] @@ -431,71 +404,70 @@ interface GKLeaderboard { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadEntries' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadEntries' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadEntries' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadEntries' instead.")] [Export ("loading")] bool IsLoading { [Bind ("isLoading")] get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Async] [Export ("loadLeaderboardsWithIDs:completionHandler:")] void LoadLeaderboards ([NullAllowed] string [] leaderboardIds, GKLeaderboardsHandler completionHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("submitScore:context:player:leaderboardIDs:completionHandler:")] [Async] void SubmitScore (nint score, nuint context, GKPlayer player, string [] leaderboardIds, Action completionHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("baseLeaderboardID", ArgumentSemantic.Strong)] string BaseLeaderboardId { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("duration")] double Duration { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Async (ResultTypeName = "GKEntriesForPlayerScopeResult")] [Export ("loadEntriesForPlayerScope:timeScope:range:completionHandler:")] void LoadEntries (GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope, NSRange range, GKEntriesForPlayerScopeHandler completionHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Async (ResultTypeName = "GKEntriesForPlayersResult")] [Export ("loadEntriesForPlayers:timeScope:completionHandler:")] void LoadEntries (GKPlayer [] players, GKLeaderboardTimeScope timeScope, GKEntriesForPlayersHandler completionHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("loadPreviousOccurrenceWithCompletionHandler:")] [Async] void LoadPreviousOccurrence (GKLeaderboardsHandler completionHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("nextStartDate", ArgumentSemantic.Strong)] NSDate NextStartDate { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("startDate", ArgumentSemantic.Strong)] NSDate StartDate { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("submitScore:context:player:completionHandler:")] [Async] void SubmitScore (nint score, nuint context, GKPlayer player, Action completionHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("type")] GKLeaderboardType Type { get; } @@ -523,20 +495,18 @@ interface GKLeaderboardSet : NSCoding, NSSecureCoding { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LoadLeaderboardsWithCompletionHandler' instead.")] [Export ("loadLeaderboardsWithCompletionHandler:")] [Async] void LoadLeaderboards ([NullAllowed] GKLeaderboardsHandler completionHandler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("loadLeaderboardsWithHandler:")] [Async] void LoadLeaderboardsWithCompletionHandler (GKLeaderboardsHandler handler); [NoTV] - [NoWatch] [Export ("loadImageWithCompletionHandler:")] [Async] void LoadImage ([NullAllowed] GKImageLoadedHandler completionHandler); @@ -547,7 +517,6 @@ interface GKLeaderboardSet : NSCoding, NSSecureCoding { interface GKBasePlayer { [Deprecated (PlatformName.iOS, 13, 0, message: "Use the GKPlayer.TeamPlayerId property to identify a player instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the GKPlayer.TeamPlayerId property to identify a player instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the GKPlayer.TeamPlayerId property to identify a player instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the GKPlayer.TeamPlayerId property to identify a player instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the GKPlayer.TeamPlayerId property to identify a player instead.")] [NullAllowed, Export ("playerID", ArgumentSemantic.Retain)] @@ -557,7 +526,6 @@ interface GKBasePlayer { string DisplayName { get; } } - [NoWatch] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GKPlayer' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GKPlayer' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GKPlayer' instead.")] @@ -586,7 +554,6 @@ interface GKPlayer : NSSecureCoding { string Alias { get; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'GKLocalPlayer.LoadFriendPlayers' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'GKLocalPlayer.LoadFriendPlayers' instead.")] [MacCatalyst (13, 1)] @@ -603,7 +570,6 @@ interface GKPlayer : NSSecureCoding { // This name looks wrong, see the "Notification" at the end. NSString DidChangeNotificationNameNotification { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("loadPhotoForSize:withCompletionHandler:")] [Async] @@ -612,45 +578,40 @@ interface GKPlayer : NSSecureCoding { [Export ("displayName")] string DisplayName { get; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("anonymousGuestPlayerWithIdentifier:")] GKPlayer GetAnonymousGuestPlayer (string guestIdentifier); - [NoWatch] [MacCatalyst (13, 1)] [Export ("guestIdentifier")] [NullAllowed] string GuestIdentifier { get; } - [NoWatch] [TV (12, 4)] [iOS (12, 4)] [MacCatalyst (13, 1)] [Export ("gamePlayerID", ArgumentSemantic.Retain)] string GamePlayerId { get; } - [NoWatch] [TV (12, 4)] [iOS (12, 4)] [MacCatalyst (13, 1)] [Export ("teamPlayerID", ArgumentSemantic.Retain)] string TeamPlayerId { get; } - [NoWatch] [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("scopedIDsArePersistent")] bool ScopedIdsArePersistent { get; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("GKPlayerIDNoLongerAvailable")] NSString IdNoLongerAvailable { get; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("isInvitable")] bool IsInvitable { get; } @@ -659,12 +620,10 @@ interface GKPlayer : NSSecureCoding { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GKLeaderboardEntry' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'GKLeaderboardEntry' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'GKLeaderboardEntry' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'GKLeaderboardEntry' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'GKLeaderboardEntry' instead.")] [BaseType (typeof (NSObject))] interface GKScore : NSSecureCoding { - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'InitWithLeaderboardIdentifier' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'InitWithLeaderboardIdentifier' instead.")] [MacCatalyst (13, 1)] @@ -677,7 +636,6 @@ interface GKScore : NSSecureCoding { [Export ("initWithLeaderboardIdentifier:player:")] NativeHandle Constructor (string identifier, GKPlayer player); - [NoWatch] [Deprecated (PlatformName.iOS, 8, 0, message: "Use the overload that takes a 'GKPlayer' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the overload that takes a 'GKPlayer' instead.")] @@ -707,7 +665,6 @@ interface GKScore : NSSecureCoding { [NullAllowed] string FormattedValue { get; } - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'LeaderboardIdentifier' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'LeaderboardIdentifier' instead.")] @@ -717,7 +674,6 @@ interface GKScore : NSSecureCoding { [Export ("category", ArgumentSemantic.Copy)] string Category { get; set; } - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'ReportScores' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'ReportScores' instead.")] @@ -734,7 +690,6 @@ interface GKScore : NSSecureCoding { bool ShouldSetDefaultLeaderboard { get; set; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ... )' and present the view controller instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ... )' and present the view controller instead.")] [MacCatalyst (13, 1)] @@ -751,13 +706,11 @@ interface GKScore : NSSecureCoding { [Export ("leaderboardIdentifier", ArgumentSemantic.Copy)] string LeaderboardIdentifier { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("reportScores:withEligibleChallenges:withCompletionHandler:"), Static] [Async] void ReportScores (GKScore [] scores, GKChallenge [] challenges, [NullAllowed] Action completionHandler); - [NoWatch] [iOS (14, 0)] [TV (14, 0)] [MacCatalyst (14, 0)] @@ -768,7 +721,6 @@ interface GKScore : NSSecureCoding { [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 8, 0, message: "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ...)' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Pass 'GKPlayers' to 'ChallengeComposeController (GKPlayer [] players, string message, ...)' instead.")] @@ -776,7 +728,6 @@ interface GKScore : NSSecureCoding { [return: NullAllowed] UIViewController ChallengeComposeController ([NullAllowed] string [] playerIDs, [NullAllowed] string message, [NullAllowed] GKChallengeComposeHandler completionHandler); - [NoWatch] [MacCatalyst (13, 1)] [Async (ResultTypeName = "GKChallengeComposeResult")] [Export ("challengeComposeControllerWithMessage:players:completionHandler:")] @@ -789,7 +740,6 @@ interface IGKLeaderboardViewControllerDelegate { } /// A delegate object that allows fine-grained control over events. /// /// Apple documentation for GKLeaderboardViewControllerDelegate - [NoWatch] [NoTV] [NoMacCatalyst] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'GKGameCenterViewController' instead.")] @@ -810,7 +760,6 @@ interface GKLeaderboardViewControllerDelegate { /// /// Apple documentation for GKLeaderboardViewController [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'GKGameCenterViewController' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'GKGameCenterViewController' instead.")] @@ -844,21 +793,20 @@ interface GKLeaderboardViewController : UIAppearance GKLeaderboardTimeScope TimeScope { get; set; } } - [Watch (6, 2), TV (13, 4), iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] delegate void GKFetchItemsForIdentityVerificationSignatureCompletionHandler (NSUrl publicKeyUrl, NSData signature, NSData salt, ulong timestamp, NSError error); [MacCatalyst (13, 1)] [BaseType (typeof (GKPlayer))] interface GKLocalPlayer -#if !TVOS && !WATCH // from GKSavedGame category +#if !TVOS // from GKSavedGame category : GKSavedGameListener #endif { [Export ("authenticated")] bool Authenticated { [Bind ("isAuthenticated")] get; } - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'LoadFriendPlayers' instead and collect the friends from the invoked callback.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'LoadFriendPlayers' instead and collect the friends from the invoked callback.")] @@ -875,7 +823,6 @@ interface GKLocalPlayer bool IsUnderage { get; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 6, 0, message: "Set the 'AuthenticationHandler' instead.")] [Deprecated (PlatformName.MacOSX, 10, 8, message: "Set the 'AuthenticationHandler' instead.")] [MacCatalyst (13, 1)] @@ -890,7 +837,6 @@ interface GKLocalPlayer void LoadRecentPlayers ([NullAllowed] Action completionHandler); [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'LoadRecentPlayers' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'LoadRecentPlayers' instead.")] [MacCatalyst (13, 1)] @@ -906,23 +852,21 @@ interface GKLocalPlayer [NullAllowed] // by default this property is null [Export ("authenticateHandler", ArgumentSemantic.Copy)] [MacCatalyst (13, 1)] -#if WATCH - Action AuthenticateHandler { get; set; } -#elif !MONOMAC +#if !MONOMAC Action AuthenticateHandler { get; set; } #else Action AuthenticateHandler { get; set; } #endif - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("isPresentingFriendRequestViewController")] bool IsPresentingFriendRequestViewController { get; } - [NoWatch, NoTV, NoMac, iOS (15, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (15, 0), NoMacCatalyst] [Export ("presentFriendRequestCreatorFromViewController:error:")] bool PresentFriendRequestCreator (UIViewController viewController, [NullAllowed] out NSError error); - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Export ("presentFriendRequestCreatorFromWindow:error:")] bool PresentFriendRequestCreator ([NullAllowed] NSWindow window, [NullAllowed] out NSError error); @@ -937,7 +881,6 @@ interface GKLocalPlayer void SetDefaultLeaderboardIdentifier (string leaderboardIdentifier, [NullAllowed] Action completionHandler); [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'LoadDefaultLeaderboardIdentifier' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'LoadDefaultLeaderboardIdentifier' instead.")] [MacCatalyst (13, 1)] @@ -947,7 +890,6 @@ interface GKLocalPlayer void LoadDefaultLeaderboardCategoryID ([NullAllowed] Action completionHandler); [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'SetDefaultLeaderboardIdentifier' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'SetDefaultLeaderboardIdentifier' instead.")] [MacCatalyst (13, 1)] @@ -971,14 +913,13 @@ interface GKLocalPlayer [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'FetchItemsForIdentityVerificationSignature' instead.")] [Deprecated (PlatformName.TvOS, 13, 4, message: "Use 'FetchItemsForIdentityVerificationSignature' instead.")] [Deprecated (PlatformName.MacOSX, 10, 15, 4, message: "Use 'FetchItemsForIdentityVerificationSignature' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'FetchItemsForIdentityVerificationSignature' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'FetchItemsForIdentityVerificationSignature' instead.")] [Async (ResultTypeName = "GKIdentityVerificationSignatureResult")] [Export ("generateIdentityVerificationSignatureWithCompletionHandler:")] void GenerateIdentityVerificationSignature ([NullAllowed] GKIdentityVerificationSignatureHandler completionHandler); - [Watch (6, 2), TV (13, 4), iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Async (ResultTypeName = "GKFetchItemsForIdentityVerificationSignature")] [Export ("fetchItemsForIdentityVerificationSignature:")] @@ -993,31 +934,26 @@ interface GKLocalPlayer [Export ("loadFriendPlayersWithCompletionHandler:")] void LoadFriendPlayers ([NullAllowed] Action completionHandler); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("fetchSavedGamesWithCompletionHandler:")] void FetchSavedGames ([NullAllowed] Action handler); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("saveGameData:withName:completionHandler:")] void SaveGameData (NSData data, string name, [NullAllowed] Action handler); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("deleteSavedGamesWithName:completionHandler:")] void DeleteSavedGames (string name, [NullAllowed] Action handler); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("resolveConflictingSavedGames:withData:completionHandler:")] void ResolveConflictingSavedGames (GKSavedGame [] conflictingSavedGames, NSData data, [NullAllowed] Action handler); - [NoWatch] [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -1026,13 +962,11 @@ interface GKLocalPlayer [TV (13, 0)] [iOS (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Export ("loadChallengableFriendsWithCompletionHandler:")] [Async] void LoadChallengeableFriends ([NullAllowed] Action completionHandler); - [NoWatch] [TV (13, 0)] [iOS (13, 0)] [MacCatalyst (13, 1)] @@ -1040,7 +974,6 @@ interface GKLocalPlayer [Export ("local")] GKLocalPlayer Local { get; } - [NoWatch] [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("personalizedCommunicationRestricted")] @@ -1048,19 +981,19 @@ interface GKLocalPlayer // FriendsList Category - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Async] [Export ("loadFriendsAuthorizationStatus:")] void LoadFriendsAuthorizationStatus (Action completionHandler); - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Async] [Export ("loadFriends:")] void LoadFriendsList (Action completionHandler); - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Async] [Export ("loadFriendsWithIdentifiers:completionHandler:")] @@ -1071,7 +1004,6 @@ interface GKLocalPlayer /// /// /// Apple documentation for GKSavedGame - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -1096,7 +1028,6 @@ interface GKSavedGame : NSCopying { /// Application developers override this class to respond to conflicts or player modifications in saved games. /// /// Apple documentation for GKSavedGameListener - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] @@ -1109,7 +1040,6 @@ interface GKSavedGameListener { void HasConflictingSavedGames (GKPlayer player, GKSavedGame [] savedGames); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (GKMatchDelegate) })] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[__NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: 1500388194) @@ -1194,7 +1124,6 @@ interface GKMatch { interface IGKMatchDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -1258,7 +1187,6 @@ interface GKMatchDelegate { [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "No longer supported.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "No longer supported.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "No longer supported.")] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface GKVoiceChat { @@ -1341,7 +1269,6 @@ interface GKMatchRequest { uint PlayerAttributes { get; set; } /* uint32_t */ [NoTV] - [NoWatch] [NullAllowed] // by default this property is null [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'Recipients' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'Recipients' instead.")] @@ -1358,7 +1285,6 @@ interface GKMatchRequest { nint DefaultNumberOfPlayers { get; set; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'RecipientResponseHandler' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'RecipientResponseHandler' instead.")] [MacCatalyst (13, 1)] @@ -1380,7 +1306,6 @@ interface GKMatchRequest { [Export ("recipients", ArgumentSemantic.Retain)] GKPlayer [] Recipients { get; set; } - [NoWatch] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GKMatchmakerViewController.MatchmakingMode' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'GKMatchmakerViewController.MatchmakingMode' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'GKMatchmakerViewController.MatchmakingMode' instead.")] @@ -1391,20 +1316,19 @@ interface GKMatchRequest { [Export ("restrictToAutomatch")] bool RestrictToAutomatch { get; set; } - [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2), Watch (10, 2)] + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [NullAllowed, Export ("queueName")] string QueueName { get; set; } - [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2), Watch (10, 2)] + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [NullAllowed, Export ("properties", ArgumentSemantic.Copy)] NSDictionary Properties { get; set; } - [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2), Watch (10, 2)] + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [NullAllowed, Export ("recipientProperties", ArgumentSemantic.Copy)] NSDictionary> RecipientProperties { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface GKInvite { @@ -1433,7 +1357,6 @@ interface GKInvite { GKPlayer Sender { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface GKMatchmaker { @@ -1482,7 +1405,6 @@ interface GKMatchmaker { [Export ("queryQueueActivity:withCompletionHandler:")] void QueryQueueActivity (string queueName, [NullAllowed] Action completionHandler); - [NoWatch] [MacCatalyst (13, 1)] [Export ("matchForInvite:completionHandler:")] [Async] @@ -1542,7 +1464,6 @@ interface GKMatchmaker { void StopGroupActivity (); } - [NoWatch] [MacCatalyst (13, 1)] #if MONOMAC [BaseType (typeof (NSViewController), Delegates=new string [] { "WeakMatchmakerDelegate" }, Events=new Type [] {typeof(GKMatchmakerViewControllerDelegate)})] @@ -1625,7 +1546,6 @@ interface GKMatchmakerViewController interface IGKMatchmakerViewControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -1733,7 +1653,6 @@ interface GKAchievement : NSSecureCoding { [Export ("reportAchievementWithCompletionHandler:")] [Async] - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use ReportAchievements '(GKAchievement[] achievements, Action completionHandler)' instead.")] @@ -1750,7 +1669,6 @@ interface GKAchievement : NSSecureCoding { void ReportAchievements (GKAchievement [] achievements, [NullAllowed] Action completionHandler); [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Pass 'GKPlayers' to 'ChallengeComposeController(GKPlayer[] players, string message, ...)' and present the view controller instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Pass 'GKPlayers' to 'ChallengeComposeController(GKPlayer[] players, string message, ...)' and present the view controller instead.")] [MacCatalyst (13, 1)] @@ -1759,7 +1677,6 @@ interface GKAchievement : NSSecureCoding { void IssueChallengeToPlayers ([NullAllowed] string [] playerIDs, [NullAllowed] string message); [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 8, 0, message: "Pass 'GKPlayers' to 'SelectChallengeablePlayers' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Pass 'GKPlayers' to 'SelectChallengeablePlayers' instead.")] [MacCatalyst (13, 1)] @@ -1778,7 +1695,6 @@ string PlayerID { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("reportAchievements:withEligibleChallenges:withCompletionHandler:"), Static] [Async] @@ -1793,7 +1709,6 @@ string PlayerID { [Export ("initWithIdentifier:player:")] NativeHandle Constructor ([NullAllowed] string identifier, GKPlayer player); - [NoWatch] [MacCatalyst (13, 1)] [Async (ResultTypeName = "GKChallengeComposeResult")] [Deprecated (PlatformName.iOS, 17, 0)] @@ -1803,12 +1718,11 @@ string PlayerID { [Export ("challengeComposeControllerWithMessage:players:completionHandler:")] UIViewController ChallengeComposeController ([NullAllowed] string message, GKPlayer [] players, [NullAllowed] GKChallengeComposeHandler completionHandler); - [TV (17, 0), iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoWatch] + [TV (17, 0), iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0)] [Export ("challengeComposeControllerWithMessage:players:completion:")] [Async (ResultTypeName = "GKChallengeComposeControllerResult")] UIViewController ChallengeComposeControllerWithMessage ([NullAllowed] string message, GKPlayer [] players, [NullAllowed] GKChallengeComposeHandler2 completionHandler); - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("selectChallengeablePlayers:withCompletionHandler:")] @@ -1816,7 +1730,6 @@ string PlayerID { [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 8, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -1856,7 +1769,6 @@ interface GKAchievementDescription : NSSecureCoding { void LoadAchievementDescriptions ([NullAllowed] GKAchievementDescriptionHandler handler); [MacCatalyst (14, 0)] // the headers lie, not usable until at least Mac Catalyst 14.0 - [NoWatch] [Export ("loadImageWithCompletionHandler:")] [Async] void LoadImage ([NullAllowed] GKImageLoadedHandler imageLoadedHandler); @@ -1881,18 +1793,16 @@ interface GKAchievementDescription : NSSecureCoding { UIImage Image { get; } [MacCatalyst (14, 0)] // the headers lie, not usable until at least Mac Catalyst 14.0 - [NoWatch] [Static] [Export ("incompleteAchievementImage")] UIImage IncompleteAchievementImage { get; } [MacCatalyst (14, 0)] // the headers lie, not usable until at least Mac Catalyst 14.0 - [NoWatch] [Static] [Export ("placeholderCompletedAchievementImage")] UIImage PlaceholderCompletedAchievementImage { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("rarityPercent", ArgumentSemantic.Copy)] [NullAllowed] NSNumber RarityPercent { get; } @@ -1904,7 +1814,6 @@ interface IGKAchievementViewControllerDelegate { } /// A delegate object that allows to respond to lifecycle events. /// /// Apple documentation for GKAchievementViewControllerDelegate - [NoWatch] [NoTV] [NoMacCatalyst] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'GKGameCenterViewController' instead.")] @@ -1925,7 +1834,6 @@ interface GKAchievementViewControllerDelegate { /// /// Apple documentation for GKAchievementViewController [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'GKGameCenterViewController' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'GKGameCenterViewController' instead.")] @@ -1950,7 +1858,6 @@ interface GKAchievementViewController : UIAppearance [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [BaseType (typeof (NSResponder))] interface GKDialogController { @@ -1976,7 +1883,6 @@ interface GKDialogController { [Deprecated (PlatformName.iOS, 10, 0)] [NoMacCatalyst] [NoTV] - [NoWatch] [Deprecated (PlatformName.MacCatalyst, 13, 1)] #if MONOMAC [BaseType (typeof (NSViewController), Events=new Type [] { typeof (GKFriendRequestComposeViewControllerDelegate)}, Delegates=new string[] {"WeakComposeViewDelegate"})] @@ -2026,7 +1932,6 @@ interface IGKFriendRequestComposeViewControllerDelegate { } /// A delegate object that allows fine-grained response to life-cycle events. /// /// Apple documentation for GKFriendRequestComposeViewControllerDelegate - [NoWatch] [NoTV] [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 10, 0)] @@ -2041,7 +1946,6 @@ interface GKFriendRequestComposeViewControllerDelegate { void DidFinish (GKFriendRequestComposeViewController viewController); } - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.iOS, 17, 0, message: "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit.")] [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use UNNotificationRequest or provide custom UI instead. This method will become a no-op in a future version of GameKit.")] @@ -2337,7 +2241,6 @@ interface GKTurnBasedMatch { void SendReminder (GKTurnBasedParticipant [] participants, string localizableMessage, NSObject [] arguments, [NullAllowed] Action completionHandler); [iOS (14, 0)] - [Watch (7, 0)] [TV (14, 0)] [MacCatalyst (14, 0)] [Export ("endMatchInTurnWithMatchData:leaderboardScores:achievements:completionHandler:")] @@ -2345,7 +2248,6 @@ interface GKTurnBasedMatch { void EndMatchInTurn (NSData matchData, GKLeaderboardScore [] scores, NSObject [] achievements, Action completionHandler); } - [NoWatch] [MacCatalyst (13, 1)] // iOS6 -> Objective-C exception thrown. Name: NSInvalidArgumentException Reason: : must use one of the designated initializers [DisableDefaultCtor] @@ -2381,7 +2283,6 @@ interface GKTurnBasedMatchmakerViewController : UIAppearance interface IGKTurnBasedMatchmakerViewControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -2422,7 +2323,6 @@ interface GKTurnBasedMatchmakerViewControllerDelegate { void PlayerQuitForMatch (GKTurnBasedMatchmakerViewController viewController, GKTurnBasedMatch match); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface GKChallenge : NSSecureCoding { @@ -2476,7 +2376,6 @@ interface GKChallenge : NSSecureCoding { GKPlayer ReceivingPlayer { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (GKChallenge))] interface GKScoreChallenge { @@ -2494,7 +2393,6 @@ interface GKScoreChallenge { GKLeaderboardEntry LeaderboardEntry { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (GKChallenge))] interface GKAchievementChallenge { @@ -2507,7 +2405,6 @@ interface GKAchievementChallenge { #if NET [DisableDefaultCtor] // the native 'init' method returned nil. #endif - [NoWatch] [MacCatalyst (13, 1)] [BaseType ( #if MONOMAC @@ -2533,18 +2430,18 @@ interface GKGameCenterViewController [Export ("initWithLeaderboardID:playerScope:timeScope:")] NativeHandle Constructor (string leaderboardId, GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithLeaderboard:playerScope:")] NativeHandle Constructor (GKLeaderboard leaderboard, GKLeaderboardPlayerScope playerScope); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithAchievementID:")] [Internal] NativeHandle _InitWithAchievementId (string achievementId); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithState:")] NativeHandle Constructor (GKGameCenterViewControllerState state); @@ -2600,7 +2497,6 @@ interface GKGameCenterViewController interface IGKGameCenterControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [Model] [BaseType (typeof (NSObject))] @@ -2616,7 +2512,6 @@ interface GKGameCenterControllerDelegate { /// Application developers should not instantiate new instances of this close. Rather, they should use the singleton. /// /// Apple documentation for GKChallengeEventHandler - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Implement the 'IGKChallengeListener' interface and register a listener with 'GKLocalPlayer'.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Implement the 'IGKChallengeListener' interface and register a listener with 'GKLocalPlayer'.")] @@ -2646,7 +2541,6 @@ interface IGKChallengeEventHandlerDelegate { } /// A delegate object that allows the application developer fine-grained response to life-cycle events relating to s, such as receiving or completing a challenge. /// /// Apple documentation for GKChallengeEventHandlerDelegate - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Implement the 'IGKChallengeListener' interface and register a listener with 'GKLocalPlayer'.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Implement the 'IGKChallengeListener' interface and register a listener with 'GKLocalPlayer'.")] @@ -2764,16 +2658,12 @@ interface IGKLocalPlayerListener { } [MacCatalyst (13, 1)] [Model, Protocol, BaseType (typeof (NSObject))] interface GKLocalPlayerListener : GKTurnBasedEventListener -#if !TVOS && !WATCH +#if !TVOS , GKSavedGameListener #endif -#if !WATCH - , GKChallengeListener, GKInviteEventListener -#endif - { + , GKChallengeListener, GKInviteEventListener { } - [NoWatch] [MacCatalyst (13, 1)] [Model, Protocol, BaseType (typeof (NSObject))] interface GKChallengeListener { @@ -2790,7 +2680,6 @@ interface GKChallengeListener { void IssuedChallengeWasCompleted (GKPlayer player, GKChallenge challenge, GKPlayer friendPlayer); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model, BaseType (typeof (NSObject))] interface GKInviteEventListener { @@ -2817,7 +2706,6 @@ interface GKTurnBasedEventListener { #if NET [NoMac] #endif - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'DidRequestMatchWithOtherPlayers' instead.")] [MacCatalyst (13, 1)] @@ -2841,7 +2729,6 @@ interface GKTurnBasedEventListener { [Export ("player:receivedExchangeReplies:forCompletedExchange:forMatch:")] void ReceivedExchangeReplies (GKPlayer player, GKTurnBasedExchangeReply [] replies, GKTurnBasedExchange exchange, GKTurnBasedMatch match); - [NoWatch] [MacCatalyst (13, 1)] [Export ("player:didRequestMatchWithOtherPlayers:")] void DidRequestMatchWithOtherPlayers (GKPlayer player, GKPlayer [] playersToInvite); @@ -2851,7 +2738,6 @@ interface GKTurnBasedEventListener { void WantsToQuitMatch (GKPlayer player, GKTurnBasedMatch match); } - [NoWatch] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GKMatchmakerViewController' (real-time) or 'GKTurnBasedMatchmakerViewController' (turn-based) instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GKMatchmakerViewController' (real-time) or 'GKTurnBasedMatchmakerViewController' (turn-based) instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GKMatchmakerViewController' (real-time) or 'GKTurnBasedMatchmakerViewController' (turn-based) instead.")] @@ -2953,7 +2839,6 @@ interface GKGameSession { interface IGKGameSessionEventListener { } - [NoWatch] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'GKLocalPlayerListener' instead.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GKLocalPlayerListener' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'GKLocalPlayerListener' instead.")] @@ -2981,7 +2866,6 @@ interface GKGameSessionEventListener { } [NoMac] - [NoWatch] [NoiOS] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GKMatchmakerViewController' (real-time) or 'GKTurnBasedMatchmakerViewController' (turn-based) instead.")] [NoMacCatalyst] @@ -3004,7 +2888,6 @@ interface GKGameSessionSharingViewController { interface IGKGameSessionSharingViewControllerDelegate { } [NoMac] - [NoWatch] [NoiOS] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'GKMatchmakerViewControllerDelegate' (real-time) or 'GKTurnBasedMatchmakerViewControllerDelegate' (turn-based) instead.")] [NoMacCatalyst] @@ -3018,7 +2901,7 @@ interface GKGameSessionSharingViewControllerDelegate { interface IGKChallengesViewControllerDelegate { } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [BaseType (typeof (NSObject))] [Protocol, Model] @@ -3029,7 +2912,7 @@ interface GKChallengesViewControllerDelegate { void DidFinish (GKChallengesViewController viewController); } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [Deprecated (PlatformName.MacOSX, 10, 10)] [NoMacCatalyst] [BaseType (typeof (NSViewController))] @@ -3042,7 +2925,7 @@ interface GKChallengesViewController : GKViewController { IGKChallengesViewControllerDelegate ChallengeDelegate { get; set; } } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Protocol] interface GKViewController { @@ -3060,7 +2943,6 @@ interface IGKSessionDelegate { } /// /// Apple documentation for GKSessionDelegate [NoTV] - [NoWatch] // only exposed thru GKSession (not in 3.0) [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'MultipeerConnectivity.MCSessionDelegate' instead.")] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'MultipeerConnectivity.MCSessionDelegate' instead.")] [MacCatalyst (13, 1)] @@ -3084,7 +2966,6 @@ interface GKSessionDelegate { [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface GKAccessPoint { @@ -3124,24 +3005,24 @@ interface GKAccessPoint { [Export ("triggerAccessPointWithState:handler:")] void TriggerAccessPoint (GKGameCenterViewControllerState state, Action handler); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("triggerAccessPointWithAchievementID:handler:")] void TriggerAccessPointWithAchievementId (string achievementId, [NullAllowed] Action handler); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("triggerAccessPointWithLeaderboardSetID:handler:")] void TriggerAccessPointWithLeaderboardSetId (string leaderboardSetId, [NullAllowed] Action handler); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("triggerAccessPointWithLeaderboardID:playerScope:timeScope:handler:")] void TriggerAccessPoint (string leaderboardId, GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope, [NullAllowed] Action handler); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("triggerAccessPointWithPlayer:handler:")] void TriggerAccessPoint (GKPlayer player, [NullAllowed] Action handler); } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -3164,7 +3045,6 @@ interface GKLeaderboardEntry { [Export ("date", ArgumentSemantic.Strong)] NSDate Date { get; } - [NoWatch] // header lists watch as supported, but UIViewController is not available on Watch! [MacCatalyst (13, 1)] [Async (ResultTypeName = "GKChallengeComposeResult")] [Deprecated (PlatformName.iOS, 17, 0)] @@ -3174,13 +3054,13 @@ interface GKLeaderboardEntry { [Export ("challengeComposeControllerWithMessage:players:completionHandler:")] UIViewController ChallengeComposeController ([NullAllowed] string message, [NullAllowed] GKPlayer [] players, [NullAllowed] GKChallengeComposeHandler completionHandler); - [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), Mac (14, 0)] [Export ("challengeComposeControllerWithMessage:players:completion:")] [Async (ResultTypeName = "GKChallengeComposeControllerResult")] UIViewController ChallengeComposeControllerWithMessage ([NullAllowed] string message, [NullAllowed] GKPlayer [] players, [NullAllowed] GKChallengeComposeHandler2 completionHandler); } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] interface GKLeaderboardScore { @@ -3197,7 +3077,7 @@ interface GKLeaderboardScore { string LeaderboardId { get; set; } } - [TV (17, 2), NoWatch, Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] + [TV (17, 2), Mac (14, 2), iOS (17, 2), MacCatalyst (17, 2)] [BaseType (typeof (NSObject))] interface GKMatchedPlayers { diff --git a/src/glkit.cs b/src/glkit.cs index cc59ecd476b4..3b1872076dec 100644 --- a/src/glkit.cs +++ b/src/glkit.cs @@ -539,7 +539,6 @@ interface GLKTextureLoader { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Export ("initWithShareContext:")] NativeHandle Constructor (NSOpenGLContext context); diff --git a/src/healthkit.cs b/src/healthkit.cs index b20f95fe0cda..a6acc3a0510a 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -84,10 +84,8 @@ public enum HKWorkoutSessionState : long { Ended, [NoMacCatalyst] Paused, - [Watch (5, 0)] [NoMacCatalyst] Prepared, - [Watch (5, 0)] [NoMacCatalyst] Stopped, } @@ -102,7 +100,7 @@ public enum HKHeartRateMotionContext : long { Active, } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [Native] public enum HKActivityMoveMode : long { @@ -110,14 +108,14 @@ public enum HKActivityMoveMode : long { AppleMoveTime = 2, } - [Watch (7, 1), iOS (14, 2), Mac (13, 0)] + [iOS (14, 2), Mac (13, 0)] [MacCatalyst (14, 2)] [Native] public enum HKCategoryValueHeadphoneAudioExposureEvent : long { SevenDayLimit = 1, } - [Watch (8, 0), iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [Native] public enum HKAppleWalkingSteadinessClassification : long { @@ -126,7 +124,7 @@ public enum HKAppleWalkingSteadinessClassification : long { VeryLow, } - [Watch (8, 0), iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [Native] public enum HKCategoryValueAppleWalkingSteadinessEvent : long { @@ -136,7 +134,7 @@ public enum HKCategoryValueAppleWalkingSteadinessEvent : long { RepeatVeryLow = 4, } - [Watch (8, 0), iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [Native] public enum HKCategoryValuePregnancyTestResult : long { @@ -145,7 +143,7 @@ public enum HKCategoryValuePregnancyTestResult : long { Indeterminate, } - [Watch (8, 0), iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [Native] public enum HKCategoryValueProgesteroneTestResult : long { @@ -154,7 +152,7 @@ public enum HKCategoryValueProgesteroneTestResult : long { Indeterminate, } - [Watch (8, 5), iOS (15, 4), MacCatalyst (15, 4), Mac (13, 0)] + [iOS (15, 4), MacCatalyst (15, 4), Mac (13, 0)] public enum HKVerifiableClinicalRecordSourceType { [DefaultEnumValue] [Field (null)] @@ -167,7 +165,7 @@ public enum HKVerifiableClinicalRecordSourceType { EuDigitalCovidCertificate, } - [Watch (8, 5), iOS (15, 4), MacCatalyst (15, 4), Mac (13, 0)] + [iOS (15, 4), MacCatalyst (15, 4), Mac (13, 0)] public enum HKVerifiableClinicalRecordCredentialType { [DefaultEnumValue] [Field (null)] @@ -186,7 +184,7 @@ public enum HKVerifiableClinicalRecordCredentialType { Recovery, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] [NativeName ("HKGAD7AssessmentRisk")] public enum HKGad7AssessmentRisk : long { @@ -196,7 +194,7 @@ public enum HKGad7AssessmentRisk : long { Severe, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] [NativeName ("HKGAD7AssessmentAnswer")] public enum HKGad7AssessmentAnswer : long { @@ -206,13 +204,13 @@ public enum HKGad7AssessmentAnswer : long { NearlyEveryDay, } - [Watch (11, 1), MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] + [MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] [Native] public enum HKAudiogramConductionType : long { Air = 0, } - [Watch (11, 1), MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] + [MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] [Native] public enum HKAudiogramSensitivityTestSide : long { Left = 0, @@ -243,7 +241,6 @@ public enum HKAudiogramSensitivityTestSide : long { [DisableDefaultCtor] // NSInvalidArgumentException: The -init method is not available on HKAnchoredObjectQuery interface HKAnchoredObjectQuery { - [NoWatch] #if !NET [Obsolete ("Use the overload that takes HKAnchoredObjectResultHandler2 instead")] #endif @@ -254,7 +251,6 @@ interface HKAnchoredObjectQuery { NativeHandle Constructor (HKSampleType type, [NullAllowed] NSPredicate predicate, nuint anchor, nuint limit, HKAnchoredObjectResultHandler completion); #if !NET - [NoWatch] [Sealed] [Deprecated (PlatformName.iOS, 9, 0)] [Export ("initWithType:predicate:anchor:limit:completionHandler:")] @@ -265,7 +261,7 @@ interface HKAnchoredObjectQuery { [Export ("initWithType:predicate:anchor:limit:resultsHandler:")] NativeHandle Constructor (HKSampleType type, [NullAllowed] NSPredicate predicate, [NullAllowed] HKQueryAnchor anchor, nuint limit, HKAnchoredObjectUpdateHandler handler); - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Export ("initWithQueryDescriptors:anchor:limit:resultsHandler:")] NativeHandle Constructor (HKQueryDescriptor [] queryDescriptors, [NullAllowed] HKQueryAnchor anchor, nint limit, HKAnchoredObjectUpdateHandler resultsHandler); @@ -313,7 +309,6 @@ interface HKPredicateKeyPath { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for the desired distance type.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for the desired distance type.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for the desired distance type.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for the desired distance type.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for the desired distance type.")] [Field ("HKPredicateKeyPathWorkoutTotalDistance")] NSString WorkoutTotalDistance { get; } @@ -321,7 +316,6 @@ interface HKPredicateKeyPath { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.ActiveEnergyBurned.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.ActiveEnergyBurned.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.ActiveEnergyBurned.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.ActiveEnergyBurned.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.ActiveEnergyBurned.")] [Field ("HKPredicateKeyPathWorkoutTotalEnergyBurned")] NSString WorkoutTotalEnergyBurned { get; } @@ -332,7 +326,6 @@ interface HKPredicateKeyPath { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.SwimmingStrokeCount.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.SwimmingStrokeCount.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.SwimmingStrokeCount.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.SwimmingStrokeCount.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.SwimmingStrokeCount.")] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathWorkoutTotalSwimmingStrokeCount")] @@ -369,140 +362,135 @@ interface HKPredicateKeyPath { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.FlightsClimbed.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.FlightsClimbed.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.FlightsClimbed.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.FlightsClimbed.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'HKQuery.GetSumQuantityPredicateForWorkoutActivities' instead, passing the HKQuantityType for HKQuantityTypeIdentifier.FlightsClimbed.")] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathWorkoutTotalFlightsClimbed")] NSString TotalFlightsClimbed { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathSum")] NSString PathSum { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathClinicalRecordFHIRResourceIdentifier")] NSString ClinicalRecordFhirResourceIdentifier { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathClinicalRecordFHIRResourceType")] NSString ClinicalRecordFhirResourceType { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathMin")] NSString Min { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathAverage")] NSString Average { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathMax")] NSString Max { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathMostRecent")] NSString MostRecent { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathMostRecentStartDate")] NSString MostRecentStartDate { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathMostRecentEndDate")] NSString MostRecentEndDate { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathMostRecentDuration")] NSString MostRecentDuration { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKPredicateKeyPathCount")] NSString PathCount { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKPredicateKeyPathAverageHeartRate")] NSString AverageHeartRate { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKPredicateKeyPathECGClassification")] NSString EcgClassification { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKPredicateKeyPathECGSymptomsStatus")] NSString EcgSymptomsStatus { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivityType")] NSString WorkoutActivityType { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivityDuration")] NSString WorkoutActivityDuration { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivityStartDate")] NSString WorkoutActivityStartDate { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivityEndDate")] NSString WorkoutActivityEndDate { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivitySumQuantity")] NSString WorkoutActivitySumQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivityMinimumQuantity")] NSString WorkoutActivityMinimumQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivityMaximumQuantity")] NSString WorkoutActivityMaximumQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivityAverageQuantity")] NSString WorkoutActivityAverageQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutSumQuantity")] NSString WorkoutSumQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutMinimumQuantity")] NSString WorkoutMinimumQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutMaximumQuantity")] NSString WorkoutMaximumQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutAverageQuantity")] NSString WorkoutAverageQuantity { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKPredicateKeyPathWorkoutActivity")] NSString WorkoutActivity { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("HKPredicateKeyPathWorkoutEffortRelationship")] NSString WorkoutEffortRelationship { get; } } - [NoWatch] // headers says it's available but it's only usable from another, unavailable, type [Mac (13, 0)] [MacCatalyst (13, 1)] [Static] @@ -512,7 +500,6 @@ interface HKDetailedCdaErrorKeys { NSString ValidationErrorKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("HKDetailedCdaErrorKeys")] [Internal] @@ -562,7 +549,6 @@ interface HKCategorySample { [Abstract] // as per docs [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKDocumentSample interface HKDocumentSample { - [NoWatch] // HKDocumentType is iOS only, rdar #27865614 [MacCatalyst (13, 1)] [Export ("documentType", ArgumentSemantic.Strong)] HKDocumentType DocumentType { get; } @@ -571,7 +557,7 @@ interface HKDocumentSample { /// Contains the information that is represented in XML in a HealthKit store health document. /// /// Apple documentation for HKCDADocumentSample - [NoWatch, Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKDocumentSample), Name = "HKCDADocumentSample")] [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKCDADocumentSample @@ -579,7 +565,6 @@ interface HKCdaDocumentSample { [NullAllowed, Export ("document")] HKCdaDocument Document { get; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("CDADocumentSampleWithData:startDate:endDate:metadata:validationError:")] @@ -698,7 +683,6 @@ interface HKHealthStore { [Export ("isHealthDataAvailable")] bool IsHealthDataAvailable { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("supportsHealthRecords")] bool SupportsHealthRecords { get; } @@ -754,7 +738,7 @@ interface HKHealthStore { [return: NullAllowed] HKWheelchairUseObject GetWheelchairUse (out NSError error); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("activityMoveModeWithError:")] [return: NullAllowed] @@ -765,7 +749,6 @@ interface HKHealthStore { void StopQuery (HKQuery query); // FIXME NS_EXTENSION_UNAVAILABLE("Not available to extensions") ; - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'GetDateOfBirthComponents' instead.")] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'GetDateOfBirthComponents' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GetDateOfBirthComponents' instead.")] [Export ("dateOfBirthWithError:")] @@ -787,32 +770,27 @@ interface HKHealthStore { [return: NullAllowed] HKBloodTypeObject GetBloodType (out NSError error); - [Watch (8, 0)] [MacCatalyst (13, 1)] [Async] [Export ("enableBackgroundDeliveryForType:frequency:withCompletion:")] void EnableBackgroundDelivery (HKObjectType type, HKUpdateFrequency frequency, Action completion); - [Watch (8, 0)] [MacCatalyst (13, 1)] [Async] [Export ("disableBackgroundDeliveryForType:withCompletion:")] void DisableBackgroundDelivery (HKObjectType type, Action completion); - [Watch (8, 0)] [MacCatalyst (13, 1)] [Async] [Export ("disableAllBackgroundDeliveryWithCompletion:")] void DisableAllBackgroundDelivery (Action completion); // FIXME NS_EXTENSION_UNAVAILABLE("Not available to extensions") ; - [NoWatch] [Async] [MacCatalyst (13, 1)] [Export ("handleAuthorizationForExtensionWithCompletion:")] void HandleAuthorizationForExtension (Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -822,37 +800,31 @@ interface HKHealthStore { // HKWorkout category [Deprecated (PlatformName.iOS, 17, 0, message: "Use 'HKWorkoutBuilder.Add (HKSample [] samples, HKWorkoutBuilderCompletionHandler completionHandler)' instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use 'HKWorkoutBuilder.Add (HKSample [] samples, HKWorkoutBuilderCompletionHandler completionHandler)' instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'HKWorkoutBuilder.Add (HKSample [] samples, HKWorkoutBuilderCompletionHandler completionHandler)' instead.")] [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'HKWorkoutBuilder.Add (HKSample [] samples, HKWorkoutBuilderCompletionHandler completionHandler)' instead.")] [Export ("addSamples:toWorkout:completion:")] void AddSamples (HKSample [] samples, HKWorkout workout, HKStoreSampleAddedCallback callback); [NoiOS] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'HKWorkoutSession.Start' instead.")] [NoMacCatalyst] [Export ("startWorkoutSession:")] void StartWorkoutSession (HKWorkoutSession workoutSession); [NoiOS] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'HKWorkoutSession.End' instead.")] [NoMacCatalyst] [Export ("endWorkoutSession:")] void EndWorkoutSession (HKWorkoutSession workoutSession); [NoiOS] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'HKWorkoutSession.Pause' instead.")] [NoMacCatalyst] [Export ("pauseWorkoutSession:")] void PauseWorkoutSession (HKWorkoutSession workoutSession); [NoiOS] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'HKWorkoutSession.Resume' instead.")] [NoMacCatalyst] [Export ("resumeWorkoutSession:")] void ResumeWorkoutSession (HKWorkoutSession workoutSession); - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("startWatchAppWithWorkoutConfiguration:completion:")] @@ -871,24 +843,23 @@ interface HKHealthStore { NSString UserPreferencesDidChangeNotification { get; } [Async] - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("getRequestStatusForAuthorizationToShareTypes:readTypes:completion:")] void GetRequestStatusForAuthorizationToShare (NSSet typesToShare, NSSet typesToRead, HKHealthStoreGetRequestStatusForAuthorizationToShareHandler completion); [Async] - [Watch (5, 0), NoiOS] + [NoiOS] [NoMacCatalyst] [Export ("recoverActiveWorkoutSessionWithCompletion:")] void RecoverActiveWorkoutSession (HKHealthStoreRecoverActiveWorkoutSessionHandler completion); [Async] - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Export ("recalibrateEstimatesForSampleType:atDate:completion:")] void RecalibrateEstimates (HKSampleType sampleType, NSDate date, Action completion); - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Async] [Export ("requestPerObjectReadAuthorizationForType:predicate:completion:")] void RequestPerObjectReadAuthorization (HKObjectType objectType, [NullAllowed] NSPredicate predicate, HKHealthStoreCompletionHandler completion); @@ -897,11 +868,11 @@ interface HKHealthStore { // xtro says this exists on macOS, introspection disagrees. // Headers doesn't say neither that it's available nor that it's not on macOS, which is probably why xtro picks it up. // Assuming that the lack of unavailability in the headers is a mistake, so remove from macOS. - [iOS (17, 0), NoMac, Watch (10, 0), NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), NoMac, NoTV, MacCatalyst (17, 0)] [Export ("workoutSessionMirroringStartHandler", ArgumentSemantic.Copy)] Action WorkoutSessionMirroringStartHandler { get; set; } - [NoTV, NoWatch, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("authorizationViewControllerPresenter")] UIViewController AuthorizationViewControllerPresenter { get; set; } } @@ -931,7 +902,6 @@ interface HKBloodTypeObject : NSCopying, NSSecureCoding { HKBloodType BloodType { get; } } - [Watch (6, 0)] [iOS (13, 0)] [Mac (13, 0)] [MacCatalyst (13, 1)] @@ -1055,47 +1025,38 @@ interface HKMetadata { [Export ("HeartRateMotionContext")] HKHeartRateMotionContext HeartRateMotionContext { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Export ("AverageSpeed")] HKQuantity AverageSpeed { get; set; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Export ("MaximumSpeed")] HKQuantity MaximumSpeed { get; set; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Export ("AlpineSlopeGrade")] HKQuantity AlpineSlopeGrade { get; set; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Export ("ElevationAscended")] HKQuantity ElevationAscended { get; set; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Export ("ElevationDescended")] HKQuantity ElevationDescended { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("FitnessMachineDuration")] HKQuantity FitnessMachineDuration { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("IndoorBikeDistance")] HKQuantity IndoorBikeDistance { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("CrossTrainerDistance")] HKQuantity CrossTrainerDistance { get; set; } - [Watch (5, 2)] [MacCatalyst (13, 1)] [Export ("HeartRateEventThreshold")] HKQuantity HeartRateEventThreshold { get; set; } @@ -1223,171 +1184,162 @@ interface HKMetadataKey { [Field ("HKMetadataKeyHeartRateMotionContext")] NSString HeartRateMotionContext { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyAverageSpeed")] NSString AverageSpeed { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyMaximumSpeed")] NSString MaximumSpeed { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyAlpineSlopeGrade")] NSString AlpineSlopeGrade { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyElevationAscended")] NSString ElevationAscended { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyElevationDescended")] NSString ElevationDescended { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyFitnessMachineDuration")] NSString FitnessMachineDuration { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyIndoorBikeDistance")] NSString IndoorBikeDistance { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyCrossTrainerDistance")] NSString CrossTrainerDistance { get; } - [Watch (5, 2)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyHeartRateEventThreshold")] NSString HeartRateEventThreshold { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyAverageMETs")] NSString AverageMets { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKMetadataKeyAudioExposureLevel")] NSString AudioExposureLevel { get; } - [Watch (7, 1), iOS (14, 2)] + [iOS (14, 2)] [MacCatalyst (14, 2)] [Field ("HKMetadataKeyAudioExposureDuration")] NSString AudioExposureDuration { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKMetadataKeyDevicePlacementSide")] NSString DevicePlacementSide { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKMetadataKeyBarometricPressure")] NSString BarometricPressure { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKMetadataKeyAppleECGAlgorithmVersion")] NSString AppleEcgAlgorithmVersion { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKMetadataKeyAppleDeviceCalibrated")] NSString AppleDeviceCalibrated { get; } - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("HKMetadataKeyVO2MaxValue")] NSString VO2MaxValue { get; } - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("HKMetadataKeyLowCardioFitnessEventThreshold")] NSString LowCardioFitnessEventThreshold { get; } - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Field ("HKMetadataKeyDateOfEarliestDataUsedForEstimate")] NSString DateOfEarliestDataUsedForEstimate { get; } - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Field ("HKMetadataKeyAlgorithmVersion")] NSString AlgorithmVersion { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeySWOLFScore")] NSString SwolfScore { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyQuantityClampedToLowerBound")] NSString QuantityClampedToLowerBound { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyQuantityClampedToUpperBound")] NSString QuantityClampedToUpperBound { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyGlassesPrescriptionDescription")] NSString GlassesPrescriptionDescription { get; } - [Watch (9, 4), MacCatalyst (16, 4), Mac (13, 3), iOS (16, 4)] + [MacCatalyst (16, 4), Mac (13, 3), iOS (16, 4)] [Field ("HKMetadataKeyHeadphoneGain")] NSString HeadphoneGain { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyHeartRateRecoveryTestType")] NSString HeartRateRecoveryTestType { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyHeartRateRecoveryActivityType")] NSString HeartRateRecoveryActivityType { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyHeartRateRecoveryActivityDuration")] NSString HeartRateRecoveryActivityDuration { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyHeartRateRecoveryMaxObservedRecoveryHeartRate")] NSString HeartRateRecoveryMaxObservedRecoveryHeartRate { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeySessionEstimate")] NSString SessionEstimate { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKMetadataKeyUserMotionContext")] NSString UserMotionContext { get; } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKMetadataKeyActivityType")] NSString KeyActivityType { get; } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKMetadataKeyPhysicalEffortEstimationType")] NSString PhysicalEffortEstimationType { get; } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKMetadataKeyAppleFitnessPlusSession")] NSString AppleFitnessPlusSession { get; } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKMetadataKeyCyclingFunctionalThresholdPowerTestType")] NSString CyclingFunctionalThresholdPowerTestType { get; } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKMetadataKeyMaximumLightIntensity")] NSString MaximumLightIntensity { get; } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKMetadataKeyWaterSalinity")] NSString WaterSalinity { get; } @@ -1445,7 +1397,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { [Export ("identifier")] NSString Identifier { get; } -#if NET || WATCH +#if NET [Internal] #else [Obsolete ("Use 'HKQuantityType.Create (HKQuantityTypeIdentifier)'.")] @@ -1455,7 +1407,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { [return: NullAllowed] HKQuantityType GetQuantityType ([NullAllowed] NSString hkTypeIdentifier); -#if NET || WATCH +#if NET [Internal] #else [Obsolete ("Use 'HKCategoryType.Create (HKCategoryTypeIdentifier)'.")] @@ -1465,7 +1417,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { [return: NullAllowed] HKCategoryType GetCategoryType ([NullAllowed] NSString hkCategoryTypeIdentifier); -#if NET || WATCH +#if NET [Internal] #else [Obsolete ("Use 'HKCharacteristicType.Create (HKCharacteristicTypeIdentifier)'.")] @@ -1475,7 +1427,7 @@ interface HKObjectType : NSSecureCoding, NSCopying { [return: NullAllowed] HKCharacteristicType GetCharacteristicType ([NullAllowed] NSString hkCharacteristicTypeIdentifier); -#if NET || WATCH +#if NET [Internal] #else [Obsolete ("Use 'HKCorrelationType.Create (HKCorrelationTypeIdentifier)'.")] @@ -1484,7 +1436,6 @@ interface HKObjectType : NSSecureCoding, NSCopying { [return: NullAllowed] HKCorrelationType GetCorrelationType ([NullAllowed] NSString hkCorrelationTypeIdentifier); - [NoWatch] // HKDocumentType is iOS only, rdar #27865614 [MacCatalyst (13, 1)] [Internal] [Static] @@ -1511,54 +1462,52 @@ interface HKObjectType : NSSecureCoding, NSCopying { [return: NullAllowed] HKSeriesType GetSeriesType (string identifier); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static, Internal] [Export ("clinicalTypeForIdentifier:")] [return: NullAllowed] HKClinicalType GetClinicalType (NSString identifier); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] [Wrap ("GetClinicalType (identifier.GetConstant ()!)")] [return: NullAllowed] HKClinicalType GetClinicalType (HKClinicalTypeIdentifier identifier); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("audiogramSampleType")] HKAudiogramSampleType AudiogramSampleType { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("electrocardiogramType")] HKElectrocardiogramType ElectrocardiogramType { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("visionPrescriptionType")] HKPrescriptionType VisionPrescriptionType { get; } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Export ("requiresPerObjectAuthorization")] bool RequiresPerObjectAuthorization { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [return: NullAllowed] [Export ("scoredAssessmentTypeForIdentifier:")] HKScoredAssessmentType GetScoredAssessmentType ([BindAs (typeof (HKScoredAssessmentTypeIdentifier))] NSString identifier); [Static] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("stateOfMindType")] HKStateOfMindType StateOfMindType { get; } } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (HKSampleType))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKElectrocardiogram @@ -1586,34 +1535,33 @@ interface HKCharacteristicType { [BaseType (typeof (HKObjectType))] [Abstract] // The HKSampleType class is an abstract subclass of the HKObjectType class, used to represent data samples. Never instantiate an HKSampleType object directly. Instead, you should always work with one of its concrete subclasses [...] interface HKSampleType { - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("isMaximumDurationRestricted")] bool IsMaximumDurationRestricted { get; } - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("maximumAllowedDuration")] double MaximumAllowedDuration { get; } - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("isMinimumDurationRestricted")] bool IsMinimumDurationRestricted { get; } - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("minimumAllowedDuration")] double MinimumAllowedDuration { get; } - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Export ("allowsRecalibrationForEstimates")] bool AllowsRecalibrationForEstimates { get; } } /// A sample type for a clinical record. - [Watch (5, 0)] [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKSampleType))] @@ -1636,7 +1584,6 @@ interface HKCategoryType { /// Contains a constant that identifies the CDA document type. /// /// Apple documentation for HKDocumentType - [NoWatch] // marked as iOS-only (confirmed by Apple) even if some watchOS 3 API returns this type, rdar #27865614 [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKSampleType))] @@ -1661,7 +1608,7 @@ interface HKQuantityType { /// Update handler for objects. delegate void HKObserverQueryUpdateHandler (HKObserverQuery query, [BlockCallback] Action completion, NSError error); - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] delegate void HKObserverQueryDescriptorUpdateHandler (HKObserverQuery query, NSSet samples, [BlockCallback] Action completion, NSError error); @@ -1679,7 +1626,7 @@ interface HKObserverQuery { [Export ("initWithSampleType:predicate:updateHandler:")] NativeHandle Constructor (HKSampleType sampleType, [NullAllowed] NSPredicate predicate, HKObserverQueryUpdateHandler updateHandler); - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Export ("initWithQueryDescriptors:updateHandler:")] NativeHandle Constructor (HKQueryDescriptor [] queryDescriptors, HKObserverQueryDescriptorUpdateHandler updateHandler); @@ -1737,7 +1684,6 @@ interface HKQuantitySample { [Export ("quantitySampleWithType:quantity:startDate:endDate:device:metadata:")] HKQuantitySample FromType (HKQuantityType quantityType, HKQuantity quantity, NSDate startDate, NSDate endDate, [NullAllowed] HKDevice device, [NullAllowed] NSDictionary metadata); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("count")] nint Count { get; } @@ -1755,7 +1701,6 @@ interface HKQuery { [NullAllowed, Export ("objectType", ArgumentSemantic.Strong)] HKObjectType ObjectType { get; } - [Deprecated (PlatformName.WatchOS, 2, 2, message: "Use 'ObjectType' property.")] [Deprecated (PlatformName.iOS, 9, 3, message: "Use 'ObjectType' property.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ObjectType' property.")] [NullAllowed, Export ("sampleType", ArgumentSemantic.Strong)] @@ -1809,7 +1754,7 @@ interface HKQuery { [Export ("predicateForObjectsFromSourceRevisions:")] NSPredicate GetPredicateForObjectsFromSourceRevisions (NSSet sourceRevisions); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("predicateForObjectsAssociatedWithElectrocardiogram:")] @@ -1865,22 +1810,22 @@ interface HKQuery { [Export ("predicateForWorkoutsWithOperatorType:totalFlightsClimbed:")] NSPredicate GetPredicateForTotalFlightsClimbed (NSPredicateOperatorType operatorType, HKQuantity totalFlightsClimbed); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutsWithOperatorType:quantityType:sumQuantity:")] NSPredicate GetSumQuantityPredicateForWorkouts (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity sumQuantity); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutsWithOperatorType:quantityType:minimumQuantity:")] NSPredicate GetMinimumQuantityPredicateForWorkouts (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity minimumQuantity); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutsWithOperatorType:quantityType:maximumQuantity:")] NSPredicate GetMaximumQuantityPredicateForWorkouts (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity maximumQuantity); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutsWithOperatorType:quantityType:averageQuantity:")] NSPredicate GetAverageQuantityPredicateForWorkouts (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity averageQuantity); @@ -1899,25 +1844,21 @@ interface HKQuery { // @interface HKClinicalRecordPredicates (HKQuery) - [NoWatch] [MacCatalyst (13, 1)] [Static, Internal] [Export ("predicateForClinicalRecordsWithFHIRResourceType:")] NSPredicate GetPredicateForClinicalRecords (NSString resourceType); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Wrap ("GetPredicateForClinicalRecords (resourceType.GetConstant ()!)")] NSPredicate GetPredicateForClinicalRecords (HKFhirResourceType resourceType); - [NoWatch] [MacCatalyst (13, 1)] [Static, Internal] [Export ("predicateForClinicalRecordsFromSource:FHIRResourceType:identifier:")] NSPredicate GetPredicateForClinicalRecords (HKSource source, string resourceType, string identifier); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Wrap ("GetPredicateForClinicalRecords (source, resourceType.GetConstant (), identifier)")] @@ -1925,95 +1866,95 @@ interface HKQuery { // @interface HKElectrocardiogramPredicates (HKQuery) - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("predicateForElectrocardiogramsWithClassification:")] NSPredicate GetPredicateForElectrocardiograms (HKElectrocardiogramClassification classification); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("predicateForElectrocardiogramsWithSymptomsStatus:")] NSPredicate GetPredicateForElectrocardiograms (HKElectrocardiogramSymptomsStatus symptomsStatus); // @interface HKVerifiableClinicalRecordPredicates (HKQuery) - [iOS (15, 0), Watch (8, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("predicateForVerifiableClinicalRecordsWithRelevantDateWithinDateInterval:")] NSPredicate GetPredicateForVerifiableClinicalRecords (NSDateInterval dateInterval); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForCategorySamplesEqualToValues:")] NSPredicate GetPredicateForCategorySamples (NSSet values); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutActivitiesWithWorkoutActivityType:")] NSPredicate GetPredicateForWorkoutActivities (HKWorkoutActivityType workoutActivityType); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutActivitiesWithOperatorType:duration:")] NSPredicate GetPredicateForWorkoutActivities (NSPredicateOperatorType operatorType, double duration); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutActivitiesWithStartDate:endDate:options:")] NSPredicate GetPredicateForWorkoutActivities ([NullAllowed] NSDate startDate, [NullAllowed] NSDate endDate, HKQueryOptions options); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutActivitiesWithOperatorType:quantityType:sumQuantity:")] NSPredicate GetSumQuantityPredicateForWorkoutActivities (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity sumQuantity); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutActivitiesWithOperatorType:quantityType:minimumQuantity:")] NSPredicate GetMinimumQuantityPredicateForWorkoutActivities (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity minimumQuantity); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutActivitiesWithOperatorType:quantityType:maximumQuantity:")] NSPredicate GetMaximumQuantityPredicateForWorkoutActivities (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity maximumQuantity); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutActivitiesWithOperatorType:quantityType:averageQuantity:")] NSPredicate GetAverageQuantityPredicateForWorkoutActivities (NSPredicateOperatorType operatorType, HKQuantityType quantityType, HKQuantity averageQuantity); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("predicateForWorkoutsWithActivityPredicate:")] NSPredicate GetPredicateForWorkouts (NSPredicate activityPredicate); [Static] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("predicateForWorkoutEffortSamplesRelatedToWorkout:activity:")] NSPredicate GetPredicateForWorkoutEffortSamplesRelatedToWorkout (HKWorkout workout, [NullAllowed] HKWorkoutActivity activity); // Category HKQuery (HKStateOfMind) [Static] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("predicateForStatesOfMindWithValence:operatorType:")] NSPredicate GetPredicateForStatesOfMind (double valence, NSPredicateOperatorType operatorType); // Category HKQuery (HKStateOfMind) [Static] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("predicateForStatesOfMindWithKind:")] NSPredicate GetPredicateForStatesOfMind (HKStateOfMindKind kind); // Category HKQuery (HKStateOfMind) - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("predicateForStatesOfMindWithLabel:")] NSPredicate GetPredicateForStatesOfMind (HKStateOfMindLabel label); // Category HKQuery (HKStateOfMind) - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("predicateForStatesOfMindWithAssociation:")] NSPredicate GetPredicateForStatesOfMind (HKStateOfMindAssociation association); @@ -2048,7 +1989,7 @@ interface HKSample { [Field ("HKSampleSortIdentifierEndDate")] NSString SortIdentifierEndDate { get; } - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Export ("hasUndeterminedDuration")] bool HasUndeterminedDuration { get; } @@ -2075,12 +2016,12 @@ interface HKSampleQuery { [Export ("initWithSampleType:predicate:limit:sortDescriptors:resultsHandler:")] NativeHandle Constructor (HKSampleType sampleType, [NullAllowed] NSPredicate predicate, nuint limit, [NullAllowed] NSSortDescriptor [] sortDescriptors, HKSampleQueryResultsHandler resultsHandler); - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Export ("initWithQueryDescriptors:limit:resultsHandler:")] NativeHandle Constructor (HKQueryDescriptor [] queryDescriptors, nint limit, HKSampleQueryResultsHandler resultsHandler); - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Export ("initWithQueryDescriptors:limit:sortDescriptors:resultsHandler:")] NativeHandle Constructor (HKQueryDescriptor [] queryDescriptors, nint limit, NSSortDescriptor [] sortDescriptors, HKSampleQueryResultsHandler resultsHandler); @@ -2174,34 +2115,30 @@ interface HKStatistics : NSSecureCoding, NSCopying { [return: NullAllowed] HKQuantity SumQuantity (); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("mostRecentQuantityForSource:")] [return: NullAllowed] HKQuantity GetMostRecentQuantity (HKSource source); - [Watch (5, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("mostRecentQuantity")] HKQuantity MostRecentQuantity { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("mostRecentQuantityDateIntervalForSource:")] [return: NullAllowed] NSDateInterval GetMostRecentQuantityDateInterval (HKSource source); - [Watch (5, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("mostRecentQuantityDateInterval")] NSDateInterval MostRecentQuantityDateInterval { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("duration")] HKQuantity Duration { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("durationForSource:")] [return: NullAllowed] @@ -2526,7 +2463,6 @@ enum HKQuantityTypeIdentifier { [Field ("HKQuantityTypeIdentifierVO2Max")] VO2Max, - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("HKQuantityTypeIdentifierDistanceDownhillSnowSports")] DistanceDownhillSnowSports, @@ -2547,177 +2483,176 @@ enum HKQuantityTypeIdentifier { [Field ("HKQuantityTypeIdentifierHeartRateVariabilitySDNN")] HeartRateVariabilitySdnn, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKQuantityTypeIdentifierAppleStandTime")] AppleStandTime, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKQuantityTypeIdentifierEnvironmentalAudioExposure")] EnvironmentalAudioExposure, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKQuantityTypeIdentifierHeadphoneAudioExposure")] HeadphoneAudioExposure, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKQuantityTypeIdentifierSixMinuteWalkTestDistance")] SixMinuteWalkTestDistance, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKQuantityTypeIdentifierStairAscentSpeed")] StairAscentSpeed, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKQuantityTypeIdentifierStairDescentSpeed")] StairDescentSpeed, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKQuantityTypeIdentifierWalkingAsymmetryPercentage")] WalkingAsymmetryPercentage, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKQuantityTypeIdentifierWalkingDoubleSupportPercentage")] WalkingDoubleSupportPercentage, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKQuantityTypeIdentifierWalkingSpeed")] WalkingSpeed, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKQuantityTypeIdentifierWalkingStepLength")] WalkingStepLength, - [Watch (7, 4)] [iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("HKQuantityTypeIdentifierAppleMoveTime")] AppleMoveTime, - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Field ("HKQuantityTypeIdentifierAppleWalkingSteadiness")] AppleWalkingSteadiness, - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Field ("HKQuantityTypeIdentifierNumberOfAlcoholicBeverages")] NumberOfAlcoholicBeverages, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKQuantityTypeIdentifierHeartRateRecoveryOneMinute")] HeartRateRecoveryOneMinute, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKQuantityTypeIdentifierRunningGroundContactTime")] RunningGroundContactTime, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKQuantityTypeIdentifierRunningStrideLength")] RunningStrideLength, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKQuantityTypeIdentifierRunningVerticalOscillation")] RunningVerticalOscillation, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKQuantityTypeIdentifierRunningPower")] RunningPower, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKQuantityTypeIdentifierRunningSpeed")] RunningSpeed, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Field ("HKQuantityTypeIdentifierAtrialFibrillationBurden")] AtrialFibrillationBurden, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKQuantityTypeIdentifierAppleSleepingWristTemperature")] AppleSleepingWristTemperature, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKQuantityTypeIdentifierUnderwaterDepth")] UnderwaterDepth, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKQuantityTypeIdentifierWaterTemperature")] WaterTemperature, - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKQuantityTypeIdentifierCyclingCadence")] CyclingCadence, - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKQuantityTypeIdentifierCyclingFunctionalThresholdPower")] CyclingFunctionalThresholdPower, - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKQuantityTypeIdentifierCyclingPower")] CyclingPower, - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKQuantityTypeIdentifierCyclingSpeed")] CyclingSpeed, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKQuantityTypeIdentifierEnvironmentalSoundReduction")] EnvironmentalSoundReduction, - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKQuantityTypeIdentifierPhysicalEffort")] PhysicalEffort, - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("HKQuantityTypeIdentifierTimeInDaylight")] TimeInDaylight, - [Watch (11, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("HKQuantityTypeIdentifierWorkoutEffortScore")] WorkoutEffortScore, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierCrossCountrySkiingSpeed")] CrossCountrySkiingSpeed, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierDistanceCrossCountrySkiing")] DistanceCrossCountrySkiing, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierDistancePaddleSports")] DistancePaddleSports, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierDistanceRowing")] DistanceRowing, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierDistanceSkatingSports")] DistanceSkatingSports, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierEstimatedWorkoutEffortScore")] EstimatedWorkoutEffortScore, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierPaddleSportsSpeed")] PaddleSportsSpeed, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierRowingSpeed")] RowingSpeed, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKQuantityTypeIdentifierAppleSleepingBreathingDisturbances")] AppleSleepingBreathingDisturbances, } @@ -2733,13 +2668,13 @@ enum HKCorrelationTypeIdentifier { Food, } - [Watch (6, 0), iOS (13, 0), Mac (13, 0)] + [iOS (13, 0), Mac (13, 0)] [MacCatalyst (13, 1)] enum HKDataTypeIdentifier { [Field ("HKDataTypeIdentifierHeartbeatSeries")] HeartbeatSeries, - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("HKDataTypeIdentifierStateOfMind")] StateOfMind, } @@ -2779,301 +2714,298 @@ enum HKCategoryTypeIdentifier { [Field ("HKCategoryTypeIdentifierMindfulSession")] MindfulSession, - [Watch (5, 2)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierHighHeartRateEvent")] HighHeartRateEvent, - [Watch (5, 2)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierLowHeartRateEvent")] LowHeartRateEvent, - [Watch (5, 2)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierIrregularHeartRhythmEvent")] IrregularHeartRhythmEvent, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierAudioExposureEvent")] AudioExposureEvent, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierToothbrushingEvent")] ToothbrushingEvent, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierAbdominalCramps")] AbdominalCramps, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierAcne")] Acne, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierAppetiteChanges")] AppetiteChanges, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierGeneralizedBodyAche")] GeneralizedBodyAche, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierBloating")] Bloating, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierBreastPain")] BreastPain, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierChestTightnessOrPain")] ChestTightnessOrPain, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierChills")] Chills, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierConstipation")] Constipation, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierCoughing")] Coughing, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierDiarrhea")] Diarrhea, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierDizziness")] Dizziness, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierFainting")] Fainting, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierFatigue")] Fatigue, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierFever")] Fever, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierHeadache")] Headache, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierHeartburn")] Heartburn, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierHotFlashes")] HotFlashes, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierLowerBackPain")] LowerBackPain, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierLossOfSmell")] LossOfSmell, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierLossOfTaste")] LossOfTaste, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierMoodChanges")] MoodChanges, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierNausea")] Nausea, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierPelvicPain")] PelvicPain, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierRapidPoundingOrFlutteringHeartbeat")] RapidPoundingOrFlutteringHeartbeat, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierRunnyNose")] RunnyNose, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierShortnessOfBreath")] ShortnessOfBreath, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierSinusCongestion")] SinusCongestion, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierSkippedHeartbeat")] SkippedHeartbeat, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierSleepChanges")] SleepChanges, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierSoreThroat")] SoreThroat, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierVomiting")] Vomiting, - [Watch (7, 0), iOS (13, 6)] + [iOS (13, 6)] [MacCatalyst (13, 1)] [Field ("HKCategoryTypeIdentifierWheezing")] Wheezing, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierBladderIncontinence")] BladderIncontinence, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierDrySkin")] DrySkin, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierHairLoss")] HairLoss, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierVaginalDryness")] VaginalDryness, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierMemoryLapse")] MemoryLapse, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierNightSweats")] NightSweats, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent")] EnvironmentalAudioExposureEvent, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCategoryTypeIdentifierHandwashingEvent")] HandwashingEvent, - [Watch (7, 1), iOS (14, 2)] + [iOS (14, 2)] [MacCatalyst (14, 2)] [Field ("HKCategoryTypeIdentifierHeadphoneAudioExposureEvent")] HeadphoneAudioExposureEvent, - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("HKCategoryTypeIdentifierPregnancy")] Pregnancy, - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("HKCategoryTypeIdentifierLactation")] Lactation, - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("HKCategoryTypeIdentifierContraceptive")] Contraceptive, - [Watch (7, 2), iOS (14, 3)] + [iOS (14, 3)] [MacCatalyst (14, 3)] [Field ("HKCategoryTypeIdentifierLowCardioFitnessEvent")] LowCardioFitnessEvent, - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Field ("HKCategoryTypeIdentifierAppleWalkingSteadinessEvent")] AppleWalkingSteadinessEvent, - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Field ("HKCategoryTypeIdentifierPregnancyTestResult")] PregnancyTestResult, - [Watch (8, 0), iOS (15, 0)] + [iOS (15, 0)] [MacCatalyst (15, 0)] [Field ("HKCategoryTypeIdentifierProgesteroneTestResult")] ProgesteroneTestResult, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKCategoryTypeIdentifierInfrequentMenstrualCycles")] InfrequentMenstrualCycles, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKCategoryTypeIdentifierIrregularMenstrualCycles")] IrregularMenstrualCycles, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKCategoryTypeIdentifierPersistentIntermenstrualBleeding")] PersistentIntermenstrualBleeding, - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0)] [Field ("HKCategoryTypeIdentifierProlongedMenstrualPeriods")] ProlongedMenstrualPeriods, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKCategoryTypeIdentifierBleedingAfterPregnancy")] BleedingAfterPregnancy, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKCategoryTypeIdentifierBleedingDuringPregnancy")] BleedingDuringPregnancy, - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [Field ("HKCategoryTypeIdentifierSleepApneaEvent")] SleepApneaEvent, } @@ -3099,7 +3031,7 @@ enum HKCharacteristicTypeIdentifier { [Field ("HKCharacteristicTypeIdentifierWheelchairUse")] WheelchairUse, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("HKCharacteristicTypeIdentifierActivityMoveMode")] ActivityMoveMode, @@ -3258,7 +3190,7 @@ interface HKUnit : NSCopying, NSSecureCoding { [Export ("atmosphereUnit")] HKUnit Atmosphere { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("inchesOfMercuryUnit")] @@ -3297,7 +3229,6 @@ interface HKUnit : NSCopying, NSSecureCoding { HKUnit Joule { get; } [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SmallCalorie' or 'LargeCalorie' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SmallCalorie' or 'LargeCalorie' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SmallCalorie' or 'LargeCalorie' instead.")] [Static] [Export ("calorieUnit")] @@ -3372,14 +3303,14 @@ interface HKUnit : NSCopying, NSSecureCoding { HKUnit InternationalUnit { get; } // HKUnit (DecibelAWeightedSoundPressureLevel) Category - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("decibelAWeightedSoundPressureLevelUnit")] HKUnit DecibelAWeightedSoundPressureLevelUnit { get; } // HKUnit (HearingSensitivity) Category - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("decibelHearingLevelUnit")] @@ -3387,13 +3318,13 @@ interface HKUnit : NSCopying, NSSecureCoding { // HKUnit (Frequency) Category - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("hertzUnitWithMetricPrefix:")] HKUnit GetHertzUnit (HKMetricPrefix prefix); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("hertzUnit")] @@ -3401,65 +3332,65 @@ interface HKUnit : NSCopying, NSSecureCoding { // HKUnit (ElectricPotentialDifference) Category - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("voltUnitWithMetricPrefix:")] HKUnit GetVolt (HKMetricPrefix prefix); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("voltUnit")] HKUnit Volt { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("diopterUnit")] HKUnit Diopter { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("prismDiopterUnit")] HKUnit PrismDiopter { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("wattUnitWithMetricPrefix:")] HKUnit CreateWatt (HKMetricPrefix prefix); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("wattUnit")] HKUnit Watt { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("radianAngleUnitWithMetricPrefix:")] HKUnit CreateRadianAngle (HKMetricPrefix prefix); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("radianAngleUnit")] HKUnit RadianAngle { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Static] [Export ("degreeAngleUnit")] HKUnit DegreeAngle { get; } - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0), NoTV] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0), NoTV] [Static] [Export ("luxUnitWithMetricPrefix:")] HKUnit CreateLux (HKMetricPrefix prefix); - [Watch (10, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0), NoTV] + [MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0), NoTV] [Static] [Export ("luxUnit")] HKUnit Lux { get; } // HKUnit (UnitLess) - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("appleEffortScoreUnit")] HKUnit AppleEffortScoreUnit { get; } @@ -3585,15 +3516,15 @@ interface HKWorkout { [NullAllowed, Export ("totalFlightsClimbed", ArgumentSemantic.Strong)] HKQuantity TotalFlightsClimbed { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("workoutActivities", ArgumentSemantic.Copy)] HKWorkoutActivity [] WorkoutActivities { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("allStatistics", ArgumentSemantic.Copy)] NSDictionary AllStatistics { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("statisticsForType:")] [return: NullAllowed] HKStatistics GetStatistics (HKQuantityType quantityType); @@ -3611,7 +3542,6 @@ interface HKWorkoutEvent : NSSecureCoding, NSCopying { HKWorkoutEventType Type { get; } [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'DateInterval' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'DateInterval' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'DateInterval' instead.")] [Export ("date", ArgumentSemantic.Copy)] NSDate Date { get; } @@ -3625,13 +3555,11 @@ interface HKWorkoutEvent : NSSecureCoding, NSCopying { HKMetadata Metadata { get; } [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [Static, Export ("workoutEventWithType:date:")] HKWorkoutEvent Create (HKWorkoutEventType type, NSDate date); [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [Static] @@ -3640,7 +3568,6 @@ interface HKWorkoutEvent : NSSecureCoding, NSCopying { HKWorkoutEvent Create (HKWorkoutEventType type, NSDate date, NSDictionary metadata); [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")] [Static] @@ -3738,7 +3665,7 @@ interface HKDevice : NSSecureCoding, NSCopying { /// Queries for documents in the HealthKit store. /// /// Apple documentation for HKDocumentQuery - [NoWatch, Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKQuery))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKDocumentQuery @@ -3878,11 +3805,9 @@ interface HKQueryAnchor : NSSecureCoding, NSCopying { [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKWorkoutSession : NSSecureCoding { - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'WorkoutConfiguration' instead.")] [Export ("activityType")] HKWorkoutActivityType ActivityType { get; } - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'WorkoutConfiguration' instead.")] [Export ("locationType")] HKWorkoutSessionLocationType LocationType { get; } @@ -3907,79 +3832,69 @@ interface HKWorkoutSession : NSSecureCoding { [NoiOS] [NoMacCatalyst] - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use HKWorkoutSession (HKHealthStore, HKWorkoutConfiguration, out NSError) instead.")] [Export ("initWithActivityType:locationType:")] NativeHandle Constructor (HKWorkoutActivityType activityType, HKWorkoutSessionLocationType locationType); [NoiOS] [NoMacCatalyst] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use HKWorkoutSession (HKHealthStore, HKWorkoutConfiguration, out NSError) instead.")] [Export ("initWithConfiguration:error:")] NativeHandle Constructor (HKWorkoutConfiguration workoutConfiguration, out NSError error); [NoiOS] - [Watch (5, 0)] [NoMacCatalyst] [Export ("initWithHealthStore:configuration:error:")] NativeHandle Constructor (HKHealthStore healthStore, HKWorkoutConfiguration workoutConfiguration, [NullAllowed] out NSError error); - [Watch (5, 0)] [Export ("prepare")] void Prepare (); - [Watch (5, 0)] [Export ("startActivityWithDate:")] void StartActivity ([NullAllowed] NSDate date); - [Watch (5, 0)] [Export ("stopActivityWithDate:")] void StopActivity ([NullAllowed] NSDate date); - [Watch (5, 0)] [Export ("end")] void End (); - [Watch (5, 0)] [Export ("pause")] void Pause (); - [Watch (5, 0)] [Export ("resume")] void Resume (); [NoiOS] - [Watch (5, 0)] [NoMacCatalyst] [Export ("associatedWorkoutBuilder")] HKLiveWorkoutBuilder AssociatedWorkoutBuilder { get; } - [Watch (9, 0), NoTV] + [NoTV] [Export ("beginNewActivityWithConfiguration:date:metadata:")] void BeginNewActivity (HKWorkoutConfiguration workoutConfiguration, NSDate date, [NullAllowed] NSDictionary metadata); - [Watch (9, 0), NoTV] + [NoTV] [Export ("endCurrentActivityOnDate:")] void EndCurrentActivity (NSDate date); - [Watch (9, 0), NoTV] + [NoTV] [Export ("currentActivity", ArgumentSemantic.Copy)] HKWorkoutActivity CurrentActivity { get; } - [Watch (10, 0), NoTV, Mac (14, 0)] + [NoTV, Mac (14, 0)] [Export ("type")] HKWorkoutSessionType Type { get; } - [Watch (10, 0), NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] + [NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] [Export ("sendDataToRemoteWorkoutSession:completion:")] [Async] void SendDataToRemoteWorkoutSession (NSData data, Action completion); - [Watch (10, 0), NoTV, NoMacCatalyst, NoMac, NoiOS] + [NoTV, NoMacCatalyst, NoMac, NoiOS] [Export ("startMirroringToCompanionDeviceWithCompletion:")] [Async] void StartMirroringToCompanionDevice (Action completion); - [Watch (10, 0), NoTV, NoMacCatalyst, NoMac, NoiOS] + [NoTV, NoMacCatalyst, NoMac, NoiOS] [Export ("stopMirroringToCompanionDeviceWithCompletion:")] [Async] void StopMirroringToCompanionDevice (Action completion); @@ -4005,19 +3920,19 @@ interface HKWorkoutSessionDelegate { [Export ("workoutSession:didGenerateEvent:")] void DidGenerateEvent (HKWorkoutSession workoutSession, HKWorkoutEvent @event); - [Watch (9, 0), NoTV, Mac (13, 0)] + [NoTV, Mac (13, 0)] [Export ("workoutSession:didBeginActivityWithConfiguration:date:")] void DidBeginActivity (HKWorkoutSession workoutSession, HKWorkoutConfiguration workoutConfiguration, NSDate date); - [Watch (9, 0), NoTV, Mac (13, 0)] + [NoTV, Mac (13, 0)] [Export ("workoutSession:didEndActivityWithConfiguration:date:")] void DidEndActivity (HKWorkoutSession workoutSession, HKWorkoutConfiguration workoutConfiguration, NSDate date); - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0), NoTV, Mac (14, 0)] + [iOS (17, 0), MacCatalyst (17, 0), NoTV, Mac (14, 0)] [Export ("workoutSession:didReceiveDataFromRemoteWorkoutSession:")] void DidReceiveData (HKWorkoutSession workoutSession, NSData [] data); - [Watch (10, 0), iOS (17, 0), MacCatalyst (17, 0), NoTV, Mac (14, 0)] + [iOS (17, 0), MacCatalyst (17, 0), NoTV, Mac (14, 0)] [Export ("workoutSession:didDisconnectFromRemoteDeviceWithError:")] void DidDisconnect (HKWorkoutSession workoutSession, [NullAllowed] NSError error); } @@ -4032,7 +3947,7 @@ interface HKActivitySummary : NSSecureCoding, NSCopying { [Export ("dateComponentsForCalendar:")] NSDateComponents DateComponentsForCalendar (NSCalendar calendar); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("activityMoveMode", ArgumentSemantic.Assign)] HKActivityMoveMode ActivityMoveMode { get; set; } @@ -4040,7 +3955,7 @@ interface HKActivitySummary : NSSecureCoding, NSCopying { [Export ("activeEnergyBurned", ArgumentSemantic.Strong)] HKQuantity ActiveEnergyBurned { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("appleMoveTime", ArgumentSemantic.Strong)] HKQuantity AppleMoveTime { get; set; } @@ -4054,7 +3969,7 @@ interface HKActivitySummary : NSSecureCoding, NSCopying { [Export ("activeEnergyBurnedGoal", ArgumentSemantic.Strong)] HKQuantity ActiveEnergyBurnedGoal { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("appleMoveTimeGoal", ArgumentSemantic.Strong)] HKQuantity AppleMoveTimeGoal { get; set; } @@ -4071,15 +3986,15 @@ interface HKActivitySummary : NSSecureCoding, NSCopying { [Export ("appleStandHoursGoal", ArgumentSemantic.Strong)] HKQuantity AppleStandHoursGoal { get; set; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [NullAllowed, Export ("exerciseTimeGoal", ArgumentSemantic.Strong)] HKQuantity ExerciseTimeGoal { get; set; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [NullAllowed, Export ("standHoursGoal", ArgumentSemantic.Strong)] HKQuantity StandHoursGoal { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("paused", ArgumentSemantic.Assign)] bool Paused { [Bind ("isPaused")] get; set; } @@ -4140,7 +4055,7 @@ interface HKSeriesType { [Export ("workoutRouteType")] HKSeriesType WorkoutRouteType { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("heartbeatSeriesType")] @@ -4201,13 +4116,11 @@ interface HKWorkoutRouteBuilder { [Async, Wrap ("FinishRoute (workout, metadata.GetDictionary (), completion)")] void FinishRoute (HKWorkout workout, HKMetadata metadata, Action completion); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Async, Protected] [Export ("addMetadata:completion:")] void AddMetadata (NSDictionary metadata, HKWorkoutRouteBuilderAddMetadataHandler completion); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Async, Wrap ("AddMetadata (metadata.GetDictionary ()!, completion)")] void AddMetadata (HKMetadata metadata, HKWorkoutRouteBuilderAddMetadataHandler completion); @@ -4222,7 +4135,7 @@ interface HKWorkoutRouteQuery { [Export ("initWithRoute:dataHandler:")] NativeHandle Constructor (HKWorkoutRoute workoutRoute, HKWorkoutRouteBuilderDataHandler dataHandler); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("initWithRoute:dateInterval:dataHandler:")] NativeHandle Constructor (HKWorkoutRoute workoutRoute, NSDateInterval dateInterval, HKWorkoutRouteQueryDataHandler dataHandler); } @@ -4232,7 +4145,7 @@ interface HKWorkoutRouteQuery { /// Completion handler for adding metadata with . delegate void HKWorkoutBuilderCompletionHandler (bool success, NSError error); /// Builds a workout from workout data as it is added. - [Watch (5, 0), Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4304,26 +4217,26 @@ interface HKWorkoutBuilder { [return: NullAllowed] HKSeriesBuilder GetSeriesBuilder (HKSeriesType seriesType); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("workoutActivities", ArgumentSemantic.Copy)] HKWorkoutActivity [] WorkoutActivities { get; } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("allStatistics", ArgumentSemantic.Copy)] NSDictionary AllStatistics { get; } [Async] - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("addWorkoutActivity:completion:")] void AddWorkoutActivity (HKWorkoutActivity workoutActivity, HKWorkoutBuilderCompletionHandler completion); [Async] - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("updateActivityWithUUID:endDate:completion:")] void UpdateActivity (NSUuid uuid, NSDate endDate, HKWorkoutBuilderCompletionHandler completion); [Async] - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Export ("updateActivityWithUUID:addMedatata:completion:")] void UpdateActivity (NSUuid uuid, NSDictionary metadata, HKWorkoutBuilderCompletionHandler completion); } @@ -4333,27 +4246,26 @@ interface HKWorkoutBuilder { delegate void HKQuantitySeriesSampleQueryQuantityHandler (HKQuantitySeriesSampleQuery query, HKQuantity quantity, NSDateInterval date, bool done, NSError error); /// Queries series data in a quantity sample. - [Watch (5, 0), Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKQuery))] interface HKQuantitySeriesSampleQuery { - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("includeSample")] bool IncludeSample { get; set; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("orderByQuantitySampleStartDate")] bool OrderByQuantitySampleStartDate { get; set; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithQuantityType:predicate:quantityHandler:")] NativeHandle Constructor (HKQuantityType quantityType, [NullAllowed] NSPredicate predicate, HKQuantitySeriesSampleQueryQuantityHandler quantityHandler); [Deprecated (PlatformName.iOS, 13, 0, message: "Use Constructor that takes 'NSDateInterval' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use Constructor that takes 'NSDateInterval' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use Constructor that takes 'NSDateInterval' instead.")] [Export ("initWithSample:quantityHandler:")] NativeHandle Constructor (HKQuantitySample quantitySample, HKQuantitySeriesSampleQueryQuantityDelegate quantityHandler); @@ -4365,7 +4277,7 @@ interface HKQuantitySeriesSampleQuery { delegate void HKQuantitySeriesSampleBuilderFinishSeriesDelegate (HKQuantitySample [] samples, NSError error); /// Builds quantity sample series. - [Watch (5, 0), Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4393,13 +4305,13 @@ interface HKQuantitySeriesSampleBuilder { [Wrap ("FinishSeries (metadata.GetDictionary (), completionHandler)")] void FinishSeries ([NullAllowed] HKMetadata metadata, HKQuantitySeriesSampleBuilderFinishSeriesDelegate completionHandler); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Async] [Export ("finishSeriesWithMetadata:endDate:completion:")] void FinishSeries ([NullAllowed] NSDictionary metadata, [NullAllowed] NSDate endDate, HKQuantitySeriesSampleBuilderFinishSeriesDelegate completionHandler); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Async] [Wrap ("FinishSeries (metadata.GetDictionary (), endDate, completionHandler)")] @@ -4409,13 +4321,13 @@ interface HKQuantitySeriesSampleBuilder { [Export ("discard")] void Discard (); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("insertQuantity:dateInterval:error:")] bool Insert (HKQuantity quantity, NSDateInterval dateInterval, [NullAllowed] out NSError error); } - [Watch (5, 0), NoiOS, Mac (13, 0)] + [NoiOS, Mac (13, 0)] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4435,7 +4347,7 @@ interface HKLiveWorkoutDataSource { } /// Represents a Fast Healthcare Interoperability Resources (FHIR) resource. - [NoWatch, Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "HKFHIRResource")] [DisableDefaultCtor] @@ -4462,9 +4374,8 @@ interface HKFhirResource : NSSecureCoding, NSCopying { } /// A cumulative data series. - [Watch (5, 0), Mac (13, 0)] + [Mac (13, 0)] [Deprecated (PlatformName.iOS, 13, 0, message: "Use HKCumulativeQuantitySample instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use HKCumulativeQuantitySample instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use HKCumulativeQuantitySample instead.")] [Deprecated (PlatformName.MacOSX, 13, 0, message: "Use HKCumulativeQuantitySample instead.")] @@ -4475,7 +4386,7 @@ interface HKCumulativeQuantitySeriesSample { HKQuantity Sum { get; } } - [Watch (6, 0), iOS (13, 0), Mac (13, 0)] + [iOS (13, 0), Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKQuantitySample))] [DisableDefaultCtor] @@ -4485,7 +4396,7 @@ interface HKCumulativeQuantitySample { } /// A sample for clinical records. - [NoWatch, Mac (13, 0)] + [Mac (13, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (HKSample))] @@ -4501,7 +4412,7 @@ interface HKClinicalRecord : NSSecureCoding, NSCopying { } interface IHKLiveWorkoutBuilderDelegate { } - [Watch (5, 0), NoiOS] + [NoiOS] [NoMacCatalyst] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -4514,16 +4425,16 @@ interface HKLiveWorkoutBuilderDelegate { [Export ("workoutBuilderDidCollectEvent:")] void DidCollectEvent (HKLiveWorkoutBuilder workoutBuilder); - [Watch (9, 0), NoiOS, Mac (13, 0), NoMacCatalyst, NoTV] + [NoiOS, Mac (13, 0), NoMacCatalyst, NoTV] [Export ("workoutBuilder:didBeginActivity:")] void DidBeginActivity (HKLiveWorkoutBuilder workoutBuilder, HKWorkoutActivity workoutActivity); - [Watch (9, 0), NoiOS, Mac (13, 0), NoMacCatalyst, NoTV] + [NoiOS, Mac (13, 0), NoMacCatalyst, NoTV] [Export ("workoutBuilder:didEndActivity:")] void DidEndActivity (HKLiveWorkoutBuilder workoutBuilder, HKWorkoutActivity workoutActivity); } - [Watch (5, 0), NoiOS, Mac (13, 0)] + [NoiOS, Mac (13, 0)] [NoMacCatalyst] [DisableDefaultCtor] [BaseType (typeof (HKWorkoutBuilder))] @@ -4547,13 +4458,12 @@ interface HKLiveWorkoutBuilder { [Export ("elapsedTime")] double ElapsedTime { get; } - [Watch (9, 0)] [NoMacCatalyst] [NullAllowed, Export ("currentWorkoutActivity", ArgumentSemantic.Copy)] HKWorkoutActivity CurrentWorkoutActivity { get; } } - [Watch (6, 0), iOS (13, 0), Mac (13, 0)] + [iOS (13, 0), Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4564,38 +4474,35 @@ interface HKAudiogramSensitivityPoint : NSSecureCoding { [Deprecated (PlatformName.iOS, 18, 1)] [Deprecated (PlatformName.MacCatalyst, 18, 1)] [Deprecated (PlatformName.MacOSX, 15, 1)] - [Deprecated (PlatformName.WatchOS, 11, 1)] [NullAllowed, Export ("leftEarSensitivity", ArgumentSemantic.Copy)] HKQuantity LeftEarSensitivity { get; } [Deprecated (PlatformName.iOS, 18, 1)] [Deprecated (PlatformName.MacCatalyst, 18, 1)] [Deprecated (PlatformName.MacOSX, 15, 1)] - [Deprecated (PlatformName.WatchOS, 11, 1)] [NullAllowed, Export ("rightEarSensitivity", ArgumentSemantic.Copy)] HKQuantity RightEarSensitivity { get; } [Deprecated (PlatformName.iOS, 18, 1, message: "Use the 'HKAudiogramSensitivityTest' overload instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use the 'HKAudiogramSensitivityTest' overload instead.")] [Deprecated (PlatformName.MacOSX, 15, 1, message: "Use the 'HKAudiogramSensitivityTest' overload instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use the 'HKAudiogramSensitivityTest' overload instead.")] [Static] [Export ("sensitivityPointWithFrequency:leftEarSensitivity:rightEarSensitivity:error:")] [return: NullAllowed] HKAudiogramSensitivityPoint GetSensitivityPoint (HKQuantity frequency, [NullAllowed] HKQuantity leftEarSensitivity, [NullAllowed] HKQuantity rightEarSensitivity, [NullAllowed] out NSError error); - [Watch (11, 1), MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] + [MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] [Static] [Export ("sensitivityPointWithFrequency:tests:error:")] [return: NullAllowed] HKAudiogramSensitivityPoint GetSensitivityPoint (HKQuantity frequency, HKAudiogramSensitivityTest [] tests, [NullAllowed] out NSError error); - [Watch (11, 1), MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] + [MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] [Export ("tests", ArgumentSemantic.Copy)] HKAudiogramSensitivityTest [] Tests { get; } } - [Watch (6, 0), iOS (13, 0), Mac (13, 0)] + [iOS (13, 0), Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKSample))] [DisableDefaultCtor] @@ -4606,18 +4513,17 @@ interface HKAudiogramSample { [Deprecated (PlatformName.iOS, 18, 1, message: "Use the 'HKDevice' overload instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use the 'HKDevice' overload instead.")] [Deprecated (PlatformName.MacOSX, 15, 1, message: "Use the 'HKDevice' overload instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use the 'HKDevice' overload instead.")] [Static] [Export ("audiogramSampleWithSensitivityPoints:startDate:endDate:metadata:")] HKAudiogramSample GetAudiogramSample (HKAudiogramSensitivityPoint [] sensitivityPoints, NSDate startDate, NSDate endDate, [NullAllowed] NSDictionary metadata); - [Watch (11, 1), MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] + [MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] [Static] [Export ("audiogramSampleWithSensitivityPoints:startDate:endDate:device:metadata:")] HKAudiogramSample GetAudiogramSample (HKAudiogramSensitivityPoint [] sensitivityPoints, NSDate startDate, NSDate endDate, [NullAllowed] HKDevice device, [NullAllowed] NSDictionary metadata); } - [Watch (6, 0), iOS (13, 0), Mac (13, 0)] + [iOS (13, 0), Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKQuantitySample))] [DisableDefaultCtor] @@ -4639,7 +4545,6 @@ interface HKDiscreteQuantitySample { } [iOS (13, 0)] - [Watch (6, 0)] [Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKSeriesSample))] @@ -4648,7 +4553,7 @@ interface HKHeartbeatSeriesSample : NSSecureCoding { } delegate void HKHeartbeatSeriesBuilderCompletionHandler (bool success, NSError error); - [Watch (6, 0), iOS (13, 0), Mac (13, 0)] + [iOS (13, 0), Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKSeriesBuilder))] [DisableDefaultCtor] @@ -4676,7 +4581,7 @@ interface HKHeartbeatSeriesBuilder { delegate void HKHeartbeatSeriesQueryDataHandler (HKHeartbeatSeriesQuery query, double timeSinceSeriesStart, bool precededByGap, bool done, NSError error); - [Watch (6, 0), iOS (13, 0), Mac (13, 0)] + [iOS (13, 0), Mac (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (HKQuery))] interface HKHeartbeatSeriesQuery { @@ -4685,7 +4590,7 @@ interface HKHeartbeatSeriesQuery { NativeHandle Constructor (HKHeartbeatSeriesSample heartbeatSeries, HKHeartbeatSeriesQueryDataHandler dataHandler); } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (HKSample))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKElectrocardiogram @@ -4708,7 +4613,7 @@ interface HKElectrocardiogram { delegate void HKElectrocardiogramQueryDataHandler (HKElectrocardiogramQuery query, HKElectrocardiogramVoltageMeasurement voltageMeasurement, bool done, NSError error); - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (HKQuery))] [DisableDefaultCtor] @@ -4719,7 +4624,7 @@ interface HKElectrocardiogramQuery { NativeHandle Constructor (HKElectrocardiogram electrocardiogram, HKElectrocardiogramQueryDataHandler dataHandler); } - [Watch (7, 0), iOS (14, 0), Mac (13, 0), MacCatalyst (16, 0)] + [iOS (14, 0), Mac (13, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKElectrocardiogramVoltageMeasurement : NSCopying { @@ -4731,7 +4636,7 @@ interface HKElectrocardiogramVoltageMeasurement : NSCopying { HKQuantity GetQuantity (HKElectrocardiogramLead lead); } - [NoWatch, iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject), Name = "HKFHIRVersion")] [DisableDefaultCtor] @@ -4765,7 +4670,7 @@ interface HKFhirVersion : NSCopying, NSSecureCoding { HKFhirVersion PrimaryR4Version { get; } } - [Watch (7, 0), iOS (14, 0), Mac (13, 0)] + [iOS (14, 0), Mac (13, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4775,7 +4680,7 @@ interface HKActivityMoveModeObject : NSCopying, NSSecureCoding { HKActivityMoveMode ActivityMoveMode { get; } } - [Watch (7, 2), iOS (14, 3), Mac (13, 0)] + [iOS (14, 3), Mac (13, 0)] [MacCatalyst (14, 3)] [Native] enum HKCategoryValueContraceptive : long { @@ -4788,14 +4693,14 @@ enum HKCategoryValueContraceptive : long { Patch, } - [Watch (7, 2), iOS (14, 3), Mac (13, 0)] + [iOS (14, 3), Mac (13, 0)] [MacCatalyst (14, 3)] [Native] enum HKCategoryValueLowCardioFitnessEvent : long { LowFitness = 1, } - [Watch (8, 0), iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4811,7 +4716,7 @@ interface HKQueryDescriptor : NSCopying, NSSecureCoding { NativeHandle Constructor (HKSampleType sampleType, [NullAllowed] NSPredicate predicate); } - [NoWatch, iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [BaseType (typeof (HKSample))] [DisableDefaultCtor] @@ -4853,7 +4758,7 @@ interface HKVerifiableClinicalRecord { delegate void HKVerifiableClinicalRecordQueryResultHandler (HKVerifiableClinicalRecordQuery query, NSArray records, NSError error); - [NoWatch, iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [BaseType (typeof (HKQuery))] [DisableDefaultCtor] @@ -4877,7 +4782,7 @@ interface HKVerifiableClinicalRecordQuery { #pragma warning restore } - [NoWatch, iOS (15, 0), Mac (13, 0)] + [iOS (15, 0), Mac (13, 0)] [MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4889,7 +4794,7 @@ interface HKVerifiableClinicalRecordSubject : NSSecureCoding, NSCopying { NSDateComponents DateOfBirthComponents { get; } } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKAttachment : NSSecureCoding, NSCopying { @@ -4916,7 +4821,7 @@ interface HKAttachment : NSSecureCoding, NSCopying { delegate void HKAttachmentStoreDataHandler ([NullAllowed] NSData dataChunk, [NullAllowed] NSError error, bool done); delegate void HKAttachmentStoreGetAttachmentCompletionHandler ([NullAllowed] HKAttachment [] attachments, [NullAllowed] NSError error); - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (NSObject))] interface HKAttachmentStore { [Export ("initWithHealthStore:")] @@ -4942,7 +4847,7 @@ interface HKAttachmentStore { NSProgress StreamData (HKAttachment attachment, HKAttachmentStoreDataHandler dataHandler); } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (HKLensSpecification))] [DisableDefaultCtor] interface HKContactsLensSpecification : NSSecureCoding, NSCopying { @@ -4956,7 +4861,7 @@ interface HKContactsLensSpecification : NSSecureCoding, NSCopying { HKQuantity Diameter { get; } } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (HKVisionPrescription))] [DisableDefaultCtor] interface HKContactsPrescription : NSSecureCoding, NSCopying { @@ -4974,7 +4879,7 @@ interface HKContactsPrescription : NSSecureCoding, NSCopying { HKContactsPrescription GetPrescription ([NullAllowed] HKContactsLensSpecification rightEyeSpecification, [NullAllowed] HKContactsLensSpecification leftEyeSpecification, string brand, NSDate dateIssued, [NullAllowed] NSDate expirationDate, [NullAllowed] HKDevice device, [NullAllowed] NSDictionary metadata); } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (HKLensSpecification))] [DisableDefaultCtor] interface HKGlassesLensSpecification : NSSecureCoding, NSCopying { @@ -4994,7 +4899,7 @@ interface HKGlassesLensSpecification : NSSecureCoding, NSCopying { HKQuantity NearPupillaryDistance { get; } } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (HKVisionPrescription))] [DisableDefaultCtor] interface HKGlassesPrescription : NSSecureCoding, NSCopying { @@ -5009,7 +4914,7 @@ interface HKGlassesPrescription : NSSecureCoding, NSCopying { HKGlassesPrescription GetPrescription ([NullAllowed] HKGlassesLensSpecification rightEyeSpecification, [NullAllowed] HKGlassesLensSpecification leftEyeSpecification, NSDate dateIssued, [NullAllowed] NSDate expirationDate, [NullAllowed] HKDevice device, [NullAllowed] NSDictionary metadata); } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKLensSpecification { @@ -5026,7 +4931,7 @@ interface HKLensSpecification { HKQuantity AddPower { get; } } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (HKSample))] [DisableDefaultCtor] interface HKVisionPrescription : NSSecureCoding, NSCopying { @@ -5043,12 +4948,12 @@ interface HKVisionPrescription : NSSecureCoding, NSCopying { [Export ("prescriptionWithType:dateIssued:expirationDate:device:metadata:")] HKVisionPrescription GetPrescription (HKVisionPrescriptionType type, NSDate dateIssued, [NullAllowed] NSDate expirationDate, [NullAllowed] HKDevice device, [NullAllowed] NSDictionary metadata); - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("HKVisionPrescriptionTypeIdentifier")] NSString TypeIdentifier { get; } } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKVisionPrism : NSSecureCoding, NSCopying { @@ -5080,7 +4985,7 @@ interface HKVisionPrism : NSSecureCoding, NSCopying { HKVisionEye Eye { get; } } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKWorkoutActivity : NSSecureCoding, NSCopying { @@ -5116,13 +5021,13 @@ interface HKWorkoutActivity : NSSecureCoding, NSCopying { HKStatistics GetStatistics (HKQuantityType quantityType); } - [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] + [MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [BaseType (typeof (HKSampleType))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: The -init method is not available on HKPrescriptionType interface HKPrescriptionType { } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (HKScoredAssessment), Name = "HKGAD7Assessment")] [DisableDefaultCtor] interface HKGad7Assessment { @@ -5144,7 +5049,7 @@ interface HKGad7Assessment { delegate void HKWorkoutRelationshipCallback (bool success, [NullAllowed] NSError error); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Category] [BaseType (typeof (HKHealthStore))] interface HKHealthStore_HKWorkoutRelationship { @@ -5155,19 +5060,19 @@ interface HKHealthStore_HKWorkoutRelationship { void UnrelateWorkoutEffortSample (HKSample sample, HKWorkout workout, [NullAllowed] HKWorkoutActivity activity, HKWorkoutRelationshipCallback completion); } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (HKSampleType))] [DisableDefaultCtor] interface HKScoredAssessmentType { } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (HKSampleType))] [DisableDefaultCtor] interface HKStateOfMindType { } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] [NativeName ("HKPHQ9AssessmentRisk")] public enum HKPhq9AssessmentRisk : long { @@ -5178,7 +5083,7 @@ public enum HKPhq9AssessmentRisk : long { Severe, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] [NativeName ("HKPHQ9AssessmentAnswer")] public enum HKPhq9AssessmentAnswer : long { @@ -5189,7 +5094,7 @@ public enum HKPhq9AssessmentAnswer : long { PreferNotToAnswer, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (HKScoredAssessment), Name = "HKPHQ9Assessment")] [DisableDefaultCtor] interface HKPhq9Assessment { @@ -5209,7 +5114,7 @@ interface HKPhq9Assessment { HKPhq9Assessment Create (NSDate date, [BindAs (typeof (HKPhq9AssessmentAnswer []))] NSNumber [] answers, [NullAllowed] NSDictionary metadata); } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (HKSample))] [DisableDefaultCtor] interface HKScoredAssessment : NSSecureCoding, NSCopying { @@ -5217,7 +5122,7 @@ interface HKScoredAssessment : NSSecureCoding, NSCopying { nint Score { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HKStateOfMindValenceClassification : long { VeryUnpleasant = 1, @@ -5229,7 +5134,7 @@ public enum HKStateOfMindValenceClassification : long { VeryPleasant, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HKStateOfMindLabel : long { Amazed = 1, @@ -5272,7 +5177,7 @@ public enum HKStateOfMindLabel : long { Satisfied, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HKStateOfMindAssociation : long { Community = 1, @@ -5295,14 +5200,14 @@ public enum HKStateOfMindAssociation : long { Weather, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HKStateOfMindKind : long { MomentaryEmotion = 1, DailyMood = 2, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (HKSample))] [DisableDefaultCtor] interface HKStateOfMind : NSSecureCoding, NSCopying { @@ -5332,7 +5237,7 @@ interface HKStateOfMind : NSSecureCoding, NSCopying { HKStateOfMind Create (NSDate date, HKStateOfMindKind kind, double valence, [BindAs (typeof (HKStateOfMindLabel []))] NSNumber [] labels, [BindAs (typeof (HKStateOfMindAssociation []))] NSNumber [] associations, [NullAllowed] NSDictionary metadata); } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum HKScoredAssessmentTypeIdentifier { [Field ("HKScoredAssessmentTypeIdentifierGAD7")] Gad7, @@ -5340,7 +5245,7 @@ enum HKScoredAssessmentTypeIdentifier { Phq9, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKWorkoutEffortRelationship : NSSecureCoding, NSCopying { @@ -5354,7 +5259,7 @@ interface HKWorkoutEffortRelationship : NSSecureCoding, NSCopying { HKSample [] Samples { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HKWorkoutEffortRelationshipQueryOptions : long { Default = 0, @@ -5363,7 +5268,7 @@ public enum HKWorkoutEffortRelationshipQueryOptions : long { delegate void HKWorkoutEffortRelationshipQueryResultsHandler (HKWorkoutEffortRelationshipQuery query, [NullAllowed] HKWorkoutEffortRelationship [] relationships, [NullAllowed] HKQueryAnchor newAnchor, [NullAllowed] NSError error); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (HKQuery))] [DisableDefaultCtor] interface HKWorkoutEffortRelationshipQuery { @@ -5371,14 +5276,14 @@ interface HKWorkoutEffortRelationshipQuery { NativeHandle Constructor ([NullAllowed] NSPredicate predicate, [NullAllowed] HKQueryAnchor anchor, HKWorkoutEffortRelationshipQueryOptions options, HKWorkoutEffortRelationshipQueryResultsHandler resultsHandler); } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum HKAppleSleepingBreathingDisturbancesClassification : long { NotElevated, Elevated, } - [Watch (11, 1), MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] + [MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKAudiogramSensitivityPointClampingRange : NSSecureCoding, NSCopying { @@ -5395,7 +5300,7 @@ interface HKAudiogramSensitivityPointClampingRange : NSSecureCoding, NSCopying { HKAudiogramSensitivityPointClampingRange Create ([NullAllowed][BindAs (typeof (double?))] NSNumber lowerBound, [NullAllowed][BindAs (typeof (double?))] NSNumber upperBound, [NullAllowed] out NSError error); } - [Watch (11, 1), MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] + [MacCatalyst (18, 1), Mac (15, 1), iOS (18, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HKAudiogramSensitivityTest : NSSecureCoding, NSCopying { diff --git a/src/homekit.cs b/src/homekit.cs index aaa6bd07251d..da4e647eb636 100644 --- a/src/homekit.cs +++ b/src/homekit.cs @@ -10,10 +10,6 @@ using NativeHandle = System.IntPtr; #endif -#if WATCH -interface UIView {} -#endif - namespace HomeKit { [MacCatalyst (14, 0)] @@ -37,7 +33,6 @@ partial interface HMHomeManager { [Deprecated (PlatformName.MacOSX, 13, 0, message: "No longer supported.")] [Deprecated (PlatformName.iOS, 16, 1, message: "No longer supported.")] [Deprecated (PlatformName.MacCatalyst, 16, 1, message: "No longer supported.")] - [Deprecated (PlatformName.WatchOS, 9, 1, message: "No longer supported.")] [Deprecated (PlatformName.TvOS, 16, 1, message: "No longer supported.")] [NullAllowed, Export ("primaryHome", ArgumentSemantic.Retain)] HMHome PrimaryHome { get; } @@ -46,7 +41,6 @@ partial interface HMHomeManager { HMHome [] Homes { get; } [NoTV] - [NoWatch] [Deprecated (PlatformName.MacOSX, 13, 0, message: "No longer supported.")] [Deprecated (PlatformName.iOS, 16, 1, message: "No longer supported.")] [Deprecated (PlatformName.MacCatalyst, 16, 1, message: "No longer supported.")] @@ -56,20 +50,18 @@ partial interface HMHomeManager { void UpdatePrimaryHome (HMHome home, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addHomeWithName:completionHandler:")] void AddHome (string homeName, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeHome:completionHandler:")] void RemoveHome (HMHome home, Action completion); - [iOS (13, 0), Watch (6, 0), TV (13, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (14, 0)] [Export ("authorizationStatus")] HMHomeManagerAuthorizationStatus AuthorizationStatus { get; } @@ -94,14 +86,14 @@ partial interface HMHomeManagerDelegate { [Export ("homeManager:didRemoveHome:"), EventArgs ("HMHomeManager")] void DidRemoveHome (HMHomeManager manager, HMHome home); - [iOS (13, 0), NoWatch, NoTV, NoMac] + [iOS (13, 0), NoTV, NoMac] [NoMacCatalyst] [Deprecated (PlatformName.iOS, 15, 0, message: "This method is no longer supported.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "This method is no longer supported.")] [Export ("homeManager:didReceiveAddAccessoryRequest:"), EventArgs ("HMHomeManagerAddAccessoryRequest")] void DidReceiveAddAccessoryRequest (HMHomeManager manager, HMAddAccessoryRequest request); - [iOS (13, 0), Watch (6, 0), TV (13, 0), NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (14, 0)] [Export ("homeManager:didUpdateAuthorizationStatus:"), EventArgs ("HMHomeManagerAuthorizationStatus")] void DidUpdateAuthorizationStatus (HMHomeManager manager, HMHomeManagerAuthorizationStatus status); @@ -114,7 +106,6 @@ partial interface HMAccessory { #if !XAMCORE_5_0 [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMAccessory instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMAccessory instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMAccessory instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMAccessory instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); @@ -124,7 +115,6 @@ partial interface HMAccessory { string Name { get; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -149,7 +139,6 @@ partial interface HMAccessory { bool Bridged { [Bind ("isBridged")] get; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -186,12 +175,11 @@ partial interface HMAccessory { string FirmwareVersion { get; } [NullAllowed] - [Mac (13, 0), iOS (16, 1), MacCatalyst (16, 2), Watch (9, 1), TV (16, 1)] + [Mac (13, 0), iOS (16, 1), MacCatalyst (16, 2), TV (16, 1)] [Export ("matterNodeID", ArgumentSemantic.Copy)] NSNumber MatterNodeId { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] @@ -211,7 +199,6 @@ partial interface HMAccessory { [NullAllowed, Export ("cameraProfiles", ArgumentSemantic.Copy)] HMCameraProfile [] CameraProfiles { get; } - [Watch (4, 3)] [MacCatalyst (14, 0)] [Export ("supportsIdentify")] bool SupportsIdentify { get; } @@ -255,8 +242,6 @@ partial interface HMAccessoryDelegate { void DidUpdateFirmwareVersion (HMAccessory accessory, string firmwareVersion); } -#if !WATCH - // __WATCHOS_PROHIBITED /// Browses and discovers objects. /// /// Apple documentation for HMAccessoryBrowser @@ -305,7 +290,6 @@ partial interface HMAccessoryBrowserDelegate { [Export ("accessoryBrowser:didRemoveNewAccessory:"), EventArgs ("HMAccessoryBrowser")] void DidRemoveNewAccessory (HMAccessoryBrowser browser, HMAccessory accessory); } -#endif // !WATCH [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -352,21 +336,18 @@ partial interface HMActionSet { bool Executing { [Bind ("isExecuting")] get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] void UpdateName (string name, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addAction:completionHandler:")] void AddAction (HMAction action, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeAction:completionHandler:")] @@ -418,7 +399,6 @@ partial interface HMCharacteristic { #if !XAMCORE_5_0 [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMCharacteristic instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMCharacteristic instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMCharacteristic instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMCharacteristic instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); @@ -459,7 +439,6 @@ partial interface HMCharacteristic { void EnableNotification (bool enable, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateAuthorizationData:completionHandler:")] @@ -501,7 +480,7 @@ interface HMCharacteristicPropertyInternal { [Field ("HMCharacteristicPropertySupportsEventNotification")] NSString SupportsEventNotification { get; } - [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), Watch (11, 0), NoMac] + [iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoMac] [Field ("HMCharacteristicPropertyRequiresAuthorizationData")] NSString RequiresAuthorizationData { get; } } @@ -577,7 +556,6 @@ partial interface HMCharacteristicMetadata { partial interface HMCharacteristicWriteAction { [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithCharacteristic:targetValue:")] NativeHandle Constructor (HMCharacteristic characteristic, INSCopying targetValue); @@ -589,7 +567,6 @@ partial interface HMCharacteristicWriteAction { INSCopying TargetValue { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateTargetValue:completionHandler:")] @@ -619,7 +596,6 @@ partial interface HMHome { HMHomeHubState HomeHubState { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] @@ -635,21 +611,18 @@ partial interface HMHome { HMAccessory [] Accessories { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addAccessory:completionHandler:")] void AddAccessory (HMAccessory accessory, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeAccessory:completionHandler:")] void RemoveAccessory (HMAccessory accessory, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("assignAccessory:toRoom:completionHandler:")] @@ -661,14 +634,13 @@ partial interface HMHome { HMService [] GetServices (NSString [] serviceTypes); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("unblockAccessory:completionHandler:")] void UnblockAccessory (HMAccessory accessory, Action completion); [Deprecated (PlatformName.iOS, 15, 4, message: "Use 'HMAccessorySetupManager.PerformAccessorySetup' instead.")] - [NoWatch, NoTV] + [NoTV] [NoMacCatalyst] [Deprecated (PlatformName.MacCatalyst, 15, 4, message: "Use 'HMAccessorySetupManager.PerformAccessorySetup' instead.")] [Async] @@ -676,7 +648,7 @@ partial interface HMHome { void AddAndSetupAccessories (Action completion); [Deprecated (PlatformName.iOS, 15, 4, message: "Use 'HMAccessorySetupManager.PerformAccessorySetup' instead.")] - [NoWatch, NoTV, NoMacCatalyst] + [NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacCatalyst, 15, 4, message: "Use 'HMAccessorySetupManager.PerformAccessorySetup' instead.")] [Async] [Export ("addAndSetupAccessoriesWithPayload:completionHandler:")] @@ -688,14 +660,12 @@ partial interface HMHome { HMRoom [] Rooms { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addRoomWithName:completionHandler:")] void AddRoom (string roomName, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeRoom:completionHandler:")] @@ -710,14 +680,12 @@ partial interface HMHome { HMZone [] Zones { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addZoneWithName:completionHandler:")] void AddZone (string zoneName, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeZone:completionHandler:")] @@ -729,14 +697,12 @@ partial interface HMHome { HMServiceGroup [] ServiceGroups { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addServiceGroupWithName:completionHandler:")] void AddServiceGroup (string serviceGroupName, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeServiceGroup:completionHandler:")] @@ -748,14 +714,12 @@ partial interface HMHome { HMActionSet [] ActionSets { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addActionSetWithName:completionHandler:")] void AddActionSet (string actionSetName, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeActionSet:completionHandler:")] @@ -776,14 +740,12 @@ partial interface HMHome { HMTrigger [] Triggers { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addTrigger:completionHandler:")] void AddTrigger (HMTrigger trigger, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeTrigger:completionHandler:")] @@ -792,7 +754,6 @@ partial interface HMHome { // HMHome(HMUser) [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -800,7 +761,6 @@ partial interface HMHome { HMUser [] Users { get; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'ManageUsers' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ManageUsers' instead.")] @@ -813,7 +773,6 @@ partial interface HMHome { HMUser CurrentUser { get; } [NoTV] - [NoWatch] [MacCatalyst (14, 0)] [Async] [Export ("manageUsersWithCompletionHandler:")] @@ -824,11 +783,11 @@ partial interface HMHome { HMHomeAccessControl GetHomeAccessControl (HMUser user); // @interface Matter (HMHome) - [TV (16, 1), iOS (16, 1), MacCatalyst (16, 1), Watch (9, 1)] + [TV (16, 1), iOS (16, 1), MacCatalyst (16, 1)] [Export ("matterControllerID")] string MatterControllerId { get; } - [TV (16, 1), iOS (16, 1), MacCatalyst (16, 1), Watch (9, 1)] + [TV (16, 1), iOS (16, 1), MacCatalyst (16, 1)] [Export ("matterControllerXPCConnectBlock", ArgumentSemantic.Strong)] Func MatterControllerXPCConnectBlock { get; } @@ -842,7 +801,7 @@ partial interface HMHome { [Field ("HMUserFailedAccessoriesKey")] NSString UserFailedAccessoriesKey { get; } - [Watch (6, 1), TV (13, 2), iOS (13, 2)] + [TV (13, 2), iOS (13, 2)] [MacCatalyst (14, 0)] [Export ("supportsAddingNetworkRouter")] bool SupportsAddingNetworkRouter { get; } @@ -950,7 +909,7 @@ partial interface HMHomeDelegate { [Export ("home:didUpdateHomeHubState:"), EventArgs ("HMHomeHubState")] void DidUpdateHomeHubState (HMHome home, HMHomeHubState homeHubState); - [Watch (6, 1), TV (13, 2), iOS (13, 2)] + [TV (13, 2), iOS (13, 2)] [MacCatalyst (14, 0)] [Export ("homeDidUpdateSupportedFeatures:")] void DidUpdateSupportedFeatures (HMHome home); @@ -968,7 +927,6 @@ partial interface HMRoom { HMAccessory [] Accessories { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] @@ -986,7 +944,6 @@ partial interface HMService { #if !XAMCORE_5_0 [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMService instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMService instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMService instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMService instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); @@ -1012,14 +969,12 @@ partial interface HMService { HMCharacteristic [] Characteristics { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] void UpdateName (string name, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Async] @@ -1046,7 +1001,7 @@ partial interface HMService { [NullAllowed, Export ("linkedServices", ArgumentSemantic.Copy)] HMService [] LinkedServices { get; } - [Watch (11, 0), TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Export ("matterEndpointID", ArgumentSemantic.Copy), NullAllowed] // Header doesn't say what kind of number a Matter endpoint ID is, so leaving as 'NSNumber'. NSNumber MatterEndpointId { get; } @@ -1064,21 +1019,18 @@ partial interface HMServiceGroup { HMService [] Services { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] void UpdateName (string name, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addService:completionHandler:")] void AddService (HMService service, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeService:completionHandler:")] @@ -1094,14 +1046,13 @@ partial interface HMServiceGroup { [BaseType (typeof (HMTrigger))] partial interface HMTimerTrigger { - [Watch (9, 4), TV (16, 4), MacCatalyst (16, 4), iOS (16, 4)] + [TV (16, 4), MacCatalyst (16, 4), iOS (16, 4)] [Export ("initWithName:fireDate:recurrence:")] NativeHandle Constructor (string name, NSDate fireDate, [NullAllowed] NSDateComponents recurrence); [Deprecated (PlatformName.iOS, 16, 4, message: "Use '.ctor (string, NSDate, NSDateComponents' instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 4, message: "Use '.ctor (string, NSDate, NSDateComponents' instead.")] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithName:fireDate:timeZone:recurrence:recurrenceCalendar:")] NativeHandle Constructor (string name, NSDate fireDate, [NullAllowed] NSTimeZone timeZone, [NullAllowed] NSDateComponents recurrence, [NullAllowed] NSCalendar recurrenceCalendar); @@ -1112,7 +1063,6 @@ partial interface HMTimerTrigger { [Deprecated (PlatformName.iOS, 16, 4, message: "Use 'HMEventTrigger' with 'HMCalendarEvent' for triggers based on a time-zone-relative time of day.")] [Deprecated (PlatformName.MacCatalyst, 16, 4, message: "Use 'HMEventTrigger' with 'HMCalendarEvent' for triggers based on a time-zone-relative time of day.")] [Deprecated (PlatformName.TvOS, 16, 4, message: "Use 'HMEventTrigger' with 'HMCalendarEvent' for triggers based on a time-zone-relative time of day.")] - [Deprecated (PlatformName.WatchOS, 9, 4, message: "Use 'HMEventTrigger' with 'HMCalendarEvent' for triggers based on a time-zone-relative time of day.")] [NullAllowed, Export ("timeZone", ArgumentSemantic.Copy)] NSTimeZone TimeZone { get; } @@ -1122,12 +1072,10 @@ partial interface HMTimerTrigger { [Deprecated (PlatformName.iOS, 16, 4, message: "No longer supported.")] [Deprecated (PlatformName.MacCatalyst, 16, 4, message: "No longer supported.")] [Deprecated (PlatformName.TvOS, 16, 4, message: "No longer supported.")] - [Deprecated (PlatformName.WatchOS, 9, 4, message: "No longer supported.")] [NullAllowed, Export ("recurrenceCalendar", ArgumentSemantic.Copy)] NSCalendar RecurrenceCalendar { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateFireDate:completionHandler:")] @@ -1136,14 +1084,12 @@ partial interface HMTimerTrigger { [Deprecated (PlatformName.iOS, 16, 4, message: "Use 'HMEventTrigger' with 'HMCalendarEvent' for triggers based on a time-zone-relative time of day.")] [Deprecated (PlatformName.MacCatalyst, 16, 4, message: "Use 'HMEventTrigger' with 'HMCalendarEvent' for triggers based on a time-zone-relative time of day.")] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateTimeZone:completionHandler:")] void UpdateTimeZone ([NullAllowed] NSTimeZone timeZone, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateRecurrence:completionHandler:")] @@ -1166,35 +1112,30 @@ partial interface HMTrigger { [Deprecated (PlatformName.MacOSX, 14, 0, message: "No longer supported.")] [Deprecated (PlatformName.iOS, 17, 0, message: "No longer supported.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "No longer supported.")] [Deprecated (PlatformName.TvOS, 17, 0, message: "No longer supported.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "No longer supported.")] [NullAllowed, Export ("lastFireDate", ArgumentSemantic.Copy)] NSDate LastFireDate { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] void UpdateName (string name, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addActionSet:completionHandler:")] void AddActionSet (HMActionSet actionSet, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeActionSet:completionHandler:")] void RemoveActionSet (HMActionSet actionSet, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("enable:completionHandler:")] @@ -1217,21 +1158,18 @@ partial interface HMZone { HMRoom [] Rooms { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updateName:completionHandler:")] void UpdateName (string name, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("addRoom:completionHandler:")] void AddRoom (HMRoom room, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("removeRoom:completionHandler:")] @@ -1314,7 +1252,6 @@ interface HMAccessoryCategory { [DisableDefaultCtor] interface HMCharacteristicEvent : NSMutableCopying { [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithCharacteristic:triggerValue:")] NativeHandle Constructor (HMCharacteristic characteristic, [NullAllowed] INSCopying triggerValue); @@ -1328,7 +1265,6 @@ interface HMCharacteristicEvent : NSMutableCopying { [Deprecated (PlatformName.iOS, 11, 0)] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Async] @@ -1364,13 +1300,11 @@ interface HMTimeEvent { } [DisableDefaultCtor] interface HMEventTrigger { [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithName:events:predicate:")] NativeHandle Constructor (string name, HMEvent [] events, [NullAllowed] NSPredicate predicate); [NoTV] - [NoWatch] [MacCatalyst (14, 0)] [Export ("initWithName:events:endEvents:recurrences:predicate:")] NativeHandle Constructor (string name, HMEvent [] events, [NullAllowed] HMEvent [] endEvents, [NullAllowed] NSDateComponents [] recurrences, [NullAllowed] NSPredicate predicate); @@ -1449,7 +1383,6 @@ interface HMEventTrigger { NSPredicate CreatePredicateForEvaluatingTrigger (HMPresenceEvent presenceEvent); [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UpdateEvents' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UpdateEvents' instead.")] @@ -1458,7 +1391,6 @@ interface HMEventTrigger { void AddEvent (HMEvent @event, Action completion); [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UpdateEvents' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UpdateEvents' instead.")] @@ -1467,35 +1399,30 @@ interface HMEventTrigger { void RemoveEvent (HMEvent @event, Action completion); [NoTV] - [NoWatch] [MacCatalyst (14, 0)] [Async] [Export ("updateEvents:completionHandler:")] void UpdateEvents (HMEvent [] events, Action completion); [NoTV] - [NoWatch] [MacCatalyst (14, 0)] [Async] [Export ("updateEndEvents:completionHandler:")] void UpdateEndEvents (HMEvent [] endEvents, Action completion); [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("updatePredicate:completionHandler:")] void UpdatePredicate ([NullAllowed] NSPredicate predicate, Action completion); [NoTV] - [NoWatch] [MacCatalyst (14, 0)] [Async] [Export ("updateRecurrences:completionHandler:")] void UpdateRecurrences ([NullAllowed] NSDateComponents [] recurrences, Action completion); [NoTV] - [NoWatch] [MacCatalyst (14, 0)] [Async] [Export ("updateExecuteOnce:completionHandler:")] @@ -1515,7 +1442,6 @@ interface HMHomeAccessControl { [DisableDefaultCtor] interface HMLocationEvent : NSMutableCopying { [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithRegion:")] NativeHandle Constructor (CLRegion region); @@ -1524,7 +1450,6 @@ interface HMLocationEvent : NSMutableCopying { CLRegion Region { get; [NotImplemented] set; } [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 11, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -1546,7 +1471,6 @@ interface HMMutableLocationEvent { CLRegion Region { get; set; } } - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (UIView))] interface HMCameraView { @@ -1568,13 +1492,12 @@ interface HMCameraSource { [Protected] [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMCameraSource instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMCameraSource instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMCameraSource instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMCameraSource instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); #endif - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("aspectRatio")] double AspectRatio { get; } @@ -1607,7 +1530,6 @@ interface HMCameraControl { #if !XAMCORE_5_0 [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMCameraControl instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMCameraControl instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMCameraControl instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMCameraControl instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); @@ -1621,7 +1543,6 @@ interface HMCameraStreamControl { #if !XAMCORE_5_0 [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMCameraStreamControl instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMCameraStreamControl instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMCameraStreamControl instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMCameraStreamControl instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); @@ -1664,7 +1585,6 @@ interface HMCameraStream { [DesignatedInitializer] [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMCameraStream instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMCameraStream instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMCameraStream instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMCameraStream instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); @@ -1689,7 +1609,6 @@ interface HMCameraSnapshotControl { #if !XAMCORE_5_0 [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMCameraSnapshotControl instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMCameraSnapshotControl instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMCameraSnapshotControl instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMCameraSnapshotControl instance isn't supported.")] [Export ("init")] NativeHandle Constructor (); @@ -1725,7 +1644,6 @@ interface HMCameraSnapshot { #if !XAMCORE_5_0 [Deprecated (PlatformName.iOS, 8, 0, message: "Directly creating an HMCameraSnapshot instance isn't supported.")] [Deprecated (PlatformName.TvOS, 10, 0, message: "Directly creating an HMCameraSnapshot instance isn't supported.")] - [Deprecated (PlatformName.WatchOS, 2, 0, message: "Directly creating an HMCameraSnapshot instance isn't supported.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Directly creating an HMCameraSnapshot instance isn't supported.")] [Export ("init")] [DesignatedInitializer] @@ -1902,7 +1820,7 @@ interface HMNumberRange { NSNumber Max { get; } } - [iOS (13, 0), NoWatch, NoMac, NoTV, NoMacCatalyst] + [iOS (13, 0), NoMac, NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HMAccessoryOwnershipToken { @@ -1910,7 +1828,7 @@ interface HMAccessoryOwnershipToken { NativeHandle Constructor (NSData data); } - [iOS (13, 0), NoWatch, NoMac, NoTV] + [iOS (13, 0), NoMac, NoTV] [NoMacCatalyst] [Deprecated (PlatformName.iOS, 15, 0, message: "This class is no longer supported.")] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "This class is no longer supported.")] @@ -1945,7 +1863,7 @@ interface HMAddAccessoryRequest { HMAccessorySetupPayload GetPayload (NSUrl setupPayloadUrl, HMAccessoryOwnershipToken ownershipToken); } - [iOS (13, 0), Watch (6, 0), TV (13, 0), NoMac, MacCatalyst (14, 0)] + [iOS (13, 0), TV (13, 0), NoMac, MacCatalyst (14, 0)] [BaseType (typeof (HMAccessoryProfile))] [DisableDefaultCtor] interface HMNetworkConfigurationProfile { @@ -1962,7 +1880,7 @@ interface HMNetworkConfigurationProfile { interface IHMNetworkConfigurationProfileDelegate { } - [Watch (6, 0), TV (13, 0), NoMac, iOS (13, 0), MacCatalyst (14, 0)] + [TV (13, 0), NoMac, iOS (13, 0), MacCatalyst (14, 0)] #if NET [Protocol, Model] #else @@ -1974,7 +1892,7 @@ interface HMNetworkConfigurationProfileDelegate { void DidUpdateNetworkAccessMode (HMNetworkConfigurationProfile profile); } - [NoWatch, NoTV, NoMacCatalyst] + [NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HMAccessorySetupPayload { @@ -2076,14 +1994,14 @@ HMSignificantEvent SignificantEvent { NSDateComponents Offset { get; set; } } - [Watch (4, 2), MacCatalyst (14, 0)] + [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HMAccessControl { } - [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (15, 4)] + [NoTV, NoMacCatalyst, NoMac, iOS (15, 4)] [BaseType (typeof (NSObject))] interface HMAccessorySetupRequest : NSCopying { @@ -2100,7 +2018,7 @@ interface HMAccessorySetupRequest : NSCopying { string SuggestedAccessoryName { get; set; } } - [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (15, 4)] + [NoTV, NoMacCatalyst, NoMac, iOS (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface HMAccessorySetupResult : NSCopying { @@ -2112,7 +2030,7 @@ interface HMAccessorySetupResult : NSCopying { NSUuid [] AccessoryUniqueIdentifiers { get; } } - [iOS (15, 2), NoWatch, NoTV, NoMacCatalyst] + [iOS (15, 2), NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] interface HMAccessorySetupManager { [Async] diff --git a/src/iAd/ADCompat.cs b/src/iAd/ADCompat.cs deleted file mode 100644 index aac4d3067275..000000000000 --- a/src/iAd/ADCompat.cs +++ /dev/null @@ -1,597 +0,0 @@ -#if !NET - -using System; -using System.Runtime.InteropServices; -using System.Threading.Tasks; - -using AVKit; -using CoreGraphics; -using Foundation; -using MediaPlayer; -using ObjCRuntime; -using UIKit; - -#if !NET -using NativeHandle = System.IntPtr; -#endif - -#nullable enable - -namespace iAd { - - [Deprecated (PlatformName.iOS, 10, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public class ADBannerView : UIView { - - public class ADBannerViewAppearance : UIViewAppearance { - - protected internal ADBannerViewAppearance (IntPtr handle) : base (handle) - { - } - } - - protected internal ADBannerView (IntPtr handle) - { - } - - public unsafe override NativeHandle ClassHandle { - get { return default (NativeHandle); } - } - - public virtual ADAdType AdType { - get { return default (ADAdType); } - } - - public virtual string? AdvertisingSection { - get { return default (string); } - set { } - } - - public virtual bool BannerLoaded { - get { return default (bool); } - } - - public virtual bool BannerViewActionInProgress { - get { return default (bool); } - } - - public virtual string? CurrentContentSizeIdentifier { - get { return default (string); } - set { } - } - - public IADBannerViewDelegate? Delegate { - get { return default (IADBannerViewDelegate); } - set { } - } - - public virtual NSSet? RequiredContentSizeIdentifiers { - get { return default (NSSet); } - set { } - } - - public virtual NSObject? WeakDelegate { - get { return default (NSObject); } - set { } - } - - public static NSString? SizeIdentifier320x50 { - get { return default (NSString); } - } - - public static NSString? SizeIdentifier480x32 { - get { return default (NSString); } - } - - public static NSString? SizeIdentifierLandscape { - get { return default (NSString); } - } - - public static NSString? SizeIdentifierPortrait { - get { return default (NSString); } - } - - public AdAction? ActionShouldBegin { - get { return default (AdAction); } - set { } - } - - public new static ADBannerViewAppearance? Appearance { - get { return default (ADBannerViewAppearance); } - } - - public event EventHandler ActionFinished { - add { } - remove { } - } - - public event EventHandler AdLoaded { - add { } - remove { } - } - - public event EventHandler FailedToReceiveAd { - add { } - remove { } - } - - public event EventHandler WillLoad { - add { } - remove { } - } - - public static CGSize GetClampedBannerSize (CGSize size) - { - return default (CGSize); - } - - public ADBannerView () - { - } - - public ADBannerView (NSCoder coder) - { - } - - protected ADBannerView (NSObjectFlag t) - { - } - - public ADBannerView (CGRect frame) - { - } - - public ADBannerView (ADAdType type) - { - } - - public virtual void CancelBannerViewAction () - { - } - - public static CGSize SizeFromContentSizeIdentifier (string sizeIdentifier) - { - return default (CGSize); - } - - protected override void Dispose (bool disposing) - { - } - - public new static ADBannerViewAppearance? GetAppearance () where T : ADBannerView - { - return default (ADBannerViewAppearance); - } - - public new static ADBannerViewAppearance? AppearanceWhenContainedIn (params Type [] containers) - { - return default (ADBannerViewAppearance); - } - - public new static ADBannerViewAppearance? GetAppearance (UITraitCollection traits) - { - return default (ADBannerViewAppearance); - } - - public new static ADBannerViewAppearance? GetAppearance (UITraitCollection traits, params Type [] containers) - { - return default (ADBannerViewAppearance); - } - - public new static ADBannerViewAppearance? GetAppearance (UITraitCollection traits) where T : ADBannerView - { - return default (ADBannerViewAppearance); - } - - public new static ADBannerViewAppearance? GetAppearance (UITraitCollection traits, params Type [] containers) where T : ADBannerView - { - return default (ADBannerViewAppearance); - } - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public class AdErrorEventArgs : EventArgs { - public NSError? Error { - get { return default (NSError); } - set { } - } - - public AdErrorEventArgs (NSError error) - { - } - } - - [Deprecated (PlatformName.iOS, 10, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public interface IADBannerViewDelegate : INativeObject, IDisposable { - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public static class ADBannerViewDelegate_Extensions { - - public static void AdLoaded (this IADBannerViewDelegate This, ADBannerView banner) - { - } - - public static void FailedToReceiveAd (this IADBannerViewDelegate This, ADBannerView banner, NSError error) - { - } - - public static bool ActionShouldBegin (this IADBannerViewDelegate This, ADBannerView banner, bool willLeaveApplication) - { - return default (bool); - } - - public static void ActionFinished (this IADBannerViewDelegate This, ADBannerView banner) - { - } - - public static void WillLoad (this IADBannerViewDelegate This, ADBannerView bannerView) - { - } - } - - [Deprecated (PlatformName.iOS, 10, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public class ADBannerViewDelegate : NSObject, IADBannerViewDelegate, INativeObject, IDisposable { - - public ADBannerViewDelegate () - { - } - - protected ADBannerViewDelegate (NSObjectFlag t) - { - } - - protected internal ADBannerViewDelegate (NativeHandle handle) - : base (handle) - { - } - - public virtual void ActionFinished (ADBannerView banner) - { - } - - public virtual bool ActionShouldBegin (ADBannerView banner, bool willLeaveApplication) - { - return default (bool); - } - - public virtual void AdLoaded (ADBannerView banner) - { - } - - public virtual void FailedToReceiveAd (ADBannerView banner, NSError error) - { - } - - public virtual void WillLoad (ADBannerView bannerView) - { - } - } - - // some of this API is still provided - public partial class ADClient : NSObject { - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public static NSString? ErrorDomain { - get { return default (NSString); } - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public virtual void DetermineAppInstallationAttribution (AttributedToiAdCompletionHandler completionHandler) - { - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public virtual void LookupAdConversionDetails (ADConversionDetails onCompleted) - { - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public virtual Task? LookupAdConversionDetailsAsync () - { - return default (Task); - } - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public class ADClientConversionDetailsResult { - public NSDate? AppPurchaseDate { - get { return default (NSDate); } - set { } - } - - public NSDate? IAdImpressionDate { - get { return default (NSDate); } - set { } - } - - public ADClientConversionDetailsResult (NSDate appPurchaseDate, NSDate iAdImpressionDate) - { - } - } - - [Deprecated (PlatformName.iOS, 10, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public class ADInterstitialAd : NSObject { - - protected internal ADInterstitialAd (IntPtr handle) - : base (handle) - { - } - - public unsafe override NativeHandle ClassHandle { - get { return default (IntPtr); } - } - - public virtual bool ActionInProgress { - get { return default (bool); } - } - - public IADInterstitialAdDelegate? Delegate { - get { return default (IADInterstitialAdDelegate); } - set { } - } - - public virtual bool Loaded { - get { return default (bool); } - } - - public virtual NSObject? WeakDelegate { - get { return default (NSObject); } - set { } - } - - public ADPredicate? ActionShouldBegin { - get { return default (ADPredicate); } - set { } - } - - public event EventHandler ActionFinished { - add { } - remove { } - } - - public event EventHandler AdLoaded { - add { } - remove { } - } - - public event EventHandler AdUnloaded { - add { } - remove { } - } - - public event EventHandler FailedToReceiveAd { - add { } - remove { } - } - - public event EventHandler WillLoad { - add { } - remove { } - } - - public ADInterstitialAd () - { - } - - protected ADInterstitialAd (NSObjectFlag t) - { - } - - public virtual void CancelAction () - { - } - - public virtual void PresentFromViewController (UIViewController viewController) - { - } - - public virtual bool PresentInView (UIView containerView) - { - return default (bool); - } - - protected override void Dispose (bool disposing) - { - } - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public class ADErrorEventArgs : EventArgs { - public NSError? Error { - get { return default (NSError); } - set { } - } - - public ADErrorEventArgs (NSError error) - { - } - } - - [Deprecated (PlatformName.iOS, 10, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public interface IADInterstitialAdDelegate : INativeObject, IDisposable { - - void AdUnloaded (ADInterstitialAd interstitialAd); - - void FailedToReceiveAd (ADInterstitialAd interstitialAd, NSError error); - - void AdLoaded (ADInterstitialAd interstitialAd); - - bool ActionShouldBegin (ADInterstitialAd interstitialAd, bool willLeaveApplication); - - void ActionFinished (ADInterstitialAd interstitialAd); - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public static class ADInterstitialAdDelegate_Extensions { - public static void WillLoad (this IADInterstitialAdDelegate This, ADInterstitialAd interstitialAd) - { - } - } - - [Deprecated (PlatformName.iOS, 10, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public abstract class ADInterstitialAdDelegate : NSObject, IADInterstitialAdDelegate, INativeObject, IDisposable { - - protected ADInterstitialAdDelegate () - { - } - - protected ADInterstitialAdDelegate (NSObjectFlag t) - { - } - - protected internal ADInterstitialAdDelegate (NativeHandle handle) - : base (handle) - { - } - - public abstract void ActionFinished (ADInterstitialAd interstitialAd); - - public abstract bool ActionShouldBegin (ADInterstitialAd interstitialAd, bool willLeaveApplication); - - public abstract void AdLoaded (ADInterstitialAd interstitialAd); - - public abstract void AdUnloaded (ADInterstitialAd interstitialAd); - - public abstract void FailedToReceiveAd (ADInterstitialAd interstitialAd, NSError error); - - public virtual void WillLoad (ADInterstitialAd interstitialAd) - { - } - } - - [Deprecated (PlatformName.iOS, 13, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public class ADInterstitialAdPresentationViewController : UIViewController { - - public unsafe override NativeHandle ClassHandle { - get { return default (NativeHandle); } - } - - public ADInterstitialAdPresentationViewController (NSCoder coder) - { - } - - protected ADInterstitialAdPresentationViewController (NSObjectFlag t) - { - } - - protected internal ADInterstitialAdPresentationViewController (IntPtr handle) - { - } - - public ADInterstitialAdPresentationViewController (string? nibName, NSBundle? bundle) - { - } - - public ADInterstitialAdPresentationViewController (ADInterstitialAd interstitialAd) - { - } - - public virtual bool ShouldTestVisibility (CGPoint point) - { - return default (bool); - } - } - - [Deprecated (PlatformName.iOS, 10, 0, PlatformArchitecture.None, null)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public static class IAdAdditions { - - public static bool DisplayingBannerAd (this UIViewController This) - { - return default (bool); - } - - public static bool GetCanDisplayBannerAds (this UIViewController This) - { - return default (bool); - } - - public static ADInterstitialPresentationPolicy GetInterstitialPresentationPolicy (this UIViewController This) - { - return default (ADInterstitialPresentationPolicy); - } - - public static UIView? GetOriginalContentView (this UIViewController This) - { - return default (UIView); - } - - public static bool PresentingFullScreenAd (this UIViewController This) - { - return default (bool); - } - - public static bool RequestInterstitialAdPresentation (this UIViewController This) - { - return default (bool); - } - - public static void SetCanDisplayBannerAds (this UIViewController This, bool value) - { - } - - public static void SetInterstitialPresentationPolicy (this UIViewController This, ADInterstitialPresentationPolicy policy) - { - } - - public static bool ShouldPresentInterstitialAd (this UIViewController This) - { - return default (bool); - } - } - - [Deprecated (PlatformName.iOS, 9, 0, PlatformArchitecture.None, "Use 'iAdPreroll_AVPlayerViewController' instead.")] - [Obsoleted (PlatformName.iOS, 12, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public static class IAdPreroll { - - public static void CancelPreroll (this MPMoviePlayerController This) - { - } - - public static void PlayPrerollAd (this MPMoviePlayerController This, Action completionHandler) - { - } - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public static class iAdPreroll_AVPlayerViewController { - - public static void CancelPreroll (this AVPlayerViewController This) - { - } - - public static void PlayPrerollAd (this AVPlayerViewController This, Action completionHandler) - { - } - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public static class ADErrorExtensions { - - public static NSString? GetDomain (this ADError self) - { - return default (NSString?); - } - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public delegate void ADConversionDetails (NSDate? appPurchaseDate, NSDate? iAdImpressionDate); - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public delegate bool ADPredicate (ADInterstitialAd interstitialAd, bool willLeaveApplication); - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public delegate bool AdAction (ADBannerView banner, bool willLeaveApplication); - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - public delegate void AttributedToiAdCompletionHandler (bool attributedToiAd); -} - -#endif // !NET diff --git a/src/iAd/iAd.cs b/src/iAd/iAd.cs deleted file mode 100644 index 77220f340579..000000000000 --- a/src/iAd/iAd.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// iAd.cs: definitions -// -// Author: -// Miguel de Icaza -// -// Copyright 2011-2014, 2016 Xamarin Inc -// - -#if !NET - -using System; -using ObjCRuntime; - -namespace iAd { - - // NSInteger -> ADBannerView.h - [Deprecated (PlatformName.iOS, 10, 0)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - [Native] - public enum ADError : long { - Unknown, - ServerFailure, - LoadingThrottled, - InventoryUnavailable, - ConfigurationError, - BannerVisibleWithoutContent, - ApplicationInactive, - AdUnloaded, - AssetLoadFailure, - AdResponseValidateFailure, - AdAssetLoadPending, - } - - // NSInteger -> ADBannerView.h - [Deprecated (PlatformName.iOS, 10, 0)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - [Native] - public enum ADAdType : long { - Banner, MediumRectangle - } - - // NSInteger -> UIViewControlleriAdAdditions.h - [Deprecated (PlatformName.iOS, 10, 0)] - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - [Native] - public enum ADInterstitialPresentationPolicy : long { - None = 0, - Automatic, - Manual, - } - - [Obsoleted (PlatformName.iOS, 15, 0, PlatformArchitecture.None, Constants.iAdRemoved)] - [Native] - [ErrorDomain ("ADClientErrorDomain")] - public enum ADClientError : long { - Unknown = 0, - TrackingRestrictedOrDenied = 1, - [Obsolete ("Use 'TrackingRestrictedOrDenied' instead.")] - LimitAdTracking = TrackingRestrictedOrDenied, - MissingData = 2, - CorruptResponse = 3, - RequestClientError = 4, - RequestServerError = 5, - RequestNetworkError = 6, - UnsupportedPlatform = 7, - } -} - -#endif // !NET diff --git a/src/iad.cs b/src/iad.cs deleted file mode 100644 index 4dd94a577191..000000000000 --- a/src/iad.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -// AdLib bindings. -// -// Authors: -// Miguel de Icaza -// -// Copyright 2010, Novell, Inc. -// Copyright 2011-2014 Xamarin Inc. All rights reserved. -// -#if !NET -using ObjCRuntime; -using Foundation; -using System; - -namespace iAd { - - // Xcode 13 (beta1) removed most of the API - // AppStore also started to reject apps using those API - - [Deprecated (PlatformName.iOS, 14, 5, message: "Use 'AAAttribution' instead.")] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface ADClient { - [Static] - [Export ("sharedClient")] - ADClient SharedClient { get; } - - [Deprecated (PlatformName.iOS, 13, 0)] - [Export ("addClientToSegments:replaceExisting:")] - void AddClientToSegments (string [] segmentIdentifiers, bool replaceExisting); - - [Export ("requestAttributionDetailsWithBlock:")] - [Async] - void RequestAttributionDetails (Action completionHandler); - } -} -#endif // !NET diff --git a/src/identitylookup.cs b/src/identitylookup.cs index a7feb14fab7d..28052ae334dd 100644 --- a/src/identitylookup.cs +++ b/src/identitylookup.cs @@ -20,7 +20,6 @@ namespace IdentityLookup { /// Enumerates actions that can be taken in response to a message. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -41,7 +40,6 @@ public enum ILMessageFilterAction : long { } [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [ErrorDomain ("ILMessageFilterErrorDomain")] @@ -56,7 +54,6 @@ public enum ILMessageFilterError : long { /// Enumerates message classification actions. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -67,7 +64,7 @@ enum ILClassificationAction : long { ReportJunkAndBlockSender = 3, } - [NoWatch, NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] + [NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] [Native] public enum ILMessageFilterSubAction : long { None = 0, @@ -87,7 +84,6 @@ public enum ILMessageFilterSubAction : long { /// Base class for message filter extensions. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] @@ -97,7 +93,6 @@ interface ILMessageFilterExtension { /// Represents the extension context for a message filter. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] @@ -113,7 +108,6 @@ interface IILMessageFilterQueryHandling { } /// Interface that is used by a message filter extension to respond to queries. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Protocol] @@ -126,7 +120,6 @@ interface ILMessageFilterQueryHandling { /// Represents a request to a message filter to examine a message from an unknown sender for filtering. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -139,14 +132,13 @@ interface ILMessageFilterQueryRequest : NSSecureCoding { [NullAllowed, Export ("messageBody")] string MessageBody { get; } - [NoWatch, NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] + [NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] [NullAllowed, Export ("receiverISOCountryCode")] string ReceiverIsoCountryCode { get; } } /// Represents a message query response. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] @@ -156,14 +148,13 @@ interface ILMessageFilterQueryResponse : NSSecureCoding { [Export ("action", ArgumentSemantic.Assign)] ILMessageFilterAction Action { get; set; } - [NoWatch, NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] + [NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] [Export ("subAction", ArgumentSemantic.Assign)] ILMessageFilterSubAction SubAction { get; set; } } /// Represents a response to a network request by the filter extension. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -179,7 +170,6 @@ interface ILNetworkResponse : NSSecureCoding { /// A classification request. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (ILClassificationRequest))] @@ -192,7 +182,6 @@ interface ILCallClassificationRequest : NSSecureCoding { /// An incoming call. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (ILCommunication))] @@ -206,7 +195,6 @@ interface ILCallCommunication { /// Base class for classes that support users in reporting unwanted communications. [Abstract] [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -217,7 +205,6 @@ interface ILClassificationRequest : NSSecureCoding { /// Handles the classification of messages to mark them as junk, mark them as not junk, and/or to block the sender. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -243,7 +230,6 @@ interface ILClassificationResponse : NSSecureCoding { /// Base class for incoming calls and messages. [Abstract] [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -262,7 +248,6 @@ interface ILCommunication : NSSecureCoding { /// A request to report a message. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (ILClassificationRequest))] @@ -275,7 +260,6 @@ interface ILMessageClassificationRequest : NSSecureCoding { /// An incoming SMS message. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (ILCommunication))] @@ -289,7 +273,7 @@ interface ILMessageCommunication { bool IsEqualTo (ILMessageCommunication communication); } - [NoWatch, NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] + [NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] [Protocol] interface ILMessageFilterCapabilitiesQueryHandling { [Abstract] @@ -297,7 +281,7 @@ interface ILMessageFilterCapabilitiesQueryHandling { void HandleQueryRequest (ILMessageFilterCapabilitiesQueryRequest capabilitiesQueryRequest, ILMessageFilterExtensionContext context, Action completion); } - [NoWatch, NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] + [NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] [BaseType (typeof (NSObject))] interface ILMessageFilterCapabilitiesQueryResponse : NSSecureCoding { [BindAs (typeof (ILMessageFilterSubAction []))] @@ -309,7 +293,7 @@ interface ILMessageFilterCapabilitiesQueryResponse : NSSecureCoding { NSNumber [] PromotionalSubActions { get; set; } } - [NoWatch, NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] + [NoTV, NoMac, MacCatalyst (16, 0), iOS (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface ILMessageFilterCapabilitiesQueryRequest : NSSecureCoding { diff --git a/src/imageio.cs b/src/imageio.cs index 99b95446e7c1..116802c1bfd5 100644 --- a/src/imageio.cs +++ b/src/imageio.cs @@ -66,22 +66,21 @@ interface CGImageProperties { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyHEICSDictionary")] NSString HeicsDictionary { get; } - [iOS (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), TV (14, 0)] [MacCatalyst (14, 0)] [Field ("kCGImagePropertyWebPDictionary")] NSString WebPDictionary { get; } - [iOS (14, 1), TV (14, 2), Watch (7, 1)] + [iOS (14, 1), TV (14, 2)] [MacCatalyst (14, 1)] [Field ("kCGImagePropertyTGADictionary")] NSString TgaDictionary { get; } - [Mac (14, 0), iOS (17, 0), TV (17, 0), Watch (10, 0), MacCatalyst (17, 0)] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] [Field ("kCGImagePropertyAVISDictionary")] NSString AvisDictionary { get; } @@ -266,17 +265,17 @@ interface CGImageProperties { [Field ("kCGImagePropertyExifGamma")] NSString ExifGamma { get; } - [iOS (13, 1), TV (13, 1), Watch (6, 1)] + [iOS (13, 1), TV (13, 1)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyExifCompositeImage")] NSString ExifCompositeImage { get; } - [iOS (13, 1), TV (13, 1), Watch (6, 1)] + [iOS (13, 1), TV (13, 1)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyExifSourceImageNumberOfCompositeImage")] NSString ExifSourceImageNumberOfCompositeImage { get; } - [iOS (13, 1), TV (13, 1), Watch (6, 1)] + [iOS (13, 1), TV (13, 1)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyExifSourceExposureTimesOfCompositeImage")] NSString ExifSourceExposureTimesOfCompositeImage { get; } @@ -343,21 +342,18 @@ interface CGImageProperties { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyGIFCanvasPixelWidth")] NSString GifCanvasPixelWidth { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyGIFCanvasPixelHeight")] NSString GifCanvasPixelHeight { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyGIFFrameInfoArray")] NSString GifFrameInfoArray { get; } @@ -594,7 +590,7 @@ interface CGImageProperties { NSString PNGSoftware { get; } [Field ("kCGImagePropertyPNGTitle")] NSString PNGTitle { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyPNGPixelsAspectRatio")] NSString PNGPixelsAspectRatio { get; } @@ -616,46 +612,39 @@ interface CGImageProperties { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyAPNGFrameInfoArray")] NSString ApngFrameInfoArray { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyAPNGCanvasPixelWidth")] NSString ApngCanvasPixelWidth { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyAPNGCanvasPixelHeight")] NSString ApngCanvasPixelHeight { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyPNGComment")] NSString PNGComment { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyPNGDisclaimer")] NSString PNGDisclaimer { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyPNGSource")] NSString PNGSource { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyPNGWarning")] NSString PNGWarning { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("kCGImagePropertyPNGTransparency")] NSString PNGTransparency { get; } @@ -680,10 +669,10 @@ interface CGImageProperties { NSString TIFFXResolution { get; } [Field ("kCGImagePropertyTIFFYResolution")] NSString TIFFYResolution { get; } - [Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4), TV (17, 4), Watch (10, 4)] + [Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4), TV (17, 4)] [Field ("kCGImagePropertyTIFFXPosition")] NSString TIFFXPosition { get; } - [Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4), TV (17, 4), Watch (10, 4)] + [Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4), TV (17, 4)] [Field ("kCGImagePropertyTIFFYPosition")] NSString TIFFYPosition { get; } [Field ("kCGImagePropertyTIFFResolutionUnit")] @@ -805,332 +794,266 @@ interface CGImageProperties { [Field ("kCGImagePropertyDNGFixVignetteRadial")] NSString DNGFixVignetteRadial { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGActiveArea")] NSString DNGActiveArea { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGAnalogBalance")] NSString DNGAnalogBalance { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGAntiAliasStrength")] NSString DNGAntiAliasStrength { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGAsShotICCProfile")] NSString DNGAsShotICCProfile { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGAsShotPreProfileMatrix")] NSString DNGAsShotPreProfileMatrix { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGAsShotProfileName")] NSString DNGAsShotProfileName { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGBaselineExposureOffset")] NSString DNGBaselineExposureOffset { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGBayerGreenSplit")] NSString DNGBayerGreenSplit { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGBestQualityScale")] NSString DNGBestQualityScale { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGBlackLevelDeltaH")] NSString DNGBlackLevelDeltaHorizontal { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGBlackLevelDeltaV")] NSString DNGBlackLevelDeltaVertical { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGBlackLevelRepeatDim")] NSString DNGBlackLevelRepeatDim { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGCFALayout")] NSString DNGCfaLayout { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGCFAPlaneColor")] NSString DNGCfaPlaneColor { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGChromaBlurRadius")] NSString DNGChromaBlurRadius { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGColorimetricReference")] NSString DNGColorimetricReference { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGCurrentICCProfile")] NSString DNGCurrentICCProfile { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGCurrentPreProfileMatrix")] NSString DNGCurrentPreProfileMatrix { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGDefaultBlackRender")] NSString DNGDefaultBlackRender { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGDefaultCropOrigin")] NSString DNGDefaultCropOrigin { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGDefaultCropSize")] NSString DNGDefaultCropSize { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGDefaultScale")] NSString DNGDefaultScale { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGDefaultUserCrop")] NSString DNGDefaultUserCrop { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGExtraCameraProfiles")] NSString DNGExtraCameraProfiles { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGForwardMatrix1")] NSString DNGForwardMatrix1 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGForwardMatrix2")] NSString DNGForwardMatrix2 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGLinearizationTable")] NSString DNGLinearizationTable { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGLinearResponseLimit")] NSString DNGLinearResponseLimit { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGMakerNoteSafety")] NSString DNGMakerNoteSafety { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGMaskedAreas")] NSString DNGMaskedAreas { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGNewRawImageDigest")] NSString DNGNewRawImageDigest { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGNoiseReductionApplied")] NSString DNGNoiseReductionApplied { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOpcodeList1")] NSString DNGOpcodeList1 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOpcodeList2")] NSString DNGOpcodeList2 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOpcodeList3")] NSString DNGOpcodeList3 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOriginalBestQualityFinalSize")] NSString DNGOriginalBestQualityFinalSize { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOriginalDefaultCropSize")] NSString DNGOriginalDefaultCropSize { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOriginalDefaultFinalSize")] NSString DNGOriginalDefaultFinalSize { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOriginalRawFileData")] NSString DNGOriginalRawFileData { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOriginalRawFileDigest")] NSString DNGOriginalRawFileDigest { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGOriginalRawFileName")] NSString DNGOriginalRawFileName { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGPreviewApplicationName")] NSString DNGPreviewApplicationName { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGPreviewApplicationVersion")] NSString DNGPreviewApplicationVersion { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGPreviewColorSpace")] NSString DNGPreviewColorSpace { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGPreviewDateTime")] NSString DNGPreviewDateTime { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGPreviewSettingsDigest")] NSString DNGPreviewSettingsDigest { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGPreviewSettingsName")] NSString DNGPreviewSettingsName { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileCopyright")] NSString DNGProfileCopyright { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileEmbedPolicy")] NSString DNGProfileEmbedPolicy { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileHueSatMapData1")] NSString DNGProfileHueSatMapData1 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileHueSatMapData2")] NSString DNGProfileHueSatMapData2 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileHueSatMapDims")] NSString DNGProfileHueSatMapDims { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileHueSatMapEncoding")] NSString DNGProfileHueSatMapEncoding { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileLookTableData")] NSString DNGProfileLookTableData { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileLookTableDims")] NSString DNGProfileLookTableDims { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileLookTableEncoding")] NSString DNGProfileLookTableEncoding { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileName")] NSString DNGProfileName { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGProfileToneCurve")] NSString DNGProfileToneCurve { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGRawDataUniqueID")] NSString DNGRawDataUniqueId { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGRawImageDigest")] NSString DNGRawImageDigest { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGRawToPreviewGain")] NSString DNGRawToPreviewGain { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGReductionMatrix1")] NSString DNGReductionMatrix1 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGReductionMatrix2")] NSString DNGReductionMatrix2 { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGRowInterleaveFactor")] NSString DNGRowInterleaveFactor { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGShadowScale")] NSString DNGShadowScale { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyDNGSubTileBlockSize")] NSString DNGSubTileBlockSize { get; } @@ -1189,42 +1112,36 @@ interface CGImageProperties { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyHEICSLoopCount")] NSString HeicsLoopCount { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyHEICSDelayTime")] NSString HeicsDelayTime { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyHEICSUnclampedDelayTime")] NSString HeicsSUnclampedDelayTime { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyHEICSCanvasPixelWidth")] NSString HeicsCanvasPixelWidth { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyHEICSCanvasPixelHeight")] NSString HeicsCanvasPixelHeight { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyHEICSFrameInfoArray")] NSString HeicsFrameInfoArray { get; } @@ -1308,21 +1225,18 @@ interface CGImageProperties { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyExifOffsetTime")] NSString ExifOffsetTime { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyExifOffsetTimeOriginal")] NSString ExifOffsetTimeOriginal { get; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyExifOffsetTimeDigitized")] NSString ExifOffsetTimeDigitized { get; } @@ -1336,7 +1250,7 @@ interface CGImageProperties { [Field ("kCGImagePropertyImageCount")] NSString ImageCount { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyImageIndex")] NSString ImageIndex { get; } @@ -1380,912 +1294,730 @@ interface CGImageProperties { [Field ("kCGImagePropertyFileContentsDictionary")] NSString FileContentsDictionary { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyOpenEXRDictionary")] NSString OpenExrDictionary { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAboutCvTerm")] NSString IPTCExtAboutCvTerm { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAboutCvTermCvId")] NSString IPTCExtAboutCvTermCvId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAboutCvTermId")] NSString IPTCExtAboutCvTermId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAboutCvTermName")] NSString IPTCExtAboutCvTermName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAboutCvTermRefinedAbout")] NSString IPTCExtAboutCvTermRefinedAbout { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAddlModelInfo")] NSString IPTCExtAddlModelInfo { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkOrObject")] NSString IPTCExtArtworkOrObject { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkCircaDateCreated")] NSString IPTCExtArtworkCircaDateCreated { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkContentDescription")] NSString IPTCExtArtworkContentDescription { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkContributionDescription")] NSString IPTCExtArtworkContributionDescription { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkCopyrightNotice")] NSString IPTCExtArtworkCopyrightNotice { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkCreator")] NSString IPTCExtArtworkCreator { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkCreatorID")] NSString IPTCExtArtworkCreatorId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkCopyrightOwnerID")] NSString IPTCExtArtworkCopyrightOwnerId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkCopyrightOwnerName")] NSString IPTCExtArtworkCopyrightOwnerName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkLicensorID")] NSString IPTCExtArtworkLicensorId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkLicensorName")] NSString IPTCExtArtworkLicensorName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkDateCreated")] NSString IPTCExtArtworkDateCreated { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkPhysicalDescription")] NSString IPTCExtArtworkPhysicalDescription { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkSource")] NSString IPTCExtArtworkSource { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkSourceInventoryNo")] NSString IPTCExtArtworkSourceInventoryNo { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkSourceInvURL")] NSString IPTCExtArtworkSourceInvUrl { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkStylePeriod")] NSString IPTCExtArtworkStylePeriod { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtArtworkTitle")] NSString IPTCExtArtworkTitle { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAudioBitrate")] NSString IPTCExtAudioBitrate { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAudioBitrateMode")] NSString IPTCExtAudioBitrateMode { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtAudioChannelCount")] NSString IPTCExtAudioChannelCount { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtCircaDateCreated")] NSString IPTCExtCircaDateCreated { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtContainerFormat")] NSString IPTCExtContainerFormat { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtContainerFormatIdentifier")] NSString IPTCExtContainerFormatIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtContainerFormatName")] NSString IPTCExtContainerFormatName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtContributor")] NSString IPTCExtContributor { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtContributorIdentifier")] NSString IPTCExtContributorIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtContributorName")] NSString IPTCExtContributorName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtContributorRole")] NSString IPTCExtContributorRole { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtCopyrightYear")] NSString IPTCExtCopyrightYear { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtCreator")] NSString IPTCExtCreator { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtCreatorIdentifier")] NSString IPTCExtCreatorIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtCreatorName")] NSString IPTCExtCreatorName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtCreatorRole")] NSString IPTCExtCreatorRole { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtControlledVocabularyTerm")] NSString IPTCExtControlledVocabularyTerm { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreen")] NSString IPTCExtDataOnScreen { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegion")] NSString IPTCExtDataOnScreenRegion { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegionD")] NSString IPTCExtDataOnScreenRegionD { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegionH")] NSString IPTCExtDataOnScreenRegionH { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegionText")] NSString IPTCExtDataOnScreenRegionText { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegionUnit")] NSString IPTCExtDataOnScreenRegionUnit { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegionW")] NSString IPTCExtDataOnScreenRegionW { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegionX")] NSString IPTCExtDataOnScreenRegionX { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDataOnScreenRegionY")] NSString IPTCExtDataOnScreenRegionY { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDigitalImageGUID")] NSString IPTCExtDigitalImageGuid { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDigitalSourceFileType")] NSString IPTCExtDigitalSourceFileType { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDigitalSourceType")] NSString IPTCExtDigitalSourceType { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDopesheet")] NSString IPTCExtDopesheet { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDopesheetLink")] NSString IPTCExtDopesheetLink { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDopesheetLinkLink")] NSString IPTCExtDopesheetLinkLink { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtDopesheetLinkLinkQualifier")] NSString IPTCExtDopesheetLinkLinkQualifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEmbdEncRightsExpr")] NSString IPTCExtEmbdEncRightsExpr { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEmbeddedEncodedRightsExpr")] NSString IPTCExtEmbeddedEncodedRightsExpr { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEmbeddedEncodedRightsExprType")] NSString IPTCExtEmbeddedEncodedRightsExprType { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEmbeddedEncodedRightsExprLangID")] NSString IPTCExtEmbeddedEncodedRightsExprLangId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEpisode")] NSString IPTCExtEpisode { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEpisodeIdentifier")] NSString IPTCExtEpisodeIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEpisodeName")] NSString IPTCExtEpisodeName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEpisodeNumber")] NSString IPTCExtEpisodeNumber { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtEvent")] NSString IPTCExtEvent { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtShownEvent")] NSString IPTCExtShownEvent { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtShownEventIdentifier")] NSString IPTCExtShownEventIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtShownEventName")] NSString IPTCExtShownEventName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtExternalMetadataLink")] NSString IPTCExtExternalMetadataLink { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtFeedIdentifier")] NSString IPTCExtFeedIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtGenre")] NSString IPTCExtGenre { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtGenreCvId")] NSString IPTCExtGenreCvId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtGenreCvTermId")] NSString IPTCExtGenreCvTermId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtGenreCvTermName")] NSString IPTCExtGenreCvTermName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtGenreCvTermRefinedAbout")] NSString IPTCExtGenreCvTermRefinedAbout { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtHeadline")] NSString IPTCExtHeadline { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtIPTCLastEdited")] NSString IPTCExtIPTCLastEdited { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLinkedEncRightsExpr")] NSString IPTCExtLinkedEncRightsExpr { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLinkedEncodedRightsExpr")] NSString IPTCExtLinkedEncodedRightsExpr { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLinkedEncodedRightsExprType")] NSString IPTCExtLinkedEncodedRightsExprType { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLinkedEncodedRightsExprLangID")] NSString IPTCExtLinkedEncodedRightsExprLangId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationCreated")] NSString IPTCExtLocationCreated { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationCity")] NSString IPTCExtLocationCity { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationCountryCode")] NSString IPTCExtLocationCountryCode { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationCountryName")] NSString IPTCExtLocationCountryName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationGPSAltitude")] NSString IPTCExtLocationGpsAltitude { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationGPSLatitude")] NSString IPTCExtLocationGpsLatitude { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationGPSLongitude")] NSString IPTCExtLocationGpsLongitude { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationIdentifier")] NSString IPTCExtLocationIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationLocationId")] NSString IPTCExtLocationLocationId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationLocationName")] NSString IPTCExtLocationLocationName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationProvinceState")] NSString IPTCExtLocationProvinceState { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationSublocation")] NSString IPTCExtLocationSublocation { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationWorldRegion")] NSString IPTCExtLocationWorldRegion { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtLocationShown")] NSString IPTCExtLocationShown { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtMaxAvailHeight")] NSString IPTCExtMaxAvailHeight { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtMaxAvailWidth")] NSString IPTCExtMaxAvailWidth { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtModelAge")] NSString IPTCExtModelAge { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtOrganisationInImageCode")] NSString IPTCExtOrganisationInImageCode { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtOrganisationInImageName")] NSString IPTCExtOrganisationInImageName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonHeard")] NSString IPTCExtPersonHeard { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonHeardIdentifier")] NSString IPTCExtPersonHeardIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonHeardName")] NSString IPTCExtPersonHeardName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImage")] NSString IPTCExtPersonInImage { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageWDetails")] NSString IPTCExtPersonInImageWDetails { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageCharacteristic")] NSString IPTCExtPersonInImageCharacteristic { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageCvTermCvId")] NSString IPTCExtPersonInImageCvTermCvId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageCvTermId")] NSString IPTCExtPersonInImageCvTermId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageCvTermName")] NSString IPTCExtPersonInImageCvTermName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageCvTermRefinedAbout")] NSString IPTCExtPersonInImageCvTermRefinedAbout { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageDescription")] NSString IPTCExtPersonInImageDescription { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageId")] NSString IPTCExtPersonInImageId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPersonInImageName")] NSString IPTCExtPersonInImageName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtProductInImage")] NSString IPTCExtProductInImage { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtProductInImageDescription")] NSString IPTCExtProductInImageDescription { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtProductInImageGTIN")] NSString IPTCExtProductInImageGtin { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtProductInImageName")] NSString IPTCExtProductInImageName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPublicationEvent")] NSString IPTCExtPublicationEvent { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPublicationEventDate")] NSString IPTCExtPublicationEventDate { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPublicationEventIdentifier")] NSString IPTCExtPublicationEventIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtPublicationEventName")] NSString IPTCExtPublicationEventName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRating")] NSString IPTCExtRating { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRatingRegion")] NSString IPTCExtRatingRatingRegion { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionCity")] NSString IPTCExtRatingRegionCity { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionCountryCode")] NSString IPTCExtRatingRegionCountryCode { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionCountryName")] NSString IPTCExtRatingRegionCountryName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionGPSAltitude")] NSString IPTCExtRatingRegionGpsAltitude { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionGPSLatitude")] NSString IPTCExtRatingRegionGpsLatitude { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionGPSLongitude")] NSString IPTCExtRatingRegionGpsLongitude { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionIdentifier")] NSString IPTCExtRatingRegionIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionLocationId")] NSString IPTCExtRatingRegionLocationId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionLocationName")] NSString IPTCExtRatingRegionLocationName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionProvinceState")] NSString IPTCExtRatingRegionProvinceState { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionSublocation")] NSString IPTCExtRatingRegionSublocation { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingRegionWorldRegion")] NSString IPTCExtRatingRegionWorldRegion { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingScaleMaxValue")] NSString IPTCExtRatingScaleMaxValue { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingScaleMinValue")] NSString IPTCExtRatingScaleMinValue { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingSourceLink")] NSString IPTCExtRatingSourceLink { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingValue")] NSString IPTCExtRatingValue { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRatingValueLogoLink")] NSString IPTCExtRatingValueLogoLink { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRegistryID")] NSString IPTCExtRegistryId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRegistryEntryRole")] NSString IPTCExtRegistryEntryRole { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRegistryItemID")] NSString IPTCExtRegistryItemId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtRegistryOrganisationID")] NSString IPTCExtRegistryOrganisationId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtReleaseReady")] NSString IPTCExtReleaseReady { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSeason")] NSString IPTCExtSeason { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSeasonIdentifier")] NSString IPTCExtSeasonIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSeasonName")] NSString IPTCExtSeasonName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSeasonNumber")] NSString IPTCExtSeasonNumber { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSeries")] NSString IPTCExtSeries { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSeriesIdentifier")] NSString IPTCExtSeriesIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSeriesName")] NSString IPTCExtSeriesName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtStorylineIdentifier")] NSString IPTCExtStorylineIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtStreamReady")] NSString IPTCExtStreamReady { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtStylePeriod")] NSString IPTCExtStylePeriod { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSupplyChainSource")] NSString IPTCExtSupplyChainSource { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSupplyChainSourceIdentifier")] NSString IPTCExtSupplyChainSourceIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtSupplyChainSourceName")] NSString IPTCExtSupplyChainSourceName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtTemporalCoverage")] NSString IPTCExtTemporalCoverage { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtTemporalCoverageFrom")] NSString IPTCExtTemporalCoverageFrom { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtTemporalCoverageTo")] NSString IPTCExtTemporalCoverageTo { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtTranscript")] NSString IPTCExtTranscript { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtTranscriptLink")] NSString IPTCExtTranscriptLink { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtTranscriptLinkLink")] NSString IPTCExtTranscriptLinkLink { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtTranscriptLinkLinkQualifier")] NSString IPTCExtTranscriptLinkLinkQualifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoBitrate")] NSString IPTCExtVideoBitrate { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoBitrateMode")] NSString IPTCExtVideoBitrateMode { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoDisplayAspectRatio")] NSString IPTCExtVideoDisplayAspectRatio { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoEncodingProfile")] NSString IPTCExtVideoEncodingProfile { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoShotType")] NSString IPTCExtVideoShotType { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoShotTypeIdentifier")] NSString IPTCExtVideoShotTypeIdentifier { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoShotTypeName")] NSString IPTCExtVideoShotTypeName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVideoStreamsCount")] NSString IPTCExtVideoStreamsCount { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtVisualColor")] NSString IPTCExtVisualColor { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtWorkflowTag")] NSString IPTCExtWorkflowTag { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtWorkflowTagCvId")] NSString IPTCExtWorkflowTagCvId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtWorkflowTagCvTermId")] NSString IPTCExtWorkflowTagCvTermId { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtWorkflowTagCvTermName")] NSString IPTCExtWorkflowTagCvTermName { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyIPTCExtWorkflowTagCvTermRefinedAbout")] NSString IPTCExtWorkflowTagCvTermRefinedAbout { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImagePropertyOpenEXRAspectRatio")] NSString OpenExrAspectRatio { get; } @@ -2298,124 +2030,118 @@ interface CGImageProperties { [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGImagePropertyWebPLoopCount")] NSString WebPLoopCount { get; } [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGImagePropertyWebPDelayTime")] NSString WebPDelayTime { get; } [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGImagePropertyWebPUnclampedDelayTime")] NSString WebPUnclampedDelayTime { get; } [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGImagePropertyWebPFrameInfoArray")] NSString WebPFrameInfoArray { get; } [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGImagePropertyWebPCanvasPixelWidth")] NSString WebPCanvasPixelWidth { get; } [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("kCGImagePropertyWebPCanvasPixelHeight")] NSString WebPCanvasPixelHeight { get; } - [iOS (14, 1), TV (14, 2), Watch (7, 1)] + [iOS (14, 1), TV (14, 2)] [MacCatalyst (14, 1)] [Field ("kCGImagePropertyTGACompression")] NSString TgaCompression { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupImageIndexLeft")] NSString GroupImageIndexLeft { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupImageIndexRight")] NSString GroupImageIndexRight { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupImageIsAlternateImage")] NSString GroupImageIsAlternateImage { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupImageIsLeftImage")] NSString GroupImageIsLeftImage { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupImageIsRightImage")] NSString GroupImageIsRightImage { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupImagesAlternate")] NSString GroupImagesAlternate { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupIndex")] NSString GroupIndex { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroups")] NSString Groups { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupType")] NSString GroupType { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupTypeStereoPair")] NSString GroupTypeStereoPair { get; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kCGImagePropertyGroupTypeAlternate")] NSString GroupTypeAlternate { get; } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] [Field ("kCGImagePropertyGroupImageBaseline")] NSString GroupImageBaseline { get; } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] [Field ("kCGImagePropertyGroupImageDisparityAdjustment")] NSString GroupImageDisparityAdjustment { get; } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] [Field ("kCGImagePropertyHEIFDictionary")] NSString HeifDictionary { get; } - [iOS (16, 4), Mac (13, 3), Watch (9, 4), TV (16, 4), MacCatalyst (16, 4)] + [iOS (16, 4), Mac (13, 3), TV (16, 4), MacCatalyst (16, 4)] [Field ("kCGImagePropertyOpenEXRCompression")] NSString OpenExrCompression { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImagePropertyGroupImageIndexMonoscopic")] NSString GroupImageIndexMonoscopic { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImagePropertyGroupImageIsMonoscopicImage")] NSString GroupImageIsMonoscopicImage { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImagePropertyGroupImageStereoAggressors")] NSString GroupImageStereoAggressors { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImagePropertyGroupMonoscopicImageLocation")] NSString GroupMonoscopicImageLocation { get; } } @@ -2442,7 +2168,6 @@ interface CGImageMetadataTagNamespaces { NSString XMPBasic { get; } [Field ("kCGImageMetadataNamespaceXMPRights")] NSString XMPRights { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImageMetadataNamespaceIPTCExtension")] NSString IPTCExtension { get; } @@ -2470,7 +2195,6 @@ interface CGImageMetadataTagPrefixes { NSString XMPBasic { get; } [Field ("kCGImageMetadataPrefixXMPRights")] NSString XMPRights { get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Field ("kCGImageMetadataPrefixIPTCExtension")] NSString IPTCExtension { get; } @@ -2528,7 +2252,7 @@ interface CGImageThumbnailOptions { } [Partial] - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] interface CGImageDecodeOptions { [Internal] [Field ("kCGImageSourceDecodeRequest")] @@ -2542,7 +2266,7 @@ interface CGImageDecodeOptions { [Field ("kCGImageSourceDecodeToSDR")] IntPtr DecodeToSDR { get; } - [iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), Mac (15, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), Mac (15, 0)] [Internal] [Field ("kCGImageSourceGenerateImageSpecificLumaScaling")] IntPtr GenerateImageSpecificLumaScaling { get; } @@ -2632,23 +2356,22 @@ interface CGImageDestinationOptions { [Export ("ExifAuxDictionary")] NSDictionary ExifAuxDictionary { get; set; } - [iOS (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), TV (14, 0)] [MacCatalyst (14, 0)] [Export ("WebPDictionary")] NSDictionary WebPDictionary { get; set; } - [iOS (14, 1), TV (14, 2), Watch (7, 1)] + [iOS (14, 1), TV (14, 2)] [MacCatalyst (14, 1)] [Export ("TgaDictionary")] NSDictionary TgaDictionary { get; set; } - [Mac (14, 0), iOS (17, 0), TV (17, 0), Watch (10, 0), MacCatalyst (17, 0)] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] [Export ("AvisDictionary")] NSDictionary AvisDictionary { get; set; } [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 1)] bool PreserveGainMap { get; set; } } @@ -2735,19 +2458,19 @@ interface CGImageDestinationOptionsKeys { [Wrap ("CGImageProperties.ExifAuxDictionary")] NSString ExifAuxDictionary { get; } - [iOS (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), TV (14, 0)] [MacCatalyst (14, 0)] [Static] [Wrap ("CGImageProperties.WebPDictionary")] NSString WebPDictionary { get; } - [iOS (14, 1), TV (14, 2), Watch (7, 1)] + [iOS (14, 1), TV (14, 2)] [MacCatalyst (14, 1)] [Static] [Wrap ("CGImageProperties.TgaDictionary")] NSString TgaDictionary { get; } - [Mac (14, 0), iOS (17, 0), TV (17, 0), Watch (10, 0)] + [Mac (14, 0), iOS (17, 0), TV (17, 0)] [MacCatalyst (17, 0)] [Static] [Wrap ("CGImageProperties.AvisDictionary")] @@ -2755,36 +2478,35 @@ interface CGImageDestinationOptionsKeys { [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 1)] [Field ("kCGImageDestinationPreserveGainMap")] NSString PreserveGainMapKey { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageDestinationEncodeRequest")] NSString EncodeRequest { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageDestinationEncodeToSDR")] NSString EncodeToSdr { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageDestinationEncodeToISOHDR")] NSString EncodeToIsoHdr { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageDestinationEncodeToISOGainmap")] NSString EncodeToIsoGainmap { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageDestinationEncodeRequestOptions")] NSString EncodeRequestOptions { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageDestinationEncodeBaseIsSDR")] NSString EncodeBaseIsSdr { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageDestinationEncodeTonemapMode")] NSString EncodeTonemapMode { get; } } @@ -2827,54 +2549,47 @@ enum CGImageAuxiliaryDataType { [Field ("kCGImageAuxiliaryDataTypeDisparity")] Disparity, - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("kCGImageAuxiliaryDataTypePortraitEffectsMatte")] PortraitEffectsMatte, [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImageAuxiliaryDataTypeSemanticSegmentationHairMatte")] SemanticSegmentationHairMatte, [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImageAuxiliaryDataTypeSemanticSegmentationSkinMatte")] SemanticSegmentationSkinMatte, [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kCGImageAuxiliaryDataTypeSemanticSegmentationTeethMatte")] SemanticSegmentationTeethMatte, [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 1)] [Field ("kCGImageAuxiliaryDataTypeSemanticSegmentationGlassesMatte")] SemanticSegmentationGlassesMatte, [iOS (14, 1)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 1)] [Field ("kCGImageAuxiliaryDataTypeHDRGainMap")] TypeHdrGainMap, [iOS (14, 3)] [TV (14, 3)] - [Watch (7, 2)] [MacCatalyst (14, 3)] [Field ("kCGImageAuxiliaryDataTypeSemanticSegmentationSkyMatte")] SemanticSegmentationSkyMatte, - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageAuxiliaryDataTypeISOGainMap")] IsoGainMap, } @@ -2892,7 +2607,7 @@ interface CGImageAuxiliaryDataInfoKeys { [Field ("kCGImageAuxiliaryDataInfoMetadata")] NSString MetadataKey { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kCGImageAuxiliaryDataInfoColorSpace")] NSString ColorSpaceKey { get; } } @@ -2905,11 +2620,11 @@ interface CGImageAuxiliaryDataInfo { NSDictionary DataDescription { get; set; } // Bound manually: // CGImageMetadata Metadata { get; set; })) - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] CGColorSpace ColorSpace { get; set; } } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Static] [Internal] @@ -2924,7 +2639,7 @@ interface CGImageAnimationOptionsKeys { NSString StartIndexKey { get; } } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [StrongDictionary ("CGImageAnimationOptionsKeys")] interface CGImageAnimationOptions { @@ -2936,7 +2651,7 @@ interface CGImageAnimationOptions { } [Static] - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] interface IOCameraExtrinsics { [Field ("kIIOCameraExtrinsics_CoordinateSystemID")] NSString CoordinateSystemId { get; } @@ -2949,7 +2664,7 @@ interface IOCameraExtrinsics { } [Static] - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] interface IOCameraModel { [Field ("kIIOCameraModel_Intrinsics")] NSString Intrinsics { get; } @@ -2961,7 +2676,7 @@ interface IOCameraModel { } [Static] - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] interface IOCameraModelType { [Field ("kIIOCameraModelType_SimplifiedPinhole")] NSString SimplifiedPinhole { get; } @@ -2971,7 +2686,7 @@ interface IOCameraModelType { } [Static] - [iOS (16, 0), Mac (13, 0), Watch (9, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] interface IOMetadata { [Field ("kIIOMetadata_CameraExtrinsicsKey")] NSString CameraExtrinsicsKey { get; } @@ -2981,7 +2696,7 @@ interface IOMetadata { } [Static] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] interface IOStereoAggressors { [Field ("kIIOStereoAggressors_Type")] NSString Type { get; } @@ -2994,7 +2709,7 @@ interface IOStereoAggressors { } [Static] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] interface IOMonoscopicImageLocation { [Field ("kIIOMonoscopicImageLocation_Unspecified")] NSString Unspecified { get; } diff --git a/src/intents.cs b/src/intents.cs index f4fed7017ce6..b3b582d92cbb 100644 --- a/src/intents.cs +++ b/src/intents.cs @@ -48,7 +48,6 @@ interface NSUnitMass : NSUnit { } interface NSUnitPower : NSUnit { } [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [MacCatalyst (13, 1)] [Native] public enum INBookRestaurantReservationIntentCode : long { @@ -81,13 +80,13 @@ public enum INCallRecordType : long { Latest, [MacCatalyst (13, 1)] Voicemail, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] Ringing, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] InProgress, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] OnHold, } @@ -107,11 +106,9 @@ public enum INCancelWorkoutIntentResponseCode : long { FailureRequiringAppLaunch, FailureNoMatchingWorkout, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")] - [NoWatch] [MacCatalyst (13, 1)] HandleInApp, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")] - [NoWatch] [MacCatalyst (13, 1)] Success, } @@ -216,11 +213,9 @@ public enum INEndWorkoutIntentResponseCode : long { FailureRequiringAppLaunch, FailureNoMatchingWorkout, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")] - [NoWatch] [MacCatalyst (13, 1)] HandleInApp, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")] - [NoWatch] [MacCatalyst (13, 1)] Success, } @@ -261,7 +256,6 @@ public enum INGetRideStatusIntentResponseCode : long { Unspecified = 0, Ready, [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] InProgress, Success, @@ -332,7 +326,6 @@ public enum INIntentHandlingStatus : long { Success, Failure, DeferredToApplication, - [Watch (5, 0)] [MacCatalyst (13, 1)] UserConfirmationRequired, } @@ -355,7 +348,6 @@ public enum INListRideOptionsIntentResponseCode : long { Unspecified = 0, Ready, [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] InProgress, Success, @@ -426,11 +418,9 @@ public enum INPauseWorkoutIntentResponseCode : long { FailureRequiringAppLaunch, FailureNoMatchingWorkout, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")] - [NoWatch] [MacCatalyst (13, 1)] HandleInApp, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")] - [NoWatch] [MacCatalyst (13, 1)] Success, } @@ -470,7 +460,6 @@ public enum INPaymentStatus : long { [MacCatalyst (13, 1)] [Native] public enum INPersonSuggestionType : long { - [Watch (5, 0)] [MacCatalyst (13, 1)] None = 0, SocialProfile = 1, @@ -479,7 +468,6 @@ public enum INPersonSuggestionType : long { /// Enumerates various photo options. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-native-enum! INPhotoAttributeOptions bound [NoTV] [MacCatalyst (13, 1)] @@ -511,19 +499,14 @@ public enum INPhotoAttributeOptions : ulong { MonoFilter = (1 << 21), FadeFilter = (1 << 22), ProcessFilter = (1 << 23), - [Watch (5, 0)] [MacCatalyst (13, 1)] PortraitPhoto = (1uL << 24), - [Watch (5, 0)] [MacCatalyst (13, 1)] LivePhoto = (1uL << 25), - [Watch (5, 0)] [MacCatalyst (13, 1)] LoopPhoto = (1uL << 26), - [Watch (5, 0)] [MacCatalyst (13, 1)] BouncePhoto = (1uL << 27), - [Watch (5, 0)] [MacCatalyst (13, 1)] LongExposurePhoto = (1uL << 28), } @@ -592,7 +575,6 @@ public enum INRequestPaymentIntentResponseCode : long { [NoMac] [MacCatalyst (13, 1)] FailureNotEligible, - [Watch (4, 1)] [NoMac] [MacCatalyst (13, 1)] FailureTermsAndConditionsAcceptanceRequired, @@ -607,7 +589,6 @@ public enum INRequestRideIntentResponseCode : long { Unspecified = 0, Ready, [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] InProgress, Success, @@ -617,7 +598,7 @@ public enum INRequestRideIntentResponseCode : long { FailureRequiringAppLaunchNoServiceInArea, FailureRequiringAppLaunchServiceTemporarilyUnavailable, FailureRequiringAppLaunchPreviousRideNeedsCompletion, - [iOS (13, 0), Watch (6, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] FailureRequiringAppLaunchRideScheduledTooFar, } @@ -646,11 +627,9 @@ public enum INResumeWorkoutIntentResponseCode : long { FailureRequiringAppLaunch, FailureNoMatchingWorkout, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")] - [NoWatch] [MacCatalyst (13, 1)] HandleInApp, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")] - [NoWatch] [MacCatalyst (13, 1)] Success, } @@ -673,7 +652,6 @@ public enum INRidePhase : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -694,7 +672,6 @@ public enum INSaveProfileInCarIntentResponseCode : long { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -738,7 +715,6 @@ public enum INSearchForMessagesIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -789,7 +765,6 @@ public enum INSendPaymentIntentResponseCode : long { FailureNoBankAccount, [MacCatalyst (13, 1)] FailureNotEligible, - [Watch (4, 1)] [MacCatalyst (13, 1)] FailureTermsAndConditionsAcceptanceRequired, } @@ -797,7 +772,6 @@ public enum INSendPaymentIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -814,7 +788,6 @@ public enum INSetAudioSourceInCarIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -831,7 +804,6 @@ public enum INSetClimateSettingsInCarIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -849,7 +821,6 @@ public enum INSetDefrosterSettingsInCarIntentResponseCode : long { /// Enumerates results codes for the . [NoMac] #endif - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -867,7 +838,6 @@ public enum INSetMessageAttributeIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -884,7 +854,6 @@ public enum INSetProfileInCarIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -902,7 +871,6 @@ public enum INSetRadioStationIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -933,7 +901,6 @@ public enum INSiriAuthorizationStatus : long { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntentResponseCode' instead.")] @@ -956,7 +923,6 @@ public enum INStartAudioCallIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -979,8 +945,6 @@ public enum INStartPhotoPlaybackIntentResponseCode : long { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponseCode' instead.")] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntentResponseCode' instead.")] @@ -1016,20 +980,13 @@ public enum INStartWorkoutIntentResponseCode : long { FailureNoMatchingWorkout = 6, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 7, which is now defined as 'Success').")] [MacCatalyst (13, 1)] -#if XAMCORE_5_0 && !NET - [NoWatch] -#endif HandleInApp = 7, [Advice ("The numerical value for this constant was different in iOS 11 and earlier iOS versions (it was 6, which is now defined as 'HandleInApp').")] [MacCatalyst (13, 1)] -#if XAMCORE_5_0 && !NET - [NoWatch] -#endif Success = 8, } [Unavailable (PlatformName.MacOSX)] - [Watch (6, 0)] [TV (14, 0)] [MacCatalyst (13, 1)] [Native] @@ -1157,7 +1114,6 @@ public enum INAmountType : long { /// Enumerates common bills. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -1230,7 +1186,6 @@ public enum INGetCarPowerLevelStatusIntentResponseCode : long { /// Enumerates the results of an . [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -1249,7 +1204,6 @@ public enum INPayBillIntentResponseCode : long { /// Enumerates the results of an . [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -1295,7 +1249,6 @@ public enum INAddTasksIntentResponseCode : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -1341,7 +1294,7 @@ public enum INCallDestinationType : long { Emergency, Voicemail, Redial, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] CallBack, } @@ -1357,19 +1310,19 @@ public enum INCallRecordTypeOptions : ulong { Received = (1 << 2), Latest = (1 << 3), Voicemail = (1 << 4), - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] Ringing = (1 << 5), - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] InProgress = (1 << 6), - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] OnHold = (1 << 7), } /// Enumerates results codes for the . - [NoWatch, NoMac, NoTV] + [NoMac, NoTV] [MacCatalyst (13, 1)] [Native] public enum INCancelRideIntentResponseCode : long { @@ -1418,7 +1371,6 @@ public enum INDateSearchType : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -1461,27 +1413,21 @@ public enum INMessageType : long { Sticker, [Deprecated (PlatformName.iOS, 18, 1, message: "Use 'INMessageReaction' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use 'INMessageReaction' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use 'INMessageReaction' instead.")] TapbackLiked, [Deprecated (PlatformName.iOS, 18, 1, message: "Use 'INMessageReaction' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use 'INMessageReaction' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use 'INMessageReaction' instead.")] TapbackDisliked, [Deprecated (PlatformName.iOS, 18, 1, message: "Use 'INMessageReaction' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use 'INMessageReaction' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use 'INMessageReaction' instead.")] TapbackEmphasized, [Deprecated (PlatformName.iOS, 18, 1, message: "Use 'INMessageReaction' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use 'INMessageReaction' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use 'INMessageReaction' instead.")] TapbackLoved, [Deprecated (PlatformName.iOS, 18, 1, message: "Use 'INMessageReaction' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use 'INMessageReaction' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use 'INMessageReaction' instead.")] TapbackQuestioned, [Deprecated (PlatformName.iOS, 18, 1, message: "Use 'INMessageReaction' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 1, message: "Use 'INMessageReaction' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 1, message: "Use 'INMessageReaction' instead.")] TapbackLaughed, MediaCalendar, MediaLocation, @@ -1490,32 +1436,25 @@ public enum INMessageType : long { MediaVideo, MediaPass, MediaAudio, - [Watch (5, 0)] [MacCatalyst (13, 1)] PaymentSent, - [Watch (5, 0)] [MacCatalyst (13, 1)] PaymentRequest, - [Watch (5, 0)] [MacCatalyst (13, 1)] PaymentNote, - [Watch (5, 0)] [MacCatalyst (13, 1)] Animoji, - [Watch (5, 0)] [MacCatalyst (13, 1)] ActivitySnippet, - [Watch (5, 0)] [MacCatalyst (13, 1)] File, - [Watch (5, 0)] [MacCatalyst (13, 1)] Link, - [iOS (17, 0), MacCatalyst (17, 0), Watch (10, 0)] + [iOS (17, 0), MacCatalyst (17, 0)] Reaction, - [iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0)] MediaAnimatedImage, - [iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [iOS (18, 0), MacCatalyst (18, 0)] ThirdPartyAttachment, } @@ -1571,7 +1510,6 @@ public enum INRequestPaymentCurrencyAmountUnsupportedReason : long { public enum INRequestPaymentPayerUnsupportedReason : long { CredentialsUnverified = 1, NoAccount, - [Watch (4, 1)] [MacCatalyst (13, 1)] NoValidHandle, } @@ -1648,13 +1586,12 @@ public enum INSendPaymentPayeeUnsupportedReason : long { CredentialsUnverified = 1, InsufficientFunds, NoAccount, - [Watch (4, 1)] [MacCatalyst (13, 1)] NoValidHandle, } /// Enumerates results codes for the . - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Native] public enum INSendRideFeedbackIntentResponseCode : long { @@ -1718,7 +1655,6 @@ public enum INTaskType : long { /// Enumerates results codes for the . [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -1736,7 +1672,6 @@ public enum INTransferMoneyIntentResponseCode : long { /// Enumerates visual code semantics. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -1746,18 +1681,15 @@ public enum INVisualCodeType : long { Contact, RequestPayment, SendPayment, - [Watch (5, 0)] [MacCatalyst (13, 1)] Transit, - [Watch (5, 0)] [MacCatalyst (13, 1)] Bus, - [Watch (5, 0)] [MacCatalyst (13, 1)] Subway, } - [Watch (5, 0), TV (14, 0), NoMac] + [TV (14, 0), NoMac] [MacCatalyst (13, 1)] [Native] public enum INMediaItemType : long { @@ -1776,27 +1708,27 @@ public enum INMediaItemType : long { TVShow, TVShowEpisode, MusicVideo, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] PodcastStation, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] RadioStation, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] Station, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] Music, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] AlgorithmicRadioStation, - [Watch (6, 2, 1), iOS (13, 4, 1)] + [iOS (13, 4, 1)] [MacCatalyst (13, 1)] News, } - [Watch (5, 0), TV (14, 0), NoMac] + [TV (14, 0), NoMac] [MacCatalyst (13, 1)] [Native] public enum INPlayMediaIntentResponseCode : long { @@ -1805,9 +1737,6 @@ public enum INPlayMediaIntentResponseCode : long { ContinueInApp = 2, InProgress = 3, Success = 4, -#if XAMCORE_5_0 && !NET - [NoWatch] -#endif HandleInApp = 5, Failure = 6, FailureRequiringAppLaunch = 7, @@ -1817,7 +1746,7 @@ public enum INPlayMediaIntentResponseCode : long { FailureMaxStreamLimitReached = 11, } - [Watch (5, 0), TV (14, 0), NoMac] + [TV (14, 0), NoMac] [MacCatalyst (13, 1)] [Native] public enum INPlaybackRepeatMode : long { @@ -1827,7 +1756,7 @@ public enum INPlaybackRepeatMode : long { One, } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Native] public enum INDailyRoutineSituation : long { @@ -1837,21 +1766,21 @@ public enum INDailyRoutineSituation : long { Work, School, Gym, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] Commute, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] HeadphonesConnected, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] ActiveWorkout, - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] PhysicalActivityIncomplete, } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Native] public enum INUpcomingMediaPredictionMode : long { @@ -1859,7 +1788,7 @@ public enum INUpcomingMediaPredictionMode : long { OnlyPredictSuggestedIntents = 1, } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Native] public enum INRelevantShortcutRole : long { @@ -1867,7 +1796,7 @@ public enum INRelevantShortcutRole : long { Information, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INAddMediaIntentResponseCode : long { @@ -1875,15 +1804,12 @@ public enum INAddMediaIntentResponseCode : long { Ready = 1, InProgress = 2, Success = 3, -#if XAMCORE_5_0 && !NET - [NoWatch] -#endif HandleInApp = 4, Failure = 5, FailureRequiringAppLaunch = 6, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INAddMediaMediaItemUnsupportedReason : long { @@ -1893,22 +1819,22 @@ public enum INAddMediaMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] ServiceUnavailable, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] RegionRestriction, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INAddTasksTargetTaskListConfirmationReason : long { ListShouldBeCreated = 1, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INAddTasksTemporalEventTriggerUnsupportedReason : long { @@ -1916,7 +1842,7 @@ public enum INAddTasksTemporalEventTriggerUnsupportedReason : long { InvalidRecurrence, } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INCallAudioRoute : long { @@ -1926,8 +1852,7 @@ public enum INCallAudioRoute : long { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Native] @@ -1941,8 +1866,7 @@ public enum INDeleteTasksIntentResponseCode : long { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Native] @@ -1951,8 +1875,7 @@ public enum INDeleteTasksTaskListUnsupportedReason : long { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Native] @@ -1961,7 +1884,7 @@ public enum INDeleteTasksTaskUnsupportedReason : long { InApp, } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INGetReservationDetailsIntentResponseCode : long { @@ -1973,7 +1896,7 @@ public enum INGetReservationDetailsIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INMediaAffinityType : long { @@ -1982,7 +1905,7 @@ public enum INMediaAffinityType : long { Dislike, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INMediaDestinationType : long { @@ -1991,18 +1914,18 @@ public enum INMediaDestinationType : long { Playlist, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INMediaReference : long { Unknown = 0, CurrentlyPlaying, - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] My, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INMediaSortOrder : long { @@ -2017,7 +1940,7 @@ public enum INMediaSortOrder : long { Recommended, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INMediaUserContextSubscriptionStatus : long { @@ -2026,7 +1949,7 @@ public enum INMediaUserContextSubscriptionStatus : long { Subscribed, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INPlayMediaMediaItemUnsupportedReason : long { @@ -2036,15 +1959,15 @@ public enum INPlayMediaMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] ServiceUnavailable, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] RegionRestriction, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INPlayMediaPlaybackSpeedUnsupportedReason : long { @@ -2052,7 +1975,7 @@ public enum INPlayMediaPlaybackSpeedUnsupportedReason : long { AboveMaximum, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INPlaybackQueueLocation : long { @@ -2062,7 +1985,7 @@ public enum INPlaybackQueueLocation : long { Later, } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INReservationActionType : long { @@ -2070,7 +1993,7 @@ public enum INReservationActionType : long { CheckIn, } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INReservationStatus : long { @@ -2081,7 +2004,7 @@ public enum INReservationStatus : long { Confirmed, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INSearchForMediaIntentResponseCode : long { @@ -2094,7 +2017,7 @@ public enum INSearchForMediaIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INSearchForMediaMediaItemUnsupportedReason : long { @@ -2104,15 +2027,15 @@ public enum INSearchForMediaMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] ServiceUnavailable, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] RegionRestriction, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INSetTaskAttributeTemporalEventTriggerUnsupportedReason : long { @@ -2120,7 +2043,7 @@ public enum INSetTaskAttributeTemporalEventTriggerUnsupportedReason : long { InvalidRecurrence, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INSnoozeTasksIntentResponseCode : long { @@ -2132,14 +2055,14 @@ public enum INSnoozeTasksIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INSnoozeTasksTaskUnsupportedReason : long { NoTasksFound = 1, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INStartCallCallCapabilityUnsupportedReason : long { @@ -2148,7 +2071,7 @@ public enum INStartCallCallCapabilityUnsupportedReason : long { CameraNotAccessible, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INStartCallContactUnsupportedReason : long { @@ -2159,11 +2082,11 @@ public enum INStartCallContactUnsupportedReason : long { UnsupportedMmiUssd, NoCallHistoryForRedial, NoUsableHandleForRedial, - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] RequiringInAppAuthentication, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INStartCallIntentResponseCode : long { @@ -2181,13 +2104,12 @@ public enum INStartCallIntentResponseCode : long { FailureCallInProgress, [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] FailureCallRinging, - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] ResponseCode, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INTaskPriority : long { @@ -2196,7 +2118,7 @@ public enum INTaskPriority : long { Flagged, } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INTemporalEventTriggerTypeOptions : ulong { @@ -2205,7 +2127,7 @@ public enum INTemporalEventTriggerTypeOptions : ulong { ScheduledRecurring = (1uL << 2), } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INTicketedEventCategory : long { @@ -2213,7 +2135,7 @@ public enum INTicketedEventCategory : long { Movie, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INUpdateMediaAffinityIntentResponseCode : long { @@ -2225,7 +2147,7 @@ public enum INUpdateMediaAffinityIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INUpdateMediaAffinityMediaItemUnsupportedReason : long { @@ -2235,15 +2157,15 @@ public enum INUpdateMediaAffinityMediaItemUnsupportedReason : long { ExplicitContentSettings, CellularDataSettings, RestrictedContent, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] ServiceUnavailable, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] RegionRestriction, } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum INAddMediaMediaDestinationUnsupportedReason : long { @@ -2252,7 +2174,7 @@ public enum INAddMediaMediaDestinationUnsupportedReason : long { } [Flags] - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum INDayOfWeekOptions : ulong { @@ -2265,7 +2187,7 @@ public enum INDayOfWeekOptions : ulong { Sunday = (1uL << 6), } - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum INListCarsIntentResponseCode : long { @@ -2277,7 +2199,7 @@ public enum INListCarsIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum INOutgoingMessageType : long { @@ -2287,7 +2209,7 @@ public enum INOutgoingMessageType : long { } [Flags] - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum INShortcutAvailabilityOptions : ulong { @@ -2300,14 +2222,14 @@ public enum INShortcutAvailabilityOptions : ulong { YogaAndStretching = (1uL << 6), } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Native] public enum INStartCallCallRecordToCallBackUnsupportedReason : long { NoMatchingCall = 1, } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [Native] public enum INAnswerCallIntentResponseCode : long { Unspecified = 0, @@ -2319,7 +2241,7 @@ public enum INAnswerCallIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [Native] public enum INHangUpCallIntentResponseCode : long { Unspecified = 0, @@ -2339,7 +2261,6 @@ public enum INIntentIdentifier { None = -1, [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'StartCall' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'StartCall' instead.")] [Unavailable (PlatformName.MacOSX)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'StartCall' instead.")] [Field ("INStartAudioCallIntentIdentifier")] @@ -2347,7 +2268,6 @@ public enum INIntentIdentifier { [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'StartCall' instead.")] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'StartCall' instead.")] [Field ("INStartVideoCallIntentIdentifier")] StartVideoCall, @@ -2357,32 +2277,26 @@ public enum INIntentIdentifier { SearchCallHistory, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSetAudioSourceInCarIntentIdentifier")] SetAudioSourceInCar, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSetClimateSettingsInCarIntentIdentifier")] SetClimateSettingsInCar, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSetDefrosterSettingsInCarIntentIdentifier")] SetDefrosterSettingsInCar, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSetSeatSettingsInCarIntentIdentifier")] SetSeatSettingsInCar, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSetProfileInCarIntentIdentifier")] SetProfileInCar, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSaveProfileInCarIntentIdentifier")] SaveProfileInCar, @@ -2407,7 +2321,6 @@ public enum INIntentIdentifier { ResumeWorkout, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSetRadioStationIntentIdentifier")] SetRadioStation, @@ -2420,7 +2333,6 @@ public enum INIntentIdentifier { SearchForMessages, [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [Field ("INSetMessageAttributeIntentIdentifier")] SetMessageAttribute, @@ -2452,16 +2364,16 @@ public enum INIntentIdentifier { [Field ("INGetRideStatusIntentIdentifier")] GetRideStatus, - [Watch (7, 0), NoMac, iOS (14, 0)] + [NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("INStartCallIntentIdentifier")] StartCall, - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [Field ("INAnswerCallIntentIdentifier")] AnswerCall, - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [Field ("INHangUpCallIntentIdentifier")] HangUpCall, } @@ -2500,7 +2412,7 @@ enum INPersonHandleLabel { [Field ("INPersonHandleLabelOther")] Other, - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("INPersonHandleLabelSchool")] School, @@ -2612,12 +2524,12 @@ enum INPersonRelationship { [Field ("INPersonRelationshipManager")] Manager, - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("INPersonRelationshipSon")] Son, - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("INPersonRelationshipDaughter")] Daughter, @@ -2682,23 +2594,20 @@ enum INWorkoutNameIdentifier { [Field ("INWorkoutNameIdentifierExercise")] Exercise, - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("INWorkoutNameIdentifierHike")] Hike, - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("INWorkoutNameIdentifierHighIntensityIntervalTraining")] HighIntensityIntervalTraining, - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("INWorkoutNameIdentifierSwim")] Swim, } - [iOS (14, 0), NoMac, NoTV, Watch (7, 0)] + [iOS (14, 0), NoMac, NoTV] [MacCatalyst (14, 0)] enum INCarChargingConnectorType { [DefaultEnumValue] @@ -2724,24 +2633,23 @@ enum INCarChargingConnectorType { Gbtdc, [Deprecated (PlatformName.iOS, 17, 4, message: "Use 'INCarChargingConnectorType.NacsDc' instead.")] - [Deprecated (PlatformName.WatchOS, 10, 4, message: "Use 'INCarChargingConnectorType.NacsDc' instead.")] [Field ("INCarChargingConnectorTypeTesla")] Tesla, [Field ("INCarChargingConnectorTypeMennekes")] Mennekes, - [Watch (10, 4), iOS (17, 4), MacCatalyst (17, 4)] + [iOS (17, 4), MacCatalyst (17, 4)] [Field ("INCarChargingConnectorTypeNACSDC")] NacsDC, - [Watch (10, 4), iOS (17, 4), MacCatalyst (17, 4)] + [iOS (17, 4), MacCatalyst (17, 4)] [Field ("INCarChargingConnectorTypeNACSAC")] NacsAC, } [Native] - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0), NoTV] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), NoTV] public enum INMessageReactionType : long { Unknown = 0, Emoji, @@ -2749,7 +2657,7 @@ public enum INMessageReactionType : long { } [Native] - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), Watch (11, 0), NoTV] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), NoTV] public enum INStickerType : long { Unknown = 0, Emoji, @@ -2776,7 +2684,6 @@ interface CLPlacemark_INIntentsAdditions { /// Apple documentation for INBookRestaurantReservationIntent [NoTV] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] interface INBookRestaurantReservationIntent : NSCopying { @@ -2812,7 +2719,6 @@ interface INBookRestaurantReservationIntent : NSCopying { [NoTV] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [MacCatalyst (13, 1)] [Protocol] interface INBookRestaurantReservationIntentHandling { @@ -2852,7 +2758,6 @@ interface INBookRestaurantReservationIntentHandling { /// Apple documentation for INBookRestaurantReservationIntentResponse [NoTV] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] interface INBookRestaurantReservationIntentResponse { @@ -2900,14 +2805,14 @@ interface INBooleanResolutionResult { INBooleanResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INBooleanResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -2932,7 +2837,6 @@ interface INCallRecordTypeResolutionResult { [Internal] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -2947,7 +2851,6 @@ interface INCallRecordTypeResolutionResult { [Internal] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -2973,14 +2876,14 @@ interface INCallRecordTypeResolutionResult { INCallRecordTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCallRecordTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3052,7 +2955,6 @@ interface INCancelWorkoutIntentResponse { /// Apple documentation for INCarAirCirculationModeResolutionResult [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarAirCirculationModeResolutionResult bound - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -3104,14 +3006,14 @@ interface INCarAirCirculationModeResolutionResult { INCarAirCirculationModeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCarAirCirculationModeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3125,7 +3027,6 @@ interface INCarAirCirculationModeResolutionResult { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarAudioSourceResolutionResult bound [BaseType (typeof (INIntentResolutionResult))] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -3177,14 +3078,14 @@ interface INCarAudioSourceResolutionResult { INCarAudioSourceResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCarAudioSourceResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3198,7 +3099,6 @@ interface INCarAudioSourceResolutionResult { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarDefrosterResolutionResult bound [BaseType (typeof (INIntentResolutionResult))] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -3250,14 +3150,14 @@ interface INCarDefrosterResolutionResult { INCarDefrosterResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCarDefrosterResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3271,7 +3171,6 @@ interface INCarDefrosterResolutionResult { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INCarSeatResolutionResult bound [BaseType (typeof (INIntentResolutionResult))] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -3323,14 +3222,14 @@ interface INCarSeatResolutionResult { INCarSeatResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCarSeatResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3399,14 +3298,14 @@ interface INCurrencyAmountResolutionResult { INCurrencyAmountResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCurrencyAmountResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3505,14 +3404,14 @@ interface INDateComponentsRangeResolutionResult { INDateComponentsRangeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INDateComponentsRangeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3524,22 +3423,16 @@ interface INDateComponentsRangeResolutionResult { [NoMac] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INStartAudioCallIntentHandling, INStartVideoCallIntentHandling and INSearchCallHistoryIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 13, 0, message: "Implement 'INStartAudioCallIntentHandling and INSearchCallHistoryIntentHandling' instead.")] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Implement 'INStartAudioCallIntentHandling, INStartVideoCallIntentHandling and INSearchCallHistoryIntentHandling' instead.")] [Protocol] interface INCallsDomainHandling : INStartAudioCallIntentHandling, INSearchCallHistoryIntentHandling -#if !WATCH , INStartVideoCallIntentHandling { -#else - { -#endif } /// Interface combining several interfaces related to various car-related intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INActivateCarSignalIntentHandling, INSetCarLockStatusIntentHandling, INGetCarLockStatusIntentHandling and INGetCarPowerLevelStatusIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INActivateCarSignalIntentHandling, INSetCarLockStatusIntentHandling, INGetCarLockStatusIntentHandling and INGetCarPowerLevelStatusIntentHandling' instead.")] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -3550,7 +3443,6 @@ interface INCarCommandsDomainHandling : INActivateCarSignalIntentHandling, INSet /// Interface combining several interfaces related to various CarPlay intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INSetAudioSourceInCarIntentHandling, INSetClimateSettingsInCarIntentHandling, INSetDefrosterSettingsInCarIntentHandling, INSetSeatSettingsInCarIntentHandling, INSetProfileInCarIntentHandling and INSaveProfileInCarIntentHandling' instead.")] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -3561,7 +3453,6 @@ interface INCarPlayDomainHandling : INSetAudioSourceInCarIntentHandling, INSetCl /// Interface combining several interfaces related to various workout-related intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INStartWorkoutIntentHandling, INPauseWorkoutIntentHandling, INEndWorkoutIntentHandling, INCancelWorkoutIntentHandling and INResumeWorkoutIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INStartWorkoutIntentHandling, INPauseWorkoutIntentHandling, INEndWorkoutIntentHandling, INCancelWorkoutIntentHandling and INResumeWorkoutIntentHandling' instead.")] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -3573,7 +3464,6 @@ interface INWorkoutsDomainHandling : INStartWorkoutIntentHandling, INPauseWorkou /// Interface combining several interfaces related to various radio-related intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INSetRadioStationIntentHandling' instead.")] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Implement 'INSetRadioStationIntentHandling' instead.")] @@ -3583,23 +3473,17 @@ interface INRadioDomainHandling : INSetRadioStationIntentHandling { /// Interface combining several interfaces related to various Message-related intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INSendMessageIntentHandling, INSearchForMessagesIntentHandling and INSetMessageAttributeIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 13, 0, message: "Implement 'INSendMessageIntentHandling and INSearchForMessagesIntentHandling' instead.")] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Implement 'INSendMessageIntentHandling, INSearchForMessagesIntentHandling and INSetMessageAttributeIntentHandling' instead.")] [Protocol] interface INMessagesDomainHandling : INSendMessageIntentHandling, INSearchForMessagesIntentHandling -#if !WATCH , INSetMessageAttributeIntentHandling { -#else - { -#endif } /// Interface combining several interfaces related to various payment-related intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INSendPaymentIntentHandling, INRequestPaymentIntentHandling, INPayBillIntentHandling, INSearchForBillsIntentHandling, INSearchForAccountsIntentHandling and INTransferMoneyIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INSendPaymentIntentHandling and INRequestPaymentIntentHandling' instead.")] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -3614,7 +3498,6 @@ interface INPaymentsDomainHandling : INSendPaymentIntentHandling, INRequestPayme /// Interface combining several interfaces related to various photo-related intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INSearchForPhotosIntentHandling and INStartPhotoPlaybackIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INSearchForPhotosIntentHandling and INStartPhotoPlaybackIntentHandling' instead.")] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -3625,7 +3508,6 @@ interface INPhotosDomainHandling : INSearchForPhotosIntentHandling, INStartPhoto /// Interface combining several interfaces related to various ridesharing intents. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INListRideOptionsIntentHandling, INRequestRideIntentHandling, INGetRideStatusIntentHandling, INCancelRideIntentHandling and INSendRideFeedbackIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INListRideOptionsIntentHandling, INRequestRideIntentHandling, INGetRideStatusIntentHandling, INCancelRideIntentHandling and INSendRideFeedbackIntentHandling' instead.")] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -3640,7 +3522,6 @@ interface INRidesharingDomainHandling : INListRideOptionsIntentHandling, INReque /// Composite interface for adopting all of lists and notes protocols. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INCreateNoteIntentHandling, INAppendToNoteIntentHandling, INAddTasksIntentHandling, INCreateTaskListIntentHandling, INSetTaskAttributeIntentHandling and INSearchForNotebookItemsIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INCreateNoteIntentHandling, INAppendToNoteIntentHandling, INAddTasksIntentHandling, INCreateTaskListIntentHandling, INSetTaskAttributeIntentHandling and INSearchForNotebookItemsIntentHandling' instead.")] [NoMac, NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Implement 'INCreateNoteIntentHandling, INAppendToNoteIntentHandling, INAddTasksIntentHandling, INCreateTaskListIntentHandling, INSetTaskAttributeIntentHandling and INSearchForNotebookItemsIntentHandling' instead.")] @@ -3650,7 +3531,6 @@ interface INNotebookDomainHandling : INCreateNoteIntentHandling, INAppendToNoteI /// Composite interface for adopting all of the visual codes protocols. [Deprecated (PlatformName.iOS, 13, 0, message: "Implement 'INGetVisualCodeIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Implement 'INGetVisualCodeIntentHandling' instead.")] [NoMac, NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Implement 'INGetVisualCodeIntentHandling' instead.")] @@ -3692,14 +3572,14 @@ interface INDoubleResolutionResult { INDoubleResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INDoubleResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3747,14 +3627,14 @@ interface INDateComponentsResolutionResult { INDateComponentsResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INDateComponentsResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -3841,7 +3721,6 @@ interface INExtension : INIntentHandlerProviding { /// /// Apple documentation for INGetAvailableRestaurantReservationBookingDefaultsIntent [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] @@ -3856,7 +3735,6 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntent { } [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Protocol] @@ -3884,7 +3762,6 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntentHandling { /// /// Apple documentation for INGetAvailableRestaurantReservationBookingDefaultsIntentResponse [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] @@ -3917,7 +3794,6 @@ interface INGetAvailableRestaurantReservationBookingDefaultsIntentResponse { /// /// Apple documentation for INGetAvailableRestaurantReservationBookingsIntent [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] @@ -3947,7 +3823,6 @@ interface INGetAvailableRestaurantReservationBookingsIntent : NSCopying { } [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Protocol] @@ -3981,7 +3856,6 @@ interface INGetAvailableRestaurantReservationBookingsIntentHandling { /// /// Apple documentation for INGetAvailableRestaurantReservationBookingsIntentResponse [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] @@ -4011,7 +3885,6 @@ interface INGetAvailableRestaurantReservationBookingsIntentResponse { /// /// Apple documentation for INGetRestaurantGuestIntent [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] @@ -4019,7 +3892,6 @@ interface INGetRestaurantGuestIntent { } [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Protocol] @@ -4044,7 +3916,6 @@ interface INGetRestaurantGuestIntentHandling { /// /// Apple documentation for INGetRestaurantGuestIntentResponse [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] @@ -4147,7 +4018,6 @@ interface INGetRideStatusIntentResponse { /// /// Apple documentation for INGetUserCurrentRestaurantReservationBookingsIntent [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] @@ -4175,7 +4045,6 @@ interface INGetUserCurrentRestaurantReservationBookingsIntent : NSCopying { } [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Protocol] @@ -4203,7 +4072,6 @@ interface INGetUserCurrentRestaurantReservationBookingsIntentHandling { /// /// Apple documentation for INGetUserCurrentRestaurantReservationBookingsIntentResponse [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] @@ -4230,13 +4098,13 @@ interface INImage : NSCopying, NSSecureCoding { [Export ("imageNamed:")] INImage FromName (string name); - [NoWatch, NoTV, NoiOS, Mac (13, 0)] + [NoTV, NoiOS, Mac (13, 0)] [NoMacCatalyst] [Static] [Export ("imageWithNSImage:")] INImage FromImage (NSImage image); - [Watch (7, 0), NoMac, iOS (14, 0)] + [NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("systemImageNamed:")] @@ -4260,25 +4128,25 @@ interface INImage : NSCopying, NSSecureCoding { // INImage_IntentsUI (IntentsUI) - [NoMac, NoWatch, NoTV] + [NoMac, NoTV] [NoMacCatalyst] [Static] [Export ("imageWithCGImage:")] INImage FromImage (CGImage image); - [NoMac, NoWatch, NoTV] + [NoMac, NoTV] [NoMacCatalyst] [Static] [Export ("imageWithUIImage:")] INImage FromImage (UIImage image); - [NoMac, NoWatch, NoTV] + [NoMac, NoTV] [NoMacCatalyst] [Static] [Export ("imageSizeForIntentResponse:")] CGSize GetImageSize (INIntentResponse response); - [NoMac, NoWatch, NoTV] + [NoMac, NoTV] [NoMacCatalyst] [Async] [Export ("fetchUIImageWithCompletion:")] @@ -4318,14 +4186,14 @@ interface INIntegerResolutionResult { INIntegerResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INIntegerResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -4352,39 +4220,35 @@ interface INIntent : NSCopying, NSSecureCoding { [NullAllowed, Export ("intentDescription")] string IntentDescription { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("suggestedInvocationPhrase")] string SuggestedInvocationPhrase { get; set; } - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("shortcutAvailability", ArgumentSemantic.Assign)] INShortcutAvailabilityOptions ShortcutAvailability { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("donationMetadata", ArgumentSemantic.Copy)] INIntentDonationMetadata DonationMetadata { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("setImage:forParameterNamed:")] void SetImage ([NullAllowed] INImage image, string parameterName); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("imageForParameterNamed:")] [return: NullAllowed] INImage GetImage (string parameterName); - [Watch (5, 0)] [MacCatalyst (13, 1)] [return: NullAllowed] [Export ("keyImage")] INImage GetKeyImage (); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INIntentDonationMetadata : NSCopying, NSSecureCoding { @@ -4414,12 +4278,12 @@ interface INIntentResolutionResult { //[Export ("unsupported")] //INIntentResolutionResult Unsupported { get; } - // [Watch (6,0), iOS (13,0), TV (14,0)] + // [iOS (13,0), TV (14,0)] // [Static] // [Export ("unsupportedWithReason:")] // INIntentResolutionResult GetUnsupported (nint reason); - // [Watch (6,0), iOS (13,0), TV (14,0)] + // [iOS (13,0), TV (14,0)] // [Static] // [Export ("confirmationRequiredWithItemToConfirm:forReason:")] // INIntentResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); @@ -4435,7 +4299,6 @@ interface INIntentResponse : NSCopying, NSSecureCoding { NSUserActivity UserActivity { get; - [Watch (5, 0)] [MacCatalyst (13, 1)] set; } @@ -4588,11 +4451,11 @@ interface INListRideOptionsIntentResponse { [DisableDefaultCtor] interface INMessage : NSCopying, NSSecureCoding { - [Watch (9, 0), NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:serviceName:audioMessageFile:")] NativeHandle Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, [NullAllowed] INSpeakableString groupName, INMessageType messageType, [NullAllowed] string serviceName, [NullAllowed] INFile audioMessageFile); - [Watch (6, 1), NoMac, iOS (13, 2)] + [NoMac, iOS (13, 2)] [MacCatalyst (13, 1)] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:serviceName:")] [DesignatedInitializer] @@ -4600,19 +4463,17 @@ interface INMessage : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 18, 0, message: "Use a constructor that takes a reaction instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use a constructor that takes a reaction instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use a constructor that takes a reaction instead.")] [MacCatalyst (13, 1)] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:")] NativeHandle Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, [NullAllowed] INSpeakableString groupName, INMessageType messageType); [Deprecated (PlatformName.iOS, 18, 0, message: "Use a constructor that takes a reaction instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use a constructor that takes a reaction instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use a constructor that takes a reaction instead.")] [MacCatalyst (13, 1)] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:messageType:")] NativeHandle Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, INMessageType messageType); - [iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0), NoMac] + [iOS (18, 0), MacCatalyst (18, 0), NoMac] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:serviceName:messageType:referencedMessage:reaction:")] NativeHandle Constructor ( string identifier, @@ -4629,7 +4490,7 @@ [NullAllowed] INMessageReaction reaction ); [DesignatedInitializer] - [iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0), NoMac] + [iOS (18, 0), MacCatalyst (18, 0), NoMac] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:serviceName:messageType:referencedMessage:sticker:reaction:")] NativeHandle Constructor ( string identifier, @@ -4676,52 +4537,51 @@ [NullAllowed] INMessageReaction reaction [Export ("messageType")] INMessageType MessageType { get; } - [Watch (6, 1), NoMac, iOS (13, 2)] + [NoMac, iOS (13, 2)] [MacCatalyst (13, 1)] [NullAllowed, Export ("serviceName")] string ServiceName { get; } [Obsoleted (PlatformName.iOS, 17, 0, message: "Use 'AttachmentFile' instead.")] [Obsoleted (PlatformName.MacOSX, 14, 0, message: "Use 'AttachmentFile' instead.")] - [Obsoleted (PlatformName.WatchOS, 10, 0, message: "Use 'AttachmentFile' instead.")] - [Watch (9, 0), NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoMac, iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("audioMessageFile", ArgumentSemantic.Copy)] INFile AudioMessageFile { get; } - [Watch (10, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:serviceName:attachmentFiles:")] NativeHandle Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, [NullAllowed] INSpeakableString groupName, INMessageType messageType, [NullAllowed] string serviceName, [NullAllowed] INFile [] attachmentFiles); - [Watch (10, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:serviceName:linkMetadata:")] NativeHandle Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, [NullAllowed] INSpeakableString groupName, [NullAllowed] string serviceName, [NullAllowed] INMessageLinkMetadata linkMetadata); - [Watch (10, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:serviceName:messageType:numberOfAttachments:")] NativeHandle Constructor (string identifier, [NullAllowed] string conversationIdentifier, [NullAllowed] string content, [NullAllowed] NSDate dateSent, [NullAllowed] INPerson sender, [NullAllowed] INPerson [] recipients, [NullAllowed] INSpeakableString groupName, [NullAllowed] string serviceName, INMessageType messageType, [NullAllowed] NSNumber numberOfAttachments); [NullAllowed] - [Watch (10, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("attachmentFiles", ArgumentSemantic.Copy)] INFile [] AttachmentFiles { get; } [NullAllowed, BindAs (typeof (int))] - [Watch (10, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("numberOfAttachments", ArgumentSemantic.Copy)] NSNumber NumberOfAttachments { get; } [NullAllowed] - [Watch (10, 0), NoMac, iOS (17, 0)] + [NoMac, iOS (17, 0)] [Export ("linkMetadata", ArgumentSemantic.Copy)] INMessageLinkMetadata LinkMetadata { get; } [NullAllowed] - [Watch (11, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Export ("sticker", ArgumentSemantic.Copy)] INSticker Sticker { get; set; } [NullAllowed] - [Watch (11, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Export ("reaction", ArgumentSemantic.Copy)] INMessageReaction Reaction { get; set; } @@ -4750,7 +4610,6 @@ interface INMessageAttributeOptionsResolutionResult { [Internal] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -4765,7 +4624,6 @@ interface INMessageAttributeOptionsResolutionResult { [Internal] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -4791,14 +4649,14 @@ interface INMessageAttributeOptionsResolutionResult { INMessageAttributeOptionsResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INMessageAttributeOptionsResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -4838,7 +4696,6 @@ interface INMessageAttributeResolutionResult { [Internal] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -4864,14 +4721,14 @@ interface INMessageAttributeResolutionResult { INMessageAttributeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INMessageAttributeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -5018,24 +4875,23 @@ interface INPerson : NSCopying, NSSecureCoding, INSpeakable { [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:")] NativeHandle Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:relationship:")] NativeHandle Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier, [NullAllowed] string relationship); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:")] [DesignatedInitializer] NativeHandle Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier, bool isMe); [Internal] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:suggestionType:")] IntPtr InitWithMe (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier, bool isMe, INPersonSuggestionType suggestionType); [Internal] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isContactSuggestion:suggestionType:")] IntPtr InitWithContactSuggestion (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string contactIdentifier, [NullAllowed] string customIdentifier, bool isContactSuggestion, INPersonSuggestionType suggestionType); @@ -5085,7 +4941,7 @@ interface INPerson : NSCopying, NSSecureCoding, INSpeakable { [Export ("isMe")] bool IsMe { get; } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("contactSuggestion")] bool ContactSuggestion { [Bind ("isContactSuggestion")] get; } } @@ -5167,14 +5023,14 @@ interface INPersonResolutionResult { INPersonResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INPersonResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -5222,14 +5078,14 @@ interface INPlacemarkResolutionResult { INPlacemarkResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INPlacemarkResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -5245,13 +5101,11 @@ interface INPlacemarkResolutionResult { [BaseType (typeof (NSObject))] interface INPreferences { - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] [Export ("siriAuthorizationStatus")] INSiriAuthorizationStatus SiriAuthorizationStatus { get; } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] [Async] @@ -5304,7 +5158,6 @@ interface INPriceRange : NSCopying, NSSecureCoding { /// Apple documentation for INRadioTypeResolutionResult [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] // xtro mac !unknown-type! INRadioTypeResolutionResult bound - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -5357,14 +5210,14 @@ interface INRadioTypeResolutionResult { INRadioTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INRadioTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -5377,7 +5230,6 @@ interface INRadioTypeResolutionResult { /// Apple documentation for INRelativeReferenceResolutionResult [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -5430,14 +5282,14 @@ interface INRelativeReferenceResolutionResult { INRelativeReferenceResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INRelativeReferenceResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -5450,7 +5302,6 @@ interface INRelativeReferenceResolutionResult { /// Apple documentation for INRelativeSettingResolutionResult [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -5503,14 +5354,14 @@ interface INRelativeSettingResolutionResult { INRelativeSettingResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INRelativeSettingResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -5559,7 +5410,6 @@ interface INRequestPaymentIntentHandling { #endif (INRequestPaymentIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolvePayer (INRequestPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolvePayer (INRequestPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolvePayer (INRequestPaymentIntent, Action)' instead.")] [Export ("resolvePayerForRequestPayment:withCompletion:")] @@ -5569,7 +5419,6 @@ interface INRequestPaymentIntentHandling { [Export ("resolvePayerForRequestPayment:completion:")] void ResolvePayer (INRequestPaymentIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveCurrencyAmount (INRequestPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveCurrencyAmount (INRequestPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveCurrencyAmount (INRequestPaymentIntent, Action)' instead.")] [Export ("resolveCurrencyAmountForRequestPayment:withCompletion:")] @@ -5615,7 +5464,6 @@ interface INRequestPaymentIntentResponse { interface INRequestRideIntent { [Deprecated (PlatformName.iOS, 10, 3, message: "Use the INDateComponentsRange overload")] - [Unavailable (PlatformName.WatchOS)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the INDateComponentsRange overload")] [Export ("initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:")] NativeHandle Constructor ([NullAllowed] CLPlacemark pickupLocation, [NullAllowed] CLPlacemark dropOffLocation, [NullAllowed] INSpeakableString rideOptionName, [NullAllowed] NSNumber partySize, [NullAllowed] INPaymentMethod paymentMethod); @@ -5707,7 +5555,6 @@ interface INRequestRideIntentResponse { /// /// Apple documentation for INRestaurant [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -5734,7 +5581,6 @@ interface INRestaurant : NSSecureCoding, NSCopying { /// /// Apple documentation for INRestaurantGuest [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INPerson))] @@ -5756,7 +5602,6 @@ interface INRestaurantGuest { /// /// Apple documentation for INRestaurantGuestDisplayPreferences [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -5792,7 +5637,6 @@ interface INRestaurantGuestDisplayPreferences : NSSecureCoding, NSCopying { /// /// Apple documentation for INRestaurantGuestResolutionResult [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] @@ -5830,14 +5674,14 @@ interface INRestaurantGuestResolutionResult { INRestaurantGuestResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INRestaurantGuestResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -5848,7 +5692,6 @@ interface INRestaurantGuestResolutionResult { /// /// Apple documentation for INRestaurantOffer [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -5868,7 +5711,6 @@ interface INRestaurantOffer : NSSecureCoding, NSCopying { /// /// Apple documentation for INRestaurantReservationBooking [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -5916,7 +5758,6 @@ interface INRestaurantReservationBooking : NSSecureCoding, NSCopying { /// /// Apple documentation for INRestaurantReservationUserBooking [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INRestaurantReservationBooking))] @@ -5953,7 +5794,6 @@ interface INRestaurantReservationUserBooking : NSCopying { /// /// Apple documentation for INRestaurantResolutionResult [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] @@ -5991,14 +5831,14 @@ interface INRestaurantResolutionResult { INRestaurantResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INRestaurantResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -6142,7 +5982,6 @@ interface INRideDriver : NSCopying, NSSecureCoding { [Export ("initWithPersonHandle:nameComponents:displayName:image:rating:phoneNumber:")] [Deprecated (PlatformName.iOS, 10, 2, message: "Use the overload signature instead.")] - [Unavailable (PlatformName.WatchOS)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the overload signature instead.")] NativeHandle Constructor (INPersonHandle personHandle, [NullAllowed] NSPersonNameComponents nameComponents, [NullAllowed] string displayName, [NullAllowed] INImage image, [NullAllowed] string rating, [NullAllowed] string phoneNumber); @@ -6342,7 +6181,6 @@ interface INRideVehicle : NSCopying, NSSecureCoding { /// Apple documentation for INSaveProfileInCarIntent [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -6373,7 +6211,6 @@ interface INSaveProfileInCarIntent { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -6407,7 +6244,6 @@ interface INSaveProfileInCarIntentHandling { /// Apple documentation for INSaveProfileInCarIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -6432,7 +6268,6 @@ interface INSaveProfileInCarIntentResponse { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -6448,13 +6283,11 @@ interface INSearchCallHistoryIntent { [Wrap ("this (dateCreated, recipient, callCapabilities, callTypes, new NSNumber (unseen))")] NativeHandle Constructor ([NullAllowed] INDateComponentsRange dateCreated, [NullAllowed] INPerson recipient, INCallCapabilityOptions callCapabilities, INCallRecordTypeOptions callTypes, bool unseen); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INDateComponentsRange, INPerson, INCallCapabilityOptions, INCallRecordTypeOptions, NSNumber)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INDateComponentsRange, INPerson, INCallCapabilityOptions, INCallRecordTypeOptions, NSNumber)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use '.ctor (INDateComponentsRange, INPerson, INCallCapabilityOptions, INCallRecordTypeOptions, NSNumber)' instead.")] [Export ("initWithCallType:dateCreated:recipient:callCapabilities:")] NativeHandle Constructor (INCallRecordType callType, [NullAllowed] INDateComponentsRange dateCreated, [NullAllowed] INPerson recipient, INCallCapabilityOptions callCapabilities); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CallTypes' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CallTypes' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CallTypes' instead.")] [Export ("callType", ArgumentSemantic.Assign)] @@ -6485,7 +6318,6 @@ interface INSearchCallHistoryIntent { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -6506,7 +6338,6 @@ interface INSearchCallHistoryIntentHandling { (INSearchCallHistoryIntent intent, Action completion); [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'ResolveCallTypes' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveCallTypes' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveCallTypes' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveCallTypes' instead.")] [Export ("resolveCallTypeForSearchCallHistory:withCompletion:")] @@ -6538,7 +6369,6 @@ interface INSearchCallHistoryIntentHandling { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -6572,21 +6402,18 @@ interface INSearchCallHistoryIntentResponse { interface INSearchForMessagesIntent { [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use the overload that takes 'conversationIdentifiers' instead.")] - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use the overload that takes 'conversationIdentifiers' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'conversationIdentifiers' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the overload that takes 'conversationIdentifiers' instead.")] [Export ("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:")] NativeHandle Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] INPerson [] senders, [NullAllowed] string [] searchTerms, INMessageAttributeOptions attributes, [NullAllowed] INDateComponentsRange dateTimeRange, [NullAllowed] string [] identifiers, [NullAllowed] string [] notificationIdentifiers, [NullAllowed] INSpeakableString [] speakableGroupNames); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:conversationIdentifiers:")] [DesignatedInitializer] NativeHandle Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] INPerson [] senders, [NullAllowed] string [] searchTerms, INMessageAttributeOptions attributes, [NullAllowed] INDateComponentsRange dateTimeRange, [NullAllowed] string [] identifiers, [NullAllowed] string [] notificationIdentifiers, [NullAllowed] INSpeakableString [] speakableGroupNames, [NullAllowed] string [] conversationIdentifiers); [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")] [Export ("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:groupNames:")] @@ -6629,14 +6456,12 @@ interface INSearchForMessagesIntent { INConditionalOperator NotificationIdentifiersOperator { get; } [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SpeakableGroupNames' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SpeakableGroupNames' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SpeakableGroupNames' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SpeakableGroupNames' instead.")] [NullAllowed, Export ("groupNames", ArgumentSemantic.Copy)] string [] GroupNames { get; } [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SpeakableGroupNamesOperator' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SpeakableGroupNamesOperator' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SpeakableGroupNamesOperator' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SpeakableGroupNamesOperator' instead.")] [Export ("groupNamesOperator", ArgumentSemantic.Assign)] @@ -6650,12 +6475,10 @@ interface INSearchForMessagesIntent { [Export ("speakableGroupNamesOperator", ArgumentSemantic.Assign)] INConditionalOperator SpeakableGroupNamesOperator { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("conversationIdentifiers", ArgumentSemantic.Copy)] string [] ConversationIdentifiers { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("conversationIdentifiersOperator", ArgumentSemantic.Assign)] INConditionalOperator ConversationIdentifiersOperator { get; } @@ -6697,7 +6520,6 @@ interface INSearchForMessagesIntentHandling { void ResolveDateTimeRange (INSearchForMessagesIntent intent, Action completion); [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'ResolveSpeakableGroupNames' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveSpeakableGroupNames' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveSpeakableGroupNames' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveSpeakableGroupNames' instead.")] [Export ("resolveGroupNamesForSearchForMessages:withCompletion:")] @@ -6738,7 +6560,6 @@ interface INSearchForMessagesIntentResponse { /// /// Apple documentation for INSearchForPhotosIntent [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -6779,7 +6600,6 @@ interface INSearchForPhotosIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -6822,7 +6642,6 @@ interface INSearchForPhotosIntentHandling { /// /// Apple documentation for INSearchForPhotosIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -6850,14 +6669,13 @@ interface INSearchForPhotosIntentResponse { [BaseType (typeof (INIntent))] interface INSendMessageIntent : UNNotificationContentProviding { - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithRecipients:outgoingMessageType:content:speakableGroupName:conversationIdentifier:serviceName:sender:attachments:")] [DesignatedInitializer] NativeHandle Constructor ([NullAllowed] INPerson [] recipients, INOutgoingMessageType outgoingMessageType, [NullAllowed] string content, [NullAllowed] INSpeakableString speakableGroupName, [NullAllowed] string conversationIdentifier, [NullAllowed] string serviceName, [NullAllowed] INPerson sender, [NullAllowed] INSendMessageAttachment [] attachments); [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use '.ctor (INPerson[], INOutgoingMessageType, string, INSpeakableString, string, string, INPerson, INSendMessageAttachment[])' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use '.ctor (INPerson[], INOutgoingMessageType, string, INSpeakableString, string, string, INPerson, INSendMessageAttachment[])' instead.")] [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (INPerson[], INOutgoingMessageType, string, INSpeakableString, string, string, INPerson, INSendMessageAttachment[])' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use '.ctor (INPerson[], INOutgoingMessageType, string, INSpeakableString, string, string, INPerson, INSendMessageAttachment[])' instead.")] @@ -6865,7 +6683,6 @@ interface INSendMessageIntent : UNNotificationContentProviding { NativeHandle Constructor ([NullAllowed] INPerson [] recipients, [NullAllowed] string content, [NullAllowed] INSpeakableString speakableGroupName, [NullAllowed] string conversationIdentifier, [NullAllowed] string serviceName, [NullAllowed] INPerson sender); [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use '.ctor (INPerson [], string, INSpeakableString, string, string, INPerson)' instead.")] [Export ("initWithRecipients:content:groupName:serviceName:sender:")] @@ -6874,7 +6691,7 @@ interface INSendMessageIntent : UNNotificationContentProviding { [NullAllowed, Export ("recipients", ArgumentSemantic.Copy)] INPerson [] Recipients { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("outgoingMessageType", ArgumentSemantic.Assign)] INOutgoingMessageType OutgoingMessageType { get; } @@ -6891,7 +6708,6 @@ interface INSendMessageIntent : UNNotificationContentProviding { string ConversationIdentifier { get; } [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use 'SpeakableGroupNames' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SpeakableGroupNames' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SpeakableGroupNames' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SpeakableGroupNames' instead.")] [NullAllowed, Export ("groupName")] @@ -6903,14 +6719,14 @@ interface INSendMessageIntent : UNNotificationContentProviding { [NullAllowed, Export ("sender", ArgumentSemantic.Copy)] INPerson Sender { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed] [Export ("attachments", ArgumentSemantic.Copy)] INSendMessageAttachment [] Attachments { get; } } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (INIntentDonationMetadata))] [DisableDefaultCtor] interface INSendMessageIntentDonationMetadata { @@ -6949,7 +6765,6 @@ interface INSendMessageIntentHandling { #endif (INSendMessageIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveRecipients (INSendMessageIntent, Action)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveRecipients (INSendMessageIntent, Action)' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'ResolveRecipients (INSendMessageIntent, Action)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveRecipients (INSendMessageIntent, Action)' instead.")] @@ -6964,13 +6779,12 @@ interface INSendMessageIntentHandling { void ResolveContent (INSendMessageIntent intent, Action completion); [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use 'ResolveSpeakableGroupName' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveSpeakableGroupName' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveSpeakableGroupName' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveSpeakableGroupName' instead.")] [Export ("resolveGroupNameForSendMessage:withCompletion:")] void ResolveGroupName (INSendMessageIntent intent, Action completion); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("resolveOutgoingMessageTypeForSendMessage:withCompletion:")] void ResolveOutgoingMessageType (INSendMessageIntent intent, Action completion); @@ -7005,13 +6819,12 @@ interface INSendMessageIntentResponse { #endif [Deprecated (PlatformName.iOS, 16, 0, message: "Use the 'SentMessages' property instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use the 'SentMessages' property instead.")] - [Deprecated (PlatformName.WatchOS, 9, 0, message: "Use the 'SentMessages' property instead.")] [MacCatalyst (13, 1)] [NullAllowed, Export ("sentMessage", ArgumentSemantic.Copy)] INMessage SentMessage { get; set; } [NoMac] - [Watch (9, 0), iOS (16, 0)] + [iOS (16, 0)] [MacCatalyst (16, 0)] [NullAllowed, Export ("sentMessages", ArgumentSemantic.Copy)] INMessage [] SentMessages { get; set; } @@ -7059,7 +6872,6 @@ interface INSendPaymentIntentHandling { #endif (INSendPaymentIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolvePayee (INSendPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolvePayee (INSendPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolvePayee (INSendPaymentIntent, Action)' instead.")] [Export ("resolvePayeeForSendPayment:withCompletion:")] @@ -7069,7 +6881,6 @@ interface INSendPaymentIntentHandling { [Export ("resolvePayeeForSendPayment:completion:")] void ResolvePayee (INSendPaymentIntent intent, Action completion); - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ResolveCurrencyAmount (INSendPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'ResolveCurrencyAmount (INSendPaymentIntent, Action)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveCurrencyAmount (INSendPaymentIntent, Action)' instead.")] [Export ("resolveCurrencyAmountForSendPayment:withCompletion:")] @@ -7110,7 +6921,6 @@ interface INSendPaymentIntentResponse { /// Apple documentation for INSetAudioSourceInCarIntent [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7130,7 +6940,6 @@ interface INSetAudioSourceInCarIntent { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7163,7 +6972,6 @@ interface INSetAudioSourceInCarIntentHandling { /// Apple documentation for INSetAudioSourceInCarIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7184,7 +6992,6 @@ interface INSetAudioSourceInCarIntentResponse { /// Apple documentation for INSetClimateSettingsInCarIntent [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7252,7 +7059,6 @@ interface INSetClimateSettingsInCarIntent { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7316,7 +7122,6 @@ interface INSetClimateSettingsInCarIntentHandling { /// Apple documentation for INSetClimateSettingsInCarIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7337,7 +7142,6 @@ interface INSetClimateSettingsInCarIntentResponse { /// Apple documentation for INSetDefrosterSettingsInCarIntent [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7369,7 +7173,6 @@ interface INSetDefrosterSettingsInCarIntent { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7406,7 +7209,6 @@ interface INSetDefrosterSettingsInCarIntentHandling { /// Apple documentation for INSetDefrosterSettingsInCarIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7426,7 +7228,6 @@ interface INSetDefrosterSettingsInCarIntentResponse { /// /// Apple documentation for INSetMessageAttributeIntent [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] @@ -7444,7 +7245,6 @@ interface INSetMessageAttributeIntent { } [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Protocol] @@ -7472,7 +7272,6 @@ interface INSetMessageAttributeIntentHandling { /// /// Apple documentation for INSetMessageAttributeIntentResponse [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] @@ -7492,7 +7291,6 @@ interface INSetMessageAttributeIntentResponse { /// Apple documentation for INSetProfileInCarIntent [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7541,7 +7339,6 @@ interface INSetProfileInCarIntent { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7584,7 +7381,6 @@ interface INSetProfileInCarIntentHandling { /// Apple documentation for INSetProfileInCarIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7605,7 +7401,6 @@ interface INSetProfileInCarIntentResponse { /// Apple documentation for INSetRadioStationIntent [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7634,7 +7429,6 @@ interface INSetRadioStationIntent { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7676,7 +7470,6 @@ interface INSetRadioStationIntentHandling { /// Apple documentation for INSetRadioStationIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7697,7 +7490,6 @@ interface INSetRadioStationIntentResponse { /// Apple documentation for INSetSeatSettingsInCarIntent [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7746,7 +7538,6 @@ interface INSetSeatSettingsInCarIntent { [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7795,7 +7586,6 @@ interface INSetSeatSettingsInCarIntentHandling { /// Apple documentation for INSetSeatSettingsInCarIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -7811,7 +7601,7 @@ interface INSetSeatSettingsInCarIntentResponse { INSetSeatSettingsInCarIntentResponseCode Code { get; } } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INShareFocusStatusIntent { @@ -7823,7 +7613,7 @@ interface INShareFocusStatusIntent { INFocusStatus FocusStatus { get; } } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Protocol] interface INShareFocusStatusIntentHandling { [Abstract] @@ -7834,7 +7624,7 @@ interface INShareFocusStatusIntentHandling { void ConfirmShareFocusStatus (INShareFocusStatusIntent intent, Action completion); } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum INShareFocusStatusIntentResponseCode : long { Unspecified = 0, @@ -7845,7 +7635,7 @@ public enum INShareFocusStatusIntentResponseCode : long { FailureRequiringAppLaunch, } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INShareFocusStatusIntentResponse { @@ -7887,9 +7677,6 @@ interface INSpeakable { IINSpeakable [] AlternativeSpeakableMatches { get; } [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'VocabularyIdentifier' instead.")] -#if !NET - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'VocabularyIdentifier' instead.")] -#endif [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'VocabularyIdentifier' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'VocabularyIdentifier' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'VocabularyIdentifier' instead.")] @@ -7968,14 +7755,14 @@ interface INSpeakableStringResolutionResult { INSpeakableStringResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INSpeakableStringResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -7991,7 +7778,6 @@ interface INSpeakableStringResolutionResult { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntent' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntent' instead.")] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntent' instead.")] @@ -7999,7 +7785,6 @@ interface INSpeakableStringResolutionResult { interface INStartAudioCallIntent { [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use '.ctor (INCallDestinationType, INPerson [])' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use '.ctor (INCallDestinationType, INPerson [])' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use '.ctor (INCallDestinationType, INPerson [])' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use '.ctor (INCallDestinationType, INPerson [])' instead.")] [Export ("initWithContacts:")] @@ -8024,7 +7809,6 @@ interface INStartAudioCallIntent { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentHandling' instead.")] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntentHandling' instead.")] @@ -8062,7 +7846,6 @@ interface INStartAudioCallIntentHandling { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponse' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponse' instead.")] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntentResponse' instead.")] @@ -8082,7 +7865,6 @@ interface INStartAudioCallIntentResponse { /// /// Apple documentation for INStartPhotoPlaybackIntent [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -8123,7 +7905,6 @@ interface INStartPhotoPlaybackIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -8162,7 +7943,6 @@ interface INStartPhotoPlaybackIntentHandling { /// /// Apple documentation for INStartPhotoPlaybackIntentResponse [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -8191,8 +7971,6 @@ interface INStartPhotoPlaybackIntentResponse { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntent' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntent' instead.")] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntent' instead.")] @@ -8213,8 +7991,6 @@ interface INStartVideoCallIntent { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'INStartCallIntentHandling' instead.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentHandling' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentHandling' instead.")] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntentHandling' instead.")] @@ -8248,8 +8024,6 @@ interface INStartVideoCallIntentHandling { [Obsoleted (PlatformName.MacOSX, 10,0, message: "Unavailable on macOS, will be removed in the future.")] #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'INStartCallIntentResponse' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'INStartCallIntentResponse' instead.")] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'INStartCallIntentResponse' instead.")] @@ -8391,14 +8165,14 @@ interface INStringResolutionResult { INStringResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INStringResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -8412,7 +8186,6 @@ interface INStringResolutionResult { [Deprecated (PlatformName.iOS, 15, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Deprecated (PlatformName.MacOSX, 12, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] @@ -8450,14 +8223,14 @@ interface INTemperatureResolutionResult { INTemperatureResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INTemperatureResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -8468,7 +8241,6 @@ interface INTemperatureResolutionResult { /// /// Apple documentation for INTermsAndConditions [Unavailable (PlatformName.MacOSX)] - [Unavailable (PlatformName.WatchOS)] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -8489,7 +8261,6 @@ interface INTermsAndConditions : NSSecureCoding, NSCopying { } [Unavailable (PlatformName.MacOSX)] - [Watch (6, 0)] [TV (14, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -8529,7 +8300,6 @@ interface INWorkoutGoalUnitTypeResolutionResult { INWorkoutGoalUnitTypeResolutionResult SuccessWithResolvedWorkoutGoalUnitType (INWorkoutGoalUnitType resolvedWorkoutGoalUnitType); [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -8543,7 +8313,6 @@ interface INWorkoutGoalUnitTypeResolutionResult { INWorkoutGoalUnitTypeResolutionResult ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (INWorkoutGoalUnitType workoutGoalUnitTypeToConfirm); [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -8569,14 +8338,14 @@ interface INWorkoutGoalUnitTypeResolutionResult { INWorkoutGoalUnitTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INWorkoutGoalUnitTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -8601,7 +8370,6 @@ interface INWorkoutLocationTypeResolutionResult { INWorkoutLocationTypeResolutionResult SuccessWithResolvedWorkoutLocationType (INWorkoutLocationType resolvedWorkoutLocationType); [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -8615,7 +8383,6 @@ interface INWorkoutLocationTypeResolutionResult { INWorkoutLocationTypeResolutionResult ConfirmationRequiredWithWorkoutLocationTypeToConfirm (INWorkoutLocationType workoutLocationTypeToConfirm); [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -8641,14 +8408,14 @@ interface INWorkoutLocationTypeResolutionResult { INWorkoutLocationTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INWorkoutLocationTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -8666,23 +8433,23 @@ interface NSUserActivity_IntentsAdditions { [Export ("interaction")] INInteraction GetInteraction (); - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("suggestedInvocationPhrase")] [return: NullAllowed] string GetSuggestedInvocationPhrase (); - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("setSuggestedInvocationPhrase:")] void SetSuggestedInvocationPhrase ([NullAllowed] string suggestedInvocationPhrase); - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("shortcutAvailability")] INShortcutAvailabilityOptions GetShortcutAvailability (); - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setShortcutAvailability:")] void SetShortcutAvailability (INShortcutAvailabilityOptions shortcutAvailabilityOptions); @@ -8735,7 +8502,6 @@ interface INActivateCarSignalIntentHandling { /// Information relating to a bill. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -8775,7 +8541,6 @@ interface INBillDetails : NSCopying, NSSecureCoding { /// The entity to which a bill payment is made. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -8801,7 +8566,6 @@ interface INBillPayee : NSCopying, NSSecureCoding { /// /// for resolving parameters in interactions involving bill payments. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -8841,14 +8605,14 @@ interface INBillPayeeResolutionResult { INBillPayeeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INBillPayeeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -8858,7 +8622,6 @@ interface INBillPayeeResolutionResult { /// /// for resolving parameters in interactions involving bill payments. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -8868,7 +8631,6 @@ interface INBillPayeeResolutionResult { interface INBillTypeResolutionResult { [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Internal] [Static] @@ -8882,7 +8644,6 @@ interface INBillTypeResolutionResult { INBillTypeResolutionResult SuccessWithResolvedBillType (INBillType resolvedBillType); [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Internal] [Static] @@ -8914,14 +8675,14 @@ interface INBillTypeResolutionResult { INBillTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INBillTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -8944,7 +8705,6 @@ interface INCarSignalOptionsResolutionResult { INCarSignalOptionsResolutionResult SuccessWithResolvedCarSignalOptions (INCarSignalOptions resolvedCarSignalOptions); [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Internal] [Static] @@ -8958,7 +8718,6 @@ interface INCarSignalOptionsResolutionResult { INCarSignalOptionsResolutionResult ConfirmationRequiredWithCarSignalOptionsToConfirm (INCarSignalOptions carSignalOptionsToConfirm); [Deprecated (PlatformName.iOS, 11, 0)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Internal] [Static] @@ -8984,14 +8743,14 @@ interface INCarSignalOptionsResolutionResult { INCarSignalOptionsResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCarSignalOptionsResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -9087,12 +8846,12 @@ interface INGetCarPowerLevelStatusIntentHandling { [Export ("handleGetCarPowerLevelStatus:completion:")] void HandleGetCarPowerLevelStatus (INGetCarPowerLevelStatusIntent intent, Action completion); - [NoWatch, iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("startSendingUpdatesForGetCarPowerLevelStatus:toObserver:")] void StartSendingUpdates (INGetCarPowerLevelStatusIntent intent, IINGetCarPowerLevelStatusIntentResponseObserver observer); - [NoWatch, iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("stopSendingUpdatesForGetCarPowerLevelStatus:")] void StopSendingUpdates (INGetCarPowerLevelStatusIntent intent); @@ -9112,7 +8871,7 @@ interface INGetCarPowerLevelStatusIntentHandling { interface IINGetCarPowerLevelStatusIntentResponseObserver { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Protocol] interface INGetCarPowerLevelStatusIntentResponseObserver { @@ -9141,7 +8900,7 @@ interface INGetCarPowerLevelStatusIntentResponse { [Export ("code")] INGetCarPowerLevelStatusIntentResponseCode Code { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("carIdentifier")] string CarIdentifier { get; set; } @@ -9163,75 +8922,73 @@ interface INGetCarPowerLevelStatusIntentResponse { [NullAllowed, Export ("distanceRemaining", ArgumentSemantic.Copy)] NSMeasurement DistanceRemaining { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BindAs (typeof (bool?))] [NullAllowed, Export ("charging", ArgumentSemantic.Copy)] NSNumber Charging { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BindAs (typeof (double?))] [NullAllowed, Export ("minutesToFull", ArgumentSemantic.Copy)] NSNumber MinutesToFull { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("maximumDistance", ArgumentSemantic.Copy)] NSMeasurement MaximumDistance { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("distanceRemainingElectric", ArgumentSemantic.Copy)] NSMeasurement DistanceRemainingElectric { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("maximumDistanceElectric", ArgumentSemantic.Copy)] NSMeasurement MaximumDistanceElectric { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("distanceRemainingFuel", ArgumentSemantic.Copy)] NSMeasurement DistanceRemainingFuel { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("maximumDistanceFuel", ArgumentSemantic.Copy)] NSMeasurement MaximumDistanceFuel { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("consumptionFormulaArguments", ArgumentSemantic.Copy)] NSDictionary ConsumptionFormulaArguments { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("chargingFormulaArguments", ArgumentSemantic.Copy)] NSDictionary ChargingFormulaArguments { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("dateOfLastStateUpdate", ArgumentSemantic.Copy)] NSDateComponents DateOfLastStateUpdate { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [BindAs (typeof (INCarChargingConnectorType))] [NullAllowed, Export ("activeConnector")] NSString ActiveConnector { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("maximumBatteryCapacity", ArgumentSemantic.Copy)] NSMeasurement MaximumBatteryCapacity { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("currentBatteryCapacity", ArgumentSemantic.Copy)] NSMeasurement CurrentBatteryCapacity { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("minimumBatteryCapacity", ArgumentSemantic.Copy)] NSMeasurement MinimumBatteryCapacity { get; set; } @@ -9239,7 +8996,6 @@ interface INGetCarPowerLevelStatusIntentResponse { /// An for paying a bill. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -9275,7 +9031,6 @@ interface INPayBillIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -9323,7 +9078,6 @@ interface INPayBillIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -9363,7 +9117,6 @@ interface INPayBillIntentResponse { [BaseType (typeof (NSObject))] interface INPaymentAccount : NSCopying, NSSecureCoding { - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Please use '.ctor (INSpeakableString, string, INAccountType, INSpeakableString, INBalanceAmount, INBalanceAmount)' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Please use '.ctor (INSpeakableString, string, INAccountType, INSpeakableString, INBalanceAmount, INBalanceAmount)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Please use '.ctor (INSpeakableString, string, INAccountType, INSpeakableString, INBalanceAmount, INBalanceAmount)' instead.")] [Export ("initWithNickname:number:accountType:organizationName:")] @@ -9435,14 +9188,14 @@ interface INPaymentAccountResolutionResult { INPaymentAccountResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INPaymentAccountResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -9508,14 +9261,14 @@ interface INPaymentAmountResolutionResult { INPaymentAmountResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INPaymentAmountResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -9538,7 +9291,6 @@ interface INPaymentStatusResolutionResult { INPaymentStatusResolutionResult SuccessWithResolvedPaymentStatus (INPaymentStatus resolvedPaymentStatus); [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -9552,7 +9304,6 @@ interface INPaymentStatusResolutionResult { INPaymentStatusResolutionResult ConfirmationRequiredWithPaymentStatusToConfirm (INPaymentStatus paymentStatusToConfirm); [Internal] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static] @@ -9578,14 +9329,14 @@ interface INPaymentStatusResolutionResult { INPaymentStatusResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INPaymentStatusResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -9594,7 +9345,6 @@ interface INPaymentStatusResolutionResult { /// An for locating bills. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -9624,7 +9374,6 @@ interface INSearchForBillsIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -9666,7 +9415,6 @@ interface INSearchForBillsIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Unavailable (PlatformName.MacOSX)] [NoTV] [MacCatalyst (13, 1)] @@ -9808,14 +9556,14 @@ interface INAccountTypeResolutionResult { INAccountTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INAccountTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -9828,13 +9576,12 @@ interface INAccountTypeResolutionResult { [BaseType (typeof (INIntent))] interface INAddTasksIntent { - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithTargetTaskList:taskTitles:spatialEventTrigger:temporalEventTrigger:priority:")] [DesignatedInitializer] NativeHandle Constructor ([NullAllowed] INTaskList targetTaskList, [NullAllowed] INSpeakableString [] taskTitles, [NullAllowed] INSpatialEventTrigger spatialEventTrigger, [NullAllowed] INTemporalEventTrigger temporalEventTrigger, INTaskPriority priority); - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the constructor with 'INTaskPriority priority' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the constructor with 'INTaskPriority priority' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the constructor with 'INTaskPriority priority' instead.")] [Export ("initWithTargetTaskList:taskTitles:spatialEventTrigger:temporalEventTrigger:")] @@ -9852,7 +9599,7 @@ interface INAddTasksIntent { [NullAllowed, Export ("temporalEventTrigger", ArgumentSemantic.Copy)] INTemporalEventTrigger TemporalEventTrigger { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("priority", ArgumentSemantic.Assign)] INTaskPriority Priority { get; } @@ -9871,12 +9618,11 @@ interface INAddTasksIntentHandling { void Confirm (INAddTasksIntent intent, Action completion); [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ResolveTargetTaskList (Action)' overload instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'ResolveTargetTaskList (Action)' overload instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveTargetTaskList (Action)' overload instead.")] [Export ("resolveTargetTaskListForAddTasks:withCompletion:")] void ResolveTargetTaskList (INAddTasksIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveTargetTaskListForAddTasks:completion:")] void ResolveTargetTaskList (INAddTasksIntent intent, Action completionHandler); @@ -9888,17 +9634,16 @@ interface INAddTasksIntentHandling { void ResolveSpatialEventTrigger (INAddTasksIntent intent, Action completion); [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ResolveTemporalEventTrigger (Action)' overload instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'ResolveTemporalEventTrigger (Action)' overload instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveTemporalEventTrigger (Action)' overload instead.")] [Export ("resolveTemporalEventTriggerForAddTasks:withCompletion:")] void ResolveTemporalEventTrigger (INAddTasksIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveTemporalEventTriggerForAddTasks:completion:")] void ResolveTemporalEventTrigger (INAddTasksIntent intent, Action completionHandler); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolvePriorityForAddTasks:withCompletion:")] void ResolvePriority (INAddTasksIntent intent, Action completion); @@ -9928,7 +9673,6 @@ interface INAddTasksIntentResponse { /// An indicating the user wishes to append content to a note. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoMac, NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -9947,7 +9691,6 @@ interface INAppendToNoteIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -9971,7 +9714,6 @@ interface INAppendToNoteIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -10050,14 +9792,14 @@ interface INBalanceTypeResolutionResult { INBalanceTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INBalanceTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10099,14 +9841,14 @@ interface INCallDestinationTypeResolutionResult { INCallDestinationTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCallDestinationTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10120,7 +9862,7 @@ interface INCallDestinationTypeResolutionResult { [DisableDefaultCtor] interface INCallRecord : NSCopying, NSSecureCoding { - [Watch (7, 4), iOS (14, 5)] + [iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("initWithIdentifier:dateCreated:callRecordType:callCapability:callDuration:unseen:participants:numberOfCalls:isCallerIdBlocked:")] [DesignatedInitializer] @@ -10128,26 +9870,24 @@ interface INCallRecord : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 14, 5, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?, int?)' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 5, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?, int?)' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 4, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?, int?)' instead.")] [Deprecated (PlatformName.MacOSX, 11, 3, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?, int?)' instead.")] - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithIdentifier:dateCreated:caller:callRecordType:callCapability:callDuration:unseen:numberOfCalls:")] NativeHandle Constructor (string identifier, [NullAllowed] NSDate dateCreated, [NullAllowed] INPerson caller, INCallRecordType callRecordType, INCallCapability callCapability, [NullAllowed][BindAs (typeof (double?))] NSNumber callDuration, [NullAllowed][BindAs (typeof (bool?))] NSNumber unseen, [NullAllowed][BindAs (typeof (int?))] NSNumber numberOfCalls); - [Watch (7, 4), iOS (14, 5)] + [iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("initWithIdentifier:dateCreated:callRecordType:callCapability:callDuration:unseen:numberOfCalls:")] NativeHandle Constructor (string identifier, [NullAllowed] NSDate dateCreated, INCallRecordType callRecordType, INCallCapability callCapability, [NullAllowed][BindAs (typeof (double?))] NSNumber callDuration, [NullAllowed][BindAs (typeof (bool?))] NSNumber unseen, [NullAllowed][BindAs (typeof (int?))] NSNumber numberOfCalls); [Deprecated (PlatformName.iOS, 14, 5, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?)' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 5, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?)' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 4, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?)' instead.")] [Deprecated (PlatformName.MacOSX, 11, 3, message: "Use '.ctor (string, NSDate, INCallRecordType, INCallCapability, double?, bool?)' instead.")] [Export ("initWithIdentifier:dateCreated:caller:callRecordType:callCapability:callDuration:unseen:")] NativeHandle Constructor (string identifier, [NullAllowed] NSDate dateCreated, [NullAllowed] INPerson caller, INCallRecordType callRecordType, INCallCapability callCapability, [NullAllowed] NSNumber callDuration, [NullAllowed] NSNumber unseen); - [Watch (7, 4), iOS (14, 5)] + [iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("initWithIdentifier:dateCreated:callRecordType:callCapability:callDuration:unseen:")] NativeHandle Constructor (string identifier, [NullAllowed] NSDate dateCreated, INCallRecordType callRecordType, INCallCapability callCapability, [NullAllowed][BindAs (typeof (double?))] NSNumber callDuration, [NullAllowed][BindAs (typeof (bool?))] NSNumber unseen); @@ -10160,7 +9900,6 @@ interface INCallRecord : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 14, 5)] [Deprecated (PlatformName.MacOSX, 12, 0)] - [Deprecated (PlatformName.WatchOS, 7, 4)] [Deprecated (PlatformName.MacCatalyst, 14, 5)] [NullAllowed, Export ("caller", ArgumentSemantic.Copy)] INPerson Caller { get; } @@ -10180,19 +9919,19 @@ interface INCallRecord : NSCopying, NSSecureCoding { NSNumber WeakUnseen { get; } [BindAs (typeof (int?))] - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("numberOfCalls", ArgumentSemantic.Copy)] NSNumber NumberOfCalls { get; } [BindAs (typeof (bool?))] - [Watch (7, 4), iOS (14, 5)] + [iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("isCallerIdBlocked", ArgumentSemantic.Copy)] NSNumber IsCallerIdBlocked { get; } [NullAllowed] - [Watch (7, 4), iOS (14, 5)] + [iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("participants", ArgumentSemantic.Copy)] INPerson [] Participants { get; } @@ -10233,14 +9972,14 @@ interface INCallRecordTypeOptionsResolutionResult { INCallRecordTypeOptionsResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INCallRecordTypeOptionsResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10248,7 +9987,7 @@ interface INCallRecordTypeOptionsResolutionResult { } /// An indicating the user wishes to cancel a ride. - [NoWatch, NoMac, NoTV] + [NoMac, NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] @@ -10262,7 +10001,7 @@ interface INCancelRideIntent { string RideIdentifier { get; } } - [NoWatch, NoMac, NoTV] + [NoMac, NoTV] [MacCatalyst (13, 1)] [Protocol] interface INCancelRideIntentHandling { @@ -10277,7 +10016,7 @@ interface INCancelRideIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. - [NoWatch, NoMac, NoTV] + [NoMac, NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -10361,7 +10100,6 @@ interface INCreateNoteIntentResponse { /// An indicating the user wishes to create a new task list. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -10384,7 +10122,6 @@ interface INCreateTaskListIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -10411,7 +10148,6 @@ interface INCreateTaskListIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -10463,14 +10199,14 @@ interface INDateSearchTypeResolutionResult { INDateSearchTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INDateSearchTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10479,7 +10215,6 @@ interface INDateSearchTypeResolutionResult { /// An indicating the user wishes to get a bar or QR code for payment or contact information. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -10496,7 +10231,6 @@ interface INGetVisualCodeIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -10517,7 +10251,6 @@ interface INGetVisualCodeIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -10584,14 +10317,14 @@ interface INLocationSearchTypeResolutionResult { INLocationSearchTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INLocationSearchTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10673,14 +10406,14 @@ interface INNoteContentResolutionResult { INNoteContentResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INNoteContentResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10690,7 +10423,6 @@ interface INNoteContentResolutionResult { /// /// for resolving parameters in note content type-related interactions. [Deprecated (PlatformName.iOS, 13, 0, message: "Not used anymore.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Not used anymore.")] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Not used anymore.")] @@ -10724,14 +10456,14 @@ interface INNoteContentTypeResolutionResult { INNoteContentTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INNoteContentTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10776,14 +10508,14 @@ interface INNoteResolutionResult { INNoteResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INNoteResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10828,14 +10560,14 @@ interface INNotebookItemTypeResolutionResult { INNotebookItemTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INNotebookItemTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -10896,7 +10628,7 @@ interface INRecurrenceRule : NSCopying, NSSecureCoding { [Export ("initWithInterval:frequency:")] NativeHandle Constructor (nuint interval, INRecurrenceFrequency frequency); - [Watch (7, 0), NoMac, iOS (14, 0)] + [NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithInterval:frequency:weeklyRecurrenceDays:")] [DesignatedInitializer] @@ -10908,7 +10640,7 @@ interface INRecurrenceRule : NSCopying, NSSecureCoding { [Export ("frequency")] INRecurrenceFrequency Frequency { get; } - [Watch (7, 0), NoMac, iOS (14, 0)] + [NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("weeklyRecurrenceDays")] INDayOfWeekOptions WeeklyRecurrenceDays { get; } @@ -10948,14 +10680,14 @@ interface INRequestPaymentCurrencyAmountResolutionResult { INRequestPaymentCurrencyAmountResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INRequestPaymentCurrencyAmountResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11012,14 +10744,14 @@ interface INRequestPaymentPayerResolutionResult { INRequestPaymentPayerResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INRequestPaymentPayerResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11099,21 +10831,18 @@ interface INSearchForAccountsIntentResponse { [BaseType (typeof (INIntent))] interface INSearchForNotebookItemsIntent { - [Deprecated (PlatformName.WatchOS, 4, 2, message: "Use the constructor with 'string notebookItemIdentifier' instead.")] [Deprecated (PlatformName.iOS, 11, 2, message: "Use the constructor with 'string notebookItemIdentifier' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the constructor with 'string notebookItemIdentifier' instead.")] [Export ("initWithTitle:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:")] NativeHandle Constructor ([NullAllowed] INSpeakableString title, [NullAllowed] string content, INNotebookItemType itemType, INTaskStatus status, [NullAllowed] CLPlacemark location, INLocationSearchType locationSearchType, [NullAllowed] INDateComponentsRange dateTime, INDateSearchType dateSearchType); - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the constructor with 'INTemporalEventTriggerTypeOptions temporalEventTriggerTypes' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the constructor with 'INTemporalEventTriggerTypeOptions temporalEventTriggerTypes' instead.")] - [Watch (4, 2)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the constructor with 'INTemporalEventTriggerTypeOptions temporalEventTriggerTypes' instead.")] [Export ("initWithTitle:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:notebookItemIdentifier:")] NativeHandle Constructor ([NullAllowed] INSpeakableString title, [NullAllowed] string content, INNotebookItemType itemType, INTaskStatus status, [NullAllowed] CLPlacemark location, INLocationSearchType locationSearchType, [NullAllowed] INDateComponentsRange dateTime, INDateSearchType dateSearchType, [NullAllowed] string notebookItemIdentifier); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithTitle:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:temporalEventTriggerTypes:taskPriority:notebookItemIdentifier:")] [DesignatedInitializer] @@ -11143,17 +10872,16 @@ interface INSearchForNotebookItemsIntent { [Export ("dateSearchType", ArgumentSemantic.Assign)] INDateSearchType DateSearchType { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("temporalEventTriggerTypes", ArgumentSemantic.Assign)] INTemporalEventTriggerTypeOptions TemporalEventTriggerTypes { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("taskPriority", ArgumentSemantic.Assign)] INTaskPriority TaskPriority { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [NullAllowed, Export ("notebookItemIdentifier")] string NotebookItemIdentifier { get; } @@ -11195,12 +10923,12 @@ interface INSearchForNotebookItemsIntentHandling { [Export ("resolveDateSearchTypeForSearchForNotebookItems:withCompletion:")] void ResolveDateSearchType (INSearchForNotebookItemsIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveTemporalEventTriggerTypesForSearchForNotebookItems:withCompletion:")] void ResolveTemporalEventTriggerTypes (INSearchForNotebookItemsIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveTaskPriorityForSearchForNotebookItems:withCompletion:")] void ResolveTaskPriority (INSearchForNotebookItemsIntent intent, Action completion); @@ -11284,14 +11012,14 @@ interface INSendMessageRecipientResolutionResult { INSendMessageRecipientResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INSendMessageRecipientResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11332,14 +11060,14 @@ interface INSendPaymentCurrencyAmountResolutionResult { INSendPaymentCurrencyAmountResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INSendPaymentCurrencyAmountResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11396,14 +11124,14 @@ interface INSendPaymentPayeeResolutionResult { INSendPaymentPayeeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INSendPaymentPayeeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11411,7 +11139,7 @@ interface INSendPaymentPayeeResolutionResult { } /// An indicating the user wishes to send feedback about a ride. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] @@ -11431,7 +11159,7 @@ interface INSendRideFeedbackIntent { INCurrencyAmount Tip { get; set; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Protocol] interface INSendRideFeedbackIntentHandling { @@ -11446,7 +11174,7 @@ interface INSendRideFeedbackIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -11466,13 +11194,12 @@ interface INSendRideFeedbackIntentResponse { [BaseType (typeof (INIntent))] interface INSetTaskAttributeIntent { - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithTargetTask:taskTitle:status:priority:spatialEventTrigger:temporalEventTrigger:")] [DesignatedInitializer] NativeHandle Constructor ([NullAllowed] INTask targetTask, [NullAllowed] INSpeakableString taskTitle, INTaskStatus status, INTaskPriority priority, [NullAllowed] INSpatialEventTrigger spatialEventTrigger, [NullAllowed] INTemporalEventTrigger temporalEventTrigger); - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the 'INTaskPriority priority' overload instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the 'INTaskPriority priority' overload instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the 'INTaskPriority priority' overload instead.")] [Export ("initWithTargetTask:status:spatialEventTrigger:temporalEventTrigger:")] @@ -11481,7 +11208,7 @@ interface INSetTaskAttributeIntent { [NullAllowed, Export ("targetTask", ArgumentSemantic.Copy)] INTask TargetTask { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("taskTitle", ArgumentSemantic.Copy)] INSpeakableString TaskTitle { get; } @@ -11489,7 +11216,7 @@ interface INSetTaskAttributeIntent { [Export ("status", ArgumentSemantic.Assign)] INTaskStatus Status { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("priority", ArgumentSemantic.Assign)] INTaskPriority Priority { get; } @@ -11516,7 +11243,7 @@ interface INSetTaskAttributeIntentHandling { [Export ("resolveTargetTaskForSetTaskAttribute:withCompletion:")] void ResolveTargetTask (INSetTaskAttributeIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveTaskTitleForSetTaskAttribute:withCompletion:")] void ResolveTaskTitle (INSetTaskAttributeIntent intent, Action completion); @@ -11524,7 +11251,7 @@ interface INSetTaskAttributeIntentHandling { [Export ("resolveStatusForSetTaskAttribute:withCompletion:")] void ResolveStatus (INSetTaskAttributeIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolvePriorityForSetTaskAttribute:withCompletion:")] void ResolvePriority (INSetTaskAttributeIntent intent, Action completion); @@ -11533,12 +11260,11 @@ interface INSetTaskAttributeIntentHandling { void ResolveSpatialEventTrigger (INSetTaskAttributeIntent intent, Action completion); [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ResolveTemporalEventTrigger (INSetTaskAttributeIntent Action)' overload instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'ResolveTemporalEventTrigger (INSetTaskAttributeIntent Action)' overload instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ResolveTemporalEventTrigger (INSetTaskAttributeIntent Action)' overload instead.")] [Export ("resolveTemporalEventTriggerForSetTaskAttribute:withCompletion:")] void ResolveTemporalEventTrigger (INSetTaskAttributeIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveTemporalEventTriggerForSetTaskAttribute:completion:")] void ResolveTemporalEventTrigger (INSetTaskAttributeIntent intent, Action completionHandler); @@ -11619,14 +11345,14 @@ interface INSpatialEventTriggerResolutionResult { INSpatialEventTriggerResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INSpatialEventTriggerResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11640,7 +11366,7 @@ interface INSpatialEventTriggerResolutionResult { [DisableDefaultCtor] interface INTask : NSCopying, NSSecureCoding { - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithTitle:status:taskType:spatialEventTrigger:temporalEventTrigger:createdDateComponents:modifiedDateComponents:identifier:priority:")] [DesignatedInitializer] @@ -11673,7 +11399,7 @@ interface INTask : NSCopying, NSSecureCoding { [NullAllowed, Export ("identifier")] string Identifier { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("priority", ArgumentSemantic.Assign)] INTaskPriority Priority { get; } @@ -11748,14 +11474,14 @@ interface INTaskListResolutionResult { INTaskListResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INTaskListResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11801,14 +11527,14 @@ interface INTaskResolutionResult { INTaskResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INTaskResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11850,14 +11576,14 @@ interface INTaskStatusResolutionResult { INTaskStatusResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INTaskStatusResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11918,14 +11644,14 @@ interface INTemporalEventTriggerResolutionResult { INTemporalEventTriggerResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INTemporalEventTriggerResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] @@ -11948,7 +11674,6 @@ interface INTextNoteContent : NSSecureCoding, NSCopying { /// An indicating the user wishes to transfer funds. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -11977,7 +11702,6 @@ interface INTransferMoneyIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -12010,7 +11734,6 @@ interface INTransferMoneyIntentHandling { /// /// subclass that developers of interface implementations populate with their extension's results. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -12047,7 +11770,6 @@ interface INTransferMoneyIntentResponse { /// /// for resolving parameters in visual code type-related interactions. [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [NoTV, NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] @@ -12082,21 +11804,21 @@ interface INVisualCodeTypeResolutionResult { INVisualCodeTypeResolutionResult Unsupported { get; } [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("unsupportedWithReason:")] INVisualCodeTypeResolutionResult GetUnsupported (nint reason); [New] - [Watch (6, 0), iOS (13, 0), NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [Static] [Export ("confirmationRequiredWithItemToConfirm:forReason:")] INVisualCodeTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (5, 0), NoMac, NoTV] + [NoMac, NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12116,13 +11838,13 @@ interface INDefaultCardTemplate : NSCopying, NSSecureCoding { NativeHandle Constructor (string title); } - [Watch (5, 0), TV (14, 0), NoMac] + [TV (14, 0), NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INMediaItem : NSCopying, NSSecureCoding { - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithIdentifier:title:type:artwork:artist:")] [DesignatedInitializer] @@ -12143,13 +11865,13 @@ interface INMediaItem : NSCopying, NSSecureCoding { [NullAllowed, Export ("artwork", ArgumentSemantic.Copy)] INImage Artwork { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("artist")] string Artist { get; } } - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12162,12 +11884,12 @@ interface INObject : INSpeakable, NSCopying, NSSecureCoding { [Export ("initWithIdentifier:displayString:")] NativeHandle Constructor ([NullAllowed] string identifier, string displayString); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithIdentifier:displayString:subtitleString:displayImage:")] NativeHandle Constructor ([NullAllowed] string identifier, string displayString, [NullAllowed] string subtitleString, [NullAllowed] INImage displayImage); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithIdentifier:displayString:pronunciationHint:subtitleString:displayImage:")] NativeHandle Constructor ([NullAllowed] string identifier, string displayString, [NullAllowed] string pronunciationHint, [NullAllowed] string subtitleString, [NullAllowed] INImage displayImage); @@ -12184,36 +11906,36 @@ interface INObject : INSpeakable, NSCopying, NSSecureCoding { //string PronunciationHint { get; } [Sealed] - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("alternativeSpeakableMatches")] [return: NullAllowed] INSpeakableString [] GetAlternativeSpeakableMatches (); - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("subtitleString")] string SubtitleString { get; set; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("displayImage", ArgumentSemantic.Strong)] INImage DisplayImage { get; set; } // Not [Sealed] since the 'AlternativeSpeakableMatches' inlined property is read-only - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("setAlternativeSpeakableMatches:")] void SetAlternativeSpeakableMatches ([NullAllowed] INSpeakableString [] alternativeSpeakableMatches); } - [Watch (5, 0), TV (14, 0), NoMac] + [TV (14, 0), NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INPlayMediaIntent { - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithMediaItems:mediaContainer:playShuffled:playbackRepeatMode:resumePlayback:playbackQueueLocation:playbackSpeed:mediaSearch:")] [DesignatedInitializer] @@ -12221,7 +11943,6 @@ interface INPlayMediaIntent { [Deprecated (PlatformName.iOS, 13, 0, message: "Use the '.ctor (INMediaItem [], INMediaItem, bool?, INPlaybackRepeatMode, bool?, INPlaybackQueueLocation, double?, INMediaSearch)' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the '.ctor (INMediaItem [], INMediaItem, bool?, INPlaybackRepeatMode, bool?, INPlaybackQueueLocation, double?, INMediaSearch)' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the '.ctor (INMediaItem [], INMediaItem, bool?, INPlaybackRepeatMode, bool?, INPlaybackQueueLocation, double?, INMediaSearch)' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the '.ctor (INMediaItem [], INMediaItem, bool?, INPlaybackRepeatMode, bool?, INPlaybackQueueLocation, double?, INMediaSearch)' instead.")] [Export ("initWithMediaItems:mediaContainer:playShuffled:playbackRepeatMode:resumePlayback:")] NativeHandle Constructor ([NullAllowed] INMediaItem [] mediaItems, [NullAllowed] INMediaItem mediaContainer, [NullAllowed, BindAs (typeof (bool?))] NSNumber playShuffled, INPlaybackRepeatMode playbackRepeatMode, [NullAllowed, BindAs (typeof (bool?))] NSNumber resumePlayback); @@ -12243,24 +11964,24 @@ interface INPlayMediaIntent { [NullAllowed, Export ("resumePlayback", ArgumentSemantic.Copy)] NSNumber ResumePlayback { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("playbackQueueLocation", ArgumentSemantic.Assign)] INPlaybackQueueLocation PlaybackQueueLocation { get; } [BindAs (typeof (double?))] - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("playbackSpeed", ArgumentSemantic.Copy)] NSNumber PlaybackSpeed { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("mediaSearch", ArgumentSemantic.Copy)] INMediaSearch MediaSearch { get; } } - [Watch (5, 0), TV (14, 0), NoMac] + [TV (14, 0), NoMac] [MacCatalyst (13, 1)] [Protocol] interface INPlayMediaIntentHandling { @@ -12272,38 +11993,38 @@ interface INPlayMediaIntentHandling { [Export ("confirmPlayMedia:completion:")] void Confirm (INPlayMediaIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveMediaItemsForPlayMedia:withCompletion:")] void ResolveMediaItems (INPlayMediaIntent intent, Action> completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolvePlayShuffledForPlayMedia:withCompletion:")] void ResolvePlayShuffled (INPlayMediaIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolvePlaybackRepeatModeForPlayMedia:withCompletion:")] void ResolvePlaybackRepeatMode (INPlayMediaIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolveResumePlaybackForPlayMedia:withCompletion:")] void ResolveResumePlayback (INPlayMediaIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolvePlaybackQueueLocationForPlayMedia:withCompletion:")] void ResolvePlaybackQueueLocation (INPlayMediaIntent intent, Action completion); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolvePlaybackSpeedForPlayMedia:withCompletion:")] void ResolvePlaybackSpeed (INPlayMediaIntent intent, Action completion); } - [Watch (5, 0), TV (14, 0), NoMac] + [TV (14, 0), NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -12322,14 +12043,14 @@ interface INPlayMediaIntentResponse { } [Abstract] - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INRelevanceProvider : NSCopying, NSSecureCoding { } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (INRelevanceProvider))] [DisableDefaultCtor] @@ -12346,7 +12067,7 @@ interface INDateRelevanceProvider { NativeHandle Constructor (NSDate startDate, [NullAllowed] NSDate endDate); } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (INRelevanceProvider))] [DisableDefaultCtor] @@ -12360,7 +12081,7 @@ interface INLocationRelevanceProvider { NativeHandle Constructor (CLRegion region); } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (INRelevanceProvider))] [DisableDefaultCtor] @@ -12374,7 +12095,7 @@ interface INDailyRoutineRelevanceProvider { NativeHandle Constructor (INDailyRoutineSituation situation); } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12386,7 +12107,7 @@ interface INRelevantShortcut : NSSecureCoding, NSCopying { [NullAllowed, Export ("watchTemplate", ArgumentSemantic.Copy)] INDefaultCardTemplate WatchTemplate { get; set; } - [iOS (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("widgetKind")] string WidgetKind { get; set; } @@ -12401,7 +12122,7 @@ interface INRelevantShortcut : NSSecureCoding, NSCopying { NativeHandle Constructor (INShortcut shortcut); } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12416,7 +12137,7 @@ interface INRelevantShortcutStore { void SetRelevantShortcuts (INRelevantShortcut [] shortcuts, [NullAllowed] Action completionHandler); } - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12435,7 +12156,7 @@ interface INShortcut : NSSecureCoding, NSCopying { NativeHandle Constructor (NSUserActivity userActivity); } - [Watch (5, 0), NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12452,7 +12173,7 @@ interface INUpcomingMediaManager { void SetPredictionMode (INUpcomingMediaPredictionMode mode, INMediaItemType type); } - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12470,7 +12191,7 @@ interface INVoiceShortcut : NSSecureCoding, NSCopying { delegate void INVoiceShortcutCenterGetVoiceShortcutsHandler ([NullAllowed] INVoiceShortcut [] voiceShortcuts, NSError error); - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12493,7 +12214,7 @@ interface INVoiceShortcutCenter { } // TODO: We need to inline these into NSString once we figure out how the API is used. - //[Watch (5,0)] + // //[Category] //[BaseType (typeof (NSString))] //interface NSString_Intents { @@ -12513,7 +12234,7 @@ interface INVoiceShortcutCenter { // string DeferredLocalizedIntentsStringWithFormat (string format, [NullAllowed] string table, IntPtr arguments); //} - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] @@ -12533,7 +12254,7 @@ interface INAddMediaIntent { INMediaDestination MediaDestination { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface INAddMediaIntentHandling { @@ -12552,7 +12273,7 @@ interface INAddMediaIntentHandling { void ResolveMediaDestination (INAddMediaIntent intent, Action completion); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -12566,7 +12287,7 @@ interface INAddMediaIntentResponse { INAddMediaIntentResponseCode Code { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INMediaItemResolutionResult))] [DisableDefaultCtor] @@ -12630,7 +12351,7 @@ interface INAddMediaMediaItemResolutionResult { INAddMediaMediaItemResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INTaskListResolutionResult))] [DisableDefaultCtor] @@ -12688,7 +12409,7 @@ interface INAddTasksTargetTaskListResolutionResult { INAddTasksTargetTaskListResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INTemporalEventTriggerResolutionResult))] [DisableDefaultCtor] @@ -12747,7 +12468,7 @@ interface INAddTasksTemporalEventTriggerResolutionResult { INAddTasksTemporalEventTriggerResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12767,7 +12488,7 @@ interface INAirline : NSCopying, NSSecureCoding { string IcaoCode { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12787,7 +12508,7 @@ interface INAirport : NSCopying, NSSecureCoding { string IcaoCode { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -12807,7 +12528,7 @@ interface INAirportGate : NSCopying, NSSecureCoding { string Gate { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -12851,8 +12572,7 @@ interface INCallCapabilityResolutionResult { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [BaseType (typeof (INIntent))] @@ -12875,8 +12595,7 @@ interface INDeleteTasksIntent { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Protocol] @@ -12897,8 +12616,7 @@ interface INDeleteTasksIntentHandling { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [BaseType (typeof (INIntentResponse))] @@ -12917,8 +12635,7 @@ interface INDeleteTasksIntentResponse { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [BaseType (typeof (INTaskListResolutionResult))] @@ -12978,8 +12695,7 @@ interface INDeleteTasksTaskListResolutionResult { } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [BaseType (typeof (INTaskResolutionResult))] @@ -13038,7 +12754,7 @@ interface INDeleteTasksTaskResolutionResult { INDeleteTasksTaskResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13085,7 +12801,7 @@ interface INEnergyResolutionResult { INEnergyResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), iOS (13, 0), NoTV] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13128,7 +12844,7 @@ interface INEnumResolutionResult { INEnumResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -13154,13 +12870,13 @@ interface INFile : NSSecureCoding { [NullAllowed, Export ("fileURL", ArgumentSemantic.Strong)] NSUrl FileUrl { get; } - [Watch (8, 3), Mac (12, 1), iOS (15, 2)] + [Mac (12, 1), iOS (15, 2)] [MacCatalyst (15, 2)] [Export ("removedOnCompletion")] bool RemovedOnCompletion { get; set; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13207,7 +12923,7 @@ interface INFileResolutionResult { INFileResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -13236,13 +12952,13 @@ interface INFlight : NSCopying, NSSecureCoding { INAirportGate ArrivalAirportGate { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INFlightReservation : NSCopying, NSSecureCoding { - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:flight:")] [DesignatedInitializer] @@ -13258,7 +12974,7 @@ interface INFlightReservation : NSCopying, NSSecureCoding { INFlight Flight { get; } } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum INFocusStatusAuthorizationStatus : long { NotDetermined = 0, @@ -13267,7 +12983,7 @@ public enum INFocusStatusAuthorizationStatus : long { Authorized, } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum INUnsendMessagesIntentResponseCode : long { Unspecified = 0, @@ -13284,7 +13000,7 @@ public enum INUnsendMessagesIntentResponseCode : long { FailureRequiringInAppAuthentication, } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum INEditMessageIntentResponseCode : long { Unspecified = 0, @@ -13301,7 +13017,7 @@ public enum INEditMessageIntentResponseCode : long { FailureRequiringInAppAuthentication, } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INFocusStatus : NSCopying, NSSecureCoding { @@ -13315,7 +13031,7 @@ interface INFocusStatus : NSCopying, NSSecureCoding { NSNumber IsFocused { get; } } - [Watch (8, 0), NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface INFocusStatusCenter { [Static] @@ -13333,7 +13049,7 @@ interface INFocusStatusCenter { void RequestAuthorization ([NullAllowed] Action completionHandler); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] @@ -13350,7 +13066,7 @@ interface INGetReservationDetailsIntent { INSpeakableString [] ReservationItemReferences { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -13367,7 +13083,7 @@ interface INGetReservationDetailsIntentResponse { INReservation [] Reservations { get; set; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13414,13 +13130,13 @@ interface INLengthResolutionResult { INLengthResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INLodgingReservation : NSCopying, NSSecureCoding { - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:lodgingBusinessLocation:reservationDuration:numberOfAdults:numberOfChildren:")] [DesignatedInitializer] @@ -13444,7 +13160,7 @@ interface INLodgingReservation : NSCopying, NSSecureCoding { NSNumber NumberOfChildren { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13491,7 +13207,7 @@ interface INMassResolutionResult { INMassResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13534,7 +13250,7 @@ interface INMediaAffinityTypeResolutionResult { INMediaAffinityTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -13555,7 +13271,7 @@ interface INMediaDestination : NSCopying, NSSecureCoding { string PlaylistName { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13602,7 +13318,7 @@ interface INMediaDestinationResolutionResult { INMediaDestinationResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13653,7 +13369,7 @@ interface INMediaItemResolutionResult { INMediaItemResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -13694,7 +13410,7 @@ interface INMediaSearch : NSCopying, NSSecureCoding { string MediaIdentifier { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INUserContext))] interface INMediaUserContext { @@ -13707,7 +13423,7 @@ interface INMediaUserContext { NSNumber NumberOfLibraryItems { get; set; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13754,7 +13470,7 @@ interface INObjectResolutionResult { INObjectResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -13801,7 +13517,7 @@ interface INPaymentMethodResolutionResult { INPaymentMethodResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INMediaItemResolutionResult))] [DisableDefaultCtor] @@ -13865,7 +13581,7 @@ interface INPlayMediaMediaItemResolutionResult { INPlayMediaMediaItemResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INDoubleResolutionResult))] [DisableDefaultCtor] @@ -13918,7 +13634,7 @@ interface INPlayMediaPlaybackSpeedResolutionResult { INDoubleResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] interface INPlaybackQueueLocationResolutionResult { @@ -13960,7 +13676,7 @@ interface INPlaybackQueueLocationResolutionResult { INPlaybackQueueLocationResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -14003,7 +13719,7 @@ interface INPlaybackRepeatModeResolutionResult { INPlaybackRepeatModeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14029,13 +13745,13 @@ interface INRentalCar : NSCopying, NSSecureCoding { string RentalCarDescription { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INRentalCarReservation : NSCopying, NSSecureCoding { - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:rentalCar:rentalDuration:pickupLocation:dropOffLocation:")] [DesignatedInitializer] @@ -14057,7 +13773,7 @@ interface INRentalCarReservation : NSCopying, NSSecureCoding { CLPlacemark DropOffLocation { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14081,13 +13797,13 @@ interface INReservation : NSCopying, NSSecureCoding { [NullAllowed, Export ("actions", ArgumentSemantic.Copy)] INReservationAction [] Actions { get; } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("URL", ArgumentSemantic.Copy)] NSUrl Url { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14107,13 +13823,13 @@ interface INReservationAction : NSCopying, NSSecureCoding { NSUserActivity UserActivity { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INRestaurantReservation : NSCopying, NSSecureCoding { - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservationDuration:partySize:restaurantLocation:")] [DesignatedInitializer] @@ -14133,7 +13849,7 @@ interface INRestaurantReservation : NSCopying, NSSecureCoding { CLPlacemark RestaurantLocation { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] @@ -14150,7 +13866,7 @@ interface INSearchForMediaIntent { INMediaSearch MediaSearch { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface INSearchForMediaIntentHandling { @@ -14166,7 +13882,7 @@ interface INSearchForMediaIntentHandling { void ResolveMediaItems (INSearchForMediaIntent intent, Action completion); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -14183,7 +13899,7 @@ interface INSearchForMediaIntentResponse { INMediaItem [] MediaItems { get; set; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14206,7 +13922,7 @@ interface INSeat : NSCopying, NSSecureCoding { string SeatingType { get; } } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INTemporalEventTriggerResolutionResult))] [DisableDefaultCtor] @@ -14265,7 +13981,7 @@ interface INSetTaskAttributeTemporalEventTriggerResolutionResult { INSetTaskAttributeTemporalEventTriggerResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] @@ -14286,7 +14002,7 @@ interface INSnoozeTasksIntent { NSNumber All { get; } } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface INSnoozeTasksIntentHandling { @@ -14305,7 +14021,7 @@ interface INSnoozeTasksIntentHandling { void ResolveNextTriggerTime (INSnoozeTasksIntent intent, Action completion); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -14322,7 +14038,7 @@ interface INSnoozeTasksIntentResponse { INTask [] SnoozedTasks { get; set; } } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INTaskResolutionResult))] [DisableDefaultCtor] @@ -14380,7 +14096,7 @@ interface INSnoozeTasksTaskResolutionResult { INSnoozeTasksTaskResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -14427,7 +14143,7 @@ interface INSpeedResolutionResult { INSpeedResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INCallCapabilityResolutionResult))] [DisableDefaultCtor] @@ -14480,7 +14196,7 @@ interface INStartCallCallCapabilityResolutionResult { INStartCallCallCapabilityResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INPersonResolutionResult))] [DisableDefaultCtor] @@ -14538,31 +14254,30 @@ interface INStartCallContactResolutionResult { INStartCallContactResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] interface INStartCallIntent : UNNotificationContentProviding { - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithCallRecordFilter:callRecordToCallBack:audioRoute:destinationType:contacts:callCapability:")] [DesignatedInitializer] NativeHandle Constructor ([NullAllowed] INCallRecordFilter callRecordFilter, [NullAllowed] INCallRecord callRecordToCallBack, INCallAudioRoute audioRoute, INCallDestinationType destinationType, [NullAllowed] INPerson [] contacts, INCallCapability callCapability); [Deprecated (PlatformName.iOS, 14, 0, message: "Use '.ctor (INCallRecordFilter, INCallRecord, INCallAudioRoute, INCallDestinationType, INPerson[], INCallCapability)' overload instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use '.ctor (INCallRecordFilter, INCallRecord, INCallAudioRoute, INCallDestinationType, INPerson[], INCallCapability)' overload instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use '.ctor (INCallRecordFilter, INCallRecord, INCallAudioRoute, INCallDestinationType, INPerson[], INCallCapability)' overload instead.")] [Export ("initWithAudioRoute:destinationType:contacts:recordTypeForRedialing:callCapability:")] NativeHandle Constructor (INCallAudioRoute audioRoute, INCallDestinationType destinationType, [NullAllowed] INPerson [] contacts, INCallRecordType recordTypeForRedialing, INCallCapability callCapability); - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed] [Export ("callRecordFilter", ArgumentSemantic.Copy)] INCallRecordFilter CallRecordFilter { get; } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed] [Export ("callRecordToCallBack", ArgumentSemantic.Copy)] @@ -14578,7 +14293,6 @@ interface INStartCallIntent : UNNotificationContentProviding { INPerson [] Contacts { get; } [Deprecated (PlatformName.iOS, 14, 0)] - [Deprecated (PlatformName.WatchOS, 7, 0)] [Deprecated (PlatformName.MacCatalyst, 14, 0)] [Export ("recordTypeForRedialing", ArgumentSemantic.Assign)] INCallRecordType RecordTypeForRedialing { get; } @@ -14587,7 +14301,7 @@ interface INStartCallIntent : UNNotificationContentProviding { INCallCapability CallCapability { get; } } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface INStartCallIntentHandling { @@ -14599,7 +14313,7 @@ interface INStartCallIntentHandling { [Export ("confirmStartCall:completion:")] void Confirm (INStartCallIntent intent, Action completion); - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("resolveCallRecordToCallBackForStartCall:withCompletion:")] void ResolveCallRecordToCallBack (INStartCallIntent intent, Action completion); @@ -14614,7 +14328,7 @@ interface INStartCallIntentHandling { void ResolveCallCapability (INStartCallIntent intent, Action completion); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -14628,7 +14342,7 @@ interface INStartCallIntentResponse { INStartCallIntentResponseCode Code { get; } } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -14671,7 +14385,7 @@ interface INTaskPriorityResolutionResult { INTaskPriorityResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -14714,7 +14428,7 @@ interface INTemporalEventTriggerTypeOptionsResolutionResult { INTemporalEventTriggerTypeOptionsResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14737,13 +14451,13 @@ interface INTicketedEvent : NSCopying, NSSecureCoding { CLPlacemark Location { get; } } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INTicketedEventReservation : NSCopying, NSSecureCoding { - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:event:")] [DesignatedInitializer] @@ -14759,7 +14473,7 @@ interface INTicketedEventReservation : NSCopying, NSSecureCoding { INSeat ReservedSeat { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -14802,13 +14516,13 @@ interface INTimeIntervalResolutionResult { INTimeIntervalResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] interface INTrainReservation : NSCopying, NSSecureCoding { - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithItemReference:reservationNumber:bookingTime:reservationStatus:reservationHolderName:actions:URL:reservedSeat:trainTrip:")] [DesignatedInitializer] @@ -14824,7 +14538,7 @@ interface INTrainReservation : NSCopying, NSSecureCoding { INTrainTrip TrainTrip { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -14859,7 +14573,7 @@ interface INTrainTrip : NSCopying, NSSecureCoding { string ArrivalPlatform { get; } } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult), Name = "INURLResolutionResult")] [DisableDefaultCtor] @@ -14906,7 +14620,7 @@ interface INUrlResolutionResult { INUrlResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntent))] [DisableDefaultCtor] @@ -14926,7 +14640,7 @@ interface INUpdateMediaAffinityIntent { INMediaAffinityType AffinityType { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface INUpdateMediaAffinityIntentHandling { @@ -14945,7 +14659,7 @@ interface INUpdateMediaAffinityIntentHandling { void ResolveAffinityType (INUpdateMediaAffinityIntent intent, Action completion); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -14959,7 +14673,7 @@ interface INUpdateMediaAffinityIntentResponse { INUpdateMediaAffinityIntentResponseCode Code { get; } } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INMediaItemResolutionResult))] [DisableDefaultCtor] @@ -15023,7 +14737,7 @@ interface INUpdateMediaAffinityMediaItemResolutionResult { INUpdateMediaAffinityMediaItemResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15033,7 +14747,7 @@ interface INUserContext : NSSecureCoding { void BecomeCurrent (); } - [Watch (6, 0), NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -15080,7 +14794,7 @@ interface INVolumeResolutionResult { INVolumeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INMediaDestinationResolutionResult))] [DisableDefaultCtor] @@ -15139,7 +14853,7 @@ interface INAddMediaMediaDestinationResolutionResult { INAddMediaMediaDestinationResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (6, 0), TV (14, 0), NoMac, iOS (13, 0)] + [TV (14, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (INMediaItemResolutionResult))] interface INSearchForMediaMediaItemResolutionResult { @@ -15204,7 +14918,7 @@ interface INSearchForMediaMediaItemResolutionResult { - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (NSExtensionContext))] @@ -15215,7 +14929,7 @@ interface NSExtensionContext_ShareExtension { INIntent GetIntent (); } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] @@ -15232,7 +14946,7 @@ interface INBoatReservation : NSCopying, NSSecureCoding { INBoatTrip BoatTrip { get; } } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15261,7 +14975,7 @@ interface INBoatTrip : NSCopying, NSSecureCoding { CLPlacemark ArrivalBoatTerminalLocation { get; } } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (INReservation))] [DisableDefaultCtor] @@ -15278,7 +14992,7 @@ interface INBusReservation : NSCopying, NSSecureCoding { INBusTrip BusTrip { get; } } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15313,7 +15027,7 @@ interface INBusTrip : NSCopying, NSSecureCoding { string ArrivalPlatform { get; } } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15333,7 +15047,7 @@ interface INCallRecordFilter : NSCopying, NSSecureCoding { INCallCapability CallCapability { get; } } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (INIntentResolutionResult))] interface INCallRecordResolutionResult { @@ -15379,7 +15093,7 @@ interface INCallRecordResolutionResult { INCallRecordResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15422,7 +15136,7 @@ interface INCar : NSCopying, NSSecureCoding { NSMeasurement GetMaximumPower ([BindAs (typeof (INCarChargingConnectorType))] NSString chargingConnectorType); } - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15439,7 +15153,7 @@ interface INCarHeadUnit : NSCopying, NSSecureCoding { string Iap2Identifier { get; } } - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (INIntent))] [DesignatedDefaultCtor] @@ -15449,7 +15163,7 @@ interface INListCarsIntent { interface IINListCarsIntentHandling { } - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Protocol] interface INListCarsIntentHandling { @@ -15462,7 +15176,7 @@ interface INListCarsIntentHandling { void ConfirmListCars (INListCarsIntent intent, Action completion); } - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] @@ -15479,7 +15193,7 @@ interface INListCarsIntentResponse { INCar [] Cars { get; set; } } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15503,7 +15217,7 @@ interface INObjectCollection : NSCopying, NSSecureCoding NativeHandle Constructor (ObjectType [] items); } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15521,7 +15235,7 @@ interface INObjectSection : NSCopying, NSSecureCoding NativeHandle Constructor ([NullAllowed] string title, ObjectType [] items); } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (INIntentResolutionResult))] [DisableDefaultCtor] @@ -15564,7 +15278,7 @@ interface INOutgoingMessageTypeResolutionResult { INOutgoingMessageTypeResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15578,7 +15292,7 @@ interface INSendMessageAttachment { INFile AudioMessageFile { get; } } - [Watch (7, 0), NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (INCallRecordResolutionResult))] [DisableDefaultCtor] @@ -15632,7 +15346,7 @@ interface INStartCallCallRecordToCallBackResolutionResult { INStartCallCallRecordToCallBackResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason); } - [Watch (7, 4), NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -15649,7 +15363,7 @@ interface INCallGroup : NSCopying, NSSecureCoding { string GroupId { get; } } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [BaseType (typeof (INIntent))] interface INAnswerCallIntent { @@ -15666,7 +15380,7 @@ interface INAnswerCallIntent { string CallIdentifier { get; } } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [Protocol] interface INAnswerCallIntentHandling { @@ -15678,7 +15392,7 @@ interface INAnswerCallIntentHandling { void ConfirmAnswerCall (INAnswerCallIntent intent, Action completion); } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INAnswerCallIntentResponse { @@ -15697,7 +15411,7 @@ interface INAnswerCallIntentResponse { INCallRecord [] CallRecords { get; set; } } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [BaseType (typeof (INIntent))] interface INHangUpCallIntent { @@ -15712,7 +15426,7 @@ interface INHangUpCallIntent { string CallIdentifier { get; } } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [Protocol] interface INHangUpCallIntentHandling { @@ -15724,7 +15438,7 @@ interface INHangUpCallIntentHandling { void ConfirmHangUpCall (INHangUpCallIntent intent, Action completion); } - [Watch (9, 4), NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] + [NoTV, Mac (13, 1), iOS (16, 2), MacCatalyst (16, 2)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INHangUpCallIntentResponse { @@ -15737,7 +15451,7 @@ interface INHangUpCallIntentResponse { INHangUpCallIntentResponseCode Code { get; } } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INUnsendMessagesIntentResponse { @@ -15749,7 +15463,7 @@ interface INUnsendMessagesIntentResponse { INUnsendMessagesIntentResponseCode Code { get; } } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (INIntent))] interface INUnsendMessagesIntent { [Export ("initWithMessageIdentifiers:")] @@ -15760,7 +15474,7 @@ interface INUnsendMessagesIntent { string [] MessageIdentifiers { get; } } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface INMessageLinkMetadata : NSCopying, NSSecureCoding { [Export ("initWithSiteName:summary:title:openGraphType:linkURL:")] @@ -15783,7 +15497,7 @@ interface INMessageLinkMetadata : NSCopying, NSSecureCoding { NSUrl LinkUrl { get; set; } } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (INIntentResponse))] [DisableDefaultCtor] interface INEditMessageIntentResponse { @@ -15795,7 +15509,7 @@ interface INEditMessageIntentResponse { INEditMessageIntentResponseCode Code { get; } } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (INIntent))] interface INEditMessageIntent { [Export ("initWithMessageIdentifier:editedContent:")] @@ -15809,7 +15523,7 @@ interface INEditMessageIntent { string EditedContent { get; } } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface INEditMessageIntentHandling { [Abstract] @@ -15823,7 +15537,7 @@ interface INEditMessageIntentHandling { void ResolveEditedContent (INEditMessageIntent intent, Action completion); } - [Watch (10, 0), NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface INUnsendMessagesIntentHandling { [Abstract] @@ -15834,7 +15548,7 @@ interface INUnsendMessagesIntentHandling { void ConfirmUnsendMessages (INUnsendMessagesIntent intent, Action completion); } - [Watch (11, 0), iOS (18, 0), NoTV, MacCatalyst (18, 0), Mac (15, 0)] + [iOS (18, 0), NoTV, MacCatalyst (18, 0), Mac (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INMessageReaction : NSCopying, NSSecureCoding { @@ -15852,7 +15566,7 @@ interface INMessageReaction : NSCopying, NSSecureCoding { string Emoji { get; } } - [Watch (11, 0), iOS (18, 0), NoTV, MacCatalyst (18, 0), Mac (15, 0)] + [iOS (18, 0), NoTV, MacCatalyst (18, 0), Mac (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface INSticker : NSCopying, NSSecureCoding { diff --git a/src/intentsui.cs b/src/intentsui.cs index d738c90bb88d..25890a4b7e47 100644 --- a/src/intentsui.cs +++ b/src/intentsui.cs @@ -41,7 +41,7 @@ public enum INUIInteractiveBehavior : ulong { GenericAction, } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum INUIAddVoiceShortcutButtonStyle : ulong { @@ -197,7 +197,7 @@ interface INUIEditVoiceShortcutViewControllerDelegate { } /// A button that is used to add a Siri shortcut. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] #if MONOMAC [BaseType (typeof (NSButton))] @@ -237,7 +237,7 @@ interface INUIAddVoiceShortcutButton { interface IINUIAddVoiceShortcutButtonDelegate { } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] #if NET [Protocol, Model] diff --git a/src/iosurface.cs b/src/iosurface.cs index ede8984f2189..56305ce6d1b7 100644 --- a/src/iosurface.cs +++ b/src/iosurface.cs @@ -167,7 +167,7 @@ interface IOSurface : NSSecureCoding { [Export ("elementHeight")] nint ElementHeight { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("surfaceID")] uint SurfaceId { get; } diff --git a/src/ituneslibrary.cs b/src/ituneslibrary.cs index eb4a8a724de4..ec0664056355 100644 --- a/src/ituneslibrary.cs +++ b/src/ituneslibrary.cs @@ -382,7 +382,7 @@ interface ITLibrary { void UnloadData (); } - [Mac (13, 0), NoiOS, NoMacCatalyst, NoWatch, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [Static] interface ITLibraryNotifications { [Field ("ITLibraryDidChangeNotification")] diff --git a/src/localauthentication.cs b/src/localauthentication.cs index 2282d0ff8c0b..a16f66b984e0 100644 --- a/src/localauthentication.cs +++ b/src/localauthentication.cs @@ -10,7 +10,6 @@ namespace LocalAuthentication { /// Enumerates supported biometric authentication types. - [Watch (11, 0)] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -40,7 +39,6 @@ public enum LABiometryType : long { [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface LAContext { - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] // by default this property is null [Export ("localizedFallbackTitle")] @@ -85,12 +83,10 @@ interface LAContext { [NullAllowed] NSData EvaluatedPolicyDomainState { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("localizedCancelTitle")] string LocalizedCancelTitle { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("LATouchIDAuthenticationMaximumAllowableReuseDuration")] double /* NSTimeInterval */ TouchIdAuthenticationMaximumAllowableReuseDuration { get; } @@ -107,27 +103,26 @@ interface LAContext { [Export ("maxBiometryFailures")] NSNumber MaxBiometryFailures { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("localizedReason")] string LocalizedReason { get; set; } - [Watch (9, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("interactionNotAllowed")] bool InteractionNotAllowed { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("biometryType")] LABiometryType BiometryType { get; } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("domainState")] LADomainState DomainState { get; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (LARight))] [DisableDefaultCtor] interface LAPersistedRight { @@ -140,7 +135,7 @@ interface LAPersistedRight { delegate void LAPrivateKeyCompletionHandler ([NullAllowed] NSData data, [NullAllowed] NSError error); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LAPrivateKey { @@ -172,7 +167,7 @@ interface LAPrivateKey { delegate void LAPublicKeyCompletionHandler ([NullAllowed] NSData data, [NullAllowed] NSError error); delegate void LAPublicKeyVerifyDataCompletionHandler ([NullAllowed] NSError error); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LAPublicKey { @@ -195,7 +190,7 @@ interface LAPublicKey { bool CanVerify (SecKeyAlgorithm algorithm); } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] interface LAAuthenticationRequirement { [Static] @@ -215,7 +210,7 @@ interface LAAuthenticationRequirement { LAAuthenticationRequirement GetBiometryRequirement (LABiometryFallbackRequirement fallback); } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] interface LABiometryFallbackRequirement { [Static] @@ -229,7 +224,7 @@ interface LABiometryFallbackRequirement { delegate void LARightAuthorizeCompletionHandler ([NullAllowed] NSError error); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] interface LARight { [Export ("state")] @@ -257,7 +252,7 @@ interface LARight { delegate void LARightStoreCompletionHandler ([NullAllowed] LAPersistedRight right, [NullAllowed] NSError error); delegate void LARightStoreRemoveRightCompletionHandler ([NullAllowed] NSError error); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LARightStore { @@ -292,7 +287,7 @@ interface LARightStore { delegate void LASecretCompletionHandler ([NullAllowed] NSData data, [NullAllowed] NSError error); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LASecret { @@ -303,16 +298,16 @@ interface LASecret { [Flags] [Native] - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0), NoTV] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoTV] enum LACompanionType : long { None = 0, - [NoiOS, NoWatch, NoTV, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] Watch = 1 << 0, - [NoMac, NoWatch, NoTV] + [NoMac, NoTV] Mac = 1 << 1, } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LADomainStateBiometry { @@ -323,7 +318,7 @@ interface LADomainStateBiometry { NSData StateHash { get; } } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LADomainStateCompanion { @@ -338,7 +333,7 @@ interface LADomainStateCompanion { NSData GetStateHash (LACompanionType companionType); } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LADomainState { @@ -352,7 +347,7 @@ interface LADomainState { NSData StateHash { get; } } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LAEnvironment { @@ -370,7 +365,7 @@ interface LAEnvironment { LAEnvironmentState State { get; } } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] interface LAEnvironmentObserver { @@ -380,7 +375,7 @@ interface LAEnvironmentObserver { interface ILAEnvironmentObserver { } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LAEnvironmentMechanism { @@ -394,7 +389,7 @@ interface LAEnvironmentMechanism { string IconSystemName { get; } } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (LAEnvironmentMechanism))] [DisableDefaultCtor] interface LAEnvironmentMechanismBiometry { @@ -414,7 +409,7 @@ interface LAEnvironmentMechanismBiometry { bool BuiltInSensorInaccessible { get; } } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (LAEnvironmentMechanism))] [DisableDefaultCtor] interface LAEnvironmentMechanismCompanion { @@ -425,7 +420,7 @@ interface LAEnvironmentMechanismCompanion { NSData StateHash { get; } } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (LAEnvironmentMechanism))] [DisableDefaultCtor] interface LAEnvironmentMechanismUserPassword { @@ -433,7 +428,7 @@ interface LAEnvironmentMechanismUserPassword { bool IsSet { get; } } - [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0), Watch (11, 0)] + [Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface LAEnvironmentState : NSCopying { @@ -443,7 +438,6 @@ interface LAEnvironmentState : NSCopying { [Export ("userPassword"), NullAllowed] LAEnvironmentMechanismUserPassword UserPassword { get; } - [NoWatch] [Export ("companions")] LAEnvironmentMechanismCompanion [] Companions { get; } diff --git a/src/localauthenticationembeddedui.cs b/src/localauthenticationembeddedui.cs index 3053e515d0d3..7851cad84112 100644 --- a/src/localauthenticationembeddedui.cs +++ b/src/localauthenticationembeddedui.cs @@ -20,7 +20,7 @@ namespace LocalAuthenticationEmbeddedUI { - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSView))] interface LAAuthenticationView { [Export ("initWithFrame:")] diff --git a/src/mailkit.cs b/src/mailkit.cs index 4bc0430605db..901f5b8153ff 100644 --- a/src/mailkit.cs +++ b/src/mailkit.cs @@ -10,7 +10,7 @@ #endif namespace MailKit { - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Native] [ErrorDomain ("MEComposeSessionErrorDomain")] public enum MEComposeSessionErrorCode : long { @@ -19,7 +19,7 @@ public enum MEComposeSessionErrorCode : long { Body = 2, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Native] public enum MEMessageActionMessageColor : long { None, @@ -32,7 +32,7 @@ public enum MEMessageActionMessageColor : long { Gray, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Native] public enum MEMessageState : long { Received = 0, @@ -40,7 +40,7 @@ public enum MEMessageState : long { Sending = 2, } - [NoWatch, NoTV, NoMacCatalyst, NoiOS] + [NoTV, NoMacCatalyst, NoiOS] [Native] public enum MEMessageEncryptionState : long { Unknown = 0, @@ -48,7 +48,7 @@ public enum MEMessageEncryptionState : long { Encrypted = 2, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEMessage : NSSecureCoding { @@ -94,7 +94,7 @@ interface MEMessage : NSSecureCoding { NSData RawData { get; } } - [NoWatch, NoTV, NoMacCatalyst, NoiOS] + [NoTV, NoMacCatalyst, NoiOS] [Native] public enum MEMessageActionFlag : long { None, @@ -108,7 +108,7 @@ public enum MEMessageActionFlag : long { Gray, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEMessageAction : NSSecureCoding { @@ -141,7 +141,7 @@ interface MEMessageAction : NSSecureCoding { MEMessageAction SetBackgroundColorAction (MEMessageActionMessageColor color); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEMessageActionDecision : NSSecureCoding { @@ -158,7 +158,7 @@ interface MEMessageActionDecision : NSSecureCoding { MEMessageActionDecision Apply (MEMessageAction [] actions); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEMessageEncodingResult : NSSecureCoding { @@ -176,7 +176,7 @@ interface MEMessageEncodingResult : NSSecureCoding { NSError EncryptionError { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEMessageSecurityInformation : NSSecureCoding { @@ -205,7 +205,7 @@ interface MEMessageSecurityInformation : NSSecureCoding { bool ShouldBlockRemoteContent { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEMessageSigner : NSSecureCoding { @@ -222,7 +222,7 @@ interface MEMessageSigner : NSSecureCoding { NSData Context { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEOutgoingMessageEncodingStatus : NSSecureCoding { @@ -242,7 +242,7 @@ interface MEOutgoingMessageEncodingStatus : NSSecureCoding { MEEmailAddress [] AddressesFailingEncryption { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEAddressAnnotation : NSSecureCoding { @@ -259,7 +259,7 @@ interface MEAddressAnnotation : NSSecureCoding { MEAddressAnnotation CreateSuccessAnnotation (string localizedDescription); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Advice ("'MEComposeSession' is not available in UIKit on macOS.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -277,7 +277,7 @@ interface MEComposeSession : NSSecureCoding { void ReloadSession (); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEDecodedMessage : NSSecureCoding { @@ -300,7 +300,7 @@ interface MEDecodedMessage : NSSecureCoding { NativeHandle Constructor ([NullAllowed] NSData rawData, MEMessageSecurityInformation securityInformation, [NullAllowed] NSData context, [NullAllowed] MEDecodedMessageBanner banner); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] interface MEEncodedOutgoingMessage : NSSecureCoding { [Export ("initWithRawData:isSigned:isEncrypted:")] @@ -316,7 +316,7 @@ interface MEEncodedOutgoingMessage : NSSecureCoding { bool IsEncrypted { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEEmailAddress : NSSecureCoding, NSCopying { @@ -332,7 +332,7 @@ interface MEEmailAddress : NSSecureCoding, NSCopying { interface IMEComposeSessionHandler { } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface MEComposeSessionHandler { [Abstract] @@ -359,7 +359,7 @@ interface MEComposeSessionHandler { interface IMEContentBlocker { } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface MEContentBlocker { [Abstract] @@ -367,7 +367,7 @@ interface MEContentBlocker { NSData ContentRulesJson { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface MEExtension { [Export ("handlerForComposeSession:")] @@ -385,7 +385,7 @@ interface MEExtension { interface IMEMessageActionHandler { } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface MEMessageActionHandler { [Abstract] @@ -396,7 +396,7 @@ interface MEMessageActionHandler { string [] RequiredHeaders { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface MEMessageDecoder { [Abstract] @@ -405,7 +405,7 @@ interface MEMessageDecoder { MEDecodedMessage DecodedMessage (NSData data); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface MEMessageEncoder { [Abstract] @@ -418,7 +418,7 @@ interface MEMessageEncoder { } [ErrorDomain ("MEMessageSecurityErrorDomain")] - [NoWatch, NoTV, NoMacCatalyst, NoiOS] + [NoTV, NoMacCatalyst, NoiOS] [Native] public enum MEMessageSecurityErrorCode : long { EncodingError = 0, @@ -427,7 +427,7 @@ public enum MEMessageSecurityErrorCode : long { interface IMEMessageSecurityHandler { } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Protocol] interface MEMessageSecurityHandler : MEMessageEncoder, MEMessageDecoder { [Abstract] @@ -445,7 +445,7 @@ interface MEMessageSecurityHandler : MEMessageEncoder, MEMessageDecoder { void SetPrimaryActionClicked (NSData messageContext, Action completionHandler); } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [DefaultCtorVisibility (Visibility.Protected)] [BaseType (typeof (NSViewController))] interface MEExtensionViewController { @@ -455,7 +455,7 @@ interface MEExtensionViewController { NativeHandle Constructor ([NullAllowed] string nibNameOrNull, [NullAllowed] NSBundle nibBundleOrNull); } - [NoWatch, NoTV, NoMacCatalyst, NoiOS] + [NoTV, NoMacCatalyst, NoiOS] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEExtensionManager { @@ -468,7 +468,7 @@ interface MEExtensionManager { void ReloadVisibleMessages ([NullAllowed] Action completionHandler); } - [NoWatch, NoTV, NoMacCatalyst, NoiOS] + [NoTV, NoMacCatalyst, NoiOS] [Native] public enum MEComposeUserAction : long { NewMessage = 1, @@ -477,7 +477,7 @@ public enum MEComposeUserAction : long { Forward = 4, } - [NoWatch, NoTV, NoMacCatalyst, NoiOS] + [NoTV, NoMacCatalyst, NoiOS] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEComposeContext { @@ -503,7 +503,7 @@ interface MEComposeContext { bool ShouldSign { get; } } - [NoWatch, NoTV, NoMacCatalyst, NoiOS] + [NoTV, NoMacCatalyst, NoiOS] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEDecodedMessageBanner : NSSecureCoding, NSCopying { diff --git a/src/mapkit.cs b/src/mapkit.cs index 1d8e8658c5ef..2a5bfe34006e 100644 --- a/src/mapkit.cs +++ b/src/mapkit.cs @@ -39,24 +39,6 @@ #else using NSAppearance = Foundation.NSObject; #endif -#if WATCH -// helper for [NoWatch] -using MKMapView=Foundation.NSObject; -using MKAnnotationView=Foundation.NSObject; -using MKShape = Foundation.NSObject; -using MKOverlay = Foundation.NSObjectProtocol; -using MKPolygon = Foundation.NSObject; -using MKPolyline = Foundation.NSObject; -using MKOverlayPathRenderer = Foundation.NSObject; -using IMKOverlay = Foundation.NSObject; -using MKDirectionsRequest = Foundation.NSObject; -using UITraitCollection = Foundation.NSObject; -using UIControl = Foundation.NSObject; -using MKTileOverlayPath = Foundation.NSObject; -using UIBarButtonItem = Foundation.NSObject; -using MKCircle = Foundation.NSObject; -using UIViewController = Foundation.NSObject; -#endif #if TVOS using CNPostalAddress = Foundation.NSObject; #endif @@ -94,7 +76,6 @@ interface MKAnnotation { interface IMKAnnotation { } -#if !WATCH [BaseType (typeof (MKAnnotation))] [Model] [Protocol] @@ -122,7 +103,6 @@ interface MKOverlay { interface IMKOverlay { } [BaseType (typeof (UIView))] - [NoWatch] [MacCatalyst (13, 1)] interface MKAnnotationView { [DesignatedInitializer] @@ -199,14 +179,12 @@ interface MKAnnotationView { UIView DetailCalloutAccessoryView { get; set; } [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("leftCalloutOffset")] CGPoint LeftCalloutOffset { get; set; } [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("rightCalloutOffset")] @@ -234,17 +212,17 @@ interface MKAnnotationView { [RequiresSuper] void PrepareForDisplay (); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("zPriority")] float ZPriority { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("selectedZPriority")] float SelectedZPriority { get; set; } - [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), NoTV, NoWatch] + [iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0), NoTV] [Export ("accessoryOffset", ArgumentSemantic.Assign)] CGPoint AccessoryOffset { get; set; } } @@ -324,15 +302,14 @@ interface MKDirectionsRequest { [Export ("arrivalDate", ArgumentSemantic.Copy)] NSDate ArrivalDate { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("tollPreference", ArgumentSemantic.Assign)] MKDirectionsRoutePreference TollPreference { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("highwayPreference", ArgumentSemantic.Assign)] MKDirectionsRoutePreference HighwayPreference { get; set; } } -#endif // !WATCH [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] @@ -377,25 +354,25 @@ interface MKMapItem : NSSecureCoding [Export ("openMapsWithItems:launchOptions:"), Internal] bool _OpenMaps (MKMapItem [] mapItems, [NullAllowed] NSDictionary launchOptions); - [iOS (13, 2), NoMac, NoTV, NoWatch] + [iOS (13, 2), NoMac, NoTV] [Introduced (PlatformName.MacCatalyst, 13, 2)] [Async] [Export ("openInMapsWithLaunchOptions:fromScene:completionHandler:")] void OpenInMaps ([NullAllowed] NSDictionary launchOptions, [NullAllowed] UIScene fromScene, [NullAllowed] Action completionHandler); - [iOS (13, 2), NoMac, NoTV, NoWatch] + [iOS (13, 2), NoMac, NoTV] [Introduced (PlatformName.MacCatalyst, 13, 2)] [Static] [Async] [Export ("openMapsWithItems:launchOptions:fromScene:completionHandler:")] void OpenMaps (MKMapItem [] mapItems, [NullAllowed] NSDictionary launchOptions, [NullAllowed] UIScene fromScene, [NullAllowed] Action completionHandler); - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (14, 4)] + [NoTV, NoiOS, NoMacCatalyst, Mac (14, 4)] [Async] [Export ("openInMapsWithLaunchOptions:completionHandler:")] void OpenInMaps ([NullAllowed] NSDictionary launchOptions, [NullAllowed] Action completion); - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (14, 4)] + [NoTV, NoiOS, NoMacCatalyst, Mac (14, 4)] [Static] [Async] [Export ("openMapsWithItems:launchOptions:completionHandler:")] @@ -407,7 +384,6 @@ interface MKMapItem : NSSecureCoding NSString MKLaunchOptionsDirectionsModeKey { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Field ("MKLaunchOptionsMapTypeKey"), Internal] NSString MKLaunchOptionsMapTypeKey { get; } @@ -423,7 +399,6 @@ interface MKMapItem : NSSecureCoding NSString MKLaunchOptionsMapSpanKey { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Field ("MKLaunchOptionsShowsTrafficKey"), Internal] NSString MKLaunchOptionsShowsTrafficKey { get; } @@ -462,21 +437,20 @@ interface MKMapItem : NSSecureCoding [Field ("MKMapItemTypeIdentifier")] NSString TypeIdentifier { get; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("pointOfInterestCategory")] string PointOfInterestCategory { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("identifier"), NullAllowed] MKMapItemIdentifier Identifier { get; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("alternateIdentifiers")] NSSet AlternateIdentifiers { get; } } - [NoWatch] [BaseType (typeof (UIView), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (MKMapViewDelegate) })] [MacCatalyst (13, 1)] interface MKMapView { @@ -493,11 +467,11 @@ interface MKMapView { [Export ("mapType")] MKMapType MapType { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("preferredConfiguration", ArgumentSemantic.Copy)] MKMapConfiguration PreferredConfiguration { get; set; } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("selectableMapFeatures", ArgumentSemantic.Assign)] MKMapFeatureOptions SelectableMapFeatures { get; set; } @@ -735,54 +709,52 @@ interface MKMapView { bool ShowsTraffic { get; set; } [NoiOS] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("showsZoomControls")] bool ShowsZoomControls { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("setCameraZoomRange:animated:")] void SetCameraZoomRange ([NullAllowed] MKMapCameraZoomRange cameraZoomRange, bool animated); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("cameraZoomRange", ArgumentSemantic.Copy)] [NullAllowed] MKMapCameraZoomRange CameraZoomRange { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("cameraBoundary", ArgumentSemantic.Copy)] MKMapCameraBoundary CameraBoundary { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("setCameraBoundary:animated:")] void SetCameraBoundary ([NullAllowed] MKMapCameraBoundary cameraBoundary, bool animated); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("pointOfInterestFilter", ArgumentSemantic.Copy)] MKPointOfInterestFilter PointOfInterestFilter { get; set; } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [Export ("showsPitchControl")] bool ShowsPitchControl { get; set; } - [TV (17, 0), NoWatch, MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Export ("pitchButtonVisibility", ArgumentSemantic.Assign)] MKFeatureVisibility PitchButtonVisibility { get; set; } - [TV (17, 0), NoWatch, MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Export ("showsUserTrackingButton")] bool ShowsUserTrackingButton { get; set; } } [Static] - [NoWatch] [MacCatalyst (13, 1)] interface MKMapViewDefault { [Field ("MKMapViewDefaultAnnotationViewReuseIdentifier")] @@ -794,7 +766,6 @@ interface MKMapViewDefault { interface IMKMapViewDelegate { } - [NoWatch] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -858,11 +829,11 @@ interface MKMapViewDelegate { [Export ("mapView:didDeselectAnnotationView:"), EventArgs ("MKAnnotationView")] void DidDeselectAnnotationView (MKMapView mapView, MKAnnotationView view); - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("mapView:didSelectAnnotation:"), EventArgs ("MKAnnotation")] void DidSelectAnnotation (MKMapView mapView, IMKAnnotation annotation); - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("mapView:didDeselectAnnotation:"), EventArgs ("MKAnnotation")] void DidDeselectAnnotation (MKMapView mapView, IMKAnnotation annotation); @@ -891,26 +862,23 @@ interface MKMapViewDelegate { [Export ("mapViewDidFinishRenderingMap:fullyRendered:"), EventArgs ("MKDidFinishRenderingMap")] void DidFinishRenderingMap (MKMapView mapView, bool fullyRendered); - [NoWatch] [MacCatalyst (13, 1)] [Export ("mapView:clusterAnnotationForMemberAnnotations:"), DelegateName ("MKCreateClusterAnnotation"), DefaultValue (null)] MKClusterAnnotation CreateClusterAnnotation (MKMapView mapView, IMKAnnotation [] memberAnnotations); - [NoWatch] [MacCatalyst (13, 1)] [Export ("mapViewDidChangeVisibleRegion:")] void DidChangeVisibleRegion (MKMapView mapView); [return: NullAllowed] [Export ("mapView:selectionAccessoryForAnnotation:"), DelegateName ("MKMapViewDelegateGetSelectionAccessory"), DefaultValue (null)] - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] MKSelectionAccessory GetSelectionAccessory (MKMapView mapView, IMKAnnotation annotation); } [BaseType (typeof (MKAnnotationView))] // crash on Dispose when created from 'init' [DisableDefaultCtor] - [NoWatch] [Deprecated (PlatformName.MacOSX, 13, 0, message: "Use MKMarkerAnnotationView instead.")] [Deprecated (PlatformName.iOS, 16, 0, message: "Use MKMarkerAnnotationView instead.")] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use MKMarkerAnnotationView instead.")] @@ -956,7 +924,6 @@ interface MKPinAnnotationView { // This requires the AddressBook framework, which afaict isn't bound on Mac, tvOS and watchOS yet /// Class that contains address data for a place mark. [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [StrongDictionary ("global::AddressBook.ABPersonAddressKey")] @@ -985,7 +952,6 @@ interface MKPlacemark : MKAnnotation, NSCopying { // This requires the AddressBook framework, which afaict isn't bound on Mac, tvOS and watchOS yet [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Wrap ("this (coordinate, addressDictionary.GetDictionary ())")] @@ -1009,7 +975,6 @@ interface MKPlacemark : MKAnnotation, NSCopying { /// /// Apple documentation for MKReverseGeocoder [NoMac] - [NoWatch] [NoTV] [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 5, 0, message: "Use 'CoreLocation.CLGeocoder' instead.")] @@ -1058,7 +1023,6 @@ interface IMKReverseGeocoderDelegate { } /// /// Apple documentation for MKReverseGeocoderDelegate [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.iOS, 5, 0)] @@ -1084,7 +1048,6 @@ interface MKReverseGeocoderDelegate { /// /// Apple documentation for MKOverlayView [NoMac] - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'MKOverlayRenderer' instead.")] [MacCatalyst (13, 1)] @@ -1135,7 +1098,6 @@ interface MKOverlayView { /// Developers targeting iOS 7 and later should instead use . /// Apple documentation for MKOverlayPathView [NoMac] - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'MKOverlayPathRenderer' instead.")] [MacCatalyst (13, 1)] @@ -1198,7 +1160,6 @@ interface MKOverlayPathView { void FillPath (CGPath path, CGContext context); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Abstract] @@ -1212,17 +1173,16 @@ interface MKShape : MKAnnotation { new string Subtitle { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [DesignatedDefaultCtor] [BaseType (typeof (MKShape))] interface MKPointAnnotation : MKGeoJsonObject { - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithCoordinate:")] NativeHandle Constructor (CLLocationCoordinate2D coordinate); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithCoordinate:title:subtitle:")] NativeHandle Constructor (CLLocationCoordinate2D coordinate, [NullAllowed] string title, [NullAllowed] string subtitle); @@ -1236,7 +1196,6 @@ interface MKPointAnnotation : MKGeoJsonObject { /// Apple documentation for MKPolygonView [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'MKPolygonRenderer' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'MKPolygonRenderer' instead.")] @@ -1253,7 +1212,6 @@ interface MKPolygonView { MKPolygon Polygon { get; } } - [NoWatch] [ThreadSafe] [MacCatalyst (13, 1)] [BaseType (typeof (MKMultiPoint))] @@ -1288,7 +1246,6 @@ interface MKPolygon : MKOverlay, MKGeoJsonObject { #endregion } - [NoWatch] [ThreadSafe] [MacCatalyst (13, 1)] [BaseType (typeof (MKMultiPoint))] @@ -1317,7 +1274,6 @@ interface MKPolyline : MKOverlay, MKGeoJsonObject { /// Apple documentation for MKPolylineView [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'MKPolylineRenderer' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'MKPolylineRenderer' instead.")] @@ -1334,7 +1290,6 @@ interface MKPolylineView { MKPolyline Polyline { get; } } - [NoWatch] [BaseType (typeof (MKShape))] [MacCatalyst (13, 1)] interface MKMultiPoint : MKGeoJsonObject { @@ -1347,19 +1302,18 @@ interface MKMultiPoint : MKGeoJsonObject { [Export ("getCoordinates:range:"), Internal] void GetCoords (IntPtr dest, NSRange range); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("locationAtPointIndex:")] nfloat GetLocation (nuint pointIndex); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [return: BindAs (typeof (nfloat []))] [Export ("locationsAtPointIndexes:")] NSNumber [] GetLocations (NSIndexSet indexes); } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] #if XAMCORE_5_0 @@ -1396,7 +1350,6 @@ interface MKUserLocation : MKAnnotation { /// /// Apple documentation for MKUserTrackingBarButtonItem [NoMac] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarButtonItem))] @@ -1414,7 +1367,6 @@ interface MKUserTrackingBarButtonItem { delegate void MKLocalSearchCompletionHandler (MKLocalSearchResponse response, NSError error); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [ThreadSafe] @@ -1425,7 +1377,7 @@ interface MKLocalSearch { [Export ("initWithRequest:")] NativeHandle Constructor (MKLocalSearchRequest request); - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithPointsOfInterestRequest:")] [DesignatedInitializer] @@ -1442,7 +1394,6 @@ interface MKLocalSearch { bool IsSearching { [Bind ("isSearching")] get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [ThreadSafe] @@ -1450,17 +1401,16 @@ interface MKLocalSearch { interface MKLocalSearchRequest : NSCopying { [DesignatedInitializer] - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithCompletion:")] NativeHandle Constructor (MKLocalSearchCompletion completion); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithNaturalLanguageQuery:")] NativeHandle Constructor (string naturalLanguageQuery); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithNaturalLanguageQuery:region:")] NativeHandle Constructor (string naturalLanguageQuery, MKCoordinateRegion region); @@ -1472,26 +1422,25 @@ interface MKLocalSearchRequest : NSCopying { [Export ("region", ArgumentSemantic.Assign)] MKCoordinateRegion Region { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resultTypes", ArgumentSemantic.Assign)] MKLocalSearchResultType ResultTypes { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("pointOfInterestFilter", ArgumentSemantic.Copy)] MKPointOfInterestFilter PointOfInterestFilter { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("regionPriority", ArgumentSemantic.Assign)] MKLocalSearchRegionPriority RegionPriority { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("addressFilter", ArgumentSemantic.Copy), NullAllowed] MKAddressFilter AddressFilter { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [ThreadSafe] @@ -1506,7 +1455,6 @@ interface MKLocalSearchResponse { MKMapItem [] MapItems { get; } } - [NoWatch] [BaseType (typeof (MKOverlayPathRenderer))] [MacCatalyst (13, 1)] partial interface MKCircleRenderer { @@ -1517,18 +1465,17 @@ partial interface MKCircleRenderer { [Export ("circle")] MKCircle Circle { get; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("strokeStart")] nfloat StrokeStart { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("strokeEnd")] nfloat StrokeEnd { get; set; } } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] [DisableDefaultCtor] // NSInvalidArgumentException Reason: Cannot initialize MKDirections with nil request @@ -1557,7 +1504,6 @@ partial interface MKDirections { delegate void MKETAHandler (MKETAResponse response, NSError error); - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKETAResponse { @@ -1587,7 +1533,6 @@ partial interface MKETAResponse { NSDate ExpectedDepartureDate { get; } } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKDirectionsResponse { @@ -1602,7 +1547,6 @@ partial interface MKDirectionsResponse { MKRoute [] Routes { get; } } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKRoute { @@ -1628,16 +1572,15 @@ partial interface MKRoute { [Export ("steps")] MKRouteStep [] Steps { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("hasTolls")] bool HasTolls { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("hasHighways")] bool HasHighways { get; } } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKRouteStep { @@ -1680,7 +1623,6 @@ partial interface MKDistanceFormatter { MKDistanceFormatterUnitStyle UnitStyle { get; set; } } - [NoWatch] [BaseType (typeof (MKPolyline))] [MacCatalyst (13, 1)] partial interface MKGeodesicPolyline { @@ -1694,7 +1636,6 @@ partial interface MKGeodesicPolyline { MKGeodesicPolyline PolylineWithCoordinates (IntPtr coords, nint count); } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKMapCamera : NSCopying, NSSecureCoding { @@ -1726,18 +1667,17 @@ partial interface MKMapCamera : NSCopying, NSSecureCoding { [Export ("cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:")] MKMapCamera CameraLookingAtCenterCoordinate (CLLocationCoordinate2D centerCoordinate, double locationDistance, nfloat pitch, double locationDirectionHeading); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("centerCoordinateDistance")] double CenterCoordinateDistance { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Static] [Export ("cameraLookingAtMapItem:forViewSize:allowPitch:")] MKMapCamera CameraLookingAt (MKMapItem mapItem, CGSize viewSize, bool allowPitch); } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKMapSnapshot { @@ -1748,20 +1688,18 @@ partial interface MKMapSnapshot { [Export ("pointForCoordinate:")] CGPoint PointForCoordinate (CLLocationCoordinate2D coordinate); - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] [Export ("appearance")] NSAppearance Appearance { get; } - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("traitCollection")] UITraitCollection TraitCollection { get; } } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKMapSnapshotOptions : NSCopying { @@ -1807,7 +1745,6 @@ partial interface MKMapSnapshotOptions : NSCopying { [Export ("showsBuildings")] bool ShowsBuildings { get; set; } - [NoWatch] [NoTV] [NoiOS] [NoMacCatalyst] @@ -1818,22 +1755,21 @@ partial interface MKMapSnapshotOptions : NSCopying { [Deprecated (PlatformName.iOS, 17, 0)] [Deprecated (PlatformName.MacCatalyst, 17, 0)] [Deprecated (PlatformName.TvOS, 17, 0)] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("pointOfInterestFilter", ArgumentSemantic.Copy)] MKPointOfInterestFilter PointOfInterestFilter { get; set; } - [TV (13, 0), NoWatch, NoMac, iOS (13, 0)] + [TV (13, 0), NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("traitCollection", ArgumentSemantic.Copy)] UITraitCollection TraitCollection { get; set; } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("preferredConfiguration", ArgumentSemantic.Copy)] MKMapConfiguration PreferredConfiguration { get; set; } } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKMapSnapshotter { @@ -1859,7 +1795,6 @@ partial interface MKMapSnapshotter { delegate void MKMapSnapshotCompletionHandler (MKMapSnapshot snapshot, NSError error); - [NoWatch] [BaseType (typeof (MKOverlayRenderer))] [MacCatalyst (13, 1)] [ThreadSafe] @@ -1917,13 +1852,12 @@ partial interface MKOverlayPathRenderer { [Export ("fillPath:inContext:")] void FillPath (CGPath path, CGContext context); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("shouldRasterize")] bool ShouldRasterize { get; set; } } - [NoWatch] [BaseType (typeof (NSObject))] [MacCatalyst (13, 1)] partial interface MKOverlayRenderer { @@ -1973,12 +1907,11 @@ partial interface MKOverlayRenderer { [Export ("contentScaleFactor")] nfloat ContentScaleFactor { get; } - [NoMac, iOS (16, 0), NoMacCatalyst, NoWatch, TV (16, 0)] + [NoMac, iOS (16, 0), NoMacCatalyst, TV (16, 0)] [Export ("blendMode", ArgumentSemantic.Assign)] CGBlendMode BlendMode { get; set; } } - [NoWatch] [BaseType (typeof (MKOverlayPathRenderer))] [MacCatalyst (13, 1)] partial interface MKPolygonRenderer { @@ -1989,18 +1922,17 @@ partial interface MKPolygonRenderer { [Export ("polygon")] MKPolygon Polygon { get; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("strokeStart")] nfloat StrokeStart { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("strokeEnd")] nfloat StrokeEnd { get; set; } } - [NoWatch] [BaseType (typeof (MKOverlayPathRenderer))] [MacCatalyst (13, 1)] partial interface MKPolylineRenderer { @@ -2011,19 +1943,18 @@ partial interface MKPolylineRenderer { [Export ("polyline")] MKPolyline Polyline { get; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("strokeStart")] nfloat StrokeStart { get; set; } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("strokeEnd")] nfloat StrokeEnd { get; set; } } - [NoWatch] - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MKPolylineRenderer))] partial interface MKGradientPolylineRenderer { @@ -2038,7 +1969,6 @@ partial interface MKGradientPolylineRenderer { void SetColors (UIColor [] colors, [BindAs (typeof (nfloat []))] NSNumber [] locations); } - [NoWatch] [ThreadSafe] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -2080,7 +2010,6 @@ partial interface MKTileOverlay : MKOverlay { delegate void MKTileOverlayLoadTileCompletionHandler (NSData tileData, NSError error); - [NoWatch] [BaseType (typeof (MKOverlayRenderer))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Expected a MKTileOverlay but got (null) [DisableDefaultCtor] // throw in iOS8 beta 1 ^ @@ -2097,8 +2026,6 @@ partial interface MKTileOverlayRenderer { void ReloadData (); } - [NoWatch] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MKLocalSearchCompleter { @@ -2131,29 +2058,27 @@ interface MKLocalSearchCompleter { [Export ("cancel")] void Cancel (); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resultTypes", ArgumentSemantic.Assign)] MKLocalSearchCompleterResultType ResultTypes { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("pointOfInterestFilter", ArgumentSemantic.Copy)] MKPointOfInterestFilter PointOfInterestFilter { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("regionPriority", ArgumentSemantic.Assign)] MKLocalSearchRegionPriority RegionPriority { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("addressFilter", ArgumentSemantic.Copy), NullAllowed] MKAddressFilter AddressFilter { get; set; } } interface IMKLocalSearchCompleterDelegate { } - [NoWatch] - [NoWatch] [MacCatalyst (13, 1)] [Protocol] [Model] @@ -2166,8 +2091,6 @@ interface MKLocalSearchCompleterDelegate { void DidFail (MKLocalSearchCompleter completer, NSError error); } - [NoWatch] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2199,7 +2122,6 @@ interface NSUserActivity_MKMapItem { void SetMapItem (MKMapItem item); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2219,7 +2141,6 @@ interface MKClusterAnnotation : MKAnnotation { } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] [DisableDefaultCtor] @@ -2235,7 +2156,6 @@ interface MKCompassButton { MKFeatureVisibility CompassVisibility { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (MKAnnotationView))] interface MKMarkerAnnotationView { @@ -2275,7 +2195,6 @@ interface MKMarkerAnnotationView { bool AnimatesWhenAdded { get; set; } } - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] @@ -2298,7 +2217,6 @@ interface MKScaleView { /// A button for toggling the tracking mode. [NoTV] - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] @@ -2312,11 +2230,7 @@ interface MKUserTrackingButton { MKMapView MapView { get; set; } } -#if WATCH - interface MKPointOfInterestCategory {} -#endif - - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MKPointOfInterestFilter : NSSecureCoding, NSCopying { @@ -2343,14 +2257,14 @@ interface MKPointOfInterestFilter : NSSecureCoding, NSCopying { bool ExcludesCategory ([BindAs (typeof (MKPointOfInterestCategory))] NSString category); } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol (Name = "MKGeoJSONObject")] interface MKGeoJsonObject { } interface IMKGeoJsonObject { } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "MKGeoJSONDecoder")] interface MKGeoJsonDecoder { @@ -2359,7 +2273,7 @@ interface MKGeoJsonDecoder { IMKGeoJsonObject [] GeoJsonObjects (NSData data, [NullAllowed] out NSError error); } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "MKGeoJSONFeature")] interface MKGeoJsonFeature : MKGeoJsonObject { @@ -2373,7 +2287,7 @@ interface MKGeoJsonFeature : MKGeoJsonObject { IMKGeoJsonObject [] Geometry { get; } } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MKMapCameraZoomRange : NSSecureCoding, NSCopying { @@ -2399,7 +2313,7 @@ interface MKMapCameraZoomRange : NSSecureCoding, NSCopying { double ZoomDefault { get; } } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MKMapCameraBoundary : NSSecureCoding, NSCopying { @@ -2418,7 +2332,7 @@ interface MKMapCameraBoundary : NSSecureCoding, NSCopying { MKCoordinateRegion Region { get; } } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MKShape))] interface MKMultiPolygon : MKOverlay, MKGeoJsonObject { @@ -2430,7 +2344,7 @@ interface MKMultiPolygon : MKOverlay, MKGeoJsonObject { MKPolygon [] Polygons { get; } } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MKOverlayPathRenderer))] interface MKMultiPolygonRenderer { @@ -2441,7 +2355,7 @@ interface MKMultiPolygonRenderer { MKMultiPolygon MultiPolygon { get; } } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MKShape))] interface MKMultiPolyline : MKOverlay, MKGeoJsonObject { @@ -2453,7 +2367,7 @@ interface MKMultiPolyline : MKOverlay, MKGeoJsonObject { MKPolyline [] Polylines { get; } } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MKOverlayPathRenderer))] interface MKMultiPolylineRenderer { @@ -2464,7 +2378,7 @@ interface MKMultiPolylineRenderer { MKMultiPolyline MultiPolyline { get; } } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MKAnnotationView))] interface MKUserLocationView { @@ -2476,7 +2390,7 @@ interface MKUserLocationView { NativeHandle Constructor (CGRect frame); } - [TV (14, 0), NoWatch, iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2506,7 +2420,7 @@ interface MKLocalPointsOfInterestRequest : NSCopying { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [DisableDefaultCtor] [BaseType (typeof (UIView))] interface MKPitchControl { @@ -2523,7 +2437,7 @@ interface MKPitchControl { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [DisableDefaultCtor] [BaseType (typeof (UIView))] interface MKZoomControl { @@ -2540,7 +2454,7 @@ interface MKZoomControl { MKMapView MapView { get; set; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [BaseType (typeof (MKMapConfiguration))] [DesignatedDefaultCtor] interface MKHybridMapConfiguration { @@ -2554,7 +2468,7 @@ interface MKHybridMapConfiguration { bool ShowsTraffic { get; set; } } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKIconStyle { @@ -2565,7 +2479,7 @@ interface MKIconStyle { UIImage Image { get; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [BaseType (typeof (MKMapConfiguration))] [DesignatedDefaultCtor] interface MKImageryMapConfiguration { @@ -2573,12 +2487,12 @@ interface MKImageryMapConfiguration { NativeHandle Constructor (MKMapElevationStyle elevationStyle); } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKLookAroundScene : NSCopying { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKLookAroundSceneRequest { @@ -2610,7 +2524,7 @@ interface MKLookAroundSceneRequest { void Cancel (); } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKLookAroundSnapshot { @@ -2618,7 +2532,7 @@ interface MKLookAroundSnapshot { UIImage Image { get; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] interface MKLookAroundSnapshotOptions { [NullAllowed, Export ("pointOfInterestFilter", ArgumentSemantic.Copy)] @@ -2627,12 +2541,12 @@ interface MKLookAroundSnapshotOptions { [Export ("size", ArgumentSemantic.Assign)] CGSize Size { get; set; } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("traitCollection", ArgumentSemantic.Copy)] UITraitCollection TraitCollection { get; set; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKLookAroundSnapshotter { @@ -2653,7 +2567,7 @@ interface MKLookAroundSnapshotter { interface IMKLookAroundViewControllerDelegate { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] #if NET [Protocol, Model] #else @@ -2680,7 +2594,7 @@ interface MKLookAroundViewControllerDelegate { void DidDismissFullScreen (MKLookAroundViewController viewController); } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (UIViewController))] interface MKLookAroundViewController : NSSecureCoding, NSCoding { [Export ("initWithScene:")] @@ -2714,7 +2628,7 @@ interface MKLookAroundViewController : NSSecureCoding, NSCoding { MKLookAroundBadgePosition BadgePosition { get; set; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKMapConfiguration : NSSecureCoding, NSCopying { @@ -2722,7 +2636,7 @@ interface MKMapConfiguration : NSSecureCoding, NSCopying { MKMapElevationStyle ElevationStyle { get; set; } } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKMapFeatureAnnotation : MKAnnotation { @@ -2737,7 +2651,7 @@ interface MKMapFeatureAnnotation : MKAnnotation { NSString PointOfInterestCategory { get; } } - [Mac (15, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (18, 0)] + [Mac (15, 0), iOS (16, 0), MacCatalyst (16, 0), TV (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKMapItemRequest { @@ -2746,7 +2660,7 @@ interface MKMapItemRequest { [DesignatedInitializer] NativeHandle Constructor (MKMapFeatureAnnotation mapFeatureAnnotation); - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("initWithMapItemIdentifier:")] [DesignatedInitializer] NativeHandle Constructor (MKMapItemIdentifier identifier); @@ -2770,16 +2684,16 @@ interface MKMapItemRequest { [Export ("isLoading")] bool IsLoading { get; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("mapItemIdentifier"), NullAllowed] MKMapItemIdentifier MapItemIdentifier { get; } - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Export ("mapFeatureAnnotation"), NullAllowed] MKMapFeatureAnnotation MapFeatureAnnotation { get; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [BaseType (typeof (MKMapConfiguration))] [DesignatedDefaultCtor] interface MKStandardMapConfiguration { @@ -2804,7 +2718,7 @@ interface MKStandardMapConfiguration { [Flags] [Native] - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum MKAddressFilterOption : ulong { Country = 1 << 0, AdministrativeArea = 1 << 1, @@ -2814,7 +2728,7 @@ enum MKAddressFilterOption : ulong { PostalCode = 1 << 5, } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKAddressFilter : NSSecureCoding, NSCopying { @@ -2843,7 +2757,7 @@ interface MKAddressFilter : NSSecureCoding, NSCopying { bool Excludes (MKAddressFilterOption options); } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKMapItemAnnotation : MKAnnotation { @@ -2855,7 +2769,7 @@ interface MKMapItemAnnotation : MKAnnotation { MKMapItem MapItem { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] interface MKMapItemDetailViewControllerDelegate { @@ -2866,7 +2780,7 @@ interface MKMapItemDetailViewControllerDelegate { interface IMKMapItemDetailViewControllerDelegate { } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] interface MKMapItemDetailViewController { @@ -2886,7 +2800,7 @@ interface MKMapItemDetailViewController { NativeHandle Constructor ([NullAllowed] MKMapItem mapItem); } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKMapItemIdentifier : NSCopying, NSSecureCoding { @@ -2897,7 +2811,7 @@ interface MKMapItemIdentifier : NSCopying, NSSecureCoding { string IdentifierString { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKSelectionAccessory { @@ -2907,14 +2821,14 @@ interface MKSelectionAccessory { } [Native] - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum MKMapItemDetailSelectionAccessoryCalloutStyle : long { Automatic, Full, Compact, } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MKMapItemDetailSelectionAccessoryPresentationStyle { @@ -2940,7 +2854,7 @@ interface MKMapItemDetailSelectionAccessoryPresentationStyle { } [Native] - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum MKLocalSearchRegionPriority : long { Default = 0, Required, diff --git a/src/mediaaccessibility.cs b/src/mediaaccessibility.cs index 8a750aaf8dce..244e1bb7b67e 100644 --- a/src/mediaaccessibility.cs +++ b/src/mediaaccessibility.cs @@ -75,7 +75,7 @@ interface MAFlashingLightsProcessor { delegate void MAMusicHapticTrackAvailabilityCallback (bool musicHapticsAvailable); delegate void MAMusicHapticTrackStatusObserver (string internationalStandardRecordingCode, bool musicHapticsActive); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MAMusicHapticsManager { diff --git a/src/mediaextension.cs b/src/mediaextension.cs index 5ce016e11799..b7a7883c2c46 100644 --- a/src/mediaextension.cs +++ b/src/mediaextension.cs @@ -11,7 +11,7 @@ using UniformTypeIdentifiers; namespace MediaExtension { - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Native] [ErrorDomain ("MediaExtensionErrorDomain")] public enum MEError : long @@ -30,7 +30,7 @@ public enum MEError : long ReferenceMissing = -19331, } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Native] public enum MEFileInfoFragmentsStatus : long { @@ -39,7 +39,7 @@ public enum MEFileInfoFragmentsStatus : long CouldContainButDoesNotContainFragments = 2, } - [Flags, NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [Flags, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Native] public enum MEFormatReaderParseAdditionalFragmentsStatus : ulong { @@ -48,7 +48,7 @@ public enum MEFormatReaderParseAdditionalFragmentsStatus : ulong FragmentsComplete = 1uL << 2, } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface MEFormatReaderInstantiationOptions : NSCopying @@ -57,7 +57,7 @@ interface MEFormatReaderInstantiationOptions : NSCopying bool AllowIncrementalFragmentParsing { get; } } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface MEFormatReaderExtension { @@ -72,7 +72,7 @@ interface MEFormatReaderExtension delegate void MEFormatReaderLoadTrackReadersCallback ([NullAllowed] IMETrackReader[] trackReaders, [NullAllowed] NSError error); delegate void MEFormatReaderParseAdditionalFragmentsCallback ([NullAllowed] MEFormatReaderParseAdditionalFragmentsStatus fragmentStatus, [NullAllowed] NSError error); - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface MEFormatReader { @@ -94,7 +94,7 @@ interface MEFormatReader interface IMEFormatReader { } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject))] interface MEFileInfo : NSCopying { @@ -112,7 +112,7 @@ interface MEFileInfo : NSCopying delegate void METrackReaderLoadEstimatedDataRateCallback (float estimatedDataRate, [NullAllowed] NSError error); delegate void METrackReaderLoadMetadataCallback ([NullAllowed] AVMetadataItem[] metadata, [NullAllowed] NSError error); - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface METrackReader { @@ -147,7 +147,7 @@ interface METrackReader interface IMETrackReader { } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface METrackInfo : NSCopying @@ -206,7 +206,7 @@ interface METrackInfo : NSCopying delegate void MESampleCursorLoadSampleBufferCallback ([NullAllowed] CMSampleBuffer newSampleBuffer, [NullAllowed] NSError error); delegate void MESampleCursorLoadPostDecodeProcessingMetadataCallback ([NullAllowed] NSDictionary postDecodeProcessingMetadata, [NullAllowed] NSError error); - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface MESampleCursor : INSCopying { @@ -299,7 +299,7 @@ interface MESampleCursor : INSCopying interface IMESampleCursor { } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface MESampleCursorChunk : NSCopying @@ -338,7 +338,7 @@ interface MESampleCursorChunk : NSCopying nint SampleIndexWithinChunk { get; } } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface MESampleLocation : NSCopying @@ -354,7 +354,7 @@ interface MESampleLocation : NSCopying MEByteSource ByteSource { get; } } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject))] [DisableDefaultCtor] interface MEEstimatedSampleLocation : INSCopying @@ -373,7 +373,7 @@ interface MEEstimatedSampleLocation : INSCopying MEByteSource ByteSource { get; } } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject), Name = "MEHEVCDependencyInfo")] interface MEHevcDependencyInfo : INSCopying { @@ -418,7 +418,7 @@ interface MEHevcDependencyInfo : INSCopying delegate void MEByteSourceReadBytesCallback (nuint bytesRead, [NullAllowed] NSError error); delegate void MEByteSourceReadDataCallback ([NullAllowed] NSData data, [NullAllowed] NSError error); - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MEByteSource @@ -453,7 +453,7 @@ interface MEByteSource } [Flags] - [NoWatch, NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Native] public enum MEDecodeFrameStatus : ulong { @@ -463,7 +463,7 @@ public enum MEDecodeFrameStatus : ulong delegate void MEVideoDecoderDecodeFrameCallback ([NullAllowed] CVImageBuffer imageBuffer, MEDecodeFrameStatus decodeStatus, [NullAllowed] NSError error); - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface MEVideoDecoder { @@ -510,7 +510,7 @@ interface MEVideoDecoder interface IMEVideoDecoder {} - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Static] interface MEVideoDecoderFields { [Notification] @@ -518,7 +518,7 @@ interface MEVideoDecoderFields { NSString ReadyForMoreMediaDataDidChangeNotification { get; } } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false, Name = "MERAWProcessorExtension")] interface MERawProcessorExtension { @@ -532,7 +532,7 @@ interface MERawProcessorExtension IMERawProcessor CreateProcessor (CMVideoFormatDescription formatDescription, MERawProcessorPixelBufferManager extensionPixelBufferManager, [NullAllowed] out NSError error); } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject), Name = "MERAWProcessorPixelBufferManager")] interface MERawProcessorPixelBufferManager { @@ -544,7 +544,7 @@ interface MERawProcessorPixelBufferManager CVPixelBuffer CreatePixelBuffer ([NullAllowed] out NSError error); } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject), Name = "MERAWProcessingParameter")] interface MERawProcessingParameter { @@ -561,7 +561,7 @@ interface MERawProcessingParameter bool Enabled { get; set; } } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingListElementParameter")] interface MERawProcessingListElementParameter { @@ -572,7 +572,7 @@ interface MERawProcessingListElementParameter nint ListElementId { get; } } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingBooleanParameter")] [DisableDefaultCtor] interface MERawProcessingBooleanParameter @@ -605,7 +605,7 @@ interface MERawProcessingBooleanParameter bool HasCameraValue ([NullAllowed] out bool cameraValue); } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingIntegerParameter")] [DisableDefaultCtor] interface MERawProcessingIntegerParameter @@ -644,7 +644,7 @@ interface MERawProcessingIntegerParameter bool HasCameraValue ([NullAllowed] out nint cameraValue); } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingFloatParameter")] [DisableDefaultCtor] interface MERawProcessingFloatParameter @@ -683,7 +683,7 @@ interface MERawProcessingFloatParameter bool HasCameraValue ([NullAllowed] out float cameraValue); } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingListParameter")] [DisableDefaultCtor] interface MERawProcessingListParameter @@ -719,7 +719,7 @@ interface MERawProcessingListParameter bool HasCameraValue ([NullAllowed] out nint cameraValue); } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingSubGroupParameter")] [DisableDefaultCtor] interface MERawProcessingSubGroupParameter @@ -733,7 +733,7 @@ interface MERawProcessingSubGroupParameter delegate void MERawProcessorProcessFrameCallback ([NullAllowed] CVPixelBuffer pixelBuffer, [NullAllowed] NSError error); - [NoWatch, NoTV, NoiOS, Mac (15,0), MacCatalyst (18, 0)] + [NoTV, NoiOS, Mac (15,0), MacCatalyst (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false, Name = "MERAWProcessor")] interface MERawProcessor { @@ -756,7 +756,7 @@ interface MERawProcessor void ProcessFrame (CVPixelBuffer inputFrame, MERawProcessorProcessFrameCallback completionHandler); } - [NoWatch, NoTV, NoiOS, Mac (15,0), MacCatalyst (18, 0)] + [NoTV, NoiOS, Mac (15,0), MacCatalyst (18, 0)] [Static] interface MERawProcessorFields { @@ -771,7 +771,7 @@ interface MERawProcessorFields interface IMERawProcessor {} - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface MEVideoDecoderExtension { @@ -785,7 +785,7 @@ interface MEVideoDecoderExtension IMEVideoDecoder CreateVideoDecoder (CMVideoCodecType codecType, CMVideoFormatDescription videoFormatDescription, NSDictionary videoDecoderSpecifications, MEVideoDecoderPixelBufferManager extensionDecoderPixelBufferManager, [NullAllowed] out NSError error); } - [NoWatch, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] [BaseType (typeof(NSObject))] interface MEVideoDecoderPixelBufferManager { @@ -800,7 +800,7 @@ interface MEVideoDecoderPixelBufferManager void RegisterCustomPixelFormat (NSDictionary customPixelFormat); } - [NoWatch, NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [BaseType (typeof(NSObject))] interface MEDecodeFrameOptions { diff --git a/src/mediaplayer.cs b/src/mediaplayer.cs index 9f6a79f5c05b..8826acbb7651 100644 --- a/src/mediaplayer.cs +++ b/src/mediaplayer.cs @@ -33,9 +33,6 @@ #else using NSImage = UIKit.UIImage; #endif -#if WATCH -using UIViewController = Foundation.NSObject; -#endif #if !NET using NativeHandle = System.IntPtr; @@ -45,10 +42,6 @@ namespace MediaPlayer { [BaseType (typeof (NSObject))] #if !MONOMAC #if NET - [NoWatch] // marked as unavailable in xcode 12 beta 1 -#else - [Watch (5, 0)] - [Obsoleted (PlatformName.WatchOS, 7, 0, message: "Removed in Xcode 12.")] #endif // NET [TV (14, 0)] [MacCatalyst (13, 1)] @@ -73,10 +66,7 @@ interface MPMediaItem : NSSecureCoding { NSObject GetObject (NSObject key); #if NET - [NoWatch] // marked as unavailable in xcode 12 beta 1 [MacCatalyst (13, 1)] -#else - [Obsoleted (PlatformName.WatchOS, 7, 0, message: "Removed in Xcode 12.")] #endif [Field ("MPMediaEntityPropertyPersistentID")] NSString PropertyPersistentID { get; } @@ -86,10 +76,9 @@ interface MPMediaItem : NSSecureCoding { [Export ("persistentID")] ulong PersistentID { get; } -#if IOS || WATCH || TVOS +#if IOS || TVOS } -#if MONOMAC || WATCH - [Watch (5,0)] +#if MONOMAC [Static] #else [BaseType (typeof (MPMediaEntity))] @@ -98,7 +87,6 @@ interface MPMediaItem { #endif [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("persistentIDPropertyForGroupingType:")] [Static] @@ -106,7 +94,6 @@ interface MPMediaItem { [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("titlePropertyForGroupingType:")] [Static] @@ -268,14 +255,13 @@ interface MPMediaItem { [EditorBrowsable (EditorBrowsableState.Advanced)] NSString PlaybackStoreIDProperty { get; } - [Watch (7, 4), TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Field ("MPMediaItemPropertyIsPreorder")] NSString IsPreorderProperty { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -314,7 +300,6 @@ interface MPMediaItemArtwork { /// Apple documentation for MPMediaItemCollection [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] // Objective-C exception thrown. Name: MPMediaItemCollectionInitException Reason: -init is not supported, use -initWithItems: [DisableDefaultCtor] @@ -352,7 +337,6 @@ interface MPMediaItemCollection : NSSecureCoding { /// Apple documentation for MPMediaLibrary [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MPMediaLibrary : NSSecureCoding { @@ -403,7 +387,6 @@ interface MPMediaLibrary : NSSecureCoding { /// Apple documentation for MPMediaPickerController [NoTV] [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (MPMediaPickerControllerDelegate) })] interface MPMediaPickerController { @@ -448,7 +431,6 @@ interface IMPMediaPickerControllerDelegate { } /// Apple documentation for MPMediaPickerControllerDelegate [NoTV] [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -466,7 +448,6 @@ interface MPMediaPickerControllerDelegate { /// Apple documentation for MPMediaPlaylist [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (MPMediaItemCollection))] // Objective-C exception thrown. Name: MPMediaItemCollectionInitException Reason: -init is not supported, use -initWithItems: @@ -521,7 +502,6 @@ interface MPMediaPlaylist : NSSecureCoding { } [Mac (10, 16)] - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] interface MPMediaPlaylistProperty { @@ -549,7 +529,6 @@ interface MPMediaPlaylistProperty { [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] [Field ("MPMediaPlaylistPropertyCloudGlobalID")] NSString CloudGlobalId { get; } @@ -560,7 +539,6 @@ interface MPMediaPlaylistProperty { /// Apple documentation for MPMediaQuery [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MPMediaQuery : NSSecureCoding, NSCopying { @@ -639,7 +617,6 @@ interface MPMediaQuery : NSSecureCoding, NSCopying { /// Apple documentation for MPMediaPredicate [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MPMediaPredicate : NSSecureCoding { @@ -650,7 +627,6 @@ interface MPMediaPredicate : NSSecureCoding { /// Apple documentation for MPMediaPropertyPredicate [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (MPMediaPredicate))] interface MPMediaPropertyPredicate { @@ -676,7 +652,6 @@ interface MPMediaPropertyPredicate { /// Apple documentation for MPMovieAccessLog [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -697,7 +672,6 @@ interface MPMovieAccessLog : NSCopying { /// Apple documentation for MPMovieErrorLog [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -719,7 +693,6 @@ interface MPMovieErrorLog : NSCopying { /// Apple documentation for MPMovieAccessLogEvent [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -773,7 +746,6 @@ interface MPMovieAccessLogEvent : NSCopying { /// Apple documentation for MPMovieErrorLogEvent [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -803,7 +775,6 @@ interface MPMovieErrorLogEvent : NSCopying { /// Provides data for the event. [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -814,7 +785,6 @@ interface MPMoviePlayerFinishedEventArgs { /// Provides data for the event. [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -828,7 +798,6 @@ interface MPMoviePlayerFullScreenEventArgs { /// Provides data for the event. [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -845,7 +814,6 @@ interface MPMoviePlayerThumbnailEventArgs { /// Provides data for the event. [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -856,13 +824,10 @@ interface MPMoviePlayerTimedMetadataEventArgs { [NoMac] #if NET - [NoWatch] // marked as unavailable in xcode 12 beta 1 [TV (16,0)] [MacCatalyst (13, 1)] #else - [Watch (5, 0)] [Obsoleted (PlatformName.TvOS, 14, 0, message: "Removed in Xcode 12.")] - [Obsoleted (PlatformName.WatchOS, 5, 0, message: "Removed in Xcode 12.")] #endif [Protocol] interface MPMediaPlayback { @@ -917,21 +882,14 @@ interface MPMediaPlayback { [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (14, 0)] // docs says 13.0 but this throws: NSInvalidArgumentException Reason: MPMoviePlayerController is no longer available. Use AVPlayerViewController in AVKit. [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] -#if WATCH - [Static] - interface MPMoviePlayerController { -#else [BaseType (typeof (NSObject))] interface MPMoviePlayerController : MPMediaPlayback { -#endif - [NoWatch] [MacCatalyst (13, 1)] [DesignatedInitializer] [Export ("initWithContentURL:")] NativeHandle Constructor (NSUrl url); #if !NET - [NoWatch] [Export ("backgroundColor", ArgumentSemantic.Retain)] // You should avoid using this property. It is available only when you use the initWithContentURL: method to initialize the movie player controller object. [Deprecated (PlatformName.iOS, 3, 2, message: "Do not use; this API was removed and is not always available.")] @@ -939,100 +897,82 @@ interface MPMoviePlayerController : MPMediaPlayback { UIColor BackgroundColor { get; set; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("scalingMode")] MPMovieScalingMode ScalingMode { get; set; } #if !NET - [NoWatch] [Export ("movieControlMode")] [Deprecated (PlatformName.iOS, 3, 2, message: "Do not use; this API was removed.")] [Obsoleted (PlatformName.iOS, 8, 0, message: "Do not use; this API was removed.")] MPMovieControlMode MovieControlMode { get; set; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("initialPlaybackTime")] double InitialPlaybackTime { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] // by default this property is null [Export ("contentURL", ArgumentSemantic.Copy)] NSUrl ContentUrl { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("view")] UIView View { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("backgroundView")] UIView BackgroundView { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("playbackState")] MPMoviePlaybackState PlaybackState { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("loadState")] MPMovieLoadState LoadState { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("controlStyle")] MPMovieControlStyle ControlStyle { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("repeatMode")] MPMovieRepeatMode RepeatMode { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("shouldAutoplay")] bool ShouldAutoplay { get; set; } - [NoWatch] [Export ("useApplicationAudioSession")] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] bool UseApplicationAudioSession { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("fullscreen")] bool Fullscreen { [Bind ("isFullscreen")] get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("setFullscreen:animated:")] void SetFullscreen (bool fullscreen, bool animated); - [NoWatch] [MacCatalyst (13, 1)] [Export ("allowsAirPlay")] bool AllowsAirPlay { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("airPlayVideoActive")] bool AirPlayVideoActive { [Bind ("isAirPlayVideoActive")] get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Export ("accessLog")] MPMovieAccessLog AccessLog { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -1041,19 +981,16 @@ interface MPMoviePlayerController : MPMediaPlayback { // Brought it from the MPMediaPlayback.h - [NoWatch] [Export ("thumbnailImageAtTime:timeOption:")] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'RequestThumbnails' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'RequestThumbnails' instead.")] UIImage ThumbnailImageAt (double time, MPMovieTimeOption timeOption); - [NoWatch] [MacCatalyst (13, 1)] [Export ("requestThumbnailImagesAtTimes:timeOption:")] void RequestThumbnails (NSNumber [] doubleNumbers, MPMovieTimeOption timeOption); - [NoWatch] [MacCatalyst (13, 1)] [Export ("cancelAllThumbnailImageRequests")] void CancelAllThumbnailImageRequests (); @@ -1061,42 +998,34 @@ interface MPMoviePlayerController : MPMediaPlayback { // // From interface MPMovieProperties // - [NoWatch] [MacCatalyst (13, 1)] [Export ("movieMediaTypes")] MPMovieMediaType MovieMediaTypes { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("movieSourceType")] MPMovieSourceType SourceType { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("duration")] double Duration { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("playableDuration")] double PlayableDuration { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("naturalSize")] CGSize NaturalSize { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("endPlaybackTime")] double EndPlaybackTime { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("timedMetadata")] MPTimedMetadata [] TimedMetadata { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1104,7 +1033,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString ScalingModeDidChangeNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1112,14 +1040,12 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification (typeof (MPMoviePlayerFinishedEventArgs))] NSString PlaybackDidFinishNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerPlaybackDidFinishReasonUserInfoKey")] // NSNumber (MPMovieFinishReason) NSString PlaybackDidFinishReasonUserInfoKey { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1127,7 +1053,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString PlaybackStateDidChangeNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1135,7 +1060,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString LoadStateDidChangeNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1143,7 +1067,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString NowPlayingMovieDidChangeNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1152,7 +1075,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString WillEnterFullscreenNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1160,7 +1082,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString DidEnterFullscreenNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1168,7 +1089,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification (typeof (MPMoviePlayerFullScreenEventArgs))] NSString WillExitFullscreenNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1176,21 +1096,18 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString DidExitFullscreenNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerFullscreenAnimationDurationUserInfoKey")] NSString FullscreenAnimationDurationUserInfoKey { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerFullscreenAnimationCurveUserInfoKey")] NSString FullscreenAnimationCurveUserInfoKey { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1198,7 +1115,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString TypesAvailableNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1206,7 +1122,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString SourceTypeAvailableNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1214,7 +1129,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString DurationAvailableNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1222,7 +1136,6 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString NaturalSizeAvailableNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1230,28 +1143,24 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification (typeof (MPMoviePlayerThumbnailEventArgs))] NSString ThumbnailImageRequestDidFinishNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerThumbnailImageKey")] NSString ThumbnailImageKey { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerThumbnailTimeKey")] NSString ThumbnailTimeKey { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerThumbnailErrorKey")] NSString ThumbnailErrorKey { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1259,49 +1168,42 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification (typeof (MPMoviePlayerTimedMetadataEventArgs))] NSString TimedMetadataUpdatedNotification { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerTimedMetadataUserInfoKey")] NSString TimedMetadataUserInfoKey { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerTimedMetadataKeyName")] NSString TimedMetadataKeyName { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerTimedMetadataKeyInfo")] NSString TimedMetadataKeyInfo { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerTimedMetadataKeyMIMEType")] NSString TimedMetadataKeyMIMEType { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerTimedMetadataKeyDataType")] NSString TimedMetadataKeyDataType { get; } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerTimedMetadataKeyLanguageCode")] NSString TimedMetadataKeyLanguageCode { get; } - [Watch (5, 0)] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] @@ -1309,13 +1211,11 @@ interface MPMoviePlayerController : MPMediaPlayback { [Notification] NSString MediaPlaybackIsPreparedToPlayDidChangeNotification { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("readyForDisplay")] bool ReadyForDisplay { get; } [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerReadyForDisplayDidChangeNotification")] @@ -1323,7 +1223,6 @@ interface MPMoviePlayerController : MPMediaPlayback { NSString MoviePlayerReadyForDisplayDidChangeNotification { get; } [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [Field ("MPMoviePlayerIsAirPlayVideoActiveDidChangeNotification")] @@ -1336,7 +1235,6 @@ interface MPMoviePlayerController : MPMediaPlayback { /// Apple documentation for MPTimedMetadata [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -1370,7 +1268,6 @@ interface MPTimedMetadata { /// Apple documentation for MPMoviePlayerViewController [NoTV] [NoMac] - [NoWatch] [BaseType (typeof (UIViewController))] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'AVPlayerViewController' (AVKit) instead.")] [MacCatalyst (14, 0)] // docs says 13.0 but this throws: NSInvalidArgumentException Reason: MPMoviePlayerViewController is no longer available. Use AVPlayerViewController in AVKit. @@ -1394,7 +1291,6 @@ interface MPMoviePlayerViewController { [NoMac] [TV (14, 0)] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1510,7 +1406,6 @@ interface MPMusicPlayerController : MPMediaPlayback { } [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] @@ -1616,7 +1511,6 @@ interface MPVolumeView { /// [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: MPMediaQuerySection is a read-only object @@ -1629,7 +1523,6 @@ interface MPMediaQuerySection : NSSecureCoding, NSCopying { string Title { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -init is not supported, use +defaultCenter @@ -1724,24 +1617,23 @@ interface MPNowPlayingInfoCenter { [Field ("MPNowPlayingInfoPropertyCurrentPlaybackDate")] NSString PropertyCurrentPlaybackDate { get; } - [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Field ("MPNowPlayingInfoPropertyAdTimeRanges")] NSString PropertyAdTimeRanges { get; } - [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Field ("MPNowPlayingInfoPropertyCreditsStartTime")] NSString PropertyCreditsStartTime { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MPNowPlayingInfoPropertyInternationalStandardRecordingCode")] NSString PropertyInternationalStandardRecordingCode { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("MPNowPlayingInfoPropertyExcludeFromSuggestions")] NSString PropertyExcludeFromSuggestions { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // crash if used @@ -1789,7 +1681,6 @@ interface MPContentItem { /// Apple documentation for MPPlayableContentDataSource [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -1846,7 +1737,6 @@ interface IMPPlayableContentDelegate { } /// Apple documentation for MPPlayableContentDelegate [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -1882,7 +1772,6 @@ interface MPPlayableContentDelegate { /// Apple documentation for MPPlayableContentManager [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CarPlay' API instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CarPlay' API instead.")] @@ -1929,7 +1818,6 @@ interface MPPlayableContentManager { /// Apple documentation for MPPlayableContentManagerContext [NoMac] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'CarPlay' API instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'CarPlay' API instead.")] @@ -1955,7 +1843,6 @@ interface MPPlayableContentManagerContext { bool EndpointAvailable { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSGenericException Reason: MPRemoteCommands cannot be initialized externally. @@ -1977,7 +1864,6 @@ interface MPRemoteCommand { void RemoveTarget ([NullAllowed] NSObject target, [NullAllowed] Selector action); } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPChangePlaybackRateCommands cannot be initialized externally. @@ -1987,7 +1873,6 @@ interface MPChangePlaybackRateCommand { NSNumber [] SupportedPlaybackRates { get; set; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeShuffleModeCommand cannot be initialized externally. @@ -1996,7 +1881,6 @@ interface MPChangeShuffleModeCommand { MPShuffleType CurrentShuffleType { get; set; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeRepeatModeCommand cannot be initialized externally. @@ -2005,7 +1889,6 @@ interface MPChangeRepeatModeCommand { MPRepeatType CurrentRepeatType { get; set; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPFeedbackCommands cannot be initialized externally. @@ -2022,7 +1905,6 @@ interface MPFeedbackCommand { string LocalizedShortTitle { get; set; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPRatingCommands cannot be initialized externally. @@ -2035,7 +1917,6 @@ interface MPRatingCommand { float MinimumRating { get; set; } /* float, not CGFloat */ } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // NSGenericException Reason: MPSkipIntervalCommands cannot be initialized externally. @@ -2046,7 +1927,6 @@ interface MPSkipIntervalCommand { NSArray _PreferredIntervals { get; set; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2122,7 +2002,6 @@ interface MPRemoteCommandCenter { MPChangePlaybackPositionCommand ChangePlaybackPositionCommand { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSGenericException Reason: MPRemoteCommandEvents cannot be initialized externally. @@ -2135,7 +2014,6 @@ interface MPRemoteCommandEvent { double /* NSTimeInterval */ Timestamp { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangePlaybackRateCommandEvents cannot be initialized externally. @@ -2145,7 +2023,6 @@ interface MPChangePlaybackRateCommandEvent { float PlaybackRate { get; } // float, not CGFloat } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPRatingCommandEvents cannot be initialized externally. @@ -2155,7 +2032,6 @@ interface MPRatingCommandEvent { float Rating { get; } // float, not CGFloat } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // Name: NSGenericException Reason: MPSeekCommandEvents cannot be initialized externally. @@ -2165,7 +2041,6 @@ interface MPSeekCommandEvent { MPSeekCommandEventType Type { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPSkipIntervalCommandEvents cannot be initialized externally. @@ -2175,7 +2050,6 @@ interface MPSkipIntervalCommandEvent { double /* NSTimeInterval */ Interval { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] @@ -2185,7 +2059,6 @@ interface MPFeedbackCommandEvent { bool Negative { [Bind ("isNegative")] get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeLanguageOptionCommandEvents cannot be initialized externally. @@ -2198,7 +2071,6 @@ interface MPChangeLanguageOptionCommandEvent { MPChangeLanguageOptionSetting Setting { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeShuffleModeCommandEvent cannot be initialized externally. @@ -2211,7 +2083,6 @@ interface MPChangeShuffleModeCommandEvent { bool PreservesShuffleMode { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // NSGenericException Reason: MPChangeRepeatModeCommandEvent cannot be initialized externally. @@ -2224,7 +2095,6 @@ interface MPChangeRepeatModeCommandEvent { bool PreservesRepeatMode { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // pre-emptive @@ -2257,7 +2127,6 @@ interface MPNowPlayingInfoLanguageOption { bool IsAutomaticAudibleLanguageOption { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // pre-emptive @@ -2275,7 +2144,6 @@ interface MPNowPlayingInfoLanguageOptionGroup { bool AllowEmptySelection { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] // not [Internal] since they are exposed as an NSString[] property in MPNowPlayingInfoLanguageOption @@ -2311,14 +2179,12 @@ interface MPLanguageOptionCharacteristics { NSString VoiceOverTranslation { get; } } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommand))] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSGenericException Reason: MPChangePlaybackPositionCommands cannot be initialized externally. interface MPChangePlaybackPositionCommand { } - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPRemoteCommandEvent))] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSGenericException Reason: MPChangePlaybackPositionCommandEvents cannot be initialized externally. @@ -2330,7 +2196,6 @@ interface MPChangePlaybackPositionCommandEvent { /// Apple documentation for MPMediaPlaylistCreationMetadata [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2351,7 +2216,6 @@ interface MPMediaPlaylistCreationMetadata { } [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] @@ -2368,7 +2232,6 @@ interface MPMusicPlayerQueueDescriptor : NSSecureCoding { /// Operates on media player queues. [NoMac] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (MPMusicPlayerQueueDescriptor))] interface MPMusicPlayerMediaItemQueueDescriptor { @@ -2395,7 +2258,6 @@ interface MPMusicPlayerMediaItemQueueDescriptor { } [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPMusicPlayerQueueDescriptor))] @@ -2417,7 +2279,6 @@ interface MPMusicPlayerStoreQueueDescriptor { } [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -2432,7 +2293,6 @@ interface MPMusicPlayerControllerQueue { } [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPMusicPlayerControllerQueue))] @@ -2445,7 +2305,6 @@ interface MPMusicPlayerControllerMutableQueue { } [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPMusicPlayerController))] @@ -2457,7 +2316,6 @@ interface MPMusicPlayerApplicationController { [NoMac] [TV (14, 0)] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2470,7 +2328,6 @@ interface MPMusicPlayerPlayParameters : NSSecureCoding { } [NoMac] - [NoWatch] [TV (14, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MPMusicPlayerQueueDescriptor))] @@ -2497,11 +2354,9 @@ interface IMPSystemMusicPlayerController { } /// Protocol for playing videos with the Music app. [NoTV] [NoMac] // headers have no availability macros on the protocol itself but the only member is not available on macOS - [Watch (5, 0)] [MacCatalyst (13, 1)] [Protocol] interface MPSystemMusicPlayerController { - [NoWatch] [MacCatalyst (13, 1)] [Abstract] [Export ("openToPlayQueueDescriptor:")] @@ -2510,7 +2365,6 @@ interface MPSystemMusicPlayerController { [Category] [BaseType (typeof (NSUserActivity))] - [NoWatch] [NoMac] [MacCatalyst (13, 1)] interface NSUserActivity_MediaPlayerAdditions { @@ -2522,7 +2376,6 @@ interface NSUserActivity_MediaPlayerAdditions { void SetExternalMediaContentIdentifier ([NullAllowed] NSString identifier); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMediaSelectionOption))] @@ -2532,7 +2385,6 @@ interface AVMediaSelectionOption_MPNowPlayingInfoLanguageOptionAdditions { MPNowPlayingInfoLanguageOption CreateNowPlayingInfoLanguageOption (); } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (AVMediaSelectionGroup))] @@ -2544,7 +2396,7 @@ interface AVMediaSelectionGroup_MPNowPlayingInfoLanguageOptionAdditions { interface IMPNowPlayingSessionDelegate { } [TV (14, 0), iOS (16, 0)] - [NoWatch, NoMac, NoMacCatalyst] + [NoMac, NoMacCatalyst] #if NET [Protocol, Model] #else @@ -2561,7 +2413,7 @@ interface MPNowPlayingSessionDelegate { } [TV (14, 0), iOS (16, 0)] - [NoWatch, NoMac, NoMacCatalyst] + [NoMac, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MPNowPlayingSession { @@ -2601,12 +2453,12 @@ interface MPNowPlayingSession { [Export ("removePlayer:")] void RemovePlayer (AVPlayer player); - [TV (16, 0), NoWatch, NoMacCatalyst, NoMac] + [TV (16, 0), NoMacCatalyst, NoMac] [Export ("automaticallyPublishesNowPlayingInfo")] bool AutomaticallyPublishesNowPlayingInfo { get; set; } } - [TV (16, 0), NoWatch, NoMacCatalyst, NoMac, iOS (16, 0)] + [TV (16, 0), NoMacCatalyst, NoMac, iOS (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MPAdTimeRange : NSCopying { diff --git a/src/mediasetup.cs b/src/mediasetup.cs index bf9815cccb27..6048ca3bb58b 100644 --- a/src/mediasetup.cs +++ b/src/mediasetup.cs @@ -10,7 +10,6 @@ namespace MediaSetup { [NoTV] - [NoWatch] [NoMac] [iOS (14, 0)] [BaseType (typeof (NSObject))] @@ -46,7 +45,6 @@ interface MSServiceAccount { interface IMSAuthenticationPresentationContext { } [NoTV] - [NoWatch] [NoMac] [iOS (14, 0)] [Protocol] @@ -58,7 +56,6 @@ interface MSAuthenticationPresentationContext { } [NoTV] - [NoWatch] [NoMac] [iOS (14, 0)] [BaseType (typeof (NSObject))] diff --git a/src/messageui.cs b/src/messageui.cs index b511886b1a03..c3122e231204 100644 --- a/src/messageui.cs +++ b/src/messageui.cs @@ -138,7 +138,7 @@ interface MFMessageComposeViewController : UIAppearance { [Export ("addAttachmentData:typeIdentifier:filename:")] bool AddAttachment (NSData attachmentData, string uti, string filename); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("insertCollaborationItemProvider:")] bool InsertCollaboration (NSItemProvider itemProvider); @@ -159,7 +159,7 @@ interface MFMessageComposeViewController : UIAppearance { NSString AttachmentURL { get; } [Async] - [iOS (17, 0), NoMacCatalyst, NoWatch, NoTV] + [iOS (17, 0), NoMacCatalyst, NoTV] [Export ("setUPIVerificationCodeSendCompletion:")] void SetUpiVerificationCodeSendCompletion (Action completion); } diff --git a/src/metal.cs b/src/metal.cs index 422b2fed9687..34e4abd28161 100644 --- a/src/metal.cs +++ b/src/metal.cs @@ -95,17 +95,14 @@ interface MTLArgument { [Export ("textureDataType")] MTLDataType TextureDataType { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("isDepthTexture")] bool IsDepthTexture { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("arrayLength")] nuint ArrayLength { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("bufferPointerType")] MTLPointerType BufferPointerType { get; } @@ -134,17 +131,14 @@ interface MTLArrayType { [return: NullAllowed] MTLArrayType ElementArrayType (); - [NoWatch] [MacCatalyst (13, 1)] [Export ("argumentIndexStride")] nuint ArgumentIndexStride { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("elementTextureReferenceType")] MTLTextureReferenceType ElementTextureReferenceType { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("elementPointerType")] MTLPointerType ElementPointerType { get; } @@ -198,7 +192,6 @@ partial interface MTLBuffer : MTLResource { [return: Release] IMTLTexture CreateTexture (MTLTextureDescriptor descriptor, nuint offset, nuint bytesPerRow); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -206,7 +199,6 @@ partial interface MTLBuffer : MTLResource { [Export ("addDebugMarker:range:")] void AddDebugMarker (string marker, NSRange range); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -240,7 +232,6 @@ partial interface MTLBuffer : MTLResource { ulong GpuAddress { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLBufferLayoutDescriptor : NSCopying { @@ -254,7 +245,6 @@ interface MTLBufferLayoutDescriptor : NSCopying { nuint StepRate { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLBufferLayoutDescriptorArray { @@ -394,7 +384,6 @@ partial interface MTLCommandBuffer { [Export ("GPUEndTime")] double /* CFTimeInterval */ GpuEndTime { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] // @required but we can't add abstract members in C# and keep binary compatibility @@ -402,7 +391,6 @@ partial interface MTLCommandBuffer { [Export ("pushDebugGroup:")] void PushDebugGroup (string @string); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] // @required but we can't add abstract members in C# and keep binary compatibility @@ -610,7 +598,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("setBytes:length:atIndex:")] void SetBytes (IntPtr bytes, nuint length, nuint index); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -625,7 +612,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("setStageInRegionWithIndirectBuffer:indirectBufferOffset:")] void SetStageInRegion (IMTLBuffer indirectBuffer, nuint indirectBufferOffset); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -633,7 +619,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("updateFence:")] void Update (IMTLFence fence); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -649,7 +634,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("dispatchThreads:threadsPerThreadgroup:")] void DispatchThreads (MTLSize threadsPerGrid, MTLSize threadsPerThreadgroup); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -657,7 +641,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("useResource:usage:")] void UseResource (IMTLResource resource, MTLResourceUsage usage); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -665,7 +648,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("useResources:count:usage:")] void UseResources (IMTLResource [] resources, nuint count, MTLResourceUsage usage); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -673,7 +655,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { [Export ("useHeap:")] void UseHeap (IMTLHeap heap); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -682,7 +663,6 @@ partial interface MTLComputeCommandEncoder : MTLCommandEncoder { void UseHeaps (IMTLHeap [] heaps, nuint count); [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (14, 5)] #if NET [Abstract] @@ -825,7 +805,6 @@ partial interface MTLComputePipelineState { [Abstract, Export ("threadExecutionWidth")] nuint ThreadExecutionWidth { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -833,7 +812,6 @@ partial interface MTLComputePipelineState { [NullAllowed, Export ("label")] string Label { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -841,7 +819,6 @@ partial interface MTLComputePipelineState { [Export ("staticThreadgroupMemoryLength")] nuint StaticThreadgroupMemoryLength { get; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -942,7 +919,6 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { [Abstract, Export ("copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size:")] void CopyFromBuffer (IMTLBuffer sourceBuffer, nuint sourceOffset, IMTLBuffer destinationBuffer, nuint destinationOffset, nuint size); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -950,7 +926,6 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { [Export ("updateFence:")] void Update (IMTLFence fence); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1066,7 +1041,6 @@ partial interface MTLBlitCommandEncoder : MTLCommandEncoder { interface IMTLFence { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] // From Apple Docs: Your app does not define classes that implement this protocol. Model is not needed interface MTLFence { @@ -1114,7 +1088,7 @@ partial interface MTLDevice { [Export ("headless")] bool Headless { [Bind ("isHeadless")] get; } - [iOS (17, 0), TV (17, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (17, 0), TV (17, 0), MacCatalyst (15, 0)] #if NET [Abstract] #endif @@ -1130,7 +1104,6 @@ partial interface MTLDevice { [Export ("depth24Stencil8PixelFormatSupported")] bool Depth24Stencil8PixelFormatSupported { [Bind ("isDepth24Stencil8PixelFormatSupported")] get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1138,7 +1111,6 @@ partial interface MTLDevice { [Export ("heapTextureSizeAndAlignWithDescriptor:")] MTLSizeAndAlign GetHeapTextureSizeAndAlign (MTLTextureDescriptor desc); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1146,7 +1118,6 @@ partial interface MTLDevice { [Export ("heapBufferSizeAndAlignWithLength:options:")] MTLSizeAndAlign GetHeapBufferSizeAndAlignWithLength (nuint length, MTLResourceOptions options); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1194,7 +1165,6 @@ partial interface MTLDevice { #if NET [Abstract] #endif - [NoWatch] [MacCatalyst (13, 1)] [return: NullAllowed] [return: Release] @@ -1259,7 +1229,6 @@ partial interface MTLDevice { #if NET [Abstract] #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("newDefaultLibraryWithBundle:error:")] [return: Release] @@ -1320,7 +1289,6 @@ partial interface MTLDevice { [Export ("newComputePipelineStateWithDescriptor:options:completionHandler:")] void CreateComputePipelineState (MTLComputePipelineDescriptor descriptor, MTLPipelineOption options, MTLNewComputePipelineStateWithReflectionCompletionHandler completionHandler); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1340,14 +1308,13 @@ partial interface MTLDevice { [Export ("supportsTextureSampleCount:")] bool SupportsTextureSampleCount (nuint sampleCount); - [NoiOS, NoWatch, NoTV, MacCatalyst (15, 0)] + [NoiOS, NoTV, MacCatalyst (15, 0)] #if NET [Abstract] #endif [Export ("removable")] bool Removable { [Bind ("isRemovable")] get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1355,7 +1322,6 @@ partial interface MTLDevice { [Export ("readWriteTextureSupport")] MTLReadWriteTextureTier ReadWriteTextureSupport { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1363,7 +1329,6 @@ partial interface MTLDevice { [Export ("argumentBuffersSupport")] MTLArgumentBuffersTier ArgumentBuffersSupport { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1371,7 +1336,6 @@ partial interface MTLDevice { [Export ("rasterOrderGroupsSupported")] bool RasterOrderGroupsSupported { [Bind ("areRasterOrderGroupsSupported")] get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1381,7 +1345,6 @@ partial interface MTLDevice { [return: Release] IMTLLibrary CreateLibrary (NSUrl url, [NullAllowed] out NSError error); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1396,7 +1359,6 @@ partial interface MTLDevice { [Export ("minimumTextureBufferAlignmentForPixelFormat:")] nuint GetMinimumTextureBufferAlignment (MTLPixelFormat format); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1411,7 +1373,6 @@ partial interface MTLDevice { [Export ("maxArgumentBufferSamplerCount")] nuint MaxArgumentBufferSamplerCount { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1419,7 +1380,6 @@ partial interface MTLDevice { [Export ("programmableSamplePositionsSupported")] bool ProgrammableSamplePositionsSupported { [Bind ("areProgrammableSamplePositionsSupported")] get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1427,7 +1387,6 @@ partial interface MTLDevice { [Export ("getDefaultSamplePositions:count:")] void GetDefaultSamplePositions (IntPtr positions, nuint count); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1480,7 +1439,6 @@ partial interface MTLDevice { [Export ("maxBufferLength")] nuint MaxBufferLength { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1488,7 +1446,6 @@ partial interface MTLDevice { [Export ("registryID")] ulong RegistryId { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -1497,24 +1454,23 @@ partial interface MTLDevice { nuint CurrentAllocatedSize { get; } #if false // https://bugzilla.xamarin.com/show_bug.cgi?id=59342 - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [Notification] [Field ("MTLDeviceWasAddedNotification")] NSString DeviceWasAdded { get; } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [Notification] [Field ("MTLDeviceRemovalRequestedNotification")] NSString DeviceRemovalRequested { get; } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [Notification] [Field ("MTLDeviceWasRemovedNotification")] NSString DeviceWasRemoved { get; } #endif [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (14, 5)] #if NET [Abstract] @@ -1525,7 +1481,6 @@ partial interface MTLDevice { IMTLRenderPipelineState CreateRenderPipelineState (MTLTileRenderPipelineDescriptor descriptor, MTLPipelineOption options, [NullAllowed] out MTLRenderPipelineReflection reflection, [NullAllowed] out NSError error); [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (14, 5)] #if NET [Abstract] @@ -1814,7 +1769,7 @@ partial interface MTLDevice { [Export ("supportsPrimitiveMotionBlur")] bool SupportsPrimitiveMotionBlur { get; } - [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("supportsFunctionPointersFromRender")] bool SupportsFunctionPointersFromRender { get; } @@ -2091,7 +2046,7 @@ partial interface MTLTexture : MTLResource { #if NET [Abstract (GenerateExtensionMethod = true)] #endif - [Mac (12, 5), iOS (15, 0), MacCatalyst (15, 0), TV (16, 0), NoWatch] + [Mac (12, 5), iOS (15, 0), MacCatalyst (15, 0), TV (16, 0)] [Export ("compressionType")] MTLTextureCompressionType CompressionType { get; } @@ -2130,7 +2085,6 @@ partial interface MTLTexture : MTLResource { [Export ("replaceRegion:mipmapLevel:withBytes:bytesPerRow:")] void ReplaceRegion (MTLRegion region, nuint level, IntPtr pixelBytes, nuint bytesPerRow); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2138,7 +2092,6 @@ partial interface MTLTexture : MTLResource { [NullAllowed, Export ("iosurface")] IOSurface.IOSurface IOSurface { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2297,7 +2250,7 @@ partial interface MTLTextureDescriptor : NSCopying { [Export ("allowGPUOptimizedContents")] bool AllowGpuOptimizedContents { get; set; } - [Mac (12, 5), iOS (15, 0), MacCatalyst (15, 0), TV (17, 0), NoWatch] + [Mac (12, 5), iOS (15, 0), MacCatalyst (15, 0), TV (17, 0)] [Export ("compressionType")] MTLTextureCompressionType CompressionType { get; set; } @@ -2353,7 +2306,7 @@ partial interface MTLSamplerDescriptor : NSCopying { [Export ("lodAverage")] bool LodAverage { get; set; } - [iOS (14, 0), TV (17, 0), NoWatch] + [iOS (14, 0), TV (17, 0)] [MacCatalyst (14, 0)] [Export ("borderColor", ArgumentSemantic.Assign)] MTLSamplerBorderColor BorderColor { get; set; } @@ -2366,7 +2319,6 @@ partial interface MTLSamplerDescriptor : NSCopying { [NullAllowed] string Label { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("supportArgumentBuffers")] bool SupportArgumentBuffers { get; set; } @@ -2444,57 +2396,46 @@ partial interface MTLRenderPipelineDescriptor : NSCopying { MTLPixelFormat StencilAttachmentPixelFormat { get; set; } [TV (14, 5)] - [NoWatch] [MacCatalyst (13, 1)] [Export ("inputPrimitiveTopology", ArgumentSemantic.Assign)] MTLPrimitiveTopologyClass InputPrimitiveTopology { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("tessellationPartitionMode", ArgumentSemantic.Assign)] MTLTessellationPartitionMode TessellationPartitionMode { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("maxTessellationFactor")] nuint MaxTessellationFactor { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("tessellationFactorScaleEnabled")] bool IsTessellationFactorScaleEnabled { [Bind ("isTessellationFactorScaleEnabled")] get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("tessellationFactorFormat", ArgumentSemantic.Assign)] MTLTessellationFactorFormat TessellationFactorFormat { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("tessellationControlPointIndexType", ArgumentSemantic.Assign)] MTLTessellationControlPointIndexType TessellationControlPointIndexType { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("tessellationFactorStepFunction", ArgumentSemantic.Assign)] MTLTessellationFactorStepFunction TessellationFactorStepFunction { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("tessellationOutputWindingOrder", ArgumentSemantic.Assign)] MTLWinding TessellationOutputWindingOrder { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("vertexBuffers")] MTLPipelineBufferDescriptorArray VertexBuffers { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("fragmentBuffers")] MTLPipelineBufferDescriptorArray FragmentBuffers { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("rasterSampleCount")] nuint RasterSampleCount { get; set; } @@ -2513,35 +2454,35 @@ partial interface MTLRenderPipelineDescriptor : NSCopying { [NullAllowed, Export ("binaryArchives", ArgumentSemantic.Copy)] IMTLBinaryArchive [] BinaryArchives { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("vertexPreloadedLibraries", ArgumentSemantic.Copy)] IMTLDynamicLibrary [] VertexPreloadedLibraries { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("vertexLinkedFunctions", ArgumentSemantic.Copy)] MTLLinkedFunctions VertexLinkedFunctions { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("supportAddingVertexBinaryFunctions")] bool SupportAddingVertexBinaryFunctions { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("supportAddingFragmentBinaryFunctions")] bool SupportAddingFragmentBinaryFunctions { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("maxVertexCallStackDepth")] nuint MaxVertexCallStackDepth { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("maxFragmentCallStackDepth")] nuint MaxFragmentCallStackDepth { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("fragmentPreloadedLibraries", ArgumentSemantic.Copy)] IMTLDynamicLibrary [] FragmentPreloadedLibraries { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("fragmentLinkedFunctions", ArgumentSemantic.Copy)] MTLLinkedFunctions FragmentLinkedFunctions { get; set; } @@ -2577,7 +2518,6 @@ partial interface MTLRenderPipelineState { [Abstract, Export ("device")] IMTLDevice Device { get; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -2586,7 +2526,6 @@ partial interface MTLRenderPipelineState { [Export ("maxTotalThreadsPerThreadgroup")] nuint MaxTotalThreadsPerThreadgroup { get; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -2595,7 +2534,6 @@ partial interface MTLRenderPipelineState { [Export ("threadgroupSizeMatchesTileSize")] bool ThreadgroupSizeMatchesTileSize { get; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -2604,7 +2542,6 @@ partial interface MTLRenderPipelineState { [Export ("imageblockSampleLength")] nuint ImageblockSampleLength { get; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -2620,27 +2557,27 @@ partial interface MTLRenderPipelineState { [Export ("supportIndirectCommandBuffers")] bool SupportIndirectCommandBuffers { get; } - [iOS (15, 0), TV (16, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("functionHandleWithFunction:stage:")] [return: NullAllowed] IMTLFunctionHandle FunctionHandleWithFunction (IMTLFunction function, MTLRenderStages stage); - [iOS (15, 0), TV (16, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("newVisibleFunctionTableWithDescriptor:stage:")] [return: NullAllowed] [return: Release] IMTLVisibleFunctionTable NewVisibleFunctionTableWithDescriptor (MTLVisibleFunctionTableDescriptor descriptor, MTLRenderStages stage); - [iOS (15, 0), TV (16, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("newIntersectionFunctionTableWithDescriptor:stage:")] [return: NullAllowed] [return: Release] IMTLIntersectionFunctionTable NewIntersectionFunctionTableWithDescriptor (MTLIntersectionFunctionTableDescriptor descriptor, MTLRenderStages stage); - [iOS (15, 0), TV (16, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("newRenderPipelineStateWithAdditionalBinaryFunctions:error:")] [return: NullAllowed] @@ -2718,7 +2655,6 @@ interface MTLVertexBufferLayoutDescriptorArray { void SetObject ([NullAllowed] MTLVertexBufferLayoutDescriptor bufferDesc, nuint index); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLAttribute { @@ -2741,7 +2677,6 @@ interface MTLAttribute { bool IsPatchControlPointData { [Bind ("isPatchControlPointData")] get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLAttributeDescriptor : NSCopying { @@ -2755,7 +2690,6 @@ interface MTLAttributeDescriptor : NSCopying { nuint BufferIndex { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLAttributeDescriptorArray { @@ -2835,18 +2769,15 @@ partial interface MTLVertexAttribute { [Export ("name")] string Name { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("patchData")] bool PatchData { [Bind ("isPatchData")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("patchControlPointData")] bool PatchControlPointData { [Bind ("isPatchControlPointData")] get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2868,7 +2799,6 @@ interface MTLFunctionConstantValues : NSCopying { void Reset (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLFunctionConstant { @@ -2891,7 +2821,6 @@ interface IMTLFunction { } [Protocol] // // From Apple Docs: Your app does not define classes that implement this protocol. Model is not needed partial interface MTLFunction { - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2911,7 +2840,6 @@ partial interface MTLFunction { [Abstract, Export ("name")] string Name { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2919,7 +2847,6 @@ partial interface MTLFunction { [Export ("patchType")] MTLPatchType PatchType { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2927,7 +2854,6 @@ partial interface MTLFunction { [Export ("patchControlPointCount")] nint PatchControlPointCount { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2935,7 +2861,6 @@ partial interface MTLFunction { [NullAllowed, Export ("stageInputAttributes")] MTLAttribute [] StageInputAttributes { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2943,7 +2868,6 @@ partial interface MTLFunction { [Export ("functionConstantsDictionary")] NSDictionary FunctionConstants { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2952,7 +2876,6 @@ partial interface MTLFunction { [return: Release] IMTLArgumentEncoder CreateArgumentEncoder (nuint bufferIndex); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2987,7 +2910,6 @@ partial interface MTLLibrary { [return: Release] IMTLFunction CreateFunction (string functionName); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -2997,7 +2919,6 @@ partial interface MTLLibrary { [return: Release] IMTLFunction CreateFunction (string name, MTLFunctionConstantValues constantValues, out NSError error); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3190,17 +3111,14 @@ interface MTLStructMember { MTLArrayType ArrayType (); #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("argumentIndex")] nuint ArgumentIndex { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("textureReferenceType")] MTLTextureReferenceType TextureReferenceType { get; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("pointerType")] MTLPointerType PointerType { get; } @@ -3277,7 +3195,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { [return: NullAllowed] IMTLRenderCommandEncoder CreateRenderCommandEncoder (); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3285,7 +3202,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { [Export ("setColorStoreAction:atIndex:")] void SetColorStoreAction (MTLStoreAction storeAction, nuint colorAttachmentIndex); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3293,7 +3209,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { [Export ("setDepthStoreAction:")] void SetDepthStoreAction (MTLStoreAction storeAction); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3301,7 +3216,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { [Export ("setStencilStoreAction:")] void SetStencilStoreAction (MTLStoreAction storeAction); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3309,7 +3223,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { [Export ("setColorStoreActionOptions:atIndex:")] void SetColorStoreActionOptions (MTLStoreActionOptions storeActionOptions, nuint colorAttachmentIndex); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3317,7 +3230,6 @@ interface MTLParallelRenderCommandEncoder : MTLCommandEncoder { [Export ("setDepthStoreActionOptions:")] void SetDepthStoreActionOptions (MTLStoreActionOptions storeActionOptions); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3357,7 +3269,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Abstract, Export ("setCullMode:")] void SetCullMode (MTLCullMode cullMode); - [NoWatch] [MacCatalyst (13, 1)] #if NET // Apple added a new required member in iOS 9, but that breaks our binary compat, so we can't do that in our existing code. @@ -3415,7 +3326,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Abstract, Export ("setVisibilityResultMode:offset:")] void SetVisibilityResultMode (MTLVisibilityResultMode mode, nuint offset); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3423,7 +3333,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setColorStoreAction:atIndex:")] void SetColorStoreAction (MTLStoreAction storeAction, nuint colorAttachmentIndex); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3431,7 +3340,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setDepthStoreAction:")] void SetDepthStoreAction (MTLStoreAction storeAction); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3516,7 +3424,7 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setVertexTextures:withRange:")] void SetVertexTextures (IMTLTexture [] textures, NSRange range); - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'MemoryBarrier (MTLBarrierScope, MTLRenderStages, MTLRenderStages)' instead.")] [NoMacCatalyst] #if NET @@ -3525,7 +3433,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("textureBarrier")] void TextureBarrier (); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3533,7 +3440,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("updateFence:afterStages:")] void Update (IMTLFence fence, MTLRenderStages stages); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3541,7 +3447,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("waitForFence:beforeStages:")] void Wait (IMTLFence fence, MTLRenderStages stages); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3549,7 +3454,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTessellationFactorBuffer:offset:instanceStride:")] void SetTessellationFactorBuffer ([NullAllowed] IMTLBuffer buffer, nuint offset, nuint instanceStride); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3557,7 +3461,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTessellationFactorScale:")] void SetTessellationFactorScale (float scale); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3565,7 +3468,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:")] void DrawPatches (nuint numberOfPatchControlPoints, nuint patchStart, nuint patchCount, [NullAllowed] IMTLBuffer patchIndexBuffer, nuint patchIndexBufferOffset, nuint instanceCount, nuint baseInstance); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3574,7 +3476,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:")] void DrawPatches (nuint numberOfPatchControlPoints, [NullAllowed] IMTLBuffer patchIndexBuffer, nuint patchIndexBufferOffset, IMTLBuffer indirectBuffer, nuint indirectBufferOffset); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3582,7 +3483,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("drawIndexedPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:")] void DrawIndexedPatches (nuint numberOfPatchControlPoints, nuint patchStart, nuint patchCount, [NullAllowed] IMTLBuffer patchIndexBuffer, nuint patchIndexBufferOffset, IMTLBuffer controlPointIndexBuffer, nuint controlPointIndexBufferOffset, nuint instanceCount, nuint baseInstance); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3591,7 +3491,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("drawIndexedPatches:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:")] void DrawIndexedPatches (nuint numberOfPatchControlPoints, [NullAllowed] IMTLBuffer patchIndexBuffer, nuint patchIndexBufferOffset, IMTLBuffer controlPointIndexBuffer, nuint controlPointIndexBufferOffset, IMTLBuffer indirectBuffer, nuint indirectBufferOffset); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3600,7 +3499,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setViewports:count:")] void SetViewports (IntPtr viewports, nuint count); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3609,7 +3507,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setScissorRects:count:")] void SetScissorRects (IntPtr scissorRects, nuint count); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3617,7 +3514,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setColorStoreActionOptions:atIndex:")] void SetColorStoreActionOptions (MTLStoreActionOptions storeActionOptions, nuint colorAttachmentIndex); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3625,7 +3521,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setDepthStoreActionOptions:")] void SetDepthStoreActionOptions (MTLStoreActionOptions storeActionOptions); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3633,7 +3528,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setStencilStoreActionOptions:")] void SetStencilStoreActionOptions (MTLStoreActionOptions storeActionOptions); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3641,7 +3535,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("useResource:usage:")] void UseResource (IMTLResource resource, MTLResourceUsage usage); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3649,7 +3542,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("useResources:count:usage:")] void UseResources (IMTLResource [] resources, nuint count, MTLResourceUsage usage); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3657,7 +3549,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("useHeap:")] void UseHeap (IMTLHeap heap); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -3694,7 +3585,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("memoryBarrierWithResources:count:afterStages:beforeStages:")] void MemoryBarrier (IMTLResource [] resources, nuint count, MTLRenderStages after, MTLRenderStages before); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3703,7 +3593,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("tileWidth")] nuint TileWidth { get; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3712,7 +3601,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("tileHeight")] nuint TileHeight { get; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3721,7 +3609,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileBytes:length:atIndex:")] void SetTileBytes (IntPtr /* void* */ bytes, nuint length, nuint index); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3730,7 +3617,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileBuffer:offset:atIndex:")] void SetTileBuffer ([NullAllowed] IMTLBuffer buffer, nuint offset, nuint index); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3739,7 +3625,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileBufferOffset:atIndex:")] void SetTileBufferOffset (nuint offset, nuint index); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3748,7 +3633,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileBuffers:offsets:withRange:")] void SetTileBuffers (IMTLBuffer [] buffers, IntPtr offsets, NSRange range); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3757,7 +3641,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileTexture:atIndex:")] void SetTileTexture ([NullAllowed] IMTLTexture texture, nuint index); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3766,7 +3649,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileTextures:withRange:")] void SetTileTextures (IMTLTexture [] textures, NSRange range); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3775,7 +3657,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileSamplerState:atIndex:")] void SetTileSamplerState ([NullAllowed] IMTLSamplerState sampler, nuint index); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3784,7 +3665,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileSamplerStates:withRange:")] void SetTileSamplerStates (IMTLSamplerState [] samplers, NSRange range); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3793,7 +3673,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:")] void SetTileSamplerState ([NullAllowed] IMTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, nuint index); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3802,7 +3681,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:")] void SetTileSamplerStates (IMTLSamplerState [] samplers, IntPtr /* float[] */ lodMinClamps, IntPtr /* float[] */ lodMaxClamps, NSRange range); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3811,7 +3689,6 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { [Export ("dispatchThreadsPerTile:")] void DispatchThreadsPerTile (MTLSize threadsPerTile); - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] #if NET @@ -3871,103 +3748,103 @@ partial interface MTLRenderCommandEncoder : MTLCommandEncoder { void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier); #endif - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setVertexVisibleFunctionTable:atBufferIndex:")] void SetVertexVisibleFunctionTable ([NullAllowed] IMTLVisibleFunctionTable functionTable, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setVertexVisibleFunctionTables:withBufferRange:")] void SetVertexVisibleFunctionTables (IMTLVisibleFunctionTable [] functionTables, NSRange range); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setVertexIntersectionFunctionTable:atBufferIndex:")] void SetVertexIntersectionFunctionTable ([NullAllowed] IMTLIntersectionFunctionTable intersectionFunctionTable, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setVertexIntersectionFunctionTables:withBufferRange:")] void SetVertexIntersectionFunctionTables (IMTLIntersectionFunctionTable [] intersectionFunctionTable, NSRange range); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setVertexAccelerationStructure:atBufferIndex:")] void SetVertexAccelerationStructure ([NullAllowed] IMTLAccelerationStructure accelerationStructure, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setFragmentAccelerationStructure:atBufferIndex:")] void SetFragmentAccelerationStructure ([NullAllowed] IMTLAccelerationStructure accelerationStructure, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setFragmentIntersectionFunctionTable:atBufferIndex:")] void SetFragmentIntersectionFunctionTable ([NullAllowed] IMTLIntersectionFunctionTable intersectionFunctionTable, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setFragmentIntersectionFunctionTables:withBufferRange:")] void SetFragmentIntersectionFunctionTables (IMTLIntersectionFunctionTable [] intersectionFunctionTable, NSRange range); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setFragmentVisibleFunctionTable:atBufferIndex:")] void SetFragmentVisibleFunctionTable ([NullAllowed] IMTLVisibleFunctionTable functionTable, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setFragmentVisibleFunctionTables:withBufferRange:")] void SetFragmentVisibleFunctionTables (IMTLVisibleFunctionTable [] functionTables, NSRange range); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setTileAccelerationStructure:atBufferIndex:")] void SetTileAccelerationStructure ([NullAllowed] IMTLAccelerationStructure accelerationStructure, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setTileIntersectionFunctionTable:atBufferIndex:")] void SetTileIntersectionFunctionTable ([NullAllowed] IMTLIntersectionFunctionTable intersectionFunctionTable, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setTileIntersectionFunctionTables:withBufferRange:")] void SetTileIntersectionFunctionTables (IMTLIntersectionFunctionTable [] intersectionFunctionTable, NSRange range); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setTileVisibleFunctionTable:atBufferIndex:")] void SetTileVisibleFunctionTable ([NullAllowed] IMTLVisibleFunctionTable functionTable, nuint bufferIndex); - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [Abstract (GenerateExtensionMethod = true)] [Export ("setTileVisibleFunctionTables:withBufferRange:")] void SetTileVisibleFunctionTables (IMTLVisibleFunctionTable [] functionTables, NSRange range); - [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), NoWatch] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] #if NET [Abstract (GenerateExtensionMethod = true)] #endif [Export ("setVertexBuffer:offset:attributeStride:atIndex:")] void SetVertexBuffer ([NullAllowed] IMTLBuffer buffer, nuint offset, nuint stride, nuint index); - [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), NoWatch] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] #if NET [Abstract (GenerateExtensionMethod = true)] #endif [Export ("setVertexBuffers:offsets:attributeStrides:withRange:")] void SetVertexBuffers (IntPtr buffers, IntPtr offsets, IntPtr strides, NSRange range); - [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), NoWatch] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] #if NET [Abstract (GenerateExtensionMethod = true)] #endif [Export ("setVertexBufferOffset:attributeStride:atIndex:")] void SetVertexBufferOffset (nuint offset, nuint stride, nuint index); - [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), NoWatch] + [Mac (14, 0), iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] #if NET [Abstract (GenerateExtensionMethod = true)] #endif @@ -4212,7 +4089,6 @@ interface MTLRenderPipelineReflection { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] - [NoWatch] [TV (14, 5)] [MacCatalyst (14, 0)] [NullAllowed, Export ("tileArguments")] @@ -4278,7 +4154,6 @@ interface MTLRenderPassAttachmentDescriptor : NSCopying { [Export ("storeAction")] MTLStoreAction StoreAction { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("storeActionOptions", ArgumentSemantic.Assign)] MTLStoreActionOptions StoreActionOptions { get; set; } @@ -4369,53 +4244,44 @@ interface MTLRenderPassDescriptor : NSCopying { [Export ("renderTargetArrayLength")] nuint RenderTargetArrayLength { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("setSamplePositions:count:")] unsafe void SetSamplePositions ([NullAllowed] IntPtr positions, nuint count); - [NoWatch] [MacCatalyst (13, 1)] [Export ("getSamplePositions:count:")] nuint GetSamplePositions ([NullAllowed] IntPtr positions, nuint count); - [NoWatch] [TV (14, 5)] [MacCatalyst (14, 0)] [Export ("imageblockSampleLength")] nuint ImageblockSampleLength { get; set; } - [NoWatch] [TV (14, 5)] [MacCatalyst (14, 0)] [Export ("threadgroupMemoryLength")] nuint ThreadgroupMemoryLength { get; set; } - [NoWatch] [TV (14, 5)] [MacCatalyst (14, 0)] [Export ("tileWidth")] nuint TileWidth { get; set; } - [NoWatch] [TV (14, 5)] [MacCatalyst (14, 0)] [Export ("tileHeight")] nuint TileHeight { get; set; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] [Export ("defaultRasterSampleCount")] nuint DefaultRasterSampleCount { get; set; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] [Export ("renderTargetWidth")] nuint RenderTargetWidth { get; set; } - [NoWatch] [TV (14, 5)] [MacCatalyst (13, 1)] [Export ("renderTargetHeight")] @@ -4440,7 +4306,6 @@ interface MTLRenderPassDescriptor : NSCopying { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // note: type works only on devices, symbol is missing on the simulator @@ -4472,7 +4337,6 @@ interface MTLHeapDescriptor : NSCopying { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] // From Apple Docs: Your app does not define classes that implement this protocol. Model is not needed interface MTLHeap : MTLAllocation { @@ -4520,7 +4384,6 @@ interface MTLHeap : MTLAllocation { [Export ("setPurgeableState:")] MTLPurgeableState SetPurgeableState (MTLPurgeableState state); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -4635,7 +4498,6 @@ partial interface MTLResource : MTLAllocation { [Abstract, Export ("setPurgeableState:")] MTLPurgeableState SetPurgeableState (MTLPurgeableState state); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -4643,7 +4505,6 @@ partial interface MTLResource : MTLAllocation { [NullAllowed, Export ("heap")] IMTLHeap Heap { get; } - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -4651,7 +4512,6 @@ partial interface MTLResource : MTLAllocation { [Export ("makeAliasable")] void MakeAliasable (); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -4659,14 +4519,13 @@ partial interface MTLResource : MTLAllocation { [Export ("isAliasable")] bool IsAliasable { get; } - [Watch (10, 4), TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] #if NET [Abstract] #endif [Export ("setOwnerWithIdentity:")] int SetOwnerWithIdentity (uint taskIdToken); - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -4724,12 +4583,10 @@ interface MTLComputePipelineDescriptor : NSCopying { [Export ("maxTotalThreadsPerThreadgroup")] nuint MaxTotalThreadsPerThreadgroup { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("stageInputDescriptor", ArgumentSemantic.Copy)] MTLStageInputOutputDescriptor StageInputDescriptor { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("buffers")] MTLPipelineBufferDescriptorArray Buffers { get; } @@ -4768,7 +4625,7 @@ interface MTLComputePipelineDescriptor : NSCopying { [Export ("maxCallStackDepth")] nuint MaxCallStackDepth { get; set; } - [iOS (15, 0), TV (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("preloadedLibraries", ArgumentSemantic.Copy)] IMTLDynamicLibrary [] PreloadedLibraries { get; set; } @@ -4777,7 +4634,6 @@ interface MTLComputePipelineDescriptor : NSCopying { MTLShaderValidation ShaderValidation { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLStageInputOutputDescriptor : NSCopying { @@ -4801,7 +4657,6 @@ interface MTLStageInputOutputDescriptor : NSCopying { void Reset (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLType { @@ -4809,7 +4664,6 @@ interface MTLType { MTLDataType DataType { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (MTLType))] interface MTLPointerType { @@ -4835,7 +4689,6 @@ interface MTLPointerType { MTLArrayType ElementArrayType { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (MTLType))] interface MTLTextureReferenceType { @@ -4852,12 +4705,10 @@ interface MTLTextureReferenceType { bool IsDepthTexture { get; } } - [NoWatch] [MacCatalyst (13, 1)] interface IMTLCaptureScope { } /// Custom capture scope boundary for debugging from Xcode. - [NoWatch] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -4889,7 +4740,6 @@ interface MTLCaptureScope { /// Manages GPU captures for apps launched from Xcode. - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -4948,7 +4798,6 @@ interface MTLCaptureManager { } /// Contains a mutability description for a buffer. - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLPipelineBufferDescriptor : NSCopying { @@ -4957,7 +4806,6 @@ interface MTLPipelineBufferDescriptor : NSCopying { } /// An array of buffer mutability descriptors. - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLPipelineBufferDescriptorArray { @@ -4971,7 +4819,6 @@ interface MTLPipelineBufferDescriptorArray { } /// An description of an argument inside an argument buffer. - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MTLArgumentDescriptor : NSCopying { @@ -5001,7 +4848,6 @@ interface MTLArgumentDescriptor : NSCopying { interface IMTLArgumentEncoder { } /// Encodes data into argument buffers. - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface MTLArgumentEncoder { @@ -5137,7 +4983,6 @@ interface MTLArgumentEncoder { [Export ("setIntersectionFunctionTable:atIndex:")] void SetIntersectionFunctionTable ([NullAllowed] IMTLIntersectionFunctionTable intersectionFunctionTable, nuint index); - [iOS (14, 0), TV (16, 0), MacCatalyst (14, 0)] [Abstract (GenerateExtensionMethod = true)] [Mac (11, 0), iOS (14, 0), TV (16, 0), MacCatalyst (14, 0)] [Export ("setIntersectionFunctionTables:withRange:")] @@ -5146,7 +4991,6 @@ interface MTLArgumentEncoder { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (14, 5)] [BaseType (typeof (NSObject))] interface MTLTileRenderPipelineColorAttachmentDescriptor : NSCopying { @@ -5155,7 +4999,6 @@ interface MTLTileRenderPipelineColorAttachmentDescriptor : NSCopying { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (14, 5)] [BaseType (typeof (NSObject))] interface MTLTileRenderPipelineColorAttachmentDescriptorArray { @@ -5206,7 +5049,7 @@ interface MTLBinaryArchive { #if NET [Abstract] #endif - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("addFunctionWithDescriptor:library:error:")] bool AddFunctionWithDescriptor (MTLFunctionDescriptor descriptor, IMTLLibrary library, [NullAllowed] out NSError error); @@ -5227,7 +5070,6 @@ interface MTLBinaryArchive { [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [TV (14, 5)] [BaseType (typeof (NSObject))] interface MTLTileRenderPipelineDescriptor : NSCopying { @@ -5262,19 +5104,19 @@ interface MTLTileRenderPipelineDescriptor : NSCopying { [NullAllowed, Export ("binaryArchives", ArgumentSemantic.Copy)] IMTLBinaryArchive [] BinaryArchives { get; set; } - [iOS (15, 0), MacCatalyst (15, 0), TV (17, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), TV (17, 0)] [Export ("supportAddingBinaryFunctions")] bool SupportAddingBinaryFunctions { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("preloadedLibraries", ArgumentSemantic.Copy)] IMTLDynamicLibrary [] PreloadedLibraries { get; set; } - [iOS (14, 0), MacCatalyst (15, 0), TV (17, 0), NoWatch] + [iOS (14, 0), MacCatalyst (15, 0), TV (17, 0)] [Export ("maxCallStackDepth")] nuint MaxCallStackDepth { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("linkedFunctions", ArgumentSemantic.Copy)] MTLLinkedFunctions LinkedFunctions { get; set; } @@ -5584,19 +5426,19 @@ interface MTLRasterizationRateMapDescriptor : NSCopying { [Export ("setLayer:atIndex:")] void SetLayer ([NullAllowed] MTLRasterizationRateLayerDescriptor layer, nuint layerIndex); - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("layers")] MTLRasterizationRateLayerArray Layers { get; } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("screenSize", ArgumentSemantic.Assign)] MTLSize ScreenSize { get; set; } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("label")] string Label { get; set; } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("layerCount")] nuint LayerCount { get; } } @@ -5633,11 +5475,11 @@ interface MTLRasterizationRateLayerDescriptor : NSCopying { [Export ("vertical")] MTLRasterizationRateSampleArray Vertical { get; } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("maxSampleCount")] MTLSize MaxSampleCount { get; } - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("sampleCount", ArgumentSemantic.Assign)] MTLSize SampleCount { get; set; } } @@ -5957,23 +5799,23 @@ interface MTLAccelerationStructureGeometryDescriptor : NSCopying { [Export ("allowDuplicateIntersectionFunctionInvocation")] bool AllowDuplicateIntersectionFunctionInvocation { get; set; } - [iOS (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("label")] string Label { get; set; } - [Mac (13, 0), iOS (16, 0), NoWatch, MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("primitiveDataBuffer", ArgumentSemantic.Retain)] IMTLBuffer PrimitiveDataBuffer { get; set; } - [Mac (13, 0), iOS (16, 0), NoWatch, MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("primitiveDataBufferOffset")] nuint PrimitiveDataBufferOffset { get; set; } - [Mac (13, 0), iOS (16, 0), NoWatch, MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("primitiveDataStride")] nuint PrimitiveDataStride { get; set; } - [Mac (13, 0), iOS (16, 0), NoWatch, MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("primitiveDataElementSize")] nuint PrimitiveDataElementSize { get; set; } } @@ -6151,7 +5993,7 @@ interface MTLFunctionDescriptor : NSCopying { [Export ("options", ArgumentSemantic.Assign)] MTLFunctionOptions Options { get; set; } - [iOS (15, 0), TV (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("binaryArchives", ArgumentSemantic.Copy)] IMTLBinaryArchive [] BinaryArchives { get; set; } } @@ -6180,19 +6022,19 @@ interface MTLInstanceAccelerationStructureDescriptor { [Export ("descriptor")] MTLInstanceAccelerationStructureDescriptor Create (); - [iOS (15, 0), MacCatalyst (15, 0), TV (17, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), TV (17, 0)] [Export ("instanceDescriptorType", ArgumentSemantic.Assign)] MTLAccelerationStructureInstanceDescriptorType InstanceDescriptorType { get; set; } - [iOS (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("motionTransformBuffer", ArgumentSemantic.Retain)] IMTLBuffer MotionTransformBuffer { get; set; } - [iOS (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("motionTransformBufferOffset")] nuint MotionTransformBufferOffset { get; set; } - [iOS (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("motionTransformCount")] nuint MotionTransformCount { get; set; } @@ -6248,23 +6090,23 @@ interface MTLLinkedFunctions : NSCopying { [NullAllowed, Export ("groups", ArgumentSemantic.Copy)] NSDictionary> Groups { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("privateFunctions", ArgumentSemantic.Copy)] IMTLFunction [] PrivateFunctions { get; set; } - [iOS (15, 0), NoTV, MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), NoTV, MacCatalyst (15, 0)] [Export ("instanceDescriptorType", ArgumentSemantic.Assign)] MTLAccelerationStructureInstanceDescriptorType InstanceDescriptorType { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("motionTransformBuffer", ArgumentSemantic.Retain)] IMTLBuffer MotionTransformBuffer { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("motionTransformBufferOffset")] nuint MotionTransformBufferOffset { get; set; } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("motionTransformCount")] nuint MotionTransformCount { get; set; } } @@ -6466,7 +6308,7 @@ interface MTLAccelerationStructureCommandEncoder : MTLCommandEncoder { #if NET [Abstract] #endif - [iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("writeCompactedAccelerationStructureSize:toBuffer:offset:sizeDataType:")] void WriteCompactedAccelerationStructureSize (IMTLAccelerationStructure accelerationStructure, IMTLBuffer buffer, nuint offset, MTLDataType sizeDataType); @@ -6654,7 +6496,7 @@ interface MTLFunctionLogDebugLocation { nuint Column { get; } } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface MTLStitchedLibraryDescriptor : NSCopying { [Export ("functionGraphs", ArgumentSemantic.Copy)] @@ -6672,7 +6514,7 @@ interface MTLStitchedLibraryDescriptor : NSCopying { MTLStitchedLibraryOptions Options { get; set; } } - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface MTLRenderPipelineFunctionsDescriptor : NSCopying { [NullAllowed, Export ("vertexAdditionalBinaryFunctions", ArgumentSemantic.Copy)] @@ -6685,7 +6527,7 @@ interface MTLRenderPipelineFunctionsDescriptor : NSCopying { IMTLFunction [] TileAdditionalBinaryFunctions { get; set; } } - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface MTLMotionKeyframeData { [NullAllowed, Export ("buffer", ArgumentSemantic.Retain)] @@ -6699,22 +6541,22 @@ interface MTLMotionKeyframeData { MTLMotionKeyframeData Create (); } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Protocol] // From Apple Docs: Your app does not define classes that implement this protocol. Model is not needed interface MTLFunctionStitchingNode : NSCopying { } interface IMTLFunctionStitchingNode { } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Protocol] // From Apple Docs: Your app does not define classes that implement this protocol. Model is not needed interface MTLFunctionStitchingAttribute : NSCopying { } interface IMTLFunctionStitchingAttribute { } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] interface MTLFunctionStitchingAttributeAlwaysInline : MTLFunctionStitchingAttribute { } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface MTLFunctionStitchingInputNode : MTLFunctionStitchingNode { [Export ("argumentIndex")] @@ -6724,7 +6566,7 @@ interface MTLFunctionStitchingInputNode : MTLFunctionStitchingNode { NativeHandle Constructor (nuint argument); } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MTLFunctionStitchingGraph : NSCopying { @@ -6744,7 +6586,7 @@ interface MTLFunctionStitchingGraph : NSCopying { NativeHandle Constructor (string functionName, MTLFunctionStitchingFunctionNode [] nodes, [NullAllowed] MTLFunctionStitchingFunctionNode outputNode, IMTLFunctionStitchingAttribute [] attributes); } - [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface MTLFunctionStitchingFunctionNode : MTLFunctionStitchingNode { @@ -6761,7 +6603,7 @@ interface MTLFunctionStitchingFunctionNode : MTLFunctionStitchingNode { NativeHandle Constructor (string name, IMTLFunctionStitchingNode [] arguments, MTLFunctionStitchingFunctionNode [] controlDependencies); } - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [BaseType (typeof (MTLAccelerationStructureGeometryDescriptor))] interface MTLAccelerationStructureMotionTriangleGeometryDescriptor { [Export ("vertexBuffers", ArgumentSemantic.Copy)] @@ -6803,7 +6645,7 @@ interface MTLAccelerationStructureMotionTriangleGeometryDescriptor { MTLMatrixLayout TransformationMatrixLayout { get; set; } } - [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0), NoWatch] + [iOS (15, 0), TV (16, 0), MacCatalyst (15, 0)] [BaseType (typeof (MTLAccelerationStructureGeometryDescriptor))] interface MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor { [Export ("boundingBoxBuffers", ArgumentSemantic.Copy)] diff --git a/src/metrickit.cs b/src/metrickit.cs index 02c9d7436ad8..2c75b672a4c2 100644 --- a/src/metrickit.cs +++ b/src/metrickit.cs @@ -22,7 +22,7 @@ namespace MetricKit { interface NSUnitDuration : NSUnit { } interface NSUnitInformationStorage : NSUnit { } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MXMetric : NSSecureCoding { @@ -42,7 +42,7 @@ interface MXMetric : NSSecureCoding { NSDictionary _DictionaryRepresentation14 { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric), Name = "MXCPUMetric")] interface MXCpuMetric { @@ -55,7 +55,7 @@ interface MXCpuMetric { NSMeasurement CumulativeCpuInstructions { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric), Name = "MXGPUMetric")] interface MXGpuMetric { @@ -65,7 +65,7 @@ interface MXGpuMetric { // NSUnit is added as a parent to ensure that the intermediate tmp dll can be compiled // since at this stage the compiler does not know about the inheritance of NSDimension. - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSDimension))] [DisableDefaultCtor] @@ -82,7 +82,7 @@ interface MXUnitSignalBars : NSUnit { // NSUnit is added as a parent to ensure that the intermediate tmp dll can be compiled // since at this stage the compiler does not know about the inheritance of NSDimension. - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSDimension))] [DisableDefaultCtor] @@ -97,7 +97,7 @@ interface MXUnitAveragePixelLuminance : NSUnit { MXUnitAveragePixelLuminance Apl { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MXHistogramBucket : NSSecureCoding @@ -112,7 +112,7 @@ interface MXHistogramBucket : NSSecureCoding nuint BucketCount { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MXHistogram : NSSecureCoding @@ -124,7 +124,7 @@ interface MXHistogram : NSSecureCoding NSEnumerator> BucketEnumerator { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXCellularConditionMetric { @@ -132,7 +132,7 @@ interface MXCellularConditionMetric { MXHistogram HistogrammedCellularConditionTime { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MXMetaData : NSSecureCoding { @@ -174,20 +174,20 @@ interface MXMetaData : NSSecureCoding { [Export ("platformArchitecture", ArgumentSemantic.Strong)] string PlatformArchitecture { get; } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("lowPowerModeEnabled")] bool LowPowerModeEnabled { get; } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("isTestFlightApp")] bool IsTestFlightApp { get; } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("pid")] int Pid { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXAppRunTimeMetric { @@ -204,7 +204,7 @@ interface MXAppRunTimeMetric { NSMeasurement CumulativeBackgroundLocationTime { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXLocationActivityMetric { @@ -227,7 +227,7 @@ interface MXLocationActivityMetric { NSMeasurement CumulativeThreeKilometersAccuracyTime { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXNetworkTransferMetric { @@ -244,7 +244,7 @@ interface MXNetworkTransferMetric { NSMeasurement CumulativeCellularDownload { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXAppLaunchMetric { @@ -254,16 +254,16 @@ interface MXAppLaunchMetric { [Export ("histogrammedApplicationResumeTime", ArgumentSemantic.Strong)] MXHistogram HistogrammedApplicationResumeTime { get; } - [NoWatch, NoTV, NoMac, iOS (15, 2), MacCatalyst (15, 2)] + [NoTV, NoMac, iOS (15, 2), MacCatalyst (15, 2)] [Export ("histogrammedOptimizedTimeToFirstDraw", ArgumentSemantic.Strong)] MXHistogram HistogrammedOptimizedTimeToFirstDraw { get; } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("histogrammedExtendedLaunch", ArgumentSemantic.Strong)] MXHistogram HistogrammedExtendedLaunch { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXAppResponsivenessMetric { @@ -271,7 +271,7 @@ interface MXAppResponsivenessMetric { MXHistogram HistogrammedApplicationHangTime { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXDiskIOMetric { @@ -279,7 +279,7 @@ interface MXDiskIOMetric { NSMeasurement CumulativeLogicalWrites { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -295,7 +295,7 @@ interface MXAverage : NSSecureCoding double StandardDeviation { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXMemoryMetric { @@ -306,7 +306,7 @@ interface MXMemoryMetric { MXAverage AverageSuspendedMemory { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXDisplayMetric { @@ -314,7 +314,7 @@ interface MXDisplayMetric { MXAverage AveragePixelLuminance { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MXSignpostIntervalData : NSSecureCoding { @@ -331,12 +331,12 @@ interface MXSignpostIntervalData : NSSecureCoding { NSMeasurement CumulativeLogicalWrites { get; } [NullAllowed] - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("cumulativeHitchTimeRatio", ArgumentSemantic.Strong)] NSMeasurement CumulativeHitchTimeRatio { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (MXMetric))] interface MXSignpostMetric { @@ -353,7 +353,7 @@ interface MXSignpostMetric { nuint TotalCount { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface MXMetricPayload : NSSecureCoding { @@ -436,7 +436,7 @@ interface MXMetricPayload : NSSecureCoding { MXAppExitMetric ApplicationExitMetrics { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -466,12 +466,12 @@ interface MXMetricManager { [Export ("makeLogHandleWithCategory:")] IntPtr /* os_log_t */ _MakeLogHandle (NSString category); - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Static] [Export ("extendLaunchMeasurementForTaskID:error:")] bool ExtendLaunchMeasurement (string taskId, [NullAllowed] out NSError error); - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Static] [Export ("finishExtendedLaunchMeasurementForTaskID:error:")] bool FinishExtendedLaunchMeasurement (string taskId, [NullAllowed] out NSError error); @@ -479,7 +479,7 @@ interface MXMetricManager { interface IMXMetricManagerSubscriber { } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface MXMetricManagerSubscriber { @@ -497,7 +497,7 @@ interface MXMetricManagerSubscriber { void DidReceiveDiagnosticPayloads (MXDiagnosticPayload [] payloads); } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MXMetric))] @@ -508,7 +508,7 @@ interface MXAnimationMetric { NSMeasurement ScrollHitchTimeRatio { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MXMetric))] @@ -522,7 +522,7 @@ interface MXAppExitMetric { MXBackgroundExitData BackgroundExitData { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -560,7 +560,7 @@ interface MXBackgroundExitData : NSSecureCoding { nuint CumulativeBackgroundTaskAssertionTimeoutExitCount { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -586,7 +586,7 @@ interface MXForegroundExitData : NSSecureCoding { nuint CumulativeAppWatchdogExitCount { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -597,7 +597,7 @@ interface MXCallStackTree : NSSecureCoding { NSData JsonRepresentation { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MXDiagnostic), Name = "MXCPUExceptionDiagnostic")] @@ -614,7 +614,7 @@ interface MXCpuExceptionDiagnostic { NSMeasurement TotalSampledTime { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MXDiagnostic))] @@ -645,12 +645,12 @@ interface MXCrashDiagnostic { [NullAllowed, Export ("signal", ArgumentSemantic.Strong)] NSNumber Signal { get; } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("exceptionReason", ArgumentSemantic.Strong)] MXCrashDiagnosticObjectiveCExceptionReason ExceptionReason { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -669,13 +669,13 @@ interface MXDiagnostic : NSSecureCoding { [Export ("dictionaryRepresentation")] NSDictionary DictionaryRepresentation { get; } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("signpostData", ArgumentSemantic.Strong)] MXSignpostRecord [] SignpostData { get; } } // @interface MXAppLaunchDiagnostic : MXDiagnostic - [NoMac, iOS (16, 0), Mac (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), Mac (16, 0), NoTV] [MacCatalyst (16, 0)] [BaseType (typeof (MXDiagnostic))] [DisableDefaultCtor] @@ -687,7 +687,7 @@ interface MXAppLaunchDiagnostic { NSMeasurement LaunchDuration { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -703,7 +703,7 @@ interface MXDiagnosticPayload : NSSecureCoding { [NullAllowed, Export ("hangDiagnostics", ArgumentSemantic.Strong)] MXHangDiagnostic [] HangDiagnostics { get; } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [NullAllowed, Export ("appLaunchDiagnostics", ArgumentSemantic.Strong)] MXAppLaunchDiagnostic [] AppLaunchDiagnostics { get; } @@ -723,7 +723,7 @@ interface MXDiagnosticPayload : NSSecureCoding { NSDictionary DictionaryRepresentation { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MXDiagnostic))] @@ -737,7 +737,7 @@ interface MXDiskWriteExceptionDiagnostic { NSMeasurement TotalWritesCaused { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (MXDiagnostic))] @@ -751,7 +751,7 @@ interface MXHangDiagnostic { NSMeasurement HangDuration { get; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface MXSignpostRecord : NSSecureCoding { [Export ("subsystem")] @@ -782,7 +782,7 @@ interface MXSignpostRecord : NSSecureCoding { NSDictionary DictionaryRepresentation { get; } } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface MXCrashDiagnosticObjectiveCExceptionReason : NSSecureCoding { [Export ("composedMessage")] diff --git a/src/mlcompute.cs b/src/mlcompute.cs index 4d1ed90e4712..14b04adc3643 100644 --- a/src/mlcompute.cs +++ b/src/mlcompute.cs @@ -12,7 +12,6 @@ interface MLCExecutionResult { } [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCActivationType { None = 0, @@ -47,7 +46,6 @@ enum MLCActivationType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCArithmeticOperation { Add = 0, @@ -97,7 +95,6 @@ enum MLCArithmeticOperation { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCConvolutionType { Standard = 0, @@ -107,7 +104,6 @@ enum MLCConvolutionType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCDataType { Invalid = 0, @@ -126,7 +122,6 @@ enum MLCDataType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCDeviceType /* int32_t */ { Cpu = 0, @@ -139,7 +134,6 @@ enum MLCDeviceType /* int32_t */ { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [Flags] enum MLCExecutionOptions : ulong { @@ -154,7 +148,6 @@ enum MLCExecutionOptions : ulong { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [Flags] enum MLCGraphCompilationOptions : ulong { @@ -167,7 +160,6 @@ enum MLCGraphCompilationOptions : ulong { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCLossType { MeanAbsoluteError = 0, @@ -184,7 +176,6 @@ enum MLCLossType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCLstmResultMode : ulong /* uint64_t */ { Output = 0, @@ -193,7 +184,6 @@ enum MLCLstmResultMode : ulong /* uint64_t */ { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCPaddingPolicy { Same = 0, @@ -203,7 +193,6 @@ enum MLCPaddingPolicy { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCPaddingType { Zero = 0, @@ -214,7 +203,6 @@ enum MLCPaddingType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCPoolingType { Max = 1, @@ -225,7 +213,6 @@ enum MLCPoolingType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCRandomInitializerType { Invalid = 0, @@ -237,7 +224,6 @@ enum MLCRandomInitializerType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCReductionType { None = 0, @@ -264,7 +250,6 @@ enum MLCReductionType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCRegularizationType { None = 0, @@ -274,7 +259,6 @@ enum MLCRegularizationType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCSampleMode { Nearest = 0, @@ -283,14 +267,13 @@ enum MLCSampleMode { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] enum MLCSoftmaxOperation { Softmax = 0, LogSoftmax = 1, } - [iOS (15, 0), TV (15, 0), NoWatch, MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] public enum MLCGradientClippingType { Value = 0, Norm = 1, @@ -300,10 +283,13 @@ public enum MLCGradientClippingType { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCActivationDescriptor : NSCopying { [Export ("activationType")] @@ -341,10 +327,13 @@ interface MLCActivationDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCLayer { [Export ("layerID")] @@ -367,10 +356,13 @@ interface MLCLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCActivationLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -501,10 +493,13 @@ interface MLCActivationLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCOptimizer : NSCopying { [Export ("learningRate")] @@ -543,10 +538,13 @@ interface MLCOptimizer : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCOptimizerDescriptor : NSCopying { [Export ("learningRate")] @@ -598,10 +596,13 @@ interface MLCOptimizerDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCOptimizer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCAdamOptimizer : NSCopying { [Export ("beta1")] @@ -636,10 +637,13 @@ interface MLCAdamOptimizer : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCDevice : NSCopying { [Export ("type")] @@ -688,10 +692,13 @@ interface MLCDevice : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCTensor : NSCopying { [Export ("tensorID")] @@ -845,10 +852,13 @@ MLCTensorData [] OptimizerData { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCTensorData { [Export ("bytes")] @@ -875,10 +885,13 @@ interface MLCTensorData { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCTensorDescriptor : NSCopying { [Export ("dataType")] @@ -953,10 +966,13 @@ interface MLCTensorDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCTensorParameter { [Export ("tensor", ArgumentSemantic.Retain)] @@ -976,10 +992,13 @@ interface MLCTensorParameter { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCArithmeticLayer { [Export ("operation")] @@ -992,10 +1011,13 @@ interface MLCArithmeticLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCBatchNormalizationLayer { [Export ("featureChannelCount")] @@ -1038,10 +1060,13 @@ interface MLCBatchNormalizationLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCConcatenationLayer { [Export ("dimension")] @@ -1058,10 +1083,13 @@ interface MLCConcatenationLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCConvolutionDescriptor : NSCopying { [Export ("convolutionType")] @@ -1152,10 +1180,13 @@ interface MLCConvolutionDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCConvolutionLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1181,10 +1212,13 @@ interface MLCConvolutionLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCDropoutLayer { [Export ("rate")] @@ -1200,10 +1234,13 @@ interface MLCDropoutLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCEmbeddingDescriptor : NSCopying { [Export ("embeddingCount")] @@ -1245,10 +1282,13 @@ interface MLCEmbeddingDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCEmbeddingLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1267,10 +1307,13 @@ interface MLCEmbeddingLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCFullyConnectedLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1296,10 +1339,13 @@ interface MLCFullyConnectedLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCGramMatrixLayer { [Export ("scale")] @@ -1312,10 +1358,13 @@ interface MLCGramMatrixLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCGroupNormalizationLayer { [Export ("featureChannelCount")] @@ -1347,10 +1396,13 @@ interface MLCGroupNormalizationLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCInstanceNormalizationLayer { [Export ("featureChannelCount")] @@ -1407,10 +1459,13 @@ interface MLCInstanceNormalizationLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCLayerNormalizationLayer { [Export ("normalizedShape", ArgumentSemantic.Copy)] @@ -1440,10 +1495,13 @@ interface MLCLayerNormalizationLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCLossDescriptor : NSCopying { [Export ("lossType")] @@ -1486,10 +1544,13 @@ interface MLCLossDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCLossLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1581,10 +1642,13 @@ interface MLCLossLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject), Name = "MLCLSTMDescriptor")] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCLstmDescriptor : NSCopying { [Export ("inputSize")] @@ -1637,10 +1701,13 @@ interface MLCLstmDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer), Name = "MLCLSTMLayer")] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCLstmLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1694,10 +1761,13 @@ interface MLCLstmLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCMatMulDescriptor : NSCopying { [Export ("alpha")] @@ -1721,10 +1791,13 @@ interface MLCMatMulDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCMatMulLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1738,10 +1811,13 @@ interface MLCMatMulLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCMultiheadAttentionDescriptor : NSCopying { [Export ("modelDimension")] @@ -1780,10 +1856,13 @@ interface MLCMultiheadAttentionDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCMultiheadAttentionLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1812,10 +1891,13 @@ interface MLCMultiheadAttentionLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCPaddingLayer : NSCopying { [Export ("paddingType")] @@ -1855,10 +1937,13 @@ interface MLCPaddingLayer : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCPoolingDescriptor : NSCopying { [Export ("poolingType")] @@ -1925,10 +2010,13 @@ interface MLCPoolingDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCPoolingLayer { [Export ("descriptor", ArgumentSemantic.Copy)] @@ -1941,10 +2029,13 @@ interface MLCPoolingLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCReductionLayer { [Export ("reductionType")] @@ -1976,10 +2067,13 @@ interface MLCReductionLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCReshapeLayer { [TV (14, 5)] @@ -1998,7 +2092,6 @@ interface MLCReshapeLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCOptimizer), Name = "MLCRMSPropOptimizer")] interface MLCRmsPropOptimizer : NSCopying { @@ -2026,10 +2119,13 @@ interface MLCRmsPropOptimizer : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCOptimizer), Name = "MLCSGDOptimizer")] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCSgdOptimizer : NSCopying { [Export ("momentumScale")] @@ -2049,10 +2145,13 @@ interface MLCSgdOptimizer : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCSliceLayer { [Export ("start", ArgumentSemantic.Copy)] @@ -2076,10 +2175,13 @@ interface MLCSliceLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCSoftmaxLayer { [Export ("operation")] @@ -2099,10 +2201,13 @@ interface MLCSoftmaxLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCSplitLayer { [Export ("dimension")] @@ -2127,10 +2232,13 @@ interface MLCSplitLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCTransposeLayer { [Export ("dimensions", ArgumentSemantic.Copy)] @@ -2145,10 +2253,13 @@ interface MLCTransposeLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCUpsampleLayer { [Export ("shape", ArgumentSemantic.Copy)] @@ -2174,10 +2285,13 @@ interface MLCUpsampleLayer { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject), Name = "MLCYOLOLossDescriptor")] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCYoloLossDescriptor : NSCopying { [Export ("anchorBoxCount")] @@ -2217,9 +2331,12 @@ interface MLCYoloLossDescriptor : NSCopying { [iOS (14, 0)] [TV (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCLossLayer), Name = "MLCYOLOLossLayer")] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] [DisableDefaultCtor] interface MLCYoloLossLayer { @@ -2234,18 +2351,24 @@ interface MLCYoloLossLayer { delegate void MLCGraphCompletionHandler ([NullAllowed] MLCTensor resultTensor, [NullAllowed] NSError error, /* NSTimeInterval */ double executionTime); [TV (14, 0), iOS (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCTensorOptimizerDeviceData : NSCopying { } [TV (14, 0), iOS (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCGraph { [NullAllowed, Export ("device", ArgumentSemantic.Retain)] @@ -2334,10 +2457,13 @@ interface MLCGraph { } [TV (14, 0), iOS (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCGraph))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCTrainingGraph { [NullAllowed, Export ("optimizer", ArgumentSemantic.Retain)] @@ -2437,10 +2563,13 @@ interface MLCTrainingGraph { } [TV (14, 0), iOS (14, 0)] - [NoWatch] [MacCatalyst (14, 0)] [BaseType (typeof (MLCGraph))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCInferenceGraph { [Export ("deviceMemorySize")] @@ -2511,6 +2640,10 @@ enum MLCComparisonOperation { [MacCatalyst (14, 5)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCComparisonLayer { [Export ("operation")] @@ -2526,6 +2659,10 @@ interface MLCComparisonLayer { [MacCatalyst (14, 5)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCGatherLayer { [Export ("dimension")] @@ -2541,6 +2678,10 @@ interface MLCGatherLayer { [MacCatalyst (14, 5)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCScatterLayer { [Export ("dimension")] @@ -2560,6 +2701,10 @@ interface MLCScatterLayer { [MacCatalyst (14, 5)] [BaseType (typeof (MLCLayer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCSelectionLayer { [Static] @@ -2570,6 +2715,10 @@ interface MLCSelectionLayer { [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCPlatform { [Static] @@ -2585,6 +2734,10 @@ interface MLCPlatform { [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (MLCOptimizer))] [DisableDefaultCtor] + [Deprecated (PlatformName.MacOSX, 14, 3, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.iOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.TvOS, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] + [Deprecated (PlatformName.MacCatalyst, 17, 4, message: "Use the Metal Performance Shaders Graph or the Accelerate framework (BNNS) instead.")] interface MLCAdamWOptimizer : NSCopying { [Export ("beta1")] float Beta1 { get; } diff --git a/src/mobilecoreservices.cs b/src/mobilecoreservices.cs index 03c93df3752c..84a0ab5835cd 100644 --- a/src/mobilecoreservices.cs +++ b/src/mobilecoreservices.cs @@ -10,7 +10,6 @@ namespace MobileCoreServices { /// [Deprecated (PlatformName.iOS, 14, 0, message: "Use the 'UniformTypeIdentifiers.UTType' API instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use the 'UniformTypeIdentifiers.UTType' API instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use the 'UniformTypeIdentifiers.UTType' API instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use the 'UniformTypeIdentifiers.UTType' API instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use the 'UniformTypeIdentifiers.UTType' API instead.")] [Partial] @@ -486,14 +485,12 @@ interface UTType { [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("kUTTagClassNSPboardType", "+CoreServices")] NSString TagClassNSPboardType { get; } [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Field ("kUTTagClassOSType", "+CoreServices")] NSString TagClassOSType { get; } @@ -502,32 +499,26 @@ interface UTType { [Field ("kUTTypeSwiftSource", "+CoreServices")] NSString SwiftSource { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("kUTTypeAlembic", "ModelIO")] NSString Alembic { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("kUTType3dObject", "ModelIO")] NSString k3dObject { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("kUTTypePolygon", "ModelIO")] NSString Polygon { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("kUTTypeStereolithography", "ModelIO")] NSString Stereolithography { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("kUTTypeUniversalSceneDescription", "ModelIO")] NSString UniversalSceneDescription { get; } - [NoWatch] [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Field ("kUTTypeUniversalSceneDescriptionMobile", "ModelIO")] NSString UniversalSceneDescriptionMobile { get; } diff --git a/src/naturallanguage.cs b/src/naturallanguage.cs index 806de9260cb1..dff9761023fa 100644 --- a/src/naturallanguage.cs +++ b/src/naturallanguage.cs @@ -33,7 +33,6 @@ namespace NaturalLanguage { /// Determines the most likely language in which a text is written. - [Watch (5, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] // designated [BaseType (typeof (NSObject))] @@ -85,7 +84,6 @@ NLLanguage [] LanguageConstraints { } /// Contains a configuration for a . - [Watch (5, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface NLModelConfiguration : NSCopying, NSSecureCoding { @@ -111,7 +109,6 @@ interface NLModelConfiguration : NSCopying, NSSecureCoding { } /// Imports custom classification and tagging models into the application. - [Watch (5, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -137,14 +134,14 @@ interface NLModel { string [] GetPredictedLabels (string [] tokens); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("predictedLabelHypothesesForString:maximumCount:")] // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) NSDictionary GetNativePredictedLabelHypotheses (string @string, nuint maximumCount); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("predictedLabelHypothesesForTokens:maximumCount:")] // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) @@ -159,7 +156,6 @@ interface NLModel { delegate void NLTokenizerEnumerateContinuationHandler (NSRange tokenRange, NLTokenizerAttributes flags, out bool stop); /// Breaks a text up into semantic units. - [Watch (5, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -190,7 +186,7 @@ interface NLTokenizer { [Export ("enumerateTokensInRange:usingBlock:")] void EnumerateTokens (NSRange range, NLTokenizerEnumerateContinuationHandler handler); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("tokenRangeForRange:")] NSRange GetTokenRange (NSRange range); @@ -204,7 +200,6 @@ interface NLTokenizer { delegate void NLTaggerEnumerateTagsContinuationHandler (NSString tag, NSRange tokenRange, out bool stop); /// Analyzes text and produces an enumerable list of tags drawn from a specified set of tag schemas. - [Watch (5, 0)] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] @@ -293,29 +288,29 @@ interface NLTagger { [Wrap ("GetModels (tagScheme.GetConstant ()!)")] NLModel [] GetModels (NLTagScheme tagScheme); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("setGazetteers:forTagScheme:")] void SetGazetteers (NLGazetteer [] gazetteers, NSString tagScheme); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Wrap ("SetGazetteers (gazetteers, tagScheme.GetConstant ()!)")] void SetGazetteers (NLGazetteer [] gazetteers, NLTagScheme tagScheme); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Export ("gazetteersForTagScheme:")] NLGazetteer [] GetGazetteers (NSString tagScheme); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Wrap ("GetGazetteers (tagScheme.GetConstant ()!)")] NLGazetteer [] GetGazetteers (NLTagScheme tagScheme); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [EditorBrowsable (EditorBrowsableState.Advanced)] [Static] @@ -323,7 +318,7 @@ interface NLTagger { [Export ("requestAssetsForLanguage:tagScheme:completionHandler:")] void RequestAssets (NSString language, NSString tagScheme, Action completionHandler); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Async] @@ -331,13 +326,13 @@ interface NLTagger { void RequestAssets (NLLanguage language, NLTagScheme tagScheme, Action completionHandler); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("tagHypothesesAtIndex:unit:scheme:maximumCount:tokenRange:")] // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) NSDictionary GetNativeTagHypotheses (nuint characterIndex, NLTokenUnit unit, NSString scheme, nuint maximumCount, out NSRange tokenRange); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Internal] [Sealed] @@ -345,20 +340,19 @@ interface NLTagger { NSDictionary GetTagHypotheses (nuint characterIndex, NLTokenUnit unit, NSString scheme, nuint maximumCount, IntPtr tokenRange); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Wrap ("GetTagHypotheses (characterIndex, unit, scheme, maximumCount, IntPtr.Zero)")] // `Native` added (like existing API) because we provide a better API with manual bindings (to avoid NSNumber) NSDictionary GetNativeTagHypotheses (nuint characterIndex, NLTokenUnit unit, NSString scheme, nuint maximumCount); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("tokenRangeForRange:unit:")] NSRange GetTokenRange (NSRange range, NLTokenUnit unit); } /// Enumerates token types. - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] // only used to compare with NSString not as input/output interface NLTag { @@ -426,14 +420,14 @@ interface NLTag { NSString OrganizationName { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NLDistanceType : long { Cosine, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum NLTaggerAssetsResult : long { @@ -442,11 +436,11 @@ enum NLTaggerAssetsResult : long { Error, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate void NLEnumerateNeighborsHandler (string neighbor, /* NLDistance */ double distance, ref bool stop); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -562,27 +556,27 @@ interface NLEmbedding { bool Write (NLVectorDictionary dictionary, NLLanguage? language, nuint revision, NSUrl url, [NullAllowed] out NSError error); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("currentSentenceEmbeddingRevisionForLanguage:")] nuint GetCurrentSentenceEmbeddingRevision (NSString language); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Wrap ("GetCurrentSentenceEmbeddingRevision (language.GetConstant ()!)")] nuint GetCurrentSentenceEmbeddingRevision (NLLanguage language); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("sentenceEmbeddingForLanguage:")] [return: NullAllowed] NLEmbedding GetSentenceEmbedding (NSString language); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Wrap ("GetSentenceEmbedding (language.GetConstant ()!)")] @@ -590,14 +584,14 @@ interface NLEmbedding { NLEmbedding GetSentenceEmbedding (NLLanguage language); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("sentenceEmbeddingForLanguage:revision:")] [return: NullAllowed] NLEmbedding GetSentenceEmbedding (NSString language, nuint revision); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Wrap ("GetSentenceEmbedding (language.GetConstant ()!, revision)")] @@ -605,20 +599,20 @@ interface NLEmbedding { NLEmbedding GetSentenceEmbedding (NLLanguage language, nuint revision); [EditorBrowsable (EditorBrowsableState.Advanced)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("supportedSentenceEmbeddingRevisionsForLanguage:")] NSIndexSet GetSupportedSentenceEmbeddingRevisions (NSString language); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Wrap ("GetSupportedSentenceEmbeddingRevisions (language.GetConstant ()!)")] NSIndexSet GetSupportedSentenceEmbeddingRevisions (NLLanguage language); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -668,7 +662,7 @@ interface NLGazetteer { bool Write (NLStrongDictionary dictionary, NLLanguage? language, NSUrl url, [NullAllowed] out NSError error); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NLContextualEmbedding { @@ -729,7 +723,7 @@ interface NLContextualEmbedding { delegate void TokenVectorEnumeratorHandler (NSArray tokenVector, NSRange tokenRange, out bool stop); - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NLContextualEmbeddingResult { diff --git a/src/nearbyinteraction.cs b/src/nearbyinteraction.cs index 3b9fcf3b8d8d..f8ba3778ca4d 100644 --- a/src/nearbyinteraction.cs +++ b/src/nearbyinteraction.cs @@ -31,23 +31,23 @@ namespace NearbyInteraction { - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NIConfiguration : NSCopying, NSSecureCoding { } - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NIDiscoveryToken : NSCopying, NSSecureCoding { - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("deviceCapabilities", ArgumentSemantic.Copy)] INIDeviceCapability DeviceCapabilities { get; } } - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NIConfiguration))] [DisableDefaultCtor] @@ -58,16 +58,16 @@ interface NINearbyPeerConfiguration { [Export ("initWithPeerToken:")] NativeHandle Constructor (NIDiscoveryToken peerToken); - [NoWatch, iOS (16, 0), MacCatalyst (16, 0), NoTV, NoMac] + [iOS (16, 0), MacCatalyst (16, 0), NoTV, NoMac] [Export ("cameraAssistanceEnabled")] bool CameraAssistanceEnabled { [Bind ("isCameraAssistanceEnabled")] get; set; } - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("extendedDistanceMeasurementEnabled")] bool ExtendedDistanceMeasurementEnabled { [Bind ("isExtendedDistanceMeasurementEnabled")] get; set; } } - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -87,20 +87,20 @@ Vector3 Direction { [Field ("NINearbyObjectDistanceNotAvailable")] float DistanceNotAvailable { get; } - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Field ("NINearbyObjectAngleNotAvailable")] float AngleNotAvailable { get; } - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Export ("verticalDirectionEstimate")] NINearbyObjectVerticalDirectionEstimate VerticalDirectionEstimate { get; } - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Export ("horizontalAngle")] float HorizontalAngle { get; } } - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] interface NISession { @@ -134,16 +134,16 @@ interface NISession { void Invalidate (); [NoMacCatalyst] // We don't have ARKit bindings for Mac Catalyst (because ARKit doesn't work on Mac Catalyst), so we can't bind this method. - [NoWatch, NoTV, NoMac, iOS (16, 0)] + [NoTV, NoMac, iOS (16, 0)] [Export ("setARSession:")] void SetARSession (ARSession session); - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Export ("worldTransformForObject:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] MatrixFloat4x4 GetWorldTransform (NINearbyObject @object); - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("deviceCapabilities")] INIDeviceCapability DeviceCapabilities { get; } @@ -151,7 +151,7 @@ interface NISession { interface INISessionDelegate { } - [Watch (8, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -176,20 +176,20 @@ interface NISessionDelegate { [Export ("session:didInvalidateWithError:")] void DidSessionInvalidate (NISession session, NSError error); - [Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("session:didGenerateShareableConfigurationData:forObject:")] void DidGenerateShareableConfigurationData (NISession session, NSData shareableConfigurationData, NINearbyObject @object); - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Export ("session:didUpdateAlgorithmConvergence:forObject:")] void DidUpdateAlgorithmConvergence (NISession session, NIAlgorithmConvergence convergence, [NullAllowed] NINearbyObject @object); - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Export ("sessionDidStartRunning:")] void DidSessionStartRunning (NISession session); } - [Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NIConfiguration))] [DisableDefaultCtor] interface NINearbyAccessoryConfiguration { @@ -199,16 +199,16 @@ interface NINearbyAccessoryConfiguration { [Export ("initWithData:error:")] NativeHandle Constructor (NSData data, [NullAllowed] out NSError error); - [iOS (16, 0), NoMac, NoWatch, NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), NoMac, NoTV, MacCatalyst (16, 0)] [Export ("initWithAccessoryData:bluetoothPeerIdentifier:error:")] NativeHandle Constructor (NSData accessoryData, NSUuid identifier, [NullAllowed] out NSError error); - [iOS (16, 0), NoMac, NoWatch, NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), NoMac, NoTV, MacCatalyst (16, 0)] [Export ("cameraAssistanceEnabled")] bool CameraAssistanceEnabled { [Bind ("isCameraAssistanceEnabled")] get; set; } } - [iOS (16, 0), NoMac, Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), NoMac, NoTV, MacCatalyst (16, 0)] public enum NIAlgorithmConvergenceStatusReason { [Field ("NIAlgorithmConvergenceStatusReasonInsufficientHorizontalSweep")] InsufficientHorizontalSweep, @@ -225,7 +225,7 @@ public enum NIAlgorithmConvergenceStatusReason { interface INIDeviceCapability { } - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface NIDeviceCapability { [Abstract] @@ -240,7 +240,7 @@ interface NIDeviceCapability { [Export ("supportsCameraAssistance")] bool SupportsCameraAssistance { get; } - [Watch (10, 0), NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] #if XAMCORE_5_0 [Abstract] #endif @@ -248,7 +248,7 @@ interface NIDeviceCapability { bool SupportsExtendedDistanceMeasurement { get; } } - [Watch (9, 0), NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NIAlgorithmConvergence : NSCopying, NSSecureCoding { diff --git a/src/network.cs b/src/network.cs index 2fb619d1c594..ad8fd29b049e 100644 --- a/src/network.cs +++ b/src/network.cs @@ -7,7 +7,6 @@ namespace Network { - [Watch (6, 0)] [MacCatalyst (13, 1)] public enum NWErrorDomain { Invalid = 0, @@ -19,7 +18,6 @@ public enum NWErrorDomain { Tls = 3, } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] [Internal] @@ -34,7 +32,6 @@ partial interface NWContentContextConstants { IntPtr _DefaultStream { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] [Internal] @@ -44,7 +41,6 @@ partial interface NWConnectionConstants { IntPtr _SendIdempotentContent { get; } } - [Watch (6, 0)] [MacCatalyst (13, 1)] [Static] [Internal] @@ -57,7 +53,7 @@ partial interface NWParametersConstants { } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Internal] @@ -69,7 +65,6 @@ partial interface NWPrivacyContextConstants { [iOS (14, 2)] [TV (14, 2)] - [Watch (7, 1)] [MacCatalyst (14, 2)] // untyped `nw_path_unsatisfied_reason_t` enum enum NWPathUnsatisfiedReason { diff --git a/src/networkextension.cs b/src/networkextension.cs index aff85c8dd3a0..698c2462256d 100644 --- a/src/networkextension.cs +++ b/src/networkextension.cs @@ -178,7 +178,7 @@ enum NEFilterReportEvent : long { Statistics = 4, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Native] enum NEFilterReportFrequency : long { None, @@ -187,13 +187,13 @@ enum NEFilterReportFrequency : long { High, } - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Native] public enum NEFilterDataAttribute : long { HasIpHeader = 1, } - [Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Native] enum NEHotspotNetworkSecurityType : long { Open = 0, @@ -203,7 +203,7 @@ enum NEHotspotNetworkSecurityType : long { Unknown = 4, } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (17, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (17, 0)] [Native] [ErrorDomain ("NEVPNConnectionErrorDomain")] public enum NEVpnConnectionError : long { @@ -253,11 +253,11 @@ interface NEAppProxyFlow { void CloseWrite ([NullAllowed] NSError error); [Internal] - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("setMetadata:")] void SetMetadata (OS_nw_parameters nwparameters); - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Wrap ("SetMetadata (parameters.GetHandle ())")] void SetMetadata (NWParameters parameters); @@ -265,12 +265,12 @@ interface NEAppProxyFlow { NEFlowMetaData MetaData { get; } [Internal] - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [NullAllowed, Export ("networkInterface", ArgumentSemantic.Copy)] OS_nw_interface WeakNetworkInterface { get; set; } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] NWInterface NetworkInterface { [Wrap ("Runtime.GetINativeObject (WeakNetworkInterface, false)!")] @@ -296,7 +296,7 @@ NWInterface NetworkInterface { #endif [Async] - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("openWithLocalFlowEndpoint:completionHandler:")] void OpenWithLocalFlowEndpoint ([NullAllowed] Network.NWEndpoint localEndpoint, NEAppProxyFlowOpenCallback completionHandler); } @@ -331,7 +331,7 @@ interface NEAppProxyProvider { [Deprecated (PlatformName.MacOSX, 15, 0, message: "Call 'HandleNewUdpFlowWithInitialFlowEndPoint' instead.")] bool HandleNewUdpFlow (NEAppProxyUdpFlow flow, NWEndpoint remoteEndpoint); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("handleNewUDPFlow:initialRemoteFlowEndpoint:")] bool HandleNewUdpFlowWithInitialFlowEndPoint (NEAppProxyUdpFlow flow, Network.NWEndpoint remoteEndpoint); } @@ -372,7 +372,7 @@ interface NEAppProxyTcpFlow { [Export ("remoteEndpoint")] NWEndpoint RemoteEndpoint { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("remoteFlowEndpoint")] Network.NWEndpoint RemoteFlowEndpoint { get; } } @@ -410,17 +410,17 @@ interface NEAppProxyUdpFlow { #if NET [Async (ResultTypeName = "NEDatagramAndFlowEndpointsReadResult")] - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("readDatagramsAndFlowEndpointsWithCompletionHandler:")] void ReadDatagramsAndFlowEndpoints (NEDatagramAndFlowEndpointsRead completionHandler); #endif [Async] - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("writeDatagrams:sentByFlowEndpoints:completionHandler:")] void WriteDatagramsAndFlowEndpoints (NSData [] datagrams, Network.NWEndpoint [] flowEndpoints, NEDatagramWriteResult completionHandler); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("localFlowEndpoint"), NullAllowed] Network.NWEndpoint LocalFlowEndpoint { get; } } @@ -434,18 +434,17 @@ interface NEAppProxyUdpFlow { [DisableDefaultCtor] interface NEAppRule : NSSecureCoding, NSCopying { [MacCatalyst (13, 1)] - [NoWatch] #if NET [NoMac] #endif [Export ("initWithSigningIdentifier:")] NativeHandle Constructor (string signingIdentifier); - [NoiOS, NoWatch, NoMacCatalyst] + [NoiOS, NoMacCatalyst] [Export ("initWithSigningIdentifier:designatedRequirement:")] NativeHandle Constructor (string signingIdentifier, string designatedRequirement); - [NoiOS, NoWatch, MacCatalyst (15, 0)] + [NoiOS, MacCatalyst (15, 0)] [Export ("matchDesignatedRequirement")] string MatchDesignatedRequirement { get; } @@ -459,7 +458,7 @@ interface NEAppRule : NSSecureCoding, NSCopying { [NullAllowed, Export ("matchDomains", ArgumentSemantic.Copy)] string [] MatchDomains { get; set; } - [NoWatch, NoiOS, MacCatalyst (15, 0)] + [NoiOS, MacCatalyst (15, 0)] [NullAllowed, Export ("matchTools", ArgumentSemantic.Copy)] NEAppRule [] MatchTools { get; set; } } @@ -486,12 +485,12 @@ interface NEDnsSettings : NSSecureCoding, NSCopying { [Export ("matchDomainsNoSearch")] bool MatchDomainsNoSearch { get; set; } - [NoWatch, iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("dnsProtocol")] NEDnsProtocol DnsProtocol { get; } - [iOS (14, 0), NoTV, NoWatch] + [iOS (14, 0), NoTV] [MacCatalyst (14, 0)] [Notification] [Field ("NEDNSSettingsConfigurationDidChangeNotification")] @@ -592,7 +591,7 @@ interface NEFilterDataProvider { [Export ("resumeFlow:withVerdict:")] void ResumeFlow (NEFilterFlow flow, NEFilterVerdict verdict); - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Export ("updateFlow:usingVerdict:forDirection:")] void UpdateFlow (NEFilterSocketFlow flow, NEFilterDataVerdict verdict, NETrafficDirection direction); } @@ -604,7 +603,7 @@ interface NEFilterDataProvider { [MacCatalyst (13, 1)] [BaseType (typeof (NEFilterVerdict))] interface NEFilterDataVerdict : NSSecureCoding, NSCopying { - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Export ("statisticsReportFrequency", ArgumentSemantic.Assign)] NEFilterReportFrequency StatisticsReportFrequency { get; set; } @@ -665,7 +664,7 @@ interface NEFilterFlow : NSSecureCoding, NSCopying { [NullAllowed, Export ("sourceAppAuditToken")] NSData SourceAppAuditToken { get; } - [Mac (13, 0), NoiOS, NoMacCatalyst, NoWatch, NoTV] + [Mac (13, 0), NoiOS, NoMacCatalyst, NoTV] [NullAllowed] [Export ("sourceProcessAuditToken")] NSData SourceProcessAuditToken { get; } @@ -725,7 +724,7 @@ interface NEFilterManager { NSString ErrorDomain { get; } #endif - [NoWatch, NoTV, Mac (15, 0), NoiOS, MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), NoiOS, MacCatalyst (18, 0)] [Export ("disableEncryptedDNSSettings", ArgumentSemantic.Assign)] bool DisableEncryptedDnsSettings { get; set; } } @@ -737,7 +736,7 @@ interface NEFilterManager { [MacCatalyst (13, 1)] [BaseType (typeof (NEFilterVerdict))] interface NEFilterNewFlowVerdict : NSSecureCoding, NSCopying { - [NoWatch, NoTV, NoiOS, NoMacCatalyst] + [NoTV, NoiOS, NoMacCatalyst] [Export ("statisticsReportFrequency", ArgumentSemantic.Assign)] NEFilterReportFrequency StatisticsReportFrequency { get; set; } @@ -909,7 +908,7 @@ interface NEFlowMetaData : NSCopying, NSSecureCoding { [NullAllowed, Export ("sourceAppAuditToken")] NSData SourceAppAuditToken { get; } - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [NullAllowed, Export ("filterFlowIdentifier")] NSUuid FilterFlowIdentifier { get; } } @@ -996,7 +995,7 @@ interface NEHotspotHelperCommand { [Export ("createUDPSession:")] NWUdpSession CreateUdpSession (NWEndpoint endpoint); - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Export ("interface")] NWInterface Interface { get; } } @@ -1055,13 +1054,13 @@ interface NEHotspotNetwork { void SetPassword (string password); [Async] - [Watch (7, 0), NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("fetchCurrentWithCompletionHandler:")] void FetchCurrent (Action completionHandler); - [Watch (8, 0), NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("securityType")] NEHotspotNetworkSecurityType SecurityType { get; } } @@ -1127,7 +1126,7 @@ interface NEIPv4Settings : NSSecureCoding, NSCopying { [NullAllowed, Export ("excludedRoutes", ArgumentSemantic.Copy)] NEIPv4Route [] ExcludedRoutes { get; set; } - [NoWatch, NoTV, NoiOS, Mac (13, 0)] + [NoTV, NoiOS, Mac (13, 0)] [NoMacCatalyst] [Export ("router")] [NullAllowed] @@ -1311,7 +1310,7 @@ interface NETunnelProviderManager { [Async] void LoadAllFromPreferences (Action completionHandler); - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Static] [Export ("forPerAppVPN")] NETunnelProviderManager CreatePerAppVpn (); @@ -1323,7 +1322,7 @@ interface NETunnelProviderManager { // CopyAppRules was incorrectly bound to AppRules and it is only available on macOS #if NET || MONOMAC || __MACCATALYST__ - [NoWatch, NoTV, NoiOS, MacCatalyst (15,0)] + [NoTV, NoiOS, MacCatalyst (15,0)] [Export ("appRules", ArgumentSemantic.Copy)] NEAppRule[] AppRules { get; set; } #else @@ -1336,19 +1335,19 @@ interface NETunnelProviderManager { [Export ("routingMethod")] NETunnelProviderRoutingMethod RoutingMethod { get; } - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("safariDomains", ArgumentSemantic.Copy)] string [] SafariDomains { get; set; } - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("mailDomains", ArgumentSemantic.Copy)] string [] MailDomains { get; set; } - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("calendarDomains", ArgumentSemantic.Copy)] string [] CalendarDomains { get; set; } - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("contactsDomains", ArgumentSemantic.Copy)] string [] ContactsDomains { get; set; } @@ -1357,11 +1356,11 @@ interface NETunnelProviderManager { NSString ErrorDomain { get; } #endif - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("excludedDomains", ArgumentSemantic.Copy)] string [] ExcludedDomains { get; set; } - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("associatedDomains", ArgumentSemantic.Copy)] string [] AssociatedDomains { get; set; } } @@ -1469,7 +1468,7 @@ interface NEVpnConnection { NSString StatusDidChangeNotification { get; } [Async] - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("fetchLastDisconnectErrorWithCompletionHandler:")] void FetchLastDisconnectError (Action handler); } @@ -1533,15 +1532,15 @@ interface NEVpnProtocol : NSCopying, NSSecureCoding { [Export ("excludeLocalNetworks")] bool ExcludeLocalNetworks { get; set; } - [NoWatch, NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] [Export ("excludeCellularServices")] bool ExcludeCellularServices { get; set; } - [NoWatch, NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] [Export ("excludeAPNs")] bool ExcludeApns { get; set; } - [NoWatch, NoTV, Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Export ("excludeDeviceCommunication")] bool ExcludeDeviceCommunication { get; set; } @@ -1551,7 +1550,7 @@ interface NEVpnProtocol : NSCopying, NSSecureCoding { [Export ("enforceRoutes")] bool EnforceRoutes { get; set; } - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Export ("sliceUUID", ArgumentSemantic.Copy), NullAllowed] string SliceUuid { get; set; } } @@ -1659,12 +1658,12 @@ interface NEVpnProtocolIke2 { [Export ("enableFallback")] bool EnableFallback { get; set; } - [NoWatch, iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("mtu")] nuint Mtu { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("ppkConfiguration", ArgumentSemantic.Copy), NullAllowed] NEVpnIkev2PpkConfiguration PpkConfiguration { get; set; } } @@ -1858,7 +1857,7 @@ interface NWPath { [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'Network.NWPath.IsConstrained' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'Network.NWPath.IsConstrained' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'Network.NWPath.IsConstrained' instead.")] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("constrained")] bool Constrained { [Bind ("isConstrained")] get; } @@ -2231,16 +2230,16 @@ int SocketProtocol { } [NullAllowed] - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("remoteHostname")] string RemoteHostname { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("localFlowEndpoint"), NullAllowed] Network.NWEndpoint LocalFlowEndpoint { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("remoteFlowEndpoint"), NullAllowed] Network.NWEndpoint RemoteFlowEndpoint { get; } } @@ -2348,7 +2347,7 @@ interface NEPacketTunnelProvider { [Export ("createUDPSessionThroughTunnelToEndpoint:fromEndpoint:")] NWUdpSession CreateUdpSession (NWEndpoint remoteEndpoint, [NullAllowed] NWHostEndpoint localEndpoint); - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("virtualInterface"), NullAllowed] NWInterface VirtualInterface { get; } } @@ -2468,7 +2467,7 @@ interface NEDnsProxyProvider { [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'HandleNewUdpFlowWithInitialFlowEndPoint' instead.")] bool HandleNewUdpFlow (NEAppProxyUdpFlow flow, NWEndpoint remoteEndpoint); - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("handleNewUDPFlow:initialRemoteFlowEndpoint:")] bool HandleNewUdpFlowWithInitialFlowEndPoint (NEAppProxyUdpFlow flow, Network.NWEndpoint remoteEndpoint); } @@ -2632,13 +2631,13 @@ interface NEHotspotConfigurationManager { #if NET // Headers say this method is available on Mac Catalyst, but the AccessorySetupKit framework (thus the ASAccessory type) is not, so we can't expose it in Mac Catalyst for now. - [NoWatch, NoTV, NoMac, iOS (18, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (18, 0), NoMacCatalyst] [Async] [Export ("joinAccessoryHotspot:passphrase:completionHandler:")] void JoinAccessoryHotspot (ASAccessory accessory, string passphrase, [NullAllowed] NEHotspotConfigurationManagerJoinHotspotCallback completionHandler); // Headers say this method is available on Mac Catalyst, but the AccessorySetupKit framework (thus the ASAccessory type) is not, so we can't expose it in Mac Catalyst for now. - [NoWatch, NoTV, NoMac, iOS (18, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (18, 0), NoMacCatalyst] [Async] [Export ("joinAccessoryHotspotWithoutSecurity:completionHandler:")] void JoinAccessoryHotspotWithoutSecurit (ASAccessory accessory, [NullAllowed] NEHotspotConfigurationManagerJoinHotspotCallback completionHandler); @@ -2684,23 +2683,23 @@ interface NENetworkRule : NSSecureCoding, NSCopying { [Export ("matchDirection")] NETrafficDirection MatchDirection { get; } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("initWithDestinationNetworkEndpoint:prefix:protocol:")] NativeHandle Constructor (Network.NWEndpoint networkEndpoint, nuint destinationPrefix, NENetworkRuleProtocol protocol); - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("initWithDestinationHostEndpoint:protocol:")] NativeHandle Constructor (Network.NWEndpoint hostEndpoint, NENetworkRuleProtocol protocol); - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("initWithRemoteNetworkEndpoint:remotePrefix:localNetworkEndpoint:localPrefix:protocol:direction:")] NativeHandle Constructor ([NullAllowed] Network.NWEndpoint remoteNetwork, nuint remotePrefix, [NullAllowed] Network.NWEndpoint localNetwork, nuint localPrefix, NENetworkRuleProtocol protocol, NETrafficDirection direction); - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("matchRemoteHostOrNetworkEndpoint"), NullAllowed] Network.NWEndpoint MatchRemoteHostOrNetworkEndpoint { get; } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("matchLocalNetworkEndpoint"), NullAllowed] Network.NWEndpoint MatchLocalNetworkEndpoint { get; } } @@ -2793,8 +2792,7 @@ interface NETransparentProxyNetworkSettings { NENetworkRule [] ExcludedNetworkRules { get; set; } } - [NoTV] - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] interface NEAppPushManager { @@ -2842,12 +2840,12 @@ interface NEAppPushManager { [Export ("active")] bool Active { [Bind ("isActive")] get; } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("matchPrivateLTENetworks", ArgumentSemantic.Copy)] NEPrivateLteNetwork [] MatchPrivateLteNetworks { get; set; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NEProvider))] [DisableDefaultCtor] // init returns nil @@ -2869,19 +2867,19 @@ interface NEAppPushProvider { [Export ("reportIncomingCallWithUserInfo:")] void ReportIncomingCall (NSDictionary userInfo); - [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (16, 4)] + [NoTV, NoMacCatalyst, NoMac, iOS (16, 4)] [Export ("reportPushToTalkMessageWithUserInfo:")] void ReportPushToTalkMessage (NSDictionary userInfo); [Export ("handleTimerEvent")] void HandleTimerEvent (); - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Export ("start")] void Start (); } - [NoWatch, iOS (14, 0), TV (17, 0)] + [iOS (14, 0), TV (17, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NEDnsSettings), Name = "NEDNSOverHTTPSSettings")] interface NEDnsOverHttpsSettings { @@ -2889,13 +2887,13 @@ interface NEDnsOverHttpsSettings { [Export ("serverURL", ArgumentSemantic.Copy)] NSUrl ServerUrl { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("identityReference", ArgumentSemantic.Copy)] [NullAllowed] NSData IdentityReference { get; set; } } - [NoWatch, iOS (14, 0), TV (17, 0)] + [iOS (14, 0), TV (17, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NEDnsSettings), Name = "NEDNSOverTLSSettings")] interface NEDnsOverTlsSettings { @@ -2903,13 +2901,13 @@ interface NEDnsOverTlsSettings { [Export ("serverName")] string ServerName { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("identityReference", ArgumentSemantic.Copy)] [NullAllowed] NSData IdentityReference { get; set; } } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject), Name = "NEDNSSettingsManager")] @@ -2948,7 +2946,7 @@ interface NEDnsSettingsManager { interface INEAppPushDelegate { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -2965,13 +2963,12 @@ interface NEAppPushDelegate { [NoMacCatalyst] [NoiOS] [NoTV] - [NoWatch] [BaseType (typeof (NEAppProxyProvider))] [DisableDefaultCtor] // `init` returns `nil` interface NETransparentProxyProvider { } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "NEPrivateLTENetwork")] interface NEPrivateLteNetwork : NSCopying, NSSecureCoding { [Export ("mobileCountryCode")] @@ -2985,14 +2982,14 @@ interface NEPrivateLteNetwork : NSCopying, NSSecureCoding { string TrackingAreaCode { get; set; } } - [NoWatch, NoTV, NoiOS, Mac (13, 0)] + [NoTV, NoiOS, Mac (13, 0)] [NoMacCatalyst] [BaseType (typeof (NEPacketTunnelProvider))] [DisableDefaultCtor] interface NEEthernetTunnelProvider { } - [NoWatch, NoTV, NoiOS, Mac (13, 0)] + [NoTV, NoiOS, Mac (13, 0)] [NoMacCatalyst] [BaseType (typeof (NEPacketTunnelNetworkSettings))] interface NEEthernetTunnelNetworkSettings { @@ -3003,7 +3000,7 @@ interface NEEthernetTunnelNetworkSettings { string EthernetAddress { get; } } - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface NERelay : NSCopying, NSSecureCoding { [NullAllowed, Export ("HTTP3RelayURL", ArgumentSemantic.Copy)] @@ -3042,7 +3039,7 @@ interface NERelay : NSCopying, NSSecureCoding { delegate void NERelayManagerGetLastClientErrorsCallback ([NullAllowed] NSError [] errors); - [TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface NERelayManager { [Static] @@ -3084,13 +3081,13 @@ interface NERelayManager { [Async] void LoadAllManagersFromPreferences (Action, NSError> completionHandler); - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("getLastClientErrors:completionHandler:")] [Async] void GetLastClientErrors (double seconds, NERelayManagerGetLastClientErrorsCallback completionHandler); } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [ErrorDomain ("NERelayClientErrorDomain")] [Native] enum NERelayManagerClientError : long { @@ -3106,7 +3103,7 @@ enum NERelayManagerClientError : long { Other = 10, } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "NEVPNIKEv2PPKConfiguration")] interface NEVpnIkev2PpkConfiguration : NSCopying { [Export ("initWithIdentifier:keychainReference:")] diff --git a/src/oslog.cs b/src/oslog.cs index 7964cee87853..5b7c09976f60 100644 --- a/src/oslog.cs +++ b/src/oslog.cs @@ -9,7 +9,7 @@ namespace OSLog { - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] enum OSLogEntryLogLevel : long { Undefined, @@ -20,7 +20,7 @@ enum OSLogEntryLogLevel : long { Fault, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] enum OSLogEntrySignpostType : long { Undefined, @@ -29,7 +29,7 @@ enum OSLogEntrySignpostType : long { Event, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] enum OSLogEntryStoreCategory : long { Undefined, @@ -43,14 +43,14 @@ enum OSLogEntryStoreCategory : long { LongTerm30, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] enum OSLogEnumeratorOptions : ulong { Reverse = 0x1, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] enum OSLogMessageComponentArgumentCategory : long { Undefined, @@ -61,15 +61,21 @@ enum OSLogMessageComponentArgumentCategory : long { UInt64, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] enum OSLogStoreScope : long { +#if XAMCORE_5_0 + [NoTV, NoiOS, NoMacCatalyst] +#endif +#if !MONOMAC + [Obsolete ("Not available on the current platform.")] +#endif System = 0, CurrentProcessIdentifier = 1, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Protocol] interface OSLogEntryFromProcess { @@ -94,7 +100,7 @@ interface OSLogEntryFromProcess { ulong ThreadIdentifier { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Protocol] interface OSLogEntryWithPayload { @@ -115,7 +121,7 @@ interface OSLogEntryWithPayload { string Subsystem { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface OSLogEntry { @@ -130,7 +136,7 @@ interface OSLogEntry { OSLogEntryStoreCategory StoreCategory { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (OSLogEntry))] [DisableDefaultCtor] interface OSLogEntryActivity : OSLogEntryFromProcess { @@ -139,13 +145,13 @@ interface OSLogEntryActivity : OSLogEntryFromProcess { ulong ParentActivityIdentifier { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (OSLogEntry))] [DisableDefaultCtor] interface OSLogEntryBoundary { } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (OSLogEntry))] [DisableDefaultCtor] interface OSLogEntryLog : OSLogEntryFromProcess, OSLogEntryWithPayload { @@ -154,7 +160,7 @@ interface OSLogEntryLog : OSLogEntryFromProcess, OSLogEntryWithPayload { OSLogEntryLogLevel Level { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (OSLogEntry))] [DisableDefaultCtor] interface OSLogEntrySignpost : OSLogEntryFromProcess, OSLogEntryWithPayload { @@ -169,13 +175,13 @@ interface OSLogEntrySignpost : OSLogEntryFromProcess, OSLogEntryWithPayload { OSLogEntrySignpostType SignpostType { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSEnumerator))] [DisableDefaultCtor] interface OSLogEnumerator { } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface OSLogMessageComponent : NSSecureCoding { @@ -208,22 +214,22 @@ interface OSLogMessageComponent : NSSecureCoding { ulong ArgumentUInt64Value { get; } } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface OSLogPosition { } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // init was added only on macos 12 interface OSLogStore { - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("init")] NativeHandle Constructor (); - [NoWatch, NoTV, NoiOS, MacCatalyst (15, 0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Static] [Export ("localStoreAndReturnError:")] [return: NullAllowed] diff --git a/src/passkit.cs b/src/passkit.cs index 01433a511b5d..dfbdcac5c1bc 100644 --- a/src/passkit.cs +++ b/src/passkit.cs @@ -61,14 +61,13 @@ interface PKContact : NSSecureCoding { [NoMac] [Deprecated (PlatformName.iOS, 10, 3, message: "Use 'SubLocality' and 'SubAdministrativeArea' on 'PostalAddress' instead.")] - [Deprecated (PlatformName.WatchOS, 3, 2, message: "Use 'SubLocality' and 'SubAdministrativeArea' on 'PostalAddress' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SubLocality' and 'SubAdministrativeArea' on 'PostalAddress' instead.")] [NullAllowed, Export ("supplementarySubLocality", ArgumentSemantic.Strong)] string SupplementarySubLocality { get; set; } } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] delegate void PKPassLibrarySignDataCompletionHandler (NSData signedData, NSData signature, NSError error); @@ -128,20 +127,18 @@ interface PKPassLibrary { [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElementPassActivationAvailable' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElementPassActivationAvailable' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SecureElementPassActivationAvailable' instead.")] [Export ("isPaymentPassActivationAvailable")] bool IsLibraryPaymentPassActivationAvailable { get; } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("secureElementPassActivationAvailable")] bool SecureElementPassActivationAvailable { [Bind ("isSecureElementPassActivationAvailable")] get; } [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'ActivateSecureElementPass' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ActivateSecureElementPass' instead.")] [Async] @@ -149,13 +146,12 @@ interface PKPassLibrary { void ActivatePaymentPass (PKPaymentPass paymentPass, NSData activationData, [NullAllowed] Action completion); [Async] - [NoWatch, iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("activateSecureElementPass:withActivationData:completion:")] void ActivateSecureElementPass (PKSecureElementPass secureElementPass, NSData activationData, [NullAllowed] Action completion); [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'ActivatePaymentPass (PKPaymentPass, NSData, Action completion)' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ActivatePaymentPass (PKPaymentPass, NSData, Action completion)' instead.")] @@ -163,20 +159,18 @@ interface PKPassLibrary { [Export ("activatePaymentPass:withActivationCode:completion:")] void ActivatePaymentPass (PKPaymentPass paymentPass, string activationCode, [NullAllowed] Action completion); - [NoWatch] [MacCatalyst (13, 1)] [Export ("openPaymentSetup")] void OpenPaymentSetup (); [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'CanAddSecureElementPass' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'CanAddSecureElementPass' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CanAddSecureElementPass' instead.")] [Export ("canAddPaymentPassWithPrimaryAccountIdentifier:")] bool CanAddPaymentPass (string primaryAccountIdentifier); - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("canAddSecureElementPassWithPrimaryAccountIdentifier:")] bool CanAddSecureElementPass (string primaryAccountIdentifier); @@ -185,13 +179,11 @@ interface PKPassLibrary { [Export ("canAddFelicaPass")] bool CanAddFelicaPass { get; } - [Watch (10, 2)] [MacCatalyst (13, 1)] [Static] [Export ("endAutomaticPassPresentationSuppressionWithRequestToken:")] void EndAutomaticPassPresentationSuppression (nuint requestToken); - [Watch (10, 2)] [MacCatalyst (13, 1)] [Static] [Export ("isSuppressingAutomaticPassPresentation")] @@ -199,18 +191,16 @@ interface PKPassLibrary { [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'RemoteSecureElementPasses' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'RemoteSecureElementPasses' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'RemoteSecureElementPasses' instead.")] [Export ("remotePaymentPasses")] PKPaymentPass [] RemotePaymentPasses { get; } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("remoteSecureElementPasses", ArgumentSemantic.Copy)] PKSecureElementPass [] RemoteSecureElementPasses { get; } - [Watch (10, 2)] [MacCatalyst (13, 1)] [Static] [Export ("requestAutomaticPassPresentationSuppressionWithResponseHandler:")] @@ -218,30 +208,29 @@ interface PKPassLibrary { [NoMac] [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'PresentSecureElementPass' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PresentSecureElementPass' instead.")] [Export ("presentPaymentPass:")] void PresentPaymentPass (PKPaymentPass pass); - [NoWatch, iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("presentSecureElementPass:")] void PresentSecureElementPass (PKSecureElementPass pass); [Async (ResultTypeName = "PKSignDataCompletionResult")] - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("signData:withSecureElementPass:completion:")] void SignData (NSData signData, PKSecureElementPass secureElementPass, PKPassLibrarySignDataCompletionHandler completion); [Async (ResultTypeName = "PKServiceProviderDataCompletionResult")] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("serviceProviderDataForSecureElementPass:completion:")] void GetServiceProviderData (PKSecureElementPass secureElementPass, Action completion); [Async] - [Watch (9, 0), iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0), NoTV] + [iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0), NoTV] [Export ("encryptedServiceProviderDataForSecureElementPass:completion:")] void GetEncryptedServiceProviderData (PKSecureElementPass secureElementPass, Action completion); } @@ -265,7 +254,7 @@ interface PKPassLibraryUserInfoKey { [Field ("PKPassLibrarySerialNumberUserInfoKey")] NSString SerialNumber { get; } - [Watch (8, 3), iOS (15, 2), Mac (12, 1), MacCatalyst (15, 2)] + [iOS (15, 2), Mac (12, 1), MacCatalyst (15, 2)] [Field ("PKPassLibraryRecoveredPassesUserInfoKey")] NSString RecoveredPasses { get; } } @@ -281,7 +270,6 @@ interface PKPayment { [NoMac] [NoMacCatalyst] - [NoWatch] [Export ("billingAddress", ArgumentSemantic.Assign)] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'BillingContact' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'BillingContact' instead.")] @@ -289,7 +277,6 @@ interface PKPayment { [NoMac] [NoMacCatalyst] - [NoWatch] [Export ("shippingAddress", ArgumentSemantic.Assign)] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'ShippingContact' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ShippingContact' instead.")] @@ -308,7 +295,6 @@ interface PKPayment { PKContact BillingContact { get; } } -#if !WATCH /// Delegate called when the user has selected a shipping address. delegate void PKPaymentShippingAddressSelected (PKPaymentAuthorizationStatus status, PKShippingMethod [] shippingMethods, PKPaymentSummaryItem [] summaryItems); /// Delegate called when the user has selected a shipping method. @@ -404,14 +390,13 @@ interface PKPaymentAuthorizationViewControllerDelegate { [EventArgs ("PKPaymentRequestPaymentMethodUpdate")] void DidSelectPaymentMethod2 (PKPaymentAuthorizationViewController controller, PKPaymentMethod paymentMethod, Action completion); - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("paymentAuthorizationViewController:didRequestMerchantSessionUpdate:")] [EventArgs ("PKPaymentRequestMerchantSessionUpdate")] void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationViewController controller, Action updateHandler); - [NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("paymentAuthorizationViewController:didChangeCouponCode:handler:")] [EventArgs ("PKPaymentRequestCouponCodeUpdate")] void DidChangeCouponCode (PKPaymentAuthorizationViewController controller, string couponCode, Action completion); @@ -428,7 +413,7 @@ interface PKPaymentAuthorizationViewController { [Export ("initWithPaymentRequest:")] NativeHandle Constructor (PKPaymentRequest request); - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("initWithDisbursementRequest:")] NativeHandle Constructor (PKDisbursementRequest request); @@ -449,24 +434,27 @@ interface PKPaymentAuthorizationViewController { [MacCatalyst (13, 1)] [Static] [Export ("canMakePaymentsUsingNetworks:capabilities:")] +#if XAMCORE_5_0 + bool CanMakePaymentsUsingNetworks (string [] supportedNetworks, PKMerchantCapability capabilities); +#else bool CanMakePaymentsUsingNetworks (string [] supportedNetworks, PKMerchantCapability capabilties); +#endif - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("supportsDisbursements")] bool SupportsDisbursements (); - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("supportsDisbursementsUsingNetworks:")] bool SupportsDisbursements (string [] supportedNetworks); - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("supportsDisbursementsUsingNetworks:capabilities:")] bool SupportsDisbursements (string [] supportedNetworks, PKMerchantCapability capabilities); } -#endif /// A summary item (such as grand total, tax, or discounts) within a payment request. /// @@ -509,7 +497,7 @@ interface PKShippingMethod { [Export ("detail")] string Detail { get; set; } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed] [Export ("dateComponentsRange", ArgumentSemantic.Copy)] PKDateComponentsRange DateComponentsRange { get; set; } @@ -544,21 +532,20 @@ interface PKPaymentRequest { [Export ("currencyCode")] string CurrencyCode { get; set; } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("supportsCouponCode")] bool SupportsCouponCode { get; set; } [NullAllowed] - [NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("couponCode")] string CouponCode { get; set; } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("shippingContactEditingMode", ArgumentSemantic.Assign)] PKShippingContactEditingMode ShippingContactEditingMode { get; set; } [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'RequiredBillingContactFields' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'RequiredBillingContactFields' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'RequiredBillingContactFields' instead.")] @@ -567,7 +554,6 @@ interface PKPaymentRequest { [NoMac] [NoMacCatalyst] - [NoWatch] [NullAllowed] // by default this property is null [Export ("billingAddress", ArgumentSemantic.Assign)] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'BillingContact' instead.")] @@ -575,7 +561,6 @@ interface PKPaymentRequest { ABRecord BillingAddress { get; set; } [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'RequiredShippingContactFields' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'RequiredShippingContactFields' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'RequiredShippingContactFields' instead.")] @@ -584,7 +569,6 @@ interface PKPaymentRequest { [NoMac] [NoMacCatalyst] - [NoWatch] [NullAllowed] // by default this property is null [Export ("shippingAddress", ArgumentSemantic.Assign)] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'ShippingContact' instead.")] @@ -666,38 +650,38 @@ interface PKPaymentRequest { [Export ("paymentShippingAddressUnserviceableErrorWithLocalizedDescription:")] NSError CreatePaymentShippingAddressUnserviceableError ([NullAllowed] string localizedDescription); - [NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("paymentCouponCodeInvalidErrorWithLocalizedDescription:")] NSError GetCouponCodeInvalidError ([NullAllowed] string localizedDescription); - [NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("paymentCouponCodeExpiredErrorWithLocalizedDescription:")] NSError GetCouponCodeExpiredError ([NullAllowed] string localizedDescription); - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("multiTokenContexts", ArgumentSemantic.Copy)] PKPaymentTokenContext [] MultiTokenContexts { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [NullAllowed, Export ("recurringPaymentRequest", ArgumentSemantic.Strong)] PKRecurringPaymentRequest RecurringPaymentRequest { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [NullAllowed, Export ("automaticReloadPaymentRequest", ArgumentSemantic.Strong)] PKAutomaticReloadPaymentRequest AutomaticReloadPaymentRequest { get; set; } [NullAllowed] - [NoWatch, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4), NoTV] + [Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4), NoTV] [Export ("deferredPaymentRequest", ArgumentSemantic.Strong)] PKDeferredPaymentRequest DeferredPaymentRequest { get; set; } - [iOS (17, 0), Mac (14, 0), Watch (10, 0), NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (14, 0), NoTV, MacCatalyst (17, 0)] [Export ("applePayLaterAvailability", ArgumentSemantic.Assign)] PKApplePayLaterAvailability ApplePayLaterAvailability { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("merchantCategoryCode", ArgumentSemantic.Assign)] PKMerchantCategoryCode MerchantCategoryCode { get; set; } } @@ -734,7 +718,6 @@ enum PKContactFields { interface PKPaymentToken { [NoMac] - [NoWatch] [Export ("paymentInstrumentName", ArgumentSemantic.Copy)] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'PaymentMethod' instead.")] [MacCatalyst (13, 1)] @@ -742,7 +725,6 @@ interface PKPaymentToken { string PaymentInstrumentName { get; } [NoMac] - [NoWatch] [Export ("paymentNetwork")] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'PaymentMethod' instead.")] [MacCatalyst (13, 1)] @@ -764,7 +746,6 @@ interface PKPaymentToken { /// /// Apple documentation for PKAddPassesViewController [NoMac] // under `TARGET_OS_IPHONE` - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (PKAddPassesViewControllerDelegate) })] // invalid null handle for default 'init' @@ -809,7 +790,6 @@ interface IPKAddPassesViewControllerDelegate { } /// /// Apple documentation for PKAddPassesViewControllerDelegate [NoMac] // under `TARGET_OS_IPHONE` - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -822,7 +802,6 @@ interface PKAddPassesViewControllerDelegate { /// Used to hold card data being inserted into Apple Pay. /// /// Apple documentation for PKAddPaymentPassRequest - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // designated @@ -847,7 +826,6 @@ interface PKAddPaymentPassRequest : NSSecureCoding { /// Holds configuration data needed by a . /// /// Apple documentation for PKAddPaymentPassRequestConfiguration - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -865,7 +843,6 @@ interface PKAddPaymentPassRequestConfiguration : NSSecureCoding { [NullAllowed, Export ("primaryAccountSuffix")] string PrimaryAccountSuffix { get; set; } - [NoWatch] // Radar: https://trello.com/c/MvaHEZlc [MacCatalyst (13, 1)] [Export ("cardDetails", ArgumentSemantic.Copy)] PKLabeledValue [] CardDetails { get; set; } @@ -879,7 +856,6 @@ interface PKAddPaymentPassRequestConfiguration : NSSecureCoding { [NullAllowed, Export ("paymentNetwork")] string PaymentNetwork { get; set; } - [NoWatch] // Radar: https://trello.com/c/MvaHEZlc [MacCatalyst (13, 1)] [Export ("requiresFelicaSecureElement")] bool RequiresFelicaSecureElement { get; set; } @@ -888,7 +864,6 @@ interface PKAddPaymentPassRequestConfiguration : NSSecureCoding { [Export ("style", ArgumentSemantic.Assign)] PKAddPaymentPassStyle Style { get; set; } - [NoWatch] // https://feedbackassistant.apple.com/feedback/6301809 https://github.com/xamarin/maccore/issues/1819 [iOS (12, 3)] [MacCatalyst (13, 1)] [Export ("productIdentifiers", ArgumentSemantic.Copy)] @@ -899,7 +874,6 @@ interface PKAddPaymentPassRequestConfiguration : NSSecureCoding { /// /// Apple documentation for PKAddPaymentPassViewController [NoMac] // under `#if TARGET_OS_IPHONE` - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] @@ -937,7 +911,6 @@ interface IPKAddPaymentPassViewControllerDelegate { } /// Delegate object for whose members are called when prompting for an add payment request and when an has failed. /// /// Apple documentation for PKAddPaymentPassViewControllerDelegate - [NoWatch] [NoMac] // under `#if TARGET_OS_IPHONE` [MacCatalyst (13, 1)] [Protocol, Model] @@ -964,7 +937,6 @@ interface PKPass : NSSecureCoding, NSCopying { [NullAllowed, Export ("authenticationToken", ArgumentSemantic.Copy)] string AuthenticationToken { get; } - [NoWatch] [NoMac] [NoMacCatalyst] [Export ("icon", ArgumentSemantic.Copy)] @@ -989,7 +961,6 @@ interface PKPass : NSSecureCoding, NSCopying { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'RelevantDates' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'RelevantDates' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'RelevantDates' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'RelevantDates' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'RelevantDates' instead.")] [NullAllowed, Export ("relevantDate", ArgumentSemantic.Copy)] NSDate RelevantDate { get; } @@ -1018,14 +989,13 @@ interface PKPass : NSSecureCoding, NSCopying { PKPassType PassType { get; } [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElementPass' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElementPass' instead.")] [NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SecureElementPass' instead.")] [Export ("paymentPass")] PKPaymentPass PaymentPass { get; } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [NullAllowed, Export ("secureElementPass")] PKSecureElementPass SecureElementPass { get; } @@ -1038,7 +1008,7 @@ interface PKPass : NSSecureCoding, NSCopying { [Export ("deviceName")] string DeviceName { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("relevantDates", ArgumentSemantic.Copy)] PKPassRelevantDate [] RelevantDates { get; } } @@ -1059,19 +1029,18 @@ interface PKPaymentMethod : NSSecureCoding { PKPaymentMethodType Type { get; } [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'SecureElementPass' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'SecureElementPass' instead.")] [NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SecureElementPass' instead.")] [NullAllowed, Export ("paymentPass", ArgumentSemantic.Copy)] PKPaymentPass PaymentPass { get; } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [NullAllowed, Export ("secureElementPass", ArgumentSemantic.Copy)] PKSecureElementPass SecureElementPass { get; } - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("billingAddress", ArgumentSemantic.Copy)] CNContact BillingAddress { get; } @@ -1085,7 +1054,6 @@ interface PKPaymentMethod : NSSecureCoding { interface PKPaymentPass { [Deprecated (PlatformName.iOS, 13, 4, message: "Use 'PKSecureElementPass.PassActivationState' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 2, message: "Use 'PKSecureElementPass.PassActivationState' instead.")] [NoMac] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'PKSecureElementPass.PassActivationState' instead.")] @@ -1110,7 +1078,6 @@ interface PKPaymentNetwork { NSString Amex { get; } [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'CartesBancaires' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'CartesBancaires' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CartesBancaires' instead.")] @@ -1118,14 +1085,12 @@ interface PKPaymentNetwork { NSString CarteBancaire { get; } [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 2, message: "Use 'CartesBancaires' instead.")] [Deprecated (PlatformName.iOS, 11, 2, message: "Use 'CartesBancaires' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'CartesBancaires' instead.")] [Field ("PKPaymentNetworkCarteBancaires")] NSString CarteBancaires { get; } - [Watch (4, 2)] [MacCatalyst (13, 1)] [Field ("PKPaymentNetworkCartesBancaires")] NSString CartesBancaires { get; } @@ -1134,7 +1099,7 @@ interface PKPaymentNetwork { [Field ("PKPaymentNetworkChinaUnionPay")] NSString ChinaUnionPay { get; } - [Watch (8, 5), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] + [Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] [Field ("PKPaymentNetworkDankort")] NSString Dankort { get; } @@ -1172,96 +1137,86 @@ interface PKPaymentNetwork { [Field ("PKPaymentNetworkIDCredit")] NSString IDCredit { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("PKPaymentNetworkElectron")] NSString Electron { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("PKPaymentNetworkMaestro")] NSString Maestro { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("PKPaymentNetworkVPay")] NSString VPay { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("PKPaymentNetworkEftpos")] NSString Eftpos { get; } - [Watch (5, 1, 2)] [MacCatalyst (13, 1)] [Field ("PKPaymentNetworkElo")] NSString Elo { get; } - [Watch (5, 1, 2)] [MacCatalyst (13, 1)] [Field ("PKPaymentNetworkMada")] NSString Mada { get; } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("PKPaymentNetworkBarcode")] NSString Barcode { get; } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("PKPaymentNetworkGirocard")] NSString Girocard { get; } - [Watch (7, 4)] [iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("PKPaymentNetworkMir")] NSString Mir { get; } - [Watch (9, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Field ("PKPaymentNetworkNanaco")] NSString Nanaco { get; } - [Watch (9, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] [Field ("PKPaymentNetworkPostFinance")] NSString PKPaymentNetworkPostFinance { get; } - [Watch (9, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Field ("PKPaymentNetworkWaon")] NSString Waon { get; } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("PKPaymentNetworkBancomat")] NSString Bancomat { get; } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [Field ("PKPaymentNetworkBancontact")] NSString Bancontact { get; } - [iOS (17, 0), Mac (14, 0), Watch (10, 0), NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (14, 0), NoTV, MacCatalyst (17, 0)] [Field ("PKPaymentNetworkPagoBancomat")] NSString PagoBancomat { get; } - [iOS (17, 0), Mac (14, 0), Watch (10, 0), NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (14, 0), NoTV, MacCatalyst (17, 0)] [Field ("PKPaymentNetworkTmoney")] NSString Tmoney { get; } - [Watch (10, 4), Mac (14, 4), iOS (17, 4), NoTV, MacCatalyst (17, 4)] + [Mac (14, 4), iOS (17, 4), NoTV, MacCatalyst (17, 4)] [Field ("PKPaymentNetworkMeeza")] NSString Meeza { get; } - [Watch (10, 5), Mac (14, 5), iOS (17, 5), NoTV, MacCatalyst (17, 5)] + [Mac (14, 5), iOS (17, 5), NoTV, MacCatalyst (17, 5)] [Field ("PKPaymentNetworkBankAxept")] NSString BankAxept { get; } - [Watch (10, 5), Mac (14, 5), iOS (17, 5), NoTV, MacCatalyst (17, 5)] + [Mac (14, 5), iOS (17, 5), NoTV, MacCatalyst (17, 5)] [Field ("PKPaymentNetworkNAPAS")] NSString Napas { get; } } -#if !WATCH /// A button used to activate an Apple Pay payment. Available styles and types are defined by and . /// /// Apple documentation for PKPaymentButton @@ -1305,7 +1260,6 @@ interface PKAddPassButton { [Export ("addPassButtonStyle", ArgumentSemantic.Assign)] PKAddPassButtonStyle Style { get; set; } } -#endif // !WATCH /// Defines the constant string . [MacCatalyst (13, 1)] @@ -1339,7 +1293,11 @@ interface PKPaymentAuthorizationController { [Static] [Export ("canMakePaymentsUsingNetworks:capabilities:")] +#if XAMCORE_5_0 + bool CanMakePaymentsUsingNetworks (string [] supportedNetworks, PKMerchantCapability capabilities); +#else bool CanMakePaymentsUsingNetworks (string [] supportedNetworks, PKMerchantCapability capabilties); +#endif [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] IPKPaymentAuthorizationControllerDelegate Delegate { get; set; } @@ -1356,22 +1314,22 @@ interface PKPaymentAuthorizationController { [Export ("dismissWithCompletion:")] void Dismiss ([NullAllowed] Action completion); - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("supportsDisbursements")] bool SupportsDisbursements (); - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("supportsDisbursementsUsingNetworks:")] bool SupportsDisbursements (string [] supportedNetworks); - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("supportsDisbursementsUsingNetworks:capabilities:")] bool SupportsDisbursements (string [] supportedNetworks, PKMerchantCapability capabilities); - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("initWithDisbursementRequest:")] NativeHandle Constructor (PKDisbursementRequest request); } @@ -1395,7 +1353,6 @@ interface IPKPaymentAuthorizationControllerDelegate { } interface PKPaymentAuthorizationControllerDelegate { [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'DidAuthorizePayment' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'DidAuthorizePayment' overload with the 'Action' parameter instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'DidAuthorizePayment' overload with the 'Action' parameter instead.")] @@ -1417,7 +1374,6 @@ interface PKPaymentAuthorizationControllerDelegate { void WillAuthorizePayment (PKPaymentAuthorizationController controller); [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'DidSelectShippingMethod' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'DidSelectShippingMethod' overload with the 'Action' parameter instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'DidSelectShippingMethod' overload with the 'Action' parameter instead.")] @@ -1429,7 +1385,6 @@ interface PKPaymentAuthorizationControllerDelegate { void DidSelectShippingMethod (PKPaymentAuthorizationController controller, PKPaymentMethod paymentMethod, Action completion); [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'DidSelectShippingContact' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'DidSelectShippingContact' overload with the 'Action' parameter instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'DidSelectShippingContact' overload with the 'Action' parameter instead.")] @@ -1441,7 +1396,6 @@ interface PKPaymentAuthorizationControllerDelegate { void DidSelectShippingContact (PKPaymentAuthorizationController controller, PKContact contact, Action completion); [NoMac] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'DidSelectPaymentMethod' overload with the 'Action' parameter instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'DidSelectPaymentMethod' overload with the 'Action' parameter instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'DidSelectPaymentMethod' overload with the 'Action' parameter instead.")] @@ -1452,17 +1406,15 @@ interface PKPaymentAuthorizationControllerDelegate { [Export ("paymentAuthorizationController:didSelectPaymentMethod:handler:")] void DidSelectPaymentMethod (PKPaymentAuthorizationController controller, PKPaymentMethod paymentMethod, Action completion); - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("paymentAuthorizationController:didRequestMerchantSessionUpdate:")] void DidRequestMerchantSessionUpdate (PKPaymentAuthorizationController controller, Action handler); - [NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("paymentAuthorizationController:didChangeCouponCode:handler:")] void DidChangeCouponCode (PKPaymentAuthorizationController controller, string couponCode, Action completion); - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("presentationWindowForPaymentAuthorizationController:")] @@ -1475,7 +1427,6 @@ interface PKPaymentAuthorizationControllerDelegate { /// A labeled value for card details. [Mac (11, 0)] - [NoWatch] // Radar: https://trello.com/c/MvaHEZlc [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // there's a designated initializer and it does not accept null @@ -1491,7 +1442,6 @@ interface PKLabeledValue { string Value { get; } } - [Watch (4, 3)] [MacCatalyst (13, 1)] [BaseType (typeof (PKStoredValuePassProperties))] [DisableDefaultCtor] @@ -1503,14 +1453,12 @@ interface PKTransitPassProperties { PKTransitPassProperties GetPassProperties (PKPass pass); [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Deprecated (PlatformName.MacOSX, 12, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Export ("transitBalance", ArgumentSemantic.Copy)] NSDecimalNumber TransitBalance { get; } [Deprecated (PlatformName.iOS, 15, 0)] - [Deprecated (PlatformName.WatchOS, 8, 0)] [Deprecated (PlatformName.MacOSX, 12, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 0)] [Export ("transitBalanceCurrencyCode")] @@ -1521,13 +1469,11 @@ interface PKTransitPassProperties { [Deprecated (PlatformName.iOS, 14, 5, message: "Use 'Blocked' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 5, message: "Use 'Blocked' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 4, message: "Use 'Blocked' instead.")] [Deprecated (PlatformName.MacOSX, 11, 3, message: "Use 'Blocked' instead.")] [Export ("blacklisted")] bool Blacklisted { [Bind ("isBlacklisted")] get; } [iOS (14, 5)] - [Watch (7, 4)] [MacCatalyst (14, 5)] [Export ("blocked")] bool Blocked { [Bind ("isBlocked")] get; } @@ -1561,12 +1507,10 @@ interface PKSuicaPassProperties { [Export ("inShinkansenStation")] bool InShinkansenStation { [Bind ("isInShinkansenStation")] get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Export ("balanceAllowedForCommute")] bool BalanceAllowedForCommute { [Bind ("isBalanceAllowedForCommute")] get; } - [Watch (4, 3)] [MacCatalyst (13, 1)] [Export ("lowBalanceGateNotificationEnabled")] bool LowBalanceGateNotificationEnabled { [Bind ("isLowBalanceGateNotificationEnabled")] get; } @@ -1576,7 +1520,6 @@ interface PKSuicaPassProperties { [Export ("blacklisted")] [Deprecated (PlatformName.iOS, 14, 5, message: "Use 'Blocked' instead.")] // exists in base class - [Deprecated (PlatformName.WatchOS, 7, 4, message: "Use 'Blocked' instead.")] [Deprecated (PlatformName.MacOSX, 11, 3, message: "Use 'Blocked' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 5, message: "Use 'Blocked' instead.")] bool Blacklisted { [Bind ("isBlacklisted")] get; } @@ -1596,7 +1539,7 @@ interface PKPaymentAuthorizationResult { [NullAllowed, Export ("errors", ArgumentSemantic.Copy)] NSError [] Errors { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [NullAllowed, Export ("orderDetails", ArgumentSemantic.Strong)] PKPaymentOrderDetails OrderDetails { get; set; } } @@ -1616,24 +1559,24 @@ interface PKPaymentRequestUpdate { [Export ("paymentSummaryItems", ArgumentSemantic.Copy)] PKPaymentSummaryItem [] PaymentSummaryItems { get; set; } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("shippingMethods", ArgumentSemantic.Copy)] PKShippingMethod [] ShippingMethods { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), NoTV, MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), NoTV, MacCatalyst (16, 0)] [NullAllowed, Export ("multiTokenContexts", ArgumentSemantic.Copy)] PKPaymentTokenContext [] MultiTokenContexts { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), NoTV, MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), NoTV, MacCatalyst (16, 0)] [NullAllowed, Export ("recurringPaymentRequest", ArgumentSemantic.Strong)] PKRecurringPaymentRequest RecurringPaymentRequest { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), NoTV, MacCatalyst (16, 0)] + [Mac (13, 0), iOS (16, 0), NoTV, MacCatalyst (16, 0)] [NullAllowed, Export ("automaticReloadPaymentRequest", ArgumentSemantic.Strong)] PKAutomaticReloadPaymentRequest AutomaticReloadPaymentRequest { get; set; } [NullAllowed] - [NoWatch, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4), NoTV] + [Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4), NoTV] [Export ("deferredPaymentRequest", ArgumentSemantic.Strong)] PKDeferredPaymentRequest DeferredPaymentRequest { get; set; } } @@ -1670,13 +1613,13 @@ interface PKPaymentRequestShippingMethodUpdate { [DisableDefaultCtor] interface PKPaymentRequestPaymentMethodUpdate { - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithErrors:paymentSummaryItems:")] [DesignatedInitializer] NativeHandle Constructor ([NullAllowed] NSError [] errors, PKPaymentSummaryItem [] paymentSummaryItems); - [Watch (6, 0), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("errors", ArgumentSemantic.Copy)] NSError [] Errors { get; set; } @@ -1706,7 +1649,6 @@ interface IPKDisbursementAuthorizationControllerDelegate { } #if !XAMCORE_5_0 [NoMac] // only used in non-macOS API - [NoWatch] [MacCatalyst (13, 1)] [Obsoleted (PlatformName.iOS, 17, 0, message: "No longer used.")] [Obsoleted (PlatformName.MacCatalyst, 17, 0, message: "No longer used.")] @@ -1717,7 +1659,6 @@ public enum PKDisbursementRequestSchedule : long { } #endif - [NoWatch] [iOS (17, 0)] [Mac (15, 0)] [MacCatalyst (17, 0)] @@ -1731,54 +1672,54 @@ interface PKDisbursementRequest { [Export ("summaryItems", ArgumentSemantic.Copy)] PKPaymentSummaryItem [] SummaryItems { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Export ("merchantIdentifier")] string MerchantIdentifier { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Export ("regionCode")] string RegionCode { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Export ("supportedNetworks", ArgumentSemantic.Copy)] string [] SupportedNetworks { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Export ("merchantCapabilities", ArgumentSemantic.Assign)] PKMerchantCapability MerchantCapabilities { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Export ("requiredRecipientContactFields", ArgumentSemantic.Strong)] string [] RequiredRecipientContactFields { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [NullAllowed, Export ("recipientContact", ArgumentSemantic.Strong)] PKContact RecipientContact { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [NullAllowed, Export ("supportedRegions", ArgumentSemantic.Copy)] string [] SupportedRegions { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [NullAllowed, Export ("applicationData", ArgumentSemantic.Copy)] NSData ApplicationData { get; set; } - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Export ("initWithMerchantIdentifier:currencyCode:regionCode:supportedNetworks:merchantCapabilities:summaryItems:")] NativeHandle Constructor (string merchantIdentifier, string currencyCode, string regionCode, string [] supportedNetworks, PKMerchantCapability merchantCapabilities, PKPaymentSummaryItem [] summaryItems); - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Static] [Export ("disbursementContactInvalidErrorWithContactField:localizedDescription:")] NSError GetDisbursementContactInvalidError (string field, [NullAllowed] string localizedDescription); - [iOS (17, 0), Mac (15, 0), NoWatch, NoTV, MacCatalyst (17, 0)] + [iOS (17, 0), Mac (15, 0), NoTV, MacCatalyst (17, 0)] [Static] [Export ("disbursementCardUnsupportedError")] NSError DisbursementCardUnsupportedError { get; } } - [Watch (6, 2), iOS (13, 4)] + [iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (PKPass))] [DisableDefaultCtor] @@ -1806,7 +1747,7 @@ interface PKSecureElementPass { string PairedTerminalIdentifier { get; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -1815,7 +1756,7 @@ public enum PKAddShareablePassConfigurationPrimaryAction : ulong { Share, } - [Watch (7, 0), iOS (14, 0)] + [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] [Native] @@ -1825,7 +1766,7 @@ public enum PKBarcodeEventConfigurationDataType : long { SigningCertificate, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -1834,7 +1775,7 @@ public enum PKIssuerProvisioningExtensionAuthorizationResult : long { Authorized, } - [NoWatch, NoTV] + [NoTV] [iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -1848,7 +1789,7 @@ interface PKAddSecureElementPassConfiguration { string LocalizedDescription { get; set; } } - [NoWatch, NoTV] + [NoTV] [iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (PKAddSecureElementPassConfiguration))] @@ -1858,26 +1799,26 @@ interface PKAddCarKeyPassConfiguration { [Export ("password")] string Password { get; set; } - // headers say [Watch (7,3)] but PKAddSecureElementPassConfiguration is not supported for watch + // headers say but PKAddSecureElementPassConfiguration is not supported for watch [iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("supportedRadioTechnologies", ArgumentSemantic.Assign)] PKRadioTechnology SupportedRadioTechnologies { get; set; } - // headers say [Watch (9,0)] but PKAddSecureElementPassConfiguration is not supported for watch - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV, NoWatch] + // headers say but PKAddSecureElementPassConfiguration is not supported for watch + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] [Export ("manufacturerIdentifier")] string ManufacturerIdentifier { get; set; } - // headers say [Watch (9,0)] but PKAddSecureElementPassConfiguration is not supported for watch - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV, NoWatch] + // headers say but PKAddSecureElementPassConfiguration is not supported for watch + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] [NullAllowed, Export ("provisioningTemplateIdentifier", ArgumentSemantic.Strong)] string ProvisioningTemplateIdentifier { get; set; } } interface IPKAddSecureElementPassViewControllerDelegate { } - [NoWatch, NoTV, NoMac] // under `#if TARGET_OS_IOS` + [NoTV, NoMac] // under `#if TARGET_OS_IOS` [iOS (13, 4)] [MacCatalyst (13, 1)] #if NET @@ -1901,7 +1842,7 @@ interface PKAddSecureElementPassViewControllerDelegate { void DidFinishAddingSecureElementPasses (PKAddSecureElementPassViewController controller, [NullAllowed] PKSecureElementPass [] passes, [NullAllowed] NSError error); } - [NoWatch, NoTV, NoMac] // under `#if TARGET_OS_IOS` + [NoTV, NoMac] // under `#if TARGET_OS_IOS` [iOS (13, 4)] [MacCatalyst (14, 0)] // doc mention 13.4 but we can't load the class [BaseType (typeof (UIViewController))] @@ -1923,7 +1864,7 @@ interface PKAddSecureElementPassViewController { NSObject WeakDelegate { get; set; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -1937,17 +1878,17 @@ interface PKShareablePassMetadata { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:passThumbnailImage:ownerDisplayName:localizedDescription:accountHash:templateIdentifier:relyingPartyIdentifier:requiresUnifiedAccessCapableDevice:")] NativeHandle Constructor (string credentialIdentifier, string sharingInstanceIdentifier, CGImage passThumbnailImage, string ownerDisplayName, string localizedDescription, string accountHash, string templateIdentifier, string relyingPartyIdentifier, bool requiresUnifiedAccessCapableDevice); [Internal] - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] [Export ("initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:cardTemplateIdentifier:preview:")] NativeHandle _InitWithCardTemplate (string credentialIdentifier, string sharingInstanceIdentifier, string templateIdentifier, PKShareablePassMetadataPreview preview); [Internal] - [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] [Export ("initWithProvisioningCredentialIdentifier:sharingInstanceIdentifier:cardConfigurationIdentifier:preview:")] NativeHandle _InitWithCardConfiguration (string credentialIdentifier, string sharingInstanceIdentifier, string templateIdentifier, PKShareablePassMetadataPreview preview); @@ -1972,41 +1913,41 @@ interface PKShareablePassMetadata { [Export ("ownerDisplayName", ArgumentSemantic.Strong)] string OwnerDisplayName { get; } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("accountHash", ArgumentSemantic.Strong)] - string AccountHash { get; [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] set; } + string AccountHash { get; [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] set; } [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("templateIdentifier", ArgumentSemantic.Strong)] string TemplateIdentifier { get; } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("relyingPartyIdentifier", ArgumentSemantic.Strong)] - string RelyingPartyIdentifier { get; [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] set; } + string RelyingPartyIdentifier { get; [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] set; } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Export ("requiresUnifiedAccessCapableDevice")] - bool RequiresUnifiedAccessCapableDevice { get; [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] set; } + bool RequiresUnifiedAccessCapableDevice { get; [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] set; } - [NoWatch, NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] [Export ("cardTemplateIdentifier", ArgumentSemantic.Strong)] string CardTemplateIdentifier { get; } [Export ("cardConfigurationIdentifier", ArgumentSemantic.Strong)] string CardConfigurationIdentifier { get; } - [NoWatch, NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] [Export ("preview", ArgumentSemantic.Strong)] PKShareablePassMetadataPreview Preview { get; } - [NoWatch, NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] [Export ("serverEnvironmentIdentifier", ArgumentSemantic.Strong)] string ServerEnvironmentIdentifier { get; set; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (PKAddSecureElementPassConfiguration))] @@ -2029,13 +1970,12 @@ interface PKAddShareablePassConfiguration { [Export ("provisioningPolicyIdentifier", ArgumentSemantic.Strong)] string ProvisioningPolicyIdentifier { get; } - [NoWatch, NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] [Static, Async] [Export ("configurationForPassMetadata:primaryAction:completion:")] void GetConfiguration (PKShareablePassMetadata [] passMetadata, PKAddShareablePassConfigurationPrimaryAction action, Action completion); } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] @@ -2053,7 +1993,6 @@ interface PKBarcodeEventConfigurationRequest { PKBarcodeEventConfigurationDataType ConfigurationDataType { get; } } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] @@ -2068,7 +2007,6 @@ interface PKBarcodeEventMetadataRequest { string LastUsedBarcodeIdentifier { get; } } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] @@ -2083,7 +2021,6 @@ interface PKBarcodeEventMetadataResponse { NSData PaymentInformation { get; set; } } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] @@ -2123,7 +2060,6 @@ interface PKBarcodeEventSignatureRequest { NSData PartialSignature { get; } } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [NoTV] @@ -2138,7 +2074,7 @@ interface PKBarcodeEventSignatureResponse { NSData SignedData { get; set; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -2155,7 +2091,7 @@ interface PKIssuerProvisioningExtensionStatus { bool RemotePassEntriesAvailable { get; set; } } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -2172,7 +2108,7 @@ interface PKIssuerProvisioningExtensionPassEntry { CGImage Art { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [NoMacCatalyst] // type cannot be loaded, lack of documentation about usage [BaseType (typeof (NSObject))] @@ -2196,7 +2132,7 @@ interface PKIssuerProvisioningExtensionHandler { void GenerateAddPaymentPassRequest (string identifier, PKAddPaymentPassRequestConfiguration configuration, NSData [] certificates, NSData nonce, NSData nonceSignature, Action completion); } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Protocol] @@ -2207,18 +2143,17 @@ interface PKIssuerProvisioningExtensionAuthorizationProviding { Action CompletionHandler { get; set; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] delegate void PKInformationRequestCompletionBlock (PKBarcodeEventMetadataResponse response); - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] delegate void PKSignatureRequestCompletionBlock (PKBarcodeEventSignatureResponse response); [NoTV] - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [Protocol] @@ -2237,7 +2172,7 @@ interface PKPaymentInformationRequestHandling { void HandleConfigurationRequest (PKBarcodeEventConfigurationRequest configurationRequest, Action completion); } - [NoWatch, NoTV] + [NoTV] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (PKIssuerProvisioningExtensionPassEntry))] @@ -2253,7 +2188,6 @@ interface PKIssuerProvisioningExtensionPaymentPassEntry { } [NoTV] - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -2265,7 +2199,6 @@ interface PKPaymentMerchantSession { } [NoTV] - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -2281,7 +2214,7 @@ interface PKPaymentRequestMerchantSessionUpdate { PKPaymentMerchantSession Session { get; set; } } - [NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PKPaymentRequestUpdate))] [DisableDefaultCtor] interface PKPaymentRequestCouponCodeUpdate { @@ -2296,20 +2229,19 @@ interface PKPaymentRequestCouponCodeUpdate { [NullAllowed, Export ("errors", ArgumentSemantic.Copy)] NSError [] Errors { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("multiTokenContexts", ArgumentSemantic.Copy)] PKPaymentTokenContext [] MultiTokenContexts { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("recurringPaymentRequest", ArgumentSemantic.Strong)] PKRecurringPaymentRequest RecurringPaymentRequest { get; set; } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("automaticReloadPaymentRequest", ArgumentSemantic.Strong)] PKAutomaticReloadPaymentRequest AutomaticReloadPaymentRequest { get; set; } } - [Watch (7, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -2327,7 +2259,7 @@ enum PKRadioTechnology : ulong { Bluetooth = 1 << 1, } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKDateComponentsRange : NSCopying, NSSecureCoding { @@ -2342,7 +2274,7 @@ interface PKDateComponentsRange : NSCopying, NSSecureCoding { NSDateComponents EndDateComponents { get; } } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PKPaymentSummaryItem))] [DisableDefaultCtor] interface PKDeferredPaymentSummaryItem { @@ -2350,14 +2282,14 @@ interface PKDeferredPaymentSummaryItem { NSDate DeferredDate { get; set; } } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PKShippingContactEditingMode : ulong { Enabled = 1, StorePickup, } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PKPaymentSummaryItem))] [DisableDefaultCtor] interface PKRecurringPaymentSummaryItem { @@ -2374,7 +2306,7 @@ interface PKRecurringPaymentSummaryItem { NSDate EndDate { get; set; } } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] public enum PKStoredValuePassBalanceType { [Field ("PKStoredValuePassBalanceTypeCash")] Cash, @@ -2382,7 +2314,7 @@ public enum PKStoredValuePassBalanceType { LoyaltyPoints, } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKStoredValuePassBalance { @@ -2402,7 +2334,7 @@ interface PKStoredValuePassBalance { bool IsEqual (PKStoredValuePassBalance balance); } - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKStoredValuePassProperties { @@ -2421,10 +2353,10 @@ interface PKStoredValuePassProperties { PKStoredValuePassBalance [] Balances { get; } } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] interface IPKIdentityDocumentDescriptor { } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface PKIdentityDocumentDescriptor { [Abstract] @@ -2443,7 +2375,7 @@ interface PKIdentityDocumentDescriptor { interface IPKShareSecureElementPassViewControllerDelegate { }; - [iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV, NoMac] + [iOS (16, 0), MacCatalyst (16, 0), NoTV, NoMac] #if NET [Protocol, Model] #else @@ -2461,7 +2393,7 @@ interface PKShareSecureElementPassViewControllerDelegate { interface IPKVehicleConnectionDelegate { } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -2478,7 +2410,7 @@ interface PKVehicleConnectionDelegate { void SessionDidReceiveData (NSData data); } - [NoWatch, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKAutomaticReloadPaymentRequest // : NSCoding, NSCopying, NSSecureCoding // https://feedbackassistant.apple.com/feedback/11018799 @@ -2503,7 +2435,7 @@ interface PKAutomaticReloadPaymentRequest // : NSCoding, NSCopying, NSSecureCodi NativeHandle Constructor (string paymentDescription, PKAutomaticReloadPaymentSummaryItem automaticReloadBilling, NSUrl managementUrl); } - [NoWatch, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (PKPaymentSummaryItem))] interface PKAutomaticReloadPaymentSummaryItem // : NSCoding, NSCopying, NSSecureCoding // https://feedbackassistant.apple.com/feedback/11018799 { @@ -2511,7 +2443,7 @@ interface PKAutomaticReloadPaymentSummaryItem // : NSCoding, NSCopying, NSSecure NSDecimalNumber ThresholdAmount { get; set; } } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface PKIdentityAuthorizationController { [Async] @@ -2526,7 +2458,7 @@ interface PKIdentityAuthorizationController { void CancelRequest (); } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIControl))] interface PKIdentityButton { [Export ("initWithLabel:style:")] @@ -2541,7 +2473,7 @@ interface PKIdentityButton { nfloat CornerRadius { get; set; } } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKIdentityDocument { @@ -2549,13 +2481,13 @@ interface PKIdentityDocument { NSData EncryptedData { get; } } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKIdentityDriversLicenseDescriptor : PKIdentityDocumentDescriptor { } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKIdentityElement : NSCopying { @@ -2618,7 +2550,7 @@ interface PKIdentityElement : NSCopying { PKIdentityElement AgeThresholdElementWithAge (nint age); } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKIdentityIntentToStore : NSCopying { @@ -2635,7 +2567,7 @@ interface PKIdentityIntentToStore : NSCopying { PKIdentityIntentToStore MayStoreIntentForDays (nint days); } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface PKIdentityRequest { [NullAllowed, Export ("descriptor", ArgumentSemantic.Assign)] @@ -2648,7 +2580,7 @@ interface PKIdentityRequest { string MerchantIdentifier { get; set; } } - [NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKPaymentOrderDetails // : NSCopying, NSSecureCoding // https://feedbackassistant.apple.com/feedback/11018799 @@ -2670,7 +2602,7 @@ interface PKPaymentOrderDetails // : NSCopying, NSSecureCoding // https://feedba string AuthenticationToken { get; set; } } - [NoWatch, iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0), NoTV] + [iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKPaymentTokenContext // : NSCoding, NSCopying, NSSecureCoding // https://feedbackassistant.apple.com/feedback/11018799 @@ -2695,7 +2627,7 @@ interface PKPaymentTokenContext // : NSCoding, NSCopying, NSSecureCoding // http NSDecimalNumber Amount { get; set; } } - [NoWatch, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] + [iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKRecurringPaymentRequest // : NSCoding, NSCopying, NSSecureCoding // https://feedbackassistant.apple.com/feedback/11018799 @@ -2723,7 +2655,7 @@ interface PKRecurringPaymentRequest // : NSCoding, NSCopying, NSSecureCoding // NSUrl TokenNotificationUrl { get; set; } } - [NoWatch, NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), Mac (13, 0), MacCatalyst (16, 0)] [BaseType (typeof (PKAddPassMetadataPreview))] [DisableDefaultCtor] interface PKShareablePassMetadataPreview // : NSCoding, NSCopying, NSSecureCoding // https://feedbackassistant.apple.com/feedback/11018799 @@ -2755,7 +2687,7 @@ interface PKShareablePassMetadataPreview // : NSCoding, NSCopying, NSSecureCodin string ProvisioningTemplateIdentifier { get; } } - [iOS (16, 0), MacCatalyst (16, 0), NoTV, NoWatch, NoMac] + [iOS (16, 0), MacCatalyst (16, 0), NoTV, NoMac] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] interface PKShareSecureElementPassViewController { @@ -2779,7 +2711,7 @@ interface PKShareSecureElementPassViewController { bool PromptToShareUrl { get; set; } } - [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] + [iOS (16, 0), Mac (13, 0), NoTV, MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKVehicleConnectionSession { @@ -2805,7 +2737,7 @@ interface PKVehicleConnectionSession { void Invalidate (); } - [NoWatch, NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKDeferredPaymentRequest { @@ -2836,7 +2768,7 @@ interface PKDeferredPaymentRequest { NativeHandle Constructor (string paymentDescription, PKDeferredPaymentSummaryItem deferredBilling, NSUrl managementUrl); } - [NoWatch, NoTV, NoMac, iOS (17, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (17, 0), NoMacCatalyst] [BaseType (typeof (UIView))] [DisableDefaultCtor] interface PKPayLaterView { @@ -2865,7 +2797,7 @@ interface PKPayLaterView { interface IPKPayLaterViewDelegate { } - [NoWatch, NoTV, NoMac, iOS (17, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (17, 0), NoMacCatalyst] #if NET [Protocol, Model] #else @@ -2878,26 +2810,26 @@ interface PKPayLaterViewDelegate { void PayLaterViewDidUpdateHeight (PKPayLaterView view); } - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] interface PKDirbursementError { [Field ("PKDisbursementErrorContactFieldUserInfoKey")] NSString ContactFieldUserInfoKey { get; } } - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (PKPaymentSummaryItem))] [DisableDefaultCtor] interface PKInstantFundsOutFeeSummaryItem : NSCoding, NSCopying, NSSecureCoding { } - [NoWatch, NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (15, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (PKPaymentSummaryItem))] [DisableDefaultCtor] interface PKDisbursementSummaryItem : NSCoding, NSCopying, NSSecureCoding { } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKIdentityDocumentMetadata { @@ -2917,7 +2849,7 @@ interface PKIdentityDocumentMetadata { string ServerEnvironmentIdentifier { get; set; } } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [BaseType (typeof (PKIdentityDocumentMetadata))] [DisableDefaultCtor] interface PKJapanIndividualNumberCardMetadata { @@ -2941,7 +2873,7 @@ interface PKJapanIndividualNumberCardMetadata { delegate void PKAddIdentityDocumentConfigurationGetConfigurationCompletionHandler (PKAddIdentityDocumentConfiguration credentialConfiguration, NSError error); - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [BaseType (typeof (PKAddSecureElementPassConfiguration))] [DisableDefaultCtor] interface PKAddIdentityDocumentConfiguration { @@ -2954,7 +2886,7 @@ interface PKAddIdentityDocumentConfiguration { PKIdentityDocumentMetadata Metadata { get; } } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKAddPassMetadataPreview { @@ -2972,7 +2904,7 @@ interface PKAddPassMetadataPreview { string LocalizedDescription { get; } } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0), NoMac] + [NoTV, iOS (18, 0), MacCatalyst (18, 0), NoMac] [BaseType (typeof (NSObject), Name = "PKIdentityNationalIDCardDescriptor")] [DisableDefaultCtor] interface PKIdentityNationalIdCardDescriptor : PKIdentityDocumentDescriptor { @@ -2980,7 +2912,7 @@ interface PKIdentityNationalIdCardDescriptor : PKIdentityDocumentDescriptor { string RegionCode { get; set; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PKPassRelevantDate { diff --git a/src/pdfkit.cs b/src/pdfkit.cs index b9cfc09843fc..4221f98b45a6 100644 --- a/src/pdfkit.cs +++ b/src/pdfkit.cs @@ -2303,7 +2303,6 @@ interface PdfView : [NoiOS] [NoTV] [NoMacCatalyst] - [NoTV] interface PdfViewAnnotationHitEventArgs { [Export ("PDFAnnotationHit")] PdfAnnotation AnnotationHit { get; } diff --git a/src/phase.cs b/src/phase.cs index a1a1aa9e731d..466515899064 100644 --- a/src/phase.cs +++ b/src/phase.cs @@ -25,14 +25,14 @@ namespace Phase { - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseUpdateMode : long { Automatic = 0, Manual = 1, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseRenderingState : long { Stopped = 0, @@ -40,7 +40,7 @@ public enum PhaseRenderingState : long { Paused = 2, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseSpatializationMode : long { Automatic = 0, @@ -48,7 +48,7 @@ public enum PhaseSpatializationMode : long { AlwaysUseChannelBased = 2, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseReverbPreset : long { None = 1917742958, @@ -66,7 +66,7 @@ public enum PhaseReverbPreset : long { Cathedral = 1917023336, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] [ErrorDomain ("PHASEErrorDomain")] public enum PhaseError : long { @@ -74,7 +74,7 @@ public enum PhaseError : long { InvalidObject = 1346913634, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] [ErrorDomain ("PHASESoundEventErrorDomain")] public enum PhaseSoundEventError : long { @@ -86,7 +86,7 @@ public enum PhaseSoundEventError : long { OutOfMemory = 1346925670, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] [ErrorDomain ("PHASEAssetErrorDomain")] public enum PhaseAssetError : long { @@ -98,7 +98,7 @@ public enum PhaseAssetError : long { MemoryAllocation = 1346920806, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseSoundEventPrepareHandlerReason : long { Error = 0, @@ -106,7 +106,7 @@ public enum PhaseSoundEventPrepareHandlerReason : long { Terminated = 2, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseSoundEventStartHandlerReason : long { Error = 0, @@ -114,7 +114,7 @@ public enum PhaseSoundEventStartHandlerReason : long { Terminated = 2, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseSoundEventSeekHandlerReason : long { Error = 0, @@ -122,7 +122,7 @@ public enum PhaseSoundEventSeekHandlerReason : long { SeekSuccessful = 2, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseSoundEventPrepareState : long { NotStarted = 0, @@ -130,14 +130,14 @@ public enum PhaseSoundEventPrepareState : long { Prepared = 2, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseAssetType : long { Resident = 0, Streamed = 1, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseCurveType : long { Linear = 1668435054, @@ -155,7 +155,7 @@ public enum PhaseCurveType : long { JumpToEndValue = 1668434501, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseCullOption : long { Terminate = 0, @@ -165,21 +165,21 @@ public enum PhaseCullOption : long { DoNotCull = 4, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhasePlaybackMode : long { OneShot = 0, Looping = 1, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseNormalizationMode : long { None = 0, Dynamic = 1, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseCalibrationMode : long { None = 0, @@ -187,7 +187,7 @@ public enum PhaseCalibrationMode : long { AbsoluteSpl = 2, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum PhasePushStreamBufferOptions : ulong { @@ -197,19 +197,19 @@ public enum PhasePushStreamBufferOptions : ulong { InterruptsAtLoop = 1uL << 3, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhasePushStreamCompletionCallbackCondition : long { DataRendered = 0, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseMediumPreset : long { PresetAir = 1835286898, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PhaseMaterialPreset : long { Cardboard = 1833136740, @@ -220,7 +220,7 @@ public enum PhaseMaterialPreset : long { Wood = 1834448228, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] public enum PhaseSpatialCategory { [Field ("PHASESpatialCategoryDirectPathTransmission")] DirectPathTransmission, @@ -230,7 +230,7 @@ public enum PhaseSpatialCategory { LateReverb, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum PhaseSpatialPipelineFlags : ulong { @@ -240,7 +240,7 @@ public enum PhaseSpatialPipelineFlags : ulong { } [Flags] - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] [NativeName ("PHASEAutomaticHeadTrackingFlags")] public enum PhaseAutomaticHeadTrackingFlags : ulong { @@ -248,7 +248,7 @@ public enum PhaseAutomaticHeadTrackingFlags : ulong { Orientation = 1UL << 0, } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASENumericPair")] #if TVOS [DisableDefaultCtor] @@ -264,7 +264,7 @@ interface PhaseNumericPair { double Second { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEEnvelopeSegment")] #if TVOS [DisableDefaultCtor] @@ -287,7 +287,7 @@ Vector2d EndPoint { } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEEnvelope")] [DisableDefaultCtor] interface PhaseEnvelope { @@ -315,7 +315,7 @@ Vector2d StartPoint { PhaseNumericPair Range { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEDefinition")] [DisableDefaultCtor] interface PhaseDefinition { @@ -323,7 +323,7 @@ interface PhaseDefinition { string Identifier { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseDefinition), Name = "PHASEMetaParameterDefinition")] [DisableDefaultCtor] interface PhaseMetaParameterDefinition { @@ -331,7 +331,7 @@ interface PhaseMetaParameterDefinition { NSObject Value { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseMetaParameterDefinition), Name = "PHASENumberMetaParameterDefinition")] [DisableDefaultCtor] interface PhaseNumberMetaParameterDefinition { @@ -355,7 +355,7 @@ interface PhaseNumberMetaParameterDefinition { double Maximum { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseMetaParameterDefinition), Name = "PHASEStringMetaParameterDefinition")] [DisableDefaultCtor] interface PhaseStringMetaParameterDefinition { @@ -367,7 +367,7 @@ interface PhaseStringMetaParameterDefinition { NativeHandle Constructor (string value); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseNumberMetaParameterDefinition), Name = "PHASEMappedMetaParameterDefinition")] [DisableDefaultCtor] interface PhaseMappedMetaParameterDefinition { @@ -392,7 +392,7 @@ interface PhaseMappedMetaParameterDefinition { PhaseNumberMetaParameterDefinition InputMetaParameterDefinition { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEMetaParameter")] [DisableDefaultCtor] interface PhaseMetaParameter { @@ -403,12 +403,12 @@ interface PhaseMetaParameter { NSObject Value { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseMetaParameter), Name = "PHASEStringMetaParameter")] [DisableDefaultCtor] interface PhaseStringMetaParameter { } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseMetaParameter), Name = "PHASENumberMetaParameter")] [DisableDefaultCtor] interface PhaseNumberMetaParameter { @@ -422,7 +422,7 @@ interface PhaseNumberMetaParameter { void Fade (double value, double duration); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseDefinition), Name = "PHASEMixerDefinition")] [DisableDefaultCtor] interface PhaseMixerDefinition { @@ -433,7 +433,7 @@ interface PhaseMixerDefinition { PhaseNumberMetaParameterDefinition GainMetaParameterDefinition { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseMixerDefinition), Name = "PHASESpatialMixerDefinition")] [DisableDefaultCtor] interface PhaseSpatialMixerDefinition { @@ -457,7 +457,7 @@ interface PhaseSpatialMixerDefinition { PhaseDirectivityModelParameters SourceDirectivityModelParameters { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseMixerDefinition), Name = "PHASEAmbientMixerDefinition")] [DisableDefaultCtor] interface PhaseAmbientMixerDefinition { @@ -480,7 +480,7 @@ Quaternion Orientation { AVAudioChannelLayout InputChannelLayout { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseMixerDefinition), Name = "PHASEChannelMixerDefinition")] [DisableDefaultCtor] interface PhaseChannelMixerDefinition { @@ -495,7 +495,7 @@ interface PhaseChannelMixerDefinition { AVAudioChannelLayout InputChannelLayout { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEMixer")] [DisableDefaultCtor] interface PhaseMixer { @@ -509,7 +509,7 @@ interface PhaseMixer { PhaseMetaParameter GainMetaParameter { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEMixerParameters")] #if TVOS [DisableDefaultCtor] @@ -522,7 +522,7 @@ interface PhaseMixerParameters { void AddAmbientMixerParameters (string identifier, PhaseListener listener); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEGroup")] [DisableDefaultCtor] interface PhaseGroup { @@ -570,7 +570,7 @@ interface PhaseGroup { bool Soloed { [Bind ("isSoloed")] get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseDefinition), Name = "PHASESoundEventNodeDefinition")] [DisableDefaultCtor] interface PhaseSoundEventNodeDefinition { @@ -578,7 +578,7 @@ interface PhaseSoundEventNodeDefinition { PhaseSoundEventNodeDefinition [] Children { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseSoundEventNodeDefinition), Name = "PHASEGeneratorNodeDefinition")] [DisableDefaultCtor] interface PhaseGeneratorNodeDefinition { @@ -607,7 +607,7 @@ interface PhaseGeneratorNodeDefinition { PhaseMixerDefinition MixerDefinition { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseGeneratorNodeDefinition), Name = "PHASESamplerNodeDefinition")] [DisableDefaultCtor] interface PhaseSamplerNodeDefinition { @@ -628,7 +628,7 @@ interface PhaseSamplerNodeDefinition { PhasePlaybackMode PlaybackMode { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseSoundEventNodeDefinition), Name = "PHASEContainerNodeDefinition")] interface PhaseContainerNodeDefinition { [Static] @@ -643,7 +643,7 @@ interface PhaseContainerNodeDefinition { void Add (PhaseSoundEventNodeDefinition subtree); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseSoundEventNodeDefinition), Name = "PHASEBlendNodeDefinition")] [DisableDefaultCtor] interface PhaseBlendNodeDefinition { @@ -680,7 +680,7 @@ interface PhaseBlendNodeDefinition { void AddRange (PhaseEnvelope envelope, PhaseSoundEventNodeDefinition subtree); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseSoundEventNodeDefinition), Name = "PHASESwitchNodeDefinition")] [DisableDefaultCtor] interface PhaseSwitchNodeDefinition { @@ -698,7 +698,7 @@ interface PhaseSwitchNodeDefinition { PhaseStringMetaParameterDefinition SwitchMetaParameterDefinition { get; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseSoundEventNodeDefinition), Name = "PHASERandomNodeDefinition")] [DisableDefaultCtor] interface PhaseRandomNodeDefinition { @@ -716,7 +716,7 @@ interface PhaseRandomNodeDefinition { nint UniqueSelectionQueueLength { get; set; } } - [NoWatch, TV (18, 0), iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), Mac (15, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject), Name = "PHASEStreamNode")] [DisableDefaultCtor] interface PhaseStreamNode { @@ -733,7 +733,7 @@ interface PhaseStreamNode { AVAudioFormat Format { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseGeneratorNodeDefinition), Name = "PHASEPushStreamNodeDefinition")] [DisableDefaultCtor] interface PhasePushStreamNodeDefinition { @@ -751,7 +751,7 @@ interface PhasePushStreamNodeDefinition { bool Normalize { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseStreamNode), Name = "PHASEPushStreamNode")] [DisableDefaultCtor] interface PhasePushStreamNode { @@ -782,7 +782,7 @@ interface PhasePushStreamNode { void ScheduleBuffer (AVAudioPcmBuffer buffer, [NullAllowed] AVAudioTime when, PhasePushStreamBufferOptions options, PhasePushStreamCompletionCallbackCondition completionCallbackCondition, Action completionHandler); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEAsset")] [DisableDefaultCtor] interface PhaseAsset { @@ -790,12 +790,12 @@ interface PhaseAsset { string Identifier { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseAsset), Name = "PHASEGlobalMetaParameterAsset")] [DisableDefaultCtor] interface PhaseGlobalMetaParameterAsset { } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseAsset), Name = "PHASESoundAsset")] [DisableDefaultCtor] interface PhaseSoundAsset { @@ -809,12 +809,12 @@ interface PhaseSoundAsset { PhaseAssetType Type { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseAsset), Name = "PHASESoundEventNodeAsset")] [DisableDefaultCtor] interface PhaseSoundEventNodeAsset { } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEAssetRegistry")] [DisableDefaultCtor] interface PhaseAssetRegistry { @@ -846,7 +846,7 @@ interface PhaseAssetRegistry { NSDictionary GlobalMetaParameters { get; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASECardioidDirectivityModelSubbandParameters")] interface PhaseCardioidDirectivityModelSubbandParameters { [Export ("frequency")] @@ -859,7 +859,7 @@ interface PhaseCardioidDirectivityModelSubbandParameters { double Sharpness { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEConeDirectivityModelSubbandParameters")] interface PhaseConeDirectivityModelSubbandParameters { [Export ("setInnerAngle:outerAngle:")] @@ -878,12 +878,12 @@ interface PhaseConeDirectivityModelSubbandParameters { double OuterGain { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEDirectivityModelParameters")] [DisableDefaultCtor] interface PhaseDirectivityModelParameters { } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseDirectivityModelParameters), Name = "PHASECardioidDirectivityModelParameters")] [DisableDefaultCtor] interface PhaseCardioidDirectivityModelParameters { @@ -894,7 +894,7 @@ interface PhaseCardioidDirectivityModelParameters { PhaseCardioidDirectivityModelSubbandParameters [] SubbandParameters { get; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseDirectivityModelParameters), Name = "PHASEConeDirectivityModelParameters")] interface PhaseConeDirectivityModelParameters { [Export ("initWithSubbandParameters:")] @@ -904,7 +904,7 @@ interface PhaseConeDirectivityModelParameters { PhaseConeDirectivityModelSubbandParameters [] SubbandParameters { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEDistanceModelFadeOutParameters")] [DisableDefaultCtor] interface PhaseDistanceModelFadeOutParameters { @@ -916,7 +916,7 @@ interface PhaseDistanceModelFadeOutParameters { double CullDistance { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEDistanceModelParameters")] [DisableDefaultCtor] interface PhaseDistanceModelParameters { @@ -924,14 +924,14 @@ interface PhaseDistanceModelParameters { PhaseDistanceModelFadeOutParameters FadeOutParameters { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseDistanceModelParameters), Name = "PHASEGeometricSpreadingDistanceModelParameters")] interface PhaseGeometricSpreadingDistanceModelParameters { [Export ("rolloffFactor")] double RolloffFactor { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseDistanceModelParameters), Name = "PHASEEnvelopeDistanceModelParameters")] [DisableDefaultCtor] interface PhaseEnvelopeDistanceModelParameters { @@ -943,7 +943,7 @@ interface PhaseEnvelopeDistanceModelParameters { PhaseEnvelope Envelope { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEDucker")] [DisableDefaultCtor] interface PhaseDucker { @@ -984,7 +984,7 @@ interface PhaseDucker { string Identifier { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEGroupPresetSetting")] [DisableDefaultCtor] interface PhaseGroupPresetSetting { @@ -1004,7 +1004,7 @@ interface PhaseGroupPresetSetting { PhaseCurveType RateCurveType { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEGroupPreset")] [DisableDefaultCtor] interface PhaseGroupPreset { @@ -1034,7 +1034,7 @@ interface PhaseGroupPreset { void Deactivate (double timeToResetOverride); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEMedium")] [DisableDefaultCtor] interface PhaseMedium { @@ -1042,7 +1042,7 @@ interface PhaseMedium { NativeHandle Constructor (PhaseEngine engine, PhaseMediumPreset preset); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEObject")] [DisableDefaultCtor] interface PhaseObject : NSCopying { @@ -1103,7 +1103,7 @@ NMatrix4 WorldTransform { } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASESoundEvent")] [DisableDefaultCtor] interface PhaseSoundEvent { @@ -1163,7 +1163,7 @@ interface PhaseSoundEvent { NSDictionary PullStreamNodes { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEEngine")] [DisableDefaultCtor] interface PhaseEngine { @@ -1220,7 +1220,7 @@ interface PhaseEngine { PhaseGroupPreset ActiveGroupPreset { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseObject), Name = "PHASEListener")] [DisableDefaultCtor] interface PhaseListener { @@ -1236,7 +1236,7 @@ interface PhaseListener { PhaseAutomaticHeadTrackingFlags AutomaticHeadTrackingFlags { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEMaterial")] [DisableDefaultCtor] interface PhaseMaterial { @@ -1244,7 +1244,7 @@ interface PhaseMaterial { NativeHandle Constructor (PhaseEngine engine, PhaseMaterialPreset preset); } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEShapeElement")] [DisableDefaultCtor] interface PhaseShapeElement { @@ -1252,7 +1252,7 @@ interface PhaseShapeElement { PhaseMaterial Material { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASEShape")] [DisableDefaultCtor] interface PhaseShape : NSCopying { @@ -1267,7 +1267,7 @@ interface PhaseShape : NSCopying { PhaseShapeElement [] Elements { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseObject), Name = "PHASEOccluder")] [DisableDefaultCtor] interface PhaseOccluder { @@ -1283,7 +1283,7 @@ interface PhaseOccluder { PhaseShape [] Shapes { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (PhaseObject), Name = "PHASESource")] [DisableDefaultCtor] interface PhaseSource { @@ -1302,7 +1302,7 @@ interface PhaseSource { PhaseShape [] Shapes { get; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASESpatialPipelineEntry")] #if TVOS [DisableDefaultCtor] @@ -1315,7 +1315,7 @@ interface PhaseSpatialPipelineEntry { PhaseNumberMetaParameterDefinition SendLevelMetaParameterDefinition { get; set; } } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject), Name = "PHASESpatialPipeline")] [DisableDefaultCtor] interface PhaseSpatialPipeline { @@ -1351,7 +1351,7 @@ interface PhaseSpatialPipeline { /* AVAudioFrameCount */ uint frameCount, /* AudioBufferList * */ AudioBufferList* outputData); - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (PhaseGeneratorNodeDefinition), Name = "PHASEPullStreamNodeDefinition")] [DisableDefaultCtor] interface PhasePullStreamNodeDefinition { @@ -1369,7 +1369,7 @@ interface PhasePullStreamNodeDefinition { bool Normalize { get; set; } } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (PhaseStreamNode), Name = "PHASEPullStreamNode")] [DisableDefaultCtor] interface PhasePullStreamNode { diff --git a/src/photosui.cs b/src/photosui.cs index eba8168aa416..4ada0f039bd3 100644 --- a/src/photosui.cs +++ b/src/photosui.cs @@ -163,7 +163,6 @@ interface PHLivePhotoViewDelegate { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Static] interface PHProjectType { @@ -527,7 +526,7 @@ interface PHEditingExtensionContext { interface IPHPickerViewControllerDelegate { } - [NoWatch, NoTV, Mac (13, 0), iOS (14, 0)] + [NoTV, Mac (13, 0), iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -541,7 +540,7 @@ interface PHPickerViewControllerDelegate { void DidFinishPicking (PHPickerViewController picker, PHPickerResult [] results); } - [NoWatch, NoTV, Mac (13, 0), iOS (14, 0)] + [NoTV, Mac (13, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UIViewController))] [Advice ("This type should not be subclassed.")] @@ -560,34 +559,34 @@ interface PHPickerViewController { [DesignatedInitializer] NativeHandle Constructor (PHPickerConfiguration configuration); - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("deselectAssetsWithIdentifiers:")] void DeselectAssets (string [] identifiers); - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("moveAssetWithIdentifier:afterAssetWithIdentifier:")] void MoveAsset (string identifier, [NullAllowed] string afterIdentifier); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("updatePickerUsingConfiguration:")] void UpdatePicker (PHPickerUpdateConfiguration configuration); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("scrollToInitialPosition")] void ScrollToInitialPosition (); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("zoomIn")] void ZoomIn (); - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("zoomOut")] void ZoomOut (); } - [NoWatch, NoTV, Mac (13, 0), iOS (14, 0)] + [NoTV, Mac (13, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [Advice ("This type should not be subclassed.")] @@ -625,7 +624,7 @@ interface PHPickerConfiguration : NSCopying { PHPickerCapabilities DisabledCapabilities { get; set; } } - [NoWatch, NoTV, Mac (13, 0), iOS (14, 0)] + [NoTV, Mac (13, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [Advice ("This type should not be subclassed.")] @@ -647,79 +646,79 @@ interface PHPickerFilter : NSCopying { [Export ("anyFilterMatchingSubfilters:")] PHPickerFilter GetAnyFilterMatchingSubfilters (PHPickerFilter [] subfilters); - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Static] [Export ("depthEffectPhotosFilter")] PHPickerFilter DepthEffectPhotosFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Static] [Export ("burstsFilter")] PHPickerFilter BurstsFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("panoramasFilter")] PHPickerFilter PanoramasFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("screenshotsFilter")] PHPickerFilter ScreenshotsFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("screenRecordingsFilter")] PHPickerFilter ScreenRecordingsFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Static] [Export ("cinematicVideosFilter")] PHPickerFilter CinematicVideosFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("slomoVideosFilter")] PHPickerFilter SlomoVideosFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("timelapseVideosFilter")] PHPickerFilter TimelapseVideosFilter { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("spatialMediaFilter")] PHPickerFilter SpatialMediaFilter { get; } - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("playbackStyleFilter:")] PHPickerFilter GetPlaybackStyleFilter (PHAssetPlaybackStyle playbackStyle); - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("allFilterMatchingSubfilters:")] PHPickerFilter GetAllFilterMatchingSubfilters (PHPickerFilter [] subfilters); - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Static] [Export ("notFilterOfSubfilter:")] PHPickerFilter GetNotFilterOfSubfilter (PHPickerFilter subfilter); } - [NoWatch, NoTV, Mac (13, 0), iOS (14, 0)] + [NoTV, Mac (13, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [Advice ("This type should not be subclassed.")] @@ -732,7 +731,7 @@ interface PHPickerResult { string AssetIdentifier { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Category] [BaseType (typeof (PHPhotoLibrary))] @@ -746,7 +745,7 @@ interface PHPhotoLibrary_PhotosUISupport { void PresentLimitedLibraryPicker (UIViewController controller, Action completionHandler); } - [NoWatch, NoTV, Mac (13, 0), iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, Mac (13, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum PHPickerConfigurationSelection : long { Default = 0, @@ -757,7 +756,7 @@ public enum PHPickerConfigurationSelection : long { ContinuousAndOrdered = 3, } - [NoWatch, NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface PHPickerUpdateConfiguration : NSCopying, NSSecureCoding { [Export ("selectionLimit")] diff --git a/src/pushkit.cs b/src/pushkit.cs index 001cdef5d8f6..b21ed2aa2d9d 100644 --- a/src/pushkit.cs +++ b/src/pushkit.cs @@ -11,7 +11,6 @@ namespace PushKit { /// Holds the that holds the user's credentials. /// /// Apple documentation for PKPushCredentials - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26,7 +25,6 @@ interface PKPushCredentials { /// Contains a dictionary of data for a push operation. /// /// Apple documentation for PKPushPayload - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -41,7 +39,6 @@ interface PKPushPayload { /// Allows the developer to register for remote pushes. /// /// Apple documentation for PKPushRegistry - [Watch (6, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -72,20 +69,17 @@ interface PKPushRegistry { interface PKPushType { [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (9, 0)] [NoMac] [Field ("PKPushTypeVoIP")] NSString Voip { get; } [Deprecated (PlatformName.iOS, 13, 0, message: "Use directly from watchOS instead.")] - [Watch (6, 0)] [NoMac] [NoMacCatalyst] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use directly from watchOS instead.")] [Field ("PKPushTypeComplication")] NSString Complication { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("PKPushTypeFileProvider")] NSString FileProvider { get; } @@ -102,7 +96,6 @@ interface IPKPushRegistryDelegate { } /// Completion handler for registering a push operation. /// /// Apple documentation for PKPushRegistryDelegate - [Watch (6, 0)] [MacCatalyst (13, 1)] [Model] [Protocol] @@ -112,7 +105,6 @@ interface PKPushRegistryDelegate { [Export ("pushRegistry:didUpdatePushCredentials:forType:"), EventArgs ("PKPushRegistryUpdated"), EventName ("CredentialsUpdated")] void DidUpdatePushCredentials (PKPushRegistry registry, PKPushCredentials credentials, string type); - [NoWatch] [NoMac] #if !NET [Abstract] // now optional in iOS 11 diff --git a/src/pushtotalk.cs b/src/pushtotalk.cs index 6bc35fe47917..4dfa60c16a28 100644 --- a/src/pushtotalk.cs +++ b/src/pushtotalk.cs @@ -21,14 +21,14 @@ namespace PushToTalk { - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum PTChannelJoinReason : long { DeveloperRequest = 0, ChannelRestoration = 1, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum PTChannelLeaveReason : long { Unknown = 0, @@ -37,7 +37,7 @@ public enum PTChannelLeaveReason : long { SystemPolicy = 3, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum PTChannelTransmitRequestSource : long { Unknown = 0, @@ -46,7 +46,7 @@ public enum PTChannelTransmitRequestSource : long { HandsfreeButton = 3, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum PTServiceStatus : long { Ready, @@ -54,7 +54,7 @@ public enum PTServiceStatus : long { Unavailable, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum PTTransmissionMode : long { FullDuplex, @@ -62,7 +62,7 @@ public enum PTTransmissionMode : long { ListenOnly, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] [ErrorDomain ("PTInstantiationErrorDomain")] public enum PTInstantiationError : long { @@ -74,7 +74,7 @@ public enum PTInstantiationError : long { InstantiationAlreadyInProgress = 5, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Native] [ErrorDomain ("PTChannelErrorDomain")] public enum PTChannelError : long { @@ -90,7 +90,7 @@ public enum PTChannelError : long { TransmissionNotAllowed = 9, } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PTParticipant { @@ -105,7 +105,7 @@ interface PTParticipant { NativeHandle Constructor (string name, [NullAllowed] UIImage image); } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PTPushResult { @@ -118,7 +118,7 @@ interface PTPushResult { PTPushResult Create (PTParticipant participant); } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PTChannelDescriptor { @@ -135,7 +135,7 @@ interface PTChannelDescriptor { interface IPTChannelManagerDelegate { } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] #if NET [Model] @@ -200,7 +200,7 @@ interface PTChannelManagerDelegate { interface IPTChannelRestorationDelegate { } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] #if NET [Model] @@ -217,7 +217,7 @@ interface PTChannelRestorationDelegate { PTChannelDescriptor Create (NSUuid channelUuid); } - [NoWatch, NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface PTChannelManager { @@ -257,7 +257,7 @@ interface PTChannelManager { [Export ("setTransmissionMode:forChannelUUID:completionHandler:")] void SetTransmissionMode (PTTransmissionMode transmissionMode, NSUuid channelUuid, [NullAllowed] Action completionHandler); - [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] + [NoTV, NoMacCatalyst, NoMac, iOS (17, 0)] [Async] [Export ("setAccessoryButtonEventsEnabled:forChannelUUID:completionHandler:")] void SetAccessoryButtonEvents (bool enabled, NSUuid channelUuid, [NullAllowed] Action completionHandler); diff --git a/src/qtkit.cs b/src/qtkit.cs deleted file mode 100644 index 8b137891791f..000000000000 --- a/src/qtkit.cs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/quicklook.cs b/src/quicklook.cs index ae8d479dd984..7b841c61b331 100644 --- a/src/quicklook.cs +++ b/src/quicklook.cs @@ -219,7 +219,7 @@ interface QLPreviewItem { delegate CGPDFDocument QLPreviewReplyUIDocumentCreationHandler (QLPreviewReply reply, out NSError error); [NoMac] - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface QLPreviewReply { [Export ("stringEncoding")] @@ -246,7 +246,7 @@ interface QLPreviewReply { } [NoMac] - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface QLPreviewReplyAttachment { @@ -261,7 +261,7 @@ interface QLPreviewReplyAttachment { } [NoMac] - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface QLFilePreviewRequest { @@ -270,13 +270,12 @@ interface QLFilePreviewRequest { } [NoMac] - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface QLPreviewProvider : NSExtensionRequestHandling { } - [NoWatch] [NoTV] [NoMac] // availability not mentioned in the header files [iOS (15, 0), MacCatalyst (15, 0)] @@ -316,7 +315,7 @@ interface QLPreviewingController { } #else [Static] - [NoiOS][NoMacCatalyst][NoWatch][NoTV] + [NoiOS][NoMacCatalyst][NoTV] interface QLThumbnailImage { [Internal, Field ("kQLThumbnailOptionScaleFactorKey")] NSString OptionScaleFactorKey { get; } diff --git a/src/quicklookUI.cs b/src/quicklookUI.cs index ddb73629ae73..5cb9990ce5e0 100644 --- a/src/quicklookUI.cs +++ b/src/quicklookUI.cs @@ -189,7 +189,7 @@ interface QLPreviewingController { void ProvidePreview (QLFilePreviewRequest request, Action handler); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface QLFilePreviewRequest { @@ -197,13 +197,13 @@ interface QLFilePreviewRequest { NSUrl FileUrl { get; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface QLPreviewProvider : NSExtensionRequestHandling { } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface QLPreviewReplyAttachment { @@ -221,7 +221,7 @@ interface QLPreviewReplyAttachment { delegate NSData QLPreviewReplyDataCreationHandler (QLPreviewReply reply, out NSError error); delegate CGPDFDocument QLPreviewReplyUIDocumentCreationHandler (QLPreviewReply reply, out NSError error); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface QLPreviewReply { [Export ("stringEncoding")] diff --git a/src/replaykit.cs b/src/replaykit.cs index fa3fd9fe26a5..156ebc4079d0 100644 --- a/src/replaykit.cs +++ b/src/replaykit.cs @@ -164,17 +164,17 @@ bool MicrophoneEnabled { void StopRecording (NSUrl url, [NullAllowed] Action completionHandler); [Async] - [TV (15, 4), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 4), iOS (15, 0), MacCatalyst (15, 0)] [Export ("exportClipToURL:duration:completionHandler:")] void ExportClip (NSUrl url, double duration, [NullAllowed] Action completionHandler); [Async] - [TV (15, 4), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 4), iOS (15, 0), MacCatalyst (15, 0)] [Export ("startClipBufferingWithCompletionHandler:")] void StartClipBuffering ([NullAllowed] Action completionHandler); [Async] - [TV (15, 4), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 4), iOS (15, 0), MacCatalyst (15, 0)] [Export ("stopClipBufferingWithCompletionHandler:")] void StopClipBuffering ([NullAllowed] Action completionHandler); } @@ -376,11 +376,8 @@ interface RPBroadcastHandler : NSExtensionRequestHandling { [Export ("updateServiceInfo:")] void UpdateServiceInfo (NSDictionary serviceInfo); - // NSInvalidArgumentException -[RPBroadcastHandler updateBroadcastURL:]: unrecognized selector sent to instance 0x608001a4b160 - // https://trello.com/c/eA440suj/91-33875315-rpbroadcasthandler-updatebroadcasturl-unrecognized-selector - // - //[Export ("updateBroadcastURL:")] - //void UpdateBroadcastUrl (NSUrl broadcastUrl); + [Export ("updateBroadcastURL:")] + void UpdateBroadcastUrl (NSUrl broadcastUrl); } /// Apple documentation for RPBroadcastMP4ClipHandler diff --git a/src/rgen/Microsoft.Macios.Binding.Common/Microsoft.Macios.Binding.Common.csproj b/src/rgen/Microsoft.Macios.Binding.Common/Microsoft.Macios.Binding.Common.csproj index 38c654e7fd98..d49368fd18d9 100644 --- a/src/rgen/Microsoft.Macios.Binding.Common/Microsoft.Macios.Binding.Common.csproj +++ b/src/rgen/Microsoft.Macios.Binding.Common/Microsoft.Macios.Binding.Common.csproj @@ -25,6 +25,9 @@ external\ArgumentSemantic.cs + + external\BindingTypeTag.cs + external\ExportTag.cs diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer.Sample/Examples.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer.Sample/Examples.cs index e5d4a943ddf0..1a3835af3a23 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer.Sample/Examples.cs +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer.Sample/Examples.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Foundation; using ObjCBindings; @@ -30,4 +32,3 @@ public enum Test { } } - diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/AnalyzerReleases.Unshipped.md b/src/rgen/Microsoft.Macios.Bindings.Analyzer/AnalyzerReleases.Unshipped.md index c2fa06a3b9eb..c13c36ccb555 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/AnalyzerReleases.Unshipped.md +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/AnalyzerReleases.Unshipped.md @@ -5,9 +5,15 @@ | Rule ID | Category | Severity | Notes | |---------|----------|----------|---------------------------------------------------------------------------| | RBI0001 | Usage | Error | Binding types should be declared as partial classes. | -| RBI0002 | Usage | Error | Smart enum values must be tagged with an Field attribute. | -| RBI0003 | Usage | Error | Smart enum backing field cannot appear more than once. | -| RBI0004 | Usage | Error | Smart enum backing field must represent a valid C# identifier to be used. | -| RBI0005 | Usage | Error | Non Apple framework bindings must provide a library name. | -| RBI0006 | Usage | Warning | Do not provide the LibraryName for known Apple frameworks. | -| RBI0007 | Usage | Error | Enum values must be tagged with Field. | +| RBI0002 | Usage | Error | BindingType must be on a class. | +| RBI0003 | Usage | Error | BindingType must be on a class. | +| RBI0004 | Usage | Error | BindingType must be on a static class. | +| RBI0005 | Usage | Error | BindingType must be on an interface. | +| RBI0006 | Usage | Error | BindingType must be on an enumerator. | +| RBI0007 | Usage | Error | BindingType must be on a class. | +| RBI0008 | Usage | Error | Smart enum values must be tagged with an Field attribute. | +| RBI0009 | Usage | Error | Smart enum backing field cannot appear more than once. | +| RBI0010 | Usage | Error | Smart enum backing field must represent a valid C# identifier to be used. | +| RBI0011 | Usage | Error | Non Apple framework bindings must provide a library name. | +| RBI0012 | Usage | Warning | Do not provide the LibraryName for known Apple frameworks. | +| RBI0013 | Usage | Error | Enum values must be tagged with Field. | diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/BindingTypeSemanticAnalyzer.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer/BindingTypeSemanticAnalyzer.cs index 6d8d8d07a7cc..a6179bc06551 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/BindingTypeSemanticAnalyzer.cs +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/BindingTypeSemanticAnalyzer.cs @@ -1,3 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; using Microsoft.CodeAnalysis; @@ -5,6 +10,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.Macios.Bindings.Analyzer.Extensions; +using Microsoft.Macios.Generator; namespace Microsoft.Macios.Bindings.Analyzer; @@ -13,39 +19,255 @@ namespace Microsoft.Macios.Bindings.Analyzer; /// pattern. /// [DiagnosticAnalyzer (LanguageNames.CSharp)] -public class BindingTypeSemanticAnalyzer : DiagnosticAnalyzer, IBindingTypeAnalyzer { - +public class BindingTypeSemanticAnalyzer : DiagnosticAnalyzer, IBindingTypeAnalyzer { + /// + /// All binding types should be partial. + /// internal static readonly DiagnosticDescriptor RBI0001 = new ( "RBI0001", new LocalizableResourceString (nameof (Resources.RBI0001Title), Resources.ResourceManager, typeof (Resources)), - new LocalizableResourceString (nameof (Resources.RBI0001MessageFormat), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0001MessageFormat), Resources.ResourceManager, + typeof (Resources)), + "Usage", + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: new LocalizableResourceString (nameof (Resources.RBI0001Description), Resources.ResourceManager, + typeof (Resources)) + ); + + /// + /// BindingType<Class> can only decorate partial classes. + /// + internal static readonly DiagnosticDescriptor RBI0002 = new ( + "RBI0002", + new LocalizableResourceString (nameof (Resources.RBI0002Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0002MessageFormat), Resources.ResourceManager, + typeof (Resources)), + "Usage", + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: new LocalizableResourceString (nameof (Resources.RBI0002Description), Resources.ResourceManager, + typeof (Resources)) + ); + + /// + /// BindingType<Category> can only decorate partial classes. + /// + internal static readonly DiagnosticDescriptor RBI0003 = new ( + "RBI0003", + new LocalizableResourceString (nameof (Resources.RBI0003Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0003MessageFormat), Resources.ResourceManager, + typeof (Resources)), + "Usage", + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: new LocalizableResourceString (nameof (Resources.RBI0003Description), Resources.ResourceManager, + typeof (Resources)) + ); + + /// + /// BindingType<Category> can only decorate static classes. + /// + internal static readonly DiagnosticDescriptor RBI0004 = new ( + "RBI0004", + new LocalizableResourceString (nameof (Resources.RBI0004Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0004MessageFormat), Resources.ResourceManager, + typeof (Resources)), + "Usage", + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: new LocalizableResourceString (nameof (Resources.RBI0004Description), Resources.ResourceManager, + typeof (Resources)) + ); + + /// + /// BindingType<Protocol> can only decorate interfaces. + /// + internal static readonly DiagnosticDescriptor RBI0005 = new ( + "RBI0005", + new LocalizableResourceString (nameof (Resources.RBI0005Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0005MessageFormat), Resources.ResourceManager, + typeof (Resources)), + "Usage", + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: new LocalizableResourceString (nameof (Resources.RBI0005Description), Resources.ResourceManager, + typeof (Resources)) + ); + + /// + /// BindingType can only decorate enumerators. + /// + internal static readonly DiagnosticDescriptor RBI0006 = new ( + "RBI0006", + new LocalizableResourceString (nameof (Resources.RBI0006Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0006MessageFormat), Resources.ResourceManager, + typeof (Resources)), + "Usage", + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: new LocalizableResourceString (nameof (Resources.RBI0006Description), Resources.ResourceManager, + typeof (Resources)) + ); + + internal static readonly DiagnosticDescriptor RBI0007 = new ( + "RBI0007", + new LocalizableResourceString (nameof (Resources.RBI0007Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0007MessageFormat), Resources.ResourceManager, + typeof (Resources)), "Usage", DiagnosticSeverity.Error, isEnabledByDefault: true, - description: new LocalizableResourceString (nameof (Resources.RBI0001Description), Resources.ResourceManager, typeof (Resources)) + description: new LocalizableResourceString (nameof (Resources.RBI0007Description), Resources.ResourceManager, + typeof (Resources)) ); - public override ImmutableArray SupportedDiagnostics { get; } = [RBI0001]; + public override ImmutableArray SupportedDiagnostics { get; } = [ + RBI0001, + RBI0002, + RBI0003, + RBI0004, + RBI0005, + RBI0006, + RBI0007, + ]; public override void Initialize (AnalysisContext context) { context.ConfigureGeneratedCodeAnalysis (GeneratedCodeAnalysisFlags.None); context.EnableConcurrentExecution (); - context.RegisterSyntaxNodeAction (AnalysisContext, SyntaxKind.ClassDeclaration); + context.RegisterSyntaxNodeAction (AnalysisContext, + SyntaxKind.ClassDeclaration, + SyntaxKind.InterfaceDeclaration, + SyntaxKind.EnumDeclaration); } void AnalysisContext (SyntaxNodeAnalysisContext context) => this.AnalyzeBindingType (context); - public ImmutableArray Analyze (PlatformName _, ClassDeclarationSyntax declarationNode, INamedTypeSymbol symbol) + static readonly HashSet attributes = new HashSet (AttributesNames.BindingTypes); + public IReadOnlySet AttributeNames => attributes; + + ImmutableArray ValidateClass (BaseTypeDeclarationSyntax declarationNode, INamedTypeSymbol symbol) + { + var bucket = ImmutableArray.CreateBuilder (); + if (declarationNode is ClassDeclarationSyntax classDeclarationSyntax) { + if (!classDeclarationSyntax.IsPartial ()) { + var partialDiagnostic = Diagnostic.Create ( + descriptor: RBI0001, // Binding types should be declared as partial classes. + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (partialDiagnostic); + } + } else { + var notAClassDiagnostic = Diagnostic.Create ( + descriptor: RBI0002, // BindingType must be on a class + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (notAClassDiagnostic); + } + + return bucket.ToImmutable (); + } + + ImmutableArray ValidateCategory (BaseTypeDeclarationSyntax declarationNode, INamedTypeSymbol symbol) { - if (declarationNode.Modifiers.Any (x => x.IsKind (SyntaxKind.PartialKeyword))) - return []; + var bucket = ImmutableArray.CreateBuilder (); + if (declarationNode is ClassDeclarationSyntax classDeclarationSyntax) { + if (!classDeclarationSyntax.IsPartial ()) { + var partialDiagnostic = Diagnostic.Create ( + descriptor: RBI0001, // Binding types should be declared as partial classes. + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (partialDiagnostic); + } - var diagnostic = Diagnostic.Create (RBI0001, // Binding types should be declared as partial classes. - declarationNode.Identifier.GetLocation (), // point to where the 'class' keyword is used - symbol.ToDisplayString ()); - return [diagnostic]; + if (!classDeclarationSyntax.IsStatic ()) { + var partialDiagnostic = Diagnostic.Create ( + descriptor: RBI0004, // BindingType must be on a static class + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (partialDiagnostic); + } + } else { + var notAClassDiagnostic = Diagnostic.Create ( + descriptor: RBI0003, // BindingType must be on a class + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (notAClassDiagnostic); + } + return bucket.ToImmutable (); } + + ImmutableArray ValidateProtocol (BaseTypeDeclarationSyntax declarationNode, INamedTypeSymbol symbol) + { + var bucket = ImmutableArray.CreateBuilder (); + if (declarationNode is InterfaceDeclarationSyntax interfaceDeclarationSyntax) { + if (!interfaceDeclarationSyntax.IsPartial ()) { + var partialDiagnostic = Diagnostic.Create ( + descriptor: RBI0001, // Binding types should be declared as partial classes. + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (partialDiagnostic); + } + } else { + var notAInterfaceDiagnostic = Diagnostic.Create ( + descriptor: RBI0005, // BindingType must be on an interface + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (notAInterfaceDiagnostic); + } + + return bucket.ToImmutable (); + } + + ImmutableArray ValidateStrongDictionary (BaseTypeDeclarationSyntax declarationNode, + INamedTypeSymbol symbol) + { + var bucket = ImmutableArray.CreateBuilder (); + if (declarationNode is ClassDeclarationSyntax classDeclarationSyntax) { + if (!classDeclarationSyntax.IsPartial ()) { + var partialDiagnostic = Diagnostic.Create ( + descriptor: RBI0001, // Binding types should be declared as partial classes. + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (partialDiagnostic); + } + } else { + var notAInterfaceDiagnostic = Diagnostic.Create ( + descriptor: RBI0007, // BindingType must be on a class + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (notAInterfaceDiagnostic); + } + + return bucket.ToImmutable (); + } + + public ImmutableArray ValidateSmartEnum (BaseTypeDeclarationSyntax declarationNode, + INamedTypeSymbol symbol) + { + var bucket = ImmutableArray.CreateBuilder (); + if (declarationNode is not EnumDeclarationSyntax) { + var notAInterfaceDiagnostic = Diagnostic.Create ( + descriptor: RBI0006, // BindingType must be on an enumerator + location: declarationNode.Identifier.GetLocation (), + messageArgs: symbol.ToDisplayString ()); + bucket.Add (notAInterfaceDiagnostic); + } + + return bucket.ToImmutable (); + } + + public ImmutableArray Analyze (string matchedAttribute, PlatformName _, + BaseTypeDeclarationSyntax declarationNode, INamedTypeSymbol symbol) + => matchedAttribute switch { + AttributesNames.BindingClassAttribute => ValidateClass (declarationNode, symbol), + AttributesNames.BindingCategoryAttribute => ValidateCategory (declarationNode, symbol), + AttributesNames.BindingProtocolAttribute => ValidateProtocol (declarationNode, symbol), + AttributesNames.BindingAttribute => ValidateSmartEnum (declarationNode, symbol), + AttributesNames.BindingStrongDictionaryAttribute => ValidateStrongDictionary (declarationNode, symbol), + _ => throw new InvalidOperationException ($"Not recognized attribute {matchedAttribute}.") + }; } diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/BaseTypeDeclarationSyntaxExtensions.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/BaseTypeDeclarationSyntaxExtensions.cs new file mode 100644 index 000000000000..cc8ce3dd9b0d --- /dev/null +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/BaseTypeDeclarationSyntaxExtensions.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Microsoft.Macios.Bindings.Analyzer.Extensions; + +public static class BaseTypeDeclarationSyntaxExtensions { + + /// + /// Returns if the base type declaration was declared as a partial one. + /// + /// The declaration under test. + /// True if the declaration is partial. + public static bool IsPartial (this BaseTypeDeclarationSyntax baseTypeDeclarationSyntax) + => baseTypeDeclarationSyntax.Modifiers.Any (x => x.IsKind (SyntaxKind.PartialKeyword)); + + /// + /// Returns if the based type declaration was declared as a static one. + /// + /// The declaration under test. + /// True if the declaration is static. + public static bool IsStatic (this BaseTypeDeclarationSyntax baseTypeDeclarationSyntax) + => baseTypeDeclarationSyntax.Modifiers.Any (x => x.IsKind (SyntaxKind.StaticKeyword)); + +} diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/IBindingTypeAnalyzerExtensions.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/IBindingTypeAnalyzerExtensions.cs index e0d6a0e57baf..55dd3924013f 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/IBindingTypeAnalyzerExtensions.cs +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/IBindingTypeAnalyzerExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Diagnostics; @@ -24,19 +26,18 @@ public static void AnalyzeBindingType (this IBindingTypeAnalyzer self, Syn return; } - // the c# syntax is a a list of lists of attributes. That is why we need to iterate through the list of lists + // The c# syntax is a a list of lists of attributes. That is why we need to iterate through the list of lists foreach (var attributeData in boundAttributes) { // based on the type use the correct parser to retrieve the data var attributeType = attributeData.AttributeClass?.ToDisplayString (); - switch (attributeType) { - case AttributesNames.BindingAttribute: - // validate that the class is partial, else we need to report an error - var diagnostics = self.Analyze (context.Compilation.GetCurrentPlatform (), - declarationNode, declaredSymbol); - foreach (var diagnostic in diagnostics) - context.ReportDiagnostic (diagnostic); - break; - } + // ignore attrs whose name we cannot get, or we do not care about + if (attributeType is null || !self.AttributeNames.Contains (attributeType)) + continue; + + var diagnostics = self.Analyze (attributeType, context.Compilation.GetCurrentPlatform (), + declarationNode, declaredSymbol); + foreach (var diagnostic in diagnostics) + context.ReportDiagnostic (diagnostic); } } } diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/PlatformNameExtensions.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/PlatformNameExtensions.cs index 2564975dfbe2..1e8266006427 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/PlatformNameExtensions.cs +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/PlatformNameExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Xamarin.Utils; namespace Microsoft.Macios.Bindings.Analyzer.Extensions; diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/IBindingTypeAnalyzer.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer/IBindingTypeAnalyzer.cs index 71855d16413c..8e2fad622545 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/IBindingTypeAnalyzer.cs +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/IBindingTypeAnalyzer.cs @@ -1,3 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System.Collections.Generic; using System.Collections.Immutable; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; @@ -8,5 +12,7 @@ namespace Microsoft.Macios.Bindings.Analyzer; /// Interface to be implemented by those analyzer that will be looking at BindingTypes. /// public interface IBindingTypeAnalyzer where T : BaseTypeDeclarationSyntax { - ImmutableArray Analyze (PlatformName platformName, T declarationNode, INamedTypeSymbol symbol); + IReadOnlySet AttributeNames { get; } + + ImmutableArray Analyze (string matchedAttribute, PlatformName platformName, T declarationNode, INamedTypeSymbol symbol); } diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Microsoft.Macios.Bindings.Analyzer.csproj b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Microsoft.Macios.Bindings.Analyzer.csproj index 59ed25bc60b0..5a77c43cfbfb 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Microsoft.Macios.Bindings.Analyzer.csproj +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Microsoft.Macios.Bindings.Analyzer.csproj @@ -42,9 +42,15 @@ Generator/Attributes/FieldData.cs + + Generator/Attributes/ExportData.cs + Generator/Attributes/AttributeParsingError.cs + + Generator/Attributes/BindingTypeData.cs + Generator/Attributes/ObsoletedOSPlatformData.cs diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.Designer.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.Designer.cs index e671b0176398..ae3a368d09cc 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.Designer.cs +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.Designer.cs @@ -170,5 +170,113 @@ internal static string RBI0007Title { return ResourceManager.GetString("RBI0007Title", resourceCulture); } } + + internal static string RBI0008Description { + get { + return ResourceManager.GetString("RBI0008Description", resourceCulture); + } + } + + internal static string RBI0008MessageFormat { + get { + return ResourceManager.GetString("RBI0008MessageFormat", resourceCulture); + } + } + + internal static string RBI0008Title { + get { + return ResourceManager.GetString("RBI0008Title", resourceCulture); + } + } + + internal static string RBI0009Description { + get { + return ResourceManager.GetString("RBI0009Description", resourceCulture); + } + } + + internal static string RBI0009MessageFormat { + get { + return ResourceManager.GetString("RBI0009MessageFormat", resourceCulture); + } + } + + internal static string RBI0009Title { + get { + return ResourceManager.GetString("RBI0009Title", resourceCulture); + } + } + + internal static string RBI0010Description { + get { + return ResourceManager.GetString("RBI0010Description", resourceCulture); + } + } + + internal static string RBI0010MessageFormat { + get { + return ResourceManager.GetString("RBI0010MessageFormat", resourceCulture); + } + } + + internal static string RBI0010Title { + get { + return ResourceManager.GetString("RBI0010Title", resourceCulture); + } + } + + internal static string RBI0011Description { + get { + return ResourceManager.GetString("RBI0011Description", resourceCulture); + } + } + + internal static string RBI0011MessageFormat { + get { + return ResourceManager.GetString("RBI0011MessageFormat", resourceCulture); + } + } + + internal static string RBI0011Title { + get { + return ResourceManager.GetString("RBI0011Title", resourceCulture); + } + } + + internal static string RBI0012Description { + get { + return ResourceManager.GetString("RBI0012Description", resourceCulture); + } + } + + internal static string RBI0012MessageFormat { + get { + return ResourceManager.GetString("RBI0012MessageFormat", resourceCulture); + } + } + + internal static string RBI0012Title { + get { + return ResourceManager.GetString("RBI0012Title", resourceCulture); + } + } + + internal static string RBI0013Description { + get { + return ResourceManager.GetString("RBI0013Description", resourceCulture); + } + } + + internal static string RBI0013MessageFormat { + get { + return ResourceManager.GetString("RBI0013MessageFormat", resourceCulture); + } + } + + internal static string RBI0013Title { + get { + return ResourceManager.GetString("RBI0013Title", resourceCulture); + } + } } } diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.resx b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.resx index 7b695353ded7..d7139f18bd6b 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.resx +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.resx @@ -18,80 +18,173 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + In order for the code to be generated all binding types have to be declared as partial classes. - The binding type '{0}' must declared as a partial class + The binding type '{0}' must be declared partial '{0}' is the name of the class. Binding type declaration must be partial + + - In order for the code to be generated a smart enum value has to have a backing field. + BindingType<Class> can only decorate partial classes. + BindingType<Class> can only be used to decorate a class but was found on '{0}' which is not a class + '{0}' is the name of type. + + + BindingType<Class> must be on a class + + + + + + BindingType<Category> can only decorate partial classes. + + + BindingType<Category> can only be used to decorate a class but was found on '{0}' which is not a class + '{0}' is the name of type. + + + BindingType<Category> must be on a class + + + + + + BindingType<Category> can only decorate static classes. + + + BindingType<Category> can only be used to decorate a static class but was found on '{0}' which is not static + '{0}' is the name of type. + + + BindingType<Category> must be on a static class + + + + + + BindingType<Protocol> can only decorate interfaces. + + + BindingType<Protocol> can only be used to decorate an interface but was found on '{0}' which is not an interface + '{0}' is the name of type. + + + BindingType<Protocol> must be on an interface + + + + + + BindingType can only decorate enumerators. + + + BindingType can only be used to decorate an enumerator but was found on '{0}' which is not an enumerator + '{0}' is the name of type. + + + BindingType must be on an enumerator + + + + + + BindingType<StrongDictionary> can only decorate classes. + + + BindingType<StrongDictionary> can only be used to decorate a class but was found on '{0}' which is not a class + '{0}' is the name of type. + + + BindingType<StrongDictionary> must be on a class + + + + + + In order for the code to be generated a smart enum value has to have a backing field. + + The enum value '{0}' must be tagged with a Field<EnumValue> attribute '{0}' is the name of the enumerator value. - + Smart enum values must be tagged with an Field<EnumValue> attribute - + + + Smart enum backing field cannot appear more than once. - + The backing field '{0}' for the enum value '{1}' is already in use for the enum value '{2}' '{0}' is the name of the enum value. '{1}' is the name of a native field. '{2}' is the previous enum value - + Smart enum backing field cannot appear more than once - + + + Smart enum backing field must be a valid identifier. - + The enum value '{0}' backing field '{1}' is not a valid identifier '{0}' is the name of the enum value. '{1}' is the name of a native field. - + Smart enum backing field must represent a valid C# identifier to be used - + + + Smart enum backing field for a non Apple framework must provide a library name. - + The field attribute for the enum value '{0}' must set the property 'LibraryName' '{0}' is the name of the enumerator value. - + Non Apple framework bindings must provide a library name - + + + Fields of known Apple frameworks should not provide a LibraryName. - + The Field attribute for the enum value '{0}' must not provide a value for 'LibraryName' '{0}' is the name of the native field. - + Do not provide the LibraryName for known Apple frameworks - + + + Wrong flags were used in the FieldAttribute when applying it on an enum value. - + Used attribute '{0}' on enum value '{1}' when 'ObjCBindings.FieldAttribute<ObjCBindings.EnumValue>' was expected '{0}' is the name of an attribute. '{1}' is the name of the enumerator value. - + Enum values must be tagged with Field<EnumValue> diff --git a/src/rgen/Microsoft.Macios.Bindings.Analyzer/SmartEnumsAnalyzer.cs b/src/rgen/Microsoft.Macios.Bindings.Analyzer/SmartEnumsAnalyzer.cs index e4818a1af68d..815ab55fe2ce 100644 --- a/src/rgen/Microsoft.Macios.Bindings.Analyzer/SmartEnumsAnalyzer.cs +++ b/src/rgen/Microsoft.Macios.Bindings.Analyzer/SmartEnumsAnalyzer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; @@ -21,96 +23,102 @@ public class SmartEnumsAnalyzer : DiagnosticAnalyzer, IBindingTypeAnalyzer /// All enum values must have a Field attribute /// - internal static readonly DiagnosticDescriptor RBI0002 = new ( - "RBI0002", - new LocalizableResourceString (nameof (Resources.RBI0002Title), Resources.ResourceManager, typeof (Resources)), - new LocalizableResourceString (nameof (Resources.RBI0002MessageFormat), Resources.ResourceManager, + internal static readonly DiagnosticDescriptor RBI0008 = new ( + "RBI0008", + new LocalizableResourceString (nameof (Resources.RBI0008Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0008MessageFormat), Resources.ResourceManager, typeof (Resources)), "Usage", DiagnosticSeverity.Error, isEnabledByDefault: true, - description: new LocalizableResourceString (nameof (Resources.RBI0002Description), Resources.ResourceManager, + description: new LocalizableResourceString (nameof (Resources.RBI0008Description), Resources.ResourceManager, typeof (Resources)) ); /// /// Do not allow duplicated backing fields /// - internal static readonly DiagnosticDescriptor RBI0003 = new ( - "RBI0003", - new LocalizableResourceString (nameof (Resources.RBI0003Title), Resources.ResourceManager, typeof (Resources)), - new LocalizableResourceString (nameof (Resources.RBI0003MessageFormat), Resources.ResourceManager, + internal static readonly DiagnosticDescriptor RBI0009 = new ( + "RBI0009", + new LocalizableResourceString (nameof (Resources.RBI0009Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0009MessageFormat), Resources.ResourceManager, typeof (Resources)), "Usage", DiagnosticSeverity.Error, isEnabledByDefault: true, - description: new LocalizableResourceString (nameof (Resources.RBI0003Description), Resources.ResourceManager, + description: new LocalizableResourceString (nameof (Resources.RBI0009Description), Resources.ResourceManager, typeof (Resources)) ); /// /// Fields must be a valid identifier /// - internal static readonly DiagnosticDescriptor RBI0004 = new ( - "RBI0004", - new LocalizableResourceString (nameof (Resources.RBI0004Title), Resources.ResourceManager, typeof (Resources)), - new LocalizableResourceString (nameof (Resources.RBI0004MessageFormat), Resources.ResourceManager, + internal static readonly DiagnosticDescriptor RBI0010 = new ( + "RBI0010", + new LocalizableResourceString (nameof (Resources.RBI0010Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0010MessageFormat), Resources.ResourceManager, typeof (Resources)), "Usage", DiagnosticSeverity.Error, isEnabledByDefault: true, - description: new LocalizableResourceString (nameof (Resources.RBI0004Description), Resources.ResourceManager, + description: new LocalizableResourceString (nameof (Resources.RBI0010Description), Resources.ResourceManager, typeof (Resources)) ); /// /// If not an apple framework, we should provide the library path /// - internal static readonly DiagnosticDescriptor RBI0005 = new ( - "RBI0005", - new LocalizableResourceString (nameof (Resources.RBI0005Title), Resources.ResourceManager, typeof (Resources)), - new LocalizableResourceString (nameof (Resources.RBI0005MessageFormat), Resources.ResourceManager, + internal static readonly DiagnosticDescriptor RBI0011 = new ( + "RBI0011", + new LocalizableResourceString (nameof (Resources.RBI0011Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0011MessageFormat), Resources.ResourceManager, typeof (Resources)), "Usage", DiagnosticSeverity.Error, isEnabledByDefault: true, - description: new LocalizableResourceString (nameof (Resources.RBI0005Description), Resources.ResourceManager, + description: new LocalizableResourceString (nameof (Resources.RBI0011Description), Resources.ResourceManager, typeof (Resources)) ); /// /// if apple framework, the library path should be empty /// - internal static readonly DiagnosticDescriptor RBI0006 = new ( - "RBI0006", - new LocalizableResourceString (nameof (Resources.RBI0006Title), Resources.ResourceManager, typeof (Resources)), - new LocalizableResourceString (nameof (Resources.RBI0006MessageFormat), Resources.ResourceManager, + internal static readonly DiagnosticDescriptor RBI0012 = new ( + "RBI0012", + new LocalizableResourceString (nameof (Resources.RBI0012Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0012MessageFormat), Resources.ResourceManager, typeof (Resources)), "Usage", DiagnosticSeverity.Warning, isEnabledByDefault: true, - description: new LocalizableResourceString (nameof (Resources.RBI0006Description), Resources.ResourceManager, + description: new LocalizableResourceString (nameof (Resources.RBI0012Description), Resources.ResourceManager, typeof (Resources)) ); /// /// User used the wrong flag for the attribute /// - internal static readonly DiagnosticDescriptor RBI0007 = new ( - "RBI0007", - new LocalizableResourceString (nameof (Resources.RBI0007Title), Resources.ResourceManager, typeof (Resources)), - new LocalizableResourceString (nameof (Resources.RBI0007MessageFormat), Resources.ResourceManager, + internal static readonly DiagnosticDescriptor RBI0013 = new ( + "RBI0013", + new LocalizableResourceString (nameof (Resources.RBI0013Title), Resources.ResourceManager, typeof (Resources)), + new LocalizableResourceString (nameof (Resources.RBI0013MessageFormat), Resources.ResourceManager, typeof (Resources)), "Usage", DiagnosticSeverity.Error, isEnabledByDefault: true, - description: new LocalizableResourceString (nameof (Resources.RBI0007Description), Resources.ResourceManager, + description: new LocalizableResourceString (nameof (Resources.RBI0013Description), Resources.ResourceManager, typeof (Resources)) ); - public override ImmutableArray SupportedDiagnostics { get; } = - [RBI0002, RBI0003, RBI0004, RBI0005, RBI0006, RBI0007]; + public override ImmutableArray SupportedDiagnostics { get; } = [ + RBI0008, + RBI0009, + RBI0010, + RBI0011, + RBI0012, + RBI0013, + ]; public override void Initialize (AnalysisContext context) { @@ -122,7 +130,10 @@ public override void Initialize (AnalysisContext context) void AnalysisContext (SyntaxNodeAnalysisContext context) => this.AnalyzeBindingType (context); - public ImmutableArray Analyze (PlatformName platformName, EnumDeclarationSyntax declarationNode, + static readonly HashSet attributes = [AttributesNames.BindingAttribute]; + public IReadOnlySet AttributeNames => attributes; + + public ImmutableArray Analyze (string matchedAttribute, PlatformName platformName, EnumDeclarationSyntax declarationNode, INamedTypeSymbol symbol) { // we want to ensure several things: @@ -160,7 +171,7 @@ public ImmutableArray Analyze (PlatformName platformName, EnumDeclar if (attributes.Count == 0) { // All enum values are marked with a Field attribute, therefore add a diagnostic bucket.Add (Diagnostic.Create ( - RBI0002, // Smart enum values must be tagged with an Field attribute. + RBI0008, // Smart enum values must be tagged with an Field attribute. fieldSymbol.Locations.First (), fieldSymbol.ToDisplayString ())); continue; @@ -181,7 +192,7 @@ public ImmutableArray Analyze (PlatformName platformName, EnumDeclar if (backingFields.TryGetValue (fieldData.Value.SymbolName, out var previousEnumValue)) { // All symbol names have to be unique bucket.Add (Diagnostic.Create ( - RBI0003, // The backing field '{0}' for the enum value '{1}' is already in use for the enum value '{2}' + RBI0009, // The backing field '{0}' for the enum value '{1}' is already in use for the enum value '{2}' fieldSyntax.GetLocation (), fieldSymbol.ToDisplayString (), fieldData.Value.SymbolName, fieldSymbol.ToDisplayString ().Trim (), previousEnumValue)); @@ -194,7 +205,7 @@ public ImmutableArray Analyze (PlatformName platformName, EnumDeclar // If the Field attribute is not from a known apple library, the library name is set if (string.IsNullOrWhiteSpace (fieldData.Value.LibraryName)) { bucket.Add (Diagnostic.Create ( - RBI0005, // Non Apple framework bindings must provide a library name. + RBI0011, // Non Apple framework bindings must provide a library name. fieldSyntax.GetLocation (), fieldSymbol.ToDisplayString ())); } @@ -202,7 +213,7 @@ public ImmutableArray Analyze (PlatformName platformName, EnumDeclar // If the Field attribute is from a known apple library, the lib should be null if (fieldData.Value.LibraryName is not null) { bucket.Add (Diagnostic.Create ( - RBI0006, // Do not provide the LibraryName for known Apple frameworks. + RBI0012, // Do not provide the LibraryName for known Apple frameworks. fieldSyntax.GetLocation (), fieldSymbol.ToDisplayString ())); } @@ -212,7 +223,7 @@ public ImmutableArray Analyze (PlatformName platformName, EnumDeclar switch (errorTuple.Error) { case FieldData.ParsingError.NotIdentifier: // Backing field is not a valid identifier. - bucket.Add (Diagnostic.Create (RBI0004, + bucket.Add (Diagnostic.Create (RBI0010, fieldSyntax .GetLocation (), // Smart enum backing field must represent a valid C# identifier to be used. fieldSymbol.ToDisplayString (), errorTuple.Value)); @@ -225,7 +236,7 @@ public ImmutableArray Analyze (PlatformName platformName, EnumDeclar .FirstOrDefault (s => s.StartsWith (AttributesNames.FieldAttribute)); if (fieldAttr is not null) { bucket.Add (Diagnostic.Create ( - RBI0007, // Enum values must be tagged with Field. + RBI0013, // Enum values must be tagged with Field. fieldSymbol.Locations.First (), fieldAttr, fieldSymbol.ToDisplayString ())); } diff --git a/src/rgen/Microsoft.Macios.Bindings.CodeFixers/BindingTypeCodeFixProvider.cs b/src/rgen/Microsoft.Macios.Bindings.CodeFixers/BindingTypeCodeFixProvider.cs index af5b3790e887..946da3d53c55 100644 --- a/src/rgen/Microsoft.Macios.Bindings.CodeFixers/BindingTypeCodeFixProvider.cs +++ b/src/rgen/Microsoft.Macios.Bindings.CodeFixers/BindingTypeCodeFixProvider.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using System.Composition; using System.Linq; diff --git a/src/rgen/Microsoft.Macios.Generator.Sample/SampleBinding.cs b/src/rgen/Microsoft.Macios.Generator.Sample/SampleBinding.cs index 7c2427c1473e..d636e8b6d18d 100644 --- a/src/rgen/Microsoft.Macios.Generator.Sample/SampleBinding.cs +++ b/src/rgen/Microsoft.Macios.Generator.Sample/SampleBinding.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using ObjCBindings; namespace Microsoft.Macios.Generator.Sample; diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/AttributeParsingError.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/AttributeParsingError.cs index ad8dd516b643..5ed9d9349976 100644 --- a/src/rgen/Microsoft.Macios.Generator/Attributes/AttributeParsingError.cs +++ b/src/rgen/Microsoft.Macios.Generator/Attributes/AttributeParsingError.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Diagnostics.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/BindingTypeData.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/BindingTypeData.cs new file mode 100644 index 000000000000..d9258f5620be --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Attributes/BindingTypeData.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.CodeAnalysis; + +namespace Microsoft.Macios.Generator.Attributes; + +readonly struct BindingTypeData : IEquatable { + + /// + /// Original name of the ObjC class or protocol. + /// + public string? Name { get; } + + public BindingTypeData (string? name) + { + Name = name; + } + + /// + /// Try to parse the attribute data to retrieve the information of an ExportAttribute<T>. + /// + /// The attribute data to be parsed. + /// The parsed data. Null if we could not parse the attribute data. + /// True if the data was parsed. + public static bool TryParse (AttributeData attributeData, + [NotNullWhen (true)] out BindingTypeData? data) + { + data = null; + var count = attributeData.ConstructorArguments.Length; + string? name; + switch (count) { + case 0: + name = null; + break; + case 1: + name = (string?) attributeData.ConstructorArguments [0].Value!; + break; + default: + // 0 should not be an option.. + return false; + } + + if (attributeData.NamedArguments.Length == 0) { + data = new (name); + return true; + } + + foreach (var (paramName, value) in attributeData.NamedArguments) { + switch (paramName) { + case "Name": + name = (string?) value.Value!; + break; + default: + data = null; + return false; + } + } + + data = new (name); + return true; + } + + /// + public bool Equals (BindingTypeData other) => Name == other.Name; + + /// + public override bool Equals (object? obj) + { + return obj is BindingTypeData other && Equals (other); + } + + /// + public override int GetHashCode () + { + return HashCode.Combine (Name); + } + + public static bool operator == (BindingTypeData x, BindingTypeData y) + { + return x.Equals (y); + } + + public static bool operator != (BindingTypeData x, BindingTypeData y) + { + return !(x == y); + } + + /// + public override string ToString () + { + return $"{{ Name: '{Name}' }}"; + } +} + +readonly struct BindingTypeData : IEquatable> where T : Enum { + + /// + /// Original name of the ObjC class or protocol. + /// + public string? Name { get; } + + /// + /// The configuration flags used on the exported class/interface. + /// + public T? Flags { get; } = default; + + public BindingTypeData (string? name) + { + Name = name; + } + + public BindingTypeData (T? flags) + { + Name = null; + Flags = flags; + } + + public BindingTypeData (string? name, T? flags) + { + Name = name; + Flags = flags; + } + + /// + /// Try to parse the attribute data to retrieve the information of an ExportAttribute<T>. + /// + /// The attribute data to be parsed. + /// The parsed data. Null if we could not parse the attribute data. + /// True if the data was parsed. + public static bool TryParse (AttributeData attributeData, + [NotNullWhen (true)] out BindingTypeData? data) + { + data = null; + var count = attributeData.ConstructorArguments.Length; + string? name; + T? flags = default; + switch (count) { + case 0: + // use the defaults + name = null; + flags = default; + break; + case 1: + name = (string?) attributeData.ConstructorArguments [0].Value!; + break; + case 2: + // we have the name and the config flags present + name = (string?) attributeData.ConstructorArguments [0].Value!; + flags = (T) attributeData.ConstructorArguments [1].Value!; + break; + default: + return false; + } + + if (attributeData.NamedArguments.Length == 0) { + data = flags is not null ? + new (name, flags) : new (name); + return true; + } + + foreach (var (paramName, value) in attributeData.NamedArguments) { + switch (paramName) { + case "Name": + name = (string?) value.Value!; + break; + case "Flags": + flags = (T) value.Value!; + break; + default: + data = null; + return false; + } + } + + data = flags is not null ? + new (name, flags) : new (name); + return true; + } + + /// + public bool Equals (BindingTypeData other) + { + if (Name != other.Name) + return false; + if (Flags is not null && other.Flags is not null) { + return Flags.Equals (other.Flags); + } + return false; + } + + /// + public override bool Equals (object? obj) + { + return obj is BindingTypeData other && Equals (other); + } + + /// + public override int GetHashCode () + { + return HashCode.Combine (Name, Flags); + } + + public static bool operator == (BindingTypeData x, BindingTypeData y) + { + return x.Equals (y); + } + + public static bool operator != (BindingTypeData x, BindingTypeData y) + { + return !(x == y); + } + + /// + public override string ToString () + { + return $"{{ Name: '{Name}', Flags: '{Flags}' }}"; + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs index c2d2d5e1ace0..786d4de85902 100644 --- a/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs +++ b/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; @@ -9,7 +11,7 @@ namespace Microsoft.Macios.Generator.Attributes; /// Represents the data found in an ExportAttribute<T> /// /// The configuration flags used on the exported element. -readonly struct ExportData where T : Enum { +readonly struct ExportData : IEquatable> where T : Enum { /// /// The exported native selector. @@ -62,7 +64,7 @@ public static bool TryParse (AttributeData attributeData, T? flags = default; switch (count) { case 1: - data = new ((string?) attributeData.ConstructorArguments [0].Value!); + selector = (string?) attributeData.ConstructorArguments [0].Value!; break; case 2: // there are two possible cases in this situation. @@ -78,7 +80,7 @@ public static bool TryParse (AttributeData attributeData, } break; case 3: - selector = (string?) attributeData.ConstructorArguments [9].Value!; + selector = (string?) attributeData.ConstructorArguments [0].Value!; argumentSemantic = (ArgumentSemantic) attributeData.ConstructorArguments [1].Value!; flags = (T) attributeData.ConstructorArguments [2].Value!; break; @@ -114,4 +116,45 @@ public static bool TryParse (AttributeData attributeData, new (selector, argumentSemantic, flags) : new (selector, argumentSemantic); return true; } + + /// + public bool Equals (ExportData other) + { + if (Selector != other.Selector) + return false; + if (ArgumentSemantic != other.ArgumentSemantic) + return false; + if (Flags is not null && other.Flags is not null) { + return Flags.Equals (other.Flags); + } + return false; + } + + /// + public override bool Equals (object? obj) + { + return obj is ExportData other && Equals (other); + } + + /// + public override int GetHashCode () + { + return HashCode.Combine (Selector, Flags); + } + + public static bool operator == (ExportData x, ExportData y) + { + return x.Equals (y); + } + + public static bool operator != (ExportData x, ExportData y) + { + return !(x == y); + } + + /// + public override string ToString () + { + return $"{{ Type: '{typeof (T).FullName}', Selector: '{Selector ?? "null"}', ArgumentSemantic: '{ArgumentSemantic}', Flags: '{Flags}' }}"; + } } diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/FieldData.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/FieldData.cs index 64d92f4eecb5..d9200c7e8ee8 100644 --- a/src/rgen/Microsoft.Macios.Generator/Attributes/FieldData.cs +++ b/src/rgen/Microsoft.Macios.Generator/Attributes/FieldData.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; @@ -5,7 +7,7 @@ namespace Microsoft.Macios.Generator.Attributes; -readonly struct FieldData where T : Enum { +readonly struct FieldData : IEquatable> where T : Enum { public enum ParsingError { None = 0, @@ -18,13 +20,17 @@ public enum ParsingError { public T? Flags { get; } = default; - FieldData (string symbolName, string? libraryName, T? flags) + internal FieldData (string symbolName, string? libraryName, T? flags) { SymbolName = symbolName; LibraryName = libraryName; Flags = flags; } + internal FieldData (string symbolName, T? flags) : this (symbolName, null, flags) { } + + internal FieldData (string symbolName) : this (symbolName, null, default) { } + public static bool TryParse (AttributeData attributeData, [NotNullWhen (true)] out FieldData? data) => TryParse (attributeData, out data, out _); @@ -50,24 +56,22 @@ public static bool TryParse (AttributeData attributeData, if (!attributeData.ConstructorArguments [0].TryGetIdentifier (out symbolName)) { return false; } - switch (attributeData.ConstructorArguments [1].Value) { - // there are two possible cases here: - // 1. The second argument is a string - // 2. The second argument is an enum - case T enumValue: - flags = enumValue; - break; - case string lib: - libraryName = lib; - break; - default: - // unexpected value :/ - error = new (ParsingError.UnknownConstructor, attributeData.ConstructorArguments.Length); + + if (attributeData.ConstructorArguments [1].Value is string) { + libraryName = (string?) attributeData.ConstructorArguments [1].Value!; + } else { + flags = (T) attributeData.ConstructorArguments [1].Value!; + } + break; + case 3: + if (!attributeData.ConstructorArguments [0].TryGetIdentifier (out symbolName)) { return false; } + libraryName = (string?) attributeData.ConstructorArguments [1].Value!; + flags = (T) attributeData.ConstructorArguments [2].Value!; break; default: - // 0 should not be an option.. + // 0 should not be an option. return false; } @@ -94,4 +98,45 @@ public static bool TryParse (AttributeData attributeData, data = new (symbolName, libraryName, flags); return true; } + + /// + public bool Equals (FieldData other) + { + if (SymbolName != other.SymbolName) + return false; + if (LibraryName != other.LibraryName) + return false; + if (Flags is not null && other.Flags is not null) { + return Flags.Equals (other.Flags); + } + return false; + } + + /// + public override bool Equals (object? obj) + { + return obj is FieldData other && Equals (other); + } + + /// + public override int GetHashCode () + { + return HashCode.Combine (SymbolName, LibraryName, Flags); + } + + public static bool operator == (FieldData x, FieldData y) + { + return x.Equals (y); + } + + public static bool operator != (FieldData x, FieldData y) + { + return !(x == y); + } + + /// + public override string ToString () + { + return $"{{ SymbolName: '{SymbolName}' LibraryName: '{LibraryName ?? "null"}', Flags: '{Flags}' }}"; + } } diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/ObsoletedOSPlatformData.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/ObsoletedOSPlatformData.cs index dbcde5046c49..66d9168f5795 100644 --- a/src/rgen/Microsoft.Macios.Generator/Attributes/ObsoletedOSPlatformData.cs +++ b/src/rgen/Microsoft.Macios.Generator/Attributes/ObsoletedOSPlatformData.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/SupportedOSPlatformData.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/SupportedOSPlatformData.cs index 1ca6deae2b34..35d0a168b6e2 100644 --- a/src/rgen/Microsoft.Macios.Generator/Attributes/SupportedOSPlatformData.cs +++ b/src/rgen/Microsoft.Macios.Generator/Attributes/SupportedOSPlatformData.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/UnsupportedOSPlatformData.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/UnsupportedOSPlatformData.cs index e6d733bcbe62..cdf39b7b59a8 100644 --- a/src/rgen/Microsoft.Macios.Generator/Attributes/UnsupportedOSPlatformData.cs +++ b/src/rgen/Microsoft.Macios.Generator/Attributes/UnsupportedOSPlatformData.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/AttributesNames.cs b/src/rgen/Microsoft.Macios.Generator/AttributesNames.cs index b53d44dc9474..f7c9f4bc3dc2 100644 --- a/src/rgen/Microsoft.Macios.Generator/AttributesNames.cs +++ b/src/rgen/Microsoft.Macios.Generator/AttributesNames.cs @@ -1,18 +1,80 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; + namespace Microsoft.Macios.Generator; /// /// Contains all the names of the attributes that are used by the binding generator. /// -public static class AttributesNames { +static class AttributesNames { public const string BindingAttribute = "ObjCBindings.BindingTypeAttribute"; + public const string BindingCategoryAttribute = "ObjCBindings.BindingTypeAttribute"; + public const string BindingClassAttribute = "ObjCBindings.BindingTypeAttribute"; + public const string BindingProtocolAttribute = "ObjCBindings.BindingTypeAttribute"; + public const string BindingStrongDictionaryAttribute = "ObjCBindings.BindingTypeAttribute"; public const string FieldAttribute = "ObjCBindings.FieldAttribute"; public const string EnumFieldAttribute = "ObjCBindings.FieldAttribute"; - public const string ExportFieldAttribute = "ObjCBindings.ExportAttribute"; + public const string FieldPropertyAttribute = "ObjCBindings.FieldAttribute"; public const string ExportPropertyAttribute = "ObjCBindings.ExportAttribute"; public const string ExportMethodAttribute = "ObjCBindings.ExportAttribute"; public const string SupportedOSPlatformAttribute = "System.Runtime.Versioning.SupportedOSPlatformAttribute"; public const string UnsupportedOSPlatformAttribute = "System.Runtime.Versioning.UnsupportedOSPlatformAttribute"; public const string ObsoletedOSPlatformAttribute = "System.Runtime.Versioning.ObsoletedOSPlatformAttribute"; + public static readonly string [] BindingTypes = [ + BindingAttribute, + BindingCategoryAttribute, + BindingClassAttribute, + BindingProtocolAttribute, + BindingStrongDictionaryAttribute, + ]; + + + public static string? GetBindingTypeAttributeName () where T : Enum + { + var type = typeof (T); + if (type == typeof (ObjCBindings.Category)) { + return BindingCategoryAttribute; + } + if (type == typeof (ObjCBindings.Class)) { + return BindingClassAttribute; + } + if (type == typeof (ObjCBindings.Protocol)) { + return BindingProtocolAttribute; + } + if (type == typeof (ObjCBindings.StrongDictionary)) { + return BindingStrongDictionaryAttribute; + } + + return null; + } + + public static string? GetFieldAttributeName () where T : Enum + { + // we cannot use a switch statement because typeof is not a constant value + var type = typeof (T); + if (type == typeof (ObjCBindings.Property)) { + return FieldPropertyAttribute; + } + if (type == typeof (ObjCBindings.EnumValue)) { + return EnumFieldAttribute; + } + return null; + } + + public static string? GetExportAttributeName () where T : Enum + { + // we cannot use a switch statement because typeof is not a constant value + var type = typeof (T); + if (type == typeof (ObjCBindings.Property)) { + return ExportPropertyAttribute; + } + if (type == typeof (ObjCBindings.Method)) { + return ExportMethodAttribute; + } + return null; + } + } diff --git a/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailability.cs b/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailability.cs index 1a6c451f6c44..ba83bb51bed1 100644 --- a/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailability.cs +++ b/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailability.cs @@ -1,5 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; +using System.Linq; +using System.Text; using Xamarin.Utils; namespace Microsoft.Macios.Generator.Availability; @@ -37,7 +41,7 @@ namespace Microsoft.Macios.Generator.Availability; readonly SortedDictionary obsoleted = new (); /// - /// Dictionary tath contains all the unsupported versions and their optional data. + /// The Dictionary which contains all the unsupported versions and their optional data. /// public readonly IReadOnlyDictionary ObsoletedVersions => obsoleted; @@ -55,8 +59,8 @@ namespace Microsoft.Macios.Generator.Availability; { Platform = platform; SupportedVersion = supportedVersion; - unsupported = unsupportedVersions; - obsoleted = obsoletedVersions; + unsupported = new (unsupportedVersions); + obsoleted = new (obsoletedVersions); } /// @@ -67,7 +71,7 @@ public PlatformAvailability (PlatformAvailability other) { Platform = other.Platform; SupportedVersion = other.SupportedVersion; - // important, the default copy constructor of a record wont do this. It will use the same ref, not + // Important: the default copy constructor of a record won't do this. It will use the same ref, not // something we want to do because it will mean that two records will modify the same collection unsupported = new (other.unsupported); obsoleted = new (other.obsoleted); @@ -160,4 +164,18 @@ public override int GetHashCode () { return !left.Equals (right); } + + /// + public override string ToString () + { + var sb = new StringBuilder ("{ "); + sb.Append ($"Platform: '{Platform}', "); + sb.Append ($"Supported: '{SupportedVersion?.ToString ()}', "); + sb.Append ("Unsupported: ["); + sb.AppendJoin (", ", unsupported.Select (v => $"'{v.Key}': '{v.Value?.ToString () ?? "null"}'")); + sb.Append ("], Obsoleted: ["); + sb.AppendJoin (", ", obsoleted.Select (v => $"'{v.Key}': ('{v.Value.Message?.ToString () ?? "null"}', '{v.Value.Url?.ToString () ?? "null"}')")); + sb.Append ("] }"); + return sb.ToString (); + } } diff --git a/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailabilityBuilder.cs b/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailabilityBuilder.cs index 4b73212a5c42..0c9905c9d014 100644 --- a/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailabilityBuilder.cs +++ b/src/rgen/Microsoft.Macios.Generator/Availability/PlatformAvailabilityBuilder.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using Microsoft.Macios.Generator.Attributes; @@ -100,7 +102,7 @@ public void Add (UnsupportedOSPlatformData unsupportedPlatform) /// /// Add a new obsoleted version of the platform to the availability struct. /// - /// + /// The supported versions to add. /// Optional obsolete message. /// Optional documentation url. public void AddObsoletedVersion (Version version, string? message, string? url) @@ -137,5 +139,15 @@ public PlatformAvailability ToImmutable () { return new PlatformAvailability (platform, supportedVersion, unsupported, obsoleted); } + + /// + /// Clear all the versions that have been added to the platform availability. + /// + public void Clear () + { + supportedVersion = null; + unsupported.Clear (); + obsoleted.Clear (); + } } } diff --git a/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailability.cs b/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailability.cs index 25bc3d47831d..29c3ab988327 100644 --- a/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailability.cs +++ b/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailability.cs @@ -1,5 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; +using System.Linq; +using System.Text; using Xamarin.Utils; namespace Microsoft.Macios.Generator.Availability; @@ -11,7 +15,9 @@ namespace Microsoft.Macios.Generator.Availability; static readonly HashSet supportedPlatforms = [ApplePlatform.iOS, ApplePlatform.TVOS, ApplePlatform.MacOSX, ApplePlatform.MacCatalyst]; - readonly SortedDictionary availabilities; + readonly SortedDictionary availabilities = new (); + + public SymbolAvailability () { } SymbolAvailability (Dictionary platforms) { @@ -150,4 +156,13 @@ public override int GetHashCode () { return !left.Equals (right); } + + /// + public override string ToString () + { + var sb = new StringBuilder ("["); + sb.AppendJoin (", ", availabilities.Values.Where (x => x is not null)); + sb.Append ("]"); + return sb.ToString (); + } } diff --git a/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailabilityBuilder.cs b/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailabilityBuilder.cs index 0617f3298e52..c606e858c0e2 100644 --- a/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailabilityBuilder.cs +++ b/src/rgen/Microsoft.Macios.Generator/Availability/SymbolAvailabilityBuilder.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; using System.Collections.Generic; using Microsoft.Macios.Generator.Attributes; using Xamarin.Utils; @@ -35,6 +38,22 @@ PlatformAvailability.Builder GetBuilder (ApplePlatform platform) return builder; } + /// + /// Add a new obsoleted version of the platform to the availability struct. + /// + /// Platforms whose availability we are updating. + /// The supported versions to add. + /// Optional obsolete message. + /// Optional documentation url. + internal void AddObsoletedVersion (ApplePlatform platform, Version version, string? message, string? url) + { + if (!supportedPlatforms.Contains (platform)) + return; + + var builder = GetBuilder (platform); + builder.AddObsoletedVersion (version, message, url); + } + /// /// Adds a new obsoleted version to the SymbolAvailability. /// @@ -48,6 +67,20 @@ public void Add (ObsoletedOSPlatformData obsoletedOsPlatform) builder.Add (obsoletedOsPlatform); } + + /// + /// Add a new supported version to the SymbolAvailability. + /// + /// Platforms whose availability we are updating. + /// The supported versions to add. + internal void AddSupportedVersion (ApplePlatform platform, Version version) + { + if (!supportedPlatforms.Contains (platform)) + return; + var builder = GetBuilder (platform); + builder.AddSupportedVersion (version); + } + /// /// Add a new supported version to the SymbolAvailability. /// @@ -62,7 +95,22 @@ public void Add (SupportedOSPlatformData supportedPlatform) } /// - /// Add a new unsuspported verison to the SymbolAvailability. + /// Adds a new version to the list of unsupported versions. If the platform is unsupported, the version is ignored. + /// + /// Platforms whose availability we are updating. + /// The new unsupported version. + /// The optional message of the unsupported version. + internal void AddUnsupportedVersion (ApplePlatform platform, Version version, string? message) + { + if (!supportedPlatforms.Contains (platform)) + return; + + var builder = GetBuilder (platform); + builder.AddUnsupportedVersion (version, message); + } + + /// + /// Add a new unsuspported version to the SymbolAvailability. /// /// The data of a UnsupportedOSPlatformAttribute. public void Add (UnsupportedOSPlatformData unsupportedPlatform) diff --git a/src/rgen/Microsoft.Macios.Generator/BindingSourceGeneratorGenerator.cs b/src/rgen/Microsoft.Macios.Generator/BindingSourceGeneratorGenerator.cs index 911024e53715..eb0d8fd66892 100644 --- a/src/rgen/Microsoft.Macios.Generator/BindingSourceGeneratorGenerator.cs +++ b/src/rgen/Microsoft.Macios.Generator/BindingSourceGeneratorGenerator.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Collections.Immutable; using System.IO; @@ -22,7 +24,7 @@ namespace Microsoft.Macios.Generator; /// [Generator] public class BindingSourceGeneratorGenerator : IIncrementalGenerator { - static readonly DeclarationCodeChangesEqualityComparer equalityComparer = new (); + static readonly CodeChangesEqualityComparer equalityComparer = new (); /// public void Initialize (IncrementalGeneratorInitializationContext context) @@ -34,19 +36,29 @@ public void Initialize (IncrementalGeneratorInitializationContext context) fileName, SourceText.From (content, Encoding.UTF8))); } - // our bindings are special. Due to the fact that we write shared code in the Library.g.cs and the Trampolines.g.cs + // our bindings are special. Since we write shared code in the Library.g.cs and the Trampolines.g.cs // we need to listen to all the BaseTypeDeclarationSyntax changes. We do so, generate a data model with the - // changes we are interested and later we transform them. This allows use to be able to use a RootBindingContext + // changes we are interested, and later we transform them. This allows use to be able to use a RootBindingContext // as a bag in which we can add information about libraries and trampolines needed by the bindings. var provider = context.SyntaxProvider .CreateSyntaxProvider (static (node, _) => IsValidNode (node), static (ctx, _) => GetChangesForSourceGen (ctx)) - .Where (tuple => tuple.BindingAttributeFound) - .Select (static (tuple, _) => (tuple.Declaration, tuple.Changes)) + .Where (tuple => tuple.BindingAttributeFound); + + var codeChanges = provider + .Select (static (tuple, _) => tuple.Changes) .WithComparer (equalityComparer); - context.RegisterSourceOutput (context.CompilationProvider.Combine (provider.Collect ()), - ((ctx, t) => GenerateCode (ctx, t.Left, t.Right))); + // ideally we could do a distinct, because each code change can return the same libs, this makes the library + // generation more common than what we would like, but it is the smallest code generation. + var libraryProvider = provider + .Select ((tuple, _) => (tuple.RootBindingContext, tuple.Changes.LibraryPaths)); + + context.RegisterSourceOutput (context.CompilationProvider.Combine (codeChanges.Collect ()), + ((ctx, t) => GenerateCode (ctx, t.Right))); + + context.RegisterSourceOutput (context.CompilationProvider.Combine (libraryProvider.Collect ()), + ((ctx, t) => GenerateLibraryCode (ctx, t.Right))); } /// @@ -59,29 +71,28 @@ public void Initialize (IncrementalGeneratorInitializationContext context) _ => false, }; - static (BaseTypeDeclarationSyntax Declaration, CodeChanges Changes, bool BindingAttributeFound) - GetChangesForSourceGen (GeneratorSyntaxContext context) + static (RootBindingContext RootBindingContext, CodeChanges Changes, bool BindingAttributeFound) GetChangesForSourceGen (GeneratorSyntaxContext context) { + var bindingContext = new RootBindingContext (context.SemanticModel); // we do know that the context node has to be one of the base type declarations var declarationSyntax = Unsafe.As (context.Node); // check if we do have the binding attr, else there nothing to retrieve - bool isBindingType = declarationSyntax.HasAttribute (context.SemanticModel, AttributesNames.BindingAttribute); + bool isBindingType = declarationSyntax.HasAtLeastOneAttribute (context.SemanticModel, AttributesNames.BindingTypes); if (!isBindingType) { // return empty data + false - return (declarationSyntax, default, false); + return (bindingContext, default, false); } - var codeChanges = CodeChanges.FromDeclaration (declarationSyntax, context.SemanticModel); + var codeChanges = CodeChanges.FromDeclaration (declarationSyntax, bindingContext); // if code changes are null, return the default value and a false to later ignore the change return codeChanges is not null - ? (declarationSyntax, codeChanges.Value, isBindingType) - : (declarationSyntax, default, false); + ? (bindingContext, codeChanges.Value, isBindingType) + : (bindingContext, default, false); } - static void GenerateCode (SourceProductionContext context, Compilation compilation, - ImmutableArray<(BaseTypeDeclarationSyntax Declaration, CodeChanges Changes)> changesList) + static void GenerateCode (SourceProductionContext context, in ImmutableArray changesList) { // The process is as follows, get all the changes we have received from the incremental generator, // loop over them, and based on the CodeChange.BindingType we are going to build the symbol context @@ -89,26 +100,22 @@ static void GenerateCode (SourceProductionContext context, Compilation compilati // // Once all the enums, classes and interfaces have been processed, we will use the data collected // in the RootBindingContext to generate the library and trampoline code. - var rootContext = new RootBindingContext (compilation); - foreach (var (declaration, change) in changesList) { - var semanticModel = compilation.GetSemanticModel (declaration.SyntaxTree); - // This is a bug in the roslyn analyzer for roslyn generator https://github.com/dotnet/roslyn-analyzers/issues/7436 -#pragma warning disable RS1039 - if (semanticModel.GetDeclaredSymbol (declaration) is not INamedTypeSymbol namedTypeSymbol) -#pragma warning restore RS1039 - continue; - + var sb = new TabbedStringBuilder (new ()); + foreach (var change in changesList) { // init sb and add the header - var sb = new TabbedStringBuilder (new ()); + sb.Clear (); sb.WriteHeader (); - if (EmitterFactory.TryCreate (change, rootContext, semanticModel, namedTypeSymbol, sb, out var emitter)) { + if (EmitterFactory.TryCreate (change, out var emitter)) { // write the using statements - CollectUsingStatements (declaration.SyntaxTree, sb, emitter); + CollectUsingStatements (change, sb, emitter); - if (emitter.TryEmit (out var diagnostics)) { + var bindingContext = new BindingContext (sb, change); + if (emitter.TryEmit (bindingContext, out var diagnostics)) { // only add a file when we do generate code var code = sb.ToString (); - context.AddSource ($"{Path.Combine (emitter.SymbolNamespace, emitter.SymbolName)}.g.cs", + var namespacePath = Path.Combine (change.Namespace.ToArray ()); + var fileName = emitter.GetSymbolName (change); + context.AddSource ($"{Path.Combine (namespacePath, fileName)}.g.cs", SourceText.From (code, Encoding.UTF8)); } else { // add to the diagnostics and continue to the next possible candidate @@ -120,13 +127,10 @@ static void GenerateCode (SourceProductionContext context, Compilation compilati context.ReportDiagnostic (Diagnostic.Create ( Diagnostics .RBI0000, // An unexpected error ocurred while processing '{0}'. Please fill a bug report at https://github.com/xamarin/xamarin-macios/issues/new. - declaration.GetLocation (), - namedTypeSymbol.ToDisplayString ().Trim ())); + null, + change.FullyQualifiedSymbol)); } } - - // we are done with the types, generate the library and trampoline code - GenerateLibraryCode (context, rootContext); } /// @@ -134,15 +138,28 @@ static void GenerateCode (SourceProductionContext context, Compilation compilati /// by the binding. This is a single generated file. /// /// Source production context. - /// The root context of the current generation. - static void GenerateLibraryCode (SourceProductionContext context, RootBindingContext rootContext) + /// The root context of the current generation. + static void GenerateLibraryCode (SourceProductionContext context, + ImmutableArray<(RootBindingContext RootBindingContext, IEnumerable<(string LibraryName, string? LibraryPath)> LibraryPaths)> libraryChanges) { + if (libraryChanges.Length == 0) + return; + // we have at least one, we can get the root binding changes from it + var rootBindingContext = libraryChanges [0].RootBindingContext; var sb = new TabbedStringBuilder (new ()); sb.WriteHeader (); + + // Each code change might have returned the same list of libraries, we need to get the distinct ones + var libComparer = new LibraryPathsComparer (); + var distinctLibraryPaths = libraryChanges + .SelectMany (library => library.LibraryPaths) + .Distinct (libComparer) + .ToImmutableArray (); + // no need to collect the using statements, this file is completely generated - var emitter = new LibraryEmitter (rootContext, sb); + var emitter = new LibraryEmitter (rootBindingContext, sb); - if (emitter.TryEmit (out var diagnostics)) { + if (emitter.TryEmit (distinctLibraryPaths, out var diagnostics)) { // only add a file when we do generate code var code = sb.ToString (); context.AddSource ($"{Path.Combine (emitter.SymbolNamespace, emitter.SymbolName)}.g.cs", @@ -154,22 +171,18 @@ static void GenerateLibraryCode (SourceProductionContext context, RootBindingCon } /// - /// Collect the using statements from the class declaration root syntaxt tree and add them to the string builder + /// Collect the using statements from the named ype code changes and add them to the string builder /// that will be used to generate the code. This way we ensure that we have all the namespaces needed by the /// generated code. /// - /// Root syntax tree of the base type declaration. + /// The code changes for a given named type. /// String builder that will be used for the generated code. /// The emitter that will generate the code. Provides any extra needed namespace. - static void CollectUsingStatements (SyntaxTree tree, TabbedStringBuilder sb, ICodeEmitter emitter) + static void CollectUsingStatements (in CodeChanges codeChanges, TabbedStringBuilder sb, ICodeEmitter emitter) { // collect all using from the syntax tree, add them to a hash to make sure that we don't have duplicates // and add those usings that we do know we need for bindings. - var usingDirectives = tree.GetRoot () - .DescendantNodes () - .OfType () - .Select (d => d.Name!.ToString ()).ToArray (); - var usingDirectivesToKeep = new HashSet (usingDirectives) { + var usingDirectivesToKeep = new SortedSet (codeChanges.UsingDirectives) { // add the using statements that we know we need and print them to the sb }; @@ -179,7 +192,7 @@ static void CollectUsingStatements (SyntaxTree tree, TabbedStringBuilder sb, ICo } // add them sorted so that we have testeable generated code - foreach (var ns in usingDirectivesToKeep.OrderBy (s => s)) { + foreach (var ns in usingDirectivesToKeep) { if (string.IsNullOrEmpty (ns)) continue; sb.AppendLine ($"using {ns};"); diff --git a/src/rgen/Microsoft.Macios.Generator/ListComparer.cs b/src/rgen/Microsoft.Macios.Generator/CollectionComparer.cs similarity index 56% rename from src/rgen/Microsoft.Macios.Generator/ListComparer.cs rename to src/rgen/Microsoft.Macios.Generator/CollectionComparer.cs index 1d90776f5a97..ee9675a579f6 100644 --- a/src/rgen/Microsoft.Macios.Generator/ListComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/CollectionComparer.cs @@ -1,20 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; +using System.Linq; namespace Microsoft.Macios.Generator; -public class ListComparer : EqualityComparer> { - readonly IComparer comparer; +public class CollectionComparer : EqualityComparer> { + readonly IComparer? comparer; readonly IEqualityComparer valueComparer; - public ListComparer (IComparer sortComparer, IEqualityComparer? equalityComparer = null) + public CollectionComparer (IComparer? sortComparer = null, IEqualityComparer? equalityComparer = null) { - comparer = sortComparer ?? throw new ArgumentNullException (nameof (sortComparer)); + comparer = sortComparer; valueComparer = equalityComparer ?? EqualityComparer.Default; } /// - public override bool Equals (List? x, List? y) + public override bool Equals (IReadOnlyCollection? x, IReadOnlyCollection? y) { // bases cases for null or diff size if (x is null && y is null) @@ -26,10 +29,12 @@ public override bool Equals (List? x, List? y) // make copies of the lists and sort them var xSorted = x.ToArray (); - Array.Sort (xSorted, comparer); + if (comparer is not null) + Array.Sort (xSorted, comparer); var ySorted = y.ToArray (); - Array.Sort (ySorted, comparer); + if (comparer is not null) + Array.Sort (ySorted, comparer); for (var i = 0; i < xSorted.Length; i++) { if (!valueComparer.Equals (xSorted [i], ySorted [i])) @@ -39,7 +44,7 @@ public override bool Equals (List? x, List? y) } /// - public override int GetHashCode (List obj) + public override int GetHashCode (IReadOnlyCollection obj) { var hash = new HashCode (); foreach (var element in obj) { diff --git a/src/rgen/Microsoft.Macios.Generator/Context/BindingContext.cs b/src/rgen/Microsoft.Macios.Generator/Context/BindingContext.cs new file mode 100644 index 000000000000..5b5c03c1e378 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Context/BindingContext.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using Microsoft.Macios.Generator.DataModel; + +namespace Microsoft.Macios.Generator.Context; + +readonly struct BindingContext { + + /// + /// Tabbed string builder that can be used to write the generated code. + /// + public TabbedStringBuilder Builder { get; } + + /// + /// Current code changes for the binding context. + /// + public CodeChanges Changes { get; } + + public BindingContext (TabbedStringBuilder builder, CodeChanges changes) + { + Builder = builder; + Changes = changes; + } + +} diff --git a/src/rgen/Microsoft.Macios.Generator/Context/ClassBindingContext.cs b/src/rgen/Microsoft.Macios.Generator/Context/ClassBindingContext.cs deleted file mode 100644 index e283d9b7e619..000000000000 --- a/src/rgen/Microsoft.Macios.Generator/Context/ClassBindingContext.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; - -namespace Microsoft.Macios.Generator.Context; - -class ClassBindingContext : SymbolBindingContext { - public string RegisterName { get; init; } - - public ClassBindingContext (RootBindingContext context, SemanticModel semanticModel, - INamedTypeSymbol symbol) - : base (context, semanticModel, symbol) - { - RegisterName = - symbol.Name; //TODO: placeholder -> should this be extracted from the BindingTypeAttribute - } -} diff --git a/src/rgen/Microsoft.Macios.Generator/Context/ISymbolBindingContext.cs b/src/rgen/Microsoft.Macios.Generator/Context/ISymbolBindingContext.cs deleted file mode 100644 index 2b9a3ffc8460..000000000000 --- a/src/rgen/Microsoft.Macios.Generator/Context/ISymbolBindingContext.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; - -namespace Microsoft.Macios.Generator.Context; - -/// -/// Interface that represents a symbol binding context. We use an interface to allow the usage of a coveriance type, -/// because it removes the need to a cast. -/// -/// The base type declaration whose context we have -interface ISymbolBindingContext where T : BaseTypeDeclarationSyntax { - BaseTypeDeclarationSyntax DeclarationSyntax { get; } - string Namespace { get; } - string SymbolName { get; } - RootBindingContext RootBindingContext { get; } - SemanticModel SemanticModel { get; } - INamedTypeSymbol Symbol { get; } - bool IsStatic { get; } -} diff --git a/src/rgen/Microsoft.Macios.Generator/Context/RootBindingContext.cs b/src/rgen/Microsoft.Macios.Generator/Context/RootBindingContext.cs index 61b909e90537..788b06f42b5f 100644 --- a/src/rgen/Microsoft.Macios.Generator/Context/RootBindingContext.cs +++ b/src/rgen/Microsoft.Macios.Generator/Context/RootBindingContext.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; @@ -17,14 +19,15 @@ namespace Microsoft.Macios.Generator.Context; /// class RootBindingContext { public PlatformName CurrentPlatform { get; set; } - public Compilation Compilation { get; set; } + public Compilation Compilation => this.SemanticModel.Compilation; + public SemanticModel SemanticModel { get; set; } public Dictionary Libraries { get; } = new (); - public RootBindingContext (Compilation compilation) + public RootBindingContext (SemanticModel semanticModel) { - Compilation = compilation; - CurrentPlatform = compilation.GetCurrentPlatform (); + SemanticModel = semanticModel; + CurrentPlatform = Compilation.GetCurrentPlatform (); } // TODO: clean code coming from the old generator @@ -103,4 +106,6 @@ public bool IsSystemLibrary (string name) .Select (f => f.Name) .Any (s => IsLibraryName (s, name)); } + + public static implicit operator RootBindingContext (SemanticModel semanticModel) => new (semanticModel); } diff --git a/src/rgen/Microsoft.Macios.Generator/Context/SymbolBindingContext.cs b/src/rgen/Microsoft.Macios.Generator/Context/SymbolBindingContext.cs deleted file mode 100644 index e39caf9a7449..000000000000 --- a/src/rgen/Microsoft.Macios.Generator/Context/SymbolBindingContext.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.Macios.Generator.Availability; -using Microsoft.Macios.Generator.DataModel; -using Microsoft.Macios.Generator.Extensions; - -namespace Microsoft.Macios.Generator.Context; - -class SymbolBindingContext { - - public RootBindingContext RootBindingContext { get; } - public SemanticModel SemanticModel { get; } - public INamedTypeSymbol Symbol { get; } - - public string Namespace => Symbol.ContainingNamespace.ToDisplayString (); - public string SymbolName => Symbol.Name; - - public bool IsStatic => Symbol.IsStatic; - public SymbolAvailability SymbolAvailability { get; } - - public SymbolBindingContext (RootBindingContext rootBindingContext, - SemanticModel semanticModel, INamedTypeSymbol symbol) - { - RootBindingContext = rootBindingContext; - SemanticModel = semanticModel; - Symbol = symbol; - SymbolAvailability = symbol.GetSupportedPlatforms (); - } -} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/Accessor.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/Accessor.cs index 55df56b24810..989f33a23562 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/Accessor.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/Accessor.cs @@ -1,8 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; using System.Linq; using System.Text; using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; namespace Microsoft.Macios.Generator.DataModel; @@ -12,6 +16,16 @@ namespace Microsoft.Macios.Generator.DataModel; /// public AccessorKind Kind { get; } + /// + /// The platform availability of the enum value. + /// + public SymbolAvailability SymbolAvailability { get; } + + /// + /// The data of the field attribute used to mark the value as a property binding. + /// + public ExportData? ExportPropertyData { get; init; } + /// /// List of attribute code changes of the accessor. /// @@ -26,12 +40,19 @@ namespace Microsoft.Macios.Generator.DataModel; /// Create a new code change in a property accessor. /// /// The kind of accessor. + /// The os availability of the symbol. + /// The data of the export attribute found in the accessor. /// The list of attributes attached to the accessor. /// The list of visibility modifiers of the accessor. - public Accessor (AccessorKind accessorKind, ImmutableArray attributes, + public Accessor (AccessorKind accessorKind, + SymbolAvailability symbolAvailability, + ExportData? exportPropertyData, + ImmutableArray attributes, ImmutableArray modifiers) { Kind = accessorKind; + SymbolAvailability = symbolAvailability; + ExportPropertyData = exportPropertyData; Attributes = attributes; Modifiers = modifiers; } @@ -41,6 +62,11 @@ public bool Equals (Accessor other) { if (Kind != other.Kind) return false; + if (SymbolAvailability != other.SymbolAvailability) + return false; + if (ExportPropertyData != other.ExportPropertyData) + return false; + var attrsComparer = new AttributesEqualityComparer (); if (!attrsComparer.Equals (Attributes, other.Attributes)) return false; @@ -57,7 +83,7 @@ public override bool Equals (object? obj) /// public override int GetHashCode () { - return HashCode.Combine ((int) Kind, Attributes, Modifiers); + return HashCode.Combine ((int) Kind, SymbolAvailability, ExportPropertyData, Attributes, Modifiers); } public static bool operator == (Accessor left, Accessor right) @@ -73,7 +99,7 @@ public override int GetHashCode () /// public override string ToString () { - var sb = new StringBuilder ($"{{ Kind: {Kind}, Modifiers: ["); + var sb = new StringBuilder ($"{{ Kind: {Kind}, Supported Platforms: {SymbolAvailability}, ExportData: {ExportPropertyData?.ToString () ?? "null"} Modifiers: ["); sb.AppendJoin (",", Modifiers.Select (x => x.Text)); sb.Append ("], Attributes: ["); sb.AppendJoin (", ", Attributes); diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorKind.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorKind.cs index 13b5357f68af..dc0bab1054dd 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorKind.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorKind.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis.CSharp; namespace Microsoft.Macios.Generator.DataModel; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorsEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorsEqualityComparer.cs index a460fea45325..7fd5e40aa933 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorsEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/AccessorsEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/AttributeCodeChange.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/AttributeCodeChange.cs index 993c40a97b51..b58abbf18bf4 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/AttributeCodeChange.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/AttributeCodeChange.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; using Microsoft.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/AttributesEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/AttributesEqualityComparer.cs index da83529093eb..1101a14c3933 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/AttributesEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/AttributesEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/BindingInfo.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/BindingInfo.cs new file mode 100644 index 000000000000..7b82d096698c --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/BindingInfo.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Runtime.InteropServices; +using Microsoft.Macios.Generator.Attributes; + +namespace Microsoft.Macios.Generator.DataModel; + +/// +/// This struct works as a union to store the possible BindingTypeData that can be present in the bindings. +/// +[StructLayout (LayoutKind.Explicit)] +readonly struct BindingInfo : IEquatable { + // make the struct smaller by making all wrapped structs be at index 0 + [FieldOffset (0)] readonly BindingType bindingType; + [FieldOffset (8)] readonly BindingTypeData bindingTypeData; + [FieldOffset (8)] readonly BindingTypeData classData; + [FieldOffset (8)] readonly BindingTypeData protocolData; + [FieldOffset (8)] readonly BindingTypeData categoryData; + + public BindingType BindingType => bindingType; + + public BindingInfo (BindingType type, BindingTypeData data) + { + bindingType = type; + bindingTypeData = data; + } + + public BindingInfo (BindingTypeData data) + { + bindingType = BindingType.Class; + classData = data; + } + + public BindingInfo (BindingTypeData data) + { + bindingType = BindingType.Protocol; + protocolData = data; + } + + public BindingInfo (BindingTypeData data) + { + bindingType = BindingType.Category; + categoryData = data; + } + + public static implicit operator BindingTypeData (BindingInfo info) => info.bindingTypeData; + + public static implicit operator BindingTypeData (BindingInfo info) + { + if (info.BindingType != BindingType.Class) + throw new InvalidCastException ($"Invalid cast to ObjCBindings.Class for binding type {info.BindingType}"); + return info.classData; + } + + public static implicit operator BindingTypeData (BindingInfo info) + { + if (info.BindingType != BindingType.Protocol) + throw new InvalidCastException ($"Invalid cast to ObjCBindings.Protocol for binding type {info.BindingType}"); + return info.protocolData; + } + + public static implicit operator BindingTypeData (BindingInfo info) + { + if (info.BindingType != BindingType.Category) + throw new InvalidCastException ($"Invalid cast to ObjCBindings.Category for binding type {info.BindingType}"); + return info.categoryData; + } + + public static implicit operator BindingInfo (BindingTypeData data) => new (BindingType.Unknown, data); + public static implicit operator BindingInfo (BindingTypeData data) => new (data); + public static implicit operator BindingInfo (BindingTypeData data) => new (data); + public static implicit operator BindingInfo (BindingTypeData data) => new (data); + + /// + public bool Equals (BindingInfo other) + { + if (bindingType != other.bindingType) + return false; + switch (bindingType) { + case BindingType.Unknown: + return bindingTypeData == other.bindingTypeData; + case BindingType.SmartEnum: + return bindingTypeData == other.bindingTypeData; + case BindingType.Class: + return classData == other.classData; + case BindingType.Protocol: + return protocolData == other.protocolData; + case BindingType.Category: + return categoryData == other.categoryData; + } + return false; + } + + /// + public override bool Equals (object? obj) + { + return obj is BindingInfo other && Equals (other); + } + + /// + public override int GetHashCode () => bindingType switch { + BindingType.SmartEnum => HashCode.Combine (bindingType, bindingTypeData), + BindingType.Class => HashCode.Combine (bindingType, classData), + BindingType.Protocol => HashCode.Combine (bindingType, protocolData), + BindingType.Category => HashCode.Combine (bindingType, categoryData), + _ => HashCode.Combine (bindingType, bindingTypeData) + }; + + public static bool operator == (BindingInfo x, BindingInfo y) + { + return x.Equals (y); + } + + public static bool operator != (BindingInfo x, BindingInfo y) + { + return !(x == y); + } + + /// + public override string ToString () => bindingType switch { + BindingType.SmartEnum => $"{{ BindingType: {bindingType}, BindingData: {bindingTypeData} }}", + BindingType.Class => $"{{ BindingType: {bindingType}, BindingData: {classData} }}", + BindingType.Protocol => $"{{ BindingType: {bindingType}, BindingData: {protocolData} }}", + BindingType.Category => $"{{ BindingType: {bindingType}, BindingData: {categoryData} }}", + _ => throw new NotImplementedException () + }; +} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/BindingType.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/BindingType.cs index 9a62f0543ba7..200142a22090 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/BindingType.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/BindingType.cs @@ -1,10 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. namespace Microsoft.Macios.Generator.DataModel; /// /// Enum that represents the binding type needed for an class/interface/enum. This allows the code generator -/// differentiate between a code changes that has the exact same qualified name but different type. +/// to differentiate between code changes that have the exact same qualified name but different type. /// -enum BindingType { +enum BindingType : ulong { /// /// Unknown binding type. /// @@ -13,6 +15,16 @@ enum BindingType { /// Binding type for a enum with backing fields. /// SmartEnum, + /// + /// Binding type for an objc class. + /// Class, + /// + /// Binding type for an objc protocol. + /// Protocol, + /// + /// Binding type for an objc category. + /// + Category, } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChanges.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChanges.cs index 55d85fc0a9c8..c5a52c1fad2a 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChanges.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChanges.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -5,6 +8,8 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Availability; +using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.Extensions; namespace Microsoft.Macios.Generator.DataModel; @@ -17,18 +22,101 @@ readonly struct CodeChanges { /// /// Represents the type of binding that the code changes are for. /// - public BindingType BindingType { get; } = BindingType.Unknown; + public BindingType BindingType => BindingInfo.BindingType; + + readonly BindingInfo bindingInfo = default; + /// + /// Represents the binding data that will be used to generate the code. + /// + public BindingInfo BindingInfo => bindingInfo; + + readonly string name = string.Empty; + /// + /// The name of the named type that generated the code change. + /// + public string Name => name; + + readonly ImmutableArray namespaces = ImmutableArray.Empty; + /// + /// The namespace that contains the named type that generated the code change. + /// + public ImmutableArray Namespace => namespaces; + + readonly ImmutableArray interfaces = ImmutableArray.Empty; + /// + /// The list of interfaces implemented by the class/interface. + /// + public ImmutableArray Interfaces { + get => interfaces; + init => interfaces = value; + } /// /// Fully qualified name of the symbol that the code changes are for. /// public string FullyQualifiedSymbol { get; } + readonly string? baseClass = null; + + /// + /// The fully qualified name of an interface/class base. + /// + public string? Base { + get => baseClass; + init => baseClass = value; + + } + + readonly SymbolAvailability availability = new (); + /// + /// The platform availability of the named type. + /// + public SymbolAvailability SymbolAvailability => availability; + /// /// Changes to the attributes of the symbol. /// public ImmutableArray Attributes { get; init; } = []; + readonly IReadOnlySet usingDirectives = ImmutableHashSet.Empty; + + /// + /// The using directive added in the named type declaration. + /// + public IReadOnlySet UsingDirectives { + get => usingDirectives; + init => usingDirectives = value; + } + + /// + /// True if the code changes are for a static symbol. + /// + public bool IsStatic { get; private init; } + + /// + /// True if the code changes are for a partial symbol. + /// + public bool IsPartial { get; private init; } + + /// + /// True if the code changes are for an abstract symbol. + /// + public bool IsAbstract { get; private init; } + + readonly ImmutableArray modifiers = []; + /// + /// Modifiers list. + /// + public ImmutableArray Modifiers { + get => modifiers; + init { + modifiers = value; + IsStatic = value.Any (m => m.IsKind (SyntaxKind.StaticKeyword)); + IsPartial = value.Any (m => m.IsKind (SyntaxKind.PartialKeyword)); + IsAbstract = value.Any (m => m.IsKind (SyntaxKind.AbstractKeyword)); + } + } + readonly ImmutableArray enumMembers = []; /// @@ -79,6 +167,36 @@ public ImmutableArray Methods { init => methods = value; } + /// + /// Returns all the library names and paths that are needed by the native code represented by the code change. + /// + public IEnumerable<(string LibraryName, string? LibraryPath)> LibraryPaths { + get { + // we want to return unique values, A library name should always point to the + // same library path (either null or with a value). We keep track of the ones we already + // returned in a set and skip if we already returned it. + var visited = new HashSet (); + + // return those libs needed by smart enums + foreach (var enumMember in EnumMembers) { + if (enumMember.FieldInfo is null) + continue; + var (_, libraryName, libraryPath) = enumMember.FieldInfo.Value; + if (visited.Add (libraryName)) // if already visited, we cannot add it + yield return (libraryName, libraryPath); + } + + // return those libs needed by field properties + foreach (var property in Properties) { + if (property.ExportFieldData is null) + continue; + var (_, libraryName, libraryPath) = property.ExportFieldData.Value; + if (visited.Add (libraryName)) // if already visited, we cannot add it + yield return (libraryName, libraryPath); + } + } + } + /// /// Decide if an enum value should be ignored as a change. /// @@ -106,7 +224,7 @@ internal static bool Skip (PropertyDeclarationSyntax propertyDeclarationSyntax, // 2. Exported properties if (propertyDeclarationSyntax.Modifiers.Any (SyntaxKind.PartialKeyword)) { return !propertyDeclarationSyntax.HasAtLeastOneAttribute (semanticModel, - AttributesNames.ExportFieldAttribute, AttributesNames.ExportPropertyAttribute); + AttributesNames.FieldPropertyAttribute, AttributesNames.ExportPropertyAttribute); } return true; @@ -138,12 +256,12 @@ internal static bool Skip (MethodDeclarationSyntax methodDeclarationSyntax, Sema delegate bool SkipDelegate (T declarationSyntax, SemanticModel semanticModel); - delegate bool TryCreateDelegate (T declaration, SemanticModel semanticModel, + delegate bool TryCreateDelegate (T declaration, RootBindingContext context, [NotNullWhen (true)] out TR? change) where T : MemberDeclarationSyntax where TR : struct; - static void GetMembers (TypeDeclarationSyntax baseDeclarationSyntax, SemanticModel semanticModel, + static void GetMembers (TypeDeclarationSyntax baseDeclarationSyntax, RootBindingContext context, SkipDelegate skip, TryCreateDelegate tryCreate, out ImmutableArray members) where T : MemberDeclarationSyntax where TR : struct @@ -151,9 +269,9 @@ static void GetMembers (TypeDeclarationSyntax baseDeclarationSyntax, Sema var bucket = ImmutableArray.CreateBuilder (); var declarations = baseDeclarationSyntax.Members.OfType (); foreach (var declaration in declarations) { - if (skip (declaration, semanticModel)) + if (skip (declaration, context.SemanticModel)) continue; - if (tryCreate (declaration, semanticModel, out var change)) + if (tryCreate (declaration, context, out var change)) bucket.Add (change.Value); } @@ -163,33 +281,66 @@ static void GetMembers (TypeDeclarationSyntax baseDeclarationSyntax, Sema /// /// Internal constructor added for testing purposes. /// - /// The type of binding for the given code changes. + /// The binding data of binding for the given code changes. + /// The name of the named type that created the code change. + /// The namespace that contains the named type. /// The fully qualified name of the symbol. - internal CodeChanges (BindingType bindingType, string fullyQualifiedSymbol) + /// The platform availability of the named symbol. + internal CodeChanges (BindingInfo bindingInfo, string name, ImmutableArray @namespace, + string fullyQualifiedSymbol, SymbolAvailability symbolAvailability) { - BindingType = bindingType; + this.bindingInfo = bindingInfo; + this.name = name; + this.namespaces = @namespace; FullyQualifiedSymbol = fullyQualifiedSymbol; + this.availability = symbolAvailability; } /// /// Creates a new instance of the struct for a given enum declaration. /// /// The enum declaration that triggered the change. - /// The semantic model of the compilation. - CodeChanges (EnumDeclarationSyntax enumDeclaration, SemanticModel semanticModel) + /// The root binding context of the current compilation. + CodeChanges (EnumDeclarationSyntax enumDeclaration, RootBindingContext context) { - BindingType = BindingType.SmartEnum; + context.SemanticModel.GetSymbolData ( + declaration: enumDeclaration, + bindingType: BindingType.SmartEnum, + name: out name, + baseClass: out baseClass, + interfaces: out interfaces, + namespaces: out namespaces, + symbolAvailability: out availability, + bindingInfo: out bindingInfo); FullyQualifiedSymbol = enumDeclaration.GetFullyQualifiedIdentifier (); - Attributes = enumDeclaration.GetAttributeCodeChanges (semanticModel); + Attributes = enumDeclaration.GetAttributeCodeChanges (context.SemanticModel); + UsingDirectives = enumDeclaration.SyntaxTree.CollectUsingStatements (); + Modifiers = [.. enumDeclaration.Modifiers]; var bucket = ImmutableArray.CreateBuilder (); // loop over the fields and add those that contain a FieldAttribute - var enumValueDeclaration = enumDeclaration.Members.OfType (); - foreach (var val in enumValueDeclaration) { - if (Skip (val, semanticModel)) + var enumValueDeclarations = enumDeclaration.Members.OfType (); + foreach (var enumValueDeclaration in enumValueDeclarations) { + if (Skip (enumValueDeclaration, context.SemanticModel)) + continue; + if (context.SemanticModel.GetDeclaredSymbol (enumValueDeclaration) is not IFieldSymbol enumValueSymbol) { + continue; + } + + var fieldData = enumValueSymbol.GetFieldData (); + // try and compute the library for this enum member + if (fieldData is null || !context.TryComputeLibraryName (fieldData.Value.LibraryName, Namespace [^1], + out string? libraryName, out string? libraryPath)) + // could not calculate the library for the enum, do not add it continue; - var memberName = val.Identifier.ToFullString ().Trim (); - var attributes = val.GetAttributeCodeChanges (semanticModel); - bucket.Add (new (memberName, attributes)); + var enumMember = new EnumMember ( + name: enumValueDeclaration.Identifier.ToFullString ().Trim (), + libraryName: libraryName, + libraryPath: libraryPath, + fieldData: enumValueSymbol.GetFieldData (), + symbolAvailability: enumValueSymbol.GetSupportedPlatforms (), + attributes: enumValueDeclaration.GetAttributeCodeChanges (context.SemanticModel) + ); + bucket.Add (enumMember); } EnumMembers = bucket.ToImmutable (); @@ -199,21 +350,31 @@ internal CodeChanges (BindingType bindingType, string fullyQualifiedSymbol) /// Creates a new instance of the struct for a given class declaration. /// /// The class declaration that triggered the change. - /// The semantic model of the compilation. - CodeChanges (ClassDeclarationSyntax classDeclaration, SemanticModel semanticModel) + /// The root binding context of the current compilation. + CodeChanges (ClassDeclarationSyntax classDeclaration, RootBindingContext context) { - BindingType = BindingType.Class; + context.SemanticModel.GetSymbolData ( + declaration: classDeclaration, + bindingType: BindingType.Class, + name: out name, + baseClass: out baseClass, + interfaces: out interfaces, + namespaces: out namespaces, + symbolAvailability: out availability, + bindingInfo: out bindingInfo); FullyQualifiedSymbol = classDeclaration.GetFullyQualifiedIdentifier (); - Attributes = classDeclaration.GetAttributeCodeChanges (semanticModel); + Attributes = classDeclaration.GetAttributeCodeChanges (context.SemanticModel); + UsingDirectives = classDeclaration.SyntaxTree.CollectUsingStatements (); + Modifiers = [.. classDeclaration.Modifiers]; // use the generic method to get the members, we are using an out param to try an minimize the number of times // the value types are copied - GetMembers (classDeclaration, semanticModel, Skip, + GetMembers (classDeclaration, context, Skip, Constructor.TryCreate, out constructors); - GetMembers (classDeclaration, semanticModel, Skip, Property.TryCreate, + GetMembers (classDeclaration, context, Skip, Property.TryCreate, out properties); - GetMembers (classDeclaration, semanticModel, Skip, Event.TryCreate, out events); - GetMembers (classDeclaration, semanticModel, Skip, Method.TryCreate, + GetMembers (classDeclaration, context, Skip, Event.TryCreate, out events); + GetMembers (classDeclaration, context, Skip, Method.TryCreate, out methods); } @@ -221,19 +382,29 @@ internal CodeChanges (BindingType bindingType, string fullyQualifiedSymbol) /// Creates a new instance of the struct for a given interface declaration. /// /// The interface declaration that triggered the change. - /// The semantic model of the compilation. - CodeChanges (InterfaceDeclarationSyntax interfaceDeclaration, SemanticModel semanticModel) + /// The root binding context of the current compilation. + CodeChanges (InterfaceDeclarationSyntax interfaceDeclaration, RootBindingContext context) { - BindingType = BindingType.Protocol; + context.SemanticModel.GetSymbolData ( + declaration: interfaceDeclaration, + bindingType: BindingType.Protocol, + name: out name, + baseClass: out baseClass, + interfaces: out interfaces, + namespaces: out namespaces, + symbolAvailability: out availability, + bindingInfo: out bindingInfo); FullyQualifiedSymbol = interfaceDeclaration.GetFullyQualifiedIdentifier (); - Attributes = interfaceDeclaration.GetAttributeCodeChanges (semanticModel); + Attributes = interfaceDeclaration.GetAttributeCodeChanges (context.SemanticModel); + UsingDirectives = interfaceDeclaration.SyntaxTree.CollectUsingStatements (); + Modifiers = [.. interfaceDeclaration.Modifiers]; // we do not init the constructors, we use the default empty array - GetMembers (interfaceDeclaration, semanticModel, Skip, Property.TryCreate, + GetMembers (interfaceDeclaration, context.SemanticModel, Skip, Property.TryCreate, out properties); - GetMembers (interfaceDeclaration, semanticModel, Skip, Event.TryCreate, + GetMembers (interfaceDeclaration, context.SemanticModel, Skip, Event.TryCreate, out events); - GetMembers (interfaceDeclaration, semanticModel, Skip, Method.TryCreate, + GetMembers (interfaceDeclaration, context.SemanticModel, Skip, Method.TryCreate, out methods); } @@ -242,15 +413,15 @@ internal CodeChanges (BindingType bindingType, string fullyQualifiedSymbol) /// it will return null. /// /// The declaration syntax whose change we want to calculate. - /// The semantic model related to the syntax tree that contains the node. + /// The root binding context of the current compilation. /// A code change or null if it could not be calculated. public static CodeChanges? FromDeclaration (BaseTypeDeclarationSyntax baseTypeDeclarationSyntax, - SemanticModel semanticModel) + RootBindingContext context) => baseTypeDeclarationSyntax switch { - EnumDeclarationSyntax enumDeclarationSyntax => new CodeChanges (enumDeclarationSyntax, semanticModel), + EnumDeclarationSyntax enumDeclarationSyntax => new CodeChanges (enumDeclarationSyntax, context), InterfaceDeclarationSyntax interfaceDeclarationSyntax => new CodeChanges (interfaceDeclarationSyntax, - semanticModel), - ClassDeclarationSyntax classDeclarationSyntax => new CodeChanges (classDeclarationSyntax, semanticModel), + context), + ClassDeclarationSyntax classDeclarationSyntax => new CodeChanges (classDeclarationSyntax, context), _ => null }; @@ -258,10 +429,17 @@ internal CodeChanges (BindingType bindingType, string fullyQualifiedSymbol) public override string ToString () { var sb = new StringBuilder ("Changes: {"); - sb.Append ($"BindingType: {BindingType}, "); - sb.Append ($"FullyQualifiedSymbol: {FullyQualifiedSymbol}, "); - sb.Append ("Attributes: ["); + sb.Append ($"BindingData: '{BindingInfo}', Name: '{Name}', Namespace: ["); + sb.AppendJoin (", ", Namespace); + sb.Append ($"], FullyQualifiedSymbol: '{FullyQualifiedSymbol}', Base: '{Base ?? "null"}', SymbolAvailability: {SymbolAvailability}, "); + sb.Append ("Interfaces: ["); + sb.AppendJoin (", ", Interfaces); + sb.Append ("], Attributes: ["); sb.AppendJoin (", ", Attributes); + sb.Append ("], UsingDirectives: ["); + sb.AppendJoin (", ", UsingDirectives); + sb.Append ("], Modifiers: ["); + sb.AppendJoin (", ", Modifiers); sb.Append ("], EnumMembers: ["); sb.AppendJoin (", ", EnumMembers); sb.Append ("], Constructors: ["); @@ -272,7 +450,7 @@ public override string ToString () sb.AppendJoin (", ", Methods); sb.Append ("], Events: ["); sb.AppendJoin (", ", Events); - sb.Append ('}'); + sb.Append ("] }"); return sb.ToString (); } } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChangesEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChangesEqualityComparer.cs index b1f59c240860..8231c2c2436a 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChangesEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/CodeChangesEqualityComparer.cs @@ -1,25 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; -using Microsoft.CodeAnalysis.CSharp.Syntax; namespace Microsoft.Macios.Generator.DataModel; -class DeclarationCodeChangesEqualityComparer : EqualityComparer<(BaseTypeDeclarationSyntax Declaration, CodeChanges - Changes)> { - readonly CodeChangesEqualityComparer comparer = new (); - - /// - public override bool Equals ((BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) x, - (BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) y) - { - return comparer.Equals (x.Changes, y.Changes); - } - - /// - public override int GetHashCode ((BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) obj) - => comparer.GetHashCode (obj.Changes); -} - /// /// Custom code changes comparer used for the Roslyn code generation to invalidate caching. /// @@ -27,6 +12,9 @@ class CodeChangesEqualityComparer : EqualityComparer { /// public override bool Equals (CodeChanges x, CodeChanges y) { + + // order does not matter in the using directives, use a comparer that sorts them + var ignoreOrderComparer = new CollectionComparer (StringComparer.InvariantCulture); // things that mean a code change is the same: // - the fully qualified symbol is the same // - the binding type is the same @@ -34,13 +22,27 @@ public override bool Equals (CodeChanges x, CodeChanges y) // - the members are the same // - the attributes are the same - // this could be a massive or but that makes it less readable + // this could be a massive 'or' but that makes it less readable + if (x.Name != y.Name) + return false; + // order matters in the namespaces, therefore, use a comparer that does not reorder the collections + var namespaceComparer = new CollectionComparer (); + if (!namespaceComparer.Equals (x.Namespace, y.Namespace)) + return false; if (x.FullyQualifiedSymbol != y.FullyQualifiedSymbol) return false; + if (x.Base != y.Base) + return false; + if (!ignoreOrderComparer.Equals (x.Interfaces, y.Interfaces)) + return false; + if (x.SymbolAvailability != y.SymbolAvailability) + return false; if (x.BindingType != y.BindingType) return false; if (x.Attributes.Length != y.Attributes.Length) return false; + if (!ignoreOrderComparer.Equals (x.UsingDirectives, y.UsingDirectives)) + return false; if (x.EnumMembers.Length != y.EnumMembers.Length) return false; if (x.Properties.Length != y.Properties.Length) @@ -51,6 +53,10 @@ public override bool Equals (CodeChanges x, CodeChanges y) if (!attrComparer.Equals (x.Attributes, y.Attributes)) return false; + var modifiersComparer = new ModifiersEqualityComparer (); + if (!modifiersComparer.Equals (x.Modifiers, y.Modifiers)) + return false; + // compare the members var memberComparer = new EnumMembersEqualityComparer (); if (!memberComparer.Equals (x.EnumMembers, y.EnumMembers)) diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/Constructor.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/Constructor.cs index 28ae013ea2ef..57e9f19cb5e7 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/Constructor.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/Constructor.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; @@ -5,55 +7,72 @@ using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Availability; +using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.Extensions; namespace Microsoft.Macios.Generator.DataModel; readonly struct Constructor : IEquatable { + /// + /// Type name that owns the constructor. + /// public string Type { get; } + + /// + /// The platform availability of the constructor. + /// + public SymbolAvailability SymbolAvailability { get; } + + /// + /// Get the attributes added to the constructor. + /// public ImmutableArray Attributes { get; } = []; + /// + /// Modifiers list. + /// public ImmutableArray Modifiers { get; } = []; + /// + /// Parameters list. + /// public ImmutableArray Parameters { get; } = []; - public Constructor (string type, ImmutableArray attributes, + public Constructor (string type, + SymbolAvailability symbolAvailability, + ImmutableArray attributes, ImmutableArray modifiers, ImmutableArray parameters) { Type = type; + SymbolAvailability = symbolAvailability; Attributes = attributes; Modifiers = modifiers; Parameters = parameters; } - public static bool TryCreate (ConstructorDeclarationSyntax declaration, SemanticModel semanticModel, + public static bool TryCreate (ConstructorDeclarationSyntax declaration, RootBindingContext context, [NotNullWhen (true)] out Constructor? change) { - if (semanticModel.GetDeclaredSymbol (declaration) is not IMethodSymbol constructor) { + if (context.SemanticModel.GetDeclaredSymbol (declaration) is not IMethodSymbol constructor) { change = null; return false; } - var attributes = declaration.GetAttributeCodeChanges (semanticModel); + var attributes = declaration.GetAttributeCodeChanges (context.SemanticModel); var parametersBucket = ImmutableArray.CreateBuilder (); // loop over the parameters of the construct since changes on those implies a change in the generated code foreach (var parameter in constructor.Parameters) { var parameterDeclaration = declaration.ParameterList.Parameters [parameter.Ordinal]; - parametersBucket.Add (new (parameter.Ordinal, parameter.Type.ToDisplayString ().Trim (), - parameter.Name) { - IsOptional = parameter.IsOptional, - IsParams = parameter.IsParams, - IsThis = parameter.IsThis, - IsNullable = parameter.NullableAnnotation == NullableAnnotation.Annotated, - DefaultValue = (parameter.HasExplicitDefaultValue) ? parameter.ExplicitDefaultValue?.ToString () : null, - ReferenceKind = parameter.RefKind.ToReferenceKind (), - Attributes = parameterDeclaration.GetAttributeCodeChanges (semanticModel), - }); + if (!Parameter.TryCreate (parameter, parameterDeclaration, context.SemanticModel, out var parameterChange)) + continue; + parametersBucket.Add (parameterChange.Value); } change = new ( - type: constructor.ContainingSymbol.ToDisplayString ().Trim (), // we want the full name + type: constructor.ContainingSymbol.Name, // we DO NOT want the full name + symbolAvailability: constructor.GetSupportedPlatforms (), attributes: attributes, modifiers: [.. declaration.Modifiers], parameters: parametersBucket.ToImmutable ()); @@ -65,6 +84,9 @@ public bool Equals (Constructor other) { if (Type != other.Type) return false; + if (SymbolAvailability != other.SymbolAvailability) + return false; + var attrsComparer = new AttributesEqualityComparer (); if (!attrsComparer.Equals (Attributes, other.Attributes)) return false; @@ -72,7 +94,7 @@ public bool Equals (Constructor other) if (!modifiersComparer.Equals (Modifiers, other.Modifiers)) return false; - var paramComparer = new ParameterEqualityComparer (); + var paramComparer = new MethodParameterEqualityComparer (); return paramComparer.Equals (Parameters, other.Parameters); } @@ -87,6 +109,7 @@ public override int GetHashCode () { var hashCode = new HashCode (); hashCode.Add (Type); + hashCode.Add (SymbolAvailability); foreach (var modifier in Modifiers) { hashCode.Add (modifier); } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorComparer.cs index 2f696c797f1c..6ce3fa4ecc4c 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Linq; @@ -27,7 +29,8 @@ public int Compare (Constructor x, Constructor y) if (attributesLengthCompare != 0) return attributesLengthCompare; - // sort by the attributes + // Sort by the attributes, this covers the need to sort by the os availability since that + // information comes from the attributes. There is no need to sort twice by the same data var attributeComparer = new AttributeComparer (); var xAttributes = x.Attributes.Order (attributeComparer).ToArray (); var yAttributes = y.Attributes.Order (attributeComparer).ToArray (); diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorsEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorsEqualityComparer.cs index 8d27fdf125ea..6b460089e79a 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorsEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorsEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -16,7 +18,7 @@ public override bool Equals (ImmutableArray x, ImmutableArray> (new ListComparer (new ConstructorComparer ())); + new DictionaryComparer> (new CollectionComparer (new ConstructorComparer ())); return dictionaryComparer.Equals (xConstructors, yConstructors); } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/DelegateInfo.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/DelegateInfo.cs new file mode 100644 index 000000000000..a82c3426cf4f --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/DelegateInfo.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; +using System.Text; +using Microsoft.CodeAnalysis; + +namespace Microsoft.Macios.Generator.DataModel; + +/// +/// Readonly structure that describes a delegate callback passed as a parameter. +/// +readonly struct DelegateInfo : IEquatable { + + /// + /// Type name that owns the method. + /// + public string Type { get; } + + /// + /// Method name. + /// + public string Name { get; } + + /// + /// Method return type. + /// + public string ReturnType { get; } + + /// + /// Parameters list. + /// + public ImmutableArray Parameters { get; } = []; + + public DelegateInfo (string type, string name, string returnType, ImmutableArray parameters) + { + Type = type; + Name = name; + ReturnType = returnType; + Parameters = parameters; + } + + public static bool TryCreate (IMethodSymbol method, [NotNullWhen (true)] out DelegateInfo? change) + { + var parametersBucket = ImmutableArray.CreateBuilder (); + // loop over the parameters of the construct since changes on those implies a change in the generated code + foreach (var parameter in method.Parameters) { + if (!DelegateParameter.TryCreate (parameter, out var parameterChange)) + continue; + parametersBucket.Add (parameterChange.Value); + } + + change = new ( + type: method.ContainingSymbol.ToDisplayString ().Trim (), // we want the full name + name: method.Name, + returnType: method.ReturnType.ToDisplayString ().Trim (), + parameters: parametersBucket.ToImmutableArray ()); + return true; + } + + /// + public bool Equals (DelegateInfo other) + { + if (Type != other.Type) + return false; + if (Name != other.Name) + return false; + if (ReturnType != other.ReturnType) + return false; + + var paramComparer = new DelegateParameterEqualityComparer (); + return paramComparer.Equals (Parameters, other.Parameters); + } + + /// + public override bool Equals (object? obj) + { + return obj is DelegateInfo other && Equals (other); + } + + /// + public override int GetHashCode () + { + var hashCode = new HashCode (); + hashCode.Add (Type); + hashCode.Add (Name); + hashCode.Add (ReturnType); + + foreach (var parameter in Parameters) { + hashCode.Add (parameter); + } + + return hashCode.ToHashCode (); + } + + public static bool operator == (DelegateInfo left, DelegateInfo right) + { + return left.Equals (right); + } + + public static bool operator != (DelegateInfo left, DelegateInfo right) + { + return !left.Equals (right); + } + + /// + public override string ToString () + { + var sb = new StringBuilder ($"{{ Type: {Type}, "); + sb.Append ($"Name: {Name}, "); + sb.Append ($"ReturnType: {ReturnType}, "); + sb.Append ("Parameters: ["); + sb.AppendJoin (", ", Parameters); + sb.Append ("] }}"); + return sb.ToString (); + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/DelegateParameter.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/DelegateParameter.cs new file mode 100644 index 000000000000..4bfb57191d38 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/DelegateParameter.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Diagnostics.CodeAnalysis; +using System.Text; +using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Extensions; + +namespace Microsoft.Macios.Generator.DataModel; + +/// +/// Readonly structure that describes a parameter in a delegate. This class contains less information +/// than Parameter since some of the extra fields make no sense in delegates. +/// +readonly struct DelegateParameter : IEquatable { + + /// + /// Parameter position in the method. + /// + public int Position { get; } + + /// + /// Type of the parameter. + /// + public string Type { get; } + + /// + /// Parameter name + /// + public string Name { get; } + + /// + /// True if the parameter is optional + /// + public bool IsOptional { get; init; } + + /// + /// True if a parameter is using the 'params' modifier. + /// + public bool IsParams { get; init; } + + /// + /// True if the parameter represents the 'this' pointer. + /// + public bool IsThis { get; init; } + + /// + /// True if the parameter is nullable.:w + /// + public bool IsNullable { get; init; } + + /// + /// True if the parameter type is blittable. + /// + public bool IsBlittable { get; } + + /// + /// Returns if the parameter type is a smart enum. + /// + public bool IsSmartEnum { get; init; } + + /// + /// Returns if the parameter is an array type. + /// + public bool IsArray { get; init; } + + /// + /// The reference type used. + /// + public ReferenceKind ReferenceKind { get; init; } + + public DelegateParameter (int position, string type, string name, bool isBlittable) + { + Position = position; + Type = type; + Name = name; + IsBlittable = isBlittable; + } + + public static bool TryCreate (IParameterSymbol symbol, + [NotNullWhen (true)] out DelegateParameter? parameter) + { + var type = symbol.Type is IArrayTypeSymbol arrayTypeSymbol + ? arrayTypeSymbol.ElementType.ToDisplayString () + : symbol.Type.ToDisplayString ().Trim ('?', '[', ']'); + + parameter = new (symbol.Ordinal, type, symbol.Name, symbol.Type.IsBlittable ()) { + IsOptional = symbol.IsOptional, + IsParams = symbol.IsParams, + IsThis = symbol.IsThis, + IsNullable = symbol.NullableAnnotation == NullableAnnotation.Annotated, + IsSmartEnum = symbol.Type.IsSmartEnum (), + IsArray = symbol.Type is IArrayTypeSymbol, + ReferenceKind = symbol.RefKind.ToReferenceKind (), + }; + return true; + } + + /// + public bool Equals (DelegateParameter other) + { + if (Position != other.Position) + return false; + if (Type != other.Type) + return false; + if (Name != other.Name) + return false; + if (IsOptional != other.IsOptional) + return false; + if (IsParams != other.IsParams) + return false; + if (IsThis != other.IsThis) + return false; + if (IsNullable != other.IsNullable) + return false; + if (IsBlittable != other.IsBlittable) + return false; + if (IsSmartEnum != other.IsSmartEnum) + return false; + if (IsArray != other.IsArray) + return false; + return ReferenceKind == other.ReferenceKind; + } + + /// + public override bool Equals (object? obj) + { + return obj is DelegateParameter other && Equals (other); + } + + /// + public override int GetHashCode () + { + var hashCode = new HashCode (); + hashCode.Add (Position); + hashCode.Add (Type); + hashCode.Add (Name); + hashCode.Add (IsOptional); + hashCode.Add (IsParams); + hashCode.Add (IsThis); + hashCode.Add (IsNullable); + hashCode.Add (IsSmartEnum); + hashCode.Add (IsArray); + hashCode.Add ((int) ReferenceKind); + return hashCode.ToHashCode (); + } + + public static bool operator == (DelegateParameter left, DelegateParameter right) + { + return left.Equals (right); + } + + public static bool operator != (DelegateParameter left, DelegateParameter right) + { + return !left.Equals (right); + } + + /// + public override string ToString () + { + var sb = new StringBuilder ("{"); + sb.Append ($"Position: {Position}, "); + sb.Append ($"Type: {Type}, "); + sb.Append ($"Name: {Name}, "); + sb.Append ($"IsOptional: {IsOptional}, "); + sb.Append ($"IsParams: {IsParams}, "); + sb.Append ($"IsThis: {IsThis}, "); + sb.Append ($"IsNullable: {IsNullable}, "); + sb.Append ($"IsBlittable: {IsBlittable}, "); + sb.Append ($"IsSmartEnum: {IsSmartEnum}, "); + sb.Append ($"IsArray: {IsArray}, "); + sb.Append ($"ReferenceKind: {ReferenceKind} "); + return sb.ToString (); + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMember.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMember.cs index a7da4a7a251b..003ac01b4a99 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMember.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMember.cs @@ -1,6 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; -using System.Linq; +using System.Text; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; +using ObjCBindings; namespace Microsoft.Macios.Generator.DataModel; @@ -9,12 +14,21 @@ namespace Microsoft.Macios.Generator.DataModel; /// reflected in the generated code. /// readonly struct EnumMember : IEquatable { - /// /// Get the name of the member. /// public string Name { get; } + /// + /// The platform availability of the enum value. + /// + public SymbolAvailability SymbolAvailability { get; } + + /// + /// The data of the field attribute used to mark the value as a binding. + /// + public FieldInfo? FieldInfo { get; } + /// /// Get the attributes added to the member. /// @@ -24,10 +38,21 @@ namespace Microsoft.Macios.Generator.DataModel; /// Create a new change that happened on a member. /// /// The name of the changed member. + /// The library name of the smart enum. + /// The library path to the library, null if it is a known frameworl. + /// The binding data attached to this enum value. + /// The symbol availability of the member. /// The list of attribute changes in the member. - public EnumMember (string name, ImmutableArray attributes) + public EnumMember (string name, + string libraryName, + string? libraryPath, + FieldData? fieldData, + SymbolAvailability symbolAvailability, + ImmutableArray attributes) { Name = name; + FieldInfo = fieldData is null ? null : new (fieldData.Value, libraryName, libraryPath); + SymbolAvailability = symbolAvailability; Attributes = attributes; } @@ -35,13 +60,29 @@ public EnumMember (string name, ImmutableArray attributes) /// Create a new change that happened on a member. /// /// The name of the changed member. - public EnumMember (string name) : this (name, []) { } + /// The library name of the smart enum. + /// The library path to the library, null if it is a known frameworl. + public EnumMember (string name, string libraryName, string? libraryPath) + : this ( + name: name, + libraryName: libraryName, + libraryPath: libraryPath, + fieldData: null, + symbolAvailability: new SymbolAvailability (), + attributes: ImmutableArray.Empty) + { + } /// public bool Equals (EnumMember other) { if (Name != other.Name) return false; + if (SymbolAvailability != other.SymbolAvailability) + return false; + if (FieldInfo != other.FieldInfo) + return false; + var attrComparer = new AttributesEqualityComparer (); return attrComparer.Equals (Attributes, other.Attributes); } @@ -55,7 +96,7 @@ public override bool Equals (object? obj) /// public override int GetHashCode () { - return HashCode.Combine (Name, Attributes); + return HashCode.Combine (Name, SymbolAvailability, Attributes); } public static bool operator == (EnumMember x, EnumMember y) @@ -67,4 +108,14 @@ public override int GetHashCode () { return !(x == y); } + + /// + public override string ToString () + { + var sb = new StringBuilder ( + $"{{ Name: '{Name}' SymbolAvailability: {SymbolAvailability} FieldInfo: {FieldInfo} Attributes: ["); + sb.AppendJoin (", ", Attributes); + sb.Append ("] }"); + return sb.ToString (); + } } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMembersEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMembersEqualityComparer.cs index 7f759f8b9cc0..e26ecbf340a1 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMembersEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/EnumMembersEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/Event.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/Event.cs index f3935b46d8e7..38f7e5e10b85 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/Event.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/Event.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; @@ -5,12 +7,13 @@ using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Availability; +using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.Extensions; namespace Microsoft.Macios.Generator.DataModel; readonly struct Event : IEquatable { - /// /// Name of the property. /// @@ -21,6 +24,11 @@ namespace Microsoft.Macios.Generator.DataModel; /// public string Type { get; } = string.Empty; + /// + /// The platform availability of the enum value. + /// + public SymbolAvailability SymbolAvailability { get; } + /// /// Get the attributes added to the member. /// @@ -36,11 +44,13 @@ namespace Microsoft.Macios.Generator.DataModel; /// public ImmutableArray Accessors { get; } = []; - internal Event (string name, string type, ImmutableArray attributes, + internal Event (string name, string type, SymbolAvailability symbolAvailability, + ImmutableArray attributes, ImmutableArray modifiers, ImmutableArray accessors) { Name = name; Type = type; + SymbolAvailability = symbolAvailability; Attributes = attributes; Modifiers = modifiers; Accessors = accessors; @@ -54,6 +64,9 @@ public bool Equals (Event other) return false; if (Type != other.Type) return false; + if (SymbolAvailability != other.SymbolAvailability) + return false; + var attrsComparer = new AttributesEqualityComparer (); if (!attrsComparer.Equals (Attributes, other.Attributes)) return false; @@ -88,39 +101,47 @@ public override int GetHashCode () return !left.Equals (right); } - public static bool TryCreate (EventDeclarationSyntax declaration, SemanticModel semanticModel, + public static bool TryCreate (EventDeclarationSyntax declaration, RootBindingContext context, [NotNullWhen (true)] out Event? change) { var memberName = declaration.Identifier.ToFullString ().Trim (); // get the symbol from the property declaration - if (semanticModel.GetDeclaredSymbol (declaration) is not IEventSymbol eventSymbol) { + if (context.SemanticModel.GetDeclaredSymbol (declaration) is not IEventSymbol eventSymbol) { change = null; return false; } var type = eventSymbol.Type.ToDisplayString ().Trim (); - var attributes = declaration.GetAttributeCodeChanges (semanticModel); + var attributes = declaration.GetAttributeCodeChanges (context.SemanticModel); ImmutableArray accessorCodeChanges = []; if (declaration.AccessorList is not null && declaration.AccessorList.Accessors.Count > 0) { // calculate any possible changes in the accessors of the property var accessorsBucket = ImmutableArray.CreateBuilder (); - foreach (var accessor in declaration.AccessorList.Accessors) { - var kind = accessor.Kind ().ToAccessorKind (); - var accessorAttributeChanges = accessor.GetAttributeCodeChanges (semanticModel); - accessorsBucket.Add (new (kind, accessorAttributeChanges, [.. accessor.Modifiers])); + foreach (var accessorDeclaration in declaration.AccessorList.Accessors) { + if (context.SemanticModel.GetDeclaredSymbol (accessorDeclaration) is not ISymbol accessorSymbol) + continue; + var kind = accessorDeclaration.Kind ().ToAccessorKind (); + var accessorAttributeChanges = accessorDeclaration.GetAttributeCodeChanges (context.SemanticModel); + accessorsBucket.Add (new ( + accessorKind: kind, + symbolAvailability: accessorSymbol.GetSupportedPlatforms (), + exportPropertyData: null, + attributes: accessorAttributeChanges, + modifiers: [.. accessorDeclaration.Modifiers])); } accessorCodeChanges = accessorsBucket.ToImmutable (); } - change = new (memberName, type, attributes, [.. declaration.Modifiers], accessorCodeChanges); + change = new (memberName, type, eventSymbol.GetSupportedPlatforms (), attributes, + [.. declaration.Modifiers], accessorCodeChanges); return true; } /// public override string ToString () { - var sb = new StringBuilder ($"Name: {Name}, Type: {Type}, Attributes: ["); + var sb = new StringBuilder ($"Name: {Name}, Type: {Type}, Supported Platforms: {SymbolAvailability}, Attributes: ["); sb.AppendJoin (",", Attributes); sb.Append ("], Modifiers: ["); sb.AppendJoin (",", Modifiers.Select (x => x.Text)); diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/EventEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/EventEqualityComparer.cs index bee09b9e1736..6aa4fd9a017b 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/EventEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/EventEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/FieldInfo.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/FieldInfo.cs new file mode 100644 index 000000000000..e43e859e7bb7 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/FieldInfo.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using Microsoft.Macios.Generator.Attributes; + +namespace Microsoft.Macios.Generator.DataModel; + +/// +/// Struct that unfies the data found in a FieldAttribute and extra information calculated such as +/// the library name and path needed for a field. +/// +readonly struct FieldInfo : IEquatable> where T : Enum { + + + /// + /// Name of the library that contains the smart enum definition. + /// + public string LibraryName { get; } + + /// + /// Path of the library that contains the smart enum definition. + /// + public string? LibraryPath { get; } + + /// + /// The data of the field attribute used to mark the value as a binding. + /// + public FieldData FieldData { get; } + + public FieldInfo (FieldData fieldData, string libraryName, string? libraryPath = null) + { + LibraryName = libraryName; + LibraryPath = libraryPath; + FieldData = fieldData; + } + + public void Deconstruct (out FieldData fieldData, out string libraryName, out string? libraryPath) + { + fieldData = FieldData; + libraryName = LibraryName; + libraryPath = LibraryPath; + } + + /// + public bool Equals (FieldInfo other) + { + if (FieldData != other.FieldData) + return false; + if (LibraryName != other.LibraryName) + return false; + return LibraryPath == other.LibraryPath; + } + + /// + public override bool Equals (object? obj) + { + return obj is FieldInfo other && Equals (other); + } + + /// + public override int GetHashCode () + { + return HashCode.Combine (FieldData, LibraryName, LibraryPath); + } + + public static bool operator == (FieldInfo x, FieldInfo y) + { + return x.Equals (y); + } + + public static bool operator != (FieldInfo x, FieldInfo y) + { + return !(x == y); + } + + /// + public override string ToString () + { + return $"FieldData = {FieldData}, LibraryName = {LibraryName}, LibraryPath = {LibraryPath ?? "null"}"; + } + +} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/LibraryPathsComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/LibraryPathsComparer.cs new file mode 100644 index 000000000000..c46960ffb9c5 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/LibraryPathsComparer.cs @@ -0,0 +1,17 @@ +// // Copyright (c) Microsoft Corporation. +// // Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.Macios.Generator.DataModel; + +class LibraryPathsComparer : EqualityComparer<(string LibraryName, string? LibraryPath)> { + + public override bool Equals ((string LibraryName, string? LibraryPath) x, (string LibraryName, string? LibraryPath) y) + => String.Compare (x.LibraryName, y.LibraryName, StringComparison.OrdinalIgnoreCase) == 0; + + public override int GetHashCode ([DisallowNull] (string LibraryName, string? LibraryPath) obj) + => HashCode.Combine (obj.LibraryName, obj.LibraryPath); +} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/Method.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/Method.cs index 8b1ed44e3730..5404685ae92f 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/Method.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/Method.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; @@ -5,63 +7,102 @@ using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; +using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.Extensions; +using ObjCRuntime; namespace Microsoft.Macios.Generator.DataModel; readonly struct Method : IEquatable { + /// + /// Type name that owns the method. + /// public string Type { get; } + + /// + /// Method name. + /// public string Name { get; } - public string ReturnType { get; } + /// + /// Method return type. + /// + public TypeInfo ReturnType { get; } + + /// + /// The platform availability of the method. + /// + public SymbolAvailability SymbolAvailability { get; } + + /// + /// The data of the export attribute used to mark the value as a property binding. + /// + public ExportData ExportMethodData { get; } + + /// + /// Get the attributes added to the constructor. + /// public ImmutableArray Attributes { get; } = []; + /// + /// Modifiers list. + /// public ImmutableArray Modifiers { get; } = []; + /// + /// Parameters list. + /// public ImmutableArray Parameters { get; } = []; - public Method (string type, string name, string returnType, ImmutableArray attributes, + public Method (string type, string name, TypeInfo returnType, + SymbolAvailability symbolAvailability, + ExportData exportMethodData, + ImmutableArray attributes, ImmutableArray modifiers, ImmutableArray parameters) { Type = type; Name = name; ReturnType = returnType; + SymbolAvailability = symbolAvailability; + ExportMethodData = exportMethodData; Attributes = attributes; Modifiers = modifiers; Parameters = parameters; } - public static bool TryCreate (MethodDeclarationSyntax declaration, SemanticModel semanticModel, + public static bool TryCreate (MethodDeclarationSyntax declaration, RootBindingContext context, [NotNullWhen (true)] out Method? change) { - if (semanticModel.GetDeclaredSymbol (declaration) is not IMethodSymbol method) { + if (context.SemanticModel.GetDeclaredSymbol (declaration) is not IMethodSymbol method) { change = null; return false; } - var attributes = declaration.GetAttributeCodeChanges (semanticModel); + var attributes = declaration.GetAttributeCodeChanges (context.SemanticModel); var parametersBucket = ImmutableArray.CreateBuilder (); // loop over the parameters of the construct since changes on those implies a change in the generated code foreach (var parameter in method.Parameters) { var parameterDeclaration = declaration.ParameterList.Parameters [parameter.Ordinal]; - parametersBucket.Add (new (parameter.Ordinal, parameter.Type.ToDisplayString ().Trim (), - parameter.Name) { - IsOptional = parameter.IsOptional, - IsParams = parameter.IsParams, - IsThis = parameter.IsThis, - IsNullable = parameter.NullableAnnotation == NullableAnnotation.Annotated, - DefaultValue = (parameter.HasExplicitDefaultValue) ? parameter.ExplicitDefaultValue?.ToString () : null, - ReferenceKind = parameter.RefKind.ToReferenceKind (), - Attributes = parameterDeclaration.GetAttributeCodeChanges (semanticModel), - }); + if (!Parameter.TryCreate (parameter, parameterDeclaration, context.SemanticModel, out var parameterChange)) + continue; + parametersBucket.Add (parameterChange.Value); } + // DO NOT USE default if null, the reason is that it will set the ArgumentSemantics to be value 0, when + // none is value 1. The reason for that is that the default of an enum is 0, that was a mistake + // in the old binding code. + var exportData = method.GetExportData () + ?? new (null, ArgumentSemantic.None, ObjCBindings.Method.Default); change = new ( type: method.ContainingSymbol.ToDisplayString ().Trim (), // we want the full name name: method.Name, - returnType: method.ReturnType.ToDisplayString ().Trim (), + returnType: new (method.ReturnType), + symbolAvailability: method.GetSupportedPlatforms (), + exportMethodData: exportData, attributes: attributes, modifiers: [.. declaration.Modifiers], parameters: parametersBucket.ToImmutableArray ()); @@ -77,6 +118,11 @@ public bool Equals (Method other) return false; if (ReturnType != other.ReturnType) return false; + if (SymbolAvailability != other.SymbolAvailability) + return false; + if (ExportMethodData != other.ExportMethodData) + return false; + var attrsComparer = new AttributesEqualityComparer (); if (!attrsComparer.Equals (Attributes, other.Attributes)) return false; @@ -84,7 +130,7 @@ public bool Equals (Method other) if (!modifiersComparer.Equals (Modifiers, other.Modifiers)) return false; - var paramComparer = new ParameterEqualityComparer (); + var paramComparer = new MethodParameterEqualityComparer (); return paramComparer.Equals (Parameters, other.Parameters); } @@ -132,6 +178,8 @@ public override string ToString () var sb = new StringBuilder ($"{{ Method: Type: {Type}, "); sb.Append ($"Name: {Name}, "); sb.Append ($"ReturnType: {ReturnType}, "); + sb.Append ($"SymbolAvailability: {SymbolAvailability}, "); + sb.Append ($"ExportMethodData: {ExportMethodData}, "); sb.Append ("Attributes: ["); sb.AppendJoin (", ", Attributes); sb.Append ("], Modifiers: ["); diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/MethodComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/MethodComparer.cs index 731b35a54d39..4c4849080b3d 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/MethodComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/MethodComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Linq; @@ -6,6 +8,7 @@ namespace Microsoft.Macios.Generator.DataModel; class MethodComparer : IComparer { + /// public int Compare (Method x, Method y) { var typeComparison = String.Compare (x.Type, y.Type, StringComparison.Ordinal); @@ -14,7 +17,8 @@ public int Compare (Method x, Method y) var nameComparison = String.Compare (x.Name, y.Name, StringComparison.Ordinal); if (nameComparison != 0) return nameComparison; - var returnTypeComparison = String.Compare (x.ReturnType, y.ReturnType, StringComparison.Ordinal); + var returnTypeComparer = new TypeInfoComparer (); + var returnTypeComparison = returnTypeComparer.Compare (x.ReturnType, y.ReturnType); if (returnTypeComparison != 0) return returnTypeComparison; var modifiersLengthCompare = x.Modifiers.Length.CompareTo (y.Modifiers.Length); @@ -34,7 +38,8 @@ public int Compare (Method x, Method y) if (attributesLengthCompare != 0) return attributesLengthCompare; - // sort by the attributes + // sort by the attributes, this allows us not to do a compare against the platform availability + // since that is generated via the attrs var attributeComparer = new AttributeComparer (); var xAttributes = x.Attributes.Order (attributeComparer).ToArray (); var yAttributes = y.Attributes.Order (attributeComparer).ToArray (); diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/MethodsEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/MethodsEqualityComparer.cs index ffd3bad75f02..223cfc028451 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/MethodsEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/MethodsEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -21,8 +23,8 @@ public override bool Equals (ImmutableArray x, ImmutableArray y) // create the dictionary comparer that will do the based comparison and relay on a list comparer for the // diff methods var dictionaryComparer = - new DictionaryComparer<(string ReturnType, string Name, int ParameterCount), List> ( - new ListComparer (new MethodComparer ())); + new DictionaryComparer<(TypeInfo ReturnType, string Name, int ParameterCount), List> ( + new CollectionComparer (new MethodComparer ())); return dictionaryComparer.Equals (xMethods, yMethods); } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/ModifiersEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/ModifiersEqualityComparer.cs index 80eb3030da42..63c99e0f6870 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/ModifiersEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/ModifiersEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/Parameter.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/Parameter.cs index 3339485432b4..ab3f25b149b1 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/Parameter.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/Parameter.cs @@ -1,6 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; using System.Text; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Extensions; namespace Microsoft.Macios.Generator.DataModel; @@ -43,6 +49,21 @@ namespace Microsoft.Macios.Generator.DataModel; /// public bool IsNullable { get; init; } + /// + /// True if the parameter type is blittable. + /// + public bool IsBlittable { get; } + + /// + /// Returns if the parameter type is a smart enum. + /// + public bool IsSmartEnum { get; init; } + + /// + /// Returns if the parameter is an array type. + /// + public bool IsArray { get; init; } + /// /// Optional default value. /// @@ -53,16 +74,55 @@ namespace Microsoft.Macios.Generator.DataModel; /// public ReferenceKind ReferenceKind { get; init; } + /// + /// If the parameter is a delegate. The method information of the invoke. + /// + public DelegateInfo? Delegate { get; init; } = null; + + /// + /// True if the parameter is a delegate. + /// + //[MemberNotNullWhen (true, nameof (DelegateMethod))] + public bool IsDelegate => Delegate is not null; + /// /// List of attributes attached to the parameter. /// public ImmutableArray Attributes { get; init; } = []; - public Parameter (int position, string type, string name) + public Parameter (int position, string type, string name, bool isBlittable) { Position = position; Type = type; Name = name; + IsBlittable = isBlittable; + } + + public static bool TryCreate (IParameterSymbol symbol, ParameterSyntax declaration, SemanticModel semanticModel, + [NotNullWhen (true)] out Parameter? parameter) + { + var type = symbol.Type is IArrayTypeSymbol arrayTypeSymbol + ? arrayTypeSymbol.ElementType.ToDisplayString () + : symbol.Type.ToDisplayString ().Trim ('?', '[', ']'); + DelegateInfo? delegateInfo = null; + if (symbol.Type is INamedTypeSymbol namedTypeSymbol + && namedTypeSymbol.DelegateInvokeMethod is not null) { + DelegateInfo.TryCreate (namedTypeSymbol.DelegateInvokeMethod, out delegateInfo); + } + + parameter = new (symbol.Ordinal, type, symbol.Name, symbol.Type.IsBlittable ()) { + IsOptional = symbol.IsOptional, + IsParams = symbol.IsParams, + IsThis = symbol.IsThis, + IsNullable = symbol.NullableAnnotation == NullableAnnotation.Annotated, + IsSmartEnum = symbol.Type.IsSmartEnum (), + IsArray = symbol.Type is IArrayTypeSymbol, + DefaultValue = (symbol.HasExplicitDefaultValue) ? symbol.ExplicitDefaultValue?.ToString () : null, + ReferenceKind = symbol.RefKind.ToReferenceKind (), + Delegate = delegateInfo, + Attributes = declaration.GetAttributeCodeChanges (semanticModel), + }; + return true; } /// @@ -82,10 +142,18 @@ public bool Equals (Parameter other) return false; if (IsNullable != other.IsNullable) return false; + if (IsBlittable != other.IsBlittable) + return false; + if (IsSmartEnum != other.IsSmartEnum) + return false; + if (IsArray != other.IsArray) + return false; if (DefaultValue != other.DefaultValue) return false; if (ReferenceKind != other.ReferenceKind) return false; + if (Delegate != other.Delegate) + return false; var attributeComparer = new AttributesEqualityComparer (); return attributeComparer.Equals (Attributes, other.Attributes); @@ -97,6 +165,7 @@ public override bool Equals (object? obj) return obj is Parameter other && Equals (other); } + /// public override int GetHashCode () { var hashCode = new HashCode (); @@ -107,8 +176,11 @@ public override int GetHashCode () hashCode.Add (IsParams); hashCode.Add (IsThis); hashCode.Add (IsNullable); + hashCode.Add (IsSmartEnum); + hashCode.Add (IsArray); hashCode.Add (DefaultValue); hashCode.Add ((int) ReferenceKind); + hashCode.Add (Delegate); return hashCode.ToHashCode (); } @@ -132,11 +204,15 @@ public override string ToString () sb.Append ("Attributes: "); sb.AppendJoin (", ", Attributes); sb.Append ($" IsOptional: {IsOptional}, "); - sb.Append ($"IsParams {IsParams}, "); + sb.Append ($"IsParams: {IsParams}, "); sb.Append ($"IsThis: {IsThis}, "); sb.Append ($"IsNullable: {IsNullable}, "); + sb.Append ($"IsBlittable: {IsBlittable}, "); + sb.Append ($"IsSmartEnum: {IsSmartEnum}, "); + sb.Append ($"IsArray: {IsArray}, "); sb.Append ($"DefaultValue: {DefaultValue}, "); - sb.Append ($"ReferenceKind: {ReferenceKind} }}"); + sb.Append ($"ReferenceKind: {ReferenceKind}, "); + sb.Append ($"Delegate: {Delegate?.ToString () ?? "null"} }}"); return sb.ToString (); } } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterComparer.cs index bd21759b008b..d3b02979e688 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterEqualityComparer.cs index 563adb3e40f3..8e0e42245306 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/ParameterEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -5,27 +7,34 @@ namespace Microsoft.Macios.Generator.DataModel; -class ParameterEqualityComparer : EqualityComparer> { - +class ParameterEqualityComparer (Func getName) : EqualityComparer> { /// - public override bool Equals (ImmutableArray x, ImmutableArray y) + public override bool Equals (ImmutableArray x, ImmutableArray y) { // we know as a fact that parameter names have to be unique, otherwise we could not // compile the code. So make sure that all the parameters with the same name are the same - var xDictionary = Enumerable.ToDictionary (x, parameter => parameter.Name); - var yDictionary = Enumerable.ToDictionary (y, parameter => parameter.Name); + var xDictionary = Enumerable.ToDictionary (x, getName); + var yDictionary = Enumerable.ToDictionary (y, getName); - var comparer = new DictionaryComparer (); + var comparer = new DictionaryComparer (); return comparer.Equals (xDictionary, yDictionary); } /// - public override int GetHashCode (ImmutableArray obj) + public override int GetHashCode (ImmutableArray obj) { var hashCode = new HashCode (); - foreach (var constructor in obj) { - hashCode.Add (constructor); + foreach (var parameter in obj) { + hashCode.Add (parameter); } return hashCode.ToHashCode (); } } + +class MethodParameterEqualityComparer () : ParameterEqualityComparer (GetName) { + static string GetName (Parameter p) => p.Name; +} + +class DelegateParameterEqualityComparer () : ParameterEqualityComparer (GetName) { + static string GetName (DelegateParameter p) => p.Name; +} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/PropertiesEqualityComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/PropertiesEqualityComparer.cs index 4428001df0d5..d42f1dada03e 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/PropertiesEqualityComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/PropertiesEqualityComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/Property.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/Property.cs index 6a8ff5cfe961..aaf9c3ff9c52 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/Property.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/Property.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; @@ -5,6 +7,9 @@ using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; +using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.Extensions; namespace Microsoft.Macios.Generator.DataModel; @@ -18,10 +23,57 @@ namespace Microsoft.Macios.Generator.DataModel; /// public string Name { get; } = string.Empty; + public string BackingField { get; private init; } + + /// + /// Representation of the property type. + /// + public TypeInfo ReturnType { get; } = default; + + /// + /// Returns if the property type is bittable. + /// + public bool IsBlittable => ReturnType.IsBlittable; + + /// + /// Returns if the property type is a smart enum. + /// + public bool IsSmartEnum => ReturnType.IsSmartEnum; + /// - /// String representation of the property type. + /// Returns if the property type is a reference type. /// - public string Type { get; } = string.Empty; + public bool IsReferenceType => ReturnType.IsReferenceType; + + /// + /// The platform availability of the property. + /// + public SymbolAvailability SymbolAvailability { get; } + + /// + /// The data of the field attribute used to mark the value as a field binding. + /// + public FieldInfo? ExportFieldData { get; init; } + + /// + /// True if the property represents a Objc field. + /// + [MemberNotNullWhen (true, nameof (ExportFieldData))] + public bool IsField => ExportFieldData is not null; + + public bool IsNotification + => IsField && ExportFieldData.Value.FieldData.Flags.HasFlag (ObjCBindings.Property.Notification); + + /// + /// The data of the field attribute used to mark the value as a property binding. + /// + public ExportData? ExportPropertyData { get; init; } + + /// + /// True if the property represents a Objc property. + /// + [MemberNotNullWhen (true, nameof (ExportPropertyData))] + public bool IsProperty => ExportPropertyData is not null; /// /// Get the attributes added to the member. @@ -38,11 +90,15 @@ namespace Microsoft.Macios.Generator.DataModel; /// public ImmutableArray Accessors { get; } = []; - internal Property (string name, string type, ImmutableArray attributes, + internal Property (string name, TypeInfo returnType, + SymbolAvailability symbolAvailability, + ImmutableArray attributes, ImmutableArray modifiers, ImmutableArray accessors) { Name = name; - Type = type; + BackingField = $"_{Name}"; + ReturnType = returnType; + SymbolAvailability = symbolAvailability; Attributes = attributes; Modifiers = modifiers; Accessors = accessors; @@ -54,8 +110,21 @@ public bool Equals (Property other) // this could be a large && but ifs are more readable if (Name != other.Name) return false; - if (Type != other.Type) + if (ReturnType != other.ReturnType) + return false; + if (IsBlittable != other.IsBlittable) + return false; + if (IsSmartEnum != other.IsSmartEnum) + return false; + if (IsReferenceType != other.IsReferenceType) + return false; + if (SymbolAvailability != other.SymbolAvailability) return false; + if (ExportFieldData != other.ExportFieldData) + return false; + if (ExportPropertyData != other.ExportPropertyData) + return false; + var attrsComparer = new AttributesEqualityComparer (); if (!attrsComparer.Equals (Attributes, other.Attributes)) return false; @@ -77,7 +146,7 @@ public override bool Equals (object? obj) /// public override int GetHashCode () { - return HashCode.Combine (Name, Type, Attributes, Modifiers, Accessors); + return HashCode.Combine (Name, ReturnType, IsSmartEnum, Attributes, Modifiers, Accessors); } public static bool operator == (Property left, Property right) @@ -90,46 +159,84 @@ public override int GetHashCode () return !left.Equals (right); } - public static bool TryCreate (PropertyDeclarationSyntax declaration, SemanticModel semanticModel, + static FieldInfo? GetFieldInfo (RootBindingContext context, IPropertySymbol propertySymbol) + { + // grab the last port of the namespace + var ns = propertySymbol.ContainingNamespace.Name.Split ('.') [^1]; + var fieldData = propertySymbol.GetFieldData (); + FieldInfo? fieldInfo = null; + if (fieldData is not null && context.TryComputeLibraryName (fieldData.Value.LibraryName, ns, + out string? libraryName, out string? libraryPath)) { + fieldInfo = new FieldInfo (fieldData.Value, libraryName, libraryPath); + } + + return fieldInfo; + } + + public static bool TryCreate (PropertyDeclarationSyntax declaration, RootBindingContext context, [NotNullWhen (true)] out Property? change) { var memberName = declaration.Identifier.ToFullString ().Trim (); // get the symbol from the property declaration - if (semanticModel.GetDeclaredSymbol (declaration) is not IPropertySymbol propertySymbol) { + if (context.SemanticModel.GetDeclaredSymbol (declaration) is not IPropertySymbol propertySymbol) { change = null; return false; } - var type = propertySymbol.Type.ToDisplayString ().Trim (); - var attributes = declaration.GetAttributeCodeChanges (semanticModel); + var propertySupportedPlatforms = propertySymbol.GetSupportedPlatforms (); + var attributes = declaration.GetAttributeCodeChanges (context.SemanticModel); + ImmutableArray accessorCodeChanges = []; if (declaration.AccessorList is not null && declaration.AccessorList.Accessors.Count > 0) { // calculate any possible changes in the accessors of the property var accessorsBucket = ImmutableArray.CreateBuilder (); - foreach (var accessor in declaration.AccessorList.Accessors) { - var kind = accessor.Kind ().ToAccessorKind (); - var accessorAttributeChanges = accessor.GetAttributeCodeChanges (semanticModel); - accessorsBucket.Add (new (kind, accessorAttributeChanges, [.. accessor.Modifiers])); + foreach (var accessorDeclaration in declaration.AccessorList.Accessors) { + if (context.SemanticModel.GetDeclaredSymbol (accessorDeclaration) is not ISymbol accessorSymbol) + continue; + var kind = accessorDeclaration.Kind ().ToAccessorKind (); + var accessorAttributeChanges = + accessorDeclaration.GetAttributeCodeChanges (context.SemanticModel); + accessorsBucket.Add (new ( + accessorKind: kind, + exportPropertyData: accessorSymbol.GetExportData (), + symbolAvailability: accessorSymbol.GetSupportedPlatforms (), + attributes: accessorAttributeChanges, + modifiers: [.. accessorDeclaration.Modifiers])); } accessorCodeChanges = accessorsBucket.ToImmutable (); } if (declaration.ExpressionBody is not null) { - // an expression body == a getter with no attrs or modifiers - accessorCodeChanges = [ - new (AccessorKind.Getter, [], []) + // an expression body == a getter with no attrs or modifiers; that means that the accessor does not have + // extra availability, but the ones form the property + accessorCodeChanges = [new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: propertySupportedPlatforms, + exportPropertyData: null, + attributes: [], + modifiers: []) ]; } - change = new (memberName, type, attributes, [.. declaration.Modifiers], accessorCodeChanges); + change = new ( + name: memberName, + returnType: new (propertySymbol.Type), + symbolAvailability: propertySupportedPlatforms, + attributes: attributes, + modifiers: [.. declaration.Modifiers], + accessors: accessorCodeChanges) { + ExportFieldData = GetFieldInfo (context, propertySymbol), + ExportPropertyData = propertySymbol.GetExportData (), + }; return true; } /// public override string ToString () { - var sb = new StringBuilder ($"Name: {Name}, Type: {Type}, Attributes: ["); + var sb = new StringBuilder ( + $"Name: '{Name}', Type: {ReturnType}, Supported Platforms: {SymbolAvailability}, ExportFieldData: '{ExportFieldData?.ToString () ?? "null"}', ExportPropertyData: '{ExportPropertyData?.ToString () ?? "null"}' Attributes: ["); sb.AppendJoin (",", Attributes); sb.Append ("], Modifiers: ["); sb.AppendJoin (",", Modifiers.Select (x => x.Text)); diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/ReferenceKind.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/ReferenceKind.cs index 9bf8053e2aa8..6eb057d63704 100644 --- a/src/rgen/Microsoft.Macios.Generator/DataModel/ReferenceKind.cs +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/ReferenceKind.cs @@ -1,4 +1,9 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; + +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; namespace Microsoft.Macios.Generator.DataModel; @@ -24,4 +29,12 @@ static class RefKindExtensions { RefKind.RefReadOnlyParameter => ReferenceKind.RefReadOnlyParameter, _ => ReferenceKind.None, }; + + public static SyntaxTokenList ToTokens (this ReferenceKind self) => self switch { + ReferenceKind.Ref => new (Token (SyntaxKind.RefKeyword)), + ReferenceKind.Out => new (Token (SyntaxKind.OutKeyword)), + ReferenceKind.In => new (Token (SyntaxKind.InKeyword)), + ReferenceKind.RefReadOnlyParameter => new (Token (SyntaxKind.RefKeyword), Token (SyntaxKind.ReadOnlyKeyword)), + _ => [] + }; } diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/TypeInfo.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/TypeInfo.cs new file mode 100644 index 000000000000..09f35d640f79 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/TypeInfo.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; +using System.Text; +using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Extensions; + +namespace Microsoft.Macios.Generator.DataModel; + +/// +/// Readonly structure that represents a change in a method return type. +/// +readonly struct TypeInfo : IEquatable { + + /// + /// Type of the parameter. + /// + public string Name { get; } + + /// + /// The metadata name of the type. This is normally the same as name except + /// when the SpecialType is not None. + /// + public string? MetadataName { get; init; } + + /// + /// If the type is an enum, it returns the special type of the underlying type. + /// + public SpecialType? EnumUnderlyingType { get; init; } + + /// + /// If the type is an enum type. + /// + [MemberNotNullWhen (true, nameof (EnumUnderlyingType))] + public bool IsEnum => EnumUnderlyingType is not null; + + /// + /// The special type enum of the type info. This is used to differentiate nint from IntPtr and other. + /// + public SpecialType SpecialType { get; } = SpecialType.None; + + /// + /// True if the parameter is nullable. + /// + public bool IsNullable { get; } + + /// + /// True if the parameter type is blittable. + /// + public bool IsBlittable { get; } + + /// + /// Returns if the return type is a smart enum. + /// + public bool IsSmartEnum { get; } + + /// + /// Returns if the return type is an array type. + /// + public bool IsArray { get; } + + /// + /// Returns if the return type is a reference type. + /// + public bool IsReferenceType { get; } + + /// + /// Returns if the return type is void. + /// + public bool IsVoid => SpecialType == SpecialType.System_Void; + + readonly bool isNSObject = false; + + public bool IsNSObject { + get => isNSObject; + init => isNSObject = value; + } + + readonly bool isINativeObject = false; + + public bool IsINativeObject { + get => isINativeObject; + init => isINativeObject = value; + } + + readonly ImmutableArray parents = []; + public ImmutableArray Parents { + get => parents; + init => parents = value; + } + + readonly ImmutableArray interfaces = []; + + public ImmutableArray Interfaces { + get => interfaces; + init => interfaces = value; + } + + internal TypeInfo (string name, SpecialType specialType) + { + Name = name; + SpecialType = specialType; + } + + internal TypeInfo (string name, + SpecialType specialType = SpecialType.None, + bool isNullable = false, + bool isBlittable = false, + bool isSmartEnum = false, + bool isArray = false, + bool isReferenceType = false) : this (name, specialType) + { + IsNullable = isNullable; + IsBlittable = isBlittable; + IsSmartEnum = isSmartEnum; + IsArray = isArray; + IsReferenceType = isReferenceType; + } + + internal TypeInfo (ITypeSymbol symbol) : + this ( + symbol is IArrayTypeSymbol arrayTypeSymbol + ? arrayTypeSymbol.ElementType.ToDisplayString () + : symbol.ToDisplayString ().Trim ('?', '[', ']'), + symbol.SpecialType) + { + IsNullable = symbol.NullableAnnotation == NullableAnnotation.Annotated; + IsBlittable = symbol.IsBlittable (); + IsSmartEnum = symbol.IsSmartEnum (); + IsArray = symbol is IArrayTypeSymbol; + IsReferenceType = symbol.IsReferenceType; + + // data that we can get from the symbol without being INamedType + symbol.GetInheritance ( + isNSObject: out isNSObject, + isNativeObject: out isINativeObject, + parents: out parents, + interfaces: out interfaces); + + // try to get the named type symbol to have more educated decisions + var namedTypeSymbol = symbol as INamedTypeSymbol; + + // store the enum special type, useful when generate code that needs to cast + EnumUnderlyingType = namedTypeSymbol?.EnumUnderlyingType?.SpecialType; + + if (!IsReferenceType && IsNullable && namedTypeSymbol is not null) { + // get the type argument for nullable, which we know is the data that was boxed and use it to + // overwrite the SpecialType + var typeArgument = namedTypeSymbol.TypeArguments [0]; + SpecialType = typeArgument.SpecialType; + MetadataName = SpecialType is SpecialType.None or SpecialType.System_Void + ? null : typeArgument.MetadataName; + } else { + MetadataName = SpecialType is SpecialType.None or SpecialType.System_Void + ? null : symbol.MetadataName; + } + + } + + /// + public bool Equals (TypeInfo other) + { + if (Name != other.Name) + return false; + if (SpecialType != other.SpecialType) + return false; + if (MetadataName != other.MetadataName) + return false; + if (IsNullable != other.IsNullable) + return false; + if (IsBlittable != other.IsBlittable) + return false; + if (IsSmartEnum != other.IsSmartEnum) + return false; + if (IsArray != other.IsArray) + return false; + if (IsReferenceType != other.IsReferenceType) + return false; + if (IsVoid != other.IsVoid) + return false; + if (EnumUnderlyingType != other.EnumUnderlyingType) + return false; + + // compare base classes and interfaces, order does not matter at all + var listComparer = new CollectionComparer (); + if (!listComparer.Equals (parents, other.Parents)) + return false; + if (!listComparer.Equals (interfaces, other.Interfaces)) + return false; + + return true; + } + + /// + public override bool Equals (object? obj) + { + return obj is TypeInfo other && Equals (other); + } + + /// + public override int GetHashCode () + { + return HashCode.Combine (Name, IsNullable, IsBlittable, IsSmartEnum, IsArray, IsReferenceType, IsVoid); + } + + public static bool operator == (TypeInfo left, TypeInfo right) + { + return left.Equals (right); + } + + public static bool operator != (TypeInfo left, TypeInfo right) + { + return !left.Equals (right); + } + + /// + public override string ToString () + { + var sb = new StringBuilder ("{"); + sb.Append ($"Name: '{Name}', "); + sb.Append ($"MetadataName: '{MetadataName}', "); + sb.Append ($"SpecialType: '{SpecialType}', "); + sb.Append ($"IsNullable: {IsNullable}, "); + sb.Append ($"IsBlittable: {IsBlittable}, "); + sb.Append ($"IsSmartEnum: {IsSmartEnum}, "); + sb.Append ($"IsArray: {IsArray}, "); + sb.Append ($"IsReferenceType: {IsReferenceType}, "); + sb.Append ($"IsVoid : {IsVoid}, "); + sb.Append ($"IsNSObject : {IsNSObject}, "); + sb.Append ($"IsNativeObject: {IsINativeObject}, "); + sb.Append ($"EnumUnderlyingType: '{EnumUnderlyingType?.ToString () ?? "null"}', "); + sb.Append ("Parents: ["); + sb.AppendJoin (", ", parents); + sb.Append ("], Interfaces: ["); + sb.AppendJoin (", ", interfaces); + sb.Append ("]}"); + return sb.ToString (); + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/TypeInfoComparer.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/TypeInfoComparer.cs new file mode 100644 index 000000000000..c657477eb461 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/DataModel/TypeInfoComparer.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Collections.Generic; + +namespace Microsoft.Macios.Generator.DataModel; + +class TypeInfoComparer : IComparer { + + /// + public int Compare (TypeInfo x, TypeInfo y) + { + var returnTypeComparison = String.Compare (x.Name, y.Name, StringComparison.Ordinal); + if (returnTypeComparison != 0) + return returnTypeComparison; + var isNullableComparison = x.IsNullable.CompareTo (y.IsNullable); + if (isNullableComparison != 0) + return isNullableComparison; + var isBlittableComparison = x.IsBlittable.CompareTo (y.IsBlittable); + if (isBlittableComparison != 0) + return isBlittableComparison; + var isSmartEnumComparison = x.IsSmartEnum.CompareTo (y.IsSmartEnum); + if (isSmartEnumComparison != 0) + return isSmartEnumComparison; + var isArrayComparison = x.IsArray.CompareTo (y.IsArray); + if (isArrayComparison != 0) + return isArrayComparison; + var isReferenceTypeComparison = x.IsReferenceType.CompareTo (y.IsReferenceType); + if (isReferenceTypeComparison != 0) + return isReferenceTypeComparison; + return x.IsVoid.CompareTo (y.IsVoid); + } + +} diff --git a/src/rgen/Microsoft.Macios.Generator/Diagnostics.cs b/src/rgen/Microsoft.Macios.Generator/Diagnostics.cs index 5e317cbb9f12..d99c4983cf56 100644 --- a/src/rgen/Microsoft.Macios.Generator/Diagnostics.cs +++ b/src/rgen/Microsoft.Macios.Generator/Diagnostics.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis; namespace Microsoft.Macios.Generator; diff --git a/src/rgen/Microsoft.Macios.Generator/DictionaryComparer.cs b/src/rgen/Microsoft.Macios.Generator/DictionaryComparer.cs index 02f8e3058f2c..2c81566d4b9e 100644 --- a/src/rgen/Microsoft.Macios.Generator/DictionaryComparer.cs +++ b/src/rgen/Microsoft.Macios.Generator/DictionaryComparer.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Linq; diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Dlfcn.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Dlfcn.cs new file mode 100644 index 000000000000..f030e67bec83 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Dlfcn.cs @@ -0,0 +1,434 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Microsoft.Macios.Generator.Emitters; + +/// +/// Syntax factory for the Dlfcn calls. +/// +static partial class BindingSyntaxFactory { + readonly static string Dlfcn = "Dlfcn"; + + /// + /// Get the syntax needed to access a library handle. + /// + /// The library name whose handle we want to retrieve. + /// An argument that points to a library name handle. + static ArgumentSyntax GetLibraryArgument (string libraryName) + { + return Argument ( + MemberAccessExpression ( + SyntaxKind.SimpleMemberAccessExpression, + MemberAccessExpression ( + SyntaxKind.SimpleMemberAccessExpression, + IdentifierName ("Libraries"), + IdentifierName (libraryName)), + IdentifierName ("Handle"))); + } + + + public static CompilationUnitSyntax CachePointer (string libraryName, string fieldName, string storageVariableName) + { + var arguments = new SyntaxNodeOrToken [] { + GetLibraryArgument (libraryName), Token (SyntaxKind.CommaToken), + GetLiteralExpressionArgument (SyntaxKind.StringLiteralExpression, fieldName), Token (SyntaxKind.CommaToken), + Argument (IdentifierName (storageVariableName)) + }; + + return StaticInvocationExpression (Dlfcn, "CachePointer", arguments); + } + + /// + /// Generic method that returns the syntax for the Get* methods. + /// + /// The method name for the invocation. + /// The name of the library that contains the field. + /// The field name literal. + /// + static CompilationUnitSyntax GetConstant (string methodName, string libraryName, string fieldName) + { + var arguments = new SyntaxNodeOrToken [] { + GetLibraryArgument (libraryName), Token (SyntaxKind.CommaToken), + GetLiteralExpressionArgument (SyntaxKind.StringLiteralExpression, fieldName), + }; + return StaticInvocationExpression (Dlfcn, methodName, arguments); + } + + static CompilationUnitSyntax GetGenericConstant (string methodName, string genericName, string libraryName, + string fieldName) + { + var arguments = new SyntaxNodeOrToken [] { + GetLibraryArgument (libraryName), Token (SyntaxKind.CommaToken), + GetLiteralExpressionArgument (SyntaxKind.StringLiteralExpression, fieldName), + }; + var argumentList = ArgumentList (SeparatedList (arguments)).NormalizeWhitespace (); + return StaticInvocationGenericExpression (Dlfcn, methodName, genericName, argumentList); + } + + /// + /// Generates a call for "Dlfcn.GetStringConstant (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetStringConstant (string libraryName, string fieldName) + => GetConstant ("GetStringConstant", libraryName, fieldName); + + + /// + /// Generates a call for "Dlfcn.GetIndirect (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetIndirect (string libraryName, string fieldName) + => GetConstant ("GetIndirect", libraryName, fieldName); + + /// + /// Generates a call for "Dlfcn.GetStruct;lt&type;gt& (libraryName, fieldName);"]; + /// + /// The name of the type of the structure to return. + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetStruct (string type, string libraryName, string fieldName) + => GetGenericConstant ("GetStruct", type, libraryName, fieldName); + + /// + /// Generates a call for "Dlfcn.GetSByte (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetSByte (string libraryName, string fieldName) + => GetConstant ("GetSByte", libraryName, fieldName); + + public static CompilationUnitSyntax SetSByte (string libraryName, string symbol, sbyte value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetByte (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetByte (string libraryName, string fieldName) + => GetConstant ("GetByte", libraryName, fieldName); + + + public static CompilationUnitSyntax SetByte (string libraryName, string symbol, byte value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetInt16 (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetInt16 (string libraryName, string fieldName) + => GetConstant ("GetInt16", libraryName, fieldName); + + public static CompilationUnitSyntax SetInt16 (string libraryName, string symbol, short value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetUInt16 (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetUInt16 (string libraryName, string fieldName) + => GetConstant ("GetUInt16", libraryName, fieldName); + + public static CompilationUnitSyntax SetUInt16 (IntPtr handle, string symbol, ushort value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetInt32 (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetInt32 (string libraryName, string fieldName) + => GetConstant ("GetInt32", libraryName, fieldName); + + public static CompilationUnitSyntax SetInt32 (IntPtr handle, string symbol, int value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetUInt32 (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetUInt32 (string libraryName, string fieldName) + => GetConstant ("GetUInt32", libraryName, fieldName); + + public static CompilationUnitSyntax SetUInt32 (IntPtr handle, string symbol, uint value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetInt64 (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetInt64 (string libraryName, string fieldName) + => GetConstant ("GetInt64", libraryName, fieldName); + + public static CompilationUnitSyntax SetInt64 (IntPtr handle, string symbol, long value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetUInt64 (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetUInt64 (string libraryName, string fieldName) + => GetConstant ("GetUInt64", libraryName, fieldName); + + public static CompilationUnitSyntax SetUInt64 (string libraryName, string symbol, ulong value) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax SetString (string libraryName, string symbol, string? value) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax SetArray (string libraryName, string symbol, /*NSArray?*/ string array) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax SetObject (string libraryName, string symbol, /*NSObject?*/ string value) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax GetNInt (string libraryName, string symbol) + => GetConstant ("GetNInt", libraryName, symbol); + + public static CompilationUnitSyntax SetNInt (IntPtr handle, string symbol, nint value) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax GetNUInt (string libraryName, string symbol) + => GetConstant ("GetNInt", libraryName, symbol); + + public static CompilationUnitSyntax SetNUInt (string libraryName, string symbol, nuint value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetNFloat (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetNFloat (string libraryName, string fieldName) + => GetConstant ("GetNFloat", libraryName, fieldName); + + public static CompilationUnitSyntax SetNFloat (string libraryName, string symbol, /*nfloat*/ string value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetIntPtr (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetIntPtr (string libraryName, string fieldName) + => GetConstant ("GetIntPtr", libraryName, fieldName); + + /// + /// Generates a call for "Dlfcn.GetUIntPtr (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetUIntPtr (string libraryName, string fieldName) + => GetConstant ("GetUIntPtr", libraryName, fieldName); + + public static CompilationUnitSyntax SetUIntPtr (string libraryName, string symbol, UIntPtr value) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax SetIntPtr (string libraryName, string symbol, IntPtr value) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax GetCGRect (string libraryName, string symbol) + => GetConstant ("GetCGRect", libraryName, symbol); + + /// + /// Generates a call for "Dlfcn.GetCGSize (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetCGSize (string libraryName, string fieldName) + => GetConstant ("GetCGSize", libraryName, fieldName); + + public static CompilationUnitSyntax SetCGSize (string libraryName, string symbol, /*CGSize*/ string value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetDouble (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetDouble (string libraryName, string fieldName) + => GetConstant ("GetDouble", libraryName, fieldName); + + public static CompilationUnitSyntax SetDouble (string libraryName, string symbol, double value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Dlfcn.GetFloat (libraryName, fieldName);"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetFloat (string libraryName, string fieldName) + => GetConstant ("GetFloat", libraryName, fieldName); + + public static CompilationUnitSyntax SetFloat (IntPtr handle, string symbol, float value) + => throw new NotImplementedException (); + + /// + /// Generates a call for "Runtime.GetNSObject<nsobjectType> (Dlfcn.GetIndirect (libraryName, fieldName))!;"]; + /// + /// The library from where the field will be loaded. + /// The field name. + /// A compilation unit with the desired Dlfcn call. + public static CompilationUnitSyntax GetNSObjectField (string nsObjectType, string libraryName, string fieldName) + { + var getIndirectArguments = new SyntaxNodeOrToken [] { + GetLibraryArgument (libraryName), Token (SyntaxKind.CommaToken), + GetLiteralExpressionArgument (SyntaxKind.StringLiteralExpression, fieldName), + }; + + var getIndirectInvocation = InvocationExpression ( + MemberAccessExpression ( + SyntaxKind.SimpleMemberAccessExpression, + IdentifierName (Dlfcn), + IdentifierName ("GetIndirect").WithTrailingTrivia (Space) + ) + ).WithArgumentList (ArgumentList (SeparatedList (getIndirectArguments)).NormalizeWhitespace ()); + + var getNSObjectArguments = + ArgumentList (SingletonSeparatedList (Argument (getIndirectInvocation))); + return GetNSObject (nsObjectType, getNSObjectArguments, suppressNullableWarning: true); + } + + public static CompilationUnitSyntax SetNSObject (string nsObjectType, string libraryName, string symbol, + string value) + => throw new NotImplementedException (); + + public static CompilationUnitSyntax GetBlittableField (string blittableType, string libraryName, string fieldName) + { + var arguments = new SyntaxNodeOrToken [] { + GetLibraryArgument (libraryName), Token (SyntaxKind.CommaToken), + GetLiteralExpressionArgument (SyntaxKind.StringLiteralExpression, fieldName), + }; + + // Dlfcn.dlsym (FOO, BAR)) + var dlsymInvocation = InvocationExpression ( + MemberAccessExpression ( + SyntaxKind.SimpleMemberAccessExpression, + IdentifierName (Dlfcn), + IdentifierName ("dlsym").WithTrailingTrivia (Space) + ) + ).WithArgumentList (ArgumentList (SeparatedList (arguments)).NormalizeWhitespace ()); + + // *((TYPE *) dlsymCall) + var castExpression = PrefixUnaryExpression ( + SyntaxKind.PointerIndirectionExpression, + ParenthesizedExpression ( + CastExpression ( + PointerType ( + IdentifierName (blittableType)), + dlsymInvocation.WithLeadingTrivia (Space) + ))); + + var compilationUnit = CompilationUnit ().WithMembers ( + SingletonList ( + GlobalStatement ( + ExpressionStatement (castExpression + )))); + return compilationUnit; + } + + + public static CompilationUnitSyntax SetBlittableField (string nsObjectType, string libraryName, string fieldName, + string value) + => throw new NotImplementedException (); + + /// + /// Returns the getter needed to access the native value exposed by a field property. The method will return the + /// Dflcn calls needed. + /// + /// A field property under code generation. + /// The appropriate Dlfcn call to retrieve the native value of a field property. + /// When the caller tries to generate the call for a no field property. + /// When the property type is not supported for a field property. + public static CompilationUnitSyntax FieldConstantGetter (in Property property) + { + // check if this is a field, if it is not, we have an issue with the code generator + if (!property.IsField) + throw new NotSupportedException ("Cannot retrieve getter for non field property."); + + // retrieve all the necessary data from the info field of the property + var libraryName = property.ExportFieldData.Value.LibraryName; + var symbolName = property.ExportFieldData.Value.FieldData.SymbolName; + + if (property.ReturnType.IsNSObject) { + return property.ReturnType.Name == "Foundation.NSString" + ? GetStringConstant (libraryName, symbolName) + // all nsobjects are retrieved using the same generic getter + : GetNSObjectField (property.ReturnType.Name, libraryName, symbolName); + } + + // keep the formatting to make it more readable +#pragma warning disable format + // use the return type and the special type of the property to decide what getter we are going to us + return property.ReturnType switch { + // special types + { Name: "CoreGraphics.CGSize" } => GetCGSize (libraryName, symbolName), + { Name: "CoreMedia.CMTag" } => GetStruct ("CoreMedia.CMTag", libraryName, symbolName), + { Name: "nfloat" } => GetNFloat (libraryName, symbolName), + + // Blittable types + { Name: "CoreMedia.CMTime" or "AVFoundation.AVCaptureWhiteBalanceGains" } + => GetBlittableField (property.ReturnType.Name, libraryName, symbolName), + + // enum types, decide based on its enum backing field, smart enums have to be done in the binding + // manually + { IsEnum: true, EnumUnderlyingType: SpecialType.System_SByte } => GetSByte (libraryName, symbolName), + { IsEnum: true, EnumUnderlyingType: SpecialType.System_Byte } => GetByte (libraryName, symbolName), + { IsEnum: true, EnumUnderlyingType: SpecialType.System_Int16 } => GetInt16 (libraryName, symbolName), + { IsEnum: true, EnumUnderlyingType: SpecialType.System_UInt16 } => GetUInt16 (libraryName, symbolName), + { IsEnum: true, EnumUnderlyingType: SpecialType.System_Int32 } => GetInt32 (libraryName, symbolName), + { IsEnum: true, EnumUnderlyingType: SpecialType.System_UInt32 } => GetUInt32 (libraryName, symbolName), + { IsEnum: true, EnumUnderlyingType: SpecialType.System_Int64 } => GetInt64 (libraryName, symbolName), + { IsEnum: true, EnumUnderlyingType: SpecialType.System_UInt64 } => GetUInt64 (libraryName, symbolName), + + // General special types + { SpecialType: SpecialType.System_SByte } => GetSByte (libraryName, symbolName), + { SpecialType: SpecialType.System_Byte } => GetByte (libraryName, symbolName), + { SpecialType: SpecialType.System_Int16 } => GetInt16 (libraryName, symbolName), + { SpecialType: SpecialType.System_UInt16 } => GetUInt16 (libraryName, symbolName), + { SpecialType: SpecialType.System_IntPtr } => GetIntPtr (libraryName, symbolName), + { SpecialType: SpecialType.System_Int32 } => GetInt32 (libraryName, symbolName), + { SpecialType: SpecialType.System_UIntPtr } => GetUIntPtr (libraryName, symbolName), + { SpecialType: SpecialType.System_UInt32 } => GetUInt32 (libraryName, symbolName), + { SpecialType: SpecialType.System_Int64 } => GetInt64 (libraryName, symbolName), + { SpecialType: SpecialType.System_UInt64 } => GetUInt64 (libraryName, symbolName), + { SpecialType: SpecialType.System_Double } => GetDouble (libraryName, symbolName), + { SpecialType: SpecialType.System_Single } => GetFloat (libraryName, symbolName), + + // We do not support the property + _ => throw new NotImplementedException ($"Return type {property.ReturnType} is not implemented."), + }; +#pragma warning restore format + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Runtime.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Runtime.cs new file mode 100644 index 000000000000..923f8f79f111 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Runtime.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Microsoft.Macios.Generator.Emitters; + +static partial class BindingSyntaxFactory { + readonly static string Runtime = "Runtime"; + + public static CompilationUnitSyntax GetNSObject (string nsObjectType, ArgumentListSyntax argumentList, + bool suppressNullableWarning = false) + => StaticInvocationGenericExpression (Runtime, "GetNSObject", nsObjectType, argumentList, + suppressNullableWarning); +} diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.cs new file mode 100644 index 000000000000..d7cd1f070103 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Microsoft.Macios.Generator.Emitters; + +static partial class BindingSyntaxFactory { + /// + /// Returns an argument syntax for the provided kind and literal expression. + /// + /// The kind of the literal value argument. + /// The value of the argument. + /// A literal argument with the provided value. + static ArgumentSyntax GetLiteralExpressionArgument (SyntaxKind kind, string literal) + { + return Argument (LiteralExpression (kind, Literal (literal))); + } + + static CompilationUnitSyntax StaticInvocationExpression (string staticClassName, string methodName, + SyntaxNodeOrToken [] argumentList) + { + var invocation = InvocationExpression ( + MemberAccessExpression ( + SyntaxKind.SimpleMemberAccessExpression, + IdentifierName (staticClassName), + IdentifierName (methodName).WithTrailingTrivia (Space) + ) + ).WithArgumentList (ArgumentList (SeparatedList (argumentList)).NormalizeWhitespace ()); + + var compilationUnit = CompilationUnit ().WithMembers ( + SingletonList ( + GlobalStatement ( + ExpressionStatement (invocation)))); + return compilationUnit; + } + + + static CompilationUnitSyntax StaticInvocationGenericExpression (string staticClassName, string methodName, + string genericName, + ArgumentListSyntax argumentList, bool suppressNullableWarning = false) + { + var invocation = InvocationExpression ( + MemberAccessExpression ( + SyntaxKind.SimpleMemberAccessExpression, + IdentifierName (staticClassName), + GenericName ( + Identifier (methodName)) + .WithTypeArgumentList (TypeArgumentList ( + SingletonSeparatedList (IdentifierName (genericName)))) + .WithTrailingTrivia (Space) + ) + ).WithArgumentList (argumentList); + + var compilationUnit = CompilationUnit ().WithMembers ( + SingletonList ( + GlobalStatement ( + ExpressionStatement ( + suppressNullableWarning + ? PostfixUnaryExpression (SyntaxKind.SuppressNullableWarningExpression, invocation) + : invocation + )))); + return compilationUnit; + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/CategoryEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/CategoryEmitter.cs new file mode 100644 index 000000000000..062ffb944468 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/CategoryEmitter.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; +using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Context; +using Microsoft.Macios.Generator.DataModel; + +namespace Microsoft.Macios.Generator.Emitters; + +class CategoryEmitter : ICodeEmitter { + public string GetSymbolName (in CodeChanges codeChanges) => string.Empty; + public IEnumerable UsingStatements => []; + public bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out ImmutableArray? diagnostics) + { + diagnostics = null; + return true; + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs index 1bc9a0fc3fb3..a683f06ca5c9 100644 --- a/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs @@ -1,27 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.Context; +using Microsoft.Macios.Generator.DataModel; +using ObjCBindings; namespace Microsoft.Macios.Generator.Emitters; -class ClassEmitter (SymbolBindingContext context, TabbedStringBuilder builder) : ICodeEmitter { - public string SymbolNamespace => context.Namespace; - public string SymbolName => context.SymbolName; +class ClassEmitter : ICodeEmitter { + public string GetSymbolName (in CodeChanges codeChanges) => codeChanges.Name; - public IEnumerable UsingStatements => []; + public IEnumerable UsingStatements => [ + "System", + "System.Drawing", + "System.Diagnostics", + "System.ComponentModel", + "System.Threading.Tasks", + "System.Runtime.Versioning", + "System.Runtime.InteropServices", + "System.Diagnostics.CodeAnalysis", + "ObjCRuntime", + ]; - public bool TryEmit ([NotNullWhen (false)] out ImmutableArray? diagnostics) + + void EmitDefaultConstructors (in BindingContext bindingContext, TabbedStringBuilder classBlock, bool disableDefaultCtor) { - builder.AppendLine (); + if (!disableDefaultCtor) { + classBlock.AppendGeneratedCodeAttribute (); + classBlock.AppendDesignatedInitializer (); + classBlock.AppendRaw ( +$@"[Export (""init"")] +public {bindingContext.Changes.Name} () : base (NSObjectFlag.Empty) +{{ + if (IsDirectBinding) + InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, global::ObjCRuntime.Selector.GetHandle (""init"")), ""init""); + else + InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, global::ObjCRuntime.Selector.GetHandle (""init"")), ""init""); +}} +"); + classBlock.AppendLine (); + } + + classBlock.AppendGeneratedCodeAttribute (); + classBlock.AppendEditorBrowsableAttribute (EditorBrowsableState.Advanced); + classBlock.AppendLine ($"protected {bindingContext.Changes.Name} (NSObjectFlag t) : base (t) {{}}"); + + classBlock.AppendLine (); + classBlock.AppendGeneratedCodeAttribute (); + classBlock.AppendEditorBrowsableAttribute (EditorBrowsableState.Advanced); + classBlock.AppendLine ($"protected internal {bindingContext.Changes.Name} (NativeHandle handle) : base (handle) {{}}"); + } + + public bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out ImmutableArray? diagnostics) + { diagnostics = null; - // add the namespace and the class declaration - using (var namespaceBlock = builder.CreateBlock ($"namespace {context.Namespace}", true)) { - using (var classBlock = namespaceBlock.CreateBlock ($"public partial class {SymbolName}", true)) { - classBlock.AppendLine ("// TODO: add binding code here"); + if (bindingContext.Changes.BindingType != BindingType.Class) { + diagnostics = [Diagnostic.Create ( + Diagnostics + .RBI0000, // An unexpected error occurred while processing '{0}'. Please fill a bug report at https://github.com/xamarin/xamarin-macios/issues/new. + null, + bindingContext.Changes.FullyQualifiedSymbol)]; + return false; + } + + // namespace declaration + bindingContext.Builder.AppendLine (); + bindingContext.Builder.AppendLine ($"namespace {string.Join (".", bindingContext.Changes.Namespace)};"); + bindingContext.Builder.AppendLine (); + + // register the class only if we are not dealing with a static class + var bindingData = (BindingTypeData) bindingContext.Changes.BindingInfo; + // registration depends on the class name. If the binding data contains a name, we use that one, else + // we use the name of the class + var registrationName = bindingData.Name ?? bindingContext.Changes.Name; + + if (!bindingContext.Changes.IsStatic) { + bindingContext.Builder.AppendLine ($"[Register (\"{registrationName}\", true)]"); + } + var modifiers = $"{string.Join (' ', bindingContext.Changes.Modifiers)} "; + using (var classBlock = bindingContext.Builder.CreateBlock ($"{(string.IsNullOrWhiteSpace (modifiers) ? string.Empty : modifiers)}class {bindingContext.Changes.Name}", true)) { + if (!bindingContext.Changes.IsStatic) { + classBlock.AppendGeneratedCodeAttribute (optimizable: true); + classBlock.AppendLine ($"static readonly NativeHandle class_ptr = Class.GetHandle (\"{registrationName}\");"); + classBlock.AppendLine (); + classBlock.AppendLine ("public override NativeHandle ClassHandle => class_ptr;"); + classBlock.AppendLine (); + + EmitDefaultConstructors (bindingContext: bindingContext, + classBlock: classBlock, + disableDefaultCtor: bindingData.Flags.HasFlag (Class.DisableDefaultCtor)); } + + classBlock.AppendLine ("// TODO: add binding code here"); } return true; } diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/EmitterFactory.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/EmitterFactory.cs index 6b2d0780a0c7..b0c0e516f462 100644 --- a/src/rgen/Microsoft.Macios.Generator/Emitters/EmitterFactory.cs +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/EmitterFactory.cs @@ -1,7 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.DataModel; namespace Microsoft.Macios.Generator.Emitters; @@ -10,31 +10,13 @@ namespace Microsoft.Macios.Generator.Emitters; /// Returns the emitter that is related to the provided declaration type. /// static class EmitterFactory { - public static bool TryCreate (CodeChanges changes, RootBindingContext context, SemanticModel semanticModel, - INamedTypeSymbol symbol, TabbedStringBuilder builder, - [NotNullWhen (true)] out ICodeEmitter? emitter) - { - switch (changes.BindingType) { - case BindingType.Class: { - var ctx = new ClassBindingContext (context, semanticModel, symbol); - emitter = new ClassEmitter (ctx, builder); - break; - } - case BindingType.SmartEnum: { - var ctx = new SymbolBindingContext (context, semanticModel, symbol); - emitter = new EnumEmitter (ctx, builder); - break; - } - case BindingType.Protocol: { - var ctx = new SymbolBindingContext (context, semanticModel, symbol); - emitter = new InterfaceEmitter (ctx, builder); - break; - } - default: - emitter = null; - break; - } - return emitter is not null; - } + static readonly Dictionary emitters = new () { + { BindingType.Class, new ClassEmitter () }, + { BindingType.SmartEnum, new EnumEmitter () }, + { BindingType.Protocol, new InterfaceEmitter () }, + { BindingType.Category, new CategoryEmitter () }, + }; + public static bool TryCreate (CodeChanges changes, [NotNullWhen (true)] out ICodeEmitter? emitter) + => emitters.TryGetValue (changes.BindingType, out emitter); } diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/EnumEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/EnumEmitter.cs index 7ec4a42d2031..b653c3222b78 100644 --- a/src/rgen/Microsoft.Macios.Generator/Emitters/EnumEmitter.cs +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/EnumEmitter.cs @@ -1,76 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.DataModel; -using Microsoft.Macios.Generator.Extensions; -using ObjCBindings; +using Microsoft.Macios.Generator.Formatters; namespace Microsoft.Macios.Generator.Emitters; -#pragma warning disable CS9113 // Parameter is unread. This class is work in progress -class EnumEmitter (SymbolBindingContext context, TabbedStringBuilder builder) -#pragma warning restore CS9113 // Parameter is unread. - : ICodeEmitter { +class EnumEmitter : ICodeEmitter { - public string SymbolNamespace => context.Namespace; - public string SymbolName => $"{context.SymbolName}Extensions"; + public string GetSymbolName (in CodeChanges codeChanges) => $"{codeChanges.Name}Extensions"; public IEnumerable UsingStatements => ["Foundation", "ObjCRuntime", "System"]; - void Emit (TabbedStringBuilder classBlock, (IFieldSymbol Symbol, FieldData FieldData) enumField, int index) + void EmitEnumFieldAtIndex (TabbedStringBuilder classBlock, in CodeChanges codeChanges, int index) { - var typeNamespace = enumField.Symbol.ContainingType.ContainingNamespace.Name; - if (!context.RootBindingContext.TryComputeLibraryName (enumField.FieldData.LibraryName, typeNamespace, - out string? libraryName, out string? libraryPath)) { + var enumField = codeChanges.EnumMembers [index]; + if (enumField.FieldInfo is null) return; - } - // availability is the merge of the container plus whatever we added to the current members - var availability = enumField.Symbol.GetSupportedPlatforms (); + var (fieldData, libraryName, libraryPath) = enumField.FieldInfo.Value; - classBlock.AppendMemberAvailability (availability); - classBlock.AppendLine ($"[Field (\"{enumField.FieldData.SymbolName}\", \"{libraryPath ?? libraryName}\")]"); - using (var propertyBlock = classBlock.CreateBlock ($"internal unsafe static IntPtr {enumField.FieldData.SymbolName}", true)) + classBlock.AppendMemberAvailability (enumField.SymbolAvailability); + classBlock.AppendLine ($"[Field (\"{fieldData.SymbolName}\", \"{libraryPath ?? libraryName}\")]"); + using (var propertyBlock = classBlock.CreateBlock ($"internal unsafe static IntPtr {fieldData.SymbolName}", true)) using (var getterBlock = propertyBlock.CreateBlock ("get", true)) { getterBlock.AppendLine ($"fixed (IntPtr *storage = &values [{index}])"); getterBlock.AppendLine ( - $"\treturn Dlfcn.CachePointer (Libraries.{libraryName}.Handle, \"{enumField.FieldData.SymbolName}\", storage);"); + $"\treturn Dlfcn.CachePointer (Libraries.{libraryName}.Handle, \"{fieldData.SymbolName}\", storage);"); } } - bool TryEmit (TabbedStringBuilder classBlock, ImmutableArray<(IFieldSymbol Symbol, FieldData FieldData)> fields) + bool TryEmit (TabbedStringBuilder classBlock, in CodeChanges codeChanges) { // keep track of the field symbols, they have to be unique, if we find a duplicate we return false and // abort the code generation var backingFields = new HashSet (); - for (var index = 0; index < fields.Length; index++) { - if (!backingFields.Add (fields [index].FieldData.SymbolName)) { + for (var index = 0; index < codeChanges.EnumMembers.Length; index++) { + if (codeChanges.EnumMembers [index].FieldInfo is null) + continue; + if (!backingFields.Add (codeChanges.EnumMembers [index].FieldInfo!.Value.FieldData.SymbolName)) { return false; } - var field = fields [index]; classBlock.AppendLine (); - Emit (classBlock, field, index); + EmitEnumFieldAtIndex (classBlock, codeChanges, index); } return true; } - void Emit (TabbedStringBuilder classBlock, INamedTypeSymbol enumSymbol, - ImmutableArray<(IFieldSymbol Symbol, FieldData FieldData)>? members) + void EmitExtensionMethods (TabbedStringBuilder classBlock, in CodeChanges codeChanges) { - if (members is null) + if (codeChanges.EnumMembers.Length == 0) return; // smart enum require 4 diff methods to be able to retrieve the values // Get constant - using (var getConstantBlock = classBlock.CreateBlock ($"public static NSString? GetConstant (this {enumSymbol.Name} self)", true)) { + using (var getConstantBlock = classBlock.CreateBlock ($"public static NSString? GetConstant (this {codeChanges.Name} self)", true)) { getConstantBlock.AppendLine ("IntPtr ptr = IntPtr.Zero;"); using (var switchBlock = getConstantBlock.CreateBlock ("switch ((int) self)", true)) { - for (var index = 0; index < members.Value.Length; index++) { - var (_, fieldData) = members.Value [index]; + for (var index = 0; index < codeChanges.EnumMembers.Length; index++) { + var enumMember = codeChanges.EnumMembers [index]; + if (enumMember.FieldInfo is null) + continue; + var (fieldData, _, _) = enumMember.FieldInfo.Value; switchBlock.AppendLine ($"case {index}: // {fieldData.SymbolName}"); switchBlock.AppendLine ($"\tptr = {fieldData.SymbolName};"); switchBlock.AppendLine ("\tbreak;"); @@ -82,12 +77,15 @@ void Emit (TabbedStringBuilder classBlock, INamedTypeSymbol enumSymbol, classBlock.AppendLine (); // Get value - using (var getValueBlock = classBlock.CreateBlock ($"public static {enumSymbol.Name} GetValue (NSString constant)", true)) { + using (var getValueBlock = classBlock.CreateBlock ($"public static {codeChanges.Name} GetValue (NSString constant)", true)) { getValueBlock.AppendLine ("if (constant is null)"); getValueBlock.AppendLine ("\tthrow new ArgumentNullException (nameof (constant));"); - foreach ((IFieldSymbol fieldSymbol, FieldData fieldData) in members) { + foreach (var enumMember in codeChanges.EnumMembers) { + if (enumMember.FieldInfo is null) + continue; + var (fieldData, _, _) = enumMember.FieldInfo.Value; getValueBlock.AppendLine ($"if (constant.IsEqualTo ({fieldData.SymbolName}))"); - getValueBlock.AppendLine ($"\treturn {enumSymbol.Name}.{fieldSymbol.Name};"); + getValueBlock.AppendLine ($"\treturn {codeChanges.Name}.{enumMember.Name};"); } getValueBlock.AppendLine ( @@ -97,7 +95,7 @@ void Emit (TabbedStringBuilder classBlock, INamedTypeSymbol enumSymbol, classBlock.AppendLine (); // To ConstantArray classBlock.AppendRaw ( -@$"internal static NSString?[]? ToConstantArray (this {enumSymbol.Name}[]? values) +@$"internal static NSString?[]? ToConstantArray (this {codeChanges.Name}[]? values) {{ if (values is null) return null; @@ -112,11 +110,11 @@ void Emit (TabbedStringBuilder classBlock, INamedTypeSymbol enumSymbol, classBlock.AppendLine (); // ToEnumArray classBlock.AppendRaw ( -@$"internal static {enumSymbol.Name}[]? ToEnumArray (this NSString[]? values) +@$"internal static {codeChanges.Name}[]? ToEnumArray (this NSString[]? values) {{ if (values is null) return null; - var rv = new global::System.Collections.Generic.List<{enumSymbol.Name}> (); + var rv = new global::System.Collections.Generic.List<{codeChanges.Name}> (); for (var i = 0; i < values.Length; i++) {{ var value = values [i]; rv.Add (GetValue (value)); @@ -125,36 +123,40 @@ void Emit (TabbedStringBuilder classBlock, INamedTypeSymbol enumSymbol, }}"); } - public bool TryEmit ([NotNullWhen (false)] out ImmutableArray? diagnostics) + public bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out ImmutableArray? diagnostics) { diagnostics = null; - if (!context.Symbol.TryGetEnumFields (out var members, - out diagnostics) || members.Value.Length == 0) { - // return true to indicate that we did generate code, even if it's empty, the analyzer will take care - // of the rest - return true; + if (bindingContext.Changes.BindingType != BindingType.SmartEnum) { + diagnostics = [Diagnostic.Create ( + Diagnostics + .RBI0000, // An unexpected error occurred while processing '{0}'. Please fill a bug report at https://github.com/xamarin/xamarin-macios/issues/new. + null, + bindingContext.Changes.FullyQualifiedSymbol)]; + return false; } - // in the old generator we had to copy over the enum, in this new approach the only code + // in the old generator we had to copy over the enum, in this new approach, the only code // we need to create is the extension class for the enum that is backed by fields - builder.AppendLine (); - builder.AppendLine ($"namespace {context.Namespace};"); - builder.AppendLine (); - - builder.AppendMemberAvailability (context.SymbolAvailability); - builder.AppendGeneratedCodeAttribute (); - using (var classBlock = builder.CreateBlock ($"static public partial class {SymbolName}", true)) { + bindingContext.Builder.AppendLine (); + bindingContext.Builder.AppendLine ($"namespace {string.Join (".", bindingContext.Changes.Namespace)};"); + bindingContext.Builder.AppendLine (); + + bindingContext.Builder.AppendMemberAvailability (bindingContext.Changes.SymbolAvailability); + bindingContext.Builder.AppendGeneratedCodeAttribute (); + var extensionClassDeclaration = + bindingContext.Changes.ToSmartEnumExtensionDeclaration (GetSymbolName (bindingContext.Changes)); + using (var classBlock = bindingContext.Builder.CreateBlock (extensionClassDeclaration.ToString (), true)) { classBlock.AppendLine (); - classBlock.AppendLine ($"static IntPtr[] values = new IntPtr [{members.Value.Length}];"); + classBlock.AppendLine ($"static IntPtr[] values = new IntPtr [{bindingContext.Changes.EnumMembers.Length}];"); // foreach member in the enum we need to create a field that holds the value, the property emitter - // will take care of generating the property. Do not order by name to keep the order of the enum - if (!TryEmit (classBlock, members.Value)) { + // will take care of generating the property. Do not order it by name to keep the order of the enum + if (!TryEmit (classBlock, bindingContext.Changes)) { diagnostics = []; // empty diagnostics since it was a user error return false; } classBlock.AppendLine (); // emit the extension methods that will be used to get the values from the enum - Emit (classBlock, context.Symbol, members); + EmitExtensionMethods (classBlock, bindingContext.Changes); classBlock.AppendLine (); } diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/ICodeEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/ICodeEmitter.cs index 2894bab2e2f2..c389ab7ce754 100644 --- a/src/rgen/Microsoft.Macios.Generator/Emitters/ICodeEmitter.cs +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/ICodeEmitter.cs @@ -1,7 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Context; +using Microsoft.Macios.Generator.DataModel; namespace Microsoft.Macios.Generator.Emitters; @@ -9,8 +13,7 @@ namespace Microsoft.Macios.Generator.Emitters; /// Interface to be implemented by all those classes that know how to emit code for a binding. /// interface ICodeEmitter { - string SymbolNamespace { get; } - string SymbolName { get; } - bool TryEmit ([NotNullWhen (false)] out ImmutableArray? diagnostics); + string GetSymbolName (in CodeChanges codeChanges); + bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out ImmutableArray? diagnostics); IEnumerable UsingStatements { get; } } diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/InterfaceEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/InterfaceEmitter.cs index cacf505096bb..2d20cd8107e8 100644 --- a/src/rgen/Microsoft.Macios.Generator/Emitters/InterfaceEmitter.cs +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/InterfaceEmitter.cs @@ -1,19 +1,18 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Macios.Generator.Context; +using Microsoft.Macios.Generator.DataModel; namespace Microsoft.Macios.Generator.Emitters; -#pragma warning disable CS9113 // Parameter is unread, this class is work in progress -class InterfaceEmitter (SymbolBindingContext context, TabbedStringBuilder builder) : ICodeEmitter { -#pragma warning restore CS9113 // Parameter is unread. - public string SymbolNamespace => context.Namespace; - public string SymbolName { get; } = string.Empty; +class InterfaceEmitter : ICodeEmitter { + public string GetSymbolName (in CodeChanges codeChanges) => string.Empty; public IEnumerable UsingStatements => []; - public bool TryEmit ([NotNullWhen (false)] out ImmutableArray? diagnostics) + public bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out ImmutableArray? diagnostics) { diagnostics = null; return true; diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/LibraryEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/LibraryEmitter.cs index 5477eb6f2664..8a4351f089e2 100644 --- a/src/rgen/Microsoft.Macios.Generator/Emitters/LibraryEmitter.cs +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/LibraryEmitter.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; @@ -10,21 +12,36 @@ namespace Microsoft.Macios.Generator.Emitters; class LibraryEmitter ( RootBindingContext context, - TabbedStringBuilder builder) : ICodeEmitter { + TabbedStringBuilder builder) { public string SymbolNamespace => "ObjCRuntime"; public string SymbolName => "Libraries"; INamedTypeSymbol? LibrarySymbol { get; } = context.Compilation.GetTypeByMetadataName ("ObjCRuntime.Libraries"); - bool IsSymbolPresent (string className) - => LibrarySymbol is not null && + /// + /// Verify if the symbol is already defined by the runtime + /// + /// + /// + bool IsSymbolPresent (string name) + { + var className = name.Replace (".", string.Empty); + return LibrarySymbol is not null && LibrarySymbol.GetMembers ().OfType () .Any (v => v.Name == className); + } public IEnumerable UsingStatements { get; } = []; - public bool TryEmit ([NotNullWhen (false)] out ImmutableArray? diagnostics) + public bool TryEmit (ImmutableArray<(string LibraryName, string? LibraryPath)> libraries, + [NotNullWhen (false)] out ImmutableArray? diagnostics) { diagnostics = null; + // we do not want to generate the library partial class if we already contain all the symbols, + // this happens because we are using rgen while bgen is still a thing. Filter those libraries out + var filteredLibs = libraries.Where (info => !IsSymbolPresent (info.LibraryName)).ToArray (); + if (filteredLibs.Length == 0) { + return true; + } builder.AppendLine ("using Foundation;"); builder.AppendLine ("using ObjCBindings;"); @@ -40,13 +57,9 @@ public bool TryEmit ([NotNullWhen (false)] out ImmutableArray? diagn builder.AppendGeneratedCodeAttribute (); using (var classBlock = builder.CreateBlock ($"static partial class {SymbolName}", true)) { - foreach (var (name, path) in context.Libraries.OrderBy (v => v.Key, + foreach (var (name, path) in filteredLibs.OrderBy (v => v.LibraryName, StringComparer.Ordinal)) { - // verify if the symbol is already defined by the runtime var className = name.Replace (".", string.Empty); - if (IsSymbolPresent (className)) - continue; - using (var nestedClass = classBlock.CreateBlock ($"static public class {className}", true)) { if (name == "__Internal") { diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/TrampolineEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/TrampolineEmitter.cs index 263d3454a805..d6c056a733fb 100644 --- a/src/rgen/Microsoft.Macios.Generator/Emitters/TrampolineEmitter.cs +++ b/src/rgen/Microsoft.Macios.Generator/Emitters/TrampolineEmitter.cs @@ -1,15 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Context; +using Microsoft.Macios.Generator.DataModel; namespace Microsoft.Macios.Generator.Emitters; -public class TrampolineEmitter : ICodeEmitter { +class TrampolineEmitter : ICodeEmitter { public string SymbolNamespace => string.Empty; - public string SymbolName { get; } = string.Empty; + public string GetSymbolName (in CodeChanges codeChanges) => string.Empty; public IEnumerable UsingStatements { get; } = []; - public bool TryEmit ([NotNullWhen (false)] out ImmutableArray? diagnostics) + public bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out ImmutableArray? diagnostics) { diagnostics = null; return true; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/AccessorDeclarationSyntaxExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/AccessorDeclarationSyntaxExtensions.cs index c192f4132887..d7b404432387 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/AccessorDeclarationSyntaxExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/AccessorDeclarationSyntaxExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/BaseTypeDeclarationSyntaxExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/BaseTypeDeclarationSyntaxExtensions.cs index bb4c14558c61..55a1347339cc 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/BaseTypeDeclarationSyntaxExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/BaseTypeDeclarationSyntaxExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Linq; using System.Text; using Microsoft.CodeAnalysis.CSharp.Syntax; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/CompilationExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/CompilationExtensions.cs index 12718874a21f..aa8e8c738efc 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/CompilationExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/CompilationExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis; namespace Microsoft.Macios.Generator.Extensions; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/FieldSymbolExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/FieldSymbolExtensions.cs new file mode 100644 index 000000000000..f03daa88f780 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/FieldSymbolExtensions.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using Microsoft.CodeAnalysis; +using Microsoft.Macios.Generator.Attributes; +using ObjCBindings; + +namespace Microsoft.Macios.Generator.Extensions; + +static class FieldSymbolExtensions { + public static FieldData? GetFieldData (this IFieldSymbol fieldSymbol) + { + var attributes = fieldSymbol.GetAttributeData (); + if (attributes.Count == 0) + return null; + + // Get all the FieldAttribute, parse it and add the data to the result + if (!attributes.TryGetValue (AttributesNames.EnumFieldAttribute, out var fieldAttrDataList) || + fieldAttrDataList.Count != 1) + return null; + + var fieldAttrData = fieldAttrDataList [0]; + var fieldSyntax = fieldAttrData.ApplicationSyntaxReference?.GetSyntax (); + if (fieldSyntax is null) + return null; + + if (FieldData.TryParse (fieldAttrData, out var fieldData)) + return fieldData.Value; + + return null; + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/MemberDeclarationSyntaxExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/MemberDeclarationSyntaxExtensions.cs index 1e625d7170d7..7083be791cbe 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/MemberDeclarationSyntaxExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/MemberDeclarationSyntaxExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Collections.Immutable; using Microsoft.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/NamedTypeSymbolExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/NamedTypeSymbolExtensions.cs index 320eefaabc94..edc13f3384b2 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/NamedTypeSymbolExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/NamedTypeSymbolExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Linq; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/ParameterSyntaxExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/ParameterSyntaxExtensions.cs index e6e17a3459a2..bf581adb5522 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/ParameterSyntaxExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/ParameterSyntaxExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/SemanticModelExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/SemanticModelExtensions.cs new file mode 100644 index 000000000000..c90a5a1123be --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/SemanticModelExtensions.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections.Immutable; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Availability; +using Microsoft.Macios.Generator.DataModel; + +namespace Microsoft.Macios.Generator.Extensions; + +static class SemanticModelExtensions { + + public static void GetSymbolData (ISymbol? symbol, + out string name, + out string? baseClass, + out ImmutableArray interfaces, + out ImmutableArray namespaces, + out SymbolAvailability symbolAvailability) + { + name = symbol?.Name ?? string.Empty; + baseClass = null; + var interfacesBucket = ImmutableArray.CreateBuilder (); + var bucket = ImmutableArray.CreateBuilder (); + var ns = symbol?.ContainingNamespace; + while (ns is not null) { + if (!string.IsNullOrWhiteSpace (ns.Name)) + // prepend the namespace so that we can read from top to bottom + bucket.Insert (0, ns.Name); + ns = ns.ContainingNamespace; + } + + if (symbol is INamedTypeSymbol namedTypeSymbol) { + baseClass = namedTypeSymbol.BaseType?.ToDisplayString ().Trim (); + foreach (var symbolInterface in namedTypeSymbol.Interfaces) { + interfacesBucket.Add (symbolInterface.ToDisplayString ().Trim ()); + } + } + symbolAvailability = symbol?.GetSupportedPlatforms () ?? new SymbolAvailability (); + interfaces = interfacesBucket.ToImmutable (); + namespaces = bucket.ToImmutableArray (); + } + + public static void GetSymbolData (this SemanticModel self, BaseTypeDeclarationSyntax declaration, + BindingType bindingType, + out string name, + out string? baseClass, + out ImmutableArray interfaces, + out ImmutableArray namespaces, + out SymbolAvailability symbolAvailability, + out BindingInfo bindingInfo) + { + var symbol = self.GetDeclaredSymbol (declaration); + GetSymbolData (symbol, out name, out baseClass, out interfaces, out namespaces, out symbolAvailability); + if (symbol is null) + bindingInfo = default; + else { + bindingInfo = bindingType switch { + BindingType.Category => new BindingInfo (symbol.GetBindingData ()), + BindingType.Class => new BindingInfo (symbol.GetBindingData ()), + BindingType.Protocol => new BindingInfo (symbol.GetBindingData ()), + BindingType.SmartEnum => new BindingInfo (BindingType.SmartEnum, symbol.GetBindingData ()), + _ => default, + }; + } + } + +} diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/SourceProductionContextExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/SourceProductionContextExtensions.cs index 17483c67f2d8..811051d07cc6 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/SourceProductionContextExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/SourceProductionContextExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/StringExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/StringExtensions.cs index fa316c5b9556..c87f10b2a1b7 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/StringExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/StringExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/SyntaxTreeExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/SyntaxTreeExtensions.cs new file mode 100644 index 000000000000..a647db0497e3 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/SyntaxTreeExtensions.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Microsoft.Macios.Generator.Extensions; + +static class SyntaxTreeExtensions { + + public static IReadOnlySet CollectUsingStatements (this SyntaxTree self) + { + // collect all using from the syntax tree, add them to a hash to make sure that we don't have duplicates + // and add those usings that we do know we need for bindings. + var usingDirectives = self.GetRoot () + .DescendantNodes () + .OfType () + .Select (d => d.Name!.ToString ()).ToArray (); + + // remove any possible duplicates by using a set + return new HashSet (usingDirectives); + } + +} diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.cs index 5363e9b6144c..209966924556 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.cs @@ -1,5 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Runtime.InteropServices; using Microsoft.CodeAnalysis; using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.Availability; @@ -123,4 +129,235 @@ public static SymbolAvailability GetSupportedPlatforms (this ISymbol symbol) } return availability; } + + public static bool HasAttribute (this ISymbol symbol, string attribute) + { + var boundAttributes = symbol.GetAttributes (); + if (boundAttributes.Length == 0) { + return false; + } + foreach (var attributeData in boundAttributes) { + var attrName = attributeData.AttributeClass?.ToDisplayString (); + if (attrName == attribute) { + return true; + } + } + return false; + } + + public static bool IsSmartEnum (this ITypeSymbol symbol) + { + // a type is a smart enum if its type is a enum one AND it was decorated with the + // binding type attribute + return symbol.TypeKind == TypeKind.Enum + && symbol.HasAttribute (AttributesNames.BindingAttribute); + } + + public static BindingTypeData GetBindingData (this ISymbol symbol) + { + var boundAttributes = symbol.GetAttributes (); + if (boundAttributes.Length == 0) { + // no attrs in the symbol, therefore the symbol is supported in all platforms + return default; + } + // we are looking for the basic BindingAttribute attr + foreach (var attributeData in boundAttributes) { + var attrName = attributeData.AttributeClass?.ToDisplayString (); + if (string.IsNullOrEmpty (attrName) || attrName != AttributesNames.BindingAttribute) + continue; + if (BindingTypeData.TryParse (attributeData, out var bindingData)) { + return bindingData.Value; + } + } + + return default; + } + + public static BindingTypeData GetBindingData (this ISymbol symbol) where T : Enum + { + var boundAttributes = symbol.GetAttributes (); + if (boundAttributes.Length == 0) { + // no attrs in the symbol, therefore the symbol is supported in all platforms + return default; + } + + var targetAttrName = AttributesNames.GetBindingTypeAttributeName (); + foreach (var attributeData in boundAttributes) { + var attrName = attributeData.AttributeClass?.ToDisplayString (); + if (string.IsNullOrEmpty (attrName) || attrName != targetAttrName) + continue; + if (BindingTypeData.TryParse (attributeData, out var bindingData)) { + return bindingData.Value; + } + } + + return default; + } + + delegate string? GetAttributeNames (); + delegate bool TryParse (AttributeData data, [NotNullWhen (true)] out T? value) where T : struct; + + static T? GetAttribute (this ISymbol symbol, GetAttributeNames getAttributeNames, TryParse tryParse) where T : struct + { + var attributes = symbol.GetAttributeData (); + if (attributes.Count == 0) + return null; + + // retrieve the name of the attribute based on the flag + var attrName = getAttributeNames (); + if (attrName is null) + return null; + if (!attributes.TryGetValue (attrName, out var exportAttrDataList) || + exportAttrDataList.Count != 1) + return null; + + var exportAttrData = exportAttrDataList [0]; + var fieldSyntax = exportAttrData.ApplicationSyntaxReference?.GetSyntax (); + if (fieldSyntax is null) + return null; + + if (tryParse (exportAttrData, out var exportData)) + return exportData.Value; + return null; + } + + /// + /// Retrieve the data of an export attribute on a symbol. + /// + /// The tagged symbol. + /// Enum type used in the attribute. + /// The data of the export attribute if present or null if it was not found. + /// If the passed enum is unknown or not supported as an enum for the export attribute, null will be + /// returned. + public static ExportData? GetExportData (this ISymbol symbol) where T : Enum + => GetAttribute> (symbol, AttributesNames.GetExportAttributeName, ExportData.TryParse); + + /// + /// Retrieve the data of a field attribute on a symbol. + /// + /// The tagged symbol. + /// Enum type used in the attribute. + /// The data of the export attribute if present or null if it was not found. + /// If the passed enum is unknown or not supported as an enum for the field attribute, null will be + /// returned. + public static FieldData? GetFieldData (this ISymbol symbol) where T : Enum + => GetAttribute> (symbol, AttributesNames.GetFieldAttributeName, FieldData.TryParse); + + /// + /// Returns if a type is blittable or not. + /// + /// + /// + /// + public static bool IsBlittable (this ITypeSymbol symbol) + { + if (symbol.NullableAnnotation == NullableAnnotation.Annotated) + return false; + + while (true) { + // per the documentation, the following system types are blittable + switch (symbol.SpecialType) { + case SpecialType.System_Byte: + case SpecialType.System_SByte: + case SpecialType.System_Int16: + case SpecialType.System_UInt16: + case SpecialType.System_Int32: + case SpecialType.System_UInt32: + case SpecialType.System_Int64: + case SpecialType.System_UInt64: + case SpecialType.System_Single: + case SpecialType.System_Double: + case SpecialType.System_IntPtr: + case SpecialType.System_UIntPtr: + return true; + case SpecialType.System_Array: + // if we are dealing with an array, an array of blittable elements is blittable + symbol = symbol.ContainingType; + continue; + } + + if (symbol is IArrayTypeSymbol arrayTypeSymbol) { + symbol = arrayTypeSymbol.ElementType; + continue; + } + + if (symbol.TypeKind == TypeKind.Enum && symbol is INamedTypeSymbol enumSymbol) { + // an enum is blittable based on its backing field + symbol = enumSymbol.EnumUnderlyingType!; + continue; + } + + // if we are dealing with a structure, we have to check the layout type and all its children + if (symbol.TypeKind == TypeKind.Struct) { + // Check for StructLayout attribute with LayoutKind.Sequential + var layoutAttribute = symbol.GetAttributes () + .FirstOrDefault (attr => attr.AttributeClass?.ToString () == typeof (StructLayoutAttribute).FullName); + + if (layoutAttribute is not null) { + var layoutKind = (LayoutKind) layoutAttribute.ConstructorArguments [0].Value!; + if (layoutKind == LayoutKind.Auto) { + return false; + } + } else { + return false; + } + + // Recursively check all fields of the struct + var instanceFields = symbol.GetMembers () + .OfType () + .Where (field => !field.IsStatic); + foreach (var member in instanceFields) { + if (!member.Type.IsBlittable ()) { + return false; + } + } + + return true; + } + + // any other types are not blittable + return false; + } + } + + /// + /// Returns the parents and all the implemented interfaces (including those of the parents). + /// + /// The symbol whose inheritance we want to retrieve. + /// If the type implements the INativeObject interface. + /// An immutable array of the parents in order from closest to furthest. + /// All implemented interfaces by the type and its parents. + /// If the type inherits from NSObject. + public static void GetInheritance ( + this ITypeSymbol symbol, out bool isNSObject, out bool isNativeObject, out ImmutableArray parents, out ImmutableArray interfaces) + { + const string nativeObjectInterface = "ObjCRuntime.INativeObject"; + const string nsObjectClass = "Foundation.NSObject"; + + isNSObject = false; + isNativeObject = false; + + // parents will be returned directly in a Immutable array via a builder since the order is important + // interfaces will use a hash set because we do not want duplicates. + var parentsBuilder = ImmutableArray.CreateBuilder (); + // init the set with all the interfaces of the current symbol + var interfacesSet = new HashSet (symbol.Interfaces.Select (i => i.ToDisplayString ())); + + var currentType = symbol.BaseType; + while (currentType is not null) { + // check if we reach the NSObject as a parent + var parentName = currentType.ToDisplayString ().Trim (); + isNSObject |= parentName == nsObjectClass; + parentsBuilder.Add (parentName); + + // union with the current interfaces + interfacesSet.UnionWith (currentType.Interfaces.Select (i => i.ToDisplayString ())); + + currentType = currentType.BaseType; + } + + isNativeObject = interfacesSet.Contains (nativeObjectInterface); + parents = parentsBuilder.ToImmutable (); + interfaces = [.. interfacesSet]; + } } diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/TypedConstantExtensions.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/TypedConstantExtensions.cs index 09070c24857c..9f8e40b66b29 100644 --- a/src/rgen/Microsoft.Macios.Generator/Extensions/TypedConstantExtensions.cs +++ b/src/rgen/Microsoft.Macios.Generator/Extensions/TypedConstantExtensions.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; diff --git a/src/rgen/Microsoft.Macios.Generator/ExtraSources.cs b/src/rgen/Microsoft.Macios.Generator/ExtraSources.cs index 916949db8768..7a238528cb41 100644 --- a/src/rgen/Microsoft.Macios.Generator/ExtraSources.cs +++ b/src/rgen/Microsoft.Macios.Generator/ExtraSources.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. namespace Microsoft.Macios.Generator; public static class ExtraSources { diff --git a/src/rgen/Microsoft.Macios.Generator/Formatters/ConstructorFormatter.cs b/src/rgen/Microsoft.Macios.Generator/Formatters/ConstructorFormatter.cs new file mode 100644 index 000000000000..82ce6e9d2544 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Formatters/ConstructorFormatter.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Microsoft.Macios.Generator.Formatters; + +static class ConstructorFormatter { + + public static CompilationUnitSyntax? ToDeclaration (this in Constructor? constructor) + { + if (constructor is null) + return null; + + var compilationUnit = CompilationUnit ().WithMembers ( + SingletonList ( + ConstructorDeclaration (Identifier (constructor.Value.Type) + .WithTrailingTrivia (Space) // add spaces manually to use the mono style + ) + .WithModifiers (TokenList (constructor.Value.Modifiers)) + .WithParameterList (constructor.Value.Parameters.GetParameterList ()) + )); + return compilationUnit; + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Formatters/MethodFormatter.cs b/src/rgen/Microsoft.Macios.Generator/Formatters/MethodFormatter.cs new file mode 100644 index 000000000000..ff7f416cebef --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Formatters/MethodFormatter.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Microsoft.Macios.Generator.Formatters; + +static class MethodFormatter { + + public static CompilationUnitSyntax? ToDeclaration (this in Method? method) + { + if (method is null) + return null; + var compilationUnit = CompilationUnit () + .WithMembers ( + SingletonList ( + MethodDeclaration ( + returnType: method.Value.ReturnType.GetIdentifierSyntax (), + identifier: Identifier (method.Value.Name) + .WithLeadingTrivia (Space) + .WithTrailingTrivia (Space)) // adding the spaces manually to follow the mono style + .WithModifiers (TokenList (method.Value.Modifiers)) + .WithParameterList (method.Value.Parameters.GetParameterList ()))); + return compilationUnit; + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Formatters/ParameterFormatter.cs b/src/rgen/Microsoft.Macios.Generator/Formatters/ParameterFormatter.cs new file mode 100644 index 000000000000..e2805069b386 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Formatters/ParameterFormatter.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections.Immutable; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; +using ParameterDataModel = Microsoft.Macios.Generator.DataModel.Parameter; + +namespace Microsoft.Macios.Generator.Formatters; + +static class ParameterFormatter { + + public static ParameterListSyntax GetParameterList (this in ImmutableArray parameters) + { + if (parameters.Length == 0) + return ParameterList ([]); + + // the size of the array is simple to calculate, we need space for all parameters + // and for a comma for each parameter except for the last one + // length = parameters.Length + parameters.Length - 1 + // length = (2 * parameters.Length) - 1 + var nodes = new SyntaxNodeOrToken [(2 * parameters.Length) - 1]; + var nodesIndex = 0; + var parametersIndex = 0; + while (nodesIndex < nodes.Length) { + var currentParameter = parameters [parametersIndex++]; + var parameterDeclaration = currentParameter.ToDeclaration (); + nodes [nodesIndex++] = parameterDeclaration; + if (currentParameter.Position < parameters.Length - 1) { + nodes [nodesIndex++] = Token (SyntaxKind.CommaToken); + } + } + + return ParameterList (SeparatedList (nodes)).NormalizeWhitespace (); + } + static TypeSyntax GetIdentifierSyntax (this in ParameterDataModel parameter) + { + if (parameter.IsArray) { + // could be a params array or simply an array + var arrayType = ArrayType (IdentifierName (parameter.Type)) + .WithRankSpecifiers (SingletonList ( + ArrayRankSpecifier ( + SingletonSeparatedList (OmittedArraySizeExpression ())))); + return parameter.IsNullable + ? NullableType (arrayType) + : arrayType; + } + + // dealing with a non-array type + return parameter.IsNullable + ? NullableType (IdentifierName (parameter.Type)) + : IdentifierName (parameter.Type); + } + + public static ParameterSyntax ToDeclaration (this in ParameterDataModel parameter) + { + // modifiers come from two situations, we have the params keyword or not. We cannot have params + a ref modifier + // so we build them based on that. If you call WithModifiers twice, you will me stepping on the previous collection + // it won't be a merge + var modifiers = parameter.IsParams + ? TokenList (Token (SyntaxKind.ParamsKeyword)) + : parameter.ReferenceKind.ToTokens (); + + // we are going to be ignoring the default value, the reason for it is that the partial method implementation + // can ignore it. The following c# code is valid: + // + // TestPartial1.cs: + // + // public partial class TestPartial + // { + // + // public partial void TestMethod(MyStruct[]? values = null); + // public void ExampleCall() + // { + // TestMethod(); + // } + // } + // TestPartial2.cs: + // + // + // public partial class TestPartial + // { + // public partial void TestMethod(MyStruct[]? values) + // { + // + // } + // } + var syntax = Parameter (Identifier (parameter.Name)) + .WithModifiers (modifiers) + .WithType (parameter.GetIdentifierSyntax ()); + + return syntax.NormalizeWhitespace (); + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Formatters/PropertyFormatter.cs b/src/rgen/Microsoft.Macios.Generator/Formatters/PropertyFormatter.cs new file mode 100644 index 000000000000..51d573c83f7b --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Formatters/PropertyFormatter.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; + +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Microsoft.Macios.Generator.Formatters; + +static class PropertyFormatter { + /// + /// Return the declaration represented by the given property. + /// + /// The property whose declaration we want to generate. + /// A compilation unit syntax node with the declaration of the property. + public static CompilationUnitSyntax? ToDeclaration (this in Property? property) + { + if (property is null) + return null; + + var compilationUnit = CompilationUnit ().WithMembers ( + SingletonList ( + PropertyDeclaration ( + type: property.Value.ReturnType.GetIdentifierSyntax (), + identifier: Identifier (property.Value.Name)) + .WithModifiers (TokenList (property.Value.Modifiers)))).NormalizeWhitespace (); + return compilationUnit; + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/Formatters/SmartEnumFormatter.cs b/src/rgen/Microsoft.Macios.Generator/Formatters/SmartEnumFormatter.cs new file mode 100644 index 000000000000..43ea585f060f --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Formatters/SmartEnumFormatter.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Microsoft.Macios.Generator.Formatters; + +static class SmartEnumFormatter { + /// + /// Return the declaration of the extension class for a given smart enum using the provided class name. + /// + /// The smart enum code change. + /// The name to use for the extension class. + /// The class declaration for the extension class for a smart enum change. + public static CompilationUnitSyntax ToSmartEnumExtensionDeclaration (this in CodeChanges smartEnumChange, + string extensionClassName) + { + // add to a set to make sure we do no duplicate them and make sure static and partial are present + var modifiers = new HashSet (smartEnumChange.Modifiers) { + Token (SyntaxKind.StaticKeyword), Token (SyntaxKind.PartialKeyword), + }; + + var compilationUnit = CompilationUnit ().WithMembers ( + SingletonList ( + ClassDeclaration (extensionClassName) + .WithModifiers (TokenList (modifiers)) + .WithOpenBraceToken (MissingToken (SyntaxKind.OpenBraceToken)) // do not add open/close brace + .WithCloseBraceToken (MissingToken (SyntaxKind.CloseBraceToken)))) + .NormalizeWhitespace (); // no diff between dotnet and mono + return compilationUnit; + } + + /// + /// Return the declaration of the extension class for a given smart enum using the provided class name. + /// + /// The smart enum code change. + /// The name to use for the extension class. + /// The class declaration for the extension class for a smart enum change. + public static CompilationUnitSyntax? ToSmartEnumExtensionDeclaration (this in CodeChanges? smartEnumChange, + string extensionClassName) + => smartEnumChange is null ? null : ToSmartEnumExtensionDeclaration (smartEnumChange.Value, extensionClassName); +} diff --git a/src/rgen/Microsoft.Macios.Generator/Formatters/TypeInfoFormatter.cs b/src/rgen/Microsoft.Macios.Generator/Formatters/TypeInfoFormatter.cs new file mode 100644 index 000000000000..5406e34d00f1 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Generator/Formatters/TypeInfoFormatter.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; +using TypeInfo = Microsoft.Macios.Generator.DataModel.TypeInfo; + +namespace Microsoft.Macios.Generator.Formatters; + +static class TypeInfoFormatter { + + public static TypeSyntax GetIdentifierSyntax (this in TypeInfo typeInfo) + { + // If we are dealing with a IntPtr or UIntPtr, we want to use the metadata name, otherwise we will + // get a nint in the signature. The compiler won't care, this is just done for completeness and to + // reduce the surprise factor for a customer debugging the generated code. + var name = typeInfo.SpecialType is SpecialType.System_IntPtr or SpecialType.System_UIntPtr + ? typeInfo.MetadataName! // we know is not null + : typeInfo.Name; + + if (typeInfo.IsArray) { + // could be a params array or simply an array + var arrayType = ArrayType (IdentifierName (name)) + .WithRankSpecifiers (SingletonList ( + ArrayRankSpecifier ( + SingletonSeparatedList (OmittedArraySizeExpression ())))); + return typeInfo.IsNullable + ? NullableType (arrayType) + : arrayType; + } + + // dealing with a non-array type + return typeInfo.IsNullable + ? NullableType (IdentifierName (name)) + : IdentifierName (name); + } +} diff --git a/src/rgen/Microsoft.Macios.Generator/TabbedStringBuilder.cs b/src/rgen/Microsoft.Macios.Generator/TabbedStringBuilder.cs index 932b00387ff2..7d650808de07 100644 --- a/src/rgen/Microsoft.Macios.Generator/TabbedStringBuilder.cs +++ b/src/rgen/Microsoft.Macios.Generator/TabbedStringBuilder.cs @@ -1,4 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; +using System.ComponentModel; using System.Linq; using System.Net.Http; using System.Net.Mail; @@ -228,9 +231,16 @@ public TabbedStringBuilder AppendMemberAvailability (in SymbolAvailability allPl /// Append a EditorBrowsable attribute. Added for convenience. /// /// The current builder. - public TabbedStringBuilder AppendEditorBrowsableAttribute () + public TabbedStringBuilder AppendEditorBrowsableAttribute (EditorBrowsableState state) { - const string attr = "[EditorBrowsable (EditorBrowsableState.Never)]"; + string attr = $"[EditorBrowsable (EditorBrowsableState.{state})]"; + AppendLine (attr); + return this; + } + + public TabbedStringBuilder AppendDesignatedInitializer () + { + const string attr = "[DesignatedInitializer]"; AppendLine (attr); return this; } @@ -283,6 +293,14 @@ public override string ToString () return sb.ToString (); } + /// + /// Clear the content of the internal string builder. + /// + public void Clear () + { + sb.Clear (); + } + /// /// Does not really dispose anything, it just closes the current block. /// diff --git a/src/rgen/Microsoft.Macios.Transformer/Main.cs b/src/rgen/Microsoft.Macios.Transformer/Main.cs new file mode 100644 index 000000000000..fb08b1498f9d --- /dev/null +++ b/src/rgen/Microsoft.Macios.Transformer/Main.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.CommandLine; +using System.CommandLine.Builder; +using System.CommandLine.Parsing; +using Microsoft.Macios.Transformer; + + +//TODO: logging infra +// add cli header stuff +var parser = new CommandLineBuilder (new TransformCommand ()) + .UseDefaults () + .Build (); + +return await parser.InvokeAsync (args).ConfigureAwait (false); diff --git a/src/rgen/Microsoft.Macios.Transformer/Microsoft.Macios.Transformer.csproj b/src/rgen/Microsoft.Macios.Transformer/Microsoft.Macios.Transformer.csproj index 9bca55f05dac..cfb93fbb09a0 100644 --- a/src/rgen/Microsoft.Macios.Transformer/Microsoft.Macios.Transformer.csproj +++ b/src/rgen/Microsoft.Macios.Transformer/Microsoft.Macios.Transformer.csproj @@ -1,10 +1,22 @@  - - Exe - net$(BundledNETCoreAppTargetFrameworkVersion) - enable - enable - + + Exe + net$(BundledNETCoreAppTargetFrameworkVersion) + enable + enable + true + + + + + + + + + + + + diff --git a/src/rgen/Microsoft.Macios.Transformer/Program.cs b/src/rgen/Microsoft.Macios.Transformer/Program.cs deleted file mode 100644 index d34d03bd3d61..000000000000 --- a/src/rgen/Microsoft.Macios.Transformer/Program.cs +++ /dev/null @@ -1,2 +0,0 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine ("Hello, World!"); diff --git a/src/rgen/Microsoft.Macios.Transformer/TransformCommand.cs b/src/rgen/Microsoft.Macios.Transformer/TransformCommand.cs new file mode 100644 index 000000000000..20c51b813c94 --- /dev/null +++ b/src/rgen/Microsoft.Macios.Transformer/TransformCommand.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.CommandLine; + +namespace Microsoft.Macios.Transformer; + +public class TransformCommand : Command { + + public TransformCommand () : base ("rgen-transform", "command to convert outdated bindings to be rgen compatible") + { + var input = new Option (["--input", "-i"], "input directory to search for bgen bindings") { + //single file support? + IsRequired = true + }; + AddOption (input); + + var output = new Option (["--output", "-o"], "output directory to write rgen bindings") { + IsRequired = true + }; + AddOption (output); + + AddValidator (result => { + if (!Directory.Exists (result.GetValueForOption (input))) { + result.ErrorMessage = "Input directory does not exist"; + } + if (!Directory.Exists (result.GetValueForOption (output))) { + Directory.CreateDirectory (result.GetValueForOption (output)!); + } + }); + // this.AddOption (new Option (new string [] { "--verbose", "-v" }, "verbose output")); + + this.SetHandler (Execute); + } + + public async Task Execute () + { + // placeholder for loading/parsing/transforming/writing components + await Task.CompletedTask; + } +} diff --git a/src/rsp/ios-defines.rsp b/src/rsp/ios-defines.rsp deleted file mode 100644 index 14300db0cec6..000000000000 --- a/src/rsp/ios-defines.rsp +++ /dev/null @@ -1,145 +0,0 @@ --d:HAS_ACCELERATE --d:HAS_ACCESSIBILITY --d:HAS_ACCESSORYSETUPKIT --d:HAS_ACCOUNTS --d:HAS_ADDRESSBOOK --d:HAS_ADDRESSBOOKUI --d:HAS_ADSERVICES --d:HAS_ADSUPPORT --d:HAS_APPCLIP --d:HAS_APPTRACKINGTRANSPARENCY --d:HAS_ARKIT --d:HAS_ASSETSLIBRARY --d:HAS_AUDIOTOOLBOX --d:HAS_AUDIOUNIT --d:HAS_AUTHENTICATIONSERVICES --d:HAS_AUTOMATICASSESSMENTCONFIGURATION --d:HAS_AVFOUNDATION --d:HAS_AVKIT --d:HAS_AVROUTING --d:HAS_BACKGROUNDASSETS --d:HAS_BACKGROUNDTASKS --d:HAS_BROWSERENGINEKIT --d:HAS_BUSINESSCHAT --d:HAS_CALLKIT --d:HAS_CARPLAY --d:HAS_CFNETWORK --d:HAS_CHIP --d:HAS_CINEMATIC --d:HAS_CLASSKIT --d:HAS_CLOUDKIT --d:HAS_COMPRESSION --d:HAS_CONTACTS --d:HAS_CONTACTSUI --d:HAS_COREANIMATION --d:HAS_COREAUDIOKIT --d:HAS_COREBLUETOOTH --d:HAS_COREDATA --d:HAS_COREFOUNDATION --d:HAS_COREGRAPHICS --d:HAS_COREHAPTICS --d:HAS_COREIMAGE --d:HAS_CORELOCATION --d:HAS_CORELOCATIONUI --d:HAS_COREMEDIA --d:HAS_COREMIDI --d:HAS_COREML --d:HAS_COREMOTION --d:HAS_CORENFC --d:HAS_CORESPOTLIGHT --d:HAS_CORETELEPHONY --d:HAS_CORETEXT --d:HAS_COREVIDEO --d:HAS_CRYPTOTOKENKIT --d:HAS_DEVICECHECK --d:HAS_DEVICEDISCOVERYEXTENSION --d:HAS_EVENTKIT --d:HAS_EVENTKITUI --d:HAS_EXTERNALACCESSORY --d:HAS_FILEPROVIDER --d:HAS_FILEPROVIDERUI --d:HAS_FOUNDATION --d:HAS_GAMECONTROLLER --d:HAS_GAMEKIT --d:HAS_GAMEPLAYKIT --d:HAS_GLKIT --d:HAS_HEALTHKIT --d:HAS_HEALTHKITUI --d:HAS_HOMEKIT --d:HAS_IAD --d:HAS_IDENTITYLOOKUP --d:HAS_IDENTITYLOOKUPUI --d:HAS_IMAGEIO --d:HAS_INTENTS --d:HAS_INTENTSUI --d:HAS_IOSURFACE --d:HAS_JAVASCRIPTCORE --d:HAS_LINKPRESENTATION --d:HAS_LOCALAUTHENTICATION --d:HAS_MAPKIT --d:HAS_MEDIAACCESSIBILITY --d:HAS_MEDIAPLAYER --d:HAS_MEDIASETUP --d:HAS_MEDIATOOLBOX --d:HAS_MESSAGES --d:HAS_MESSAGEUI --d:HAS_METAL --d:HAS_METALFX --d:HAS_METALKIT --d:HAS_METALPERFORMANCESHADERS --d:HAS_METALPERFORMANCESHADERSGRAPH --d:HAS_METRICKIT --d:HAS_MLCOMPUTE --d:HAS_MOBILECORESERVICES --d:HAS_MODELIO --d:HAS_MULTIPEERCONNECTIVITY --d:HAS_NATURALLANGUAGE --d:HAS_NEARBYINTERACTION --d:HAS_NETWORK --d:HAS_NETWORKEXTENSION --d:HAS_NEWSSTANDKIT --d:HAS_NOTIFICATIONCENTER --d:HAS_OPENGLES --d:HAS_OSLOG --d:HAS_PASSKIT --d:HAS_PDFKIT --d:HAS_PENCILKIT --d:HAS_PHASE --d:HAS_PHOTOS --d:HAS_PHOTOSUI --d:HAS_PUSHKIT --d:HAS_PUSHTOTALK --d:HAS_QUICKLOOK --d:HAS_QUICKLOOKTHUMBNAILING --d:HAS_REPLAYKIT --d:HAS_SAFARISERVICES --d:HAS_SAFETYKIT --d:HAS_SCENEKIT --d:HAS_SCREENTIME --d:HAS_SECURITY --d:HAS_SENSITIVECONTENTANALYSIS --d:HAS_SENSORKIT --d:HAS_SHAREDWITHYOU --d:HAS_SHAREDWITHYOUCORE --d:HAS_SHAZAMKIT --d:HAS_SOCIAL --d:HAS_SOUNDANALYSIS --d:HAS_SPEECH --d:HAS_SPRITEKIT --d:HAS_STOREKIT --d:HAS_SYMBOLS --d:HAS_SYSTEMCONFIGURATION --d:HAS_THREADNETWORK --d:HAS_TWITTER --d:HAS_UIKIT --d:HAS_UNIFORMTYPEIDENTIFIERS --d:HAS_USERNOTIFICATIONS --d:HAS_USERNOTIFICATIONSUI --d:HAS_VIDEOSUBSCRIBERACCOUNT --d:HAS_VIDEOTOOLBOX --d:HAS_VISION --d:HAS_VISIONKIT --d:HAS_WATCHCONNECTIVITY --d:HAS_WATCHKIT --d:HAS_WEBKIT --d:HAS_XKIT diff --git a/src/rsp/macos-defines.rsp b/src/rsp/macos-defines.rsp deleted file mode 100644 index 87cddefa3110..000000000000 --- a/src/rsp/macos-defines.rsp +++ /dev/null @@ -1,139 +0,0 @@ --d:HAS_ACCELERATE --d:HAS_ACCESSIBILITY --d:HAS_ACCOUNTS --d:HAS_ADSERVICES --d:HAS_ADSUPPORT --d:HAS_APPKIT --d:HAS_APPTRACKINGTRANSPARENCY --d:HAS_AUDIOTOOLBOX --d:HAS_AUDIOUNIT --d:HAS_AUTHENTICATIONSERVICES --d:HAS_AUTOMATICASSESSMENTCONFIGURATION --d:HAS_AVFOUNDATION --d:HAS_AVKIT --d:HAS_AVROUTING --d:HAS_BACKGROUNDASSETS --d:HAS_BROWSERENGINEKIT --d:HAS_BUSINESSCHAT --d:HAS_CALLKIT --d:HAS_CFNETWORK --d:HAS_CHIP --d:HAS_CINEMATIC --d:HAS_CLASSKIT --d:HAS_CLOUDKIT --d:HAS_COMPRESSION --d:HAS_CONTACTS --d:HAS_CONTACTSUI --d:HAS_COREANIMATION --d:HAS_COREAUDIOKIT --d:HAS_COREBLUETOOTH --d:HAS_COREDATA --d:HAS_COREFOUNDATION --d:HAS_COREGRAPHICS --d:HAS_COREIMAGE --d:HAS_CORELOCATION --d:HAS_COREMEDIA --d:HAS_COREMIDI --d:HAS_COREML --d:HAS_COREMOTION --d:HAS_CORESERVICES --d:HAS_CORESPOTLIGHT --d:HAS_CORETEXT --d:HAS_COREVIDEO --d:HAS_COREWLAN --d:HAS_CRYPTOTOKENKIT --d:HAS_DARWIN --d:HAS_DEVICECHECK --d:HAS_DEVICEDISCOVERYEXTENSION --d:HAS_EVENTKIT --d:HAS_EXECUTIONPOLICY --d:HAS_EXTENSIONKIT --d:HAS_EXTERNALACCESSORY --d:HAS_FILEPROVIDER --d:HAS_FILEPROVIDERUI --d:HAS_FINDERSYNC --d:HAS_FOUNDATION --d:HAS_FSKIT --d:HAS_GAMECONTROLLER --d:HAS_GAMEKIT --d:HAS_GAMEPLAYKIT --d:HAS_GLKIT --d:HAS_HEALTHKIT --d:HAS_IMAGECAPTURECORE --d:HAS_IMAGEIO --d:HAS_IMAGEKIT --d:HAS_INTENTS --d:HAS_INTENTSUI --d:HAS_IOSURFACE --d:HAS_ITUNESLIBRARY --d:HAS_JAVASCRIPTCORE --d:HAS_LINKPRESENTATION --d:HAS_LOCALAUTHENTICATION --d:HAS_LOCALAUTHENTICATIONEMBEDDEDUI --d:HAS_MAILKIT --d:HAS_MAPKIT --d:HAS_MEDIAACCESSIBILITY --d:HAS_MEDIAEXTENSION --d:HAS_MEDIALIBRARY --d:HAS_MEDIAPLAYER --d:HAS_MEDIATOOLBOX --d:HAS_METAL --d:HAS_METALFX --d:HAS_METALKIT --d:HAS_METALPERFORMANCESHADERS --d:HAS_METALPERFORMANCESHADERSGRAPH --d:HAS_METRICKIT --d:HAS_MLCOMPUTE --d:HAS_MOBILECORESERVICES --d:HAS_MODELIO --d:HAS_MULTIPEERCONNECTIVITY --d:HAS_NATURALLANGUAGE --d:HAS_NEARBYINTERACTION --d:HAS_NETWORK --d:HAS_NETWORKEXTENSION --d:HAS_NOTIFICATIONCENTER --d:HAS_OPENGL --d:HAS_OSLOG --d:HAS_PASSKIT --d:HAS_PDFKIT --d:HAS_PENCILKIT --d:HAS_PHASE --d:HAS_PHOTOS --d:HAS_PHOTOSUI --d:HAS_PRINTCORE --d:HAS_PUSHKIT --d:HAS_QTKIT --d:HAS_QUARTZCOMPOSER --d:HAS_QUICKLOOK --d:HAS_QUICKLOOKTHUMBNAILING --d:HAS_QUICKLOOKUI --d:HAS_REPLAYKIT --d:HAS_SAFARISERVICES --d:HAS_SAFETYKIT --d:HAS_SCENEKIT --d:HAS_SCREENCAPTUREKIT --d:HAS_SCREENTIME --d:HAS_SCRIPTINGBRIDGE --d:HAS_SEARCHKIT --d:HAS_SECURITY --d:HAS_SENSITIVECONTENTANALYSIS --d:HAS_SERVICEMANAGEMENT --d:HAS_SHAREDWITHYOU --d:HAS_SHAREDWITHYOUCORE --d:HAS_SHAZAMKIT --d:HAS_SOCIAL --d:HAS_SOUNDANALYSIS --d:HAS_SPEECH --d:HAS_SPRITEKIT --d:HAS_STOREKIT --d:HAS_SYMBOLS --d:HAS_SYSTEMCONFIGURATION --d:HAS_THREADNETWORK --d:HAS_UNIFORMTYPEIDENTIFIERS --d:HAS_USERNOTIFICATIONS --d:HAS_USERNOTIFICATIONSUI --d:HAS_VIDEOSUBSCRIBERACCOUNT --d:HAS_VIDEOTOOLBOX --d:HAS_VISION --d:HAS_WEBKIT --d:HAS_XKIT diff --git a/src/rsp/tvos-defines.rsp b/src/rsp/tvos-defines.rsp deleted file mode 100644 index b89c94bcbfe8..000000000000 --- a/src/rsp/tvos-defines.rsp +++ /dev/null @@ -1,86 +0,0 @@ --d:HAS_ACCELERATE --d:HAS_ACCESSIBILITY --d:HAS_ADSUPPORT --d:HAS_APPTRACKINGTRANSPARENCY --d:HAS_AUDIOTOOLBOX --d:HAS_AUDIOUNIT --d:HAS_AUTHENTICATIONSERVICES --d:HAS_AVFOUNDATION --d:HAS_AVKIT --d:HAS_BACKGROUNDTASKS --d:HAS_BROWSERENGINEKIT --d:HAS_CFNETWORK --d:HAS_CHIP --d:HAS_CINEMATIC --d:HAS_CLOUDKIT --d:HAS_COMPRESSION --d:HAS_COREANIMATION --d:HAS_COREBLUETOOTH --d:HAS_COREDATA --d:HAS_COREFOUNDATION --d:HAS_COREGRAPHICS --d:HAS_COREHAPTICS --d:HAS_COREIMAGE --d:HAS_CORELOCATION --d:HAS_COREMEDIA --d:HAS_COREMIDI --d:HAS_COREML --d:HAS_CORESPOTLIGHT --d:HAS_CORETEXT --d:HAS_COREVIDEO --d:HAS_CRYPTOTOKENKIT --d:HAS_DEVICECHECK --d:HAS_DEVICEDISCOVERYUI --d:HAS_EXTERNALACCESSORY --d:HAS_FOUNDATION --d:HAS_GAMECONTROLLER --d:HAS_GAMEKIT --d:HAS_GAMEPLAYKIT --d:HAS_GLKIT --d:HAS_HOMEKIT --d:HAS_IMAGEIO --d:HAS_INTENTS --d:HAS_IOSURFACE --d:HAS_JAVASCRIPTCORE --d:HAS_LINKPRESENTATION --d:HAS_MAPKIT --d:HAS_MEDIAACCESSIBILITY --d:HAS_MEDIAPLAYER --d:HAS_MEDIATOOLBOX --d:HAS_METAL --d:HAS_METALKIT --d:HAS_METALPERFORMANCESHADERS --d:HAS_METALPERFORMANCESHADERSGRAPH --d:HAS_MLCOMPUTE --d:HAS_MOBILECORESERVICES --d:HAS_MODELIO --d:HAS_MULTIPEERCONNECTIVITY --d:HAS_NATURALLANGUAGE --d:HAS_NETWORK --d:HAS_NETWORKEXTENSION --d:HAS_OPENGLES --d:HAS_OSLOG --d:HAS_PHASE --d:HAS_PHOTOS --d:HAS_PHOTOSUI --d:HAS_REPLAYKIT --d:HAS_SCENEKIT --d:HAS_SECURITY --d:HAS_SHAREDWITHYOU --d:HAS_SHAREDWITHYOUCORE --d:HAS_SHAZAMKIT --d:HAS_SOUNDANALYSIS --d:HAS_SPRITEKIT --d:HAS_STOREKIT --d:HAS_SYMBOLS --d:HAS_SYSTEMCONFIGURATION --d:HAS_TVMLKIT --d:HAS_TVSERVICES --d:HAS_TVUIKIT --d:HAS_UIKIT --d:HAS_UNIFORMTYPEIDENTIFIERS --d:HAS_USERNOTIFICATIONS --d:HAS_VIDEOSUBSCRIBERACCOUNT --d:HAS_VIDEOTOOLBOX --d:HAS_VISION --d:HAS_XKIT diff --git a/src/rsp/watchos-defines.rsp b/src/rsp/watchos-defines.rsp deleted file mode 100644 index f3ad9aecfadd..000000000000 --- a/src/rsp/watchos-defines.rsp +++ /dev/null @@ -1,54 +0,0 @@ --d:HAS_ACCELERATE --d:HAS_ACCESSIBILITY --d:HAS_AUTHENTICATIONSERVICES --d:HAS_AVFOUNDATION --d:HAS_CALLKIT --d:HAS_CHIP --d:HAS_CLOCKKIT --d:HAS_CLOUDKIT --d:HAS_COMPRESSION --d:HAS_CONTACTS --d:HAS_COREBLUETOOTH --d:HAS_COREDATA --d:HAS_COREFOUNDATION --d:HAS_COREGRAPHICS --d:HAS_CORELOCATION --d:HAS_COREMEDIA --d:HAS_COREMIDI --d:HAS_COREML --d:HAS_COREMOTION --d:HAS_CORETEXT --d:HAS_COREVIDEO --d:HAS_CRYPTOTOKENKIT --d:HAS_DEVICECHECK --d:HAS_EVENTKIT --d:HAS_FOUNDATION --d:HAS_GAMEKIT --d:HAS_HEALTHKIT --d:HAS_HOMEKIT --d:HAS_IMAGEIO --d:HAS_INTENTS --d:HAS_LOCALAUTHENTICATION --d:HAS_MAPKIT --d:HAS_MEDIAPLAYER --d:HAS_MOBILECORESERVICES --d:HAS_NATURALLANGUAGE --d:HAS_NEARBYINTERACTION --d:HAS_NETWORK --d:HAS_OSLOG --d:HAS_PASSKIT --d:HAS_PUSHKIT --d:HAS_SAFETYKIT --d:HAS_SCENEKIT --d:HAS_SECURITY --d:HAS_SHAZAMKIT --d:HAS_SOUNDANALYSIS --d:HAS_SPRITEKIT --d:HAS_STOREKIT --d:HAS_SYMBOLS --d:HAS_UIKIT --d:HAS_UNIFORMTYPEIDENTIFIERS --d:HAS_USERNOTIFICATIONS --d:HAS_WATCHCONNECTIVITY --d:HAS_WATCHKIT --d:HAS_XKIT diff --git a/src/safariservices.cs b/src/safariservices.cs index 9bf4bd388d4e..2fde8db3f590 100644 --- a/src/safariservices.cs +++ b/src/safariservices.cs @@ -212,12 +212,12 @@ interface SFSafariViewControllerConfiguration : NSCopying { bool BarCollapsingEnabled { get; set; } [NullAllowed] - [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV, NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV] [Export ("activityButton", ArgumentSemantic.Copy)] SFSafariViewControllerActivityButton ActivityButton { get; set; } [NullAllowed] - [NoWatch, NoTV, iOS (15, 2), MacCatalyst (15, 2), NoMac] + [NoTV, iOS (15, 2), MacCatalyst (15, 2), NoMac] [Export ("eventAttribution", ArgumentSemantic.Copy)] UIEventAttribution EventAttribution { get; set; } } @@ -250,7 +250,6 @@ interface SFAuthenticationSession { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -292,7 +291,6 @@ interface SFSafariApplication { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -318,7 +316,6 @@ interface SFSafariPage : NSSecureCoding, NSCopying { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Protocol] interface SFSafariExtensionHandling { @@ -363,7 +360,6 @@ interface SFSafariExtensionHandling { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -377,7 +373,6 @@ interface SFSafariExtension { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface SFSafariPageProperties { @@ -398,7 +393,6 @@ interface SFSafariPageProperties { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -428,7 +422,6 @@ interface SFSafariTab : NSSecureCoding, NSCopying { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -455,7 +448,6 @@ interface SFSafariToolbarItem : NSSecureCoding, NSCopying { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -482,7 +474,6 @@ interface SFSafariWindow : NSSecureCoding, NSCopying { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSViewController))] interface SFSafariExtensionViewController { @@ -495,7 +486,6 @@ interface SFSafariExtensionViewController { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface SFSafariExtensionHandler : NSExtensionRequestHandling, SFSafariExtensionHandling { @@ -521,7 +511,6 @@ interface SFSafariExtensionHandler : NSExtensionRequestHandling, SFSafariExtensi [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -541,7 +530,7 @@ interface SFUniversalLink { } [Static] - [iOS (15, 0), MacCatalyst (15, 0), NoTV, NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), NoTV] [DisableDefaultCtor] interface SFExtension { [Field ("SFExtensionMessageKey")] @@ -552,7 +541,7 @@ interface SFExtension { NSString ProfileKey { get; } } - [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV, NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SFSafariViewControllerActivityButton : NSCopying, NSSecureCoding { @@ -567,7 +556,7 @@ interface SFSafariViewControllerActivityButton : NSCopying, NSSecureCoding { string ExtensionIdentifier { get; } } - [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV, NoWatch] + [iOS (15, 0), MacCatalyst (15, 0), NoMac, NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SFSafariViewControllerPrewarmingToken /* Privately conforms to NSCoding and NSSecureCoding */ @@ -576,7 +565,7 @@ interface SFSafariViewControllerPrewarmingToken /* Privately conforms to NSCodin void Invalidate (); } - [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoTV, NoWatch] + [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SFSafariViewControllerDataStore { @@ -592,7 +581,7 @@ interface SFSafariViewControllerDataStore { delegate void SFAddToHomeScreenActivityItemGetWebAppManifestCallback ([NullAllowed] BEWebAppManifest appManifest); delegate void SFAddToHomeScreenActivityItemGetHomeScreenWebAppInfoCallback ([NullAllowed] SFAddToHomeScreenInfo appManifest); - [iOS (17, 4), MacCatalyst (17, 4), NoMac, NoTV, NoWatch] + [iOS (17, 4), MacCatalyst (17, 4), NoMac, NoTV] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface SFAddToHomeScreenActivityItem { diff --git a/src/safetykit.cs b/src/safetykit.cs index 68e4bc055b2a..aff07c06d6c6 100644 --- a/src/safetykit.cs +++ b/src/safetykit.cs @@ -19,7 +19,7 @@ namespace SafetyKit { - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SACrashDetectionEvent : NSSecureCoding, NSCopying { @@ -35,7 +35,7 @@ interface SACrashDetectionEvent : NSSecureCoding, NSCopying { delegate void SACrashDetectionManagerRequestAuthorizationCompletionHandler (SAAuthorizationStatus status, [NullAllowed] NSError error); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] interface SACrashDetectionManager { [Static] @@ -59,7 +59,7 @@ interface SACrashDetectionManager { interface ISACrashDetectionDelegate { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] #if NET [Protocol, Model] #else @@ -73,7 +73,7 @@ interface SACrashDetectionDelegate { delegate void SAEmergencyResponseManagerDialVoiceCallCompletionHandler (bool requestAccepted, [NullAllowed] NSError error); - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [BaseType (typeof (NSObject))] interface SAEmergencyResponseManager { [Wrap ("WeakDelegate")] @@ -90,7 +90,7 @@ interface SAEmergencyResponseManager { interface ISAEmergencyResponseDelegate { } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] #if NET [Protocol, Model] #else diff --git a/src/scenekit.cs b/src/scenekit.cs index 722d23ba0d5a..dc58ba55938a 100644 --- a/src/scenekit.cs +++ b/src/scenekit.cs @@ -46,12 +46,10 @@ using Vector4 = global::OpenTK.Vector4; #endif -#if !WATCH using CoreAnimation; using CoreImage; -#endif -#if WATCH || NET +#if NET using AnimationType = global::SceneKit.ISCNAnimationProtocol; #else using AnimationType = global::CoreAnimation.CAAnimation; @@ -59,13 +57,11 @@ using CoreGraphics; using SpriteKit; -#if !WATCH using ModelIO; using Metal; using GameplayKit; -#endif -#if MONOMAC || WATCH || __MACCATALYST__ +#if MONOMAC || __MACCATALYST__ using EAGLContext = System.Object; #endif @@ -86,12 +82,7 @@ using GLContext = global::Foundation.NSObject; // won't be used -> but must compile #endif -#if WATCH -using NSView = global::Foundation.NSObject; // won't be used -> [NoWatch] but must compile -using SCNGeometryTessellator = global::Foundation.NSObject; // won't be used -> [NoWatch] but must compile -#else using NSView = global::UIKit.UIView; -#endif using NSColor = global::UIKit.UIColor; using NSFont = global::UIKit.UIFont; @@ -104,30 +95,6 @@ #endif namespace SceneKit { - -#if WATCH - // stubs to limit the number of preprocessor directives in the source file - interface CAAnimation {} - interface CALayer {} - interface CAMediaTimingFunction {} - interface MDLAsset {} - interface MDLCamera {} - interface MDLLight {} - interface MDLMaterial {} - interface MDLMesh {} - interface MDLObject {} - interface MDLSubmesh {} - enum MTLPixelFormat {} - enum MTLVertexFormat {} - interface IMTLBuffer {} - interface IMTLCommandBuffer {} - interface IMTLCommandQueue {} - interface IMTLDevice {} - interface IMTLLibrary {} - interface IMTLRenderCommandEncoder {} - interface MTLRenderPassDescriptor {} -#endif - /// Callback used to reflect progress during execution of . [MacCatalyst (13, 1)] delegate void SCNSceneSourceStatusHandler (float /* float, not CGFloat */ totalProgress, SCNSceneSourceStatus status, NSError error, ref bool stopLoading); @@ -170,7 +137,6 @@ interface ISCNAnimatable { } [BaseType (typeof (NSObject))] interface SCNAnimatable { [Abstract] - [NoWatch] [MacCatalyst (13, 1)] [Export ("addAnimation:forKey:")] #if !NET @@ -193,7 +159,7 @@ interface SCNAnimatable { #if NET [Abstract] #endif - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("removeAllAnimationsWithBlendOutDuration:")] void RemoveAllAnimationsWithBlendOutDuration (nfloat duration); @@ -217,7 +183,6 @@ interface SCNAnimatable { [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'GetAnimationPlayer' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'GetAnimationPlayer' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'GetAnimationPlayer' instead.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GetAnimationPlayer' instead.")] [Export ("animationForKey:")] @@ -225,7 +190,6 @@ interface SCNAnimatable { CAAnimation GetAnimation (NSString key); [Abstract] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SCNAnimationPlayer.Paused' instead.")] @@ -235,7 +199,6 @@ interface SCNAnimatable { void PauseAnimation (NSString key); [Abstract] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SCNAnimationPlayer.Paused' instead.")] @@ -245,7 +208,6 @@ interface SCNAnimatable { void ResumeAnimation (NSString key); [Abstract] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SCNAnimationPlayer.Paused' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SCNAnimationPlayer.Paused' instead.")] @@ -255,7 +217,6 @@ interface SCNAnimatable { bool IsAnimationPaused (NSString key); [Abstract] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'RemoveAnimationUsingBlendOutDuration' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'RemoveAnimationUsingBlendOutDuration' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'RemoveAnimationUsingBlendOutDuration' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'RemoveAnimationUsingBlendOutDuration' instead.")] @@ -274,7 +235,6 @@ interface SCNAnimatable { #if NET [Abstract] #endif - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SCNAnimationPlayer.Speed' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'SCNAnimationPlayer.Speed' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'SCNAnimationPlayer.Speed' instead.")] [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'SCNAnimationPlayer.Speed' instead.")] @@ -433,7 +393,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Export ("xFov")] double XFov { get; set; } @@ -441,7 +400,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'FieldOfView' or 'FocalLength' instead.")] [Export ("yFov")] double YFov { get; set; } @@ -473,7 +431,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FocusDistance' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FocusDistance' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FocusDistance' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'FocusDistance' instead.")] [Export ("focalDistance")] @@ -482,7 +439,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FocusDistance' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FocusDistance' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FocusDistance' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FocusDistance' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'FocusDistance' instead.")] [Export ("focalSize")] @@ -491,7 +447,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FStop' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FStop' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FStop' instead.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FStop' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'FStop' instead.")] [Export ("focalBlurRadius")] @@ -500,7 +455,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Deprecated (PlatformName.MacOSX, 10, 13, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'FStop' instead with FStop = SensorHeight / Aperture.")] [Export ("aperture")] @@ -590,7 +544,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Export ("categoryBitMask")] nuint CategoryBitMask { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("cameraWithMDLCamera:")] @@ -652,42 +605,42 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod [Export ("screenSpaceAmbientOcclusionNormalThreshold")] nfloat ScreenSpaceAmbientOcclusionNormalThreshold { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("projectionTransformWithViewportSize:")] SCNMatrix4 GetProjectionTransform (CGSize viewportSize); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("bloomIterationCount")] nint BloomIterationCount { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("bloomIterationSpread")] nfloat BloomIterationSpread { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("grainIntensity")] nfloat GrainIntensity { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("grainScale")] nfloat GrainScale { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("grainIsColored")] bool GrainIsColored { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("whiteBalanceTemperature")] nfloat WhiteBalanceTemperature { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("whiteBalanceTint")] nfloat WhiteBalanceTint { get; set; } @@ -695,7 +648,6 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod interface ISCNCameraControlConfiguration { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface SCNCameraControlConfiguration { @@ -975,7 +927,7 @@ interface SCNGeometry : SCNAnimatable, SCNBoundingVolume, SCNShadable, NSCopying [Export ("geometryWithSources:elements:")] SCNGeometry Create (SCNGeometrySource [] sources, [NullAllowed] SCNGeometryElement [] elements); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("geometryWithSources:elements:sourceChannels:")] SCNGeometry Create (SCNGeometrySource [] sources, [NullAllowed] SCNGeometryElement [] elements, [NullAllowed][BindAs (typeof (int []))] NSNumber [] sourceChannels); @@ -1013,18 +965,16 @@ interface SCNGeometry : SCNAnimatable, SCNBoundingVolume, SCNShadable, NSCopying [Export ("wantsAdaptiveSubdivision")] bool WantsAdaptiveSubdivision { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("geometryWithMDLMesh:")] SCNGeometry FromMesh (MDLMesh mesh); - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("tessellator", ArgumentSemantic.Retain)] SCNGeometryTessellator Tessellator { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("geometrySourceChannels"), NullAllowed] [BindAs (typeof (int []))] NSNumber [] GeometrySourceChannels { get; } @@ -1074,7 +1024,6 @@ interface SCNGeometrySource : NSSecureCoding { [Export ("geometrySourceWithTextureCoordinates:count:"), Internal] SCNGeometrySource FromTextureCoordinates (IntPtr texcoords, nint count); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("geometrySourceWithBuffer:vertexFormat:semantic:vertexCount:dataOffset:dataStride:")] @@ -1140,7 +1089,7 @@ interface SCNGeometryElement : NSSecureCoding { [Export ("geometryElementWithData:primitiveType:primitiveCount:bytesPerIndex:")] SCNGeometryElement FromData ([NullAllowed] NSData data, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint bytesPerIndex); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:")] SCNGeometryElement FromData ([NullAllowed] NSData data, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint indicesChannelCount, bool interleavedIndicesChannels, nint bytesPerIndex); @@ -1161,20 +1110,17 @@ interface SCNGeometryElement : NSSecureCoding { [Export ("maximumPointScreenSpaceRadius")] nfloat MaximumPointScreenSpaceRadius { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("geometryElementWithMDLSubmesh:")] SCNGeometryElement FromSubmesh (MDLSubmesh submesh); - [NoWatch] // marked as 7,0 but there's no Metal support on the platform [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("geometryElementWithBuffer:primitiveType:primitiveCount:bytesPerIndex:")] SCNGeometryElement FromBuffer (IMTLBuffer buffer, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint bytesPerIndex); - [NoWatch] // marked as 11.0 but there's no Metal support on the platform [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:")] @@ -1189,8 +1135,6 @@ interface SCNGeometryElement : NSSecureCoding { nint IndicesChannelCount { get; } } -#if !WATCH - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1219,7 +1163,6 @@ interface SCNGeometryTessellator : NSCopying, NSSecureCoding { [Export ("smoothingMode", ArgumentSemantic.Assign)] SCNTessellationSmoothingMode SmoothingMode { get; set; } } -#endif /// Constants for use with the options argument in . [MacCatalyst (13, 1)] @@ -1264,7 +1207,7 @@ interface SCNHitTest { [Field ("SCNHitTestOptionSearchMode")] NSString SearchModeKey { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("SCNHitTestOptionIgnoreLightArea")] NSString IgnoreLightAreaKey { get; } @@ -1313,7 +1256,6 @@ interface SCNHitTestResult { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Please use Metal instead of OpenGL API.")] [BaseType (typeof (CAOpenGLLayer))] @@ -1469,23 +1411,22 @@ interface SCNLight : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCodi [Export ("sphericalHarmonicsCoefficients", ArgumentSemantic.Copy)] NSData SphericalHarmonicsCoefficients { get; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("lightWithMDLLight:")] SCNLight FromModelLight (MDLLight mdllight); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("probeType", ArgumentSemantic.Assign)] SCNLightProbeType ProbeType { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("probeUpdateType", ArgumentSemantic.Assign)] SCNLightProbeUpdateType ProbeUpdateType { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("probeExtents", ArgumentSemantic.Assign)] Vector3 ProbeExtents { @@ -1495,7 +1436,7 @@ Vector3 ProbeExtents { set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("probeOffset", ArgumentSemantic.Assign)] Vector3 ProbeOffset { @@ -1505,12 +1446,12 @@ Vector3 ProbeOffset { set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("parallaxCorrectionEnabled")] bool ParallaxCorrectionEnabled { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("parallaxExtentsFactor", ArgumentSemantic.Assign)] Vector3 ParallaxExtentsFactor { @@ -1520,7 +1461,7 @@ Vector3 ParallaxExtentsFactor { set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("parallaxCenterOffset", ArgumentSemantic.Assign)] Vector3 ParallaxCenterOffset { @@ -1530,17 +1471,17 @@ Vector3 ParallaxCenterOffset { set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("probeEnvironment")] SCNMaterialProperty ProbeEnvironment { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("areaType", ArgumentSemantic.Assign)] SCNLightAreaType AreaType { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("areaExtents", ArgumentSemantic.Assign)] Vector3 AreaExtents { @@ -1550,17 +1491,17 @@ Vector3 AreaExtents { set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("areaPolygonVertices", ArgumentSemantic.Copy)] NSValue [] AreaPolygonVertices { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("drawsArea")] bool DrawsArea { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("doubleSided")] bool DoubleSided { get; set; } @@ -1590,7 +1531,7 @@ interface SCNLightType { [Field ("SCNLightTypeProbe")] NSString Probe { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("SCNLightTypeArea")] NSString Area { get; } @@ -1598,7 +1539,6 @@ interface SCNLightType { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 10)] [Static] @@ -1645,7 +1585,7 @@ interface SCNLightingModel { [Field ("SCNLightingModelPhysicallyBased")] NSString PhysicallyBased { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Field ("SCNLightingModelShadowOnly")] NSString ShadowOnly { get; } @@ -1743,7 +1683,6 @@ interface SCNMaterial : SCNAnimatable, SCNShadable, NSCopying, NSSecureCoding { [Export ("roughness")] SCNMaterialProperty Roughness { get; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("materialWithMDLMaterial:")] @@ -1761,17 +1700,17 @@ interface SCNMaterial : SCNAnimatable, SCNShadable, NSCopying, NSSecureCoding { [Export ("colorBufferWriteMask", ArgumentSemantic.Assign)] SCNColorMask ColorBufferWriteMask { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("clearCoat")] SCNMaterialProperty ClearCoat { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("clearCoatRoughness")] SCNMaterialProperty ClearCoatRoughness { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("clearCoatNormal")] SCNMaterialProperty ClearCoatNormal { get; } @@ -1805,7 +1744,7 @@ interface SCNMaterialProperty : SCNAnimatable, NSSecureCoding { [Deprecated (PlatformName.iOS, 10, 0)] [Deprecated (PlatformName.MacOSX, 10, 12)] [NoMacCatalyst] - [NoWatch, NoTV] + [NoTV] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [NullAllowed, Export ("borderColor", ArgumentSemantic.Retain)] NSObject BorderColor { get; set; } @@ -1822,7 +1761,6 @@ interface SCNMaterialProperty : SCNAnimatable, NSSecureCoding { [Wrap ("Contents")] NSImage ContentImage { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Wrap ("Contents")] CALayer ContentLayer { get; set; } @@ -1859,34 +1797,30 @@ interface SCNMaterialProperty : SCNAnimatable, NSSecureCoding { SCNMaterialProperty Create (NSObject contents); [Static] - [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), Watch (10, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [return: NullAllowed] [Export ("precomputedLightingEnvironmentContentsWithURL:error:")] NSObject GetPrecomputedLightingEnvironmentContents (NSUrl url, out NSError error); [Static] - [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), Watch (10, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [return: NullAllowed] [Export ("precomputedLightingEnvironmentContentsWithData:error:")] NSObject GetPrecomputedLightingEnvironmentContents (NSData url, out NSError error); [Static] - [NoWatch] // headers claim watchOS 10.0, but watchOS doesn't have Metal [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [return: NullAllowed] [Export ("precomputedLightingEnvironmentDataForContents:device:error:")] NSData GetPrecomputedLightingEnvironmentData (NSObject contents, [NullAllowed] IMTLDevice device, out NSError error); } -#if !WATCH /// Defines the for use with . - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("SCNProgram")] interface SCNProgramSemanticOptions { nuint MappingChannel { get; set; } } -#endif /// Configuration options for hit-testing in SCNNode and SCNSceneRenderer /// @@ -1909,7 +1843,7 @@ interface SCNHitTestOptions { [NullAllowed] SCNNode RootNode { get; set; } SCNHitTestSearchMode SearchMode { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] bool IgnoreLightArea { get; set; } } @@ -1932,11 +1866,9 @@ interface SCNSceneLoadingOptions { // note: generator's StrongDictionary does not support No* attributes yet [NoTV] - [NoWatch] [MacCatalyst (13, 1)] float ConvertUnitsToMeters { get; set; } /* 'floating value encapsulated in a NSNumber' probably a float since it's a graphics framework */ [NoTV] - [NoWatch] [MacCatalyst (13, 1)] bool ConvertToYUp { get; set; } @@ -2020,12 +1952,10 @@ SCNMatrix4 WorldTransform { [Export ("name", ArgumentSemantic.Copy)] string Name { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("rendererDelegate", ArgumentSemantic.Assign), NullAllowed] NSObject WeakRendererDelegate { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Wrap ("WeakRendererDelegate")] ISCNNodeRendererDelegate RendererDelegate { get; set; } @@ -2085,7 +2015,6 @@ SCNMatrix4 WorldTransform { [NullAllowed] SCNConstraint [] Constraints { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] // by default this property is null [Export ("filters", ArgumentSemantic.Copy)] @@ -2209,7 +2138,6 @@ SCNMatrix4 WorldTransform { #endregion - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("nodeWithMDLObject:")] @@ -2534,7 +2462,6 @@ interface ISCNNodeRendererDelegate { } /// Interface defining delegate object functions for adding custom OpenGL drawing code. /// /// Apple documentation for SCNNodeRendererDelegate - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model, Protocol] @@ -2585,7 +2512,6 @@ interface SCNPlane { /// Performs custom rendering using shaders written in OpenGL Shading Language. /// /// Apple documentation for SCNProgram - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SCNProgram : NSCopying, NSSecureCoding { @@ -2634,12 +2560,9 @@ interface SCNProgram : NSCopying, NSSecureCoding { [EditorBrowsable (EditorBrowsableState.Advanced)] void SetSemantic ([NullAllowed] NSString geometrySourceSemantic, string symbol, [NullAllowed] NSDictionary options); -#if !WATCH - [NoWatch] [MacCatalyst (13, 1)] [Wrap ("SetSemantic (geometrySourceSemantic, symbol, options.GetDictionary ())")] void SetSemantic (NSString geometrySourceSemantic, string symbol, SCNProgramSemanticOptions options); -#endif [Export ("semanticForSymbol:")] [return: NullAllowed] @@ -2649,7 +2572,6 @@ interface SCNProgram : NSCopying, NSSecureCoding { NSString GetSemanticForSymbol (string symbol); #endif - [NoWatch] [MacCatalyst (13, 1)] [Field ("SCNProgramMappingChannelKey")] [EditorBrowsable (EditorBrowsableState.Advanced)] @@ -2659,7 +2581,6 @@ interface SCNProgram : NSCopying, NSSecureCoding { [Export ("opaque")] bool Opaque { [Bind ("isOpaque")] get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] [Export ("library", ArgumentSemantic.Retain)] @@ -2677,7 +2598,6 @@ interface ISCNProgramDelegate { } /// Delegate object for SCNProgram objects. /// /// Apple documentation for SCNProgramDelegate - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model, Protocol] @@ -2701,7 +2621,7 @@ interface SCNProgramDelegate { void HandleError (SCNProgram program, NSError error); [NoiOS] - [NoTV, NoWatch] + [NoTV] [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use the SCNProgram's Opaque property instead.")] [NoMacCatalyst] [Export ("programIsOpaque:")] @@ -2739,7 +2659,6 @@ interface SCNPyramid { /// Renders an SCNScene into an OpenGL context. /// /// Apple documentation for SCNRenderer - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: -[SCNRenderer init]: unrecognized selector sent to instance 0x7ce85a30 @@ -2753,7 +2672,6 @@ interface SCNRenderer : SCNSceneRenderer, SCNTechniqueSupport { [Static, Export ("rendererWithContext:options:")] SCNRenderer FromContext (IntPtr context, [NullAllowed] NSDictionary options); - [NoWatch] [NoMacCatalyst] [Static] [Wrap ("FromContext (context.GetHandle (), options)")] @@ -2761,7 +2679,7 @@ interface SCNRenderer : SCNSceneRenderer, SCNTechniqueSupport { // GLContext == CGLContext on macOS and EAGLContext in iOS and tvOS (using on top of file) SCNRenderer FromContext (GLContext context, [NullAllowed] NSDictionary options); - [NoWatch, NoTV] + [NoTV] [Export ("render")] [Deprecated (PlatformName.MacOSX, 10, 11)] [Deprecated (PlatformName.iOS, 9, 0)] @@ -2781,13 +2699,11 @@ interface SCNRenderer : SCNSceneRenderer, SCNTechniqueSupport { [Export ("nextFrameTime")] double NextFrameTimeInSeconds { get; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("rendererWithDevice:options:")] SCNRenderer FromDevice ([NullAllowed] IMTLDevice device, [NullAllowed] NSDictionary options); - [NoWatch] [MacCatalyst (13, 1)] [Export ("renderAtTime:viewport:commandBuffer:passDescriptor:")] void Render (double timeInSeconds, CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); @@ -2842,9 +2758,7 @@ interface SCNRenderingArguments { [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SCNScene : -#if !WATCH GKSceneRootNodeType, -#endif NSSecureCoding { [Static] @@ -2926,7 +2840,6 @@ interface SCNScene : // Keeping here the same name WriteToUrl for iOS and friends because it is how it was bound // initialy for macOS and having it named diferently would hurt shared code - [NoWatch] [MacCatalyst (13, 1)] [Export ("writeToURL:options:delegate:progressHandler:")] [EditorBrowsable (EditorBrowsableState.Advanced)] @@ -2935,7 +2848,6 @@ bool WriteToUrl (NSUrl url, [NullAllowed] ISCNSceneExportDelegate aDelegate, [NullAllowed] SCNSceneExportProgressHandler exportProgressHandler); - [NoWatch] [MacCatalyst (13, 1)] [Wrap ("WriteToUrl (url, options.GetDictionary (), handler, exportProgressHandler)")] bool WriteToUrl (NSUrl url, SCNSceneLoadingOptions options, ISCNSceneExportDelegate handler, SCNSceneExportProgressHandler exportProgressHandler); @@ -2974,28 +2886,27 @@ bool WriteToUrl (NSUrl url, [Field ("SCNSceneUpAxisAttributeKey")] NSString UpAxisAttributeKey { get; } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("sceneWithMDLAsset:")] SCNScene FromAsset (MDLAsset asset); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("wantsScreenSpaceReflection")] bool WantsScreenSpaceReflection { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("screenSpaceReflectionSampleCount")] nint ScreenSpaceReflectionSampleCount { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("screenSpaceReflectionMaximumDistance")] nfloat ScreenSpaceReflectionMaximumDistance { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("screenSpaceReflectionStride")] nfloat ScreenSpaceReflectionStride { get; set; } @@ -3012,7 +2923,6 @@ interface ISCNSceneExportDelegate { } /// Protocol that defines methods to handle exporting a scene to a file. /// /// Apple documentation for SCNSceneExportDelegate - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -3130,7 +3040,6 @@ interface SCNSceneSourceLoading { [Field ("SCNSceneSourceStrictConformanceKey")] NSString StrictConformanceKey { get; } - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.TvOS, 11, 0)] [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] @@ -3266,11 +3175,6 @@ interface SCNSceneRenderer { bool JitteringEnabled { [Bind ("isJitteringEnabled")] get; set; } [Abstract] -#if NET - [Unavailable (PlatformName.WatchOS)] -#else - [Obsoleted (PlatformName.WatchOS, 6, 0, message: "API removed, please do not use.")] -#endif [NoMacCatalyst] [Export ("context")] IntPtr Context { get; } @@ -3279,7 +3183,6 @@ interface SCNSceneRenderer { [Abstract] #endif [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 10)] [NoiOS] @@ -3377,7 +3280,6 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("currentRenderCommandEncoder")] IMTLRenderCommandEncoder CurrentRenderCommandEncoder { get; } @@ -3385,7 +3287,6 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("device")] IMTLDevice Device { get; } @@ -3393,7 +3294,6 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("colorPixelFormat")] MTLPixelFormat ColorPixelFormat { get; } @@ -3401,7 +3301,6 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("depthPixelFormat")] MTLPixelFormat DepthPixelFormat { get; } @@ -3409,7 +3308,6 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("stencilPixelFormat")] MTLPixelFormat StencilPixelFormat { get; } @@ -3417,7 +3315,6 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("commandQueue")] IMTLCommandQueue CommandQueue { get; } @@ -3432,7 +3329,6 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [NoWatch] [MacCatalyst (13, 1)] [Export ("audioEnvironmentNode")] [DebuggerBrowsable (DebuggerBrowsableState.Never)] @@ -3449,7 +3345,7 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("temporalAntialiasingEnabled")] bool TemporalAntialiasingEnabled { [Bind ("isTemporalAntialiasingEnabled")] get; set; } @@ -3457,7 +3353,7 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("currentViewport")] CGRect CurrentViewport { get; } @@ -3465,12 +3361,11 @@ interface SCNSceneRenderer { #if NET [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) #endif - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("usesReverseZ")] bool UsesReverseZ { get; set; } - [NoWatch] [TV (14, 0)] [iOS (14, 0)] [MacCatalyst (14, 0)] @@ -3480,7 +3375,7 @@ interface SCNSceneRenderer { [Export ("currentRenderPassDescriptor")] MTLRenderPassDescriptor CurrentRenderPassDescriptor { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #if XAMCORE_5_0 [Abstract] #endif @@ -3569,7 +3464,6 @@ interface SCNText { // removed in iOS8 beta 5 - but it was already existing in 10.8 ? [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("textSize")] CGSize TextSize { get; } @@ -3669,7 +3563,6 @@ interface SCNTransaction { double AnimationDuration { get; set; } [Static] - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] // by default this property is null [Export ("animationTimingFunction")] @@ -3705,7 +3598,6 @@ interface SCNTube { SCNTube Create (nfloat innerRadius, nfloat outerRadius, nfloat height); } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Internal] // we'll make it public if there's a need for them (beside the strong dictionary we provide) @@ -3722,9 +3614,7 @@ interface SCNRenderingOptionsKeys { NSString LowPowerDeviceKey { get; } } -#if !WATCH /// A that defines options when instantiating a . - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("SCNRenderingOptionsKeys")] interface SCNRenderingOptions { @@ -3732,12 +3622,10 @@ interface SCNRenderingOptions { bool LowPowerDevice { get; set; } } -#endif /// A that renders s. /// /// Apple documentation for SCNView - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSView))] [DisableDefaultCtor] @@ -3748,7 +3636,6 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Export ("backgroundColor", ArgumentSemantic.Copy)] NSColor BackgroundColor { get; set; } @@ -3758,7 +3645,6 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Please use Metal instead of OpenGL API.")] [Export ("openGLContext", ArgumentSemantic.Retain)] @@ -3767,7 +3653,6 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "Please use Metal instead of OpenGL API.")] [Export ("pixelFormat", ArgumentSemantic.Retain)] @@ -3775,7 +3660,6 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { NSOpenGLPixelFormat PixelFormat { get; set; } [NoMac] - [NoWatch] [NoMacCatalyst] [Deprecated (PlatformName.iOS, 12, 0, message: "Please use Metal instead of OpenGL API.")] [Deprecated (PlatformName.TvOS, 12, 0, message: "Please use Metal instead of OpenGL API.")] @@ -3784,11 +3668,9 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { [NullAllowed] EAGLContext EAGLContext { get; set; } -#if !WATCH [MacCatalyst (13, 1)] [Wrap ("this (frame, options.GetDictionary ())")] NativeHandle Constructor (CGRect frame, [NullAllowed] SCNRenderingOptions options); -#endif [Export ("initWithFrame:options:")] NativeHandle Constructor (CGRect frame, [NullAllowed] NSDictionary options); @@ -3829,7 +3711,7 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { [Export ("rendersContinuously")] bool RendersContinuously { get; set; } - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [NoMacCatalyst] [Export ("drawableResizesAsynchronously")] bool DrawableResizesAsynchronously { get; set; } @@ -4320,27 +4202,21 @@ interface SCNShadable { [Wrap ("WeakShaderModifiers")] SCNShaderModifiers ShaderModifiers { get; set; } -#if !NET - [Watch (8, 0)] -#endif [iOS (15, 0), TV (15, 0)] [MacCatalyst (15, 0)] [NullAllowed] // by default this property is null [Export ("minimumLanguageVersion", ArgumentSemantic.Retain)] NSNumber MinimumLanguageVersion { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] // by default this property is null [Export ("program", ArgumentSemantic.Retain)] SCNProgram Program { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("handleBindingOfSymbol:usingBlock:")] void HandleBinding (string symbol, [NullAllowed] SCNBindingHandler handler); - [NoWatch] [MacCatalyst (13, 1)] [Export ("handleUnbindingOfSymbol:usingBlock:")] void HandleUnbinding (string symbol, [NullAllowed] SCNBindingHandler handler); @@ -4365,7 +4241,6 @@ interface SCNTechnique : SCNAnimatable, NSCopying, NSSecureCoding { [return: NullAllowed] SCNTechnique Create (SCNTechnique [] techniques); - [NoWatch] [MacCatalyst (13, 1)] [Export ("handleBindingOfSymbol:usingBlock:")] void HandleBinding (string symbol, [NullAllowed] SCNBindingHandler handler); @@ -4379,7 +4254,6 @@ interface SCNTechnique : SCNAnimatable, NSCopying, NSSecureCoding { [Internal, Export ("setObject:forKeyedSubscript:")] void _SetObject ([NullAllowed] NSObject obj, INSCopying key); - [NoWatch] [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("library", ArgumentSemantic.Strong)] @@ -4533,27 +4407,22 @@ interface SCNPhysicsBody : NSCopying, NSSecureCoding { [Export ("affectedByGravity")] bool AffectedByGravity { [Bind ("isAffectedByGravity")] get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("setResting:")] void SetResting (bool resting); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("continuousCollisionDetectionThreshold")] nfloat ContinuousCollisionDetectionThreshold { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("centerOfMassOffset", ArgumentSemantic.Assign)] SCNVector3 CenterOfMassOffset { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("linearRestingThreshold")] nfloat LinearRestingThreshold { get; set; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Export ("angularRestingThreshold")] nfloat AngularRestingThreshold { get; set; } @@ -5253,7 +5122,7 @@ interface SCNParticleSystem : NSCopying, NSSecureCoding, SCNAnimatable { nfloat FresnelExponent { get; set; } [Introduced (PlatformName.MacCatalyst, 15, 0)] - [Watch (8, 0), TV (15, 0), iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [Export ("writesToDepthBuffer")] bool WritesToDepthBuffer { get; set; } @@ -5372,12 +5241,10 @@ interface SCNParticleProperty { [DisableDefaultCtor] interface SCNParticlePropertyController : NSSecureCoding, NSCopying { - [NoWatch] [MacCatalyst (13, 1)] [Static, Export ("controllerWithAnimation:")] SCNParticlePropertyController Create (CAAnimation animation); - [NoWatch] [MacCatalyst (13, 1)] [Export ("animation", ArgumentSemantic.Retain)] CAAnimation Animation { get; set; } @@ -5464,7 +5331,7 @@ interface SCNTimingFunction : NSSecureCoding { [Export ("functionWithTimingMode:")] SCNTimingFunction Create (SCNActionTimingMode timingMode); - [Static, NoWatch] + [Static] [MacCatalyst (13, 1)] [Export ("functionWithCAMediaTimingFunction:")] SCNTimingFunction Create (CAMediaTimingFunction caTimingFunction); @@ -5488,7 +5355,7 @@ interface SCNAnimation : SCNAnimationProtocol, NSCopying, NSSecureCoding { [Export ("animationNamed:")] SCNAnimation FromName (string animationName); - [Static, NoWatch] + [Static] [MacCatalyst (13, 1)] [Export ("animationWithCAAnimation:")] SCNAnimation FromCAAnimation (CAAnimation caAnimation); diff --git a/src/screencapturekit.cs b/src/screencapturekit.cs index 071d8b1a5707..85c7a7784539 100644 --- a/src/screencapturekit.cs +++ b/src/screencapturekit.cs @@ -23,7 +23,7 @@ namespace ScreenCaptureKit { - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [ErrorDomain ("SCStreamErrorDomain")] [Native] enum SCStreamErrorCode : long { @@ -50,7 +50,7 @@ enum SCStreamErrorCode : long { SystemStoppedStream = -3821, } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [Native] enum SCFrameStatus : long { Complete, @@ -61,7 +61,7 @@ enum SCFrameStatus : long { Stopped, } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [Native] enum SCStreamOutputType : long { Screen, @@ -72,14 +72,14 @@ enum SCStreamOutputType : long { } [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'SCShareableContentStyle' instead.")] - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, Mac (14, 0), NoMacCatalyst] [Native] public enum SCStreamType : long { Window, Display, } - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCPresenterOverlayAlertSetting : long { System, @@ -87,7 +87,7 @@ public enum SCPresenterOverlayAlertSetting : long { Always, } - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCCaptureResolutionType : long { Automatic, @@ -95,7 +95,7 @@ public enum SCCaptureResolutionType : long { Nominal, } - [Flags, NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [Flags, NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCContentSharingPickerMode : ulong { SingleWindow = 1 << 0, @@ -105,7 +105,7 @@ public enum SCContentSharingPickerMode : ulong { SingleDisplay = 1 << 4, } - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCShareableContentStyle : long { None, @@ -114,7 +114,7 @@ public enum SCShareableContentStyle : long { Application, } - [NoiOS, NoTV, NoWatch, Mac (15, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (15, 0), MacCatalyst (18, 2)] [Native] public enum SCCaptureDynamicRange : long { Sdr, @@ -122,7 +122,7 @@ public enum SCCaptureDynamicRange : long { HdrCanonicalDisplay, } - [NoiOS, NoTV, NoWatch, Mac (15, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (15, 0), MacCatalyst (18, 2)] [Native] public enum SCStreamConfigurationPreset : long { CaptureHdrStreamLocalDisplay, @@ -131,7 +131,7 @@ public enum SCStreamConfigurationPreset : long { CaptureHdrScreenshotCanonicalDisplay, } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [Static] interface SCStreamFrameInfoKeys { @@ -166,7 +166,7 @@ interface SCStreamFrameInfoKeys { NSString PresenterOverlayContentRect { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCRunningApplication { @@ -181,7 +181,7 @@ interface SCRunningApplication { int ProcessId { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCWindow { @@ -210,7 +210,7 @@ interface SCWindow { } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCDisplay { @@ -228,7 +228,7 @@ interface SCDisplay { CGRect Frame { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCShareableContent { @@ -274,7 +274,7 @@ interface SCShareableContent { SCShareableContentInfo GetInfo (SCContentFilter filter); } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCContentFilter { @@ -335,7 +335,7 @@ interface SCContentFilter { SCWindow [] IncludedWindows { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] interface SCStreamConfiguration { @@ -463,7 +463,7 @@ interface SCStreamConfiguration { SCStreamConfiguration Create (SCStreamConfigurationPreset preset); } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCStream { @@ -509,7 +509,7 @@ interface SCStream { interface ISCStreamDelegate { } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [Protocol] #if NET [Model] @@ -551,7 +551,7 @@ interface SCStreamDelegate { interface ISCStreamOutput { } - [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (12, 3), MacCatalyst (18, 2)] [Protocol] interface SCStreamOutput { @@ -559,7 +559,7 @@ interface SCStreamOutput { void DidOutputSampleBuffer (SCStream stream, CMSampleBuffer sampleBuffer, SCStreamOutputType type); } - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] interface SCContentSharingPickerConfiguration { [Export ("allowedPickerModes", ArgumentSemantic.Assign)] @@ -575,7 +575,7 @@ interface SCContentSharingPickerConfiguration { bool AllowsChangingSelectedContent { get; set; } } - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCContentSharingPicker { @@ -618,7 +618,7 @@ interface SCContentSharingPicker { interface ISCContentSharingPickerObserver { } - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [Protocol] [Model] [BaseType (typeof (NSObject))] @@ -636,7 +636,7 @@ interface SCContentSharingPickerObserver { void DidFail (NSError error); } - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCShareableContentInfo { @@ -652,7 +652,7 @@ interface SCShareableContentInfo { delegate void SCScreenshotManagerCaptureImageCallback ([NullAllowed] CGImage image, [NullAllowed] NSError error); - [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] + [NoiOS, NoTV, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCScreenshotManager { @@ -673,7 +673,7 @@ interface SCScreenshotManager { void CaptureImage (CGRect rect, [NullAllowed] SCScreenshotManagerCaptureImageCallback completionHandler); } - [Mac (15, 0), NoiOS, NoTV, NoWatch, MacCatalyst (18, 2)] + [Mac (15, 0), NoiOS, NoTV, MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] interface SCRecordingOutputConfiguration { [Export ("outputURL", ArgumentSemantic.Copy)] @@ -696,7 +696,7 @@ interface SCRecordingOutputConfiguration { NSString [] AvailableOutputFileTypes { get; } } - [Mac (15, 0), NoiOS, NoTV, NoWatch, MacCatalyst (18, 2)] + [Mac (15, 0), NoiOS, NoTV, MacCatalyst (18, 2)] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] interface SCRecordingOutputDelegate { @@ -712,7 +712,7 @@ interface SCRecordingOutputDelegate { interface ISCRecordingOutputDelegate { } - [Mac (15, 0), NoiOS, NoTV, NoWatch, MacCatalyst (18, 2)] + [Mac (15, 0), NoiOS, NoTV, MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCRecordingOutput { diff --git a/src/security.cs b/src/security.cs index 0d537623d62c..e91f46362951 100644 --- a/src/security.cs +++ b/src/security.cs @@ -36,14 +36,12 @@ interface SecPolicyIdentifier { NSString AppleIPsec { get; } [NoiOS] - [NoWatch] [NoTV] [NoMacCatalyst] [Field ("kSecPolicyApplePKINITClient")] NSString ApplePKINITClient { get; } [NoiOS] - [NoWatch] [NoTV] [NoMacCatalyst] [Field ("kSecPolicyApplePKINITServer")] @@ -97,7 +95,6 @@ interface SecPolicyPropertyKey { /// Represents shared user name and password for a Website. [Static] - [NoWatch] [Introduced (PlatformName.MacCatalyst, 14, 0)] [NoTV] // removed in tvOS 10 interface SecSharedCredential { @@ -142,7 +139,6 @@ interface SecTrustResultKey { [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.TvOS, 11, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -651,15 +647,15 @@ interface SecImportExport { [Field ("kSecImportExportPassphrase")] NSString Passphrase { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kSecImportExportKeychain")] NSString Keychain { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kSecImportExportAccess")] NSString Access { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kSecImportToMemoryOnly")] NSString ToMemoryOnly { get; } @@ -700,19 +696,19 @@ interface SecItem { [Field ("kSecMatchSubjectContains")] IntPtr MatchSubjectContains { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kSecMatchHostOrSubdomainOfHost")] IntPtr MatchHostOrSubdomainOfHost { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kSecMatchSubjectStartsWith")] IntPtr MatchSubjectStartsWith { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kSecMatchSubjectEndsWith")] IntPtr MatchSubjectEndsWith { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("kSecMatchSubjectWholeString")] IntPtr MatchSubjectWholeString { get; } @@ -754,7 +750,6 @@ interface SecItem { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [MacCatalyst (13, 1)] [Field ("kSecUseDataProtectionKeychain")] IntPtr UseDataProtectionKeychain { get; } @@ -762,7 +757,6 @@ interface SecItem { [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'LAContext.InteractionNotAllowed' instead.")] [Field ("kSecUseOperationPrompt")] @@ -784,14 +778,13 @@ interface SecItem { [Field ("kSecUseAuthenticationContext")] IntPtr UseAuthenticationContext { get; } - [TV (17, 0), NoWatch, NoMacCatalyst, NoMac, NoiOS] + [TV (17, 0), NoMacCatalyst, NoMac, NoiOS] [Field ("kSecUseUserIndependentKeychain")] IntPtr UseUserIndependentKeychain { get; } } [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Static] [Internal] @@ -802,7 +795,6 @@ interface SecCertificateOIDs { [NoiOS] [NoTV] - [NoWatch] [NoMacCatalyst] [Static] [Internal] @@ -1068,47 +1060,47 @@ enum SecKeyAlgorithm { [Field ("kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA512AESGCM")] EciesEncryptionCofactorVariableIvx963Sha512AesGcm, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureDigestRFC4754")] EcdsaSignatureDigestRfc4754, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureDigestRFC4754SHA1")] EcdsaSignatureDigestRfc4754Sha1, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureDigestRFC4754SHA224")] EcdsaSignatureDigestRfc4754Sha224, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureDigestRFC4754SHA256")] EcdsaSignatureDigestRfc4754Sha256, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureDigestRFC4754SHA384")] EcdsaSignatureDigestRfc4754Sha384, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureDigestRFC4754SHA512")] EcdsaSignatureDigestRfc4754Sha512, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureMessageRFC4754SHA1")] EcdsaSignatureMessageRfc4754Sha1, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureMessageRFC4754SHA224")] EcdsaSignatureMessageRfc4754Sha224, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureMessageRFC4754SHA256")] EcdsaSignatureMessageRfc4754Sha256, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureMessageRFC4754SHA384")] EcdsaSignatureMessageRfc4754Sha384, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("kSecKeyAlgorithmECDSASignatureMessageRFC4754SHA512")] EcdsaSignatureMessageRfc4754Sha512, } @@ -1117,7 +1109,6 @@ enum SecKeyAlgorithm { enum SslSessionConfig { [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.TvOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Field ("kSSLSessionConfig_default")] @@ -1134,7 +1125,6 @@ enum SslSessionConfig { [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.TvOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Field ("kSSLSessionConfig_RC4_fallback")] @@ -1145,7 +1135,6 @@ enum SslSessionConfig { [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.TvOS, 11, 0)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Field ("kSSLSessionConfig_TLSv1_RC4_fallback")] @@ -1162,7 +1151,6 @@ enum SslSessionConfig { [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.TvOS, 11, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -1171,7 +1159,6 @@ enum SslSessionConfig { [Deprecated (PlatformName.iOS, 11, 0)] [Deprecated (PlatformName.MacOSX, 10, 13)] - [Deprecated (PlatformName.WatchOS, 4, 0)] [Deprecated (PlatformName.TvOS, 11, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -1200,7 +1187,6 @@ interface SecKeyKeyExchangeParameter { } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Internal] [Static] @@ -1220,7 +1206,6 @@ interface SecSharedCredentialKeys { } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("SecSharedCredentialKeys")] interface SecSharedCredentialInfo { diff --git a/src/sensitivecontentanalysis.cs b/src/sensitivecontentanalysis.cs index bf0dd955c352..b89a5705f24f 100644 --- a/src/sensitivecontentanalysis.cs +++ b/src/sensitivecontentanalysis.cs @@ -8,7 +8,7 @@ #endif namespace SensitiveContentAnalysis { - [NoTV, NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCSensitivityAnalysis { @@ -16,7 +16,7 @@ interface SCSensitivityAnalysis { bool Sensitive { [Bind ("isSensitive")] get; } } - [NoTV, NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum SCSensitivityAnalysisPolicy : long { Disabled = 0, @@ -24,7 +24,7 @@ public enum SCSensitivityAnalysisPolicy : long { DescriptiveInterventions = 2, } - [NoTV, NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface SCSensitivityAnalyzer { [Export ("analysisPolicy", ArgumentSemantic.Assign)] diff --git a/src/sensorkit.cs b/src/sensorkit.cs index 3bd885801def..ee89258c737b 100644 --- a/src/sensorkit.cs +++ b/src/sensorkit.cs @@ -28,7 +28,7 @@ interface NSUnitFrequency : NSUnit { } interface NSUnitAcceleration : NSUnit { } interface NSUnitTemperature : NSUnit { } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -44,7 +44,7 @@ enum SRAmbientLightSensorPlacement : long { FrontBottomLeft, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -54,7 +54,7 @@ public enum SRAuthorizationStatus : long { Denied, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -63,7 +63,7 @@ enum SRCrownOrientation : long { Right, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -75,7 +75,7 @@ enum SRDeletionReason : long { SystemInitiated, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -88,7 +88,7 @@ enum SRErrorCode : long { PromptDeclined, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -100,7 +100,7 @@ enum SRLocationCategory : long { Gym, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -124,7 +124,7 @@ enum SRNotificationEvent : long { DeviceUnlocked, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Native] @@ -133,7 +133,7 @@ enum SRWristLocation : long { Right, } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum SRKeyboardMetricsSentimentCategory : long { Absolutist, @@ -148,7 +148,7 @@ public enum SRKeyboardMetricsSentimentCategory : long { Confused, } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum SRTextInputSessionType : long { Keyboard = 1, @@ -157,14 +157,14 @@ public enum SRTextInputSessionType : long { Dictation, } - [NoWatch, NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] [Native] public enum SRMediaEventType : long { OnScreen = 1, OffScreen, } - [Flags, NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [Flags, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum SRElectrocardiogramDataFlags : ulong { None = 0x0, @@ -172,14 +172,14 @@ public enum SRElectrocardiogramDataFlags : ulong { CrownTouched = 1uL << 1, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum SRElectrocardiogramLead : long { RightArmMinusLeftArm = 1, LeftArmMinusRightArm, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum SRElectrocardiogramSessionState : long { Begin = 1, @@ -187,28 +187,28 @@ public enum SRElectrocardiogramSessionState : long { End, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] public enum SRElectrocardiogramSessionGuidance : long { Guided = 1, Unguided, } - [Flags, NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [Flags, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum SRFaceMetricsContext : ulong { DeviceUnlock = 1uL << 0, MessagingAppUsage = 1uL << 1, } - [Flags, NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [Flags, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum SRSpeechMetricsSessionFlags : ulong { Default = 0x0, BypassVoiceProcessing = (1uL << 0), } - [Flags, NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [Flags, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum SRWristTemperatureCondition : ulong { None = 0x0, @@ -217,7 +217,7 @@ public enum SRWristTemperatureCondition : ulong { InMotion = 1uL << 2, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] enum SRDeviceUsageCategory { @@ -309,7 +309,7 @@ enum SRDeviceUsageCategory { Stickers, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -326,7 +326,7 @@ interface SRAmbientLightSample { NSMeasurement Lux { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -356,7 +356,7 @@ interface SRApplicationUsage { double RelativeStartTime { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -373,7 +373,7 @@ interface SRDeletionRecord : NSSecureCoding { SRDeletionReason Reason { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -400,7 +400,7 @@ interface SRDevice : NSSecureCoding, NSCopying { string ProductType { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -433,7 +433,7 @@ interface SRDeviceUsageReport { string Version { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -449,7 +449,7 @@ interface SRFetchRequest { SRDevice Device { get; set; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -463,7 +463,7 @@ interface SRFetchResult : NSCopying where SampleType : NSObject { double /* SRAbsoluteTime */ Timestamp { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -473,7 +473,7 @@ interface SRKeyboardProbabilityMetric where UnitType : NSUnit { NSMeasurement [] DistributionSampleValues { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -740,7 +740,7 @@ interface SRKeyboardMetrics { nint EmojiCount (SRKeyboardMetricsSentimentCategory category); } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -760,7 +760,7 @@ interface SRMessagesUsageReport { nint TotalUniqueContacts { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -774,7 +774,7 @@ interface SRNotificationUsage { SRNotificationEvent Event { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -799,7 +799,7 @@ interface SRPhoneUsageReport { interface ISRSensorReaderDelegate { } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] #if NET @@ -841,7 +841,7 @@ interface SRSensorReaderDelegate { void FetchDevicesFailed (SRSensorReader reader, NSError error); } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] enum SRSensor { @@ -919,7 +919,7 @@ enum SRSensor { Photoplethysmogram, } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -968,7 +968,7 @@ SRSensor Sensor { void RequestAuthorization (NSSet sensors, Action completion); } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -991,7 +991,7 @@ interface SRVisit { NSUuid Identifier { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -1002,7 +1002,7 @@ interface SRWebUsage { double /* NSTimeInterval */ TotalUsageTime { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] @@ -1029,7 +1029,7 @@ interface SRWristDetection { NSDate OffWristDate { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 0)] [MacCatalyst (14, 0)] [Category] @@ -1041,7 +1041,7 @@ interface NSString_SRDeletionRecord { NSString _GetSensorForDeletionRecordsFromSensor (); } - [NoWatch, NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface SRTextInputSession /* privately conforms to NSCoding and NSSecureCoding */ { @@ -1056,7 +1056,7 @@ interface SRTextInputSession /* privately conforms to NSCoding and NSSecureCodin string SessionIdentifier { get; } } - [NoWatch, NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] [BaseType (typeof (NSObject))] interface SRMediaEvent : NSCopying, NSSecureCoding { @@ -1067,7 +1067,7 @@ interface SRMediaEvent : NSCopying, NSSecureCoding { SRMediaEventType EventType { get; } } - [NoWatch, NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, NoMac, iOS (16, 4), MacCatalyst (16, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRSupplementalCategory : NSCopying, NSSecureCoding { @@ -1077,7 +1077,7 @@ interface SRSupplementalCategory : NSCopying, NSSecureCoding { NSString Identifier { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRAudioLevel : NSCopying, NSSecureCoding { @@ -1089,7 +1089,7 @@ interface SRAudioLevel : NSCopying, NSSecureCoding { double Loudness { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRFaceMetricsExpression : NSCopying, NSSecureCoding { @@ -1101,7 +1101,7 @@ interface SRFaceMetricsExpression : NSCopying, NSSecureCoding { double Value { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRSpeechExpression : NSCopying, NSSecureCoding { @@ -1128,7 +1128,7 @@ interface SRSpeechExpression : NSCopying, NSSecureCoding { double Dominance { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRSpeechMetrics : NSCopying, NSSecureCoding { @@ -1159,7 +1159,7 @@ interface SRSpeechMetrics : NSCopying, NSSecureCoding { SRSpeechExpression SpeechExpression { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRWristTemperature : NSCopying, NSSecureCoding { @@ -1177,7 +1177,7 @@ interface SRWristTemperature : NSCopying, NSSecureCoding { NSMeasurement ErrorEstimate { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRWristTemperatureSession : NSCopying, NSSecureCoding { @@ -1195,7 +1195,7 @@ interface SRWristTemperatureSession : NSCopying, NSSecureCoding { NSEnumerator Temperatures { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 0), NoMacCatalyst] + [NoTV, NoMac, iOS (17, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRFaceMetrics : NSCopying, NSSecureCoding { @@ -1219,7 +1219,7 @@ interface SRFaceMetrics : NSCopying, NSSecureCoding { SRFaceMetricsExpression [] PartialFaceExpressions { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRElectrocardiogramData : NSCopying, NSSecureCoding { @@ -1231,7 +1231,7 @@ interface SRElectrocardiogramData : NSCopying, NSSecureCoding { NSMeasurement Value { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRElectrocardiogramSample : NSCopying, NSSecureCoding { @@ -1252,7 +1252,7 @@ interface SRElectrocardiogramSample : NSCopying, NSSecureCoding { SRElectrocardiogramData [] Data { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRElectrocardiogramSession : NSCopying, NSSecureCoding { @@ -1267,7 +1267,7 @@ interface SRElectrocardiogramSession : NSCopying, NSSecureCoding { string Identifier { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] public enum SRPhotoplethysmogramOpticalSampleCondition { [Field ("SRPhotoplethysmogramOpticalSampleConditionSignalSaturation")] SignalSaturation, @@ -1275,7 +1275,7 @@ public enum SRPhotoplethysmogramOpticalSampleCondition { UnreliableNoise, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRPhotoplethysmogramOpticalSample : NSCopying, NSSecureCoding { @@ -1330,7 +1330,7 @@ interface SRPhotoplethysmogramOpticalSample : NSCopying, NSSecureCoding { NSString [] Conditions { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRPhotoplethysmogramAccelerometerSample : NSCopying, NSSecureCoding { @@ -1351,7 +1351,7 @@ interface SRPhotoplethysmogramAccelerometerSample : NSCopying, NSSecureCoding { NSMeasurement Z { get; } } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] public enum SRPhotoplethysmogramSampleUsage { [Field ("SRPhotoplethysmogramSampleUsageForegroundHeartRate")] ForegroundHeartRate, @@ -1363,7 +1363,7 @@ public enum SRPhotoplethysmogramSampleUsage { BackgroundSystem, } - [NoWatch, NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SRPhotoplethysmogramSample : NSCopying, NSSecureCoding { diff --git a/src/servicemanagement.cs b/src/servicemanagement.cs index 251c15975035..47b44b30a5db 100644 --- a/src/servicemanagement.cs +++ b/src/servicemanagement.cs @@ -5,7 +5,7 @@ namespace ServiceManagement { [Native] - [NoWatch, NoTV, NoiOS, MacCatalyst (16, 0), Mac (13, 0)] + [NoTV, NoiOS, MacCatalyst (16, 0), Mac (13, 0)] public enum SMAppServiceStatus : long { NotRegistered, Enabled, @@ -14,7 +14,7 @@ public enum SMAppServiceStatus : long { } // @interface SMAppService : NSObject - [NoWatch, NoTV, NoiOS, MacCatalyst (16, 0), Mac (13, 0)] + [NoTV, NoiOS, MacCatalyst (16, 0), Mac (13, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SMAppService { diff --git a/src/sharedwithyou.cs b/src/sharedwithyou.cs index 1b960f747729..47b631dc0ee3 100644 --- a/src/sharedwithyou.cs +++ b/src/sharedwithyou.cs @@ -37,7 +37,7 @@ namespace SharedWithYou { - [NoWatch, TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum SWAttributionViewBackgroundStyle : long { Default = 0, @@ -45,14 +45,14 @@ public enum SWAttributionViewBackgroundStyle : long { Material, } - [NoWatch, TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum SWAttributionViewDisplayContext : long { Summary = 0, Detail, } - [NoWatch, TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum SWAttributionViewHorizontalAlignment : long { Default = 0, @@ -71,21 +71,21 @@ public enum SWHighlightCenterErrorCode : long { AccessDenied, } - [NoTV, NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum SWHighlightChangeEventTrigger : long { Edit = 1, Comment = 2, } - [NoTV, NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum SWHighlightMembershipEventTrigger : long { AddedCollaborator = 1, RemovedCollaborator = 2, } - [NoTV, NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum SWHighlightPersistenceEventTrigger : long { Created = 1, @@ -94,7 +94,7 @@ public enum SWHighlightPersistenceEventTrigger : long { Moved = 4, } - [NoWatch, Mac (13, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [Mac (13, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIView))] interface SWAttributionView { @@ -131,7 +131,7 @@ interface SWAttributionView { bool EnablesMarquee { get; set; } } - [NoWatch, TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWHighlight : NSSecureCoding, NSCopying { @@ -150,7 +150,7 @@ interface SWHighlight : NSSecureCoding, NSCopying { interface ISWHighlightCenterDelegate { } - [NoWatch, TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -163,7 +163,7 @@ interface SWHighlightCenterDelegate { void HighlightsDidChange (SWHighlightCenter highlightCenter); } - [NoWatch, TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface SWHighlightCenter { [Wrap ("WeakDelegate")] @@ -217,7 +217,7 @@ interface SWHighlightCenter { void GetSignedIdentityProof (SWCollaborationHighlight collaborationHighlight, NSData data, Action completionHandler); } - [NoWatch, Mac (13, 0), NoTV, NoiOS, NoMacCatalyst] + [Mac (13, 0), NoTV, NoiOS, NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWRemoveParticipantAlert { @@ -226,7 +226,7 @@ interface SWRemoveParticipantAlert { void ShowAlert (SWPerson participant, SWCollaborationHighlight highlight, [NullAllowed] UIWindow window); } - [NoWatch, NoMac, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoMac, NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] interface SWRemoveParticipantAlertController { @@ -237,7 +237,7 @@ interface SWRemoveParticipantAlertController { interface ISWCollaborationViewDelegate { } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -260,7 +260,7 @@ interface SWCollaborationViewDelegate { void DidDismissPopover (SWCollaborationView collaborationView); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIView))] interface SWCollaborationView { @@ -336,7 +336,7 @@ interface SWCollaborationView { void SetShowManageButton (bool showManageButton); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (SWHighlight))] interface SWCollaborationHighlight : NSSecureCoding, NSCopying { [Export ("collaborationIdentifier")] @@ -354,7 +354,7 @@ interface SWCollaborationHighlight : NSSecureCoding, NSCopying { interface ISWHighlightEvent { } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface SWHighlightEvent : NSSecureCoding, NSCopying { [Abstract] @@ -362,7 +362,7 @@ interface SWHighlightEvent : NSSecureCoding, NSCopying { NSUrl HighlightUrl { get; } } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWHighlightChangeEvent : SWHighlightEvent { @@ -373,7 +373,7 @@ interface SWHighlightChangeEvent : SWHighlightEvent { NativeHandle Constructor (SWHighlight highlight, SWHighlightChangeEventTrigger trigger); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWHighlightMembershipEvent : SWHighlightEvent { @@ -384,7 +384,7 @@ interface SWHighlightMembershipEvent : SWHighlightEvent { NativeHandle Constructor (SWHighlight highlight, SWHighlightMembershipEventTrigger trigger); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWHighlightMentionEvent : SWHighlightEvent { @@ -398,7 +398,7 @@ interface SWHighlightMentionEvent : SWHighlightEvent { NativeHandle Constructor (SWHighlight highlight, SWPersonIdentity identity); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWHighlightPersistenceEvent : SWHighlightEvent { diff --git a/src/sharedwithyoucore.cs b/src/sharedwithyoucore.cs index 668333b50a4b..49a020ff9920 100644 --- a/src/sharedwithyoucore.cs +++ b/src/sharedwithyoucore.cs @@ -20,7 +20,7 @@ namespace SharedWithYouCore { - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface SWAction : NSCopying, NSSecureCoding { [Export ("uuid")] @@ -38,7 +38,7 @@ interface SWAction : NSCopying, NSSecureCoding { interface ISWCollaborationActionHandler { } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Protocol] [DisableDefaultCtor] interface SWCollaborationActionHandler { @@ -51,7 +51,7 @@ interface SWCollaborationActionHandler { void HandleUpdateCollaborationParticipantsAction (SWCollaborationCoordinator coordinator, SWUpdateCollaborationParticipantsAction action); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWCollaborationCoordinator { @@ -63,7 +63,7 @@ interface SWCollaborationCoordinator { ISWCollaborationActionHandler ActionHandler { get; set; } } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWCollaborationOption : NSCopying, NSSecureCoding { @@ -91,7 +91,7 @@ interface SWCollaborationOption : NSCopying, NSSecureCoding { SWCollaborationOption Create (string title, string identifier); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWCollaborationOptionsGroup : NSCopying, NSSecureCoding { @@ -120,7 +120,7 @@ interface SWCollaborationOptionsGroup : NSCopying, NSSecureCoding { SWCollaborationOptionsGroup Create (string identifier, SWCollaborationOption [] options); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (SWCollaborationOptionsGroup))] interface SWCollaborationOptionsPickerGroup { @@ -132,7 +132,7 @@ interface SWCollaborationOptionsPickerGroup { string SelectedOptionIdentifier { get; set; } } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWCollaborationShareOptions : NSCopying, NSSecureCoding { @@ -158,7 +158,7 @@ interface SWCollaborationShareOptions : NSCopying, NSSecureCoding { SWCollaborationShareOptions Create (SWCollaborationOptionsGroup [] optionsGroups); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWCollaborationMetadata : NSSecureCoding, NSCopying, NSMutableCopying @@ -198,7 +198,7 @@ interface SWCollaborationMetadata : NSSecureCoding, NSCopying, NSMutableCopying NativeHandle _InitWithCollaborationIdentifier (string collaborationIdentifier); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWPerson : NSSecureCoding { @@ -206,7 +206,7 @@ interface SWPerson : NSSecureCoding { NativeHandle Constructor ([NullAllowed] string handle, [NullAllowed] SWPersonIdentity identity, string displayName, [NullAllowed] NSData thumbnailImageData); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWPersonIdentity : NSSecureCoding, NSCopying { @@ -217,7 +217,7 @@ interface SWPersonIdentity : NSSecureCoding, NSCopying { NativeHandle Constructor (NSData rootHash); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SWPersonIdentityProof : NSSecureCoding, NSCopying { @@ -231,7 +231,7 @@ interface SWPersonIdentityProof : NSSecureCoding, NSCopying { nuint PublicKeyIndex { get; } } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [BaseType (typeof (SWPersonIdentityProof))] interface SWSignedPersonIdentityProof { @@ -242,7 +242,7 @@ interface SWSignedPersonIdentityProof { NSData SignatureData { get; } } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (SWAction))] [DisableDefaultCtor] interface SWStartCollaborationAction : NSSecureCoding, NSCopying { @@ -253,7 +253,7 @@ interface SWStartCollaborationAction : NSSecureCoding, NSCopying { void Fulfill (NSUrl url, string collaborationIdentifier); } - [NoWatch, NoTV, Mac (13, 0), iOS (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [BaseType (typeof (SWAction))] [DisableDefaultCtor] diff --git a/src/shazamkit.cs b/src/shazamkit.cs index 2957a78d36f6..e815b11baddf 100644 --- a/src/shazamkit.cs +++ b/src/shazamkit.cs @@ -11,7 +11,7 @@ namespace ShazamKit { [Native] - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [ErrorDomain ("SHErrorDomain")] public enum SHErrorCode : long { InvalidAudioFormat = 100, @@ -26,7 +26,7 @@ public enum SHErrorCode : long { MediaItemFetchFailed = 600, } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Static] enum SHMediaItemProperty { [Field ("SHMediaItemShazamID")] @@ -57,18 +57,18 @@ enum SHMediaItemProperty { MatchOffset, [Field ("SHMediaItemFrequencySkew")] FrequencySkew, - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Field ("SHMediaItemTimeRanges")] TimeRanges, - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Field ("SHMediaItemFrequencySkewRanges")] FrequencySkewRanges, - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [Field ("SHMediaItemCreationDate")] CreationDate, } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SHCatalog { @@ -79,10 +79,10 @@ interface SHCatalog { double MaximumQuerySignatureDuration { get; } } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (SHCatalog))] interface SHCustomCatalog { - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("initWithDataRepresentation:error:")] NativeHandle Constructor (NSData data, out NSError error); @@ -95,7 +95,6 @@ interface SHCustomCatalog { [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'DataRepresentation' instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use 'DataRepresentation' instead.")] [Deprecated (PlatformName.TvOS, 17, 0, message: "Use 'DataRepresentation' instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use 'DataRepresentation' instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use 'DataRepresentation' instead.")] [Export ("writeToURL:error:")] bool Write (NSUrl url, [NullAllowed] out NSError error); @@ -105,12 +104,12 @@ interface SHCustomCatalog { [return: Release] SHCustomCatalog Create (); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("dataRepresentation", ArgumentSemantic.Strong)] NSData DataRepresentation { get; } } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SHMatch : NSSecureCoding { @@ -121,7 +120,7 @@ interface SHMatch : NSSecureCoding { SHSignature QuerySignature { get; } } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (SHMediaItem))] [DisableDefaultCtor] interface SHMatchedMediaItem : NSSecureCoding { @@ -135,7 +134,7 @@ interface SHMatchedMediaItem : NSSecureCoding { double PredictedCurrentMatchOffset { get; } } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SHMediaItem : NSSecureCoding, NSCopying { @@ -200,24 +199,23 @@ interface SHMediaItem : NSSecureCoding, NSCopying { [Export ("objectForKeyedSubscript:")] NSObject GetObject (string key); - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("timeRanges", ArgumentSemantic.Strong)] SHRange [] TimeRanges { get; } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("frequencySkewRanges", ArgumentSemantic.Strong)] SHRange [] FrequencySkewRanges { get; } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("creationDate", ArgumentSemantic.Strong)] NSDate CreationDate { get; } } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use SHLibrary instead.")] [Deprecated (PlatformName.iOS, 17, 0, message: "Use SHLibrary instead.")] [Deprecated (PlatformName.TvOS, 17, 0, message: "Use SHLibrary instead.")] - [Deprecated (PlatformName.WatchOS, 10, 0, message: "Use SHLibrary instead.")] [Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Use SHLibrary instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -231,7 +229,7 @@ interface SHMediaLibrary { void Add (SHMediaItem [] mediaItems, Action completionHandler); } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface SHSession { [Export ("catalog", ArgumentSemantic.Strong)] @@ -254,7 +252,7 @@ interface SHSession { void Match (SHSignature signature); } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SHSignature : NSSecureCoding, NSCopying { @@ -274,7 +272,7 @@ interface SHSignature : NSSecureCoding, NSCopying { SHSignature GetSignature (NSData dataRepresentation, [NullAllowed] out NSError error); } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface SHSignatureGenerator { [Export ("appendBuffer:atTime:error:")] @@ -284,14 +282,14 @@ interface SHSignatureGenerator { SHSignature Signature { get; } [Static, Async] - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("generateSignatureFromAsset:completionHandler:")] void GenerateSignature (AVAsset asset, Action completionHandler); } interface ISHSessionDelegate { } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -306,7 +304,7 @@ interface SHSessionDelegate { void DidNotFindMatch (SHSession session, SHSignature signature, [NullAllowed] NSError error); } - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SHRange : NSSecureCoding, NSCopying { diff --git a/src/social.cs b/src/social.cs index ae7acc19671d..8f8a9dcf3fc4 100644 --- a/src/social.cs +++ b/src/social.cs @@ -232,19 +232,19 @@ interface SLComposeServiceViewController : SocialTextViewDelegate { #if NET // Inlined manually from UITextViewDelegate/NSTextViewDelegate, because the one from the *Delegate type // has different availability attributes depending on the platform. - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), MacCatalyst (18, 0), NoTV] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), NoTV] [Export ("textViewWritingToolsWillBegin:")] new void WritingToolsWillBegin (SocialTextView textView); // Inlined manually from UITextViewDelegate/NSTextViewDelegate, because the one from the *Delegate type // has different availability attributes depending on the platform. - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), MacCatalyst (18, 0), NoTV] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), NoTV] [Export ("textViewWritingToolsDidEnd:")] new void WritingToolsDidEnd (SocialTextView textView); // Inlined manually from UITextViewDelegate/NSTextViewDelegate, because the one from the *Delegate type // has different availability attributes depending on the platform. - [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), MacCatalyst (18, 0), NoTV] + [iOS (18, 0), MacCatalyst (18, 0), Mac (15, 0), NoTV] [Export ("textView:writingToolsIgnoredRangesInEnclosingRange:")] new NSValue [] GetWritingToolsIgnoredRangesInEnclosingRange (SocialTextView textView, NSRange enclosingRange); #endif diff --git a/src/soundanalysis.cs b/src/soundanalysis.cs index 51a70814cc42..997463167641 100644 --- a/src/soundanalysis.cs +++ b/src/soundanalysis.cs @@ -21,7 +21,7 @@ namespace SoundAnalysis { [ErrorDomain ("SNErrorDomain")] - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] enum SNErrorCode : long { @@ -32,14 +32,14 @@ enum SNErrorCode : long { InvalidFile, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum SNTimeDurationConstraintType : long { Enumerated = 1, Range = 2, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -67,7 +67,7 @@ interface SNAudioStreamAnalyzer { delegate void SNAudioFileAnalyzerAnalyzeHandler (bool didReachEndOfFile); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -97,7 +97,7 @@ interface SNAudioFileAnalyzer { void CancelAnalysis (); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -110,7 +110,7 @@ interface SNClassification { double Confidence { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -122,13 +122,13 @@ interface SNClassificationResult : SNResult { [Export ("timeRange")] CMTimeRange TimeRange { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("classificationForIdentifier:")] [return: NullAllowed] SNClassification GetClassification (string identifier); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -140,40 +140,40 @@ interface SNClassifySoundRequest : SNRequest { [Export ("initWithMLModel:error:")] NativeHandle Constructor (MLModel mlModel, [NullAllowed] out NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("initWithClassifierIdentifier:error:")] NativeHandle Constructor (string classifierIdentifier, [NullAllowed] out NSError error); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("knownClassifications", ArgumentSemantic.Copy)] string [] KnownClassifications { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("windowDuration", ArgumentSemantic.Assign)] CMTime WindowDuration { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("windowDurationConstraint", ArgumentSemantic.Strong)] SNTimeDurationConstraint WindowDurationConstraint { get; } } interface ISNRequest { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface SNRequest { } interface ISNResult { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface SNResult { } interface ISNResultsObserving { } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface SNResultsObserving { @@ -189,13 +189,13 @@ interface SNResultsObserving { void DidComplete (ISNRequest request); } - [iOS (15, 0), Watch (8, 0), TV (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] enum SNClassifierIdentifier { [Field ("SNClassifierIdentifierVersion1")] Version1, } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SNTimeDurationConstraint /* privately conforms to NSCoding, NSCopying, and NSSecureCoding */ diff --git a/src/spritekit.cs b/src/spritekit.cs index d56fc61c83d5..f832ac4342d9 100644 --- a/src/spritekit.cs +++ b/src/spritekit.cs @@ -9,10 +9,8 @@ using System; using System.ComponentModel; -#if !WATCH using CoreImage; using GameplayKit; -#endif using AVFoundation; using ObjCRuntime; @@ -21,9 +19,7 @@ using CoreGraphics; using CoreVideo; using SceneKit; -#if !WATCH using Metal; -#endif #if NET using MatrixFloat2x2 = global::CoreGraphics.NMatrix2; @@ -64,13 +60,6 @@ using NSLineBreakMode = global::UIKit.UILineBreakMode; using pfloat = System.Single; using NSEvent = System.Object; -#if !WATCH -using UIView = global::UIKit.UIView; -#endif -#endif - -#if WATCH -using UITouch = System.Object; #endif #if !NET @@ -78,20 +67,6 @@ #endif namespace SpriteKit { - -#if WATCH - // stubs to limit the number of preprocessor directives in the source file - interface AVPlayer {} - interface CIFilter {} - interface GKPolygonObstacle {} - interface UIView {} - interface IMTLCommandBuffer {} - interface IMTLCommandQueue {} - interface IMTLDevice {} - interface IMTLRenderCommandEncoder {} - interface MTLRenderPassDescriptor {} -#endif - /// The delegate that acts as the enumeration handler for . delegate void SKNodeChildEnumeratorHandler (SKNode node, out bool stop); /// A method that maps , a value between 0 and 1, to a return value between 0 snd 1. @@ -162,3519 +137,3382 @@ partial interface SKNode : NSSecureCoding, NSCopying { #elif IOS || TVOS [BaseType (typeof (UIResponder))] partial interface SKNode : NSSecureCoding, NSCopying, UIFocusItem, UIFocusItemContainer, UICoordinateSpace { -#else // WATCHOS - [BaseType (typeof (NSObject))] - partial interface SKNode : NSSecureCoding, NSCopying { -#endif - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); - - [Static, Export ("node")] - SKNode Create (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("nodeWithFileNamed:")] - [return: NullAllowed] - SKNode Create (string filename); - - [Watch (5, 0)] - [MacCatalyst (13, 1)] - [Internal] - [Static] - [Export ("nodeWithFileNamed:securelyWithClasses:andError:")] - [return: NullAllowed] - SKNode Create (string filename, IntPtr classesPtr, out NSError error); - - [Export ("frame")] -#if !(MONOMAC || WATCH) - // For iOS+tvOS we also get this property from the UIFocusItem protocol, but we redefine it here to get the right availability attributes. - new +#else +#error Unknown platform #endif - CGRect Frame { get; } + [DesignatedInitializer] + [Export ("init")] + NativeHandle Constructor (); - [Export ("calculateAccumulatedFrame")] - CGRect CalculateAccumulatedFrame (); + [Static, Export ("node")] + SKNode Create (); - [Export ("position")] - CGPoint Position { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("nodeWithFileNamed:")] + [return: NullAllowed] + SKNode Create (string filename); - [Export ("zPosition")] - nfloat ZPosition { get; set; } + [MacCatalyst (13, 1)] + [Internal] + [Static] + [Export ("nodeWithFileNamed:securelyWithClasses:andError:")] + [return: NullAllowed] + SKNode Create (string filename, IntPtr classesPtr, out NSError error); + + [Export ("frame")] +#if !MONOMAC + // For iOS+tvOS we also get this property from the UIFocusItem protocol, but we redefine it here to get the right availability attributes. + new +#endif + CGRect Frame { get; } - [Export ("zRotation")] - nfloat ZRotation { get; set; } + [Export ("calculateAccumulatedFrame")] + CGRect CalculateAccumulatedFrame (); - [Export ("xScale")] - nfloat XScale { get; set; } + [Export ("position")] + CGPoint Position { get; set; } - [Export ("yScale")] - nfloat YScale { get; set; } + [Export ("zPosition")] + nfloat ZPosition { get; set; } - [Export ("speed")] - nfloat Speed { get; set; } + [Export ("zRotation")] + nfloat ZRotation { get; set; } - [Export ("alpha")] - nfloat Alpha { get; set; } + [Export ("xScale")] + nfloat XScale { get; set; } - [Export ("paused")] - bool Paused { [Bind ("isPaused")] get; set; } + [Export ("yScale")] + nfloat YScale { get; set; } - [Export ("hidden")] - bool Hidden { [Bind ("isHidden")] get; set; } + [Export ("speed")] + nfloat Speed { get; set; } - [Export ("userInteractionEnabled")] - bool UserInteractionEnabled { [Bind ("isUserInteractionEnabled")] get; set; } + [Export ("alpha")] + nfloat Alpha { get; set; } - [NoMac] - [Watch (9, 0)] - [MacCatalyst (13, 1)] - [Export ("focusBehavior", ArgumentSemantic.Assign)] - SKNodeFocusBehavior FocusBehavior { get; set; } + [Export ("paused")] + bool Paused { [Bind ("isPaused")] get; set; } - [Export ("parent")] - [NullAllowed] - SKNode Parent { get; } + [Export ("hidden")] + bool Hidden { [Bind ("isHidden")] get; set; } - [Export ("children")] - SKNode [] Children { get; } + [Export ("userInteractionEnabled")] + bool UserInteractionEnabled { [Bind ("isUserInteractionEnabled")] get; set; } - [NullAllowed] // by default this property is null - [Export ("name", ArgumentSemantic.Copy)] - string Name { get; set; } + [NoMac] + [MacCatalyst (13, 1)] + [Export ("focusBehavior", ArgumentSemantic.Assign)] + SKNodeFocusBehavior FocusBehavior { get; set; } - [Export ("scene")] - [NullAllowed] - SKScene Scene { get; } + [Export ("parent")] + [NullAllowed] + SKNode Parent { get; } - [Export ("physicsBody", ArgumentSemantic.Retain), NullAllowed] - SKPhysicsBody PhysicsBody { get; set; } + [Export ("children")] + SKNode [] Children { get; } - [NullAllowed] // by default this property is null - [Export ("userData", ArgumentSemantic.Retain)] - NSMutableDictionary UserData { get; set; } + [NullAllowed] // by default this property is null + [Export ("name", ArgumentSemantic.Copy)] + string Name { get; set; } - [Export ("setScale:")] - void SetScale (nfloat scale); + [Export ("scene")] + [NullAllowed] + SKScene Scene { get; } - [Export ("addChild:")] - [PostGet ("Children")] - void AddChild (SKNode node); + [Export ("physicsBody", ArgumentSemantic.Retain), NullAllowed] + SKPhysicsBody PhysicsBody { get; set; } - [Export ("insertChild:atIndex:")] - [PostGet ("Children")] - void InsertChild (SKNode node, nint index); + [NullAllowed] // by default this property is null + [Export ("userData", ArgumentSemantic.Retain)] + NSMutableDictionary UserData { get; set; } - [Export ("removeChildrenInArray:")] - [PostGet ("Children")] - void RemoveChildren (SKNode [] nodes); + [Export ("setScale:")] + void SetScale (nfloat scale); - [Export ("removeAllChildren")] - [PostGet ("Children")] - void RemoveAllChildren (); + [Export ("addChild:")] + [PostGet ("Children")] + void AddChild (SKNode node); - [Export ("removeFromParent")] - void RemoveFromParent (); + [Export ("insertChild:atIndex:")] + [PostGet ("Children")] + void InsertChild (SKNode node, nint index); - [Export ("childNodeWithName:")] - [return: NullAllowed] - SKNode GetChildNode (string name); + [Export ("removeChildrenInArray:")] + [PostGet ("Children")] + void RemoveChildren (SKNode [] nodes); - [Export ("enumerateChildNodesWithName:usingBlock:")] - void EnumerateChildNodes (string name, SKNodeChildEnumeratorHandler enumerationHandler); + [Export ("removeAllChildren")] + [PostGet ("Children")] + void RemoveAllChildren (); - [Export ("runAction:")] - void RunAction (SKAction action); + [Export ("removeFromParent")] + void RemoveFromParent (); - [Async] - [Export ("runAction:completion:")] - void RunAction (SKAction action, Action completionHandler); + [Export ("childNodeWithName:")] + [return: NullAllowed] + SKNode GetChildNode (string name); - [Export ("runAction:withKey:")] - void RunAction (SKAction action, string key); + [Export ("enumerateChildNodesWithName:usingBlock:")] + void EnumerateChildNodes (string name, SKNodeChildEnumeratorHandler enumerationHandler); - [Export ("hasActions")] - bool HasActions { get; } + [Export ("runAction:")] + void RunAction (SKAction action); - [Export ("actionForKey:")] - [return: NullAllowed] - SKAction GetActionForKey (string key); + [Async] + [Export ("runAction:completion:")] + void RunAction (SKAction action, Action completionHandler); - [Export ("removeActionForKey:")] - void RemoveActionForKey (string key); + [Export ("runAction:withKey:")] + void RunAction (SKAction action, string key); - [Export ("removeAllActions")] - void RemoveAllActions (); + [Export ("hasActions")] + bool HasActions { get; } - [Export ("containsPoint:")] - bool ContainsPoint (CGPoint point); + [Export ("actionForKey:")] + [return: NullAllowed] + SKAction GetActionForKey (string key); - [Export ("nodeAtPoint:")] - SKNode GetNodeAtPoint (CGPoint point); + [Export ("removeActionForKey:")] + void RemoveActionForKey (string key); - [Export ("nodesAtPoint:")] - SKNode [] GetNodesAtPoint (CGPoint point); + [Export ("removeAllActions")] + void RemoveAllActions (); - [Export ("convertPoint:fromNode:")] - CGPoint ConvertPointFromNode (CGPoint point, SKNode sourceNode); + [Export ("containsPoint:")] + bool ContainsPoint (CGPoint point); - [Export ("convertPoint:toNode:")] - CGPoint ConvertPointToNode (CGPoint point, SKNode sourceNode); + [Export ("nodeAtPoint:")] + SKNode GetNodeAtPoint (CGPoint point); - [Export ("intersectsNode:")] - bool IntersectsNode (SKNode node); + [Export ("nodesAtPoint:")] + SKNode [] GetNodesAtPoint (CGPoint point); - [MacCatalyst (13, 1)] - [Export ("isEqualToNode:")] - bool IsEqual (SKNode node); + [Export ("convertPoint:fromNode:")] + CGPoint ConvertPointFromNode (CGPoint point, SKNode sourceNode); - [Export ("inParentHierarchy:")] - bool InParentHierarchy (SKNode node); + [Export ("convertPoint:toNode:")] + CGPoint ConvertPointToNode (CGPoint point, SKNode sourceNode); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("reachConstraints", ArgumentSemantic.Copy)] - SKReachConstraints ReachConstraints { get; set; } + [Export ("intersectsNode:")] + bool IntersectsNode (SKNode node); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("constraints", ArgumentSemantic.Copy)] - SKConstraint [] Constraints { get; set; } - - [MacCatalyst (13, 1)] - [Export ("objectForKeyedSubscript:")] - SKNode GetObjectsMatching (string nameExpression); - - [MacCatalyst (13, 1)] - [Export ("moveToParent:")] - void MoveToParent (SKNode parent); - - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodeBounds:")] - GKPolygonObstacle [] ObstaclesFromNodeBounds (SKNode [] nodes); - - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodePhysicsBodies:")] - GKPolygonObstacle [] ObstaclesFromNodePhysicsBodies (SKNode [] nodes); - - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromSpriteTextures:accuracy:")] - GKPolygonObstacle [] ObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); + [MacCatalyst (13, 1)] + [Export ("isEqualToNode:")] + bool IsEqual (SKNode node); -#if !NET - [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Deprecated (PlatformName.MacOSX, 10, 12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } - - [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Deprecated (PlatformName.MacOSX, 10, 12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); - - [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Deprecated (PlatformName.MacOSX, 10, 12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); -#endif + [Export ("inParentHierarchy:")] + bool InParentHierarchy (SKNode node); -#if !WATCH - // Extensions from GameplayKit, inlined to avoid ugly static extension syntax - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromSpriteTextures:accuracy:")] - GKPolygonObstacle [] GetObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); - - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodeBounds:")] - GKPolygonObstacle [] GetObstaclesFromNodeBounds (SKNode [] nodes); - - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodePhysicsBodies:")] - GKPolygonObstacle [] GetObstaclesFromNodePhysicsBodies (SKNode [] nodes); -#endif - } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("reachConstraints", ArgumentSemantic.Copy)] + SKReachConstraints ReachConstraints { get; set; } - [NoiOS] - [NoTV] - [NoWatch] - [NoMacCatalyst] - [Category, BaseType (typeof (NSEvent))] - partial interface SKNodeEvent_NSEvent { + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("constraints", ArgumentSemantic.Copy)] + SKConstraint [] Constraints { get; set; } - [Export ("locationInNode:")] - CGPoint LocationInNode (SKNode node); - } + [MacCatalyst (13, 1)] + [Export ("objectForKeyedSubscript:")] + SKNode GetObjectsMatching (string nameExpression); - /// Extension methods for that aide with conversion to Sprite Kit coordinates. - [NoMac] [MacCatalyst (13, 1)] - [NoWatch] - [Category, BaseType (typeof (UITouch))] - partial interface SKNodeTouches_UITouch { + [Export ("moveToParent:")] + void MoveToParent (SKNode parent); - [Export ("locationInNode:")] - CGPoint LocationInNode (SKNode node); + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodeBounds:")] + GKPolygonObstacle [] ObstaclesFromNodeBounds (SKNode [] nodes); - [Export ("previousLocationInNode:")] - CGPoint PreviousLocationInNode (SKNode node); - } + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodePhysicsBodies:")] + GKPolygonObstacle [] ObstaclesFromNodePhysicsBodies (SKNode [] nodes); - /// An that applies a Core Graphics to its output. - /// - /// Application developers should ensure that is . - /// Note that is a subclass of . - /// - /// Apple documentation for SKEffectNode + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKEffectNode : SKWarpable { + [Static] + [Export ("obstaclesFromSpriteTextures:accuracy:")] + GKPolygonObstacle [] ObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); - [NoWatch] - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("filter", ArgumentSemantic.Retain)] - CIFilter Filter { get; set; } +#if !NET + [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] + [Deprecated (PlatformName.MacOSX, 10, 12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } + + [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] + [Deprecated (PlatformName.MacOSX, 10, 12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); + + [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] + [Deprecated (PlatformName.MacOSX, 10, 12, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +#endif - [Export ("shouldCenterFilter")] - bool ShouldCenterFilter { get; set; } + // Extensions from GameplayKit, inlined to avoid ugly static extension syntax + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromSpriteTextures:accuracy:")] + GKPolygonObstacle [] GetObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); - [Export ("shouldEnableEffects")] - bool ShouldEnableEffects { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodeBounds:")] + GKPolygonObstacle [] GetObstaclesFromNodeBounds (SKNode [] nodes); - [Export ("shouldRasterize")] - bool ShouldRasterize { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodePhysicsBodies:")] + GKPolygonObstacle [] GetObstaclesFromNodePhysicsBodies (SKNode [] nodes); +} - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } +[NoiOS] +[NoTV] +[NoMacCatalyst] +[Category, BaseType (typeof (NSEvent))] +partial interface SKNodeEvent_NSEvent { - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [Export ("locationInNode:")] + CGPoint LocationInNode (SKNode node); +} - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } +/// Extension methods for that aide with conversion to Sprite Kit coordinates. +[NoMac] +[MacCatalyst (13, 1)] +[Category, BaseType (typeof (UITouch))] +partial interface SKNodeTouches_UITouch { - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [Export ("locationInNode:")] + CGPoint LocationInNode (SKNode node); - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [Export ("previousLocationInNode:")] + CGPoint PreviousLocationInNode (SKNode node); +} - /// A method that derives a force by applying the physics of a field to a body that is within the field. - delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); +/// An that applies a Core Graphics to its output. +/// +/// Application developers should ensure that is . +/// Note that is a subclass of . +/// +/// Apple documentation for SKEffectNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKEffectNode : SKWarpable { - /// Applies physics effects within a portion of a scene. - /// - /// Apple documentation for SKFieldNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKFieldNode { - [Export ("region", ArgumentSemantic.Retain)] - [NullAllowed] - SKRegion Region { get; set; } + [NullAllowed] // by default this property is null + [Export ("filter", ArgumentSemantic.Retain)] + CIFilter Filter { get; set; } - [Export ("strength")] - float Strength { get; set; } /* float, not CGFloat */ + [Export ("shouldCenterFilter")] + bool ShouldCenterFilter { get; set; } - [Export ("falloff")] - float Falloff { get; set; } /* float, not CGFloat */ + [Export ("shouldEnableEffects")] + bool ShouldEnableEffects { get; set; } - [Export ("minimumRadius")] + [Export ("shouldRasterize")] + bool ShouldRasterize { get; set; } - float MinimumRadius { get; set; } /* float, not CGFloat */ + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } + + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [Export ("exclusive")] - bool Exclusive { [Bind ("isExclusive")] get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [Export ("categoryBitMask")] - uint CategoryBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [Export ("direction")] - /* This was typed as Vector4 since sizeof the native type (vector_float3) = 16 */ - Vector4 Direction { - [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] - set; - } +/// A method that derives a force by applying the physics of a field to a body that is within the field. +delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); - [Export ("smoothness")] - float Smoothness { get; set; } /* float, not CGFloat */ +/// Applies physics effects within a portion of a scene. +/// +/// Apple documentation for SKFieldNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKFieldNode { + [Export ("region", ArgumentSemantic.Retain)] + [NullAllowed] + SKRegion Region { get; set; } - [Export ("animationSpeed")] - float AnimationSpeed { get; set; } /* float, not CGFloat */ + [Export ("strength")] + float Strength { get; set; } /* float, not CGFloat */ - [Export ("texture", ArgumentSemantic.Retain)] - [NullAllowed] - SKTexture Texture { get; set; } + [Export ("falloff")] + float Falloff { get; set; } /* float, not CGFloat */ - [Static, Export ("dragField")] - SKFieldNode CreateDragField (); + [Export ("minimumRadius")] - [Static, Export ("vortexField")] - SKFieldNode CreateVortexField (); + float MinimumRadius { get; set; } /* float, not CGFloat */ - [Static, Export ("radialGravityField")] - SKFieldNode CreateRadialGravityField (); + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } - [Static, Export ("linearGravityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKFieldNode CreateLinearGravityField (/* vector_float3 */ Vector4 direction); + [Export ("exclusive")] + bool Exclusive { [Bind ("isExclusive")] get; set; } - [Static, Export ("velocityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKFieldNode CreateVelocityField (/* vector_float3 */ Vector4 direction); + [Export ("categoryBitMask")] + uint CategoryBitMask { get; set; } /* uint32_t */ - [Static, Export ("velocityFieldWithTexture:")] - SKFieldNode CreateVelocityField (SKTexture velocityTexture); + [Export ("direction")] + /* This was typed as Vector4 since sizeof the native type (vector_float3) = 16 */ + Vector4 Direction { + [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] + set; + } - [Static, Export ("noiseFieldWithSmoothness:animationSpeed:")] - SKFieldNode CreateNoiseField (nfloat smoothness, nfloat speed); + [Export ("smoothness")] + float Smoothness { get; set; } /* float, not CGFloat */ - [Static, Export ("turbulenceFieldWithSmoothness:animationSpeed:")] - SKFieldNode CreateTurbulenceField (nfloat smoothness, nfloat speed); + [Export ("animationSpeed")] + float AnimationSpeed { get; set; } /* float, not CGFloat */ - [Static, Export ("springField")] - SKFieldNode CreateSpringField (); + [Export ("texture", ArgumentSemantic.Retain)] + [NullAllowed] + SKTexture Texture { get; set; } - [Static, Export ("electricField")] - SKFieldNode CreateElectricField (); + [Static, Export ("dragField")] + SKFieldNode CreateDragField (); - [Static, Export ("magneticField")] - SKFieldNode CreateMagneticField (); + [Static, Export ("vortexField")] + SKFieldNode CreateVortexField (); - [Static, Export ("customFieldWithEvaluationBlock:")] - SKFieldNode CreateCustomField (SKFieldForceEvaluator evaluator); - } + [Static, Export ("radialGravityField")] + SKFieldNode CreateRadialGravityField (); - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (SKEffectNode))] - interface SKScene -#if !WATCH - : GKSceneRootNodeType -#endif - { - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [Static, Export ("linearGravityFieldWithVector:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKFieldNode CreateLinearGravityField (/* vector_float3 */ Vector4 direction); - [Static, Export ("sceneWithSize:")] - SKScene FromSize (CGSize size); + [Static, Export ("velocityFieldWithVector:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKFieldNode CreateVelocityField (/* vector_float3 */ Vector4 direction); - [MacCatalyst (13, 1)] - [Export ("sceneDidLoad")] - void SceneDidLoad (); + [Static, Export ("velocityFieldWithTexture:")] + SKFieldNode CreateVelocityField (SKTexture velocityTexture); - [Export ("size")] - CGSize Size { get; set; } + [Static, Export ("noiseFieldWithSmoothness:animationSpeed:")] + SKFieldNode CreateNoiseField (nfloat smoothness, nfloat speed); - [Export ("scaleMode")] - SKSceneScaleMode ScaleMode { get; set; } + [Static, Export ("turbulenceFieldWithSmoothness:animationSpeed:")] + SKFieldNode CreateTurbulenceField (nfloat smoothness, nfloat speed); - [Export ("backgroundColor", ArgumentSemantic.Retain)] - UIColor BackgroundColor { get; set; } + [Static, Export ("springField")] + SKFieldNode CreateSpringField (); - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } + [Static, Export ("electricField")] + SKFieldNode CreateElectricField (); - [Export ("physicsWorld")] - SKPhysicsWorld PhysicsWorld { get; } + [Static, Export ("magneticField")] + SKFieldNode CreateMagneticField (); - [NoWatch] - [MacCatalyst (13, 1)] - [Export ("convertPointFromView:")] - CGPoint ConvertPointFromView (CGPoint point); + [Static, Export ("customFieldWithEvaluationBlock:")] + SKFieldNode CreateCustomField (SKFieldForceEvaluator evaluator); +} + +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (SKEffectNode))] +interface SKScene + : GKSceneRootNodeType { + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [NoWatch] - [MacCatalyst (13, 1)] - [Export ("convertPointToView:")] - CGPoint ConvertPointToView (CGPoint point); + [Static, Export ("sceneWithSize:")] + SKScene FromSize (CGSize size); + + [MacCatalyst (13, 1)] + [Export ("sceneDidLoad")] + void SceneDidLoad (); - [NoWatch] - [MacCatalyst (13, 1)] - [Export ("view", ArgumentSemantic.Weak)] - [NullAllowed] - SKView View { get; } + [Export ("size")] + CGSize Size { get; set; } - [Export ("update:")] - void Update (double currentTime); + [Export ("scaleMode")] + SKSceneScaleMode ScaleMode { get; set; } - [Export ("didEvaluateActions")] - void DidEvaluateActions (); + [Export ("backgroundColor", ArgumentSemantic.Retain)] + UIColor BackgroundColor { get; set; } - [Export ("didSimulatePhysics")] - void DidSimulatePhysics (); + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } - [NoWatch] - [MacCatalyst (13, 1)] - [Export ("didMoveToView:")] - void DidMoveToView (SKView view); + [Export ("physicsWorld")] + SKPhysicsWorld PhysicsWorld { get; } - [NoWatch] - [MacCatalyst (13, 1)] - [Export ("willMoveFromView:")] - void WillMoveFromView (SKView view); + [MacCatalyst (13, 1)] + [Export ("convertPointFromView:")] + CGPoint ConvertPointFromView (CGPoint point); - [Export ("didChangeSize:")] - void DidChangeSize (CGSize oldSize); + [MacCatalyst (13, 1)] + [Export ("convertPointToView:")] + CGPoint ConvertPointToView (CGPoint point); - [MacCatalyst (13, 1)] - [Export ("didApplyConstraints")] - void DidApplyConstraints (); + [MacCatalyst (13, 1)] + [Export ("view", ArgumentSemantic.Weak)] + [NullAllowed] + SKView View { get; } - [MacCatalyst (13, 1)] - [Export ("didFinishUpdate")] - void DidFinishUpdate (); + [Export ("update:")] + void Update (double currentTime); - [MacCatalyst (13, 1)] - [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] - NSObject WeakDelegate { get; set; } + [Export ("didEvaluateActions")] + void DidEvaluateActions (); - [MacCatalyst (13, 1)] - [Wrap ("WeakDelegate")] - ISKSceneDelegate Delegate { get; set; } + [Export ("didSimulatePhysics")] + void DidSimulatePhysics (); - [MacCatalyst (13, 1)] - [Export ("audioEngine", ArgumentSemantic.Retain)] - AVAudioEngine AudioEngine { get; } + [MacCatalyst (13, 1)] + [Export ("didMoveToView:")] + void DidMoveToView (SKView view); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("camera", ArgumentSemantic.Weak)] - SKCameraNode Camera { get; set; } + [MacCatalyst (13, 1)] + [Export ("willMoveFromView:")] + void WillMoveFromView (SKView view); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("listener", ArgumentSemantic.Weak)] - SKNode Listener { get; set; } - } + [Export ("didChangeSize:")] + void DidChangeSize (CGSize oldSize); - /// Interface representing the required methods (if any) of the protocol . - /// - /// This interface contains the required methods (if any) from the protocol defined by . - /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. - /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. - /// - interface ISKSceneDelegate { } + [MacCatalyst (13, 1)] + [Export ("didApplyConstraints")] + void DidApplyConstraints (); - /// Delegate object for SKScene objects. Provides methods relating to animation events. - /// - /// Apple documentation for SKSceneDelegate [MacCatalyst (13, 1)] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface SKSceneDelegate { - [Export ("update:forScene:")] - void Update (double currentTime, SKScene scene); + [Export ("didFinishUpdate")] + void DidFinishUpdate (); - [Export ("didEvaluateActionsForScene:")] - void DidEvaluateActions (SKScene scene); + [MacCatalyst (13, 1)] + [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] + NSObject WeakDelegate { get; set; } - [Export ("didSimulatePhysicsForScene:")] - void DidSimulatePhysics (SKScene scene); + [MacCatalyst (13, 1)] + [Wrap ("WeakDelegate")] + ISKSceneDelegate Delegate { get; set; } - [Export ("didApplyConstraintsForScene:")] - void DidApplyConstraints (SKScene scene); + [MacCatalyst (13, 1)] + [Export ("audioEngine", ArgumentSemantic.Retain)] + AVAudioEngine AudioEngine { get; } - [Export ("didFinishUpdateForScene:")] - void DidFinishUpdate (SKScene scene); - } + [MacCatalyst (13, 1)] + [NullAllowed, Export ("camera", ArgumentSemantic.Weak)] + SKCameraNode Camera { get; set; } - /// An OpenGL ES fragment shader. - /// - /// Apple documentation for SKShader [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKShader : NSCopying, NSSecureCoding { - [Export ("initWithSource:")] - NativeHandle Constructor (string shaderSourceCode); + [NullAllowed, Export ("listener", ArgumentSemantic.Weak)] + SKNode Listener { get; set; } +} + +/// Interface representing the required methods (if any) of the protocol . +/// +/// This interface contains the required methods (if any) from the protocol defined by . +/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. +/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. +/// +interface ISKSceneDelegate { } + +/// Delegate object for SKScene objects. Provides methods relating to animation events. +/// +/// Apple documentation for SKSceneDelegate +[MacCatalyst (13, 1)] +[Protocol, Model] +[BaseType (typeof (NSObject))] +interface SKSceneDelegate { + [Export ("update:forScene:")] + void Update (double currentTime, SKScene scene); + + [Export ("didEvaluateActionsForScene:")] + void DidEvaluateActions (SKScene scene); + + [Export ("didSimulatePhysicsForScene:")] + void DidSimulatePhysics (SKScene scene); + + [Export ("didApplyConstraintsForScene:")] + void DidApplyConstraints (SKScene scene); + + [Export ("didFinishUpdateForScene:")] + void DidFinishUpdate (SKScene scene); +} - [Export ("initWithSource:uniforms:")] - NativeHandle Constructor (string sharedSourceCode, SKUniform [] uniforms); +/// An OpenGL ES fragment shader. +/// +/// Apple documentation for SKShader +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKShader : NSCopying, NSSecureCoding { + [Export ("initWithSource:")] + NativeHandle Constructor (string shaderSourceCode); - [NullAllowed] // by default this property is null - [Export ("source")] - string Source { get; set; } + [Export ("initWithSource:uniforms:")] + NativeHandle Constructor (string sharedSourceCode, SKUniform [] uniforms); - // @property (copy) NSArray * uniforms; - [Export ("uniforms", ArgumentSemantic.Copy)] - SKUniform [] Uniforms { get; set; } + [NullAllowed] // by default this property is null + [Export ("source")] + string Source { get; set; } - // @required + (instancetype)shader; - [Static, Export ("shader")] - SKShader Create (); + // @property (copy) NSArray * uniforms; + [Export ("uniforms", ArgumentSemantic.Copy)] + SKUniform [] Uniforms { get; set; } - [Static, Export ("shaderWithSource:")] - SKShader FromShaderSourceCode (string source); + // @required + (instancetype)shader; + [Static, Export ("shader")] + SKShader Create (); - [Static, Export ("shaderWithSource:uniforms:")] - SKShader FromShaderSourceCode (string source, SKUniform [] uniforms); + [Static, Export ("shaderWithSource:")] + SKShader FromShaderSourceCode (string source); - [Static, Export ("shaderWithFileNamed:")] - SKShader FromFile (string name); + [Static, Export ("shaderWithSource:uniforms:")] + SKShader FromShaderSourceCode (string source, SKUniform [] uniforms); - [Export ("addUniform:")] - void AddUniform (SKUniform uniform); + [Static, Export ("shaderWithFileNamed:")] + SKShader FromFile (string name); - [Export ("uniformNamed:")] - [return: NullAllowed] - SKUniform GetUniform (string uniformName); + [Export ("addUniform:")] + void AddUniform (SKUniform uniform); - [Export ("removeUniformNamed:")] - void RemoveUniform (string uniforName); + [Export ("uniformNamed:")] + [return: NullAllowed] + SKUniform GetUniform (string uniformName); - [MacCatalyst (13, 1)] - [Export ("attributes", ArgumentSemantic.Copy)] - SKAttribute [] Attributes { get; set; } - } + [Export ("removeUniformNamed:")] + void RemoveUniform (string uniforName); - /// A that displays a textured, colored sprite. - /// - /// Apple documentation for SKSpriteNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKSpriteNode : SKWarpable { + [Export ("attributes", ArgumentSemantic.Copy)] + SKAttribute [] Attributes { get; set; } +} - [Static, Export ("spriteNodeWithTexture:size:")] - SKSpriteNode FromTexture ([NullAllowed] SKTexture texture, CGSize size); +/// A that displays a textured, colored sprite. +/// +/// Apple documentation for SKSpriteNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKSpriteNode : SKWarpable { - [Static, Export ("spriteNodeWithTexture:")] - SKSpriteNode FromTexture ([NullAllowed] SKTexture texture); + [Static, Export ("spriteNodeWithTexture:size:")] + SKSpriteNode FromTexture ([NullAllowed] SKTexture texture, CGSize size); - [Static, Export ("spriteNodeWithImageNamed:")] - SKSpriteNode FromImageNamed (string name); + [Static, Export ("spriteNodeWithTexture:")] + SKSpriteNode FromTexture ([NullAllowed] SKTexture texture); - [Static, Export ("spriteNodeWithColor:size:")] - SKSpriteNode FromColor (UIColor color, CGSize size); + [Static, Export ("spriteNodeWithImageNamed:")] + SKSpriteNode FromImageNamed (string name); - [DesignatedInitializer] - [Export ("initWithTexture:color:size:")] - NativeHandle Constructor ([NullAllowed] SKTexture texture, UIColor color, CGSize size); + [Static, Export ("spriteNodeWithColor:size:")] + SKSpriteNode FromColor (UIColor color, CGSize size); - [Export ("initWithTexture:")] - NativeHandle Constructor ([NullAllowed] SKTexture texture); + [DesignatedInitializer] + [Export ("initWithTexture:color:size:")] + NativeHandle Constructor ([NullAllowed] SKTexture texture, UIColor color, CGSize size); - // can't be null -> crash - [Export ("initWithImageNamed:")] - NativeHandle Constructor (string name); + [Export ("initWithTexture:")] + NativeHandle Constructor ([NullAllowed] SKTexture texture); - [Export ("initWithColor:size:")] - NativeHandle Constructor (UIColor color, CGSize size); + // can't be null -> crash + [Export ("initWithImageNamed:")] + NativeHandle Constructor (string name); - [Export ("texture", ArgumentSemantic.Retain)] - [NullAllowed] - SKTexture Texture { get; set; } + [Export ("initWithColor:size:")] + NativeHandle Constructor (UIColor color, CGSize size); - [Export ("centerRect")] - CGRect CenterRect { get; set; } + [Export ("texture", ArgumentSemantic.Retain)] + [NullAllowed] + SKTexture Texture { get; set; } - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("centerRect")] + CGRect CenterRect { get; set; } - [Export ("color", ArgumentSemantic.Retain)] - [NullAllowed] // it's actually null-resetable (see unit tests) - UIColor Color { get; set; } + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } + [Export ("color", ArgumentSemantic.Retain)] + [NullAllowed] // it's actually null-resetable (see unit tests) + UIColor Color { get; set; } - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [Export ("size")] - CGSize Size { get; set; } + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } - // - // iOS 8 - // + [Export ("size")] + CGSize Size { get; set; } + // + // iOS 8 + // - [MacCatalyst (13, 1)] - [Static, Export ("spriteNodeWithTexture:normalMap:")] - SKSpriteNode Create ([NullAllowed] SKTexture texture, [NullAllowed] SKTexture normalMap); - [MacCatalyst (13, 1)] - [Static, Export ("spriteNodeWithImageNamed:normalMapped:")] - SKSpriteNode Create (string imageName, bool generateNormalMap); + [MacCatalyst (13, 1)] + [Static, Export ("spriteNodeWithTexture:normalMap:")] + SKSpriteNode Create ([NullAllowed] SKTexture texture, [NullAllowed] SKTexture normalMap); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("normalTexture", ArgumentSemantic.Retain)] - SKTexture NormalTexture { get; set; } + [MacCatalyst (13, 1)] + [Static, Export ("spriteNodeWithImageNamed:normalMapped:")] + SKSpriteNode Create (string imageName, bool generateNormalMap); - [MacCatalyst (13, 1)] - [Export ("lightingBitMask")] - uint LightingBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("normalTexture", ArgumentSemantic.Retain)] + SKTexture NormalTexture { get; set; } - [MacCatalyst (13, 1)] - [Export ("shadowCastBitMask")] - uint ShadowCastBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("lightingBitMask")] + uint LightingBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("shadowedBitMask")] - uint ShadowedBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("shadowCastBitMask")] + uint ShadowCastBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("shader", ArgumentSemantic.Retain), NullAllowed] - SKShader Shader { get; set; } + [MacCatalyst (13, 1)] + [Export ("shadowedBitMask")] + uint ShadowedBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("scaleToSize:")] - void ScaleTo (CGSize size); + [MacCatalyst (13, 1)] + [Export ("shader", ArgumentSemantic.Retain), NullAllowed] + SKShader Shader { get; set; } - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [MacCatalyst (13, 1)] + [Export ("scaleToSize:")] + void ScaleTo (CGSize size); - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - /// An object that can control the properties of particles emitted by a . - /// - /// The total time of the sequence is normalized from 0.0 to 1.0. - /// - /// - /// - /// - /// - /// Apple documentation for SKKeyframeSequence [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - partial interface SKKeyframeSequence : NSSecureCoding, NSCopying { + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [DesignatedInitializer] - [Export ("initWithKeyframeValues:times:")] - [Internal] - NativeHandle Constructor ([NullAllowed] NSObject [] values, [NullAllowed] NSArray times); +/// An object that can control the properties of particles emitted by a . +/// +/// The total time of the sequence is normalized from 0.0 to 1.0. +/// +/// +/// +/// +/// +/// Apple documentation for SKKeyframeSequence +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +partial interface SKKeyframeSequence : NSSecureCoding, NSCopying { - [Export ("initWithCapacity:")] - NativeHandle Constructor (nuint numItems); + [DesignatedInitializer] + [Export ("initWithKeyframeValues:times:")] + [Internal] + NativeHandle Constructor ([NullAllowed] NSObject [] values, [NullAllowed] NSArray times); - [Export ("count")] - nuint Count { get; } + [Export ("initWithCapacity:")] + NativeHandle Constructor (nuint numItems); - [Export ("addKeyframeValue:time:")] - void AddKeyframeValue (NSObject value, nfloat time); + [Export ("count")] + nuint Count { get; } - [Export ("removeLastKeyframe")] - void RemoveLastKeyframe (); + [Export ("addKeyframeValue:time:")] + void AddKeyframeValue (NSObject value, nfloat time); - [Export ("removeKeyframeAtIndex:")] - void RemoveKeyframe (nuint index); + [Export ("removeLastKeyframe")] + void RemoveLastKeyframe (); - [Export ("setKeyframeValue:forIndex:")] - void SetKeyframeValue (NSObject value, nuint index); + [Export ("removeKeyframeAtIndex:")] + void RemoveKeyframe (nuint index); - [Export ("setKeyframeTime:forIndex:")] - void SetKeyframeTime (nfloat time, nuint index); + [Export ("setKeyframeValue:forIndex:")] + void SetKeyframeValue (NSObject value, nuint index); - [Export ("setKeyframeValue:time:forIndex:")] - void SetKeyframeValue (NSObject value, nfloat time, nuint index); + [Export ("setKeyframeTime:forIndex:")] + void SetKeyframeTime (nfloat time, nuint index); - [Export ("getKeyframeValueForIndex:")] - NSObject GetKeyframeValue (nuint index); + [Export ("setKeyframeValue:time:forIndex:")] + void SetKeyframeValue (NSObject value, nfloat time, nuint index); - [Export ("getKeyframeTimeForIndex:")] - nfloat GetKeyframeTime (nuint index); + [Export ("getKeyframeValueForIndex:")] + NSObject GetKeyframeValue (nuint index); - [Export ("sampleAtTime:")] - [return: NullAllowed] - NSObject SampleAtTime (nfloat time); + [Export ("getKeyframeTimeForIndex:")] + nfloat GetKeyframeTime (nuint index); - [Export ("interpolationMode")] - SKInterpolationMode InterpolationMode { get; set; } + [Export ("sampleAtTime:")] + [return: NullAllowed] + NSObject SampleAtTime (nfloat time); - [Export ("repeatMode")] - SKRepeatMode RepeatMode { get; set; } - } + [Export ("interpolationMode")] + SKInterpolationMode InterpolationMode { get; set; } - /// A that produces colored and textured particles. - /// - /// Emitted particles are not directly accessible to the application developer; their behavior can be controlled either via the creation parameters configurable in or by a . - /// - /// Apple documentation for SKEmitterNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKEmitterNode { + [Export ("repeatMode")] + SKRepeatMode RepeatMode { get; set; } +} - [Export ("advanceSimulationTime:")] - void AdvanceSimulationTime (double sec); +/// A that produces colored and textured particles. +/// +/// Emitted particles are not directly accessible to the application developer; their behavior can be controlled either via the creation parameters configurable in or by a . +/// +/// Apple documentation for SKEmitterNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKEmitterNode { - [Export ("resetSimulation")] - void ResetSimulation (); + [Export ("advanceSimulationTime:")] + void AdvanceSimulationTime (double sec); - [NullAllowed] // by default this property is null - [Export ("particleTexture", ArgumentSemantic.Retain)] - SKTexture ParticleTexture { get; set; } + [Export ("resetSimulation")] + void ResetSimulation (); - [Export ("particleZPosition")] - nfloat ParticleZPosition { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleTexture", ArgumentSemantic.Retain)] + SKTexture ParticleTexture { get; set; } - [Deprecated (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.TvOS, 8, 0)] - [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("particleZPositionRange")] - nfloat ParticleZPositionRange { get; set; } + [Export ("particleZPosition")] + nfloat ParticleZPosition { get; set; } - [Export ("particleBlendMode")] - SKBlendMode ParticleBlendMode { get; set; } + [Deprecated (PlatformName.iOS, 8, 0)] + [Deprecated (PlatformName.TvOS, 8, 0)] + [Deprecated (PlatformName.MacOSX, 10, 10)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("particleZPositionRange")] + nfloat ParticleZPositionRange { get; set; } - [Export ("particleColor", ArgumentSemantic.Retain)] - UIColor ParticleColor { get; set; } + [Export ("particleBlendMode")] + SKBlendMode ParticleBlendMode { get; set; } - [Export ("particleColorRedRange")] - nfloat ParticleColorRedRange { get; set; } + [Export ("particleColor", ArgumentSemantic.Retain)] + UIColor ParticleColor { get; set; } - [Export ("particleColorGreenRange")] - nfloat ParticleColorGreenRange { get; set; } + [Export ("particleColorRedRange")] + nfloat ParticleColorRedRange { get; set; } - [Export ("particleColorBlueRange")] - nfloat ParticleColorBlueRange { get; set; } + [Export ("particleColorGreenRange")] + nfloat ParticleColorGreenRange { get; set; } - [Export ("particleColorAlphaRange")] - nfloat ParticleColorAlphaRange { get; set; } + [Export ("particleColorBlueRange")] + nfloat ParticleColorBlueRange { get; set; } - [Export ("particleColorRedSpeed")] - nfloat ParticleColorRedSpeed { get; set; } + [Export ("particleColorAlphaRange")] + nfloat ParticleColorAlphaRange { get; set; } - [Export ("particleColorGreenSpeed")] - nfloat ParticleColorGreenSpeed { get; set; } + [Export ("particleColorRedSpeed")] + nfloat ParticleColorRedSpeed { get; set; } - [Export ("particleColorBlueSpeed")] - nfloat ParticleColorBlueSpeed { get; set; } + [Export ("particleColorGreenSpeed")] + nfloat ParticleColorGreenSpeed { get; set; } - [Export ("particleColorAlphaSpeed")] - nfloat ParticleColorAlphaSpeed { get; set; } + [Export ("particleColorBlueSpeed")] + nfloat ParticleColorBlueSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleColorSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleColorSequence { get; set; } + [Export ("particleColorAlphaSpeed")] + nfloat ParticleColorAlphaSpeed { get; set; } - [Export ("particleColorBlendFactor")] - nfloat ParticleColorBlendFactor { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleColorSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleColorSequence { get; set; } - [Export ("particleColorBlendFactorRange")] - nfloat ParticleColorBlendFactorRange { get; set; } + [Export ("particleColorBlendFactor")] + nfloat ParticleColorBlendFactor { get; set; } - [Export ("particleColorBlendFactorSpeed")] - nfloat ParticleColorBlendFactorSpeed { get; set; } + [Export ("particleColorBlendFactorRange")] + nfloat ParticleColorBlendFactorRange { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleColorBlendFactorSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleColorBlendFactorSequence { get; set; } + [Export ("particleColorBlendFactorSpeed")] + nfloat ParticleColorBlendFactorSpeed { get; set; } - [Export ("particlePosition")] - CGPoint ParticlePosition { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleColorBlendFactorSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleColorBlendFactorSequence { get; set; } - [Export ("particlePositionRange")] - CGVector ParticlePositionRange { get; set; } + [Export ("particlePosition")] + CGPoint ParticlePosition { get; set; } - [Export ("particleSpeed")] - nfloat ParticleSpeed { get; set; } + [Export ("particlePositionRange")] + CGVector ParticlePositionRange { get; set; } - [Export ("particleSpeedRange")] - nfloat ParticleSpeedRange { get; set; } + [Export ("particleSpeed")] + nfloat ParticleSpeed { get; set; } - [Export ("emissionAngle")] - nfloat EmissionAngle { get; set; } + [Export ("particleSpeedRange")] + nfloat ParticleSpeedRange { get; set; } - [Export ("emissionAngleRange")] - nfloat EmissionAngleRange { get; set; } + [Export ("emissionAngle")] + nfloat EmissionAngle { get; set; } - [Export ("xAcceleration")] - nfloat XAcceleration { get; set; } + [Export ("emissionAngleRange")] + nfloat EmissionAngleRange { get; set; } - [Export ("yAcceleration")] - nfloat YAcceleration { get; set; } + [Export ("xAcceleration")] + nfloat XAcceleration { get; set; } - [Export ("particleBirthRate")] - nfloat ParticleBirthRate { get; set; } + [Export ("yAcceleration")] + nfloat YAcceleration { get; set; } - [Export ("numParticlesToEmit")] - nuint NumParticlesToEmit { get; set; } + [Export ("particleBirthRate")] + nfloat ParticleBirthRate { get; set; } - [Export ("particleLifetime")] - nfloat ParticleLifetime { get; set; } + [Export ("numParticlesToEmit")] + nuint NumParticlesToEmit { get; set; } - [Export ("particleLifetimeRange")] - nfloat ParticleLifetimeRange { get; set; } + [Export ("particleLifetime")] + nfloat ParticleLifetime { get; set; } - [Export ("particleRotation")] - nfloat ParticleRotation { get; set; } + [Export ("particleLifetimeRange")] + nfloat ParticleLifetimeRange { get; set; } - [Export ("particleRotationRange")] - nfloat ParticleRotationRange { get; set; } + [Export ("particleRotation")] + nfloat ParticleRotation { get; set; } - [Export ("particleRotationSpeed")] - nfloat ParticleRotationSpeed { get; set; } + [Export ("particleRotationRange")] + nfloat ParticleRotationRange { get; set; } - [Export ("particleSize")] - CGSize ParticleSize { get; set; } + [Export ("particleRotationSpeed")] + nfloat ParticleRotationSpeed { get; set; } - [Export ("particleScale")] - nfloat ParticleScale { get; set; } + [Export ("particleSize")] + CGSize ParticleSize { get; set; } - [Export ("particleScaleRange")] - nfloat ParticleScaleRange { get; set; } + [Export ("particleScale")] + nfloat ParticleScale { get; set; } - [Export ("particleScaleSpeed")] - nfloat ParticleScaleSpeed { get; set; } + [Export ("particleScaleRange")] + nfloat ParticleScaleRange { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleScaleSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleScaleSequence { get; set; } + [Export ("particleScaleSpeed")] + nfloat ParticleScaleSpeed { get; set; } - [Export ("particleAlpha")] - nfloat ParticleAlpha { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleScaleSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleScaleSequence { get; set; } - [Export ("particleAlphaRange")] - nfloat ParticleAlphaRange { get; set; } + [Export ("particleAlpha")] + nfloat ParticleAlpha { get; set; } - [Export ("particleAlphaSpeed")] - nfloat ParticleAlphaSpeed { get; set; } + [Export ("particleAlphaRange")] + nfloat ParticleAlphaRange { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleAlphaSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleAlphaSequence { get; set; } + [Export ("particleAlphaSpeed")] + nfloat ParticleAlphaSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleAction", ArgumentSemantic.Copy)] - SKAction ParticleAction { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleAlphaSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleAlphaSequence { get; set; } - [NullAllowed] // by default this property is null - [Export ("targetNode", ArgumentSemantic.Weak)] - SKNode TargetNode { get; set; } - - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("fieldBitMask")] - uint FieldBitMask { get; set; } /* uint32_t */ - - [Deprecated (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.TvOS, 8, 0)] - [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("particleZPositionSpeed")] - nfloat ParticleZPositionSpeed { get; set; } - - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleAction", ArgumentSemantic.Copy)] + SKAction ParticleAction { get; set; } - [MacCatalyst (13, 1)] - [Export ("particleRenderOrder", ArgumentSemantic.Assign)] - SKParticleRenderOrder ParticleRenderOrder { get; set; } + [NullAllowed] // by default this property is null + [Export ("targetNode", ArgumentSemantic.Weak)] + SKNode TargetNode { get; set; } - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [Export ("fieldBitMask")] + uint FieldBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [Deprecated (PlatformName.iOS, 8, 0)] + [Deprecated (PlatformName.TvOS, 8, 0)] + [Deprecated (PlatformName.MacOSX, 10, 10)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("particleZPositionSpeed")] + nfloat ParticleZPositionSpeed { get; set; } - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - /// A defined by a Core Graphics . - /// - /// Apple documentation for SKShapeNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKShapeNode { + [Export ("particleRenderOrder", ArgumentSemantic.Assign)] + SKParticleRenderOrder ParticleRenderOrder { get; set; } - [NullAllowed] - [Export ("path")] - CGPath Path { get; set; } + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [Export ("strokeColor", ArgumentSemantic.Retain)] - UIColor StrokeColor { get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [Export ("fillColor", ArgumentSemantic.Retain)] - UIColor FillColor { get; set; } + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } +/// A defined by a Core Graphics . +/// +/// Apple documentation for SKShapeNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKShapeNode { - [Export ("antialiased")] - bool Antialiased { [Bind ("isAntialiased")] get; set; } + [NullAllowed] + [Export ("path")] + CGPath Path { get; set; } - [Export ("lineWidth")] - nfloat LineWidth { get; set; } + [Export ("strokeColor", ArgumentSemantic.Retain)] + UIColor StrokeColor { get; set; } - [Export ("glowWidth")] - nfloat GlowWidth { get; set; } + [Export ("fillColor", ArgumentSemantic.Retain)] + UIColor FillColor { get; set; } - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("fillTexture", ArgumentSemantic.Retain)] - SKTexture FillTexture { get; set; } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("fillShader", ArgumentSemantic.Retain)] - SKShader FillShader { get; set; } + [Export ("antialiased")] + bool Antialiased { [Bind ("isAntialiased")] get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("strokeTexture", ArgumentSemantic.Retain)] - SKTexture StrokeTexture { get; set; } + [Export ("lineWidth")] + nfloat LineWidth { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("strokeShader", ArgumentSemantic.Retain)] - SKShader StrokeShader { get; set; } - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPath:")] - SKShapeNode FromPath (CGPath path); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPath:centered:")] - SKShapeNode FromPath (CGPath path, bool centered); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRect:")] - SKShapeNode FromRect (CGRect rect); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRectOfSize:")] - SKShapeNode FromRect (CGSize size); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRect:cornerRadius:")] - SKShapeNode FromRect (CGRect rect, nfloat cornerRadius); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRectOfSize:cornerRadius:")] - SKShapeNode FromRect (CGSize size, nfloat cornerRadius); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithCircleOfRadius:")] - SKShapeNode FromCircle (nfloat radius); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithEllipseInRect:")] - SKShapeNode FromEllipse (CGRect rect); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithEllipseOfSize:")] - SKShapeNode FromEllipse (CGSize size); - - // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 - [Internal] - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPoints:count:")] - SKShapeNode FromPoints (ref CGPoint points, nuint numPoints); - - // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 - [Internal] - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithSplinePoints:count:")] - SKShapeNode FromSplinePoints (ref CGPoint points, nuint numPoints); - - [MacCatalyst (13, 1)] - [Export ("lineCap")] - CGLineCap LineCap { get; set; } - - [MacCatalyst (13, 1)] - [Export ("lineJoin")] - CGLineJoin LineJoin { get; set; } - - [MacCatalyst (13, 1)] - [Export ("miterLimit")] - nfloat MiterLimit { get; set; } - - [MacCatalyst (13, 1)] - [Export ("lineLength")] - nfloat LineLength { get; } - - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } - - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); - - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [Export ("glowWidth")] + nfloat GlowWidth { get; set; } - /// A range of motion used with inverse kinematics. - /// - /// Apple documentation for SKReachConstraints + // + // iOS 8 + // [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKReachConstraints : NSSecureCoding { - [DesignatedInitializer] - [Export ("initWithLowerAngleLimit:upperAngleLimit:")] - NativeHandle Constructor (nfloat lowerAngleLimit, nfloat upperAngleLimit); + [NullAllowed] // by default this property is null + [Export ("fillTexture", ArgumentSemantic.Retain)] + SKTexture FillTexture { get; set; } - [Export ("lowerAngleLimit", ArgumentSemantic.UnsafeUnretained)] - nfloat LowerAngleLimit { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("fillShader", ArgumentSemantic.Retain)] + SKShader FillShader { get; set; } - [Export ("upperAngleLimit", ArgumentSemantic.UnsafeUnretained)] - nfloat UpperAngleLimit { get; set; } - } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("strokeTexture", ArgumentSemantic.Retain)] + SKTexture StrokeTexture { get; set; } - /// A path-defined area. Typically used for hit-testing and physics-field extents. - /// - /// Apple documentation for SKRegion [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKRegion : NSCopying, NSSecureCoding { - [Export ("initWithRadius:")] - NativeHandle Constructor (float /* float, not CGFloat */ radius); + [NullAllowed] // by default this property is null + [Export ("strokeShader", ArgumentSemantic.Retain)] + SKShader StrokeShader { get; set; } - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithPath:")] + SKShapeNode FromPath (CGPath path); - [Export ("initWithPath:")] - NativeHandle Constructor (CGPath path); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithPath:centered:")] + SKShapeNode FromPath (CGPath path, bool centered); - [Export ("path")] - [NullAllowed] - CGPath Path { get; } + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRect:")] + SKShapeNode FromRect (CGRect rect); - [Static, Export ("infiniteRegion")] - SKRegion InfiniteRegion { get; } + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRectOfSize:")] + SKShapeNode FromRect (CGSize size); - [Export ("inverseRegion")] - SKRegion InverseRegion (); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRect:cornerRadius:")] + SKShapeNode FromRect (CGRect rect, nfloat cornerRadius); - [Export ("regionByUnionWithRegion:")] - SKRegion CreateUnion (SKRegion region); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRectOfSize:cornerRadius:")] + SKShapeNode FromRect (CGSize size, nfloat cornerRadius); - [Export ("regionByDifferenceFromRegion:")] - SKRegion CreateDifference (SKRegion region); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithCircleOfRadius:")] + SKShapeNode FromCircle (nfloat radius); - [Export ("regionByIntersectionWithRegion:")] - SKRegion CreateIntersection (SKRegion region); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithEllipseInRect:")] + SKShapeNode FromEllipse (CGRect rect); - [Export ("containsPoint:")] - bool ContainsPoint (CGPoint point); - } + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithEllipseOfSize:")] + SKShapeNode FromEllipse (CGSize size); - /// A that displays a string. - /// - /// Apple documentation for SKLabelNode + // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 + [Internal] [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKLabelNode { + [Static, Export ("shapeNodeWithPoints:count:")] + SKShapeNode FromPoints (ref CGPoint points, nuint numPoints); - [Static, Export ("labelNodeWithFontNamed:")] - SKLabelNode FromFont ([NullAllowed] string fontName); + // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 + [Internal] + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithSplinePoints:count:")] + SKShapeNode FromSplinePoints (ref CGPoint points, nuint numPoints); - [Export ("initWithFontNamed:")] - NativeHandle Constructor ([NullAllowed] string fontName); + [MacCatalyst (13, 1)] + [Export ("lineCap")] + CGLineCap LineCap { get; set; } - [MacCatalyst (13, 1)] - [Static, Export ("labelNodeWithText:")] - SKLabelNode FromText ([NullAllowed] string text); + [MacCatalyst (13, 1)] + [Export ("lineJoin")] + CGLineJoin LineJoin { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("labelNodeWithAttributedText:")] - SKLabelNode FromText ([NullAllowed] NSAttributedString attributedText); + [MacCatalyst (13, 1)] + [Export ("miterLimit")] + nfloat MiterLimit { get; set; } - [Export ("verticalAlignmentMode")] - SKLabelVerticalAlignmentMode VerticalAlignmentMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("lineLength")] + nfloat LineLength { get; } - [Export ("horizontalAlignmentMode")] - SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [MacCatalyst (13, 1)] - [Export ("numberOfLines")] - nint NumberOfLines { get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [MacCatalyst (13, 1)] - [Export ("lineBreakMode", ArgumentSemantic.Assign)] - NSLineBreakMode LineBreakMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [MacCatalyst (13, 1)] - [Export ("preferredMaxLayoutWidth")] - nfloat PreferredMaxLayoutWidth { get; set; } +/// A range of motion used with inverse kinematics. +/// +/// Apple documentation for SKReachConstraints +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKReachConstraints : NSSecureCoding { + [DesignatedInitializer] + [Export ("initWithLowerAngleLimit:upperAngleLimit:")] + NativeHandle Constructor (nfloat lowerAngleLimit, nfloat upperAngleLimit); + + [Export ("lowerAngleLimit", ArgumentSemantic.UnsafeUnretained)] + nfloat LowerAngleLimit { get; set; } + + [Export ("upperAngleLimit", ArgumentSemantic.UnsafeUnretained)] + nfloat UpperAngleLimit { get; set; } +} - [Export ("fontName", ArgumentSemantic.Copy)] - [NullAllowed] - string FontName { get; set; } +/// A path-defined area. Typically used for hit-testing and physics-field extents. +/// +/// Apple documentation for SKRegion +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKRegion : NSCopying, NSSecureCoding { + [Export ("initWithRadius:")] + NativeHandle Constructor (float /* float, not CGFloat */ radius); - [Export ("text", ArgumentSemantic.Copy)] - [NullAllowed] // nullable in Xcode7 headers and caught by introspection tests - string Text { get; set; } + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] - NSAttributedString AttributedText { get; set; } + [Export ("initWithPath:")] + NativeHandle Constructor (CGPath path); - [Export ("fontSize")] - nfloat FontSize { get; set; } + [Export ("path")] + [NullAllowed] + CGPath Path { get; } - [Export ("fontColor", ArgumentSemantic.Retain)] - [NullAllowed] - UIColor FontColor { get; set; } + [Static, Export ("infiniteRegion")] + SKRegion InfiniteRegion { get; } - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("inverseRegion")] + SKRegion InverseRegion (); - [NullAllowed] // by default this property is null - [Export ("color", ArgumentSemantic.Retain)] - UIColor Color { get; set; } + [Export ("regionByUnionWithRegion:")] + SKRegion CreateUnion (SKRegion region); - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } - } + [Export ("regionByDifferenceFromRegion:")] + SKRegion CreateDifference (SKRegion region); + + [Export ("regionByIntersectionWithRegion:")] + SKRegion CreateIntersection (SKRegion region); + + [Export ("containsPoint:")] + bool ContainsPoint (CGPoint point); +} + +/// A that displays a string. +/// +/// Apple documentation for SKLabelNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKLabelNode { + + [Static, Export ("labelNodeWithFontNamed:")] + SKLabelNode FromFont ([NullAllowed] string fontName); + + [Export ("initWithFontNamed:")] + NativeHandle Constructor ([NullAllowed] string fontName); - /// A node that creates a lighting effect within a scene. - /// - /// Apple documentation for SKLightNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKLightNode { - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } + [Static, Export ("labelNodeWithText:")] + SKLabelNode FromText ([NullAllowed] string text); - [Export ("lightColor")] - UIColor LightColor { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("labelNodeWithAttributedText:")] + SKLabelNode FromText ([NullAllowed] NSAttributedString attributedText); - [Export ("ambientColor")] - UIColor AmbientColor { get; set; } + [Export ("verticalAlignmentMode")] + SKLabelVerticalAlignmentMode VerticalAlignmentMode { get; set; } - [Export ("shadowColor")] - UIColor ShadowColor { get; set; } + [Export ("horizontalAlignmentMode")] + SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get; set; } - [Export ("falloff")] - nfloat Falloff { get; set; } + [MacCatalyst (13, 1)] + [Export ("numberOfLines")] + nint NumberOfLines { get; set; } - [Export ("categoryBitMask")] - uint CategoryBitMask { get; set; } /* uint32_t */ - } + [MacCatalyst (13, 1)] + [Export ("lineBreakMode", ArgumentSemantic.Assign)] + NSLineBreakMode LineBreakMode { get; set; } - /// A that displays video. - /// - /// Apple documentation for SKVideoNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKVideoNode { + [Export ("preferredMaxLayoutWidth")] + nfloat PreferredMaxLayoutWidth { get; set; } -#if WATCH - [Static, Export ("videoNodeWithFileNamed:")] - SKVideoNode VideoNodeWithFileNamed (string videoFile); + [Export ("fontName", ArgumentSemantic.Copy)] + [NullAllowed] + string FontName { get; set; } - [Static, Export ("videoNodeWithURL:")] - SKVideoNode VideoNodeWithURL (NSUrl videoURL); + [Export ("text", ArgumentSemantic.Copy)] + [NullAllowed] // nullable in Xcode7 headers and caught by introspection tests + string Text { get; set; } - [DesignatedInitializer] - [Export ("initWithFileNamed:")] - NativeHandle Constructor (string videoFile); + [MacCatalyst (13, 1)] + [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] + NSAttributedString AttributedText { get; set; } - [DesignatedInitializer] - [Export ("initWithURL:")] - NativeHandle Constructor (NSUrl url); -#else - [Static, Export ("videoNodeWithAVPlayer:")] - SKVideoNode FromPlayer (AVPlayer player); + [Export ("fontSize")] + nfloat FontSize { get; set; } - [Static, Export ("videoNodeWithVideoFileNamed:"), Internal] - SKVideoNode VideoNodeWithVideoFileNamed (string videoFile); + [Export ("fontColor", ArgumentSemantic.Retain)] + [NullAllowed] + UIColor FontColor { get; set; } - [Static, Export ("videoNodeWithFileNamed:"), Internal] - SKVideoNode VideoNodeWithFileNamed (string videoFile); + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Static, Export ("videoNodeWithVideoURL:"), Internal] - SKVideoNode VideoNodeWithVideoURL (NSUrl videoURL); + [NullAllowed] // by default this property is null + [Export ("color", ArgumentSemantic.Retain)] + UIColor Color { get; set; } - [Static, Export ("videoNodeWithURL:"), Internal] - SKVideoNode VideoNodeWithURL (NSUrl videoURL); + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } +} - [DesignatedInitializer] - [Export ("initWithAVPlayer:")] - NativeHandle Constructor (AVPlayer player); +/// A node that creates a lighting effect within a scene. +/// +/// Apple documentation for SKLightNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKLightNode { + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } - [Export ("initWithVideoFileNamed:"), Internal] - IntPtr InitWithVideoFileNamed (string videoFile); + [Export ("lightColor")] + UIColor LightColor { get; set; } - [Export ("initWithFileNamed:"), Internal] - IntPtr InitWithFileNamed (string videoFile); + [Export ("ambientColor")] + UIColor AmbientColor { get; set; } - [Export ("initWithVideoURL:"), Internal] - IntPtr InitWithVideoURL (NSUrl url); + [Export ("shadowColor")] + UIColor ShadowColor { get; set; } - [Export ("initWithURL:"), Internal] - IntPtr InitWithURL (NSUrl url); -#endif + [Export ("falloff")] + nfloat Falloff { get; set; } - [Export ("play")] - void Play (); + [Export ("categoryBitMask")] + uint CategoryBitMask { get; set; } /* uint32_t */ +} - [Export ("pause")] - void Pause (); +/// A that displays video. +/// +/// Apple documentation for SKVideoNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKVideoNode { + [Static, Export ("videoNodeWithAVPlayer:")] + SKVideoNode FromPlayer (AVPlayer player); - [Export ("size")] - CGSize Size { get; set; } + [Static, Export ("videoNodeWithVideoFileNamed:"), Internal] + SKVideoNode VideoNodeWithVideoFileNamed (string videoFile); - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } - } + [Static, Export ("videoNodeWithFileNamed:"), Internal] + SKVideoNode VideoNodeWithFileNamed (string videoFile); - /// Mathematical constraint on a node's position or orientation. - /// - /// Apple documentation for SKConstraint - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKConstraint : NSSecureCoding, NSCopying { - [Export ("enabled")] - bool Enabled { get; set; } + [Static, Export ("videoNodeWithVideoURL:"), Internal] + SKVideoNode VideoNodeWithVideoURL (NSUrl videoURL); - [NullAllowed] // by default this property is null - [Export ("referenceNode", ArgumentSemantic.Retain)] - SKNode ReferenceNode { get; set; } + [Static, Export ("videoNodeWithURL:"), Internal] + SKVideoNode VideoNodeWithURL (NSUrl videoURL); - [Static, Export ("positionX:")] - SKConstraint CreateXRestriction (SKRange range); + [DesignatedInitializer] + [Export ("initWithAVPlayer:")] + NativeHandle Constructor (AVPlayer player); - [Static, Export ("positionY:")] - SKConstraint CreateYRestriction (SKRange range); + [Export ("initWithVideoFileNamed:"), Internal] + IntPtr InitWithVideoFileNamed (string videoFile); - [Static, Export ("positionX:Y:")] - SKConstraint CreateRestriction (SKRange xRange, SKRange yRange); + [Export ("initWithFileNamed:"), Internal] + IntPtr InitWithFileNamed (string videoFile); - [Static, Export ("distance:toNode:")] - SKConstraint CreateDistance (SKRange range, SKNode node); + [Export ("initWithVideoURL:"), Internal] + IntPtr InitWithVideoURL (NSUrl url); - [Static, Export ("distance:toPoint:")] - SKConstraint CreateDistance (SKRange range, CGPoint point); + [Export ("initWithURL:"), Internal] + IntPtr InitWithURL (NSUrl url); - [Static, Export ("distance:toPoint:inNode:")] - SKConstraint CreateDistance (SKRange range, CGPoint point, SKNode node); + [Export ("play")] + void Play (); - [Static, Export ("zRotation:")] - SKConstraint CreateZRotation (SKRange zRange); + [Export ("pause")] + void Pause (); - [Static, Export ("orientToNode:offset:")] - SKConstraint CreateOrientToNode (SKNode node, SKRange radians); + [Export ("size")] + CGSize Size { get; set; } - [Static, Export ("orientToPoint:offset:")] - SKConstraint CreateOrientToPoint (CGPoint point, SKRange radians); + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } +} - [Static, Export ("orientToPoint:inNode:offset:")] - SKConstraint CreateOrientToPoint (CGPoint point, SKNode node, SKRange radians); - } +/// Mathematical constraint on a node's position or orientation. +/// +/// Apple documentation for SKConstraint +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKConstraint : NSSecureCoding, NSCopying { + [Export ("enabled")] + bool Enabled { get; set; } - /// A node that masks its children's pixels. - /// - /// An masks pixels outside of the area defined by its node. Pixels that fall outside of that area are not passed up towards the root of the . - /// - /// - /// Apple documentation for SKCropNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKCropNode { + [NullAllowed] // by default this property is null + [Export ("referenceNode", ArgumentSemantic.Retain)] + SKNode ReferenceNode { get; set; } - [NullAllowed] // by default this property is null - [Export ("maskNode", ArgumentSemantic.Retain)] - SKNode MaskNode { get; set; } - } + [Static, Export ("positionX:")] + SKConstraint CreateXRestriction (SKRange range); - /// A that displays a . - /// - /// Application developers should note the availability of debugging properties, such as . - /// - /// Apple documentation for SKView - [NoWatch] - [MacCatalyst (13, 1)] - [BaseType (typeof (UIView))] - [DisableDefaultCtor] -#if MONOMAC - partial interface SKView : NSSecureCoding { -#else - partial interface SKView { -#endif - [Export ("initWithFrame:")] - NativeHandle Constructor (CGRect frame); + [Static, Export ("positionY:")] + SKConstraint CreateYRestriction (SKRange range); - [Export ("paused")] - bool Paused { [Bind ("isPaused")] get; set; } + [Static, Export ("positionX:Y:")] + SKConstraint CreateRestriction (SKRange xRange, SKRange yRange); - [Export ("showsFPS")] - bool ShowsFPS { get; set; } + [Static, Export ("distance:toNode:")] + SKConstraint CreateDistance (SKRange range, SKNode node); - [Export ("showsDrawCount")] - bool ShowsDrawCount { get; set; } + [Static, Export ("distance:toPoint:")] + SKConstraint CreateDistance (SKRange range, CGPoint point); - [Export ("showsNodeCount")] - bool ShowsNodeCount { get; set; } + [Static, Export ("distance:toPoint:inNode:")] + SKConstraint CreateDistance (SKRange range, CGPoint point, SKNode node); - [MacCatalyst (13, 1)] - [Export ("showsPhysics")] - bool ShowsPhysics { get; set; } + [Static, Export ("zRotation:")] + SKConstraint CreateZRotation (SKRange zRange); - [Export ("asynchronous")] - bool Asynchronous { [Bind ("isAsynchronous")] get; set; } + [Static, Export ("orientToNode:offset:")] + SKConstraint CreateOrientToNode (SKNode node, SKRange radians); - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("frameInterval")] - nint FrameInterval { get; set; } + [Static, Export ("orientToPoint:offset:")] + SKConstraint CreateOrientToPoint (CGPoint point, SKRange radians); - [Export ("presentScene:")] - void PresentScene ([NullAllowed] SKScene scene); + [Static, Export ("orientToPoint:inNode:offset:")] + SKConstraint CreateOrientToPoint (CGPoint point, SKNode node, SKRange radians); +} - [Export ("presentScene:transition:")] - void PresentScene (SKScene scene, SKTransition transition); +/// A node that masks its children's pixels. +/// +/// An masks pixels outside of the area defined by its node. Pixels that fall outside of that area are not passed up towards the root of the . +/// +/// +/// Apple documentation for SKCropNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKCropNode { + + [NullAllowed] // by default this property is null + [Export ("maskNode", ArgumentSemantic.Retain)] + SKNode MaskNode { get; set; } +} - [Export ("scene")] - [NullAllowed] - SKScene Scene { get; } +/// A that displays a . +/// +/// Application developers should note the availability of debugging properties, such as . +/// +/// Apple documentation for SKView +[MacCatalyst (13, 1)] +[BaseType (typeof (UIView))] +[DisableDefaultCtor] +#if MONOMAC + partial interface SKView : NSSecureCoding { +#else +partial interface SKView { +#endif + [Export ("initWithFrame:")] + NativeHandle Constructor (CGRect frame); - [Export ("textureFromNode:")] - [return: NullAllowed] - SKTexture TextureFromNode (SKNode node); + [Export ("paused")] + bool Paused { [Bind ("isPaused")] get; set; } - [Export ("convertPoint:toScene:")] - CGPoint ConvertPointToScene (CGPoint point, SKScene scene); + [Export ("showsFPS")] + bool ShowsFPS { get; set; } - [Export ("convertPoint:fromScene:")] - CGPoint ConvertPointFromScene (CGPoint point, SKScene scene); + [Export ("showsDrawCount")] + bool ShowsDrawCount { get; set; } - [Export ("ignoresSiblingOrder")] - bool IgnoresSiblingOrder { get; set; } + [Export ("showsNodeCount")] + bool ShowsNodeCount { get; set; } - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("allowsTransparency")] - bool AllowsTransparency { get; set; } + [MacCatalyst (13, 1)] + [Export ("showsPhysics")] + bool ShowsPhysics { get; set; } - [MacCatalyst (13, 1)] - [Export ("shouldCullNonVisibleNodes")] - bool ShouldCullNonVisibleNodes { get; set; } + [Export ("asynchronous")] + bool Asynchronous { [Bind ("isAsynchronous")] get; set; } - [MacCatalyst (13, 1)] - [Export ("showsFields")] - bool ShowsFields { get; set; } + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("frameInterval")] + nint FrameInterval { get; set; } - [MacCatalyst (13, 1)] - [Export ("showsQuadCount")] - bool ShowsQuadCount { get; set; } + [Export ("presentScene:")] + void PresentScene ([NullAllowed] SKScene scene); - [MacCatalyst (13, 1)] - [Export ("textureFromNode:crop:")] - [return: NullAllowed] - SKTexture TextureFromNode (SKNode node, CGRect crop); + [Export ("presentScene:transition:")] + void PresentScene (SKScene scene, SKTransition transition); - [MacCatalyst (13, 1)] - [Export ("preferredFramesPerSecond")] - nint PreferredFramesPerSecond { get; set; } + [Export ("scene")] + [NullAllowed] + SKScene Scene { get; } - [MacCatalyst (13, 1)] - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - ISKViewDelegate Delegate { get; set; } + [Export ("textureFromNode:")] + [return: NullAllowed] + SKTexture TextureFromNode (SKNode node); - [iOS (14, 0)] - [TV (14, 0)] - [MacCatalyst (14, 0)] - [Export ("disableDepthStencilBuffer")] - bool DisableDepthStencilBuffer { get; set; } - } + [Export ("convertPoint:toScene:")] + CGPoint ConvertPointToScene (CGPoint point, SKScene scene); - /// Interface representing the required methods (if any) of the protocol . - /// - /// This interface contains the required methods (if any) from the protocol defined by . - /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. - /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. - /// - interface ISKViewDelegate { } + [Export ("convertPoint:fromScene:")] + CGPoint ConvertPointFromScene (CGPoint point, SKScene scene); - /// Delegate object for objects, allowing the developer to control the frame rate. - /// - /// Apple documentation for SKViewDelegate - [NoWatch] - [MacCatalyst (13, 1)] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface SKViewDelegate { - [Export ("view:shouldRenderAtTime:")] - bool ShouldRender (SKView view, double time); - } + [Export ("ignoresSiblingOrder")] + bool IgnoresSiblingOrder { get; set; } - /// Transitions that can be used between s. Used with the method. - /// - /// Apple documentation for SKTransition + // + // iOS 8 + // [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - partial interface SKTransition : NSCopying { + [Export ("allowsTransparency")] + bool AllowsTransparency { get; set; } - [Static, Export ("crossFadeWithDuration:")] - SKTransition CrossFadeWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("shouldCullNonVisibleNodes")] + bool ShouldCullNonVisibleNodes { get; set; } - [Static, Export ("fadeWithDuration:")] - SKTransition FadeWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("showsFields")] + bool ShowsFields { get; set; } - [Static, Export ("fadeWithColor:duration:")] - SKTransition FadeWithColor (UIColor color, double sec); + [MacCatalyst (13, 1)] + [Export ("showsQuadCount")] + bool ShowsQuadCount { get; set; } - [Static, Export ("flipHorizontalWithDuration:")] - SKTransition FlipHorizontalWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("textureFromNode:crop:")] + [return: NullAllowed] + SKTexture TextureFromNode (SKNode node, CGRect crop); - [Static, Export ("flipVerticalWithDuration:")] - SKTransition FlipVerticalWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("preferredFramesPerSecond")] + nint PreferredFramesPerSecond { get; set; } - [Static, Export ("revealWithDirection:duration:")] - SKTransition RevealWithDirection (SKTransitionDirection direction, double sec); + [MacCatalyst (13, 1)] + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + ISKViewDelegate Delegate { get; set; } + + [iOS (14, 0)] + [TV (14, 0)] + [MacCatalyst (14, 0)] + [Export ("disableDepthStencilBuffer")] + bool DisableDepthStencilBuffer { get; set; } +} - [Static, Export ("moveInWithDirection:duration:")] - SKTransition MoveInWithDirection (SKTransitionDirection direction, double sec); +/// Interface representing the required methods (if any) of the protocol . +/// +/// This interface contains the required methods (if any) from the protocol defined by . +/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. +/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. +/// +interface ISKViewDelegate { } + +/// Delegate object for objects, allowing the developer to control the frame rate. +/// +/// Apple documentation for SKViewDelegate +[MacCatalyst (13, 1)] +[Protocol, Model] +[BaseType (typeof (NSObject))] +interface SKViewDelegate { + [Export ("view:shouldRenderAtTime:")] + bool ShouldRender (SKView view, double time); +} - [Static, Export ("pushWithDirection:duration:")] - SKTransition PushWithDirection (SKTransitionDirection direction, double sec); +/// Transitions that can be used between s. Used with the method. +/// +/// Apple documentation for SKTransition +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +partial interface SKTransition : NSCopying { - [Static, Export ("doorsOpenHorizontalWithDuration:")] - SKTransition DoorsOpenHorizontalWithDuration (double sec); + [Static, Export ("crossFadeWithDuration:")] + SKTransition CrossFadeWithDuration (double sec); - [Static, Export ("doorsOpenVerticalWithDuration:")] - SKTransition DoorsOpenVerticalWithDuration (double sec); + [Static, Export ("fadeWithDuration:")] + SKTransition FadeWithDuration (double sec); - [Static, Export ("doorsCloseHorizontalWithDuration:")] - SKTransition DoorsCloseHorizontalWithDuration (double sec); + [Static, Export ("fadeWithColor:duration:")] + SKTransition FadeWithColor (UIColor color, double sec); - [Static, Export ("doorsCloseVerticalWithDuration:")] - SKTransition DoorsCloseVerticalWithDuration (double sec); + [Static, Export ("flipHorizontalWithDuration:")] + SKTransition FlipHorizontalWithDuration (double sec); - [Static, Export ("doorwayWithDuration:")] - SKTransition DoorwayWithDuration (double sec); + [Static, Export ("flipVerticalWithDuration:")] + SKTransition FlipVerticalWithDuration (double sec); - [NoWatch] - [MacCatalyst (13, 1)] - [Static, Export ("transitionWithCIFilter:duration:")] - SKTransition TransitionWithCIFilter (CIFilter filter, double sec); + [Static, Export ("revealWithDirection:duration:")] + SKTransition RevealWithDirection (SKTransitionDirection direction, double sec); - [Export ("pausesIncomingScene")] - bool PausesIncomingScene { get; set; } + [Static, Export ("moveInWithDirection:duration:")] + SKTransition MoveInWithDirection (SKTransitionDirection direction, double sec); - [Export ("pausesOutgoingScene")] - bool PausesOutgoingScene { get; set; } - } + [Static, Export ("pushWithDirection:duration:")] + SKTransition PushWithDirection (SKTransitionDirection direction, double sec); - /// An image that can be used with one or more s and particles. - /// - /// Sprite Kit attempts to be efficient with the memory associated with textures. Textures are lazy-loaded from their source files and in preparation for loading onto the graphics hardware. This lazy-loading can be overridden with the Preload* methods. - /// - /// - /// Apple documentation for SKTexture - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - partial interface SKTexture : NSSecureCoding, NSCopying { + [Static, Export ("doorsOpenHorizontalWithDuration:")] + SKTransition DoorsOpenHorizontalWithDuration (double sec); - [Static, Export ("textureWithImageNamed:")] - SKTexture FromImageNamed (string name); + [Static, Export ("doorsOpenVerticalWithDuration:")] + SKTransition DoorsOpenVerticalWithDuration (double sec); - [Static, Export ("textureWithRect:inTexture:")] - SKTexture FromRectangle (CGRect rect, SKTexture texture); + [Static, Export ("doorsCloseHorizontalWithDuration:")] + SKTransition DoorsCloseHorizontalWithDuration (double sec); - [Static, Export ("textureWithCGImage:")] - SKTexture FromImage (CGImage image); + [Static, Export ("doorsCloseVerticalWithDuration:")] + SKTransition DoorsCloseVerticalWithDuration (double sec); - [Static, Export ("textureWithImage:")] - SKTexture FromImage (UIImage image); + [Static, Export ("doorwayWithDuration:")] + SKTransition DoorwayWithDuration (double sec); - [Static, Export ("textureWithData:size:")] - SKTexture FromData (NSData pixelData, CGSize size); + [MacCatalyst (13, 1)] + [Static, Export ("transitionWithCIFilter:duration:")] + SKTransition TransitionWithCIFilter (CIFilter filter, double sec); - [Static, Export ("textureWithData:size:rowLength:alignment:")] - SKTexture FromData (NSData pixelData, CGSize size, uint /* unsigned int*/ rowLength, uint /* unsigned int */ alignment); + [Export ("pausesIncomingScene")] + bool PausesIncomingScene { get; set; } - [NoWatch] - [MacCatalyst (13, 1)] - [Export ("textureByApplyingCIFilter:")] - SKTexture TextureByApplyingCIFilter (CIFilter filter); + [Export ("pausesOutgoingScene")] + bool PausesOutgoingScene { get; set; } +} - [Export ("textureRect")] - CGRect TextureRect { get; } +/// An image that can be used with one or more s and particles. +/// +/// Sprite Kit attempts to be efficient with the memory associated with textures. Textures are lazy-loaded from their source files and in preparation for loading onto the graphics hardware. This lazy-loading can be overridden with the Preload* methods. +/// +/// +/// Apple documentation for SKTexture +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +partial interface SKTexture : NSSecureCoding, NSCopying { - [Export ("size")] - CGSize Size { get; } + [Static, Export ("textureWithImageNamed:")] + SKTexture FromImageNamed (string name); - [Export ("filteringMode")] - SKTextureFilteringMode FilteringMode { get; set; } + [Static, Export ("textureWithRect:inTexture:")] + SKTexture FromRectangle (CGRect rect, SKTexture texture); - [Export ("usesMipmaps")] - bool UsesMipmaps { get; set; } + [Static, Export ("textureWithCGImage:")] + SKTexture FromImage (CGImage image); - [Static] - [Export ("preloadTextures:withCompletionHandler:")] - [Async] - // note: unlike SKTextureAtlas completion can't be null (or it crash) - void PreloadTextures (SKTexture [] textures, Action completion); + [Static, Export ("textureWithImage:")] + SKTexture FromImage (UIImage image); - [Export ("preloadWithCompletionHandler:")] - [Async] - // note: unlike SKTextureAtlas completion can't be null (or it crash) - void Preload (Action completion); + [Static, Export ("textureWithData:size:")] + SKTexture FromData (NSData pixelData, CGSize size); - [MacCatalyst (13, 1)] - [Export ("textureByGeneratingNormalMap")] - SKTexture CreateTextureByGeneratingNormalMap (); + [Static, Export ("textureWithData:size:rowLength:alignment:")] + SKTexture FromData (NSData pixelData, CGSize size, uint /* unsigned int*/ rowLength, uint /* unsigned int */ alignment); - [MacCatalyst (13, 1)] - [Export ("textureByGeneratingNormalMapWithSmoothness:contrast:")] - SKTexture CreateTextureByGeneratingNormalMap (nfloat smoothness, nfloat contrast); + [MacCatalyst (13, 1)] + [Export ("textureByApplyingCIFilter:")] + SKTexture TextureByApplyingCIFilter (CIFilter filter); - [MacCatalyst (13, 1)] - [Static, Export ("textureVectorNoiseWithSmoothness:size:")] - SKTexture FromTextureVectorNoise (nfloat smoothness, CGSize size); + [Export ("textureRect")] + CGRect TextureRect { get; } - [MacCatalyst (13, 1)] - [Static, Export ("textureNoiseWithSmoothness:size:grayscale:")] - SKTexture FromTextureNoise (nfloat smoothness, CGSize size, bool grayscale); + [Export ("size")] + CGSize Size { get; } - [MacCatalyst (13, 1)] - [Static, Export ("textureWithData:size:flipped:")] - SKTexture FromData (NSData pixelData, CGSize size, bool flipped); + [Export ("filteringMode")] + SKTextureFilteringMode FilteringMode { get; set; } - [MacCatalyst (13, 1)] - [Export ("CGImage")] - CGImage CGImage { get; } + [Export ("usesMipmaps")] + bool UsesMipmaps { get; set; } -#if !WATCH - // Static Category from GameplayKit - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("textureWithNoiseMap:")] - SKTexture FromNoiseMap (GKNoiseMap noiseMap); -#endif - } + [Static] + [Export ("preloadTextures:withCompletionHandler:")] + [Async] + // note: unlike SKTextureAtlas completion can't be null (or it crash) + void PreloadTextures (SKTexture [] textures, Action completion); - /// A method that modifies a texture in place. - delegate void SKTextureModify (IntPtr pixelData, nuint lengthInBytes); + [Export ("preloadWithCompletionHandler:")] + [Async] + // note: unlike SKTextureAtlas completion can't be null (or it crash) + void Preload (Action completion); - /// A texture that can be modified after assignment. - /// - /// Apple documentation for SKMutableTexture [MacCatalyst (13, 1)] - [BaseType (typeof (SKTexture))] - [DisableDefaultCtor] // cannot be created (like SKTexture) by calling `init` - interface SKMutableTexture { - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [Export ("textureByGeneratingNormalMap")] + SKTexture CreateTextureByGeneratingNormalMap (); - [Export ("initWithSize:pixelFormat:")] - NativeHandle Constructor (CGSize size, CVPixelFormatType pixelFormat); + [MacCatalyst (13, 1)] + [Export ("textureByGeneratingNormalMapWithSmoothness:contrast:")] + SKTexture CreateTextureByGeneratingNormalMap (nfloat smoothness, nfloat contrast); - [Static, Export ("mutableTextureWithSize:")] - SKMutableTexture Create (CGSize size); + [MacCatalyst (13, 1)] + [Static, Export ("textureVectorNoiseWithSmoothness:size:")] + SKTexture FromTextureVectorNoise (nfloat smoothness, CGSize size); - [Export ("modifyPixelDataWithBlock:")] - void ModifyPixelData (SKTextureModify modifyMethod); - } + [MacCatalyst (13, 1)] + [Static, Export ("textureNoiseWithSmoothness:size:grayscale:")] + SKTexture FromTextureNoise (nfloat smoothness, CGSize size, bool grayscale); - delegate void SKTextureAtlasLoadCallback (NSError error, SKTextureAtlas foundAtlases); + [MacCatalyst (13, 1)] + [Static, Export ("textureWithData:size:flipped:")] + SKTexture FromData (NSData pixelData, CGSize size, bool flipped); - /// A collection of s that are loaded from a single source. - /// - /// - /// Apple documentation for SKTextureAtlas [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - partial interface SKTextureAtlas : NSSecureCoding { + [Export ("CGImage")] + CGImage CGImage { get; } - [Static, Export ("atlasNamed:")] - SKTextureAtlas FromName (string name); + // Static Category from GameplayKit + [MacCatalyst (13, 1)] + [Static] + [Export ("textureWithNoiseMap:")] + SKTexture FromNoiseMap (GKNoiseMap noiseMap); +} - [Export ("textureNamed:")] - SKTexture TextureNamed (string name); +/// A method that modifies a texture in place. +delegate void SKTextureModify (IntPtr pixelData, nuint lengthInBytes); - [Export ("textureNames")] - string [] TextureNames { get; } +/// A texture that can be modified after assignment. +/// +/// Apple documentation for SKMutableTexture +[MacCatalyst (13, 1)] +[BaseType (typeof (SKTexture))] +[DisableDefaultCtor] // cannot be created (like SKTexture) by calling `init` +interface SKMutableTexture { + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [Static] - [Export ("preloadTextureAtlases:withCompletionHandler:")] - [Async] - // Unfortunate name, should have been PreloadTextureAtlases - void PreloadTextures (SKTextureAtlas [] textures, Action completion); + [Export ("initWithSize:pixelFormat:")] + NativeHandle Constructor (CGSize size, CVPixelFormatType pixelFormat); - [MacCatalyst (13, 1)] - [Static] - [Export ("preloadTextureAtlasesNamed:withCompletionHandler:")] - [Async (ResultTypeName = "SKTextureAtlasLoadResult")] - void PreloadTextureAtlases (string [] atlasNames, SKTextureAtlasLoadCallback completionHandler); + [Static, Export ("mutableTextureWithSize:")] + SKMutableTexture Create (CGSize size); - [Export ("preloadWithCompletionHandler:")] - [Async] - void Preload (Action completion); + [Export ("modifyPixelDataWithBlock:")] + void ModifyPixelData (SKTextureModify modifyMethod); +} - [MacCatalyst (13, 1)] - [Static, Export ("atlasWithDictionary:")] - SKTextureAtlas FromDictionary (NSDictionary properties); +delegate void SKTextureAtlasLoadCallback (NSError error, SKTextureAtlas foundAtlases); - } +/// A collection of s that are loaded from a single source. +/// +/// +/// Apple documentation for SKTextureAtlas +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +partial interface SKTextureAtlas : NSSecureCoding { - /// Holds shareable uniform data for SKShader objects. - /// - /// Apple documentation for SKUniform - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKUniform : NSCopying, NSSecureCoding { - [Export ("initWithName:")] - NativeHandle Constructor (string name); - - [Export ("initWithName:texture:")] - NativeHandle Constructor (string name, [NullAllowed] SKTexture texture); - - [Export ("initWithName:float:")] - NativeHandle Constructor (string name, float /* float, not CGFloat */ value); - - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector2:")] - IntPtr InitWithNameFloatVector2 (string name, Vector2 value); - - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [MarshalNativeExceptions] -#if WATCH - NativeHandle Constructor (string name, Vector2 value); -#else - [Internal] - IntPtr InitWithNameVectorFloat2 (string name, Vector2 value); -#endif + [Static, Export ("atlasNamed:")] + SKTextureAtlas FromName (string name); - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector3:")] - IntPtr InitWithNameFloatVector3 (string name, Vector3 value); - - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] -#if WATCH - NativeHandle Constructor (string name, Vector3 value); -#else - [Internal] - IntPtr InitWithNameVectorFloat3 (string name, Vector3 value); -#endif + [Export ("textureNamed:")] + SKTexture TextureNamed (string name); - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector4:")] - IntPtr InitWithNameFloatVector4 (string name, Vector4 value); - - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] -#if WATCH - NativeHandle Constructor (string name, Vector4 value); -#else - [Internal] - IntPtr InitWithNameVectorFloat4 (string name, Vector4 value); -#endif + [Export ("textureNames")] + string [] TextureNames { get; } -#if !NET - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Export ("initWithName:floatMatrix2:")] - IntPtr InitWithNameFloatMatrix2 (string name, Matrix2 value); -#endif + [Static] + [Export ("preloadTextureAtlases:withCompletionHandler:")] + [Async] + // Unfortunate name, should have been PreloadTextureAtlases + void PreloadTextures (SKTextureAtlas [] textures, Action completion); -#if !NET - [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] - [Sealed] - [Export ("initWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] -#if WATCH - NativeHandle Constructor (string name, Matrix2 value); -#else - [Internal] - IntPtr InitWithNameMatrixFloat2x2 (string name, Matrix2 value); -#endif // WATCH -#endif // !NET + [MacCatalyst (13, 1)] + [Static] + [Export ("preloadTextureAtlasesNamed:withCompletionHandler:")] + [Async (ResultTypeName = "SKTextureAtlasLoadResult")] + void PreloadTextureAtlases (string [] atlasNames, SKTextureAtlasLoadCallback completionHandler); - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat2x2 value); + [Export ("preloadWithCompletionHandler:")] + [Async] + void Preload (Action completion); -#if !NET - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Export ("initWithName:floatMatrix3:")] - IntPtr InitWithNameFloatMatrix3 (string name, Matrix3 value); - - [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] - [Sealed] - [Export ("initWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] -#if WATCH - NativeHandle Constructor (string name, Matrix3 value); -#else - [Internal] - IntPtr InitWithNameMatrixFloat3x3 (string name, Matrix3 value); -#endif // WATCH -#endif // !NET + [MacCatalyst (13, 1)] + [Static, Export ("atlasWithDictionary:")] + SKTextureAtlas FromDictionary (NSDictionary properties); - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat3x3 value); +} + +/// Holds shareable uniform data for SKShader objects. +/// +/// Apple documentation for SKUniform +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKUniform : NSCopying, NSSecureCoding { + [Export ("initWithName:")] + NativeHandle Constructor (string name); + + [Export ("initWithName:texture:")] + NativeHandle Constructor (string name, [NullAllowed] SKTexture texture); + + [Export ("initWithName:float:")] + NativeHandle Constructor (string name, float /* float, not CGFloat */ value); + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector2:")] + IntPtr InitWithNameFloatVector2 (string name, Vector2 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [MarshalNativeExceptions] + [Internal] + IntPtr InitWithNameVectorFloat2 (string name, Vector2 value); + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector3:")] + IntPtr InitWithNameFloatVector3 (string name, Vector3 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameVectorFloat3 (string name, Vector3 value); + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector4:")] + IntPtr InitWithNameFloatVector4 (string name, Vector4 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameVectorFloat4 (string name, Vector4 value); #if !NET - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Export ("initWithName:floatMatrix4:")] - IntPtr InitWithNameFloatMatrix4 (string name, Matrix4 value); -#endif // !NET + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Export ("initWithName:floatMatrix2:")] + IntPtr InitWithNameFloatMatrix2 (string name, Matrix2 value); +#endif #if !NET - [Obsolete ("Use the '(string, MatrixFloat4x4)' overload instead.")] - [Export ("initWithName:matrixFloat4x4:")] - [Sealed] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] -#if WATCH - NativeHandle Constructor (string name, Matrix4 value); -#else - [Internal] - IntPtr InitWithNameMatrixFloat4x4 (string name, Matrix4 value); -#endif // WATCH + [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] + [Sealed] + [Export ("initWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameMatrixFloat2x2 (string name, Matrix2 value); #endif // !NET - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat4x4 value); - - [Export ("name")] - string Name { get; } - - [Export ("uniformType")] - SKUniformType UniformType { get; } - - [Export ("textureValue")] - [NullAllowed] - SKTexture TextureValue { get; set; } - - [Export ("floatValue")] - float FloatValue { get; set; } /* float, not CGFloat */ - - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector2Value")] - Vector2 _FloatVector2Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] -#if WATCH - Vector2 FloatVector2Value { -#else - [Internal] - Vector2 _VectorFloat2Value { -#endif - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector3Value")] - Vector3 _FloatVector3Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] -#if WATCH - Vector3 FloatVector3Value { -#else - [Internal] - Vector3 _VectorFloat3Value { -#endif - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector4Value")] - Vector4 _FloatVector4Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] -#if WATCH - Vector4 FloatVector4Value { -#else - [Internal] - Vector4 _VectorFloat4Value { -#endif - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat2x2 value); #if !NET - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [NoWatch] - [Export ("floatMatrix2Value")] - Matrix2 _FloatMatrix2Value { get; set; } + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Export ("initWithName:floatMatrix3:")] + IntPtr InitWithNameFloatMatrix3 (string name, Matrix3 value); + + [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] + [Sealed] + [Export ("initWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameMatrixFloat3x3 (string name, Matrix3 value); #endif // !NET -#if !NET && WATCH - [Obsolete ("Use 'MatrixFloat2x2Value' instead.")] - [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] - Matrix2 FloatMatrix2x2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } -#endif + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat3x3 value); -#if !NET && WATCH - [Sealed] // The selector is already used in the 'FloatMatrix2x2Value' property. -#endif - [MacCatalyst (13, 1)] - [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] - MatrixFloat2x2 MatrixFloat2x2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } +#if !NET + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Export ("initWithName:floatMatrix4:")] + IntPtr InitWithNameFloatMatrix4 (string name, Matrix4 value); +#endif // !NET #if !NET - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Export ("floatMatrix3Value")] - Matrix3 _FloatMatrix3Value { get; set; } + [Obsolete ("Use the '(string, MatrixFloat4x4)' overload instead.")] + [Export ("initWithName:matrixFloat4x4:")] + [Sealed] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameMatrixFloat4x4 (string name, Matrix4 value); #endif // !NET -#if !NET && WATCH - [Obsolete ("Use 'MatrixFloat3x3Value' instead.")] - [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] - Matrix3 FloatMatrix3x3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } -#endif + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat4x4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat4x4 value); -#if !NET && WATCH - [Sealed] // The selector is already used in the 'FloatMatrix3x3Value' property. -#endif - [MacCatalyst (13, 1)] - [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] - MatrixFloat3x3 MatrixFloat3x3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [Export ("name")] + string Name { get; } -#if !NET - [Internal] - [NoWatch] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Export ("floatMatrix4Value")] - Matrix4 _FloatMatrix4Value { get; set; } -#endif // !NET + [Export ("uniformType")] + SKUniformType UniformType { get; } -#if !NET && WATCH - [Obsolete ("Use 'MatrixFloat4x4Value' instead.")] - [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] - Matrix4 FloatMatrix4x4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] set; - } -#endif + [Export ("textureValue")] + [NullAllowed] + SKTexture TextureValue { get; set; } -#if !NET && WATCH - [Sealed] // The selector is already used in the 'FloatMatrix4x4Value' property. -#endif - [MacCatalyst (13, 1)] - [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] - MatrixFloat4x4 MatrixFloat4x4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Static, Export ("uniformWithName:")] - SKUniform Create (string name); - - [Static, Export ("uniformWithName:texture:")] - SKUniform Create (string name, [NullAllowed] SKTexture texture); - - [Static, Export ("uniformWithName:float:")] - SKUniform Create (string name, float /* float, not CGFloat */ value); - - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat2:")] + [Export ("floatValue")] + float FloatValue { get; set; } /* float, not CGFloat */ + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector2Value")] + Vector2 _FloatVector2Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] + [Internal] + Vector2 _VectorFloat2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [MarshalNativeExceptions] - SKUniform Create (string name, Vector2 value); + set; + } - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat3:")] + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector3Value")] + Vector3 _FloatVector3Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] + [Internal] + Vector3 _VectorFloat3Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Vector3 value); + set; + } - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat4:")] + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector4Value")] + Vector4 _FloatVector4Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] + [Internal] + Vector4 _VectorFloat4Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Vector4 value); + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } #if !NET - [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] - [Static] - [Export ("uniformWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Matrix2 value); + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Export ("floatMatrix2Value")] + Matrix2 _FloatMatrix2Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat2x2:")] + [MacCatalyst (13, 1)] + [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] + MatrixFloat2x2 MatrixFloat2x2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat2x2 value); + set; + } #if !NET - [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] - [Static] - [Export ("uniformWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Matrix3 value); -#endif + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Export ("floatMatrix3Value")] + Matrix3 _FloatMatrix3Value { get; set; } +#endif // !NET - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat3x3:")] + [MacCatalyst (13, 1)] + [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] + MatrixFloat3x3 MatrixFloat3x3Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat3x3 value); + set; + } #if !NET - [Obsolete ("Use 'the '(string, MatrixFloat4x4)' overload instead.")] - [Static] - [Export ("uniformWithName:matrixFloat4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Matrix4 value); + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Export ("floatMatrix4Value")] + Matrix4 _FloatMatrix4Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat4x4:")] + [MacCatalyst (13, 1)] + [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] + MatrixFloat4x4 MatrixFloat4x4Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat4x4 value); + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; } - /// The delegate for a custom action, used with . - delegate void SKActionDurationHandler (SKNode node, nfloat elapsedTime); + [Static, Export ("uniformWithName:")] + SKUniform Create (string name); + + [Static, Export ("uniformWithName:texture:")] + SKUniform Create (string name, [NullAllowed] SKTexture texture); + + [Static, Export ("uniformWithName:float:")] + SKUniform Create (string name, float /* float, not CGFloat */ value); - /// [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // To create an action, call the class method for the action you are interested in. - partial interface SKAction : NSSecureCoding, NSCopying { + [Static] + [Export ("uniformWithName:vectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [MarshalNativeExceptions] + SKUniform Create (string name, Vector2 value); - [Export ("duration")] - double Duration { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Vector3 value); - [Export ("timingMode")] - SKActionTimingMode TimingMode { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Vector4 value); - [Export ("speed")] - nfloat Speed { get; set; } +#if !NET + [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] + [Static] + [Export ("uniformWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Matrix2 value); +#endif // !NET - [Export ("reversedAction")] - SKAction ReversedAction { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat2x2 value); - // These are in a category - [Static, Export ("moveByX:y:duration:")] - SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); +#if !NET + [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] + [Static] + [Export ("uniformWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Matrix3 value); +#endif - [Static, Export ("moveBy:duration:")] - SKAction MoveBy (CGVector delta, double duration); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat3x3 value); - [Static, Export ("moveTo:duration:")] - SKAction MoveTo (CGPoint location, double sec); +#if !NET + [Obsolete ("Use 'the '(string, MatrixFloat4x4)' overload instead.")] + [Static] + [Export ("uniformWithName:matrixFloat4x4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Matrix4 value); +#endif // !NET - [Static, Export ("moveToX:duration:")] - SKAction MoveToX (nfloat x, double sec); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat4x4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat4x4 value); +} - [Static, Export ("moveToY:duration:")] - SKAction MoveToY (nfloat y, double sec); +/// The delegate for a custom action, used with . +delegate void SKActionDurationHandler (SKNode node, nfloat elapsedTime); - [Static, Export ("rotateByAngle:duration:")] - SKAction RotateByAngle (nfloat radians, double sec); +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] // To create an action, call the class method for the action you are interested in. +partial interface SKAction : NSSecureCoding, NSCopying { - [Static, Export ("rotateToAngle:duration:")] - SKAction RotateToAngle (nfloat radians, double sec); + [Export ("duration")] + double Duration { get; set; } - [Static, Export ("rotateToAngle:duration:shortestUnitArc:")] - SKAction RotateToAngle (nfloat radians, double sec, bool shortedUnitArc); + [Export ("timingMode")] + SKActionTimingMode TimingMode { get; set; } - [Static, Export ("resizeByWidth:height:duration:")] - SKAction ResizeByWidth (nfloat width, nfloat height, double duration); + [Export ("speed")] + nfloat Speed { get; set; } - [Static, Export ("resizeToWidth:height:duration:")] - SKAction ResizeTo (nfloat width, nfloat height, double duration); + [Export ("reversedAction")] + SKAction ReversedAction { get; } - [Static, Export ("resizeToWidth:duration:")] - SKAction ResizeToWidth (nfloat width, double duration); + // These are in a category + [Static, Export ("moveByX:y:duration:")] + SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); - [Static, Export ("resizeToHeight:duration:")] - SKAction ResizeToHeight (nfloat height, double duration); + [Static, Export ("moveBy:duration:")] + SKAction MoveBy (CGVector delta, double duration); - [Static, Export ("scaleBy:duration:")] - SKAction ScaleBy (nfloat scale, double sec); + [Static, Export ("moveTo:duration:")] + SKAction MoveTo (CGPoint location, double sec); - [Static, Export ("scaleXBy:y:duration:")] - SKAction ScaleBy (nfloat xScale, nfloat yScale, double sec); + [Static, Export ("moveToX:duration:")] + SKAction MoveToX (nfloat x, double sec); - [Static, Export ("scaleTo:duration:")] - SKAction ScaleTo (nfloat scale, double sec); + [Static, Export ("moveToY:duration:")] + SKAction MoveToY (nfloat y, double sec); - [Static, Export ("scaleXTo:y:duration:")] - SKAction ScaleTo (nfloat xScale, nfloat yScale, double sec); + [Static, Export ("rotateByAngle:duration:")] + SKAction RotateByAngle (nfloat radians, double sec); - [Static, Export ("scaleXTo:duration:")] - SKAction ScaleXTo (nfloat scale, double sec); + [Static, Export ("rotateToAngle:duration:")] + SKAction RotateToAngle (nfloat radians, double sec); - [Static, Export ("scaleYTo:duration:")] - SKAction ScaleYTo (nfloat scale, double sec); + [Static, Export ("rotateToAngle:duration:shortestUnitArc:")] + SKAction RotateToAngle (nfloat radians, double sec, bool shortedUnitArc); - [MacCatalyst (13, 1)] - [Static] - [Export ("scaleToSize:duration:")] - SKAction ScaleTo (CGSize size, double sec); + [Static, Export ("resizeByWidth:height:duration:")] + SKAction ResizeByWidth (nfloat width, nfloat height, double duration); - [Static, Export ("sequence:")] - SKAction Sequence ([Params] SKAction [] actions); + [Static, Export ("resizeToWidth:height:duration:")] + SKAction ResizeTo (nfloat width, nfloat height, double duration); - [Static, Export ("group:")] - SKAction Group ([Params] SKAction [] actions); + [Static, Export ("resizeToWidth:duration:")] + SKAction ResizeToWidth (nfloat width, double duration); - [Static, Export ("repeatAction:count:")] - SKAction RepeatAction (SKAction action, nuint count); + [Static, Export ("resizeToHeight:duration:")] + SKAction ResizeToHeight (nfloat height, double duration); - [Static, Export ("repeatActionForever:")] - SKAction RepeatActionForever (SKAction action); + [Static, Export ("scaleBy:duration:")] + SKAction ScaleBy (nfloat scale, double sec); - [Static, Export ("fadeInWithDuration:")] - SKAction FadeInWithDuration (double sec); + [Static, Export ("scaleXBy:y:duration:")] + SKAction ScaleBy (nfloat xScale, nfloat yScale, double sec); - [Static, Export ("fadeOutWithDuration:")] - SKAction FadeOutWithDuration (double sec); + [Static, Export ("scaleTo:duration:")] + SKAction ScaleTo (nfloat scale, double sec); - [Static, Export ("fadeAlphaBy:duration:")] - SKAction FadeAlphaBy (nfloat factor, double sec); + [Static, Export ("scaleXTo:y:duration:")] + SKAction ScaleTo (nfloat xScale, nfloat yScale, double sec); - [Static, Export ("fadeAlphaTo:duration:")] - SKAction FadeAlphaTo (nfloat alpha, double sec); + [Static, Export ("scaleXTo:duration:")] + SKAction ScaleXTo (nfloat scale, double sec); - [MacCatalyst (13, 1)] - [Static, Export ("setTexture:")] - SKAction SetTexture (SKTexture texture); + [Static, Export ("scaleYTo:duration:")] + SKAction ScaleYTo (nfloat scale, double sec); - [MacCatalyst (13, 1)] - [Static, Export ("setTexture:resize:")] - SKAction SetTexture (SKTexture texture, bool resize); + [MacCatalyst (13, 1)] + [Static] + [Export ("scaleToSize:duration:")] + SKAction ScaleTo (CGSize size, double sec); - [Static, Export ("animateWithTextures:timePerFrame:")] - SKAction AnimateWithTextures (SKTexture [] textures, double sec); + [Static, Export ("sequence:")] + SKAction Sequence ([Params] SKAction [] actions); - [Static, Export ("animateWithTextures:timePerFrame:resize:restore:")] - SKAction AnimateWithTextures (SKTexture [] textures, double sec, bool resize, bool restore); + [Static, Export ("group:")] + SKAction Group ([Params] SKAction [] actions); - [Static, Export ("playSoundFileNamed:waitForCompletion:")] - SKAction PlaySoundFileNamed (string soundFile, bool wait); + [Static, Export ("repeatAction:count:")] + SKAction RepeatAction (SKAction action, nuint count); + + [Static, Export ("repeatActionForever:")] + SKAction RepeatActionForever (SKAction action); + + [Static, Export ("fadeInWithDuration:")] + SKAction FadeInWithDuration (double sec); + + [Static, Export ("fadeOutWithDuration:")] + SKAction FadeOutWithDuration (double sec); + + [Static, Export ("fadeAlphaBy:duration:")] + SKAction FadeAlphaBy (nfloat factor, double sec); + + [Static, Export ("fadeAlphaTo:duration:")] + SKAction FadeAlphaTo (nfloat alpha, double sec); + + [MacCatalyst (13, 1)] + [Static, Export ("setTexture:")] + SKAction SetTexture (SKTexture texture); + + [MacCatalyst (13, 1)] + [Static, Export ("setTexture:resize:")] + SKAction SetTexture (SKTexture texture, bool resize); - [Static, Export ("colorizeWithColor:colorBlendFactor:duration:")] - SKAction ColorizeWithColor (UIColor color, nfloat colorBlendFactor, double sec); + [Static, Export ("animateWithTextures:timePerFrame:")] + SKAction AnimateWithTextures (SKTexture [] textures, double sec); - [Static, Export ("colorizeWithColorBlendFactor:duration:")] - SKAction ColorizeWithColorBlendFactor (nfloat colorBlendFactor, double sec); + [Static, Export ("animateWithTextures:timePerFrame:resize:restore:")] + SKAction AnimateWithTextures (SKTexture [] textures, double sec, bool resize, bool restore); - [Static, Export ("followPath:duration:")] - SKAction FollowPath (CGPath path, double sec); + [Static, Export ("playSoundFileNamed:waitForCompletion:")] + SKAction PlaySoundFileNamed (string soundFile, bool wait); - [Static, Export ("followPath:asOffset:orientToPath:duration:")] + [Static, Export ("colorizeWithColor:colorBlendFactor:duration:")] + SKAction ColorizeWithColor (UIColor color, nfloat colorBlendFactor, double sec); + + [Static, Export ("colorizeWithColorBlendFactor:duration:")] + SKAction ColorizeWithColorBlendFactor (nfloat colorBlendFactor, double sec); + + [Static, Export ("followPath:duration:")] + SKAction FollowPath (CGPath path, double sec); + + [Static, Export ("followPath:asOffset:orientToPath:duration:")] #if XAMCORE_5_0 SKAction FollowPath (CGPath path, bool offset, bool orientToPath, double sec); #else - SKAction FollowPath (CGPath path, bool offset, bool orient, double sec); + SKAction FollowPath (CGPath path, bool offset, bool orient, double sec); #endif - [MacCatalyst (13, 1)] - [Static, Export ("followPath:speed:")] - SKAction FollowPath (CGPath path, nfloat speed); + [MacCatalyst (13, 1)] + [Static, Export ("followPath:speed:")] + SKAction FollowPath (CGPath path, nfloat speed); - [MacCatalyst (13, 1)] - [Static, Export ("followPath:asOffset:orientToPath:speed:")] + [MacCatalyst (13, 1)] + [Static, Export ("followPath:asOffset:orientToPath:speed:")] #if XAMCORE_5_0 SKAction FollowPath (CGPath path, bool offset, bool orientToPath, nfloat speed); #else - SKAction FollowPath (CGPath path, bool offset, bool orient, nfloat speed); + SKAction FollowPath (CGPath path, bool offset, bool orient, nfloat speed); #endif - [Static, Export ("speedBy:duration:")] - SKAction SpeedBy (nfloat speed, double sec); + [Static, Export ("speedBy:duration:")] + SKAction SpeedBy (nfloat speed, double sec); - [Static, Export ("speedTo:duration:")] - SKAction SpeedTo (nfloat speed, double sec); + [Static, Export ("speedTo:duration:")] + SKAction SpeedTo (nfloat speed, double sec); - [Static, Export ("waitForDuration:")] - SKAction WaitForDuration (double sec); + [Static, Export ("waitForDuration:")] + SKAction WaitForDuration (double sec); - [Static, Export ("waitForDuration:withRange:")] - SKAction WaitForDuration (double sec, double durationRange); - - [Static, Export ("removeFromParent")] - SKAction RemoveFromParent (); - - [Static, Export ("performSelector:onTarget:")] - SKAction PerformSelector (Selector selector, NSObject target); + [Static, Export ("waitForDuration:withRange:")] + SKAction WaitForDuration (double sec, double durationRange); - [Static, Export ("runBlock:")] - SKAction Run (Action block); - - [Static, Export ("runBlock:queue:")] - SKAction Run (Action block, DispatchQueue queue); - - [Static, Export ("runAction:onChildWithName:")] - SKAction RunAction (SKAction action, string name); - - [Static, Export ("customActionWithDuration:actionBlock:")] - SKAction CustomActionWithDuration (double seconds, SKActionDurationHandler actionHandler); - - // - // iOS 8 cluster (a few more are above, as part of their family - // - [MacCatalyst (13, 1)] - [Static, Export ("hide")] - SKAction Hide (); - - [MacCatalyst (13, 1)] - [Static, Export ("unhide")] - SKAction Unhide (); - - [MacCatalyst (13, 1)] - [Static, Export ("reachTo:rootNode:duration:")] - SKAction ReachTo (CGPoint position, SKNode rootNode, double secs); - - [MacCatalyst (13, 1)] - [Static, Export ("reachTo:rootNode:velocity:")] - SKAction ReachTo (CGPoint position, SKNode rootNode, nfloat velocity); - - [MacCatalyst (13, 1)] - [Static, Export ("reachToNode:rootNode:duration:")] - SKAction ReachToNode (SKNode node, SKNode rootNode, double sec); - - [MacCatalyst (13, 1)] - [Static, Export ("reachToNode:rootNode:velocity:")] - SKAction ReachToNode (SKNode node, SKNode rootNode, nfloat velocity); - - [MacCatalyst (13, 1)] - [Static, Export ("strengthTo:duration:")] - SKAction StrengthTo (float /* float, not CGFloat */ strength, double sec); - - [MacCatalyst (13, 1)] - [Static, Export ("strengthBy:duration:")] - SKAction StrengthBy (float /* float, not CGFloat */ strength, double sec); - - [MacCatalyst (13, 1)] - [NullAllowed, Export ("timingFunction", ArgumentSemantic.Assign)] - SKActionTimingFunction2 TimingFunction2 { get; set; } - - [MacCatalyst (13, 1)] - [Static, Export ("falloffBy:duration:")] - SKAction FalloffBy (float /* float, not CGFloat */ to, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("falloffTo:duration:")] - SKAction FalloffTo (float falloff, double sec); - - // iOS 9 cluster - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:")] - [return: NullAllowed] - SKAction Create (string name); - - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:duration:")] - [return: NullAllowed] - SKAction Create (string name, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:fromURL:")] - [return: NullAllowed] - SKAction Create (string name, NSUrl url); - - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:fromURL:duration:")] - [return: NullAllowed] - SKAction Create (string name, NSUrl url, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("setNormalTexture:")] - SKAction SetNormalTexture (SKTexture texture); - - [MacCatalyst (13, 1)] - [Static] - [Export ("setNormalTexture:resize:")] - SKAction SetNormalTexture (SKTexture texture, bool resize); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithNormalTextures:timePerFrame:")] - SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithNormalTextures:timePerFrame:resize:restore:")] - SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame, bool resize, bool restore); - - [MacCatalyst (13, 1)] - [Static] - [Export ("play")] - SKAction CreatePlay (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("pause")] - SKAction CreatePause (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("stop")] - SKAction CreateStop (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changePlaybackRateTo:duration:")] - SKAction CreateChangePlaybackRate (float playbackRate, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changePlaybackRateBy:duration:")] - SKAction CreateChangePlaybackRateBy (float playbackRate, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeVolumeTo:duration:")] - SKAction CreateChangeVolume (float newVolume, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeVolumeBy:duration:")] - SKAction CreateChangeVolumeBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeChargeTo:duration:")] - SKAction CreateChangeChargeTo (float newCharge, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeChargeBy:duration:")] - SKAction CreateChangeChargeBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeMassTo:duration:")] - SKAction CreateChangeMassTo (float newMass, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeMassBy:duration:")] - SKAction CreateChangeMassBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyForce:duration:")] - SKAction CreateApplyForce (CGVector force, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyForce:atPoint:duration:")] - SKAction CreateApplyForce (CGVector force, CGPoint point, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyTorque:duration:")] - SKAction CreateApplyTorque (nfloat torque, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyImpulse:duration:")] - SKAction CreateApplyImpulse (CGVector impulse, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyImpulse:atPoint:duration:")] - SKAction CreateApplyImpulse (CGVector impulse, CGPoint point, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyAngularImpulse:duration:")] - SKAction CreateApplyAngularImpulse (nfloat impulse, double duration); - - // SKAction_SKAudioNode inlined - - [MacCatalyst (13, 1)] - [Static] - [Export ("stereoPanTo:duration:")] - SKAction CreateStereoPanTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("stereoPanBy:duration:")] - SKAction CreateStereoPanBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeReverbTo:duration:")] - SKAction CreateChangeReverbTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeReverbBy:duration:")] - SKAction CreateChangeReverbBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeObstructionTo:duration:")] - SKAction CreateChangeObstructionTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeObstructionBy:duration:")] - SKAction CreateChangeObstructionBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeOcclusionTo:duration:")] - SKAction CreateChangeOcclusionTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeOcclusionBy:duration:")] - SKAction CreateChangeOcclusionBy (float by, double duration); - - // SKAction_SKWarpable - - [MacCatalyst (13, 1)] - [Static] - [Export ("warpTo:duration:")] - [return: NullAllowed] - SKAction WarpTo (SKWarpGeometry warp, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithWarps:times:")] - [return: NullAllowed] - SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithWarps:times:restore:")] - [return: NullAllowed] - SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times, bool restore); - } + [Static, Export ("removeFromParent")] + SKAction RemoveFromParent (); + + [Static, Export ("performSelector:onTarget:")] + SKAction PerformSelector (Selector selector, NSObject target); + + [Static, Export ("runBlock:")] + SKAction Run (Action block); + + [Static, Export ("runBlock:queue:")] + SKAction Run (Action block, DispatchQueue queue); - /// + [Static, Export ("runAction:onChildWithName:")] + SKAction RunAction (SKAction action, string name); + + [Static, Export ("customActionWithDuration:actionBlock:")] + SKAction CustomActionWithDuration (double seconds, SKActionDurationHandler actionHandler); + + // + // iOS 8 cluster (a few more are above, as part of their family + // [MacCatalyst (13, 1)] - [DisableDefaultCtor] // see https://bugzilla.xamarin.com/show_bug.cgi?id=14502 - [BaseType (typeof (NSObject))] - partial interface SKPhysicsBody : NSSecureCoding, NSCopying { + [Static, Export ("hide")] + SKAction Hide (); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithBodies:")] - SKPhysicsBody FromBodies (SKPhysicsBody [] bodies); + [MacCatalyst (13, 1)] + [Static, Export ("unhide")] + SKAction Unhide (); - [Static, Export ("bodyWithCircleOfRadius:")] - SKPhysicsBody CreateCircularBody (nfloat radius); + [MacCatalyst (13, 1)] + [Static, Export ("reachTo:rootNode:duration:")] + SKAction ReachTo (CGPoint position, SKNode rootNode, double secs); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithCircleOfRadius:center:")] - SKPhysicsBody CreateCircularBody (nfloat radius, CGPoint center); + [MacCatalyst (13, 1)] + [Static, Export ("reachTo:rootNode:velocity:")] + SKAction ReachTo (CGPoint position, SKNode rootNode, nfloat velocity); - [Static, Export ("bodyWithRectangleOfSize:")] - SKPhysicsBody CreateRectangularBody (CGSize size); + [MacCatalyst (13, 1)] + [Static, Export ("reachToNode:rootNode:duration:")] + SKAction ReachToNode (SKNode node, SKNode rootNode, double sec); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithRectangleOfSize:center:")] - SKPhysicsBody CreateRectangularBody (CGSize size, CGPoint center); + [MacCatalyst (13, 1)] + [Static, Export ("reachToNode:rootNode:velocity:")] + SKAction ReachToNode (SKNode node, SKNode rootNode, nfloat velocity); - [Static, Export ("bodyWithPolygonFromPath:")] - SKPhysicsBody CreateBodyFromPath (CGPath path); + [MacCatalyst (13, 1)] + [Static, Export ("strengthTo:duration:")] + SKAction StrengthTo (float /* float, not CGFloat */ strength, double sec); - [Static, Export ("bodyWithEdgeFromPoint:toPoint:")] - SKPhysicsBody CreateEdge (CGPoint fromPoint, CGPoint toPoint); + [MacCatalyst (13, 1)] + [Static, Export ("strengthBy:duration:")] + SKAction StrengthBy (float /* float, not CGFloat */ strength, double sec); - [Static, Export ("bodyWithEdgeChainFromPath:")] - SKPhysicsBody CreateEdgeChain (CGPath path); + [MacCatalyst (13, 1)] + [NullAllowed, Export ("timingFunction", ArgumentSemantic.Assign)] + SKActionTimingFunction2 TimingFunction2 { get; set; } - [Static, Export ("bodyWithEdgeLoopFromPath:")] - SKPhysicsBody CreateEdgeLoop (CGPath path); + [MacCatalyst (13, 1)] + [Static, Export ("falloffBy:duration:")] + SKAction FalloffBy (float /* float, not CGFloat */ to, double duration); - [Static, Export ("bodyWithEdgeLoopFromRect:")] - SKPhysicsBody CreateEdgeLoop (CGRect rect); + [MacCatalyst (13, 1)] + [Static] + [Export ("falloffTo:duration:")] + SKAction FalloffTo (float falloff, double sec); - [Export ("dynamic")] - bool Dynamic { [Bind ("isDynamic")] get; set; } + // iOS 9 cluster + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:")] + [return: NullAllowed] + SKAction Create (string name); - [Export ("usesPreciseCollisionDetection")] - bool UsesPreciseCollisionDetection { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:duration:")] + [return: NullAllowed] + SKAction Create (string name, double duration); - [Export ("allowsRotation")] - bool AllowsRotation { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:fromURL:")] + [return: NullAllowed] + SKAction Create (string name, NSUrl url); - [Export ("resting")] - bool Resting { [Bind ("isResting")] get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:fromURL:duration:")] + [return: NullAllowed] + SKAction Create (string name, NSUrl url, double duration); - [Export ("friction")] - nfloat Friction { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("setNormalTexture:")] + SKAction SetNormalTexture (SKTexture texture); - [Export ("restitution")] - nfloat Restitution { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("setNormalTexture:resize:")] + SKAction SetNormalTexture (SKTexture texture, bool resize); - [Export ("linearDamping", ArgumentSemantic.Assign)] - nfloat LinearDamping { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithNormalTextures:timePerFrame:")] + SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame); - [Export ("angularDamping", ArgumentSemantic.Assign)] - nfloat AngularDamping { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithNormalTextures:timePerFrame:resize:restore:")] + SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame, bool resize, bool restore); - [Export ("density")] - nfloat Density { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("play")] + SKAction CreatePlay (); - [Export ("mass")] - nfloat Mass { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("pause")] + SKAction CreatePause (); - [Export ("area")] - nfloat Area { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("stop")] + SKAction CreateStop (); - [Export ("affectedByGravity", ArgumentSemantic.Assign)] - bool AffectedByGravity { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changePlaybackRateTo:duration:")] + SKAction CreateChangePlaybackRate (float playbackRate, double duration); - [Export ("categoryBitMask", ArgumentSemantic.Assign)] - uint CategoryBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changePlaybackRateBy:duration:")] + SKAction CreateChangePlaybackRateBy (float playbackRate, double duration); - [Export ("collisionBitMask", ArgumentSemantic.Assign)] - uint CollisionBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changeVolumeTo:duration:")] + SKAction CreateChangeVolume (float newVolume, double duration); - [Export ("contactTestBitMask", ArgumentSemantic.Assign)] - uint ContactTestBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changeVolumeBy:duration:")] + SKAction CreateChangeVolumeBy (float by, double duration); - [Export ("joints")] - SKPhysicsJoint [] Joints { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeChargeTo:duration:")] + SKAction CreateChangeChargeTo (float newCharge, double duration); - [Export ("node", ArgumentSemantic.Weak)] - [NullAllowed] - SKNode Node { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeChargeBy:duration:")] + SKAction CreateChangeChargeBy (float by, double duration); - [Export ("velocity")] - CGVector Velocity { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeMassTo:duration:")] + SKAction CreateChangeMassTo (float newMass, double duration); - [Export ("angularVelocity")] - nfloat AngularVelocity { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeMassBy:duration:")] + SKAction CreateChangeMassBy (float by, double duration); - [Export ("applyForce:")] - void ApplyForce (CGVector force); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyForce:duration:")] + SKAction CreateApplyForce (CGVector force, double duration); - [Export ("applyForce:atPoint:")] - void ApplyForce (CGVector force, CGPoint point); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyForce:atPoint:duration:")] + SKAction CreateApplyForce (CGVector force, CGPoint point, double duration); - [Export ("applyTorque:")] - void ApplyTorque (nfloat torque); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyTorque:duration:")] + SKAction CreateApplyTorque (nfloat torque, double duration); - [Export ("applyImpulse:")] - void ApplyImpulse (CGVector impulse); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyImpulse:duration:")] + SKAction CreateApplyImpulse (CGVector impulse, double duration); - [Export ("applyImpulse:atPoint:")] - void ApplyImpulse (CGVector impulse, CGPoint point); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyImpulse:atPoint:duration:")] + SKAction CreateApplyImpulse (CGVector impulse, CGPoint point, double duration); - [Export ("applyAngularImpulse:")] - void ApplyAngularImpulse (nfloat impulse); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyAngularImpulse:duration:")] + SKAction CreateApplyAngularImpulse (nfloat impulse, double duration); - [Export ("allContactedBodies")] - SKPhysicsBody [] AllContactedBodies { get; } + // SKAction_SKAudioNode inlined - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithTexture:size:")] - SKPhysicsBody Create (SKTexture texture, CGSize size); + [MacCatalyst (13, 1)] + [Static] + [Export ("stereoPanTo:duration:")] + SKAction CreateStereoPanTo (float target, double duration); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithTexture:alphaThreshold:size:")] - SKPhysicsBody Create (SKTexture texture, float /* float, not CGFloat */ alphaThreshold, CGSize size); + [MacCatalyst (13, 1)] + [Static] + [Export ("stereoPanBy:duration:")] + SKAction CreateStereoPanBy (float by, double duration); - [MacCatalyst (13, 1)] - [Export ("charge")] - nfloat Charge { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeReverbTo:duration:")] + SKAction CreateChangeReverbTo (float target, double duration); - [MacCatalyst (13, 1)] - [Export ("fieldBitMask")] - uint FieldBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changeReverbBy:duration:")] + SKAction CreateChangeReverbBy (float by, double duration); - [MacCatalyst (13, 1)] - [Export ("pinned")] - bool Pinned { get; set; } - } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeObstructionTo:duration:")] + SKAction CreateChangeObstructionTo (float target, double duration); - /// Encapsulates the data of a collision between two s. - /// - /// - /// Apple documentation for SKPhysicsContact [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // An SKPhysicsContact object is created automatically by Scene Kit - partial interface SKPhysicsContact { + [Static] + [Export ("changeObstructionBy:duration:")] + SKAction CreateChangeObstructionBy (float by, double duration); - [Export ("bodyA")] - SKPhysicsBody BodyA { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeOcclusionTo:duration:")] + SKAction CreateChangeOcclusionTo (float target, double duration); - [Export ("bodyB")] - SKPhysicsBody BodyB { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeOcclusionBy:duration:")] + SKAction CreateChangeOcclusionBy (float by, double duration); - [Export ("contactPoint")] - CGPoint ContactPoint { get; } + // SKAction_SKWarpable - [Export ("collisionImpulse")] - nfloat CollisionImpulse { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("warpTo:duration:")] + [return: NullAllowed] + SKAction WarpTo (SKWarpGeometry warp, double duration); - [MacCatalyst (13, 1)] - [Export ("contactNormal")] - CGVector ContactNormal { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithWarps:times:")] + [return: NullAllowed] + SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times); - } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithWarps:times:restore:")] + [return: NullAllowed] + SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times, bool restore); +} - /// Interface representing the required methods (if any) of the protocol . - /// - /// This interface contains the required methods (if any) from the protocol defined by . - /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. - /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. - /// - interface ISKPhysicsContactDelegate { } +/// +[MacCatalyst (13, 1)] +[DisableDefaultCtor] // see https://bugzilla.xamarin.com/show_bug.cgi?id=14502 +[BaseType (typeof (NSObject))] +partial interface SKPhysicsBody : NSSecureCoding, NSCopying { - /// [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [Model] - [Protocol] - partial interface SKPhysicsContactDelegate { + [Static, Export ("bodyWithBodies:")] + SKPhysicsBody FromBodies (SKPhysicsBody [] bodies); - [Export ("didBeginContact:")] - void DidBeginContact (SKPhysicsContact contact); + [Static, Export ("bodyWithCircleOfRadius:")] + SKPhysicsBody CreateCircularBody (nfloat radius); - [Export ("didEndContact:")] - void DidEndContact (SKPhysicsContact contact); - } + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithCircleOfRadius:center:")] + SKPhysicsBody CreateCircularBody (nfloat radius, CGPoint center); - /// - delegate void SKPhysicsWorldBodiesEnumeratorHandler (SKPhysicsBody body, out bool stop); - /// The delegate used for enumerating bodies that fall along a ray when used with M:SpriteKit.SKPhysicsWorld.EnumerateBodies(System.Drawing.PointF,System.Drawing.PointF,SpriteKit.SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler*. - delegate void SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler (SKPhysicsBody body, CGPoint point, CGVector normal, out bool stop); + [Static, Export ("bodyWithRectangleOfSize:")] + SKPhysicsBody CreateRectangularBody (CGSize size); - /// [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject), - Delegates = new string [] { "WeakContactDelegate" }, - Events = new Type [] { typeof (SKPhysicsContactDelegate) })] - [DisableDefaultCtor] // You do not create SKPhysicsWorld objects directly; instead, read the physicsWorld property of an SKScene object. - partial interface SKPhysicsWorld : NSSecureCoding { + [Static, Export ("bodyWithRectangleOfSize:center:")] + SKPhysicsBody CreateRectangularBody (CGSize size, CGPoint center); - [Export ("gravity")] - CGVector Gravity { get; set; } + [Static, Export ("bodyWithPolygonFromPath:")] + SKPhysicsBody CreateBodyFromPath (CGPath path); - [Export ("speed")] - nfloat Speed { get; set; } + [Static, Export ("bodyWithEdgeFromPoint:toPoint:")] + SKPhysicsBody CreateEdge (CGPoint fromPoint, CGPoint toPoint); - [Export ("contactDelegate", ArgumentSemantic.Assign), NullAllowed] - NSObject WeakContactDelegate { get; set; } + [Static, Export ("bodyWithEdgeChainFromPath:")] + SKPhysicsBody CreateEdgeChain (CGPath path); - [Wrap ("WeakContactDelegate")] - ISKPhysicsContactDelegate ContactDelegate { get; set; } + [Static, Export ("bodyWithEdgeLoopFromPath:")] + SKPhysicsBody CreateEdgeLoop (CGPath path); - [Export ("addJoint:")] - void AddJoint (SKPhysicsJoint joint); + [Static, Export ("bodyWithEdgeLoopFromRect:")] + SKPhysicsBody CreateEdgeLoop (CGRect rect); - [Export ("removeJoint:")] - void RemoveJoint (SKPhysicsJoint joint); + [Export ("dynamic")] + bool Dynamic { [Bind ("isDynamic")] get; set; } - [Export ("removeAllJoints")] - void RemoveAllJoints (); + [Export ("usesPreciseCollisionDetection")] + bool UsesPreciseCollisionDetection { get; set; } - [Export ("bodyAtPoint:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGPoint point); + [Export ("allowsRotation")] + bool AllowsRotation { get; set; } - [Export ("bodyInRect:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGRect rect); + [Export ("resting")] + bool Resting { [Bind ("isResting")] get; set; } - [Export ("bodyAlongRayStart:end:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGPoint rayStart, CGPoint rayEnd); + [Export ("friction")] + nfloat Friction { get; set; } - [Export ("enumerateBodiesAtPoint:usingBlock:")] - void EnumerateBodies (CGPoint point, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + [Export ("restitution")] + nfloat Restitution { get; set; } - [Export ("enumerateBodiesInRect:usingBlock:")] - void EnumerateBodies (CGRect rect, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + [Export ("linearDamping", ArgumentSemantic.Assign)] + nfloat LinearDamping { get; set; } - [Export ("enumerateBodiesAlongRayStart:end:usingBlock:")] - void EnumerateBodies (CGPoint start, CGPoint end, SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler enumeratorHandler); + [Export ("angularDamping", ArgumentSemantic.Assign)] + nfloat AngularDamping { get; set; } - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("sampleFieldsAt:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector3 SampleFields (/* vector_float3 */ Vector3 position); - } + [Export ("density")] + nfloat Density { get; set; } - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [Abstract] // You never instantiate objects of this class directly - partial interface SKPhysicsJoint : NSSecureCoding { + [Export ("mass")] + nfloat Mass { get; set; } - [Export ("bodyA", ArgumentSemantic.Retain)] - SKPhysicsBody BodyA { get; set; } + [Export ("area")] + nfloat Area { get; } - [Export ("bodyB", ArgumentSemantic.Retain)] - SKPhysicsBody BodyB { get; set; } + [Export ("affectedByGravity", ArgumentSemantic.Assign)] + bool AffectedByGravity { get; set; } - [MacCatalyst (13, 1)] - [Export ("reactionForce")] - CGVector ReactionForce { get; } + [Export ("categoryBitMask", ArgumentSemantic.Assign)] + uint CategoryBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("reactionTorque")] - nfloat ReactionTorque { get; } - } + [Export ("collisionBitMask", ArgumentSemantic.Assign)] + uint CollisionBitMask { get; set; } /* uint32_t */ - /// A that pins two bodies to a common point. - /// - /// Apple documentation for SKPhysicsJointPin - [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchor` using the default ctor (see #14511) - partial interface SKPhysicsJointPin { + [Export ("contactTestBitMask", ArgumentSemantic.Assign)] + uint ContactTestBitMask { get; set; } /* uint32_t */ - [Static, Export ("jointWithBodyA:bodyB:anchor:")] - SKPhysicsJointPin Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); + [Export ("joints")] + SKPhysicsJoint [] Joints { get; } - [Export ("shouldEnableLimits")] - bool ShouldEnableLimits { get; set; } + [Export ("node", ArgumentSemantic.Weak)] + [NullAllowed] + SKNode Node { get; } - [Export ("lowerAngleLimit")] - nfloat LowerAngleLimit { get; set; } + [Export ("velocity")] + CGVector Velocity { get; set; } - [Export ("upperAngleLimit")] - nfloat UpperAngleLimit { get; set; } + [Export ("angularVelocity")] + nfloat AngularVelocity { get; set; } - [Export ("frictionTorque")] - nfloat FrictionTorque { get; set; } + [Export ("applyForce:")] + void ApplyForce (CGVector force); - [MacCatalyst (13, 1)] - [Export ("rotationSpeed")] - nfloat RotationSpeed { get; set; } - } + [Export ("applyForce:atPoint:")] + void ApplyForce (CGVector force, CGPoint point); - /// A that connects two bodies as if by a spring. - /// - /// Apple documentation for SKPhysicsJointSpring - [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) - partial interface SKPhysicsJointSpring { + [Export ("applyTorque:")] + void ApplyTorque (nfloat torque); - [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] - SKPhysicsJointSpring Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); + [Export ("applyImpulse:")] + void ApplyImpulse (CGVector impulse); - [Export ("damping")] - nfloat Damping { get; set; } + [Export ("applyImpulse:atPoint:")] + void ApplyImpulse (CGVector impulse, CGPoint point); - [Export ("frequency")] - nfloat Frequency { get; set; } - } + [Export ("applyAngularImpulse:")] + void ApplyAngularImpulse (nfloat impulse); - /// A that rigidly connects two bodies. - /// - /// At least one of the s must have its property set to or this will not behave properly. - /// - /// Apple documentation for SKPhysicsJointFixed + [Export ("allContactedBodies")] + SKPhysicsBody [] AllContactedBodies { get; } + + // + // iOS 8 + // [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // https://bugzilla.xamarin.com/show_bug.cgi?id=14511 - partial interface SKPhysicsJointFixed { + [Static, Export ("bodyWithTexture:size:")] + SKPhysicsBody Create (SKTexture texture, CGSize size); - [Static, Export ("jointWithBodyA:bodyB:anchor:")] - SKPhysicsJointFixed Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); - } + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithTexture:alphaThreshold:size:")] + SKPhysicsBody Create (SKTexture texture, float /* float, not CGFloat */ alphaThreshold, CGSize size); - /// A that connects two bodies as if by a sliding rod. - /// - /// Apple documentation for SKPhysicsJointSliding [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchor` and `axis` using the default ctor (see #14511) - partial interface SKPhysicsJointSliding { + [Export ("charge")] + nfloat Charge { get; set; } - [Static, Export ("jointWithBodyA:bodyB:anchor:axis:")] - SKPhysicsJointSliding Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor, CGVector axis); + [MacCatalyst (13, 1)] + [Export ("fieldBitMask")] + uint FieldBitMask { get; set; } /* uint32_t */ - [Export ("shouldEnableLimits")] - bool ShouldEnableLimits { get; set; } + [MacCatalyst (13, 1)] + [Export ("pinned")] + bool Pinned { get; set; } +} - [Export ("lowerDistanceLimit")] - nfloat LowerDistanceLimit { get; set; } +/// Encapsulates the data of a collision between two s. +/// +/// +/// Apple documentation for SKPhysicsContact +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] // An SKPhysicsContact object is created automatically by Scene Kit +partial interface SKPhysicsContact { - [Export ("upperDistanceLimit")] - nfloat UpperDistanceLimit { get; set; } - } + [Export ("bodyA")] + SKPhysicsBody BodyA { get; } - /// A that connects two bodies as if by a rope. - /// - /// Apple documentation for SKPhysicsJointLimit - [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) - partial interface SKPhysicsJointLimit { + [Export ("bodyB")] + SKPhysicsBody BodyB { get; } - [Export ("maxLength")] - nfloat MaxLength { get; set; } + [Export ("contactPoint")] + CGPoint ContactPoint { get; } - [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] - SKPhysicsJointLimit Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); - } + [Export ("collisionImpulse")] + nfloat CollisionImpulse { get; } - /// Defines a range for acceptable float values. - /// - /// Apple documentation for SKRange [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKRange : NSSecureCoding, NSCopying { - [DesignatedInitializer] - [Export ("initWithLowerLimit:upperLimit:")] - NativeHandle Constructor (nfloat lowerLimit, nfloat upperLimier); + [Export ("contactNormal")] + CGVector ContactNormal { get; } - [Export ("lowerLimit")] - nfloat LowerLimit { get; set; } +} - [Export ("upperLimit")] - nfloat UpperLimit { get; set; } +/// Interface representing the required methods (if any) of the protocol . +/// +/// This interface contains the required methods (if any) from the protocol defined by . +/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. +/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. +/// +interface ISKPhysicsContactDelegate { } + +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[Model] +[Protocol] +partial interface SKPhysicsContactDelegate { + + [Export ("didBeginContact:")] + void DidBeginContact (SKPhysicsContact contact); + + [Export ("didEndContact:")] + void DidEndContact (SKPhysicsContact contact); +} - [Static, Export ("rangeWithLowerLimit:upperLimit:")] - SKRange Create (nfloat lower, nfloat upper); +/// +delegate void SKPhysicsWorldBodiesEnumeratorHandler (SKPhysicsBody body, out bool stop); +/// The delegate used for enumerating bodies that fall along a ray when used with M:SpriteKit.SKPhysicsWorld.EnumerateBodies(System.Drawing.PointF,System.Drawing.PointF,SpriteKit.SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler*. +delegate void SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler (SKPhysicsBody body, CGPoint point, CGVector normal, out bool stop); - [Static, Export ("rangeWithLowerLimit:")] - SKRange CreateWithLowerLimit (nfloat lower); +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject), + Delegates = new string [] { "WeakContactDelegate" }, + Events = new Type [] { typeof (SKPhysicsContactDelegate) })] +[DisableDefaultCtor] // You do not create SKPhysicsWorld objects directly; instead, read the physicsWorld property of an SKScene object. +partial interface SKPhysicsWorld : NSSecureCoding { - [Static, Export ("rangeWithUpperLimit:")] - SKRange CreateWithUpperLimit (nfloat upper); + [Export ("gravity")] + CGVector Gravity { get; set; } - [Static, Export ("rangeWithConstantValue:")] - SKRange CreateConstant (nfloat value); + [Export ("speed")] + nfloat Speed { get; set; } - [Static, Export ("rangeWithValue:variance:")] - SKRange CreateWithVariance (nfloat value, nfloat variance); + [Export ("contactDelegate", ArgumentSemantic.Assign), NullAllowed] + NSObject WeakContactDelegate { get; set; } - [Static, Export ("rangeWithNoLimits")] - SKRange CreateUnlimited (); - } + [Wrap ("WeakContactDelegate")] + ISKPhysicsContactDelegate ContactDelegate { get; set; } - /// A that holds audio information. - /// - /// Apple documentation for SKAudioNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - [DisableDefaultCtor] - interface SKAudioNode : NSSecureCoding { - [Export ("initWithAVAudioNode:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] AVAudioNode node); + [Export ("addJoint:")] + void AddJoint (SKPhysicsJoint joint); - [Export ("initWithFileNamed:")] - NativeHandle Constructor (string fileName); + [Export ("removeJoint:")] + void RemoveJoint (SKPhysicsJoint joint); - [Export ("initWithURL:")] - NativeHandle Constructor (NSUrl url); + [Export ("removeAllJoints")] + void RemoveAllJoints (); - [NullAllowed, Export ("avAudioNode", ArgumentSemantic.Retain)] - AVAudioNode AvAudioNode { get; set; } + [Export ("bodyAtPoint:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGPoint point); - [Export ("autoplayLooped")] - bool AutoplayLooped { get; set; } + [Export ("bodyInRect:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGRect rect); - [Export ("positional")] - bool Positional { [Bind ("isPositional")] get; set; } - } + [Export ("bodyAlongRayStart:end:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGPoint rayStart, CGPoint rayEnd); - /// A node that specifies the position inside a from which it can be rendered. - /// - /// Apple documentation for SKCameraNode + [Export ("enumerateBodiesAtPoint:usingBlock:")] + void EnumerateBodies (CGPoint point, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + + [Export ("enumerateBodiesInRect:usingBlock:")] + void EnumerateBodies (CGRect rect, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + + [Export ("enumerateBodiesAlongRayStart:end:usingBlock:")] + void EnumerateBodies (CGPoint start, CGPoint end, SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler enumeratorHandler); + + // + // iOS 8 + // [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKCameraNode { - [Export ("containsNode:")] - bool Contains (SKNode node); + [Export ("sampleFieldsAt:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector3 SampleFields (/* vector_float3 */ Vector3 position); +} - [Export ("containedNodeSet")] - NSSet ContainedNodeSet { get; } - } +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[Abstract] // You never instantiate objects of this class directly +partial interface SKPhysicsJoint : NSSecureCoding { + + [Export ("bodyA", ArgumentSemantic.Retain)] + SKPhysicsBody BodyA { get; set; } + + [Export ("bodyB", ArgumentSemantic.Retain)] + SKPhysicsBody BodyB { get; set; } - /// A that holds an archived collection of child nodes that can be used in multiple places throughout the game. - /// - /// Apple documentation for SKReferenceNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - [DisableDefaultCtor] - interface SKReferenceNode { - [Export ("initWithURL:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] NSUrl url); + [Export ("reactionForce")] + CGVector ReactionForce { get; } - [Export ("initWithFileNamed:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] string fileName); + [MacCatalyst (13, 1)] + [Export ("reactionTorque")] + nfloat ReactionTorque { get; } +} - [Static] - [Export ("referenceNodeWithFileNamed:")] - SKReferenceNode FromFile (string fileName); +/// A that pins two bodies to a common point. +/// +/// Apple documentation for SKPhysicsJointPin +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchor` using the default ctor (see #14511) +partial interface SKPhysicsJointPin { - [Static] - [Export ("referenceNodeWithURL:")] - SKReferenceNode FromUrl (NSUrl referenceUrl); + [Static, Export ("jointWithBodyA:bodyB:anchor:")] + SKPhysicsJointPin Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); - [Export ("didLoadReferenceNode:")] - void DidLoadReferenceNode ([NullAllowed] SKNode node); + [Export ("shouldEnableLimits")] + bool ShouldEnableLimits { get; set; } - [Export ("resolveReferenceNode")] - void Resolve (); - } + [Export ("lowerAngleLimit")] + nfloat LowerAngleLimit { get; set; } + + [Export ("upperAngleLimit")] + nfloat UpperAngleLimit { get; set; } + + [Export ("frictionTorque")] + nfloat FrictionTorque { get; set; } - /// Holds per-node data to be used with a custom shader. - /// - /// Apple documentation for SKAttribute [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface SKAttribute : NSSecureCoding { - [Static] - [Export ("attributeWithName:type:")] - SKAttribute Create (string name, SKAttributeType type); + [Export ("rotationSpeed")] + nfloat RotationSpeed { get; set; } +} - [Export ("initWithName:type:")] - [DesignatedInitializer] - NativeHandle Constructor (string name, SKAttributeType type); +/// A that connects two bodies as if by a spring. +/// +/// Apple documentation for SKPhysicsJointSpring +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) +partial interface SKPhysicsJointSpring { - [Export ("name")] - string Name { get; } + [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] + SKPhysicsJointSpring Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); - [Export ("type")] - SKAttributeType Type { get; } - } + [Export ("damping")] + nfloat Damping { get; set; } - /// Holds the value, of the appropriate , for an . - /// - /// Apple documentation for SKAttributeValue - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // DesignatedInitializer below - interface SKAttributeValue : NSSecureCoding { - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); + [Export ("frequency")] + nfloat Frequency { get; set; } +} - [Static] - [Export ("valueWithFloat:")] - SKAttributeValue Create (float value); +/// A that rigidly connects two bodies. +/// +/// At least one of the s must have its property set to or this will not behave properly. +/// +/// Apple documentation for SKPhysicsJointFixed +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // https://bugzilla.xamarin.com/show_bug.cgi?id=14511 +partial interface SKPhysicsJointFixed { + + [Static, Export ("jointWithBodyA:bodyB:anchor:")] + SKPhysicsJointFixed Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); +} - [Static] - [Export ("valueWithVectorFloat2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector2 value); +/// A that connects two bodies as if by a sliding rod. +/// +/// Apple documentation for SKPhysicsJointSliding +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchor` and `axis` using the default ctor (see #14511) +partial interface SKPhysicsJointSliding { - [Static] - [Export ("valueWithVectorFloat3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector3 value); + [Static, Export ("jointWithBodyA:bodyB:anchor:axis:")] + SKPhysicsJointSliding Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor, CGVector axis); - [Static] - [Export ("valueWithVectorFloat4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector4 value); - - [Export ("floatValue")] - float FloatValue { get; set; } - - [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] - Vector2 VectorFloat2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] - Vector3 VectorFloat3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] - Vector4 VectorFloat4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - } + [Export ("shouldEnableLimits")] + bool ShouldEnableLimits { get; set; } - /// A single kind of tile in a tile map. - /// - /// Apple documentation for SKTileDefinition - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface SKTileDefinition : NSCopying, NSSecureCoding { - [Static] - [Export ("tileDefinitionWithTexture:")] - SKTileDefinition Create (SKTexture texture); + [Export ("lowerDistanceLimit")] + nfloat LowerDistanceLimit { get; set; } - [Static] - [Export ("tileDefinitionWithTexture:size:")] - SKTileDefinition Create (SKTexture texture, CGSize size); + [Export ("upperDistanceLimit")] + nfloat UpperDistanceLimit { get; set; } +} + +/// A that connects two bodies as if by a rope. +/// +/// Apple documentation for SKPhysicsJointLimit +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) +partial interface SKPhysicsJointLimit { + + [Export ("maxLength")] + nfloat MaxLength { get; set; } + + [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] + SKPhysicsJointLimit Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); +} - [Static] - [Export ("tileDefinitionWithTexture:normalTexture:size:")] - SKTileDefinition Create (SKTexture texture, SKTexture normalTexture, CGSize size); +/// Defines a range for acceptable float values. +/// +/// Apple documentation for SKRange +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKRange : NSSecureCoding, NSCopying { + [DesignatedInitializer] + [Export ("initWithLowerLimit:upperLimit:")] + NativeHandle Constructor (nfloat lowerLimit, nfloat upperLimier); - [Static] - [Export ("tileDefinitionWithTextures:size:timePerFrame:")] - SKTileDefinition Create (SKTexture [] textures, CGSize size, nfloat timePerFrame); + [Export ("lowerLimit")] + nfloat LowerLimit { get; set; } - [Static] - [Export ("tileDefinitionWithTextures:normalTextures:size:timePerFrame:")] - SKTileDefinition Create (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); + [Export ("upperLimit")] + nfloat UpperLimit { get; set; } - [Export ("initWithTexture:")] - NativeHandle Constructor (SKTexture texture); + [Static, Export ("rangeWithLowerLimit:upperLimit:")] + SKRange Create (nfloat lower, nfloat upper); - [Export ("initWithTexture:size:")] - NativeHandle Constructor (SKTexture texture, CGSize size); + [Static, Export ("rangeWithLowerLimit:")] + SKRange CreateWithLowerLimit (nfloat lower); - [Export ("initWithTexture:normalTexture:size:")] - NativeHandle Constructor (SKTexture texture, SKTexture normalTexture, CGSize size); + [Static, Export ("rangeWithUpperLimit:")] + SKRange CreateWithUpperLimit (nfloat upper); - [Export ("initWithTextures:size:timePerFrame:")] - NativeHandle Constructor (SKTexture [] textures, CGSize size, nfloat timePerFrame); + [Static, Export ("rangeWithConstantValue:")] + SKRange CreateConstant (nfloat value); - [Export ("initWithTextures:normalTextures:size:timePerFrame:")] - NativeHandle Constructor (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); + [Static, Export ("rangeWithValue:variance:")] + SKRange CreateWithVariance (nfloat value, nfloat variance); - [Export ("textures", ArgumentSemantic.Copy)] - SKTexture [] Textures { get; set; } + [Static, Export ("rangeWithNoLimits")] + SKRange CreateUnlimited (); +} - [Export ("normalTextures", ArgumentSemantic.Copy)] - SKTexture [] NormalTextures { get; set; } +/// A that holds audio information. +/// +/// Apple documentation for SKAudioNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +[DisableDefaultCtor] +interface SKAudioNode : NSSecureCoding { + [Export ("initWithAVAudioNode:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] AVAudioNode node); - [NullAllowed, Export ("userData", ArgumentSemantic.Retain)] - NSMutableDictionary UserData { get; set; } + [Export ("initWithFileNamed:")] + NativeHandle Constructor (string fileName); - [NullAllowed, Export ("name")] - string Name { get; set; } + [Export ("initWithURL:")] + NativeHandle Constructor (NSUrl url); - [Export ("size", ArgumentSemantic.Assign)] - CGSize Size { get; set; } + [NullAllowed, Export ("avAudioNode", ArgumentSemantic.Retain)] + AVAudioNode AvAudioNode { get; set; } - [Export ("timePerFrame")] - nfloat TimePerFrame { get; set; } + [Export ("autoplayLooped")] + bool AutoplayLooped { get; set; } - [Export ("placementWeight")] - nuint PlacementWeight { get; set; } + [Export ("positional")] + bool Positional { [Bind ("isPositional")] get; set; } +} - [Export ("rotation", ArgumentSemantic.Assign)] - SKTileDefinitionRotation Rotation { get; set; } +/// A node that specifies the position inside a from which it can be rendered. +/// +/// Apple documentation for SKCameraNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKCameraNode { + [Export ("containsNode:")] + bool Contains (SKNode node); + + [Export ("containedNodeSet")] + NSSet ContainedNodeSet { get; } +} - [Export ("flipVertically")] - bool FlipVertically { get; set; } +/// A that holds an archived collection of child nodes that can be used in multiple places throughout the game. +/// +/// Apple documentation for SKReferenceNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +[DisableDefaultCtor] +interface SKReferenceNode { + [Export ("initWithURL:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] NSUrl url); + + [Export ("initWithFileNamed:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] string fileName); + + [Static] + [Export ("referenceNodeWithFileNamed:")] + SKReferenceNode FromFile (string fileName); + + [Static] + [Export ("referenceNodeWithURL:")] + SKReferenceNode FromUrl (NSUrl referenceUrl); + + [Export ("didLoadReferenceNode:")] + void DidLoadReferenceNode ([NullAllowed] SKNode node); + + [Export ("resolveReferenceNode")] + void Resolve (); +} - [Export ("flipHorizontally")] - bool FlipHorizontally { get; set; } +/// Holds per-node data to be used with a custom shader. +/// +/// Apple documentation for SKAttribute +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +interface SKAttribute : NSSecureCoding { + [Static] + [Export ("attributeWithName:type:")] + SKAttribute Create (string name, SKAttributeType type); + + [Export ("initWithName:type:")] + [DesignatedInitializer] + NativeHandle Constructor (string name, SKAttributeType type); + + [Export ("name")] + string Name { get; } + + [Export ("type")] + SKAttributeType Type { get; } +} + +/// Holds the value, of the appropriate , for an . +/// +/// Apple documentation for SKAttributeValue +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] // DesignatedInitializer below +interface SKAttributeValue : NSSecureCoding { + [DesignatedInitializer] + [Export ("init")] + NativeHandle Constructor (); + + [Static] + [Export ("valueWithFloat:")] + SKAttributeValue Create (float value); + + [Static] + [Export ("valueWithVectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKAttributeValue Create (Vector2 value); + + [Static] + [Export ("valueWithVectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKAttributeValue Create (Vector3 value); + + [Static] + [Export ("valueWithVectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKAttributeValue Create (Vector4 value); + + [Export ("floatValue")] + float FloatValue { get; set; } + + [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] + Vector2 VectorFloat2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; } - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKTileMapNode : NSCopying, NSSecureCoding { - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); + [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] + Vector3 VectorFloat3Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); + [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] + Vector4 VectorFloat4Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } +} - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:tileGroupLayout:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); +/// A single kind of tile in a tile map. +/// +/// Apple documentation for SKTileDefinition +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +interface SKTileDefinition : NSCopying, NSSecureCoding { + [Static] + [Export ("tileDefinitionWithTexture:")] + SKTileDefinition Create (SKTexture texture); - [Export ("initWithTileSet:columns:rows:tileSize:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); + [Static] + [Export ("tileDefinitionWithTexture:size:")] + SKTileDefinition Create (SKTexture texture, CGSize size); - [Export ("initWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); + [Static] + [Export ("tileDefinitionWithTexture:normalTexture:size:")] + SKTileDefinition Create (SKTexture texture, SKTexture normalTexture, CGSize size); - [Export ("initWithTileSet:columns:rows:tileSize:tileGroupLayout:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); + [Static] + [Export ("tileDefinitionWithTextures:size:timePerFrame:")] + SKTileDefinition Create (SKTexture [] textures, CGSize size, nfloat timePerFrame); - [Export ("numberOfColumns")] - nuint NumberOfColumns { get; set; } + [Static] + [Export ("tileDefinitionWithTextures:normalTextures:size:timePerFrame:")] + SKTileDefinition Create (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); - [Export ("numberOfRows")] - nuint NumberOfRows { get; set; } + [Export ("initWithTexture:")] + NativeHandle Constructor (SKTexture texture); - [Export ("tileSize", ArgumentSemantic.Assign)] - CGSize TileSize { get; set; } + [Export ("initWithTexture:size:")] + NativeHandle Constructor (SKTexture texture, CGSize size); - [Export ("mapSize")] - CGSize MapSize { get; } + [Export ("initWithTexture:normalTexture:size:")] + NativeHandle Constructor (SKTexture texture, SKTexture normalTexture, CGSize size); - [Export ("tileSet", ArgumentSemantic.Assign)] - SKTileSet TileSet { get; set; } + [Export ("initWithTextures:size:timePerFrame:")] + NativeHandle Constructor (SKTexture [] textures, CGSize size, nfloat timePerFrame); - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("initWithTextures:normalTextures:size:timePerFrame:")] + NativeHandle Constructor (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); - [Export ("color", ArgumentSemantic.Retain)] - UIColor Color { get; set; } + [Export ("textures", ArgumentSemantic.Copy)] + SKTexture [] Textures { get; set; } - [Export ("blendMode", ArgumentSemantic.Assign)] - SKBlendMode BlendMode { get; set; } + [Export ("normalTextures", ArgumentSemantic.Copy)] + SKTexture [] NormalTextures { get; set; } - [Export ("anchorPoint", ArgumentSemantic.Assign)] - CGPoint AnchorPoint { get; set; } + [NullAllowed, Export ("userData", ArgumentSemantic.Retain)] + NSMutableDictionary UserData { get; set; } - [NullAllowed, Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [NullAllowed, Export ("name")] + string Name { get; set; } - [Export ("lightingBitMask")] - uint LightingBitMask { get; set; } + [Export ("size", ArgumentSemantic.Assign)] + CGSize Size { get; set; } - [Export ("enableAutomapping")] - bool EnableAutomapping { get; set; } + [Export ("timePerFrame")] + nfloat TimePerFrame { get; set; } - [Export ("fillWithTileGroup:")] - void Fill ([NullAllowed] SKTileGroup tileGroup); + [Export ("placementWeight")] + nuint PlacementWeight { get; set; } - [Export ("tileDefinitionAtColumn:row:")] - [return: NullAllowed] - SKTileDefinition GetTileDefinition (nuint column, nuint row); + [Export ("rotation", ArgumentSemantic.Assign)] + SKTileDefinitionRotation Rotation { get; set; } - [Export ("tileGroupAtColumn:row:")] - [return: NullAllowed] - SKTileGroup GetTileGroup (nuint column, nuint row); + [Export ("flipVertically")] + bool FlipVertically { get; set; } - [Export ("setTileGroup:forColumn:row:")] - void SetTileGroup ([NullAllowed] SKTileGroup tileGroup, nuint column, nuint row); + [Export ("flipHorizontally")] + bool FlipHorizontally { get; set; } +} - [Export ("setTileGroup:andTileDefinition:forColumn:row:")] - void SetTileGroup (SKTileGroup tileGroup, SKTileDefinition tileDefinition, nuint column, nuint row); +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKTileMapNode : NSCopying, NSSecureCoding { + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); - [Export ("tileColumnIndexFromPosition:")] - nuint GetTileColumnIndex (CGPoint position); + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); - [Export ("tileRowIndexFromPosition:")] - nuint GetTileRowIndex (CGPoint position); + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:tileGroupLayout:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); - [Export ("centerOfTileAtColumn:row:")] - CGPoint GetCenterOfTile (nuint column, nuint row); + [Export ("initWithTileSet:columns:rows:tileSize:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); -#if !WATCH - // Static Category from GameplayKit - [NoWatch] - [MacCatalyst (13, 1)] - [Static] - [Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")] - SKTileMapNode [] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber [] thresholds); -#endif + [Export ("initWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [Export ("initWithTileSet:columns:rows:tileSize:tileGroupLayout:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [Export ("numberOfColumns")] + nuint NumberOfColumns { get; set; } - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [Export ("numberOfRows")] + nuint NumberOfRows { get; set; } - /// Represents the possible elements of a in the form of objects. - /// - /// An collects a set of related objects that may be placed on a . Additionally, it may define a default tile group and tile size. - /// - /// Apple documentation for SKTileSet - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKTileSet : NSCopying, NSSecureCoding { - [Static] - [Export ("tileSetWithTileGroups:")] - SKTileSet Create (SKTileGroup [] tileGroups); + [Export ("tileSize", ArgumentSemantic.Assign)] + CGSize TileSize { get; set; } - [Static] - [Export ("tileSetWithTileGroups:tileSetType:")] - SKTileSet Create (SKTileGroup [] tileGroups, SKTileSetType tileSetType); + [Export ("mapSize")] + CGSize MapSize { get; } - [Export ("initWithTileGroups:")] - NativeHandle Constructor (SKTileGroup [] tileGroups); + [Export ("tileSet", ArgumentSemantic.Assign)] + SKTileSet TileSet { get; set; } - [Export ("initWithTileGroups:tileSetType:")] - NativeHandle Constructor (SKTileGroup [] tileGroups, SKTileSetType tileSetType); + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Static] - [Export ("tileSetNamed:")] - [return: NullAllowed] - SKTileSet FromName (string name); + [Export ("color", ArgumentSemantic.Retain)] + UIColor Color { get; set; } - [Static] - [Export ("tileSetFromURL:")] - [return: NullAllowed] - SKTileSet FromUrl (NSUrl url); + [Export ("blendMode", ArgumentSemantic.Assign)] + SKBlendMode BlendMode { get; set; } - [Export ("tileGroups", ArgumentSemantic.Copy)] - SKTileGroup [] TileGroups { get; set; } + [Export ("anchorPoint", ArgumentSemantic.Assign)] + CGPoint AnchorPoint { get; set; } - [NullAllowed, Export ("name")] - string Name { get; set; } + [NullAllowed, Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - [Export ("type", ArgumentSemantic.Assign)] - SKTileSetType Type { get; set; } + [Export ("lightingBitMask")] + uint LightingBitMask { get; set; } - [NullAllowed, Export ("defaultTileGroup", ArgumentSemantic.Assign)] - SKTileGroup DefaultTileGroup { get; set; } + [Export ("enableAutomapping")] + bool EnableAutomapping { get; set; } - [Export ("defaultTileSize", ArgumentSemantic.Assign)] - CGSize DefaultTileSize { get; set; } - } + [Export ("fillWithTileGroup:")] + void Fill ([NullAllowed] SKTileGroup tileGroup); - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKTileGroup : NSCopying, NSSecureCoding { - [Static] - [Export ("tileGroupWithTileDefinition:")] - SKTileGroup Create (SKTileDefinition tileDefinition); + [Export ("tileDefinitionAtColumn:row:")] + [return: NullAllowed] + SKTileDefinition GetTileDefinition (nuint column, nuint row); - [Static] - [Export ("tileGroupWithRules:")] - SKTileGroup Create (SKTileGroupRule [] rules); + [Export ("tileGroupAtColumn:row:")] + [return: NullAllowed] + SKTileGroup GetTileGroup (nuint column, nuint row); - [Static] - [Export ("emptyTileGroup")] - SKTileGroup CreateEmpty (); + [Export ("setTileGroup:forColumn:row:")] + void SetTileGroup ([NullAllowed] SKTileGroup tileGroup, nuint column, nuint row); - [Export ("initWithTileDefinition:")] - NativeHandle Constructor (SKTileDefinition tileDefinition); + [Export ("setTileGroup:andTileDefinition:forColumn:row:")] + void SetTileGroup (SKTileGroup tileGroup, SKTileDefinition tileDefinition, nuint column, nuint row); - [Export ("initWithRules:")] - NativeHandle Constructor (SKTileGroupRule [] rules); + [Export ("tileColumnIndexFromPosition:")] + nuint GetTileColumnIndex (CGPoint position); - [Export ("rules", ArgumentSemantic.Copy)] - SKTileGroupRule [] Rules { get; set; } + [Export ("tileRowIndexFromPosition:")] + nuint GetTileRowIndex (CGPoint position); - [NullAllowed, Export ("name")] - string Name { get; set; } - } + [Export ("centerOfTileAtColumn:row:")] + CGPoint GetCenterOfTile (nuint column, nuint row); - /// Defines adjacency rules for tiles in an . - /// - /// Apple documentation for SKTileGroupRule + // Static Category from GameplayKit [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKTileGroupRule : NSCopying, NSSecureCoding { - [Static] - [Export ("tileGroupRuleWithAdjacency:tileDefinitions:")] - SKTileGroupRule Create (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + [Static] + [Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")] + SKTileMapNode [] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber [] thresholds); - [Export ("initWithAdjacency:tileDefinitions:")] - NativeHandle Constructor (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [Export ("adjacency", ArgumentSemantic.Assign)] - SKTileAdjacencyMask Adjacency { get; set; } + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [Export ("tileDefinitions", ArgumentSemantic.Copy)] - SKTileDefinition [] TileDefinitions { get; set; } + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [NullAllowed, Export ("name")] - string Name { get; set; } - } +/// Represents the possible elements of a in the form of objects. +/// +/// An collects a set of related objects that may be placed on a . Additionally, it may define a default tile group and tile size. +/// +/// Apple documentation for SKTileSet +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKTileSet : NSCopying, NSSecureCoding { + [Static] + [Export ("tileSetWithTileGroups:")] + SKTileSet Create (SKTileGroup [] tileGroups); - /// Defines geometry deformation on objects. - /// - /// Apple documentation for SKWarpGeometry - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKWarpGeometry : NSCopying, NSSecureCoding { } + [Static] + [Export ("tileSetWithTileGroups:tileSetType:")] + SKTileSet Create (SKTileGroup [] tileGroups, SKTileSetType tileSetType); - /// Associates a and subdivision levels with an implementation. - [MacCatalyst (13, 1)] - [Protocol] - interface SKWarpable { - [Abstract] - [NullAllowed, Export ("warpGeometry", ArgumentSemantic.Assign)] - SKWarpGeometry WarpGeometry { get; set; } + [Export ("initWithTileGroups:")] + NativeHandle Constructor (SKTileGroup [] tileGroups); - [Abstract] - [Export ("subdivisionLevels")] - nint SubdivisionLevels { get; set; } - } + [Export ("initWithTileGroups:tileSetType:")] + NativeHandle Constructor (SKTileGroup [] tileGroups, SKTileSetType tileSetType); - /// A subclass that defines a warpable grid. - /// - /// Apple documentation for SKWarpGeometryGrid - [MacCatalyst (13, 1)] - [BaseType (typeof (SKWarpGeometry))] - [DisableDefaultCtor] - interface SKWarpGeometryGrid : NSSecureCoding { - [Static] - [Export ("grid")] - SKWarpGeometryGrid GetGrid (); + [Static] + [Export ("tileSetNamed:")] + [return: NullAllowed] + SKTileSet FromName (string name); - [Static] - [Export ("gridWithColumns:rows:")] - SKWarpGeometryGrid Create (nint cols, nint rows); + [Static] + [Export ("tileSetFromURL:")] + [return: NullAllowed] + SKTileSet FromUrl (NSUrl url); - [Internal] - [Static] - [Export ("gridWithColumns:rows:sourcePositions:destPositions:")] - SKWarpGeometryGrid GridWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + [Export ("tileGroups", ArgumentSemantic.Copy)] + SKTileGroup [] TileGroups { get; set; } - [Internal] - [DesignatedInitializer] - [Export ("initWithColumns:rows:sourcePositions:destPositions:")] - IntPtr InitWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + [NullAllowed, Export ("name")] + string Name { get; set; } - [Export ("numberOfColumns")] - nint NumberOfColumns { get; } + [Export ("type", ArgumentSemantic.Assign)] + SKTileSetType Type { get; set; } - [Export ("numberOfRows")] - nint NumberOfRows { get; } + [NullAllowed, Export ("defaultTileGroup", ArgumentSemantic.Assign)] + SKTileGroup DefaultTileGroup { get; set; } - [Export ("vertexCount")] - nint VertexCount { get; } + [Export ("defaultTileSize", ArgumentSemantic.Assign)] + CGSize DefaultTileSize { get; set; } +} - [Export ("sourcePositionAtIndex:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector2 GetSourcePosition (nint index); +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKTileGroup : NSCopying, NSSecureCoding { + [Static] + [Export ("tileGroupWithTileDefinition:")] + SKTileGroup Create (SKTileDefinition tileDefinition); - [Export ("destPositionAtIndex:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector2 GetDestPosition (nint index); + [Static] + [Export ("tileGroupWithRules:")] + SKTileGroup Create (SKTileGroupRule [] rules); - [Internal] - [Export ("gridByReplacingSourcePositions:")] - SKWarpGeometryGrid _GridByReplacingSourcePositions (IntPtr sourcePositions); + [Static] + [Export ("emptyTileGroup")] + SKTileGroup CreateEmpty (); - [Internal] - [Export ("gridByReplacingDestPositions:")] - SKWarpGeometryGrid _GridByReplacingDestPositions (IntPtr destPositions); - } + [Export ("initWithTileDefinition:")] + NativeHandle Constructor (SKTileDefinition tileDefinition); - // SKRenderer is not available for WatchKit apps and the iOS simulator - /// The class used to render SpriteKit. - [NoWatch] - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface SKRenderer { - [Static] - [Export ("rendererWithDevice:")] - SKRenderer FromDevice (IMTLDevice device); + [Export ("initWithRules:")] + NativeHandle Constructor (SKTileGroupRule [] rules); + + [Export ("rules", ArgumentSemantic.Copy)] + SKTileGroupRule [] Rules { get; set; } + + [NullAllowed, Export ("name")] + string Name { get; set; } +} + +/// Defines adjacency rules for tiles in an . +/// +/// Apple documentation for SKTileGroupRule +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKTileGroupRule : NSCopying, NSSecureCoding { + [Static] + [Export ("tileGroupRuleWithAdjacency:tileDefinitions:")] + SKTileGroupRule Create (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + + [Export ("initWithAdjacency:tileDefinitions:")] + NativeHandle Constructor (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + + [Export ("adjacency", ArgumentSemantic.Assign)] + SKTileAdjacencyMask Adjacency { get; set; } + + [Export ("tileDefinitions", ArgumentSemantic.Copy)] + SKTileDefinition [] TileDefinitions { get; set; } + + [NullAllowed, Export ("name")] + string Name { get; set; } +} + +/// Defines geometry deformation on objects. +/// +/// Apple documentation for SKWarpGeometry +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKWarpGeometry : NSCopying, NSSecureCoding { } + +/// Associates a and subdivision levels with an implementation. +[MacCatalyst (13, 1)] +[Protocol] +interface SKWarpable { + [Abstract] + [NullAllowed, Export ("warpGeometry", ArgumentSemantic.Assign)] + SKWarpGeometry WarpGeometry { get; set; } + + [Abstract] + [Export ("subdivisionLevels")] + nint SubdivisionLevels { get; set; } +} - [Export ("renderWithViewport:commandBuffer:renderPassDescriptor:")] - void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); +/// A subclass that defines a warpable grid. +/// +/// Apple documentation for SKWarpGeometryGrid +[MacCatalyst (13, 1)] +[BaseType (typeof (SKWarpGeometry))] +[DisableDefaultCtor] +interface SKWarpGeometryGrid : NSSecureCoding { + [Static] + [Export ("grid")] + SKWarpGeometryGrid GetGrid (); + + [Static] + [Export ("gridWithColumns:rows:")] + SKWarpGeometryGrid Create (nint cols, nint rows); + + [Internal] + [Static] + [Export ("gridWithColumns:rows:sourcePositions:destPositions:")] + SKWarpGeometryGrid GridWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + + [Internal] + [DesignatedInitializer] + [Export ("initWithColumns:rows:sourcePositions:destPositions:")] + IntPtr InitWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + + [Export ("numberOfColumns")] + nint NumberOfColumns { get; } + + [Export ("numberOfRows")] + nint NumberOfRows { get; } + + [Export ("vertexCount")] + nint VertexCount { get; } + + [Export ("sourcePositionAtIndex:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector2 GetSourcePosition (nint index); + + [Export ("destPositionAtIndex:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector2 GetDestPosition (nint index); + + [Internal] + [Export ("gridByReplacingSourcePositions:")] + SKWarpGeometryGrid _GridByReplacingSourcePositions (IntPtr sourcePositions); + + [Internal] + [Export ("gridByReplacingDestPositions:")] + SKWarpGeometryGrid _GridByReplacingDestPositions (IntPtr destPositions); +} + +// SKRenderer is not available for WatchKit apps and the iOS simulator +/// The class used to render SpriteKit. +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +interface SKRenderer { + [Static] + [Export ("rendererWithDevice:")] + SKRenderer FromDevice (IMTLDevice device); + + [Export ("renderWithViewport:commandBuffer:renderPassDescriptor:")] + void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); - [Export ("renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:")] - void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); + [Export ("renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:")] + void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); - [Export ("updateAtTime:")] - void Update (double currentTime); + [Export ("updateAtTime:")] + void Update (double currentTime); - [NullAllowed, Export ("scene", ArgumentSemantic.Assign)] - SKScene Scene { get; set; } + [NullAllowed, Export ("scene", ArgumentSemantic.Assign)] + SKScene Scene { get; set; } - [Export ("ignoresSiblingOrder")] - bool IgnoresSiblingOrder { get; set; } + [Export ("ignoresSiblingOrder")] + bool IgnoresSiblingOrder { get; set; } - [Export ("shouldCullNonVisibleNodes")] - bool ShouldCullNonVisibleNodes { get; set; } + [Export ("shouldCullNonVisibleNodes")] + bool ShouldCullNonVisibleNodes { get; set; } - [Export ("showsDrawCount")] - bool ShowsDrawCount { get; set; } + [Export ("showsDrawCount")] + bool ShowsDrawCount { get; set; } - [Export ("showsNodeCount")] - bool ShowsNodeCount { get; set; } + [Export ("showsNodeCount")] + bool ShowsNodeCount { get; set; } - [Export ("showsQuadCount")] - bool ShowsQuadCount { get; set; } + [Export ("showsQuadCount")] + bool ShowsQuadCount { get; set; } - [Export ("showsPhysics")] - bool ShowsPhysics { get; set; } + [Export ("showsPhysics")] + bool ShowsPhysics { get; set; } + + [Export ("showsFields")] + bool ShowsFields { get; set; } +} + +/// A that holds a geometric transform. +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKTransformNode { + [Export ("xRotation")] + nfloat XRotation { get; set; } + + [Export ("yRotation")] + nfloat YRotation { get; set; } + + [Export ("eulerAngles")] + VectorFloat3 EulerAngles { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } - [Export ("showsFields")] - bool ShowsFields { get; set; } + [Export ("rotationMatrix")] + MatrixFloat3x3 RotationMatrix { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; } - /// A that holds a geometric transform. - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKTransformNode { - [Export ("xRotation")] - nfloat XRotation { get; set; } - - [Export ("yRotation")] - nfloat YRotation { get; set; } - - [Export ("eulerAngles")] - VectorFloat3 EulerAngles { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("rotationMatrix")] - MatrixFloat3x3 RotationMatrix { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("quaternion")] - Quaternion Quaternion { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [Export ("quaternion")] + Quaternion Quaternion { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; } } +} diff --git a/src/storekit.cs b/src/storekit.cs index bd0308d34a44..1b3269170981 100644 --- a/src/storekit.cs +++ b/src/storekit.cs @@ -24,9 +24,6 @@ #else using UIKit; #endif -#if WATCH -using UIViewController = Foundation.NSObject; -#endif using System; #if !NET @@ -53,7 +50,7 @@ interface XamarinSwiftFunctions { } [ErrorDomain ("SKANErrorDomain")] - [NoWatch, NoTV, NoMac, iOS (15, 4), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (17, 0)] [Native] public enum SKANError : long { ImpressionMissingRequiredValue = 0, @@ -73,8 +70,6 @@ public enum SKANError : long { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacOSX, 13, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] - [Watch (6, 2)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [BaseType (typeof (NSObject))] @@ -84,18 +79,17 @@ partial interface SKDownload { [Export ("state")] SKDownloadState State { get; } #if MONOMAC - [NoiOS][NoTV][NoWatch][NoMacCatalyst] + [NoiOS][NoTV][NoMacCatalyst] [Obsolete ("Use 'State' instead.")] [Wrap ("State", IsVirtual = true)] SKDownloadState DownloadState { get; } - [NoiOS][NoTV][NoWatch][NoMacCatalyst] + [NoiOS][NoTV][NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'ExpectedContentLength' instead.")] [Export ("contentLength", ArgumentSemantic.Copy)] NSNumber ContentLength { get; } #else [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'State' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'State' instead.")] @@ -103,7 +97,6 @@ partial interface SKDownload { SKDownloadState DownloadState { get; } [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'ExpectedContentLength' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'ExpectedContentLength' instead.")] @@ -136,7 +129,6 @@ partial interface SKDownload { [Export ("timeRemaining")] double TimeRemaining { get; } - [NoWatch] [NoTV] [NoiOS] [MacCatalyst (13, 1)] @@ -145,7 +137,6 @@ partial interface SKDownload { [Static] NSUrl GetContentUrlForProduct (string productId); - [NoWatch] [NoTV] [NoiOS] [MacCatalyst (13, 1)] @@ -166,8 +157,6 @@ partial interface SKDownload { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] #if NET @@ -179,7 +168,6 @@ partial interface SKPayment : NSMutableCopying { SKPayment CreateFrom (SKProduct product); [NoMac] - [NoWatch] [Static] [Export ("paymentWithProductIdentifier:")] [Deprecated (PlatformName.iOS, 5, 0, message: "Use 'FromProduct (SKProduct)'' after fetching the list of available products from 'SKProductRequest' instead.")] @@ -216,8 +204,6 @@ partial interface SKPayment : NSMutableCopying { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (SKPayment))] #if NET @@ -228,7 +214,6 @@ interface SKMutablePayment { [Export ("paymentWithProduct:")] SKMutablePayment PaymentWithProduct (SKProduct product); - [NoWatch] [Static] [Export ("paymentWithProductIdentifier:")] [Deprecated (PlatformName.iOS, 5, 0, message: "Use 'PaymentWithProduct (SKProduct)' after fetching the list of available products from 'SKProductRequest' instead.")] @@ -268,8 +253,6 @@ interface SKMutablePayment { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SKPaymentQueue { @@ -309,7 +292,6 @@ interface SKPaymentQueue { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacOSX, 13, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("startDownloads:")] void StartDownloads (SKDownload [] downloads); @@ -317,7 +299,6 @@ interface SKPaymentQueue { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacOSX, 13, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("pauseDownloads:")] void PauseDownloads (SKDownload [] downloads); @@ -325,7 +306,6 @@ interface SKPaymentQueue { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacOSX, 13, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("resumeDownloads:")] void ResumeDownloads (SKDownload [] downloads); @@ -333,7 +313,6 @@ interface SKPaymentQueue { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacOSX, 13, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("cancelDownloads:")] void CancelDownloads (SKDownload [] downloads); @@ -356,17 +335,17 @@ interface SKPaymentQueue { [NullAllowed, Export ("storefront")] SKStorefront Storefront { get; } - [NoWatch, NoTV, NoMac, iOS (13, 4)] + [NoTV, NoMac, iOS (13, 4)] [NoMacCatalyst] [Export ("showPriceConsentIfNeeded")] void ShowPriceConsentIfNeeded (); - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [NoMacCatalyst] [Export ("presentCodeRedemptionSheet")] void PresentCodeRedemptionSheet (); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("transactionObservers")] ISKPaymentTransactionObserver [] TransactionObservers { get; } @@ -376,8 +355,6 @@ interface SKPaymentQueue { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SKProduct { @@ -397,7 +374,7 @@ interface SKProduct { string ProductIdentifier { get; } #if MONOMAC - [NoWatch][NoiOS][NoTV][NoMacCatalyst] +[NoiOS][NoTV][NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'IsDownloadable' instead.")] [Export ("downloadable")] bool Downloadable { get; } @@ -415,7 +392,6 @@ bool Downloadable { bool IsDownloadable { get; } [NoiOS] - [NoWatch] #if NET [NoTV] #else @@ -457,7 +433,7 @@ bool Downloadable { [Export ("discounts")] SKProductDiscount [] Discounts { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("isFamilyShareable")] bool IsFamilyShareable { get; } @@ -465,7 +441,6 @@ bool Downloadable { interface ISKPaymentTransactionObserver { } - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -474,7 +449,6 @@ interface ISKPaymentTransactionObserver { } [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] interface SKPaymentTransactionObserver { [Export ("paymentQueue:updatedTransactions:")] @@ -493,12 +467,10 @@ interface SKPaymentTransactionObserver { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacOSX, 13, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("paymentQueue:updatedDownloads:")] void UpdatedDownloads (SKPaymentQueue queue, SKDownload [] downloads); - [NoWatch] [MacCatalyst (13, 1)] [Export ("paymentQueue:shouldAddStorePayment:forProduct:")] bool ShouldAddStorePayment (SKPaymentQueue queue, SKPayment payment, SKProduct product); @@ -509,7 +481,7 @@ interface SKPaymentTransactionObserver { [Export ("paymentQueueDidChangeStorefront:")] void DidChangeStorefront (SKPaymentQueue queue); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("paymentQueue:didRevokeEntitlementsForProductIdentifiers:")] void DidRevokeEntitlements (SKPaymentQueue queue, string [] productIdentifiers); @@ -519,8 +491,6 @@ interface SKPaymentTransactionObserver { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SKPaymentTransaction { @@ -544,7 +514,6 @@ interface SKPaymentTransaction { string TransactionIdentifier { get; } [NoMac] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "Use 'NSBundle.AppStoreReceiptUrl' instead.")] [Deprecated (PlatformName.TvOS, 9, 0, message: "Use 'NSBundle.AppStoreReceiptUrl' instead.")] [MacCatalyst (13, 1)] @@ -559,7 +528,6 @@ interface SKPaymentTransaction { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacOSX, 13, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("downloads")] SKDownload [] Downloads { get; } @@ -569,8 +537,6 @@ interface SKPaymentTransaction { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (SKRequestDelegate) })] interface SKRequest { @@ -594,8 +560,6 @@ interface ISKRequestDelegate { } [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -612,8 +576,6 @@ interface SKRequestDelegate { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (SKRequest))] interface SKReceiptRefreshRequest { @@ -636,8 +598,6 @@ interface SKReceiptRefreshRequest { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [Static, Internal] interface _SKReceiptProperty { @@ -651,14 +611,12 @@ interface _SKReceiptProperty { NSString IsVolumePurchase { get; } } - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (SKRequest), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (SKProductsRequestDelegate) })] [Deprecated (PlatformName.iOS, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] interface SKProductsRequest { [Export ("initWithProductIdentifiers:")] NativeHandle Constructor (NSSet productIdentifiersStringSet); @@ -677,8 +635,6 @@ interface SKProductsRequest { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SKProductsResponse { @@ -695,8 +651,6 @@ interface ISKProductsRequestDelegate { } [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (SKRequestDelegate))] [Model] @@ -711,7 +665,7 @@ interface SKProductsRequestDelegate { /// A subclass of that presents a store allowing the application user to purchase an item from the App Store. /// /// Apple documentation for SKStoreProductViewController - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController), Delegates = new string [] { "WeakDelegate" }, @@ -763,7 +717,7 @@ interface ISKStoreProductViewControllerDelegate { } /// A delegate object that allows the application developer to customize the behavior of a . /// /// Apple documentation for SKStoreProductViewControllerDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -773,7 +727,6 @@ interface SKStoreProductViewControllerDelegate { void Finished (SKStoreProductViewController controller); } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("SKStoreProductParameterKey")] interface StoreProductParameters { @@ -811,18 +764,17 @@ interface StoreProductParameters { [Export ("AdNetworkTimestamp")] uint AdNetworkTimestamp { get; set; } - [NoWatch, NoMac, TV (14, 0), iOS (14, 0)] + [NoMac, TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("AdNetworkSourceAppStoreIdentifier")] string AdNetworkSourceAppStoreIdentifier { get; set; } - [NoWatch, NoMac, TV (14, 0), iOS (14, 0)] + [NoMac, TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("AdNetworkVersion")] string AdNetworkVersion { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface SKStoreProductParameterKey { @@ -859,7 +811,7 @@ interface SKStoreProductParameterKey { [Field ("SKStoreProductParameterAdNetworkCampaignIdentifier")] NSString AdNetworkCampaignIdentifier { get; } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (17, 0)] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), TV (17, 0)] [Field ("SKStoreProductParameterAdNetworkSourceIdentifier")] NSString AdNetworkSourceIdentifier { get; } @@ -878,12 +830,12 @@ interface SKStoreProductParameterKey { [Field ("SKStoreProductParameterAdNetworkTimestamp")] NSString AdNetworkTimestamp { get; } - [NoWatch, NoMac, TV (14, 0), iOS (14, 0)] + [NoMac, TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("SKStoreProductParameterAdNetworkSourceAppStoreIdentifier")] NSString AdNetworkSourceAppStoreIdentifier { get; } - [NoWatch, NoMac, TV (14, 0), iOS (14, 0)] + [NoMac, TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("SKStoreProductParameterAdNetworkVersion")] NSString AdNetworkVersion { get; } @@ -898,9 +850,7 @@ interface SKStoreProductParameterKey { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires SwiftUI */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires SwiftUI */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires SwiftUI */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires SwiftUI */ )] [NoMac] - [NoWatch] [NoTV] // __TVOS_PROHIBITED [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] @@ -932,9 +882,7 @@ interface ISKCloudServiceSetupViewControllerDelegate { } [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires SwiftUI */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires SwiftUI */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires SwiftUI */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires SwiftUI */ )] [NoMac] - [NoWatch] [NoTV] // __TVOS_PROHIBITED on the only member + SKCloudServiceSetupViewController is not in tvOS [MacCatalyst (13, 1)] [Protocol, Model] @@ -949,9 +897,8 @@ interface SKCloudServiceSetupViewControllerDelegate { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] [NoMac] - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [StrongDictionary ("SKCloudServiceSetupOptionsKeys")] interface SKCloudServiceSetupOptions { @@ -976,7 +923,7 @@ interface SKCloudServiceSetupOptions { } [NoMac] - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Internal, Static] interface SKCloudServiceSetupOptionsKeys { @@ -1001,7 +948,7 @@ interface SKCloudServiceSetupOptionsKeys { /// Enumerates Cloud Service setup actions. [NoMac] - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] enum SKCloudServiceSetupAction { [Field ("SKCloudServiceSetupActionSubscribe")] @@ -1012,7 +959,6 @@ enum SKCloudServiceSetupAction { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] [NoMac] - [NoWatch] [MacCatalyst (13, 1)] enum SKCloudServiceSetupMessageIdentifier { [Field ("SKCloudServiceSetupMessageIdentifierJoin")] @@ -1029,8 +975,6 @@ enum SKCloudServiceSetupMessageIdentifier { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (7, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SKCloudServiceController { @@ -1086,7 +1030,6 @@ interface SKCloudServiceController { [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // static Default property is the only documented way to get the controller interface SKProductStorePromotionController { @@ -1116,9 +1059,7 @@ interface SKProductStorePromotionController { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // Not specified but very likely @@ -1134,20 +1075,18 @@ interface SKStoreReviewController { [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use the 'AppStore.RequestReview (UIWindowScene)' API instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use the 'AppStore.RequestReview (NSViewController)' API instead.")] [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, iOS (14, 0), NoMac] + [NoTV, iOS (14, 0), NoMac] [Static] [Export ("requestReviewInScene:")] void RequestReview (UIWindowScene windowScene); } - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] interface SKProductSubscriptionPeriod { [Export ("numberOfUnits")] @@ -1161,8 +1100,6 @@ interface SKProductSubscriptionPeriod { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface SKProductDiscount { @@ -1191,7 +1128,7 @@ interface SKProductDiscount { SKProductDiscountType Type { get; } } - [NoTV, NoMac, NoWatch] + [NoTV, NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1204,14 +1141,14 @@ interface SKAdNetwork { void RegisterAppForAdNetworkAttribution (); [Deprecated (PlatformName.iOS, 15, 4, message: "Use 'UpdatePostback' instead.")] - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [Deprecated (PlatformName.MacCatalyst, 15, 4, message: "Use 'UpdatePostback' instead.")] [Static] [Export ("updateConversionValue:")] void UpdateConversionValue (nint conversionValue); - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 5)] [MacCatalyst (14, 5)] [Static] @@ -1219,7 +1156,7 @@ interface SKAdNetwork { [Export ("startImpression:completionHandler:")] void StartImpression (SKAdImpression impression, [NullAllowed] Action completion); - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 5)] [MacCatalyst (14, 5)] [Static] @@ -1227,19 +1164,19 @@ interface SKAdNetwork { [Export ("endImpression:completionHandler:")] void EndImpression (SKAdImpression impression, [NullAllowed] Action completion); - [NoWatch, NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] + [NoTV, NoMac, iOS (15, 4), MacCatalyst (15, 4)] [Static] [Async] [Export ("updatePostbackConversionValue:completionHandler:")] void UpdatePostback (nint conversionValue, [NullAllowed] Action completion); - [NoMac, iOS (16, 1), MacCatalyst (16, 1), NoWatch, NoTV] + [NoMac, iOS (16, 1), MacCatalyst (16, 1), NoTV] [Static] [Async] [Export ("updatePostbackConversionValue:coarseValue:completionHandler:")] void UpdatePostback (nint conversionValue, [BindAs (typeof (SKAdNetworkCoarseConversionValue))] NSString coarseValue, [NullAllowed] Action completion); - [NoMac, iOS (16, 1), MacCatalyst (16, 1), NoWatch, NoTV] + [NoMac, iOS (16, 1), MacCatalyst (16, 1), NoTV] [Static] [Async] [Export ("updatePostbackConversionValue:coarseValue:lockWindow:completionHandler:")] @@ -1250,8 +1187,6 @@ interface SKAdNetwork { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1279,8 +1214,6 @@ interface SKPaymentDiscount { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2)] [MacCatalyst (13, 1)] [Native] public enum SKProductDiscountType : long { @@ -1292,10 +1225,8 @@ public enum SKProductDiscountType : long { [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 2)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // no `init` but non-null properties @@ -1314,8 +1245,7 @@ interface ISKPaymentQueueDelegate { } [Deprecated (PlatformName.MacCatalyst, 18, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.MacOSX, 15, 0 /* Apple's replacement requires Swift */ )] [Deprecated (PlatformName.TvOS, 18, 0 /* Apple's replacement requires Swift */ )] - [Deprecated (PlatformName.WatchOS, 11, 0 /* Apple's replacement requires Swift */ )] - [Watch (6, 2), iOS (13, 0)] + [iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -1328,7 +1258,7 @@ interface SKPaymentQueueDelegate { [Export ("paymentQueue:shouldContinueTransaction:inStorefront:")] bool ShouldContinueTransaction (SKPaymentQueue paymentQueue, SKPaymentTransaction transaction, SKStorefront newStorefront); - [NoWatch, NoMac, NoTV, iOS (13, 4)] + [NoMac, NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("paymentQueueShouldShowPriceConsent:")] bool ShouldShowPriceConsent (SKPaymentQueue paymentQueue); @@ -1338,13 +1268,11 @@ interface SKPaymentQueueDelegate { // in Xcode 11 GM is was added - but only for macOS ?!? // https://feedbackassistant.apple.com/feedback/7017660 - https://github.com/xamarin/maccore/issues/1913 - [NoWatch] [NoiOS] [NoTV] [NoMacCatalyst] delegate void SKArcadeServiceRegisterHandler (NSData randomFromFP, uint /* uint32_t */ randomFromFPLength, NSData cmacOfAppPid, uint /* uint32_t */ cmacOfAppPidLength, NSError error); - [NoWatch] [NoiOS] [NoTV] [NoMacCatalyst] @@ -1352,7 +1280,6 @@ interface SKPaymentQueueDelegate { [iOS (13, 0)] [TV (13, 0)] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // all static members so far @@ -1374,7 +1301,7 @@ interface SKArcadeService { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1389,13 +1316,13 @@ interface SKOverlayTransitionContext { CGRect EndFrame { get; } } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [DisableDefaultCtor] [BaseType (typeof (NSObject))] interface SKOverlayConfiguration { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (SKOverlayConfiguration))] [DisableDefaultCtor] @@ -1442,7 +1369,7 @@ interface SKOverlayAppConfiguration { void SetAdImpression (SKAdImpression impression); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (SKOverlayConfiguration))] [DisableDefaultCtor] @@ -1480,7 +1407,7 @@ interface SKOverlayAppClipConfiguration { interface ISKOverlayDelegate { } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -1505,7 +1432,7 @@ interface SKOverlayDelegate { void DidFinishDismissal (SKOverlay overlay, SKOverlayTransitionContext transitionContext); } - [NoWatch, NoTV, NoMac, iOS (14, 0)] + [NoTV, NoMac, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1532,7 +1459,7 @@ interface SKOverlay { SKOverlayConfiguration Configuration { get; } } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [iOS (14, 5)] [MacCatalyst (14, 5)] [BaseType (typeof (NSObject))] @@ -1555,7 +1482,7 @@ interface SKAdImpression { [Export ("adCampaignIdentifier", ArgumentSemantic.Strong)] NSNumber AdCampaignIdentifier { get; set; } - [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [NoMac, iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("sourceIdentifier", ArgumentSemantic.Strong)] NSNumber SourceIdentifier { get; set; } diff --git a/src/symbols.cs b/src/symbols.cs index 780666bf39e5..1cb1af899502 100644 --- a/src/symbols.cs +++ b/src/symbols.cs @@ -5,17 +5,17 @@ using System; namespace Symbols { - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSSymbolEffect : NSCopying, NSSecureCoding { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSSymbolContentTransition : NSCopying, NSSecureCoding { } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSSymbolEffectOptions : NSCopying, NSSecureCoding { @@ -28,7 +28,6 @@ interface NSSymbolEffectOptions : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] NSSymbolEffectOptions CreateRepeating (); @@ -36,7 +35,6 @@ interface NSSymbolEffectOptions : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] NSSymbolEffectOptions GetRepeating (); @@ -52,7 +50,6 @@ interface NSSymbolEffectOptions : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] NSSymbolEffectOptions Create (nint repeatCount); @@ -60,7 +57,6 @@ interface NSSymbolEffectOptions : NSCopying, NSSecureCoding { [Deprecated (PlatformName.iOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacCatalyst, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.TvOS, 18, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] - [Deprecated (PlatformName.WatchOS, 11, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'NSSymbolEffectOptionsRepeatBehavior.CreatePeriodic' instead.")] NSSymbolEffectOptions Get (nint repeatCount); @@ -71,17 +67,17 @@ interface NSSymbolEffectOptions : NSCopying, NSSecureCoding { [Export ("optionsWithSpeed:")] NSSymbolEffectOptions Get (double speed); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] [Export ("optionsWithRepeatBehavior:")] NSSymbolEffectOptions Create (NSSymbolEffectOptionsRepeatBehavior behavior); - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("optionsWithRepeatBehavior:")] NSSymbolEffectOptions Get (NSSymbolEffectOptionsRepeatBehavior behavior); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolPulseEffect { @@ -96,7 +92,7 @@ interface NSSymbolPulseEffect { NSSymbolPulseEffect WholeSymbol { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolBounceEffect { @@ -119,7 +115,7 @@ interface NSSymbolBounceEffect { NSSymbolBounceEffect WholeSymbol { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolVariableColorEffect { @@ -146,7 +142,7 @@ interface NSSymbolVariableColorEffect { NSSymbolVariableColorEffect DimInactiveLayers { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolScaleEffect { @@ -169,7 +165,7 @@ interface NSSymbolScaleEffect { NSSymbolScaleEffect WholeSymbol { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolAppearEffect { @@ -192,7 +188,7 @@ interface NSSymbolAppearEffect { NSSymbolAppearEffect WholeSymbol { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolDisappearEffect { @@ -215,7 +211,7 @@ interface NSSymbolDisappearEffect { NSSymbolDisappearEffect WholeSymbol { get; } } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolContentTransition))] [DisableDefaultCtor] interface NSSymbolReplaceContentTransition { @@ -242,12 +238,12 @@ interface NSSymbolReplaceContentTransition { NSSymbolReplaceContentTransition WholeSymbol { get; } [Static] - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("magicTransitionWithFallback:")] NSSymbolMagicReplaceContentTransition CreateMagicTransition (NSSymbolReplaceContentTransition fallback); } - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSSymbolContentTransition))] [DisableDefaultCtor] interface NSSymbolAutomaticContentTransition { @@ -256,7 +252,7 @@ interface NSSymbolAutomaticContentTransition { NSSymbolAutomaticContentTransition Create (); } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSSymbolEffectOptionsRepeatBehavior : NSCopying, NSSecureCoding { @@ -281,7 +277,7 @@ interface NSSymbolEffectOptionsRepeatBehavior : NSCopying, NSSecureCoding { NSSymbolEffectOptionsRepeatBehavior CreateContinuous (); } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolWiggleEffect { @@ -332,7 +328,7 @@ interface NSSymbolWiggleEffect { NSSymbolWiggleEffect WholeSymbol { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolRotateEffect { @@ -355,7 +351,7 @@ interface NSSymbolRotateEffect { NSSymbolRotateEffect WholeSymbol { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSSymbolEffect))] [DisableDefaultCtor] interface NSSymbolBreatheEffect { @@ -378,7 +374,7 @@ interface NSSymbolBreatheEffect { NSSymbolBreatheEffect WholeSymbol { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSSymbolContentTransition))] [DisableDefaultCtor] interface NSSymbolMagicReplaceContentTransition { diff --git a/src/systemconfiguration.cs b/src/systemconfiguration.cs index ada20696f837..c3fbdf24d883 100644 --- a/src/systemconfiguration.cs +++ b/src/systemconfiguration.cs @@ -18,21 +18,18 @@ namespace SystemConfiguration { interface CaptiveNetwork { [NoTV] - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [Field ("kCNNetworkInfoKeyBSSID")] NSString NetworkInfoKeyBSSID { get; } [NoTV] - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [Field ("kCNNetworkInfoKeySSID")] NSString NetworkInfoKeySSID { get; } [NoTV] - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [Field ("kCNNetworkInfoKeySSIDData")] diff --git a/src/threadnetwork.cs b/src/threadnetwork.cs index 6815cdca5b62..d783470d1f69 100644 --- a/src/threadnetwork.cs +++ b/src/threadnetwork.cs @@ -6,7 +6,7 @@ namespace ThreadNetwork { - [iOS (15, 0), Mac (13, 0), MacCatalyst (16, 1), NoWatch, NoTV] + [iOS (15, 0), Mac (13, 0), MacCatalyst (16, 1), NoTV] [BaseType (typeof (NSObject))] interface THClient { [Async] @@ -50,7 +50,7 @@ interface THClient { void IsPreferredNetworkAvailable (Action completion); } - [iOS (15, 0), Mac (13, 0), MacCatalyst (16, 1), NoWatch, NoTV] + [iOS (15, 0), Mac (13, 0), MacCatalyst (16, 1), NoTV] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface THCredentials : NSSecureCoding { diff --git a/src/tvuikit.cs b/src/tvuikit.cs index 72b446b7ad17..d5361fac694c 100644 --- a/src/tvuikit.cs +++ b/src/tvuikit.cs @@ -304,7 +304,7 @@ interface TVCollectionViewFullScreenLayout { bool TransitioningToCenterIndexPath { [Bind ("isTransitioningToCenterIndexPath")] get; } } - [TV (15, 0), NoWatch, NoMac, NoiOS] + [TV (15, 0), NoMac, NoiOS] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface TVMediaItemContentConfiguration : UIContentConfiguration, NSSecureCoding { @@ -341,7 +341,7 @@ interface TVMediaItemContentConfiguration : UIContentConfiguration, NSSecureCodi UIView OverlayView { get; set; } } - [TV (15, 0), NoWatch, NoMac, NoiOS] + [TV (15, 0), NoMac, NoiOS] [BaseType (typeof (UIView))] [DisableDefaultCtor] interface TVMediaItemContentView : UIContentView { diff --git a/src/uikit.cs b/src/uikit.cs index 0bfba90e57de..dc2a77d216f0 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -21,11 +21,9 @@ #else using CNContact = System.Object; #endif -#if !WATCH using MediaPlayer; using CoreImage; using CoreAnimation; -#endif using CoreData; using UserNotifications; using UniformTypeIdentifiers; @@ -35,81 +33,14 @@ using FileProvider; using LinkPresentation; #endif // IOS -#if TVOS || WATCH +#if TVOS using LPLinkMetadata = Foundation.NSObject; -#endif // TVOS || WATCH +#endif // TVOS using Intents; -// Unfortunately this file is a mix of #if's and [NoWatch] so we list -// some classes until [NoWatch] is used instead of #if's directives +// Unfortunately this file is a mix of #if's andso we list +// some classes untilis used instead of #if's directives // to avoid the usage of more #if's -#if WATCH -using CATransform3D = Foundation.NSObject; -using CALayer = Foundation.NSObject; -using CADisplayLink = Foundation.NSObject; -using CoreAnimation = Foundation.NSObject; -using CIColor = Foundation.NSObject; -using CIImage = Foundation.NSObject; - -using MPMoviePlayerViewController = Foundation.NSObject; - -using UIInteraction = Foundation.NSObjectProtocol; -using UIDynamicItem = Foundation.NSObjectProtocol; -using UITextFieldDelegate = Foundation.NSObjectProtocol; -using UITextPasteItem = Foundation.NSObjectProtocol; -using UICollectionViewDataSource = Foundation.NSObjectProtocol; -using UITableViewDataSource = Foundation.NSObjectProtocol; -using IUITextInput = Foundation.NSObjectProtocol; -using IUICoordinateSpace = Foundation.NSObjectProtocol; -using UIAccessibilityIdentification = Foundation.NSObjectProtocol; - -using UIActivity = Foundation.NSObject; -using UICollectionViewLayout = Foundation.NSObject; -using UITraitCollection = Foundation.NSObject; -using UIButton = Foundation.NSObject; -using UIBlurEffect = Foundation.NSObject; -using UIControl = Foundation.NSObject; -using UIViewController = Foundation.NSObject; -using UIGestureRecognizer = Foundation.NSObject; -using UIAction = Foundation.NSObject; -using UITextField = Foundation.NSObject; -using UITextPosition = Foundation.NSObject; -using UITextRange = Foundation.NSObject; -using UITextSelectionRect = Foundation.NSObject; -using UIStoryboard = Foundation.NSObject; -using UIResponder = Foundation.NSObject; -using UIScreen = Foundation.NSObject; -using UIWindow = Foundation.NSObject; -using UIApplicationShortcutItem = Foundation.NSObject; -using UICollectionViewCell = Foundation.NSObject; -using UICollectionView = Foundation.NSObject; -using UITableViewCell = Foundation.NSObject; -using UITableView = Foundation.NSObject; -using UICollectionReusableView = Foundation.NSObject; -using UIVisualEffect = Foundation.NSObject; -using UILayoutGuide = Foundation.NSObject; -using UISwipeActionsConfiguration = Foundation.NSObject; -using UINib = Foundation.NSObject; -using UIFocusSystem = Foundation.NSObject; -using UIPrinterPickerController = Foundation.NSObject; -using UISplitViewController = Foundation.NSObject; -using UIAdaptivePresentationControllerDelegate = Foundation.NSObject; -using UIPresentationController = Foundation.NSObject; -using UIToolbar = Foundation.NSObject; -using UITabBar = Foundation.NSObject; -using UIEvent = Foundation.NSObject; -using UIUserActivityRestoring = Foundation.NSObject; -using UITouch = Foundation.NSObject; -using UIPress = Foundation.NSObject; -using UIPressesEvent = Foundation.NSObject; -using UIRegion = Foundation.NSObject; -using UITextInputPasswordRules = Foundation.NSObject; -using UIUserNotificationSettings = Foundation.NSObject; -using UIScrollView = Foundation.NSObject; -using UIFloatRange = Foundation.NSObject; -using NSSymbolEffect = Foundation.NSObject; -using NSSymbolContentTransition = Foundation.NSObject; -#endif // WATCH #if !IOS using UIPointerAccessoryPosition = Foundation.NSObject; @@ -139,7 +70,6 @@ namespace UIKit { - [NoWatch] [MacCatalyst (13, 1)] [Native] [Flags] @@ -158,22 +88,23 @@ public enum UIFocusHeading : ulong { } [Native] // NSInteger -> UIApplication.h - [NoWatch] [MacCatalyst (13, 1)] public enum UIBackgroundRefreshStatus : long { - Restricted, Denied, Available + Restricted, + Denied, + Available, } - [NoWatch] [MacCatalyst (13, 1)] [Native] // NSUInteger -> UIApplication.h public enum UIBackgroundFetchResult : ulong { - NewData, NoData, Failed + NewData, + NoData, + Failed, } /// [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UIApplicationShortcutIconType : long { @@ -206,11 +137,11 @@ public enum UIApplicationShortcutIconType : long { Bookmark, Shuffle, Audio, - Update + Update, } /// Enumerates the mass of the objects used by the class. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UIImpactFeedbackStyle : long { @@ -226,25 +157,25 @@ public enum UIImpactFeedbackStyle : long { } /// Enumerates the types of notification provided by . - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UINotificationFeedbackType : long { Success, Warning, - Error + Error, } [Native] [ErrorDomain ("UIGuidedAccessErrorDomain")] - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] public enum UIGuidedAccessErrorCode : long { PermissionDenied, Failed = long.MaxValue, } - [Flags, NoWatch, NoTV] + [Flags, NoTV] [MacCatalyst (13, 1)] [Native] public enum UIGuidedAccessAccessibilityFeature : ulong { @@ -255,7 +186,7 @@ public enum UIGuidedAccessAccessibilityFeature : ulong { GrayscaleDisplay = 1uL << 4, } - [NoWatch, NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [Native] public enum UIPrintRenderingQuality : long { @@ -263,7 +194,7 @@ public enum UIPrintRenderingQuality : long { Responsive, } - [NoWatch, TV (14, 5), iOS (14, 5)] + [TV (14, 5), iOS (14, 5)] [MacCatalyst (14, 5)] [Native] public enum UISplitViewControllerDisplayModeButtonVisibility : long { @@ -272,7 +203,7 @@ public enum UISplitViewControllerDisplayModeButtonVisibility : long { Always, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UIButtonConfigurationIndicator : long { Automatic, @@ -280,7 +211,7 @@ public enum UIButtonConfigurationIndicator : long { Popup, } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UISearchControllerScopeBarActivation : long { Automatic, @@ -313,7 +244,7 @@ public enum UISearchControllerScopeBarActivation : long { delegate void UIApplicationRestorationHandler (NSObject [] uidocumentOrResponderObjects); /// Abstract base class for classes that generate feedback hints, such as haptics. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] [Abstract] // abstract class that should not be used directly @@ -330,7 +261,7 @@ interface UIFeedbackGenerator : UIInteraction { } /// A that creates haptics simulating impacts. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [DisableDefaultCtor] [BaseType (typeof (UIFeedbackGenerator))] @@ -370,7 +301,7 @@ interface UIImpactFeedbackGenerator { } /// A that generates haptics relating to successes, failures, and warnings. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIFeedbackGenerator))] interface UINotificationFeedbackGenerator { @@ -390,7 +321,7 @@ interface UINotificationFeedbackGenerator { } /// A that produces haptic feedback. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIFeedbackGenerator))] interface UISelectionFeedbackGenerator { @@ -411,7 +342,7 @@ interface UISelectionFeedbackGenerator { interface IUISheetPresentationControllerDelegate { } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] #if NET [Protocol, Model] @@ -424,7 +355,7 @@ interface UISheetPresentationControllerDelegate : UIAdaptivePresentationControll void DidChangeSelectedDetentIdentifier (UISheetPresentationController sheetPresentationController); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UIPresentationController))] [DisableDefaultCtor] interface UISheetPresentationController { @@ -472,11 +403,11 @@ interface UISheetPresentationController { [Export ("animateChanges:")] void AnimateChanges (Action changes); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("invalidateDetents")] void InvalidateDetents (); - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Export ("prefersPageSizing")] bool PrefersPageSizing { get; set; } } @@ -492,7 +423,7 @@ interface IUICloudSharingControllerDelegate { } /// Delegate object for the CloudKit sharing controller. /// /// Apple documentation for UICloudSharingControllerDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -521,18 +452,18 @@ interface UICloudSharingControllerDelegate { void DidStopSharing (UICloudSharingController csc); } - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] delegate void UICloudSharingControllerPreparationHandler (UICloudSharingController controller, [BlockCallback] UICloudSharingControllerPreparationCompletionHandler completion); - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] delegate void UICloudSharingControllerPreparationCompletionHandler ([NullAllowed] CKShare share, [NullAllowed] CKContainer container, [NullAllowed] NSError error); /// Standard for adding or removing people from a CloudKit share record. /// /// Apple documentation for UICloudSharingController - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] interface UICloudSharingController { @@ -562,7 +493,6 @@ interface UICloudSharingController { IUIActivityItemSource ActivityItemSource { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (NSAttributedString))] @@ -578,7 +508,6 @@ interface NSMutableAttributedStringKitAdditions { void FixAttributesInRange (NSRange range); } - [NoWatch] [MacCatalyst (13, 1)] [Category, BaseType (typeof (NSLayoutConstraint))] interface NSIdentifier { @@ -646,7 +575,7 @@ interface NSCoder_UIGeometryKeyedCoding { } /// - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 5, 0, message: "Use 'CoreMotion' instead.")] [MacCatalyst (13, 1)] @@ -666,7 +595,7 @@ interface UIAcceleration { } /// - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIAccelerometerDelegate) })] [Deprecated (PlatformName.iOS, 5, 0, message: "Use 'CoreMotion' instead.")] [MacCatalyst (13, 1)] @@ -703,7 +632,7 @@ interface IUIAccelerometerDelegate { } /// /// /// Apple documentation for UIAccelerometerDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -723,7 +652,6 @@ interface UIAccessibility { [Export ("accessibilityLabel", ArgumentSemantic.Copy)] string AccessibilityLabel { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("accessibilityAttributedLabel", ArgumentSemantic.Copy)] NSAttributedString AccessibilityAttributedLabel { get; set; } @@ -732,7 +660,6 @@ interface UIAccessibility { [Export ("accessibilityHint", ArgumentSemantic.Copy)] string AccessibilityHint { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("accessibilityAttributedHint", ArgumentSemantic.Copy)] NSAttributedString AccessibilityAttributedHint { get; set; } @@ -741,7 +668,6 @@ interface UIAccessibility { [Export ("accessibilityValue", ArgumentSemantic.Copy)] string AccessibilityValue { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed, Export ("accessibilityAttributedValue", ArgumentSemantic.Copy)] NSAttributedString AccessibilityAttributedValue { get; set; } @@ -772,22 +698,22 @@ interface UIAccessibility { [Export ("accessibilityNavigationStyle")] UIAccessibilityNavigationStyle AccessibilityNavigationStyle { get; set; } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("accessibilityRespondsToUserInteraction")] bool AccessibilityRespondsToUserInteraction { get; set; } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("accessibilityUserInputLabels", ArgumentSemantic.Strong)] string [] AccessibilityUserInputLabels { get; set; } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("accessibilityAttributedUserInputLabels", ArgumentSemantic.Copy)] NSAttributedString [] AccessibilityAttributedUserInputLabels { get; set; } - [TV (13, 0), iOS (13, 0), Watch (6, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("accessibilityTextualContext", ArgumentSemantic.Strong)] string AccessibilityTextualContext { get; set; } @@ -869,7 +795,6 @@ interface UIAccessibility { [Notification (typeof (UIAccessibilityAnnouncementFinishedEventArgs))] NSString AnnouncementDidFinishNotification { get; } -#if !WATCH [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'VoiceOverStatusDidChangeNotification' instead.")] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'VoiceOverStatusDidChangeNotification' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'VoiceOverStatusDidChangeNotification' instead.")] @@ -896,7 +821,6 @@ interface UIAccessibility { [Field ("UIAccessibilityGuidedAccessStatusDidChangeNotification")] [Notification] NSString GuidedAccessStatusDidChangeNotification { get; } -#endif [Field ("UIAccessibilityScreenChangedNotification")] int ScreenChangedNotification { get; } // This is int, not nint @@ -926,11 +850,10 @@ interface UIAccessibility { [Field ("UIAccessibilitySpeechAttributePitch")] NSString SpeechAttributePitch { get; } - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Watch (10, 0)] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] [Field ("UIAccessibilitySpeechAttributeAnnouncementPriority")] NSString SpeechAttributeAnnouncementPriority { get; } -#if !WATCH [MacCatalyst (13, 1)] [Notification] [Field ("UIAccessibilityBoldTextStatusDidChangeNotification")] @@ -978,7 +901,6 @@ interface UIAccessibility { [Notification] [Field ("UIAccessibilitySwitchControlStatusDidChangeNotification")] NSString SwitchControlStatusDidChangeNotification { get; } -#endif [MacCatalyst (13, 1)] [Field ("UIAccessibilityNotificationSwitchControlIdentifier")] @@ -999,7 +921,6 @@ interface UIAccessibility { [Field ("UIAccessibilityResumeAssistiveTechnologyNotification")] int ResumeAssistiveTechnologyNotification { get; } // UIAccessibilityNotifications => uint32_t -#if !WATCH [MacCatalyst (13, 1)] [Notification] [Field ("UIAccessibilitySpeakScreenStatusDidChangeNotification")] @@ -1014,11 +935,10 @@ interface UIAccessibility { [Notification] [Field ("UIAccessibilityShakeToUndoDidChangeNotification")] NSString ShakeToUndoDidChangeNotification { get; } -#endif // FIXME: we only used this on a few types before, none of them available on tvOS // but a new member was added to the platform... - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] [NullAllowed, Export ("accessibilityHeaderElements", ArgumentSemantic.Copy)] NSObject [] AccessibilityHeaderElements { get; set; } @@ -1047,7 +967,6 @@ interface UIAccessibility { [Field ("UIAccessibilityNotificationVoiceOverIdentifier")] NSString NotificationVoiceOverIdentifier { get; } -#if !WATCH [NoTV] [MacCatalyst (13, 1)] [Notification] @@ -1070,7 +989,6 @@ interface UIAccessibility { [Notification] [Field ("UIAccessibilityOnOffSwitchLabelsDidChangeNotification")] NSString OnOffSwitchLabelsDidChangeNotification { get; } -#endif [MacCatalyst (13, 1)] [Field ("UIAccessibilitySpeechAttributeQueueAnnouncement")] @@ -1088,21 +1006,21 @@ interface UIAccessibility { [Field ("UIAccessibilityTextAttributeCustom")] NSString TextAttributeCustom { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Field ("UIAccessibilityTextAttributeContext")] NSString TextAttributeContext { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Field ("UIAccessibilitySpeechAttributeSpellOut")] NSString SpeechAttributeSpellOut { get; } - [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Watch (10, 0)] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] [Export ("accessibilityDirectTouchOptions", ArgumentSemantic.Assign)] UIAccessibilityDirectTouchOptions AccessibilityDirectTouchOptions { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("accessibilityExpandedStatus", ArgumentSemantic.Assign)] UIAccessibilityExpandedStatus AccessibilityExpandedStatus { get; set; } } @@ -1115,7 +1033,6 @@ interface UIAccessibilityAnnouncementFinishedEventArgs { bool WasSuccessful { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Protocol (IsInformal = true)] interface UIAccessibilityContainer { @@ -1143,7 +1060,6 @@ interface UIAccessibilityContainer { interface IUIAccessibilityContainerDataTableCell { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIAccessibilityContainerDataTableCell { @@ -1156,7 +1072,6 @@ interface UIAccessibilityContainerDataTableCell { NSRange GetAccessibilityColumnRange (); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -1183,11 +1098,10 @@ interface UIAccessibilityContainerDataTable { IUIAccessibilityContainerDataTableCell [] GetAccessibilityHeaderElementsForColumn (nuint column); } - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate bool UIAccessibilityCustomActionHandler (UIAccessibilityCustomAction customAction); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Please use the designated initializer @@ -1255,18 +1169,17 @@ partial interface UIAccessibilityCustomAction { [NullAllowed, Export ("image", ArgumentSemantic.Strong)] UIImage Image { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("category", ArgumentSemantic.Copy), NullAllowed] string Category { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UIAccessibilityCustomActionCategoryEdit")] NSString CategoryEdit { get; } } delegate UIAccessibilityCustomRotorItemResult UIAccessibilityCustomRotorSearch (UIAccessibilityCustomRotorSearchPredicate predicate); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIAccessibilityCustomRotor { @@ -1297,7 +1210,6 @@ interface UIAccessibilityCustomRotor { UIAccessibilityCustomSystemRotorType SystemRotorType { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (NSObject))] @@ -1311,7 +1223,6 @@ interface NSObject_UIAccessibilityCustomRotor { void SetAccessibilityCustomRotors ([NullAllowed] UIAccessibilityCustomRotor [] customRotors); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIAccessibilityCustomRotorItemResult { @@ -1326,7 +1237,6 @@ interface UIAccessibilityCustomRotorItemResult { UITextRange TargetRange { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIAccessibilityCustomRotorSearchPredicate { @@ -1338,7 +1248,6 @@ interface UIAccessibilityCustomRotorSearchPredicate { UIAccessibilityCustomRotorDirection SearchDirection { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIResponder))] // only happens on the simulator (not devices) on iOS8 (still make sense) @@ -1377,7 +1286,6 @@ interface UIAccessibilityElement : UIAccessibilityIdentification { CGRect AccessibilityFrameInContainerSpace { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] interface UIAccessibilityFocus { [Export ("accessibilityElementDidBecomeFocused")] @@ -1394,7 +1302,6 @@ interface UIAccessibilityFocus { NSSet AccessibilityAssistiveTechnologyFocusedIdentifiers { get; } } - [NoWatch] [MacCatalyst (13, 1)] interface UIAccessibilityAction { [Export ("accessibilityIncrement")] @@ -1418,7 +1325,7 @@ interface UIAccessibilityAction { UIAccessibilityCustomAction [] AccessibilityCustomActions { get; set; } } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] // NSObject category inlined in UIResponder interface UIAccessibilityDragging { @@ -1430,7 +1337,7 @@ interface UIAccessibilityDragging { } /// An object that provides an accessible description of a location. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -1459,7 +1366,6 @@ interface UIAccessibilityLocationDescriptor { } [NoMac] - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIAccessibilityContentSizeCategoryImageAdjusting { @@ -1469,7 +1375,7 @@ interface UIAccessibilityContentSizeCategoryImageAdjusting { } /// - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (UIView), KeepRefUntil = "Dismissed", Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIActionSheetDelegate) })] [Deprecated (PlatformName.iOS, 8, 3, message: "Use 'UIAlertController' with 'UIAlertControllerStyle.ActionSheet' instead.")] [MacCatalyst (13, 1)] @@ -1541,7 +1447,7 @@ interface UIActionSheet { delegate void UIActionHandler (UIAction action); - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIMenuElement))] [DisableDefaultCtor] @@ -1601,7 +1507,7 @@ interface IUIActionSheetDelegate { } /// A class used to receive notifications from a . /// A strongly typed implementation of a class that can be used to respond to events raised by the . /// Apple documentation for UIActionSheetDelegate - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -1630,14 +1536,16 @@ interface UIActionSheetDelegate { } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIActivity { [Export ("activityType")] + [NullAllowed] NSString Type { get; } [Export ("activityTitle")] + [NullAllowed] string Title { get; } [Export ("activityImage")] @@ -1663,7 +1571,7 @@ interface UIActivity { } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Static] interface UIActivityType { @@ -1738,7 +1646,6 @@ interface UIActivityType { // You're supposed to implement this protocol in your UIView subclasses, not provide // a implementation for only this protocol, which is why there is no model to subclass. // - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIInputViewAudioFeedback { @@ -1750,7 +1657,7 @@ interface UIInputViewAudioFeedback { } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSOperation))] [ThreadSafe] @@ -1762,9 +1669,11 @@ interface UIActivityItemProvider : UIActivityItemSource { NativeHandle Constructor (NSObject placeholderItem); [Export ("placeholderItem", ArgumentSemantic.Retain)] + [NullAllowed] NSObject PlaceholderItem { get; } [Export ("activityType")] + [NullAllowed] NSString ActivityType { get; } [Export ("item")] @@ -1785,7 +1694,7 @@ interface IUIActivityItemSource { } /// This class should not be used for complex processing, as it is called on the main UI thread. Applications that require complex processing of data before passing it to objects should implement . /// /// Apple documentation for UIActivityItemSource - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -1797,6 +1706,7 @@ interface UIActivityItemSource { [Abstract] [Export ("activityViewController:itemForActivityType:")] + [return: NullAllowed] NSObject GetItemForActivity (UIActivityViewController activityViewController, [NullAllowed] NSString activityType); [Export ("activityViewController:dataTypeIdentifierForActivityType:")] @@ -1820,7 +1730,7 @@ interface UIActivityItemSource { } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] // NSInternalInconsistencyException Reason: Use initWithActivityItems:applicationActivities: to instantiate an instance of UIActivityViewController @@ -1843,7 +1753,7 @@ interface UIActivityViewController { [NullAllowed, Export ("completionWithItemsHandler", ArgumentSemantic.Copy)] UIActivityViewControllerCompletion CompletionWithItemsHandler { get; set; } - [NoWatch, iOS (15, 4), MacCatalyst (15, 4)] + [iOS (15, 4), MacCatalyst (15, 4)] [Export ("allowsProminentActivity")] bool AllowsProminentActivity { get; set; } @@ -1859,11 +1769,11 @@ interface UIActivityViewController { UIActivitySectionTypes ExcludedActivitySectionTypes { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] partial interface UIAlertAction : NSCopying, UIAccessibilityIdentification { [Export ("title")] + [NullAllowed] string Title { get; } [Export ("style")] @@ -1876,7 +1786,6 @@ partial interface UIAlertAction : NSCopying, UIAccessibilityIdentification { UIAlertAction Create (string title, UIAlertActionStyle style, [NullAllowed] Action handler); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] partial interface UIAlertController @@ -1931,7 +1840,7 @@ partial interface UIAlertController interface IUIAlertViewDelegate { } /// - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (UIView), KeepRefUntil = "Dismissed", Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIAlertViewDelegate) })] [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'UIAlertController' with a 'UIAlertControllerStyle.Alert' type instead.")] [MacCatalyst (13, 1)] @@ -2007,7 +1916,7 @@ interface UIAlertView : NSCoding { /// A strongly typed implementation of a class that can be used to respond to events raised by the . /// /// Apple documentation for UIAlertViewDelegate - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -2045,7 +1954,6 @@ interface UIAlertViewDelegate { // When a new class adopts UIAppearance, merely list it as one of the // base interfaces, this will generate the stubs for it. // - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -2054,7 +1962,6 @@ interface UIAlertViewDelegate { interface UIAppearance { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIStackView { @@ -2104,7 +2011,6 @@ interface UIStackView { nfloat GetCustomSpacing (UIView arrangedSubview); } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface UIStateRestoration { @@ -2113,7 +2019,6 @@ interface UIStateRestoration { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -2123,6 +2028,7 @@ interface UIStateRestoring { IUIStateRestoring RestorationParent { get; } [Export ("objectRestorationClass")] + [NullAllowed] Class ObjectRestorationClass { get; } [Export ("encodeRestorableStateWithCoder:")] @@ -2140,7 +2046,6 @@ interface IUIStateRestoring { } [BaseType (typeof (NSObject))] [Model] [Protocol] - [NoWatch] [MacCatalyst (13, 1)] interface UIObjectRestoration { #if false @@ -2152,7 +2057,6 @@ interface UIObjectRestoration { interface IUIViewAnimating { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIViewAnimating { @@ -2194,7 +2098,6 @@ interface UIViewAnimating { } interface IUIViewImplicitlyAnimating { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIViewImplicitlyAnimating : UIViewAnimating { @@ -2211,7 +2114,6 @@ interface UIViewImplicitlyAnimating : UIViewAnimating { void ContinueAnimation ([NullAllowed] IUITimingCurveProvider parameters, nfloat durationFactor); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIViewPropertyAnimator : UIViewImplicitlyAnimating, NSCopying { @@ -2262,7 +2164,6 @@ interface UIViewPropertyAnimator : UIViewImplicitlyAnimating, NSCopying { interface IUIViewControllerPreviewing { } [Protocol] - [NoWatch] [MacCatalyst (13, 1)] interface UIViewControllerPreviewing { @@ -2304,7 +2205,6 @@ interface IUIViewControllerPreviewingDelegate { } [Protocol] [Model] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIViewControllerPreviewingDelegate { @@ -2323,7 +2223,6 @@ interface UIViewControllerPreviewingDelegate { void CommitViewController (IUIViewControllerPreviewing previewingContext, UIViewController viewControllerToCommit); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIViewControllerRestoration { @@ -2336,7 +2235,6 @@ interface UIViewControllerRestoration { } /// Provides data for the event. - [NoWatch] [MacCatalyst (13, 1)] interface UIStatusBarFrameChangeEventArgs { [Export ("UIApplicationStatusBarFrameUserInfoKey")] @@ -2344,7 +2242,6 @@ interface UIStatusBarFrameChangeEventArgs { } /// Provides data for the event. - [NoWatch] [MacCatalyst (13, 1)] interface UIStatusBarOrientationChangeEventArgs { [NoTV] @@ -2353,7 +2250,6 @@ interface UIStatusBarOrientationChangeEventArgs { UIInterfaceOrientation StatusBarOrientation { get; } } - [NoWatch] [MacCatalyst (13, 1)] interface UIApplicationLaunchEventArgs { [NullAllowed] @@ -2375,7 +2271,6 @@ interface UIApplicationLaunchEventArgs { bool LocationLaunch { get; } } - [NoWatch] [MacCatalyst (13, 1)] [StrongDictionary ("UIApplicationOpenUrlOptionKeys")] interface UIApplicationOpenUrlOptions { @@ -2387,7 +2282,6 @@ interface UIApplicationOpenUrlOptions { bool UniversalLinksOnly { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] [Internal] // we'll make it public if there's a need for them (beside the strong dictionary we provide) @@ -2401,7 +2295,7 @@ interface UIApplicationOpenUrlOptionKeys { [Field ("UIApplicationOpenURLOptionsOpenInPlaceKey")] NSString OpenInPlaceKey { get; } - [NoWatch, NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("UIApplicationOpenURLOptionsEventAttributionKey")] NSString OpenUrlOptionsEventAttributionKey { get; } @@ -2410,16 +2304,15 @@ interface UIApplicationOpenUrlOptionKeys { [Field ("UIApplicationOpenURLOptionUniversalLinksOnly")] NSString UniversalLinksOnlyKey { get; } - [NoWatch, NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("UIApplicationOpenExternalURLOptionsEventAttributionKey")] NSString OpenExternalUrlOptionsEventAttributionKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIResponder))] - interface UIApplication { + interface UIApplication : UIAccessibility { [Static, ThreadSafe] [Export ("sharedApplication")] UIApplication SharedApplication { get; } @@ -2822,7 +2715,7 @@ interface UIApplication { [Field ("UIApplicationLaunchOptionsShortcutItemKey")] NSString LaunchOptionsShortcutItemKey { get; } - [NoWatch, NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [Field ("UIApplicationLaunchOptionsEventAttributionKey")] NSString LaunchOptionsEventAttributionKey { get; } @@ -2843,7 +2736,6 @@ interface UIApplication { [Export ("supportedInterfaceOrientationsForWindow:")] UIInterfaceOrientationMask SupportedInterfaceOrientationsForWindow ([Transient] UIWindow window); - [NoWatch] [MacCatalyst (13, 1)] [Field ("UITrackingRunLoopMode")] NSString UITrackingRunLoopMode { get; } @@ -2956,7 +2848,7 @@ interface UIApplication { [Field ("UIApplicationOpenSettingsURLString")] NSString OpenSettingsUrlString { get; } - [iOS (15, 4), MacCatalyst (15, 4), TV (15, 4), NoWatch] + [iOS (15, 4), MacCatalyst (15, 4), TV (15, 4)] [Field ("UIApplicationOpenNotificationSettingsURLString")] NSString OpenNotificationSettingsUrl { get; } @@ -2994,7 +2886,7 @@ interface UIApplication { [Field ("UIApplicationLaunchOptionsUserActivityTypeKey")] NSString LaunchOptionsUserActivityTypeKey { get; } - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Field ("UIApplicationLaunchOptionsCloudKitShareMetadataKey")] NSString LaunchOptionsCloudKitShareMetadataKey { get; } @@ -3022,7 +2914,7 @@ interface UIApplication { [Export ("alternateIconName"), NullAllowed] string AlternateIconName { get; } - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("activateSceneSessionForRequest:errorHandler:")] void ActivateSceneSession (UISceneSessionActivationRequest request, [NullAllowed] Action errorHandler); @@ -3034,7 +2926,7 @@ interface UIApplication { /// Icon for a Quick Action shortcut, which appears in response to user-applied pressure. /// /// Apple documentation for UIApplicationShortcutIcon - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIApplicationShortcutIcon : NSCopying { @@ -3055,7 +2947,6 @@ interface UIApplicationShortcutIcon : NSCopying { // This is inside ContactsUI.framework [NoMac] [NoTV] - [NoWatch] [NoMacCatalyst] [Static, Export ("iconWithContact:")] UIApplicationShortcutIcon FromContact (CNContact contact); @@ -3064,7 +2955,7 @@ interface UIApplicationShortcutIcon : NSCopying { /// A Quick Action shortcut, which appears in response to user-applied pressure. /// /// Apple documentation for UIApplicationShortcutItem - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -3100,7 +2991,7 @@ interface UIApplicationShortcutItem : NSMutableCopying { /// A mutable "quick action" available on the Home screen. /// /// Apple documentation for UIMutableApplicationShortcutItem - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIApplicationShortcutItem))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: Don't call -[UIApplicationShortcutItem init]. @@ -3139,7 +3030,6 @@ interface UIMutableApplicationShortcutItem { NSObject TargetContentIdentifier { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIDynamicBehavior))] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: init is undefined for objects of type UIAttachmentBehavior @@ -3211,7 +3101,6 @@ interface UIAttachmentBehavior { nfloat FrictionTorque { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIContentSizeCategoryAdjusting { @@ -3221,7 +3110,6 @@ interface UIContentSizeCategoryAdjusting { bool AdjustsFontForContentSizeCategory { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] interface UIContentSizeCategoryChangedEventArgs { [Export ("UIContentSizeCategoryNewValueKey")] @@ -3229,7 +3117,6 @@ interface UIContentSizeCategoryChangedEventArgs { } [Static] - [NoWatch] [MacCatalyst (13, 1)] public enum UIContentSizeCategory { [MacCatalyst (13, 1)] @@ -3270,17 +3157,17 @@ public enum UIContentSizeCategory { AccessibilityExtraExtraLarge, [Field ("UIContentSizeCategoryAccessibilityExtraExtraExtraLarge")] - AccessibilityExtraExtraExtraLarge + AccessibilityExtraExtraExtraLarge, } - [iOS (16, 0), MacCatalyst (16, 0), TV (16, 0), NoWatch] + [iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Native] public enum UIAlertControllerSeverity : long { Default = 0, Critical, } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UICalendarViewDecorationSize : long { Small = 0, @@ -3288,7 +3175,7 @@ public enum UICalendarViewDecorationSize : long { Large = 2, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UICollectionViewSelfSizingInvalidation : long { Disabled, @@ -3296,7 +3183,7 @@ public enum UICollectionViewSelfSizingInvalidation : long { EnabledIncludingConstraints, } - [NoWatch, TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UIContextMenuConfigurationElementOrder : long { Automatic = 0, @@ -3304,7 +3191,7 @@ public enum UIContextMenuConfigurationElementOrder : long { Fixed, } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UIEditMenuArrowDirection : long { Automatic = 0, @@ -3314,7 +3201,7 @@ public enum UIEditMenuArrowDirection : long { Right = 4, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UIFindSessionSearchResultDisplayStyle : long { CurrentAndTotal, @@ -3322,7 +3209,7 @@ public enum UIFindSessionSearchResultDisplayStyle : long { None, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UIMenuElementSize : long { Small = 0, @@ -3332,7 +3219,7 @@ public enum UIMenuElementSize : long { Automatic = -1, } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UINavigationBarNSToolbarSection : long { None, @@ -3341,7 +3228,7 @@ public enum UINavigationBarNSToolbarSection : long { Content, } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UINavigationItemSearchBarPlacement : long { Automatic, @@ -3349,7 +3236,7 @@ public enum UINavigationItemSearchBarPlacement : long { Stacked, } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UINavigationItemStyle : long { Navigator, @@ -3357,7 +3244,7 @@ public enum UINavigationItemStyle : long { Editor, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UINSToolbarItemPresentationSize : long { Unspecified = -1, @@ -3366,7 +3253,7 @@ public enum UINSToolbarItemPresentationSize : long { Large = 3, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UIPageControlDirection : long { Natural = 0, @@ -3377,9 +3264,9 @@ public enum UIPageControlDirection : long { } #if XAMCORE_5_0 - [NoWatch, TV (16, 0), iOS (16, 0), NoMacCatalyst] + [TV (16, 0), iOS (16, 0), NoMacCatalyst] #else - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Obsoleted (PlatformName.MacCatalyst, 17, 4, message: Constants.ApiRemovedGeneral)] #endif [Native] @@ -3391,7 +3278,7 @@ public enum UIPasteControlDisplayMode : ulong { ArrowAndLabel, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UIScreenReferenceDisplayModeStatus : long { NotSupported, @@ -3400,7 +3287,7 @@ public enum UIScreenReferenceDisplayModeStatus : long { Enabled, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UITableViewSelfSizingInvalidation : long { Disabled, @@ -3408,7 +3295,7 @@ public enum UITableViewSelfSizingInvalidation : long { EnabledIncludingConstraints, } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UITextSearchFoundTextStyle : long { Normal, @@ -3416,7 +3303,7 @@ public enum UITextSearchFoundTextStyle : long { Highlighted, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Native] public enum UITextSearchMatchMethod : long { Contains, @@ -3427,7 +3314,7 @@ public enum UITextSearchMatchMethod : long { delegate UIViewController UIContextMenuContentPreviewProvider (); delegate UIMenu UIContextMenuActionProvider (UIMenuElement [] suggestedActions); - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIContextMenuConfiguration { @@ -3454,7 +3341,7 @@ interface UIContextMenuConfiguration { interface IUIContextMenuInteractionDelegate { } - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -3506,7 +3393,7 @@ interface UIContextMenuInteractionDelegate { UITargetedPreview GetDismissalPreview (UIContextMenuInteraction interaction, UIContextMenuConfiguration configuration, INSCopying identifier); } - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -3544,7 +3431,7 @@ interface UIContextMenuInteraction : UIInteraction { interface IUIContextMenuInteractionCommitAnimating { } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface UIContextMenuInteractionCommitAnimating : UIContextMenuInteractionAnimating { @@ -3559,7 +3446,6 @@ interface IUICoordinateSpace { } [Model] [BaseType (typeof (NSObject))] [Abstract] - [NoWatch] [MacCatalyst (13, 1)] [NoMac] interface UICoordinateSpace { @@ -3588,7 +3474,7 @@ interface IUIApplicationDelegate { } [BaseType (typeof (NSObject))] [Model] - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [Protocol] interface UIApplicationDelegate { @@ -3844,41 +3730,38 @@ interface UIApplicationDelegate { [Export ("applicationShouldRequestHealthAuthorization:")] void ShouldRequestHealthAuthorization (UIApplication application); - [NoWatch] [MacCatalyst (13, 1)] [Export ("application:userDidAcceptCloudKitShareWithMetadata:")] void UserDidAcceptCloudKitShare (UIApplication application, CKShareMetadata cloudKitShareMetadata); [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'GetHandlerForIntent' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'GetHandlerForIntent' instead.")] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'GetHandlerForIntent' instead.")] [Export ("application:handleIntent:completionHandler:")] void HandleIntent (UIApplication application, INIntent intent, Action completionHandler); - [iOS (14, 0), TV (14, 0), Watch (7, 0)] + [iOS (14, 0), TV (14, 0)] [MacCatalyst (14, 0)] [Export ("application:handlerForIntent:")] [return: NullAllowed] NSObject GetHandlerForIntent (UIApplication application, INIntent intent); - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Export ("application:configurationForConnectingSceneSession:options:")] UISceneConfiguration GetConfiguration (UIApplication application, UISceneSession connectingSceneSession, UISceneConnectionOptions options); - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Export ("application:didDiscardSceneSessions:")] void DidDiscardSceneSessions (UIApplication application, NSSet sceneSessions); - [iOS (15, 0), TV (15, 0), Watch (8, 0), MacCatalyst (15, 0)] + [iOS (15, 0), TV (15, 0), MacCatalyst (15, 0)] [Export ("applicationShouldAutomaticallyLocalizeKeyCommands:")] bool ShouldAutomaticallyLocalizeKeyCommands (UIApplication application); } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface UIExtensionPointIdentifier { @@ -3887,7 +3770,6 @@ interface UIExtensionPointIdentifier { NSString Keyboard { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -3931,6 +3813,7 @@ interface UIBarItem : NSCoding, UIAppearance, UIAccessibility, UIAccessibilityId [Export ("titleTextAttributesForState:"), Internal] [Appearance] + [return: NullAllowed] NSDictionary _GetTitleTextAttributes (UIControlState state); [MacCatalyst (13, 1)] @@ -3942,7 +3825,6 @@ interface UIBarItem : NSCoding, UIAppearance, UIAccessibility, UIAccessibilityId UIEdgeInsets LargeContentSizeImageInsets { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarItem))] [DesignatedDefaultCtor] @@ -4044,17 +3926,17 @@ interface UIBarButtonItem : NSCoding [Export ("primaryAction", ArgumentSemantic.Copy)] UIAction PrimaryAction { get; set; } - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed] [Export ("menu", ArgumentSemantic.Copy)] UIMenu Menu { get; set; } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("changesSelectionAsPrimaryAction")] bool ChangesSelectionAsPrimaryAction { get; set; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("selected")] bool Selected { [Bind ("isSelected")] get; set; } @@ -4163,81 +4045,80 @@ interface UIBarButtonItem : NSCoding [NullAllowed, Export ("buttonGroup", ArgumentSemantic.Weak)] UIBarButtonItemGroup ButtonGroup { get; } - [NoWatch, TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("preferredMenuElementOrder", ArgumentSemantic.Assign)] UIContextMenuConfigurationElementOrder PreferredMenuElementOrder { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("hidden")] bool Hidden { [Bind ("isHidden")] get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("menuRepresentation", ArgumentSemantic.Copy)] [NullAllowed] UIMenuElement MenuRepresentation { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("creatingFixedGroup")] UIBarButtonItemGroup CreatingFixedGroup { get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("creatingMovableGroupWithCustomizationIdentifier:")] UIBarButtonItemGroup CreatingMovableGroup (string customizationIdentifier); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("creatingOptionalGroupWithCustomizationIdentifier:inDefaultCustomization:")] UIBarButtonItemGroup CreatingOptionalGroup (string customizationIdentifier, bool inDefaultCustomization); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("addSymbolEffect:")] void AddSymbolEffect (NSSymbolEffect symbolEffect); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("addSymbolEffect:options:")] void AddSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("addSymbolEffect:options:animated:")] void AddSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options, bool animated); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeSymbolEffectOfType:options:")] void RemoveSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeSymbolEffectOfType:options:animated:")] void RemoveSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options, bool animated); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeAllSymbolEffects")] void RemoveAllSymbolEffects (); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeAllSymbolEffectsWithOptions:")] void RemoveAllSymbolEffects (NSSymbolEffectOptions options); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeAllSymbolEffectsWithOptions:animated:")] void RemoveAllSymbolEffects (NSSymbolEffectOptions options, bool animated); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("setSymbolImage:withContentTransition:")] void SetSymbolImage (UIImage symbolImage, NSSymbolContentTransition transition); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("setSymbolImage:withContentTransition:options:")] void SetSymbolImage (UIImage symbolImage, NSSymbolContentTransition transition, NSSymbolEffectOptions options); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("symbolAnimationEnabled")] bool SymbolAnimationEnabled { [Bind ("isSymbolAnimationEnabled")] get; set; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeSymbolEffectOfType:")] void RemoveSymbolEffect (NSSymbolEffect symbolEffect); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIBarButtonItemGroup : NSCoding { @@ -4254,36 +4135,35 @@ interface UIBarButtonItemGroup : NSCoding { [Export ("displayingRepresentativeItem")] bool DisplayingRepresentativeItem { [Bind ("isDisplayingRepresentativeItem")] get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("alwaysAvailable")] bool AlwaysAvailable { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("hidden")] bool Hidden { [Bind ("isHidden")] get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("menuRepresentation", ArgumentSemantic.Copy)] [NullAllowed] UIMenuElement MenuRepresentation { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("optionalGroupWithCustomizationIdentifier:inDefaultCustomization:representativeItem:items:")] UIBarButtonItemGroup GetOptionalGroup (string customizationIdentifier, bool inDefaultCustomization, [NullAllowed] UIBarButtonItem representativeItem, UIBarButtonItem [] items); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("movableGroupWithCustomizationIdentifier:representativeItem:items:")] UIBarButtonItemGroup GetMovableGroup (string customizationIdentifier, [NullAllowed] UIBarButtonItem representativeItem, UIBarButtonItem [] items); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("fixedGroupWithRepresentativeItem:items:")] UIBarButtonItemGroup GetFixedGroup ([NullAllowed] UIBarButtonItem representativeItem, UIBarButtonItem [] items); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UICollectionReusableView { @@ -4291,6 +4171,7 @@ interface UICollectionReusableView { NativeHandle Constructor (CGRect frame); [Export ("reuseIdentifier", ArgumentSemantic.Copy)] + [NullAllowed] NSString ReuseIdentifier { get; } [RequiresSuper] @@ -4311,7 +4192,6 @@ interface UICollectionReusableView { UICollectionViewLayoutAttributes PreferredLayoutAttributesFittingAttributes (UICollectionViewLayoutAttributes layoutAttributes); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIScrollView))] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: UICollectionView must be initialized with a non-nil layout parameter @@ -4450,7 +4330,7 @@ interface UICollectionView : NSCoding, UIDataSourceTranslating [Export ("reloadItemsAtIndexPaths:")] void ReloadItems (NSIndexPath [] indexPaths); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("reconfigureItemsAtIndexPaths:")] void ReconfigureItems (NSIndexPath [] indexPaths); @@ -4513,16 +4393,16 @@ UICollectionViewTransitionLayout StartInteractiveTransition (UICollectionViewLay [Export ("remembersLastFocusedIndexPath")] bool RemembersLastFocusedIndexPath { get; set; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("selectionFollowsFocus")] bool SelectionFollowsFocus { get; set; } - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("allowsFocus")] bool AllowsFocus { get; set; } - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("allowsFocusDuringEditing")] bool AllowsFocusDuringEditing { get; set; } @@ -4534,66 +4414,65 @@ UICollectionViewTransitionLayout StartInteractiveTransition (UICollectionViewLay [Export ("prefetchingEnabled")] bool PrefetchingEnabled { [Bind ("isPrefetchingEnabled")] get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("dragDelegate", ArgumentSemantic.Weak)] IUICollectionViewDragDelegate DragDelegate { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("dropDelegate", ArgumentSemantic.Weak)] IUICollectionViewDropDelegate DropDelegate { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("dragInteractionEnabled")] bool DragInteractionEnabled { get; set; } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("contextMenuInteraction")] UIContextMenuInteraction ContextMenuInteraction { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("reorderingCadence", ArgumentSemantic.Assign)] UICollectionViewReorderingCadence ReorderingCadence { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("hasUncommittedUpdates")] bool HasUncommittedUpdates { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasActiveDrag")] bool HasActiveDrag { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasActiveDrop")] bool HasActiveDrop { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("editing")] bool Editing { [Bind ("isEditing")] get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("allowsSelectionDuringEditing")] bool AllowsSelectionDuringEditing { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("allowsMultipleSelectionDuringEditing")] bool AllowsMultipleSelectionDuringEditing { get; set; } - [Watch (9, 0), TV (16, 0), iOS (16, 0)] + [TV (16, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("selfSizingInvalidation", ArgumentSemantic.Assign)] UICollectionViewSelfSizingInvalidation SelfSizingInvalidation { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("indexPathForSupplementaryView:")] [return: NullAllowed] NSIndexPath GetIndexPathForSupplementaryView (UICollectionReusableView supplementaryView); @@ -4602,7 +4481,6 @@ UICollectionViewTransitionLayout StartInteractiveTransition (UICollectionViewLay interface IUICollectionViewDataSourcePrefetching { } [Protocol] - [NoWatch] [MacCatalyst (13, 1)] interface UICollectionViewDataSourcePrefetching { @@ -4617,7 +4495,6 @@ interface UICollectionViewDataSourcePrefetching { // // Combined version of UICollectionViewDataSource, UICollectionViewDelegate // - [NoWatch] [MacCatalyst (13, 1)] [Model] [BaseType (typeof (NSObject))] @@ -4628,7 +4505,6 @@ interface UICollectionViewSource : UICollectionViewDataSource, UICollectionViewD interface IUICollectionViewDataSource { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -4669,7 +4545,6 @@ interface UICollectionViewDataSource { interface IUICollectionViewDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [Model] [Protocol] @@ -4742,7 +4617,7 @@ interface UICollectionViewDelegate : UIScrollViewDelegate { [Export ("collectionView:targetContentOffsetForProposedContentOffset:")] CGPoint GetTargetContentOffset (UICollectionView collectionView, CGPoint proposedContentOffset); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("collectionView:canEditItemAtIndexPath:")] bool CanEditItem (UICollectionView collectionView, NSIndexPath indexPath); @@ -4764,44 +4639,44 @@ interface UICollectionViewDelegate : UIScrollViewDelegate { [return: NullAllowed] NSIndexPath GetIndexPathForPreferredFocusedView (UICollectionView collectionView); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("collectionView:selectionFollowsFocusForItemAtIndexPath:")] bool GetSelectionFollowsFocusForItem (UICollectionView collectionView, NSIndexPath indexPath); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("collectionView:targetIndexPathForMoveOfItemFromOriginalIndexPath:atCurrentIndexPath:toProposedIndexPath:")] NSIndexPath GetTargetIndexPathForMoveOfItemFromOriginalIndexPath (UICollectionView collectionView, NSIndexPath originalIndexPath, NSIndexPath currentIndexPath, NSIndexPath proposedIndexPath); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("collectionView:shouldSpringLoadItemAtIndexPath:withContext:")] bool ShouldSpringLoadItem (UICollectionView collectionView, NSIndexPath indexPath, IUISpringLoadedInteractionContext context); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("collectionView:shouldBeginMultipleSelectionInteractionAtIndexPath:")] bool ShouldBeginMultipleSelectionInteraction (UICollectionView collectionView, NSIndexPath indexPath); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("collectionView:didBeginMultipleSelectionInteractionAtIndexPath:")] void DidBeginMultipleSelectionInteraction (UICollectionView collectionView, NSIndexPath indexPath); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("collectionViewDidEndMultipleSelectionInteraction:")] void DidEndMultipleSelectionInteraction (UICollectionView collectionView); [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("collectionView:contextMenuConfigurationForItemAtIndexPath:point:")] [return: NullAllowed] UIContextMenuConfiguration GetContextMenuConfiguration (UICollectionView collectionView, NSIndexPath indexPath, CGPoint point); [Deprecated (PlatformName.iOS, 16, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("collectionView:previewForHighlightingContextMenuWithConfiguration:")] @@ -4809,92 +4684,91 @@ interface UICollectionViewDelegate : UIScrollViewDelegate { UITargetedPreview GetPreviewForHighlightingContextMenu (UICollectionView collectionView, UIContextMenuConfiguration configuration); [Deprecated (PlatformName.iOS, 16, 0)] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] [Export ("collectionView:previewForDismissingContextMenuWithConfiguration:")] [return: NullAllowed] UITargetedPreview GetPreviewForDismissingContextMenu (UICollectionView collectionView, UIContextMenuConfiguration configuration); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("collectionView:willPerformPreviewActionForMenuWithConfiguration:animator:")] void WillPerformPreviewAction (UICollectionView collectionView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("collectionView:willDisplayContextMenuWithConfiguration:animator:")] void WillDisplayContextMenu (UICollectionView collectionView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("collectionView:willEndContextMenuInteractionWithConfiguration:animator:")] void WillEndContextMenuInteraction (UICollectionView collectionView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("collectionView:sceneActivationConfigurationForItemAtIndexPath:point:")] [return: NullAllowed] UIWindowSceneActivationConfiguration GetSceneActivationConfigurationForItem (UICollectionView collectionView, NSIndexPath indexPath, CGPoint point); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("collectionView:canPerformPrimaryActionForItemAtIndexPath:")] bool CanPerformPrimaryActionForItem (UICollectionView collectionView, NSIndexPath indexPath); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("collectionView:performPrimaryActionForItemAtIndexPath:")] void PerformPrimaryActionForItem (UICollectionView collectionView, NSIndexPath indexPath); - [NoWatch, TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("collectionView:contextMenuConfigurationForItemsAtIndexPaths:point:")] [return: NullAllowed] UIContextMenuConfiguration GetContextMenuConfiguration (UICollectionView collectionView, NSIndexPath [] indexPaths, CGPoint point); - [NoWatch, TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("collectionView:contextMenuConfiguration:highlightPreviewForItemAtIndexPath:")] [return: NullAllowed] UITargetedPreview GetContextMenuConfigurationHighlightPreview (UICollectionView collectionView, UIContextMenuConfiguration configuration, NSIndexPath indexPath); - [NoWatch, TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("collectionView:contextMenuConfiguration:dismissalPreviewForItemAtIndexPath:")] [return: NullAllowed] UITargetedPreview GetContextMenuConfigurationDismissalPreview (UICollectionView collectionView, UIContextMenuConfiguration configuration, NSIndexPath indexPath); } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void UICollectionViewCellConfigurationUpdateHandler (UICollectionViewCell cell, UICellConfigurationState state); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UICollectionReusableView))] interface UICollectionViewCell { [Export ("initWithFrame:")] NativeHandle Constructor (CGRect frame); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("configurationState")] UICellConfigurationState ConfigurationState { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setNeedsUpdateConfiguration")] void SetNeedsUpdateConfiguration (); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("updateConfigurationUsingState:")] void UpdateConfiguration (UICellConfigurationState state); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("configurationUpdateHandler", ArgumentSemantic.Copy)] UICollectionViewCellConfigurationUpdateHandler ConfigurationUpdateHandler { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("contentConfiguration", ArgumentSemantic.Copy)] IUIContentConfiguration ContentConfiguration { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("automaticallyUpdatesContentConfiguration")] bool AutomaticallyUpdatesContentConfiguration { get; set; } @@ -4916,28 +4790,27 @@ interface UICollectionViewCell { [Export ("selectedBackgroundView", ArgumentSemantic.Retain)] UIView SelectedBackgroundView { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("dragStateDidChange:")] void DragStateDidChange (UICollectionViewCellDragState dragState); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("backgroundConfiguration", ArgumentSemantic.Copy)] UIBackgroundConfiguration BackgroundConfiguration { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("automaticallyUpdatesBackgroundConfiguration")] bool AutomaticallyUpdatesBackgroundConfiguration { get; set; } - [Watch (9, 0), TV (16, 0), iOS (16, 0)] + [TV (16, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("defaultBackgroundConfiguration")] UIBackgroundConfiguration DefaultBackgroundConfiguration { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] interface UICollectionViewController : UICollectionViewSource, NSCoding { @@ -4969,7 +4842,6 @@ interface UICollectionViewController : UICollectionViewSource, NSCoding { bool InstallsStandardGestureForInteractiveMovement { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UICollectionViewDelegate))] [Model] @@ -4994,7 +4866,6 @@ interface UICollectionViewDelegateFlowLayout { CGSize GetReferenceSizeForFooter (UICollectionView collectionView, UICollectionViewLayout layout, nint section); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UICollectionViewLayout))] interface UICollectionViewFlowLayout { @@ -5024,7 +4895,6 @@ interface UICollectionViewFlowLayout { [Export ("sectionInset")] UIEdgeInsets SectionInset { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("sectionInsetReference", ArgumentSemantic.Assign)] UICollectionViewFlowLayoutSectionInsetReference SectionInsetReference { get; set; } @@ -5042,13 +4912,12 @@ interface UICollectionViewFlowLayout { CGSize AutomaticSize { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] interface UICollectionViewLayout : NSCoding { - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("UICollectionViewLayoutAutomaticDimension")] nfloat AutomaticDimension { get; } @@ -5186,18 +5055,15 @@ interface UICollectionViewLayout : NSCoding { [Export ("invalidationContextForEndingInteractiveMovementOfItemsToFinalIndexPaths:previousIndexPaths:movementCancelled:")] UICollectionViewLayoutInvalidationContext GetInvalidationContextForEndingInteractiveMovementOfItems (NSIndexPath [] finalIndexPaths, NSIndexPath [] previousIndexPaths, bool movementCancelled); - [NoWatch] [MacCatalyst (13, 1)] [Export ("developmentLayoutDirection")] UIUserInterfaceLayoutDirection DevelopmentLayoutDirection { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("flipsHorizontallyInOppositeLayoutDirection")] bool FlipsHorizontallyInOppositeLayoutDirection { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UICollectionViewLayoutAttributes : UIDynamicItem, NSCopying { @@ -5229,6 +5095,7 @@ interface UICollectionViewLayoutAttributes : UIDynamicItem, NSCopying { UICollectionElementCategory RepresentedElementCategory { get; } [Export ("representedElementKind")] + [NullAllowed] string RepresentedElementKind { get; } [Static] @@ -5251,7 +5118,6 @@ interface UICollectionViewLayoutAttributes : UIDynamicItem, NSCopying { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UICollectionViewLayoutInvalidationContext { @@ -5263,14 +5129,17 @@ interface UICollectionViewLayoutInvalidationContext { [MacCatalyst (13, 1)] [Export ("invalidatedItemIndexPaths")] + [NullAllowed] NSIndexPath [] InvalidatedItemIndexPaths { get; } [MacCatalyst (13, 1)] [Export ("invalidatedSupplementaryIndexPaths")] + [NullAllowed] NSDictionary InvalidatedSupplementaryIndexPaths { get; } [MacCatalyst (13, 1)] [Export ("invalidatedDecorationIndexPaths")] + [NullAllowed] NSDictionary InvalidatedDecorationIndexPaths { get; } [MacCatalyst (13, 1)] @@ -5306,7 +5175,6 @@ interface UICollectionViewLayoutInvalidationContext { CGPoint InteractiveMovementTarget { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UICollectionViewLayoutInvalidationContext))] partial interface UICollectionViewFlowLayoutInvalidationContext { @@ -5317,7 +5185,6 @@ partial interface UICollectionViewFlowLayoutInvalidationContext { bool InvalidateFlowLayoutAttributes { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UICollectionViewLayout))] [DisableDefaultCtor] // NSInternalInconsistencyException Reason: -[UICollectionViewTransitionLayout init] is not a valid initializer - use -initWithCurrentLayout:nextLayout: instead @@ -5344,7 +5211,6 @@ interface UICollectionViewTransitionLayout : NSCoding { nfloat TransitionProgress { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UICollectionViewUpdateItem { @@ -5360,7 +5226,6 @@ interface UICollectionViewUpdateItem { UICollectionUpdateAction UpdateAction { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] interface UICollectionElementKindSectionKey { @@ -5377,7 +5242,7 @@ interface UICollectionElementKindSectionKey { // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -CGColor not defined for the UIColor ; need to first convert colorspace. [DisableDefaultCtor] interface UIColor : NSSecureCoding, NSCopying -#if !TVOS && !WATCH +#if !TVOS , NSItemProviderWriting, NSItemProviderReading #endif { @@ -5403,7 +5268,6 @@ interface UIColor : NSSecureCoding, NSCopying [return: NullAllowed] UIColor FromName (string name); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("colorNamed:inBundle:compatibleWithTraitCollection:")] @@ -5514,21 +5378,18 @@ interface UIColor : NSSecureCoding, NSCopying [Export ("CGColor")] CGColor CGColor { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("CIColor")] CIColor CIColor { get; } #if !NET [Obsolete ("Use 'LightText' instead.")] - [NoWatch] [NoTV] [Export ("lightTextColor")] [Static] UIColor LightTextColor { get; } #endif - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("lightTextColor")] @@ -5537,14 +5398,12 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'DarkText' instead.")] - [NoWatch] [NoTV] [Export ("darkTextColor")] [Static] UIColor DarkTextColor { get; } #endif - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Export ("darkTextColor")] @@ -5553,7 +5412,6 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'SystemGroupedBackground' instead.")] - [NoWatch] [NoTV] [Export ("groupTableViewBackgroundColor")] [Static] @@ -5561,7 +5419,6 @@ interface UIColor : NSSecureCoding, NSCopying #endif [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'SystemGroupedBackground' instead.")] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'SystemGroupedBackground' instead.")] @@ -5572,7 +5429,6 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'ViewFlipsideBackground' instead.")] [Deprecated (PlatformName.iOS, 7, 0)] - [NoWatch] [NoTV] [Export ("viewFlipsideBackgroundColor")] [Static] @@ -5580,7 +5436,6 @@ interface UIColor : NSSecureCoding, NSCopying #endif [Deprecated (PlatformName.iOS, 7, 0)] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -5591,7 +5446,6 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'ScrollViewTexturedBackground' instead.")] [Deprecated (PlatformName.iOS, 7, 0)] - [NoWatch] [NoTV] [Export ("scrollViewTexturedBackgroundColor")] [Static] @@ -5599,7 +5453,6 @@ interface UIColor : NSSecureCoding, NSCopying #endif [Deprecated (PlatformName.iOS, 7, 0)] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] @@ -5610,26 +5463,22 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'UnderPageBackground' instead.")] [Deprecated (PlatformName.iOS, 7, 0)] - [NoWatch] [NoTV] [Static, Export ("underPageBackgroundColor")] UIColor UnderPageBackgroundColor { get; } #endif [Deprecated (PlatformName.iOS, 7, 0)] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1)] [Static, Export ("underPageBackgroundColor")] UIColor UnderPageBackground { get; } - [NoWatch] [MacCatalyst (13, 1)] [Static, Export ("colorWithCIColor:")] UIColor FromCIColor (CIColor color); - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithCIColor:")] NativeHandle Constructor (CIColor ciColor); @@ -5648,50 +5497,50 @@ interface UIColor : NSSecureCoding, NSCopying // From the NSItemProviderReading protocol, a static method. [Static] - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS +#if !TVOS new #endif string [] ReadableTypeIdentifiers { get; } // From the NSItemProviderReading protocol, a static method. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] [Export ("objectWithItemProviderData:typeIdentifier:error:")] [return: NullAllowed] -#if !WATCH && !TVOS +#if !TVOS new #endif UIColor GetObject (NSData data, string typeIdentifier, [NullAllowed] out NSError outError); // From the NSItemProviderWriting protocol, a static method. // NSItemProviderWriting doesn't seem to be implemented for tvOS/watchOS, even though the headers say otherwise. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS +#if !TVOS new #endif string [] WritableTypeIdentifiers { get; } // From UIColor (DynamicColors) - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("colorWithDynamicProvider:")] UIColor FromDynamicProvider (Func dynamicProvider); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("initWithDynamicProvider:")] NativeHandle Constructor (Func dynamicProvider); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("resolvedColorWithTraitCollection:")] UIColor GetResolvedColor (UITraitCollection traitCollection); @@ -5703,13 +5552,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemRed' instead.")] - [NoWatch] [Static] [Export ("systemRedColor")] UIColor SystemRedColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemRedColor")] @@ -5717,13 +5564,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemGreen' instead.")] - [NoWatch] [Static] [Export ("systemGreenColor")] UIColor SystemGreenColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemGreenColor")] @@ -5731,13 +5576,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemBlue' instead.")] - [NoWatch] [Static] [Export ("systemBlueColor")] UIColor SystemBlueColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemBlueColor")] @@ -5745,13 +5588,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemOrange' instead.")] - [NoWatch] [Static] [Export ("systemOrangeColor")] UIColor SystemOrangeColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemOrangeColor")] @@ -5759,13 +5600,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemYellow' instead.")] - [NoWatch] [Static] [Export ("systemYellowColor")] UIColor SystemYellowColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemYellowColor")] @@ -5773,13 +5612,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemPink' instead.")] - [NoWatch] [Static] [Export ("systemPinkColor")] UIColor SystemPinkColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemPinkColor")] @@ -5787,13 +5624,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemPurple' instead.")] - [NoWatch] [Static] [Export ("systemPurpleColor")] UIColor SystemPurpleColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemPurpleColor")] @@ -5801,13 +5636,11 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemTeal' instead.")] - [NoWatch] [Static] [Export ("systemTealColor")] UIColor SystemTealColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemTealColor")] @@ -5815,13 +5648,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemIndigo' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("systemIndigoColor")] UIColor SystemIndigoColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemIndigoColor")] @@ -5829,52 +5662,50 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemBrown' instead.")] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("systemBrownColor")] UIColor SystemBrownColor { get; } #endif - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("systemBrownColor")] UIColor SystemBrown { get; } #if !NET [Obsolete ("Use 'SystemMint' instead.")] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("systemMintColor")] UIColor SystemMintColor { get; } #endif - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("systemMintColor")] UIColor SystemMint { get; } #if !NET [Obsolete ("Use 'SystemCyan' instead.")] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("systemCyanColor")] UIColor SystemCyanColor { get; } #endif - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("systemCyanColor")] UIColor SystemCyan { get; } #if !NET [Obsolete ("Use 'SystemGray' instead.")] - [NoWatch] [Static] [Export ("systemGrayColor")] UIColor SystemGrayColor { get; } #endif - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("systemGrayColor")] @@ -5882,13 +5713,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemGray2' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemGray2Color")] UIColor SystemGray2Color { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemGray2Color")] @@ -5896,13 +5727,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemGray3' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemGray3Color")] UIColor SystemGray3Color { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemGray3Color")] @@ -5910,13 +5741,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemGray4' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemGray4Color")] UIColor SystemGray4Color { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemGray4Color")] @@ -5924,13 +5755,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemGray5' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemGray5Color")] UIColor SystemGray5Color { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemGray5Color")] @@ -5938,13 +5769,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemGray6' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemGray6Color")] UIColor SystemGray6Color { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemGray6Color")] @@ -5952,26 +5783,26 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'Tint' instead.")] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("tintColor")] UIColor TintColor { get; } #endif - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("tintColor")] UIColor Tint { get; } #if !NET [Obsolete ("Use 'Label' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("labelColor")] UIColor LabelColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("labelColor")] @@ -5979,13 +5810,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SecondaryLabel' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("secondaryLabelColor")] UIColor SecondaryLabelColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("secondaryLabelColor")] @@ -5993,13 +5824,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'TertiaryLabel' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("tertiaryLabelColor")] UIColor TertiaryLabelColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("tertiaryLabelColor")] @@ -6007,13 +5838,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'QuaternaryLabel' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("quaternaryLabelColor")] UIColor QuaternaryLabelColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("quaternaryLabelColor")] @@ -6021,13 +5852,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'Link' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("linkColor")] UIColor LinkColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("linkColor")] @@ -6035,13 +5866,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'PlaceholderText' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("placeholderTextColor")] UIColor PlaceholderTextColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("placeholderTextColor")] @@ -6049,13 +5880,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'Separator' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("separatorColor")] UIColor SeparatorColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("separatorColor")] @@ -6063,13 +5894,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'OpaqueSeparator' instead.")] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [Static] [Export ("opaqueSeparatorColor")] UIColor OpaqueSeparatorColor { get; } #endif - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("opaqueSeparatorColor")] @@ -6077,13 +5908,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemBackground' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemBackgroundColor")] UIColor SystemBackgroundColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemBackgroundColor")] @@ -6091,13 +5922,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SecondarySystemBackground' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("secondarySystemBackgroundColor")] UIColor SecondarySystemBackgroundColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("secondarySystemBackgroundColor")] @@ -6105,13 +5936,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'TertiarySystemBackground' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("tertiarySystemBackgroundColor")] UIColor TertiarySystemBackgroundColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("tertiarySystemBackgroundColor")] @@ -6119,13 +5950,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemGroupedBackground' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemGroupedBackgroundColor")] UIColor SystemGroupedBackgroundColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemGroupedBackgroundColor")] @@ -6133,13 +5964,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SecondarySystemGroupedBackground' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("secondarySystemGroupedBackgroundColor")] UIColor SecondarySystemGroupedBackgroundColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("secondarySystemGroupedBackgroundColor")] @@ -6147,13 +5978,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'TertiarySystemGroupedBackground' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("tertiarySystemGroupedBackgroundColor")] UIColor TertiarySystemGroupedBackgroundColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("tertiarySystemGroupedBackgroundColor")] @@ -6161,13 +5992,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SystemFill' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("systemFillColor")] UIColor SystemFillColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemFillColor")] @@ -6175,13 +6006,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'SecondarySystemFill' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("secondarySystemFillColor")] UIColor SecondarySystemFillColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("secondarySystemFillColor")] @@ -6189,13 +6020,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'TertiarySystemFill' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("tertiarySystemFillColor")] UIColor TertiarySystemFillColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("tertiarySystemFillColor")] @@ -6203,13 +6034,13 @@ interface UIColor : NSSecureCoding, NSCopying #if !NET [Obsolete ("Use 'QuaternarySystemFill' instead.")] - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [Static] [Export ("quaternarySystemFillColor")] UIColor QuaternarySystemFillColor { get; } #endif - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("quaternarySystemFillColor")] @@ -6217,23 +6048,22 @@ interface UIColor : NSSecureCoding, NSCopying // UIColor (UIAccessibility) Category - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("accessibilityName")] string AccessibilityName { get; } // Inlined from the ProminenceSupport category - [NoWatch, TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("colorWithProminence:")] UIColor ApplyProminence (UIColorProminence prominence); // Inlined from the ProminenceSupport category - [NoWatch, TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("prominence")] UIColorProminence Prominence { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIDynamicBehavior), Delegates = new string [] { "CollisionDelegate" }, @@ -6253,6 +6083,7 @@ interface UICollisionBehavior { bool TranslatesReferenceBoundsIntoBoundary { get; set; } [Export ("boundaryIdentifiers", ArgumentSemantic.Copy)] + [NullAllowed] NSObject [] BoundaryIdentifiers { get; } [Export ("collisionDelegate", ArgumentSemantic.Assign), NullAllowed] @@ -6290,7 +6121,6 @@ interface UICollisionBehavior { interface IUICollisionBehaviorDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Protocol] @@ -6314,7 +6144,7 @@ interface UICollisionBehaviorDelegate { } /// - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: do not call -[UIDocument init] - the designated initializer is -[UIDocument initWithFileURL: @@ -6325,6 +6155,7 @@ interface UIDocument : NSFilePresenter, NSProgressReporting, UIUserActivityResto string LocalizedName { get; } [Export ("fileType", ArgumentSemantic.Copy)] + [NullAllowed] string FileType { get; } [Export ("fileModificationDate", ArgumentSemantic.Copy)] @@ -6353,6 +6184,7 @@ interface UIDocument : NSFilePresenter, NSProgressReporting, UIUserActivityResto bool LoadFromContents (NSObject contents, [NullAllowed] string typeName, out NSError outError); [Export ("contentsForType:error:")] + [return: NullAllowed] NSObject ContentsForType (string typeName, out NSError outError); [Export ("disableEditing")] @@ -6385,6 +6217,7 @@ interface UIDocument : NSFilePresenter, NSProgressReporting, UIUserActivityResto void AutoSave ([NullAllowed] UIOperationHandler completionHandler); [Export ("savingFileType")] + [NullAllowed] string SavingFileType { get; } [Export ("fileNameExtensionForType:saveOperation:")] @@ -6397,6 +6230,7 @@ interface UIDocument : NSFilePresenter, NSProgressReporting, UIUserActivityResto bool WriteContents (NSObject contents, NSUrl toUrl, UIDocumentSaveOperation saveOperation, [NullAllowed] NSUrl originalContentsURL, out NSError outError); [Export ("fileAttributesToWriteToURL:forSaveOperation:error:")] + [return: NullAllowed] NSDictionary GetFileAttributesToWrite (NSUrl forUrl, UIDocumentSaveOperation saveOperation, out NSError outError); [Export ("readFromURL:error:")] @@ -6440,7 +6274,6 @@ interface UIDocument : NSFilePresenter, NSProgressReporting, UIUserActivityResto interface IUIDynamicAnimatorDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Protocol] @@ -6459,7 +6292,6 @@ interface UIDynamicAnimatorDelegate { void DidPause (UIDynamicAnimator animator); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIDynamicAnimator { @@ -6520,7 +6352,6 @@ interface UIDynamicAnimator { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIDynamicBehavior))] interface UIDynamicItemBehavior { @@ -6578,7 +6409,6 @@ interface UIDynamicItemBehavior { bool Anchored { [Bind ("isAnchored")] get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Protocol] @@ -6605,7 +6435,6 @@ interface UIDynamicItem { UIBezierPath CollisionBoundingPath { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIDynamicItemGroup : UIDynamicItem { @@ -6619,7 +6448,6 @@ interface UIDynamicItemGroup : UIDynamicItem { interface IUIDynamicItem { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIDynamicBehavior { @@ -6645,7 +6473,6 @@ interface UIDynamicBehavior { void WillMoveToAnimator ([NullAllowed] UIDynamicAnimator targetAnimator); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIDynamicBehavior))] [DisableDefaultCtor] @@ -6792,35 +6619,31 @@ interface UIFont : NSCopying, NSSecureCoding { [Internal] // bug 25511 IntPtr _FromName (string name, nfloat size); - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Static] [Internal] // bug https://xamarin.github.io/bugzilla-archives/25/25511/bug.html [Export ("monospacedSystemFontOfSize:weight:")] IntPtr _MonospacedSystemFontOfSize (nfloat fontSize, nfloat weight); - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Static] [Export ("labelFontSize")] nfloat LabelFontSize { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Static] [Export ("buttonFontSize")] nfloat ButtonFontSize { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Static] [Export ("smallSystemFontSize")] nfloat SmallSystemFontSize { get; } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Static] @@ -6884,14 +6707,13 @@ interface UIFont : NSCopying, NSSecureCoding { IntPtr _GetPreferredFontForTextStyle (NSString uiFontTextStyle); // FIXME the API is present but UITraitCollection is not exposed / rdar 27785753 - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("preferredFontForTextStyle:compatibleWithTraitCollection:")] [Internal] IntPtr _GetPreferredFontForTextStyle (NSString uiFontTextStyle, [NullAllowed] UITraitCollection traitCollection); - [Watch (9, 0), iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] + [iOS (16, 0), TV (16, 0), MacCatalyst (16, 0)] [Static] [Internal] [Export ("systemFontOfSize:weight:width:")] @@ -6935,16 +6757,15 @@ public enum UIFontTextStyle { Callout, [NoTV] - [Watch (5, 0)] [MacCatalyst (13, 1)] [Field ("UIFontTextStyleLargeTitle")] LargeTitle, - [iOS (17, 0), TV (17, 0), Watch (10, 0), MacCatalyst (17, 0)] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] [Field ("UIFontTextStyleExtraLargeTitle")] ExtraLargeTitle, - [iOS (17, 0), TV (17, 0), Watch (10, 0), MacCatalyst (17, 0)] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] [Field ("UIFontTextStyleExtraLargeTitle2")] ExtraLargeTitle2, } @@ -6966,6 +6787,7 @@ partial interface UIFontDescriptor : NSSecureCoding, NSCopying { UIFontDescriptorSymbolicTraits SymbolicTraits { get; } [Export ("objectForKey:")] + [return: NullAllowed] NSObject GetObject (NSString anAttribute); [Export ("fontAttributes")] @@ -6997,13 +6819,11 @@ partial interface UIFontDescriptor : NSSecureCoding, NSCopying { UIFontDescriptor GetPreferredDescriptorForTextStyle (UIFontTextStyle uiFontTextStyle); // FIXME the API is present but UITraitCollection is not exposed / rdar #27785753 - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("preferredFontDescriptorWithTextStyle:compatibleWithTraitCollection:")] UIFontDescriptor GetPreferredDescriptorForTextStyle (NSString uiFontTextStyle, [NullAllowed] UITraitCollection traitCollection); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Wrap ("GetPreferredDescriptorForTextStyle (uiFontTextStyle.GetConstant ()!, traitCollection)")] @@ -7027,7 +6847,6 @@ partial interface UIFontDescriptor : NSSecureCoding, NSCopying { UIFontDescriptor CreateWithTraits (UIFontDescriptorSymbolicTraits symbolicTraits); [iOS (13, 0), TV (13, 0)] - [Watch (5, 2)] [MacCatalyst (13, 1)] [Export ("fontDescriptorWithDesign:")] [return: NullAllowed] @@ -7035,7 +6854,6 @@ partial interface UIFontDescriptor : NSSecureCoding, NSCopying { UIFontDescriptor CreateWithDesign (NSString design); [iOS (13, 0), TV (13, 0)] - [Watch (5, 2)] [MacCatalyst (13, 1)] [return: NullAllowed] [Wrap ("CreateWithDesign (design.GetConstant ()!)")] @@ -7113,7 +6931,6 @@ partial interface UIFontDescriptor : NSSecureCoding, NSCopying { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIGestureRecognizerDelegate) })] [Dispose ("OnDispose ();", Optimizable = true)] @@ -7184,12 +7001,12 @@ interface UIGestureRecognizer { [NullAllowed, Export ("name")] string Name { get; set; } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("modifierFlags")] UIKeyModifierFlags ModifierFlags { get; } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("buttonMask")] UIEventButtonMask ButtonMask { get; } @@ -7276,7 +7093,6 @@ interface UIGestureRecognizer { interface IUIGestureRecognizerDelegate { } - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -7308,7 +7124,6 @@ interface UIGestureRecognizerDelegate { bool ShouldReceiveEvent (UIGestureRecognizer gestureRecognizer, UIEvent @event); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIGraphicsRendererFormat : NSCopying { @@ -7326,7 +7141,6 @@ interface UIGraphicsRendererFormat : NSCopying { UIGraphicsRendererFormat PreferredFormat { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIGraphicsRendererContext { @@ -7352,7 +7166,6 @@ interface UIGraphicsRendererContext { void ClipToRect (CGRect rect); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Abstract] // quote form headers "An abstract base class for creating graphics renderers. Do not use this class directly." @@ -7392,7 +7205,6 @@ interface UIGraphicsRenderer { // Not worth it, Action conveys more data //delegate void UIGraphicsImageDrawingActions (UIGraphicsImageRendererContext context); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGraphicsRendererFormat))] interface UIGraphicsImageRendererFormat { @@ -7422,12 +7234,11 @@ interface UIGraphicsImageRendererFormat { [Export ("preferredRange", ArgumentSemantic.Assign)] UIGraphicsImageRendererFormatRange PreferredRange { get; set; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("supportsHighDynamicRange")] bool SupportsHighDynamicRange { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGraphicsRendererContext))] interface UIGraphicsImageRendererContext { @@ -7435,7 +7246,6 @@ interface UIGraphicsImageRendererContext { UIImage CurrentImage { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGraphicsRenderer))] interface UIGraphicsImageRenderer { @@ -7464,7 +7274,6 @@ interface UIGraphicsImageRenderer { //delegate void UIGraphicsPdfDrawingActions (UIGraphicsPdfRendererContext context); // Action - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGraphicsRendererFormat), Name = "UIGraphicsPDFRendererFormat")] interface UIGraphicsPdfRendererFormat { @@ -7478,7 +7287,6 @@ interface UIGraphicsPdfRendererFormat { UIGraphicsPdfRendererFormat DefaultFormat { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGraphicsRendererContext), Name = "UIGraphicsPDFRendererContext")] interface UIGraphicsPdfRendererContext { @@ -7502,7 +7310,6 @@ interface UIGraphicsPdfRendererContext { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGraphicsRenderer), Name = "UIGraphicsPDFRenderer")] interface UIGraphicsPdfRenderer { @@ -7518,7 +7325,6 @@ interface UIGraphicsPdfRenderer { } [BaseType (typeof (UIDynamicBehavior))] - [NoWatch] [MacCatalyst (13, 1)] interface UIGravityBehavior { [DesignatedInitializer] @@ -7555,7 +7361,6 @@ interface UIGravityBehavior { // Even more confusing it that respondToSelecttor return NO on them // even if it works in _real_ life (compare unit and introspection tests) #endif - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UITextInputTraits { @@ -7645,7 +7450,6 @@ interface UITextInputTraits { } /// Provides data for the event. - [NoWatch] [MacCatalyst (13, 1)] interface UIKeyboardEventArgs { [Export ("UIKeyboardFrameBeginUserInfoKey")] @@ -7668,7 +7472,7 @@ interface UIKeyboardEventArgs { } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Static] interface UIKeyboard { @@ -7737,7 +7541,6 @@ interface UIKeyboard { NSString IsLocalUserInfoKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UICommand))] [DesignatedDefaultCtor] @@ -7921,7 +7724,6 @@ interface UIKeyCommand { interface IUIKeyInput { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIKeyInput : UITextInputTraits { @@ -7938,13 +7740,11 @@ interface UIKeyInput : UITextInputTraits { void DeleteBackward (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextPosition { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextRange { @@ -7960,7 +7760,6 @@ interface UITextRange { interface IUITextInput { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UITextInput : UIKeyInput { @@ -8175,11 +7974,11 @@ interface UITextInput : UIKeyInput { [Export ("removeTextPlaceholder:")] void RemoveTextPlaceholder (UITextPlaceholder textPlaceholder); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("willPresentEditMenuWithAnimator:")] void WillPresentEditMenu (IUIEditMenuInteractionAnimating animator); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("willDismissEditMenuWithAnimator:")] void WillDismissEditMenu (IUIEditMenuInteractionAnimating animator); @@ -8205,19 +8004,19 @@ interface UITextInput : UIKeyInput { [Export ("insertAttributedText:")] void InsertAttributedText (NSAttributedString text); - [TV (12, 0), NoWatch, MacCatalyst (13, 1), iOS (12, 0)] + [TV (12, 0), MacCatalyst (13, 1), iOS (12, 0)] [Export ("attributedTextInRange:")] NSAttributedString GetAttributedText (UITextRange range); - [TV (13, 0), NoWatch, iOS (13, 0), MacCatalyst (13, 1)] + [TV (13, 0), iOS (13, 0), MacCatalyst (13, 1)] [Export ("replaceRange:withAttributedText:")] void ReplaceRange (UITextRange range, NSAttributedString attributedText); - [NoWatch, NoTV, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [Export ("willPresentWritingTools")] void WillPresentWritingTools (); - [NoWatch, NoTV, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [Export ("didDismissWritingTools")] void DidDismissWritingTools (); } @@ -8225,7 +8024,7 @@ interface UITextInput : UIKeyInput { /// A manager for bar button items. /// /// Apple documentation for UITextInputAssistantItem - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextInputAssistantItem { @@ -8241,7 +8040,6 @@ interface UITextInputAssistantItem { interface IUITextInputTokenizer { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -8265,7 +8063,6 @@ interface UITextInputTokenizer { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextInputStringTokenizer : UITextInputTokenizer { @@ -8273,7 +8070,6 @@ interface UITextInputStringTokenizer : UITextInputTokenizer { NativeHandle Constructor (IUITextInput textInput); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -8296,7 +8092,6 @@ interface UITextInputDelegate { void TextDidChange (IUITextInput textInput); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextSelectionRect { @@ -8323,7 +8118,7 @@ interface UITextSelectionRect { /// A set of objects derived from a variety of system resources, such as first and last names from the Address Book, text shortcuts, and Apple product names. /// /// Apple documentation for UILexicon - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] partial interface UILexicon : NSCopying { @@ -8336,7 +8131,7 @@ partial interface UILexicon : NSCopying { /// /// /// Apple documentation for UILexiconEntry - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] partial interface UILexiconEntry : NSCopying { @@ -8348,7 +8143,6 @@ partial interface UILexiconEntry : NSCopying { string UserInput { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UILocalizedIndexedCollation { @@ -8457,7 +8251,6 @@ interface UILocalNotification : NSCoding, NSCopying { string AlertTitle { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGestureRecognizer))] interface UILongPressGestureRecognizer { @@ -8479,7 +8272,6 @@ interface UILongPressGestureRecognizer { nint NumberOfTapsRequired { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGestureRecognizer))] interface UITapGestureRecognizer { @@ -8500,7 +8292,6 @@ interface UITapGestureRecognizer { UIEventButtonMask ButtonMaskRequired { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGestureRecognizer))] interface UIPanGestureRecognizer { @@ -8526,7 +8317,7 @@ interface UIPanGestureRecognizer { [Export ("velocityInView:")] CGPoint VelocityInView ([NullAllowed] UIView view); - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("allowedScrollTypesMask", ArgumentSemantic.Assign)] UIScrollTypeMask AllowedScrollTypesMask { get; set; } @@ -8535,7 +8326,7 @@ interface UIPanGestureRecognizer { /// A that recognizes a panning gesture moving from the screen edge inward. /// /// Apple documentation for UIScreenEdgePanGestureRecognizer - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIPanGestureRecognizer))] interface UIScreenEdgePanGestureRecognizer { @@ -8555,7 +8346,7 @@ interface UIScreenEdgePanGestureRecognizer { /// A that displays a control that initiates the refreshing of a . /// /// Apple documentation for UIRefreshControl - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UIRefreshControl : UIAppearance { @@ -8574,7 +8365,6 @@ interface UIRefreshControl : UIAppearance { void EndRefreshing (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIRegion : NSCopying, NSCoding { @@ -8607,7 +8397,7 @@ interface UIRegion : NSCopying, NSCoding { /// A that recognizes the two-finger rotation gesture. /// /// Apple documentation for UIRotationGestureRecognizer - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIGestureRecognizer))] interface UIRotationGestureRecognizer { @@ -8624,7 +8414,7 @@ interface UIRotationGestureRecognizer { /// Gesture recognizer for pinches. /// /// Apple documentation for UIPinchGestureRecognizer - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIGestureRecognizer))] interface UIPinchGestureRecognizer { @@ -8638,7 +8428,6 @@ interface UIPinchGestureRecognizer { nfloat Velocity { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIGestureRecognizer))] interface UISwipeGestureRecognizer { @@ -8654,7 +8443,6 @@ interface UISwipeGestureRecognizer { nuint NumberOfTouchesRequired { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIActivityIndicatorView : NSCoding { @@ -8686,7 +8474,7 @@ interface UIActivityIndicatorView : NSCoding { UIColor Color { get; set; } } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UIItemProviderPresentationSizeProviding { @@ -8697,12 +8485,10 @@ interface UIItemProviderPresentationSizeProviding { [BaseType (typeof (NSObject))] interface UIImage : NSSecureCoding -#if !WATCH , UIAccessibility, UIAccessibilityIdentification #if !TVOS , NSItemProviderWriting, NSItemProviderReading, UIItemProviderPresentationSizeProviding #endif -#endif // !WATCH { [ThreadSafe] [Export ("initWithContentsOfFile:")] @@ -8729,7 +8515,6 @@ interface UIImage : NSSecureCoding [return: NullAllowed] UIImage FromBundle (string name); -#if !WATCH // Thread-safe in iOS 9 or later according to docs. #if IOS // tvOS started with 9.0 code base (and watchOS 2.0 came later) @@ -8740,7 +8525,6 @@ interface UIImage : NSSecureCoding [Static, Export ("imageNamed:inBundle:compatibleWithTraitCollection:")] [return: NullAllowed] UIImage FromBundle (string name, [NullAllowed] NSBundle bundle, [NullAllowed] UITraitCollection traitCollection); -#endif // !WATCH [Static] [Export ("imageWithContentsOfFile:")] @@ -8768,7 +8552,6 @@ interface UIImage : NSSecureCoding [ThreadSafe] UIImage FromImage (CGImage image, nfloat scale, UIImageOrientation orientation); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("imageWithCIImage:")] @@ -8778,10 +8561,10 @@ interface UIImage : NSSecureCoding // From the NSItemProviderReading protocol, a static method. [Static] - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("readableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS +#if !TVOS new #endif string [] ReadableTypeIdentifiers { get; } @@ -8789,10 +8572,10 @@ interface UIImage : NSSecureCoding // From the NSItemProviderReading protocol, a static method. [Static] [Export ("objectWithItemProviderData:typeIdentifier:error:")] - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [return: NullAllowed] -#if !WATCH && !TVOS +#if !TVOS new #endif UIImage GetObject (NSData data, string typeIdentifier, [NullAllowed] out NSError outError); @@ -8879,7 +8662,6 @@ interface UIImage : NSSecureCoding [ThreadSafe] NativeHandle Constructor (CGImage cgImage); - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithCIImage:")] [ThreadSafe] @@ -8889,7 +8671,6 @@ interface UIImage : NSSecureCoding [ThreadSafe] NativeHandle Constructor (CGImage cgImage, nfloat scale, UIImageOrientation orientation); - [NoWatch] [MacCatalyst (13, 1)] [Export ("CIImage")] [ThreadSafe] @@ -8927,7 +8708,6 @@ interface UIImage : NSSecureCoding [return: NullAllowed] UIImage LoadFromData (NSData data, nfloat scale); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("imageWithCIImage:scale:orientation:")] @@ -8938,7 +8718,6 @@ interface UIImage : NSSecureCoding [ThreadSafe] NativeHandle Constructor (NSData data, nfloat scale); - [NoWatch] [MacCatalyst (13, 1)] [Export ("initWithCIImage:scale:orientation:")] [ThreadSafe] @@ -8962,13 +8741,11 @@ interface UIImage : NSSecureCoding [ThreadSafe] UIImageResizingMode ResizingMode { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("traitCollection")] [ThreadSafe] UITraitCollection TraitCollection { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("imageAsset")] [ThreadSafe] @@ -8983,7 +8760,6 @@ interface UIImage : NSSecureCoding [Export ("flipsForRightToLeftLayoutDirection")] bool FlipsForRightToLeftLayoutDirection { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("imageRendererFormat")] UIGraphicsImageRendererFormat ImageRendererFormat { get; } @@ -8994,37 +8770,37 @@ interface UIImage : NSSecureCoding // From the NSItemProviderWriting protocol, a static method. // NSItemProviderWriting doesn't seem to be implemented for tvOS/watchOS, even though the headers say otherwise. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] [Export ("writableTypeIdentifiersForItemProvider", ArgumentSemantic.Copy)] -#if !WATCH && !TVOS +#if !TVOS new #endif string [] WritableTypeIdentifiers { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemImageNamed:")] [return: NullAllowed] UIImage GetSystemImage (string name); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemImageNamed:withConfiguration:")] [return: NullAllowed] UIImage GetSystemImage (string name, [NullAllowed] UIImageConfiguration configuration); - [NoWatch, TV (13, 0), iOS (13, 0)] // UITraitCollection is not available on watch, it has been reported before. + [TV (13, 0), iOS (13, 0)] // UITraitCollection is not available on watch, it has been reported before. [MacCatalyst (13, 1)] [Static] [Export ("systemImageNamed:compatibleWithTraitCollection:")] [return: NullAllowed] UIImage GetSystemImage (string name, [NullAllowed] UITraitCollection traitCollection); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [ThreadSafe] @@ -9032,147 +8808,145 @@ interface UIImage : NSSecureCoding [return: NullAllowed] UIImage FromBundle (string name, [NullAllowed] NSBundle bundle, [NullAllowed] UIImageConfiguration configuration); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("symbolImage")] bool SymbolImage { [Bind ("isSymbolImage")] get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("baselineOffsetFromBottom")] nfloat BaselineOffsetFromBottom { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("hasBaseline")] bool HasBaseline { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("imageWithBaselineOffsetFromBottom:")] UIImage GetImageFromBottom (nfloat baselineOffset); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("imageWithoutBaseline")] UIImage GetImageWithoutBaseline (); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("configuration", ArgumentSemantic.Copy)] [NullAllowed] UIImageConfiguration Configuration { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("imageWithConfiguration:")] UIImage ApplyConfiguration (UIImageConfiguration configuration); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("symbolConfiguration", ArgumentSemantic.Copy)] UIImageSymbolConfiguration SymbolConfiguration { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("imageByApplyingSymbolConfiguration:")] [return: NullAllowed] UIImage ApplyConfiguration (UIImageSymbolConfiguration configuration); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("imageWithTintColor:")] UIImage ApplyTintColor (UIColor color); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("imageWithTintColor:renderingMode:")] UIImage ApplyTintColor (UIColor color, UIImageRenderingMode renderingMode); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("imageByPreparingForDisplay")] [return: NullAllowed] UIImage GetImageByPreparingForDisplay (); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("prepareForDisplayWithCompletionHandler:")] void PrepareForDisplay (Action completionHandler); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("imageByPreparingThumbnailOfSize:")] [return: NullAllowed] UIImage GetImageByPreparingThumbnail (CGSize ofSize); [Async] - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("prepareThumbnailOfSize:completionHandler:")] void PrepareThumbnail (CGSize OfSize, Action completionHandler); // Inlined from UIImage (PreconfiguredSystemImages) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("actionsImage", ArgumentSemantic.Strong)] UIImage ActionsImage { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("addImage", ArgumentSemantic.Strong)] UIImage AddImage { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("removeImage", ArgumentSemantic.Strong)] UIImage RemoveImage { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("checkmarkImage", ArgumentSemantic.Strong)] UIImage CheckmarkImage { get; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("strokedCheckmarkImage", ArgumentSemantic.Strong)] UIImage StrokedCheckmarkImage { get; } - [Watch (9, 0), TV (16, 0), MacCatalyst (16, 0), iOS (16, 0)] + [TV (16, 0), MacCatalyst (16, 0), iOS (16, 0)] [Static] [Export ("systemImageNamed:variableValue:withConfiguration:")] [return: NullAllowed] UIImage GetSystemImage (string name, double value, [NullAllowed] UIImageConfiguration configuration); - [Watch (9, 0), TV (16, 0), MacCatalyst (16, 0), iOS (16, 0)] + [TV (16, 0), MacCatalyst (16, 0), iOS (16, 0)] [Static] [Export ("imageNamed:inBundle:variableValue:withConfiguration:")] [return: NullAllowed] UIImage FromBundle (string name, [NullAllowed] NSBundle bundle, double value, [NullAllowed] UIImageConfiguration configuration); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("isHighDynamicRange")] bool IsHighDynamicRange { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("imageRestrictedToStandardDynamicRange")] UIImage ImageRestrictedToStandardDynamicRange { get; } } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIImageConfiguration : NSCopying, NSSecureCoding { - [NoWatch] // UITraitCollection is not available in WatchOS it has been reported before [MacCatalyst (13, 1)] [NullAllowed, Export ("traitCollection")] UITraitCollection TraitCollection { get; } - [NoWatch] // UITraitCollection is not available in WatchOS it has been reported before [MacCatalyst (13, 1)] [Export ("configurationWithTraitCollection:")] UIImageConfiguration GetConfiguration ([NullAllowed] UITraitCollection traitCollection); @@ -9180,26 +8954,26 @@ interface UIImageConfiguration : NSCopying, NSSecureCoding { [Export ("configurationByApplyingConfiguration:")] UIImageConfiguration GetConfiguration ([NullAllowed] UIImageConfiguration otherConfiguration); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("locale")] NSLocale Locale { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("configurationWithLocale:")] UIImageConfiguration GetConfiguration ([NullAllowed] NSLocale locale); [Static] - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("configurationWithLocale:")] UIImageConfiguration CreateConfiguration ([NullAllowed] NSLocale locale); - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("configurationWithTraitCollection:")] UIImageConfiguration CreateConfiguration ([NullAllowed] UITraitCollection traitCollection); } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIImageConfiguration))] interface UIImageSymbolConfiguration { @@ -9244,17 +9018,17 @@ interface UIImageSymbolConfiguration { [Export ("configurationWithFont:scale:")] UIImageSymbolConfiguration Create (UIFont font, UIImageSymbolScale scale); - [TV (15, 0), Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("configurationWithHierarchicalColor:")] UIImageSymbolConfiguration Create (UIColor hierarchicalColor); - [TV (15, 0), Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("configurationWithPaletteColors:")] UIImageSymbolConfiguration Create (UIColor [] paletteColors); - [TV (15, 0), Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("configurationPreferringMulticolor")] UIImageSymbolConfiguration ConfigurationPreferringMulticolor { get; } @@ -9274,13 +9048,13 @@ interface UIImageSymbolConfiguration { [Export ("isEqualToConfiguration:")] bool IsEqualTo ([NullAllowed] UIImageSymbolConfiguration otherConfiguration); - [Watch (9, 0), TV (16, 0), MacCatalyst (16, 0), iOS (16, 0)] + [TV (16, 0), MacCatalyst (16, 0), iOS (16, 0)] [Static] [Export ("configurationPreferringMonochrome")] UIImageSymbolConfiguration GetConfigurationPreferringMonochrome (); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIMenuElement))] [DisableDefaultCtor] @@ -9332,7 +9106,7 @@ interface UIMenu { UIMenuElementSize PreferredElementSize { get; set; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -9349,7 +9123,7 @@ interface UIMenuElement : NSCopying, NSSecureCoding, UIAccessibilityIdentificati UIImage Image { get; } } - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -9370,7 +9144,7 @@ interface UIPreviewParameters : NSCopying { UIColor BackgroundColor { get; set; } } - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -9393,7 +9167,7 @@ interface UIPreviewTarget : NSCopying { CGAffineTransform Transform { get; } } - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -9425,7 +9199,6 @@ interface UITargetedPreview : NSCopying { UITargetedPreview GetRetargetedPreview (UIPreviewTarget newTarget); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -9456,7 +9229,6 @@ partial interface UIImageAsset : NSSecureCoding { void UnregisterImageWithTraitCollection (UITraitCollection traitCollection); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIEvent { @@ -9469,27 +9241,31 @@ interface UIEvent { [Export ("timestamp")] double Timestamp { get; } - [TV (13, 4), NoWatch, iOS (13, 4)] + [TV (13, 4), iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("modifierFlags")] UIKeyModifierFlags ModifierFlags { get; } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("buttonMask")] UIEventButtonMask ButtonMask { get; } [Export ("allTouches")] + [NullAllowed] NSSet AllTouches { get; } [Export ("touchesForView:")] + [return: NullAllowed] NSSet TouchesForView (UIView view); [Export ("touchesForWindow:")] + [return: NullAllowed] NSSet TouchesForWindow (UIWindow window); [Export ("touchesForGestureRecognizer:")] + [return: NullAllowed] NSSet TouchesForGestureRecognizer (UIGestureRecognizer window); [MacCatalyst (13, 1)] @@ -9505,7 +9281,6 @@ interface UIEvent { // that's one of the few enums based on CGFloat - we expose the [n]float directly in the API // but we need a way to give access to the constants to developers - [NoWatch] [MacCatalyst (13, 1)] [Static] interface UIWindowLevel { @@ -9521,7 +9296,6 @@ interface UIWindowLevel { nfloat StatusBar { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIWindow { @@ -9612,14 +9386,13 @@ UIScreen Screen { [Notification] NSString DidResignKeyNotification { get; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("safeAreaAspectFitLayoutGuide", ArgumentSemantic.Strong)] IUILayoutGuideAspectFitting SafeAreaAspectFitLayoutGuide { get; } } delegate void UIControlEnumerateEventsIteratorHandler ([NullAllowed] UIAction actionHandler, [NullAllowed] NSObject target, [NullAllowed] Selector action, UIControlEvent controlEvents, out bool stop); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIControl : UIContextMenuInteractionDelegate { @@ -9647,7 +9420,6 @@ interface UIControl : UIContextMenuInteractionDelegate { [Export ("contentHorizontalAlignment")] UIControlContentHorizontalAlignment HorizontalAlignment { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("effectiveContentHorizontalAlignment")] UIControlContentHorizontalAlignment EffectiveContentHorizontalAlignment { get; } @@ -9715,6 +9487,7 @@ interface UIControl : UIContextMenuInteractionDelegate { UIControlEvent AllControlEvents { get; } [Export ("actionsForTarget:forControlEvent:")] + [return: NullAllowed] string [] GetActions ([NullAllowed] NSObject target, UIControlEvent events); [TV (14, 0), iOS (14, 0)] @@ -9733,40 +9506,39 @@ interface UIControl : UIContextMenuInteractionDelegate { [Export ("sendActionsForControlEvents:")] void SendActionForControlEvents (UIControlEvent events); - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("contextMenuInteraction", ArgumentSemantic.Strong)] UIContextMenuInteraction ContextMenuInteraction { get; } - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("contextMenuInteractionEnabled")] bool ContextMenuInteractionEnabled { [Bind ("isContextMenuInteractionEnabled")] get; set; } - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("showsMenuAsPrimaryAction")] bool ShowsMenuAsPrimaryAction { get; set; } - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("menuAttachmentPointForConfiguration:")] CGPoint GetMenuAttachmentPoint (UIContextMenuConfiguration configuration); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("toolTip")] string ToolTip { get; set; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("toolTipInteraction", ArgumentSemantic.Strong)] UIToolTipInteraction ToolTipInteraction { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("symbolAnimationEnabled")] bool SymbolAnimationEnabled { [Bind ("isSymbolAnimationEnabled")] get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -9779,7 +9551,6 @@ interface UIBarPositioning { interface IUIBarPositioning { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -9910,14 +9681,13 @@ interface UIBezierPath : NSSecureCoding, NSCopying { UIBezierPath BezierPathByReversingPath (); } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] delegate UIPointerStyle UIButtonPointerStyleProvider (UIButton button, UIPointerEffect proposedEffect, UIPointerShape proposedShape); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] delegate void UIButtonConfigurationUpdateHandler (UIButton button); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting @@ -9929,24 +9699,24 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting [Export ("initWithFrame:")] NativeHandle Constructor (CGRect frame); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithFrame:primaryAction:")] NativeHandle Constructor (CGRect frame, [NullAllowed] UIAction primaryAction); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("systemButtonWithImage:target:action:")] UIButton GetSystemButton (UIImage image, [NullAllowed] NSObject target, [NullAllowed] Selector action); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("systemButtonWithPrimaryAction:")] UIButton GetSystemButton ([NullAllowed] UIAction primaryAction); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("buttonWithType:primaryAction:")] @@ -10036,28 +9806,28 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting [Export ("held")] bool Held { [Bind ("isHeld")] get; } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("role", ArgumentSemantic.Assign)] UIButtonRole Role { get; set; } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [Export ("pointerInteractionEnabled")] bool PointerInteractionEnabled { [Bind ("isPointerInteractionEnabled")] get; set; } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [NullAllowed, Export ("pointerStyleProvider", ArgumentSemantic.Copy)] UIButtonPointerStyleProvider PointerStyleProvider { get; set; } - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed] [Export ("menu", ArgumentSemantic.Copy)] UIMenu Menu { get; set; } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("changesSelectionAsPrimaryAction")] bool ChangesSelectionAsPrimaryAction { get; set; } @@ -10081,6 +9851,7 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting void SetBackgroundImage ([NullAllowed] UIImage image, UIControlState forState); [Export ("titleForState:")] + [return: NullAllowed] string Title (UIControlState state); [Export ("titleColorForState:")] @@ -10100,6 +9871,7 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting UIImage BackgroundImageForState (UIControlState state); [Export ("currentTitle", ArgumentSemantic.Retain)] + [NullAllowed] string CurrentTitle { get; } [Export ("currentTitleColor", ArgumentSemantic.Retain)] @@ -10124,7 +9896,7 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting [Export ("imageView", ArgumentSemantic.Retain)] UIImageView ImageView { get; } - [TV (15, 0), Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("subtitleLabel", ArgumentSemantic.Strong)] UILabel SubtitleLabel { get; } @@ -10156,47 +9928,48 @@ interface UIButton : UIAccessibilityContentSizeCategoryImageAdjusting // 6.0 // [Export ("currentAttributedTitle", ArgumentSemantic.Retain)] + [NullAllowed] NSAttributedString CurrentAttributedTitle { get; } [Export ("setAttributedTitle:forState:")] void SetAttributedTitle ([NullAllowed] NSAttributedString title, UIControlState state); [Export ("attributedTitleForState:")] + [return: NullAllowed] NSAttributedString GetAttributedTitle (UIControlState state); [Appearance] - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("setPreferredSymbolConfiguration:forImageInState:")] void SetPreferredSymbolConfiguration ([NullAllowed] UIImageSymbolConfiguration configuration, UIControlState state); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("preferredSymbolConfigurationForImageInState:")] [return: NullAllowed] UIImageSymbolConfiguration GetPreferredSymbolConfiguration (UIControlState state); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("currentPreferredSymbolConfiguration", ArgumentSemantic.Strong)] UIImageSymbolConfiguration CurrentPreferredSymbolConfiguration { get; } // From UIButton (UIBehavioralStyle) - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [NoTV, MacCatalyst (15, 0), iOS (15, 0)] [Export ("behavioralStyle")] UIBehavioralStyle BehavioralStyle { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [NoTV, MacCatalyst (15, 0), iOS (15, 0)] [Export ("preferredBehavioralStyle", ArgumentSemantic.Assign)] UIBehavioralStyle PreferredBehavioralStyle { get; set; } - [NoWatch, TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (17, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("preferredMenuElementOrder", ArgumentSemantic.Assign)] UIContextMenuConfigurationElementOrder PreferredMenuElementOrder { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UILabel : UIContentSizeCategoryAdjusting, UILetterformAwareAdjusting { @@ -10288,34 +10061,30 @@ interface UILabel : UIContentSizeCategoryAdjusting, UILetterformAwareAdjusting { [Export ("allowsDefaultTighteningForTruncation")] bool AllowsDefaultTighteningForTruncation { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("lineBreakStrategy", ArgumentSemantic.Assign)] NSLineBreakStrategy LineBreakStrategy { get; set; } - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] [Export ("enablesMarqueeWhenAncestorFocused")] bool EnablesMarqueeWhenAncestorFocused { get; set; } - [MacCatalyst (15, 0), NoWatch, iOS (15, 0), TV (15, 0)] + [MacCatalyst (15, 0), iOS (15, 0), TV (15, 0)] [Export ("showsExpansionTextWhenTruncated")] bool ShowsExpansionTextWhenTruncated { get; set; } [Appearance] - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("preferredVibrancy", ArgumentSemantic.Assign)] UILabelVibrancy PreferredVibrancy { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIImageView -#if !WATCH - : UIAccessibilityContentSizeCategoryImageAdjusting -#endif // !WATCH - { + : UIAccessibilityContentSizeCategoryImageAdjusting { [Export ("initWithFrame:")] NativeHandle Constructor (CGRect frame); @@ -10372,85 +10141,85 @@ interface UIImageView [Export ("focusedFrameGuide")] UILayoutGuide FocusedFrameGuide { get; } - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] [Export ("overlayContentView", ArgumentSemantic.Strong)] UIView OverlayContentView { get; } - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] [Export ("masksFocusEffectToContents")] bool MasksFocusEffectToContents { get; set; } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("preferredSymbolConfiguration", ArgumentSemantic.Strong)] UIImageSymbolConfiguration PreferredSymbolConfiguration { get; set; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("preferredImageDynamicRange", ArgumentSemantic.Assign)] UIImageDynamicRange PreferredImageDynamicRange { get; set; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("imageDynamicRange", ArgumentSemantic.Assign)] UIImageDynamicRange ImageDynamicRange { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("addSymbolEffect:")] void AddSymbolEffect (NSSymbolEffect symbolEffect); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("addSymbolEffect:options:")] void AddSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("addSymbolEffect:options:animated:")] void AddSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options, bool animated); [Async] - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("addSymbolEffect:options:animated:completion:")] void AddSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options, bool animated, [NullAllowed] Action completionHandler); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeSymbolEffectOfType:")] void RemoveSymbolEffect (NSSymbolEffect symbolEffect); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeSymbolEffectOfType:options:")] void RemoveSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeSymbolEffectOfType:options:animated:")] void RemoveSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options, bool animated); [Async] - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeSymbolEffectOfType:options:animated:completion:")] void RemoveSymbolEffect (NSSymbolEffect symbolEffect, NSSymbolEffectOptions options, bool animated, [NullAllowed] Action completionHandler); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeAllSymbolEffects")] void RemoveAllSymbolEffects (); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeAllSymbolEffectsWithOptions:")] void RemoveAllSymbolEffects (NSSymbolEffectOptions options); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("removeAllSymbolEffectsWithOptions:animated:")] void RemoveAllSymbolEffects (NSSymbolEffectOptions options, bool animated); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("setSymbolImage:withContentTransition:")] void SetSymbolImage (UIImage symbolImage, NSSymbolContentTransition transition); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("setSymbolImage:withContentTransition:options:")] void SetSymbolImage (UIImage symbolImage, NSSymbolContentTransition transition, NSSymbolEffectOptions options); [Async] - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("setSymbolImage:withContentTransition:options:completion:")] void SetSymbolImage (UIImage symbolImage, NSSymbolContentTransition transition, NSSymbolEffectOptions options, [NullAllowed] Action completionHandler); } @@ -10463,7 +10232,7 @@ interface UIImageView /// /// /// Apple documentation for UIDatePicker - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UIDatePicker { @@ -10522,7 +10291,6 @@ interface UIDatePicker { bool RoundsToMinuteInterval { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [ThreadSafe] @@ -10625,14 +10393,15 @@ interface UIDevice { void PlayInputClick (); [Export ("identifierForVendor", ArgumentSemantic.Retain)] + [NullAllowed] NSUuid IdentifierForVendor { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIDictationPhrase { [Export ("alternativeInterpretations")] + [NullAllowed] string [] AlternativeInterpretations { get; } [Export ("text")] @@ -10644,7 +10413,7 @@ interface UIDictationPhrase { /// Application developers can use this class to display and interact with files on the device. Types of interaction include, e.g., previewing, printing, opening, and copying files. /// /// Apple documentation for UIDocumentInteractionController - [NoTV, NoWatch] + [NoTV] [MacCatalyst (14, 0)] // doc as 13.0 but throws: NSGenericException Reason: UIDocumentInteractionController not available [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIDocumentInteractionControllerDelegate) })] interface UIDocumentInteractionController { @@ -10713,7 +10482,7 @@ interface IUIDocumentInteractionControllerDelegate { } /// Application developers can override methods in this class in order to support different types of interaction with files on the device. /// /// Apple documentation for UIDocumentInteractionControllerDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -10772,7 +10541,7 @@ interface UIDocumentInteractionControllerDelegate { } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UINavigationController), Delegates = new string [] { "Delegate" }, Events = new Type [] { typeof (UIImagePickerControllerDelegate) })] interface UIImagePickerController { @@ -10781,6 +10550,7 @@ interface UIImagePickerController { bool IsSourceTypeAvailable (UIImagePickerControllerSourceType sourceType); [Export ("availableMediaTypesForSourceType:"), Static] + [return: NullAllowed] string [] AvailableMediaTypes (UIImagePickerControllerSourceType sourceType); // This is the foundation to implement both id @@ -10829,6 +10599,7 @@ interface UIImagePickerController { [Static] [Export ("availableCaptureModesForCameraDevice:")] + [return: NullAllowed] NSNumber [] AvailableCaptureModesForCameraDevice (UIImagePickerControllerCameraDevice cameraDevice); [Export ("cameraDevice")] @@ -10898,7 +10669,7 @@ interface UIImagePickerController { // UINavigationControllerDelegate, UIImagePickerControllerDelegate /// [BaseType (typeof (UINavigationControllerDelegate))] - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Model] [Protocol] @@ -10913,7 +10684,7 @@ interface UIImagePickerControllerDelegate { /// A that integrates with Core Data. /// /// Apple documentation for UIManagedDocument - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIDocument))] // *** Assertion failure in -[UIManagedDocument init], /SourceCache/UIKit_Sim/UIKit-1914.84/UIDocument.m:258 @@ -10951,6 +10722,7 @@ interface UIManagedDocument { bool ReadAdditionalContent (NSUrl absoluteURL, out NSError error); [Export ("additionalContentForURL:error:")] + [return: NullAllowed] NSObject AdditionalContent (NSUrl absoluteURL, out NSError error); [Export ("writeAdditionalContent:toURL:originalContentsURL:error:")] @@ -10959,7 +10731,7 @@ interface UIManagedDocument { /// [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'UIEditMenuInteraction' instead.")] - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'UIEditMenuInteraction' instead.")] [BaseType (typeof (NSObject))] @@ -11036,7 +10808,7 @@ bool MenuVisible { /// [Deprecated (PlatformName.iOS, 16, 0, message: "Use 'UIEditMenuInteraction' instead.")] - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 16, 0, message: "Use 'UIEditMenuInteraction' instead.")] [BaseType (typeof (NSObject))] @@ -11054,7 +10826,6 @@ interface UIMenuItem { Selector Action { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UINavigationBar : UIBarPositioning, NSCoding { @@ -11207,22 +10978,21 @@ interface UINavigationBar : UIBarPositioning, NSCoding { [Appearance] UIStringAttributes LargeTitleTextAttributes { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("preferredBehavioralStyle", ArgumentSemantic.Assign)] UIBehavioralStyle PreferredBehavioralStyle { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("currentNSToolbarSection", ArgumentSemantic.Assign)] UINavigationBarNSToolbarSection CurrentNSToolbarSection { get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("behavioralStyle", ArgumentSemantic.Assign)] UIBehavioralStyle BehavioralStyle { get; } } interface IUINavigationBarDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarPositioningDelegate))] [Model] @@ -11245,7 +11015,6 @@ interface UINavigationBarDelegate { UINavigationBarNSToolbarSection GetNSToolbarSection (UINavigationBar navigationBar); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UINavigationItem : NSCoding { @@ -11373,76 +11142,75 @@ UIBarButtonItem RightBarButtonItem { [NullAllowed, Export ("compactScrollEdgeAppearance", ArgumentSemantic.Copy)] UINavigationBarAppearance CompactScrollEdgeAppearance { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("pinnedTrailingGroup", ArgumentSemantic.Strong)] [NullAllowed] UIBarButtonItemGroup PinnedTrailingGroup { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("overflowPresentationSource", ArgumentSemantic.Strong)] [NullAllowed] IUIPopoverPresentationControllerSourceItem OverflowPresentationSource { get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("trailingItemGroups", ArgumentSemantic.Copy)] UIBarButtonItemGroup [] TrailingItemGroups { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("additionalOverflowItems", ArgumentSemantic.Strong)] [NullAllowed] UIDeferredMenuElement AdditionalOverflowItems { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("titleMenuProvider", ArgumentSemantic.Copy)] [NullAllowed] Func, UIMenu> TitleMenuProvider { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Wrap ("WeakRenameDelegate")] IUINavigationItemRenameDelegate RenameDelegate { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("renameDelegate", ArgumentSemantic.Weak)] NSObject WeakRenameDelegate { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("documentProperties", ArgumentSemantic.Strong)] [NullAllowed] UIDocumentProperties DocumentProperties { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("customizationIdentifier")] [NullAllowed] string CustomizationIdentifier { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("leadingItemGroups", ArgumentSemantic.Copy)] UIBarButtonItemGroup [] LeadingItemGroups { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("centerItemGroups", ArgumentSemantic.Copy)] UIBarButtonItemGroup [] CenterItemGroups { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("style", ArgumentSemantic.Assign)] UINavigationItemStyle Style { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("backAction", ArgumentSemantic.Copy)] [NullAllowed] UIAction BackAction { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("preferredSearchBarPlacement", ArgumentSemantic.Assign)] UINavigationItemSearchBarPlacement PreferredSearchBarPlacement { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("searchBarPlacement", ArgumentSemantic.Assign)] UINavigationItemSearchBarPlacement SearchBarPlacement { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] interface UINavigationController { @@ -11569,7 +11337,6 @@ interface UINavigationController { interface IUINavigationControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -11607,7 +11374,6 @@ interface UINavigationControllerDelegate { IUIViewControllerAnimatedTransitioning GetAnimationControllerForOperation (UINavigationController navigationController, UINavigationControllerOperation operation, UIViewController fromViewController, UIViewController toViewController); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UINib { @@ -11628,7 +11394,6 @@ interface UINib { NSString ExternalObjectsKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UIPageControl : UIAppearance { @@ -11654,34 +11419,34 @@ interface UIPageControl : UIAppearance { [Export ("currentPageIndicatorTintColor", ArgumentSemantic.Retain)] UIColor CurrentPageIndicatorTintColor { get; set; } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("backgroundStyle", ArgumentSemantic.Assign)] UIPageControlBackgroundStyle BackgroundStyle { get; set; } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("interactionState", ArgumentSemantic.Assign)] UIPageControlInteractionState InteractionState { get; } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("allowsContinuousInteraction")] bool AllowsContinuousInteraction { get; set; } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed] [Export ("preferredIndicatorImage", ArgumentSemantic.Strong)] UIImage PreferredIndicatorImage { get; set; } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("indicatorImageForPage:")] [return: NullAllowed] UIImage GetIndicatorImage (nint page); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setIndicatorImage:forPage:")] void SetIndicatorImage ([NullAllowed] UIImage image, nint page); @@ -11724,7 +11489,6 @@ interface UIPageControl : UIAppearance { UIPageControlProgress Progress { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController), Delegates = new string [] { "WeakDelegate", "WeakDataSource" }, @@ -11782,7 +11546,6 @@ interface UIPageViewController : NSCoding { interface IUIPageViewControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -11817,7 +11580,6 @@ interface UIPageViewControllerDelegate { interface IUIPageViewControllerDataSource { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -11839,7 +11601,7 @@ interface UIPageViewControllerDataSource { } /// Provides data for the event. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] interface UIPasteboardChangeEventArgs { [Export ("UIPasteboardChangedTypesAddedKey")] @@ -11850,7 +11612,7 @@ interface UIPasteboardChangeEventArgs { } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Calling -[UIPasteboard init] is not allowed. @@ -11893,9 +11655,11 @@ bool Persistent { bool Contains (string [] pasteboardTypes); [Export ("dataForPasteboardType:")] + [return: NullAllowed] NSData DataForPasteboardType (string pasteboardType); [Export ("valueForPasteboardType:")] + [return: NullAllowed] NSObject GetValue (string pasteboardType); [Export ("setValue:forPasteboardType:")] @@ -11919,14 +11683,17 @@ bool Persistent { bool Contains (string [] pasteboardTypes, [NullAllowed] NSIndexSet itemSet); [Export ("itemSetWithPasteboardTypes:")] + [return: NullAllowed] NSIndexSet ItemSetWithPasteboardTypes (string [] pasteboardTypes); [Export ("valuesForPasteboardType:inItemSet:")] - NSData [] GetValuesForPasteboardType (string pasteboardType, NSIndexSet itemSet); + [return: NullAllowed] + NSData [] GetValuesForPasteboardType (string pasteboardType, [NullAllowed] NSIndexSet itemSet); [Export ("dataForPasteboardType:inItemSet:")] - NSData [] GetDataForPasteboardType (string pasteboardType, NSIndexSet itemSet); + [return: NullAllowed] + NSData [] GetDataForPasteboardType (string pasteboardType, [NullAllowed] NSIndexSet itemSet); [Export ("items", ArgumentSemantic.Copy)] NSDictionary [] Items { get; set; } @@ -11960,7 +11727,6 @@ bool Persistent { [Field ("UIPasteboardTypeListColor")] NSArray TypeListColor { get; } - [NoWatch] [MacCatalyst (13, 1)] [Field ("UIPasteboardTypeAutomatic")] NSString Automatic { get; } @@ -12004,73 +11770,73 @@ bool Persistent { [Wrap ("SetItems (items, pasteboardOptions.GetDictionary ()!)")] void SetItems (NSDictionary [] items, UIPasteboardOptions pasteboardOptions); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasStrings")] bool HasStrings { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasURLs")] bool HasUrls { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasImages")] bool HasImages { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasColors")] bool HasColors { get; } [Async] - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("detectPatternsForPatterns:completionHandler:")] void DetectPatterns (NSSet patterns, Action, NSError> completionHandler); [Async] - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("detectPatternsForPatterns:inItemSet:completionHandler:")] void DetectPatterns (NSSet patterns, [NullAllowed] NSIndexSet itemSet, Action [], NSError> completionHandler); [Async] - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("detectValuesForPatterns:completionHandler:")] void DetectValues (NSSet patterns, Action, NSError> completionHandler); [Async] - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("detectValuesForPatterns:inItemSet:completionHandler:")] void DetectValues (NSSet patterns, [NullAllowed] NSIndexSet itemSet, Action [], NSError> completionHandler); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("itemProviders", ArgumentSemantic.Copy)] NSItemProvider [] ItemProviders { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("setItemProviders:localOnly:expirationDate:")] void SetItemProviders (NSItemProvider [] itemProviders, bool localOnly, [NullAllowed] NSDate expirationDate); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("setObjects:")] void SetObjects (INSItemProviderWriting [] objects); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("setObjects:localOnly:expirationDate:")] void SetObjects (INSItemProviderWriting [] objects, bool localOnly, [NullAllowed] NSDate expirationDate); } /// Constants that identify the name of a pasteboard. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Static] interface UIPasteboardNames { @@ -12084,7 +11850,7 @@ interface UIPasteboardNames { } /// A that holds options for describing pasteboard privacy. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [StrongDictionary ("UIPasteboardOptionKeys")] interface UIPasteboardOptions { @@ -12092,7 +11858,7 @@ interface UIPasteboardOptions { bool LocalOnly { get; set; } } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] interface UIPasteboardOptionKeys { @@ -12111,7 +11877,7 @@ interface UIPasteboardOptionKeys { /// The appearance of the can be customized by using the class or by overriding the and methods in the , as shown in the "Standard Controls" sample ("Picker With Custom Appearance"). /// /// Apple documentation for UIPickerView - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIView), Delegates = new string [] { "WeakDelegate" })] interface UIPickerView { @@ -12195,7 +11961,7 @@ interface IUIPickerViewDelegate { } /// Class that receives event notifications from the UIPickerView. /// /// Apple documentation for UIPickerViewDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -12208,6 +11974,7 @@ interface UIPickerViewDelegate { nfloat GetComponentWidth (UIPickerView pickerView, nint component); [Export ("pickerView:titleForRow:forComponent:")] + [return: NullAllowed] string GetTitle (UIPickerView pickerView, nint row, nint component); [Export ("pickerView:viewForRow:forComponent:reusingView:")] @@ -12223,15 +11990,17 @@ interface UIPickerViewDelegate { /// Allows accessibility hint and label to be set in a picker view. /// /// Apple documentation for UIPickerViewAccessibilityDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (UIPickerViewDelegate))] interface UIPickerViewAccessibilityDelegate { [Export ("pickerView:accessibilityLabelForComponent:")] + [return: NullAllowed] string GetAccessibilityLabel (UIPickerView pickerView, nint acessibilityLabelForComponent); [Export ("pickerView:accessibilityHintForComponent:")] + [return: NullAllowed] string GetAccessibilityHint (UIPickerView pickerView, nint component); [MacCatalyst (13, 1)] @@ -12258,7 +12027,7 @@ interface UIPickerViewAccessibilityDelegate { /// Base class for models that provide data to a UIPickerView object. /// /// Apple documentation for UIPickerViewDataSource - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -12279,7 +12048,7 @@ interface IUIPickerViewDataSource { } /// The model for the UIPickerView. /// /// Apple documentation for UIPickerViewModel - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -12287,7 +12056,6 @@ interface IUIPickerViewDataSource { } interface UIPickerViewModel : UIPickerViewDataSource, UIPickerViewDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -12318,13 +12086,12 @@ partial interface UIContentContainer { void WillTransitionToTraitCollection (UITraitCollection traitCollection, [NullAllowed] IUIViewControllerTransitionCoordinator coordinator); } - [NoWatch, Protocol, Model] + [Protocol, Model] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] partial interface UIAppearanceContainer { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: Don't call -[UIPresentationController init]. @@ -12395,7 +12162,7 @@ partial interface UIPresentationController : UIAppearanceContainer, UITraitEnvir [Export ("dismissalTransitionDidEnd:")] void DismissalTransitionDidEnd (bool completed); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitOverrides")] IUITraitOverrides TraitOverrides { get; } } @@ -12404,7 +12171,6 @@ partial interface UIPresentationController : UIAppearanceContainer, UITraitEnvir [Deprecated (PlatformName.iOS, 13, 0, message: "Replaced by 'UIContextMenuInteraction'.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Replaced by 'UIContextMenuInteraction'.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Replaced by 'UIContextMenuInteraction'.")] [BaseType (typeof (NSObject))] @@ -12420,7 +12186,6 @@ interface UIPreviewAction : UIPreviewActionItem, NSCopying { [Deprecated (PlatformName.iOS, 13, 0, message: "Replaced by 'UIContextMenuInteraction'.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Replaced by 'UIContextMenuInteraction'.")] - [NoWatch] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Replaced by 'UIContextMenuInteraction'.")] [BaseType (typeof (NSObject))] @@ -12431,7 +12196,6 @@ interface UIPreviewActionGroup : UIPreviewActionItem, NSCopying { interface IUIPreviewActionItem { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIPreviewActionItem { @@ -12440,7 +12204,6 @@ interface UIPreviewActionItem { string Title { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIProgressView : NSCoding { @@ -12486,7 +12249,6 @@ interface UIProgressView : NSCoding { NSProgress ObservedProgress { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIDynamicBehavior))] partial interface UIPushBehavior { @@ -12531,7 +12293,6 @@ partial interface UIPushBehavior { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIDynamicBehavior))] [DisableDefaultCtor] // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: init is undefined for objects of type UISnapBehavior @@ -12552,7 +12313,7 @@ partial interface UISnapBehavior { /// /// Apple documentation for UIReferenceLibraryViewController [MacCatalyst (14, 0)] // the headers lie, not usable until at least Mac Catalyst 14.0 - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (UIViewController))] // iOS6 returns the following (confusing) message with the default .ctor: // Objective-C exception thrown. Name: NSGenericException Reason: -[UIReferenceLibraryViewController initWithNibName:bundle:] is not a valid initializer. You must call -[UIReferenceLibraryViewController initWithTerm:]. @@ -12570,7 +12331,6 @@ partial interface UIReferenceLibraryViewController : NSCoding { NativeHandle Constructor (string term); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActivityRestoring, UIResponderStandardEditActions @@ -12660,6 +12420,7 @@ interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActiv void ClearTextInputContextIdentifier (NSString identifier); [Export ("targetForAction:withSender:")] + [return: NullAllowed] NSObject GetTargetForAction (Selector action, [NullAllowed] NSObject sender); [iOS (13, 0), TV (13, 0)] @@ -12673,6 +12434,7 @@ interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActiv void ValidateCommand (UICommand command); [Export ("textInputContextIdentifier")] + [NullAllowed] NSString TextInputContextIdentifier { get; } [Export ("textInputMode")] @@ -12724,7 +12486,7 @@ interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActiv // from UIResponder (UIActivityItemsConfiguration) #pragma warning disable 0109 // warning CS0109: The member 'UIResponder.ActivityItemsConfiguration' does not hide an accessible member. The new keyword is not required. - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("activityItemsConfiguration", ArgumentSemantic.Strong)] new IUIActivityItemsConfigurationReading ActivityItemsConfiguration { get; set; } @@ -12736,21 +12498,20 @@ interface UIResponder : UIAccessibilityAction, UIAccessibilityFocus, UIUserActiv void CaptureTextFromCamera ([NullAllowed] NSObject sender); [MacCatalyst (13, 1)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [Export ("makeTouchBar")] [return: NullAllowed] NSTouchBar CreateTouchBar (); #pragma warning disable 0108 // warning CS0108: 'NSFontAssetRequest.Progress' hides inherited member 'NSProgressReporting.Progress'. Use the new keyword if hiding was intended. [MacCatalyst (13, 1)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [Export ("touchBar", ArgumentSemantic.Strong)] [NullAllowed] NSTouchBar TouchBar { get; set; } #pragma warning restore } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIResponderStandardEditActions { @@ -12856,7 +12617,6 @@ interface UIResponderStandardEditActions { } #if !NET // These two methods are in the UIResponderStandardEditActions protocol - [NoWatch] [Category, BaseType (typeof (UIResponder))] interface UIResponder_NSObjectExtension { [Export ("decreaseSize:")] @@ -12867,7 +12627,6 @@ interface UIResponder_NSObjectExtension { } #endif - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIScreen : UITraitEnvironment { @@ -12915,6 +12674,7 @@ UIScreenMode CurrentMode { nfloat Scale { get; } [Export ("displayLinkWithTarget:selector:")] + [return: NullAllowed] CADisplayLink CreateDisplayLink (NSObject target, Selector sel); [MacCatalyst (13, 1)] @@ -13030,7 +12790,6 @@ UIScreenMode CurrentMode { nfloat PotentialEdrHeadroom { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIScrollViewDelegate) })] interface UIScrollView : UIFocusItemScrollableContainer { @@ -13132,7 +12891,6 @@ UIEdgeInsets ScrollIndicatorInsets { [Export ("decelerationRate")] nfloat DecelerationRate { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("indexDisplayMode")] UIScrollViewIndexDisplayMode IndexDisplayMode { get; set; } @@ -13248,7 +13006,6 @@ UIEdgeInsets ScrollIndicatorInsets { [Export ("keyboardDismissMode")] UIScrollViewKeyboardDismissMode KeyboardDismissMode { get; set; } - [NoWatch] [Deprecated (PlatformName.TvOS, 11, 0, message: "Configuring the 'PanGestureRecognizer' for indirect scrolling automatically supports directional presses now, so this property is no longer useful.")] [MacCatalyst (13, 1)] [Export ("directionalPressGestureRecognizer")] @@ -13266,7 +13023,7 @@ UIEdgeInsets ScrollIndicatorInsets { interface IUIScrollViewDelegate { } - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -13317,12 +13074,12 @@ interface UIScrollViewDelegate { void DidChangeAdjustedContentInset (UIScrollView scrollView); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (UIScrollViewDelegate))] interface UIScrollViewAccessibilityDelegate { [Export ("accessibilityScrollStatusForScrollView:")] + [return: NullAllowed] string GetAccessibilityScrollStatus (UIScrollView scrollView); [MacCatalyst (13, 1)] @@ -13331,7 +13088,6 @@ interface UIScrollViewAccessibilityDelegate { NSAttributedString GetAccessibilityAttributedScrollStatus (UIScrollView scrollView); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UISearchBarDelegate) })] #if TVOS @@ -13473,6 +13229,7 @@ interface UISearchBar : UIBarPositioning, UITextInputTraits, UILookToDictateCapa [Export ("scopeBarButtonTitleTextAttributesForState:"), Internal] [Appearance] + [return: NullAllowed] NSDictionary _GetScopeBarButtonTitleTextAttributes (UIControlState state); [Appearance] @@ -13520,14 +13277,13 @@ interface UISearchBar : UIBarPositioning, UITextInputTraits, UILookToDictateCapa [Export ("searchTextField")] UISearchTextField SearchTextField { get; } - [NoWatch, NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Export ("lookToDictateEnabled")] new bool LookToDictateEnabled { [Bind ("isLookToDictateEnabled")] get; set; } } interface IUISearchBarDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarPositioningDelegate))] [Model] @@ -13574,7 +13330,6 @@ interface UISearchBarDelegate { void ListButtonClicked (UISearchBar searchBar); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] interface UISearchContainerViewController { @@ -13590,7 +13345,6 @@ interface UISearchContainerViewController { NativeHandle Constructor (UISearchController searchController); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] // designated @@ -13668,26 +13422,26 @@ partial interface UISearchController : UIViewControllerTransitioningDelegate, UI [Export ("automaticallyShowsScopeBar")] bool AutomaticallyShowsScopeBar { get; set; } - [TV (14, 0), NoWatch, iOS (16, 0)] + [TV (14, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [NullAllowed, Export ("searchSuggestions", ArgumentSemantic.Copy)] IUISearchSuggestion [] SearchSuggestions { get; set; } [Deprecated (PlatformName.TvOS, 16, 0, message: "Use UIViewController.SetContentScrollView on the SearchResultsController instead.")] - [TV (14, 0), NoWatch, NoiOS] + [TV (14, 0), NoiOS] [NoMacCatalyst] [NullAllowed, Export ("searchControllerObservedScrollView", ArgumentSemantic.Strong)] UIScrollView SearchControllerObservedScrollView { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("scopeBarActivation", ArgumentSemantic.Assign)] UISearchControllerScopeBarActivation ScopeBarActivation { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("ignoresSearchSuggestionsForSearchBarPlacementStacked")] bool IgnoresSearchSuggestionsForSearchBarPlacementStacked { get; set; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("searchBarPlacement")] UINavigationItemSearchBarPlacement SearchBarPlacement { get; } @@ -13695,7 +13449,6 @@ partial interface UISearchController : UIViewControllerTransitioningDelegate, UI interface IUISearchControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -13715,11 +13468,11 @@ partial interface UISearchControllerDelegate { [Export ("presentSearchController:")] void PresentSearchController (UISearchController searchController); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("searchController:willChangeToSearchBarPlacement:")] void WillChangeToSearchBarPlacement (UISearchController searchController, UINavigationItemSearchBarPlacement newPlacement); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("searchController:didChangeFromSearchBarPlacement:")] void DidChangeFromSearchBarPlacement (UISearchController searchController, UINavigationItemSearchBarPlacement previousPlacement); } @@ -13729,7 +13482,7 @@ partial interface UISearchControllerDelegate { /// Apple documentation for UISearchDisplayController [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 8, 0, message: "Use 'UISearchController'.")] - [MacCatalyst (13, 1), NoWatch] // Objective-C exception thrown. Name: NSGenericException Reason: UISearchDisplayController is no longer supported when linking against this version of iOS. Please migrate your application to UISearchController. + [MacCatalyst (13, 1)] // Objective-C exception thrown. Name: NSGenericException Reason: UISearchDisplayController is no longer supported when linking against this version of iOS. Please migrate your application to UISearchController. [NoTV] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UISearchController'.")] interface UISearchDisplayController { @@ -13800,7 +13553,7 @@ interface IUISearchDisplayDelegate { } [Model] [Protocol] [NoTV] - [MacCatalyst (13, 1), NoWatch] + [MacCatalyst (13, 1)] interface UISearchDisplayDelegate { [Export ("searchDisplayControllerWillBeginSearch:")] @@ -13866,7 +13619,6 @@ interface UISearchDisplayDelegate { interface IUISearchResultsUpdating { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -13875,13 +13627,12 @@ partial interface UISearchResultsUpdating { [Export ("updateSearchResultsForSearchController:")] void UpdateSearchResultsForSearchController (UISearchController searchController); - [TV (14, 0), NoWatch, iOS (16, 0)] + [TV (14, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("updateSearchResultsForSearchController:selectingSearchSuggestion:")] void UpdateSearchResults (UISearchController searchController, IUISearchSuggestion searchSuggestion); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UISegmentedControl @@ -13897,35 +13648,34 @@ interface UISegmentedControl [Export ("initWithFrame:")] NativeHandle Constructor (CGRect frame); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("initWithFrame:actions:")] NativeHandle Constructor (CGRect frame, UIAction [] actions); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("insertSegmentWithAction:atIndex:animated:")] void InsertSegment (UIAction action, nuint segment, bool animated); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setAction:forSegmentAtIndex:")] void SetAction (UIAction action, nuint segment); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("actionForSegmentAtIndex:")] [return: NullAllowed] UIAction GetAction (nuint segment); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("segmentIndexForActionIdentifier:")] nint GetSegmentIndex (string actionIdentifier); [Export ("segmentedControlStyle")] [NoTV] - [NoWatch] [Deprecated (PlatformName.iOS, 7, 0, message: "The 'SegmentedControlStyle' property no longer has any effect.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "The 'SegmentedControlStyle' property no longer has any effect.")] @@ -13953,6 +13703,7 @@ interface UISegmentedControl void SetTitle (string title, nint segment); [Export ("titleForSegmentAtIndex:")] + [return: NullAllowed] string TitleAt (nint segment); [Export ("setImage:forSegmentAtIndex:")] @@ -13983,7 +13734,7 @@ interface UISegmentedControl nint SelectedSegment { get; set; } [Appearance] - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("selectedSegmentTintColor", ArgumentSemantic.Strong)] UIColor SelectedSegmentTintColor { get; set; } @@ -14041,7 +13792,7 @@ interface UISegmentedControl /// A that displays a slider. /// /// Apple documentation for UISlider - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UISlider { @@ -14138,11 +13889,11 @@ interface UISlider { // From UISlider (UIBehavioralStyle) - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [NoTV, MacCatalyst (15, 0), iOS (15, 0)] [Export ("behavioralStyle")] UIBehavioralStyle BehavioralStyle { get; } - [NoWatch, NoTV, MacCatalyst (15, 0), iOS (15, 0)] + [NoTV, MacCatalyst (15, 0), iOS (15, 0)] [Export ("preferredBehavioralStyle", ArgumentSemantic.Assign)] UIBehavioralStyle PreferredBehavioralStyle { get; set; } } @@ -14212,12 +13963,12 @@ interface UIStringAttributeKey { [Field ("NSWritingDirectionAttributeName")] NSString WritingDirection { get; } - [TV (14, 0), Watch (7, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("NSTrackingAttributeName")] NSString Tracking { get; } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Field ("UITextItemTagAttributeName")] NSString Name { get; } @@ -14229,25 +13980,25 @@ interface UIStringAttributeKey { NSString NSTextEffectLetterpressStyle { get; } // we do not seem to expose other options like NSDefaultAttributesDocumentOption so keeping these as is for now - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Internal, Field ("NSTargetTextScalingDocumentOption")] NSString TargetTextScalingDocumentOption { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Internal, Field ("NSSourceTextScalingDocumentOption")] NSString SourceTextScalingDocumentOption { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSTextHighlightStyleAttributeName")] NSString TextHighlightStyle { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSTextHighlightColorSchemeAttributeName")] NSString TextHighlightColorScheme { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSAdaptiveImageGlyphAttributeName")] NSString AdaptiveImageGlyph { get; } @@ -14260,7 +14011,7 @@ interface UIStringAttributeKey { /// A that displays an on/off switch. /// /// Apple documentation for UISwitch - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UISwitch : NSCoding { @@ -14312,7 +14063,6 @@ interface UISwitch : NSCoding { UISwitchStyle PreferredStyle { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UITabBarDelegate) })] interface UITabBar @@ -14416,28 +14166,27 @@ interface UITabBar UIColor UnselectedItemTintColor { get; set; } [Appearance] - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("standardAppearance", ArgumentSemantic.Copy)] UITabBarAppearance StandardAppearance { get; set; } [Appearance] - [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("scrollEdgeAppearance", ArgumentSemantic.Copy)] UITabBarAppearance ScrollEdgeAppearance { get; set; } - [TV (13, 0), NoWatch, NoiOS] + [TV (13, 0), NoiOS] [NoMacCatalyst] [Export ("leadingAccessoryView", ArgumentSemantic.Strong)] UIView LeadingAccessoryView { get; } - [TV (13, 0), NoWatch, NoiOS] + [TV (13, 0), NoiOS] [NoMacCatalyst] [Export ("trailingAccessoryView", ArgumentSemantic.Strong)] UIView TrailingAccessoryView { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UITabBarControllerDelegate) })] interface UITabBarController : UITabBarDelegate { @@ -14533,7 +14282,6 @@ interface UITabBarController : UITabBarDelegate { interface IUITabBarDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -14565,7 +14313,6 @@ interface UITabBarDelegate { interface IUITabBarControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -14657,7 +14404,6 @@ IUIViewControllerAnimatedTransitioning GetAnimationControllerForTransition (UITa UIViewController [] GetDisplayedViewControllers (UITabBarController tabBarController, UITab tab, UIViewController [] proposedViewControllers); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarItem))] [DesignatedDefaultCtor] @@ -14773,7 +14519,6 @@ interface UITabBarItem : NSCoding UITabBarAppearance ScrollEdgeAppearance { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIScrollView))] interface UITableView : NSCoding, UIDataSourceTranslating @@ -14893,7 +14638,7 @@ interface UITableView : NSCoding, UIDataSourceTranslating [Export ("reloadRowsAtIndexPaths:withRowAnimation:")] void ReloadRows (NSIndexPath [] atIndexPaths, UITableViewRowAnimation withRowAnimation); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("reconfigureRowsAtIndexPaths:")] void ReconfigureRows (NSIndexPath [] indexPaths); @@ -14923,7 +14668,6 @@ interface UITableView : NSCoding, UIDataSourceTranslating nint SectionIndexMinimumDisplayRowCount { get; set; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("separatorStyle")] UITableViewCellSeparatorStyle SeparatorStyle { get; set; } @@ -15062,82 +14806,78 @@ interface UITableView : NSCoding, UIDataSourceTranslating [NullAllowed, Export ("prefetchDataSource", ArgumentSemantic.Weak)] IUITableViewDataSourcePrefetching PrefetchDataSource { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("prefetchingEnabled")] bool PrefetchingEnabled { [Bind ("isPrefetchingEnabled")] get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("dragDelegate", ArgumentSemantic.Weak)] IUITableViewDragDelegate DragDelegate { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("dropDelegate", ArgumentSemantic.Weak)] IUITableViewDropDelegate DropDelegate { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("separatorInsetReference", ArgumentSemantic.Assign)] UITableViewSeparatorInsetReference SeparatorInsetReference { get; set; } - [NoWatch] [MacCatalyst (13, 1)] [Async] [Export ("performBatchUpdates:completion:")] void PerformBatchUpdates ([NullAllowed] Action updates, [NullAllowed] Action completion); - [NoWatch] [MacCatalyst (13, 1)] [Export ("hasUncommittedUpdates")] bool HasUncommittedUpdates { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("dragInteractionEnabled")] bool DragInteractionEnabled { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasActiveDrag")] bool HasActiveDrag { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("hasActiveDrop")] bool HasActiveDrop { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("insetsContentViewsToSafeArea")] bool InsetsContentViewsToSafeArea { get; set; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("selectionFollowsFocus")] bool SelectionFollowsFocus { get; set; } - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("allowsFocus")] bool AllowsFocus { get; set; } - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("allowsFocusDuringEditing")] bool AllowsFocusDuringEditing { get; set; } - [NoWatch, TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (17, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("contextMenuInteraction")] UIContextMenuInteraction ContextMenuInteraction { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("fillerRowHeight")] nfloat FillerRowHeight { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("sectionHeaderTopPadding")] nfloat SectionHeaderTopPadding { get; set; } - [Watch (9, 0), TV (16, 0), iOS (16, 0)] + [TV (16, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("selfSizingInvalidation", ArgumentSemantic.Assign)] UITableViewSelfSizingInvalidation SelfSizingInvalidation { get; set; } @@ -15148,7 +14888,6 @@ interface UITableView : NSCoding, UIDataSourceTranslating } interface IUITableViewDataSourcePrefetching { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UITableViewDataSourcePrefetching { @@ -15163,7 +14902,6 @@ interface UITableViewDataSourcePrefetching { // // This mixed both the UITableViewDataSource and UITableViewDelegate in a single class // - [NoWatch] [MacCatalyst (13, 1)] [Model] [BaseType (typeof (UIScrollViewDelegate))] @@ -15185,9 +14923,11 @@ interface UITableViewSource { nint NumberOfSections (UITableView tableView); [Export ("tableView:titleForHeaderInSection:")] + [return: NullAllowed] string TitleForHeader (UITableView tableView, nint section); [Export ("tableView:titleForFooterInSection:")] + [return: NullAllowed] string TitleForFooter (UITableView tableView, nint section); [Export ("tableView:canEditRowAtIndexPath:")] @@ -15198,6 +14938,7 @@ interface UITableViewSource { [MacCatalyst (13, 1)] [Export ("sectionIndexTitlesForTableView:")] + [return: NullAllowed] string [] SectionIndexTitles (UITableView tableView); [MacCatalyst (13, 1)] @@ -15232,9 +14973,11 @@ interface UITableViewSource { void AccessoryButtonTapped (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:willSelectRowAtIndexPath:")] + [return: NullAllowed] NSIndexPath WillSelectRow (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:willDeselectRowAtIndexPath:")] + [return: NullAllowed] NSIndexPath WillDeselectRow (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:didSelectRowAtIndexPath:")] @@ -15249,6 +14992,7 @@ interface UITableViewSource { [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:")] + [return: NullAllowed] string TitleForDeleteConfirmation (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:shouldIndentWhileEditingRowAtIndexPath:")] @@ -15346,90 +15090,89 @@ interface UITableViewSource { [return: NullAllowed] NSIndexPath GetIndexPathForPreferredFocusedView (UITableView tableView); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("tableView:selectionFollowsFocusForRowAtIndexPath:")] bool GetSelectionFollowsFocusForRow (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:")] [return: NullAllowed] UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:")] [return: NullAllowed] UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:shouldSpringLoadRowAtIndexPath:withContext:")] bool ShouldSpringLoadRow (UITableView tableView, NSIndexPath indexPath, IUISpringLoadedInteractionContext context); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:shouldBeginMultipleSelectionInteractionAtIndexPath:")] bool ShouldBeginMultipleSelectionInteraction (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:didBeginMultipleSelectionInteractionAtIndexPath:")] void DidBeginMultipleSelectionInteraction (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableViewDidEndMultipleSelectionInteraction:")] void DidEndMultipleSelectionInteraction (UITableView tableView); - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:contextMenuConfigurationForRowAtIndexPath:point:")] [return: NullAllowed] UIContextMenuConfiguration GetContextMenuConfiguration (UITableView tableView, NSIndexPath indexPath, CGPoint point); - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:previewForHighlightingContextMenuWithConfiguration:")] [return: NullAllowed] UITargetedPreview GetPreviewForHighlightingContextMenu (UITableView tableView, UIContextMenuConfiguration configuration); - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:previewForDismissingContextMenuWithConfiguration:")] [return: NullAllowed] UITargetedPreview GetPreviewForDismissingContextMenu (UITableView tableView, UIContextMenuConfiguration configuration); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:willPerformPreviewActionForMenuWithConfiguration:animator:")] void WillPerformPreviewAction (UITableView tableView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("tableView:willDisplayContextMenuWithConfiguration:animator:")] void WillDisplayContextMenu (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("tableView:willEndContextMenuInteractionWithConfiguration:animator:")] void WillEndContextMenuInteraction (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("tableView:canPerformPrimaryActionForRowAtIndexPath:")] bool CanPerformPrimaryAction (UITableView tableView, NSIndexPath rowIndexPath); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("tableView:performPrimaryActionForRowAtIndexPath:")] void PerformPrimaryAction (UITableView tableView, NSIndexPath rowIndexPath); // WARNING: If you add more methods here, add them to UITableViewControllerDelegate as well. } - [TV (15, 0), Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void UITableViewCellConfigurationUpdateHandler (UITableViewCell cell, UICellConfigurationState state); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UITableViewCell : NSCoding, UIGestureRecognizerDelegate { @@ -15440,36 +15183,36 @@ interface UITableViewCell : NSCoding, UIGestureRecognizerDelegate { [Export ("initWithStyle:reuseIdentifier:")] NativeHandle Constructor (UITableViewCellStyle style, [NullAllowed] NSString reuseIdentifier); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("configurationState")] UICellConfigurationState ConfigurationState { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setNeedsUpdateConfiguration")] void SetNeedsUpdateConfiguration (); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("updateConfigurationUsingState:")] void UpdateConfiguration (UICellConfigurationState state); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("configurationUpdateHandler", ArgumentSemantic.Copy)] UITableViewCellConfigurationUpdateHandler ConfigurationUpdateHandler { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("defaultContentConfiguration")] UIListContentConfiguration DefaultContentConfiguration { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("contentConfiguration", ArgumentSemantic.Copy)] IUIContentConfiguration ContentConfiguration { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("automaticallyUpdatesContentConfiguration")] bool AutomaticallyUpdatesContentConfiguration { get; set; } @@ -15495,12 +15238,12 @@ interface UITableViewCell : NSCoding, UIGestureRecognizerDelegate { [Export ("detailTextLabel", ArgumentSemantic.Retain)] UILabel DetailTextLabel { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("backgroundConfiguration", ArgumentSemantic.Copy)] UIBackgroundConfiguration BackgroundConfiguration { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("automaticallyUpdatesBackgroundConfiguration")] bool AutomaticallyUpdatesBackgroundConfiguration { get; set; } @@ -15512,6 +15255,7 @@ interface UITableViewCell : NSCoding, UIGestureRecognizerDelegate { UIView SelectedBackgroundView { get; set; } [Export ("reuseIdentifier", ArgumentSemantic.Copy)] + [NullAllowed] NSString ReuseIdentifier { get; } [RequiresSuper] @@ -15591,23 +15335,22 @@ interface UITableViewCell : NSCoding, UIGestureRecognizerDelegate { [Export ("focusStyle", ArgumentSemantic.Assign)] UITableViewCellFocusStyle FocusStyle { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("dragStateDidChange:")] void DragStateDidChange (UITableViewCellDragState dragState); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("userInteractionEnabledWhileDragging")] bool UserInteractionEnabledWhileDragging { get; set; } - [Watch (9, 0), TV (16, 0), iOS (16, 0)] + [TV (16, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("defaultBackgroundConfiguration")] UIBackgroundConfiguration DefaultBackgroundConfiguration { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] interface UITableViewController : UITableViewDataSource, UITableViewDelegate { @@ -15634,7 +15377,6 @@ interface UITableViewController : UITableViewDataSource, UITableViewDelegate { interface IUITableViewDataSource { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] #if NET @@ -15657,9 +15399,11 @@ interface UITableViewDataSource { nint NumberOfSections (UITableView tableView); [Export ("tableView:titleForHeaderInSection:")] + [return: NullAllowed] string TitleForHeader (UITableView tableView, nint section); [Export ("tableView:titleForFooterInSection:")] + [return: NullAllowed] string TitleForFooter (UITableView tableView, nint section); [Export ("tableView:canEditRowAtIndexPath:")] @@ -15670,6 +15414,7 @@ interface UITableViewDataSource { [MacCatalyst (13, 1)] [Export ("sectionIndexTitlesForTableView:")] + [return: NullAllowed] string [] SectionIndexTitles (UITableView tableView); [MacCatalyst (13, 1)] @@ -15685,7 +15430,6 @@ interface UITableViewDataSource { interface IUITableViewDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIScrollViewDelegate))] [Model] @@ -15714,9 +15458,11 @@ interface UITableViewDelegate { void AccessoryButtonTapped (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:willSelectRowAtIndexPath:")] + [return: NullAllowed] NSIndexPath WillSelectRow (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:willDeselectRowAtIndexPath:")] + [return: NullAllowed] NSIndexPath WillDeselectRow (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:didSelectRowAtIndexPath:")] @@ -15731,6 +15477,7 @@ interface UITableViewDelegate { [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:")] + [return: NullAllowed] string TitleForDeleteConfirmation (UITableView tableView, NSIndexPath indexPath); [Export ("tableView:shouldIndentWhileEditingRowAtIndexPath:")] @@ -15828,124 +15575,123 @@ interface UITableViewDelegate { [return: NullAllowed] NSIndexPath GetIndexPathForPreferredFocusedView (UITableView tableView); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("tableView:selectionFollowsFocusForRowAtIndexPath:")] bool GetSelectionFollowsFocusForRow (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:")] [return: NullAllowed] UISwipeActionsConfiguration GetLeadingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:")] [return: NullAllowed] UISwipeActionsConfiguration GetTrailingSwipeActionsConfiguration (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("tableView:shouldSpringLoadRowAtIndexPath:withContext:")] bool ShouldSpringLoadRow (UITableView tableView, NSIndexPath indexPath, IUISpringLoadedInteractionContext context); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:shouldBeginMultipleSelectionInteractionAtIndexPath:")] bool ShouldBeginMultipleSelectionInteraction (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:didBeginMultipleSelectionInteractionAtIndexPath:")] void DidBeginMultipleSelectionInteraction (UITableView tableView, NSIndexPath indexPath); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableViewDidEndMultipleSelectionInteraction:")] void DidEndMultipleSelectionInteraction (UITableView tableView); - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:contextMenuConfigurationForRowAtIndexPath:point:")] [return: NullAllowed] UIContextMenuConfiguration GetContextMenuConfiguration (UITableView tableView, NSIndexPath indexPath, CGPoint point); - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:previewForHighlightingContextMenuWithConfiguration:")] [return: NullAllowed] UITargetedPreview GetPreviewForHighlightingContextMenu (UITableView tableView, UIContextMenuConfiguration configuration); - [NoWatch, TV (17, 0), iOS (13, 0)] + [TV (17, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:previewForDismissingContextMenuWithConfiguration:")] [return: NullAllowed] UITargetedPreview GetPreviewForDismissingContextMenu (UITableView tableView, UIContextMenuConfiguration configuration); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("tableView:willPerformPreviewActionForMenuWithConfiguration:animator:")] void WillPerformPreviewAction (UITableView tableView, UIContextMenuConfiguration configuration, IUIContextMenuInteractionCommitAnimating animator); - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("tableView:willDisplayContextMenuWithConfiguration:animator:")] void WillDisplayContextMenu (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); - [NoWatch, TV (17, 0), iOS (14, 0)] + [TV (17, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("tableView:willEndContextMenuInteractionWithConfiguration:animator:")] void WillEndContextMenuInteraction (UITableView tableView, UIContextMenuConfiguration configuration, [NullAllowed] IUIContextMenuInteractionAnimating animator); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("tableView:canPerformPrimaryActionForRowAtIndexPath:")] bool CanPerformPrimaryAction (UITableView tableView, NSIndexPath rowIndexPath); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("tableView:performPrimaryActionForRowAtIndexPath:")] void PerformPrimaryAction (UITableView tableView, NSIndexPath rowIndexPath); } - [TV (15, 0), Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void UITableViewHeaderFooterViewConfigurationUpdateHandler (UITableViewHeaderFooterView headerFooterView, UIViewConfigurationState state); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UITableViewHeaderFooterView : UIAppearance, NSCoding { [Export ("initWithFrame:")] NativeHandle Constructor (CGRect frame); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("configurationState")] UIViewConfigurationState ConfigurationState { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setNeedsUpdateConfiguration")] void SetNeedsUpdateConfiguration (); - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("updateConfigurationUsingState:")] void UpdateConfiguration (UIViewConfigurationState state); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("configurationUpdateHandler", ArgumentSemantic.Copy)] UITableViewHeaderFooterViewConfigurationUpdateHandler ConfigurationUpdateHandler { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("defaultContentConfiguration")] UIListContentConfiguration DefaultContentConfiguration { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("contentConfiguration", ArgumentSemantic.Copy)] IUIContentConfiguration ContentConfiguration { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("automaticallyUpdatesContentConfiguration")] bool AutomaticallyUpdatesContentConfiguration { get; set; } @@ -15965,12 +15711,12 @@ interface UITableViewHeaderFooterView : UIAppearance, NSCoding { [Export ("contentView", ArgumentSemantic.Retain)] UIView ContentView { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("backgroundConfiguration", ArgumentSemantic.Copy)] UIBackgroundConfiguration BackgroundConfiguration { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("automaticallyUpdatesBackgroundConfiguration")] bool AutomaticallyUpdatesBackgroundConfiguration { get; set; } @@ -15980,6 +15726,7 @@ interface UITableViewHeaderFooterView : UIAppearance, NSCoding { UIView BackgroundView { get; set; } [Export ("reuseIdentifier", ArgumentSemantic.Copy)] + [NullAllowed] NSString ReuseIdentifier { get; } [DesignatedInitializer] @@ -15990,7 +15737,7 @@ interface UITableViewHeaderFooterView : UIAppearance, NSCoding { [Export ("prepareForReuse")] void PrepareForReuse (); - [Watch (9, 0), TV (16, 0), iOS (16, 0)] + [TV (16, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Export ("defaultBackgroundConfiguration")] UIBackgroundConfiguration DefaultBackgroundConfiguration { get; } @@ -16000,7 +15747,7 @@ interface UITableViewHeaderFooterView : UIAppearance, NSCoding { /// Defines behavior when the user swipes horizontally on a row in a table. /// /// Apple documentation for UITableViewRowAction - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (NSObject))] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'UIContextualAction' and corresponding APIs instead.")] [MacCatalyst (13, 1)] @@ -16025,7 +15772,6 @@ interface UITableViewRowAction : NSCopying { UITableViewRowAction Create (UITableViewRowActionStyle style, [NullAllowed] string title, Action handler); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl), Delegates = new string [] { "WeakDelegate" })] // , Events=new Type [] {typeof(UITextFieldDelegate)})] custom logic needed, see https://bugzilla.xamarin.com/show_bug.cgi?id=53174 @@ -16192,7 +15938,6 @@ interface UITextField : UITextInput, UIContentSizeCategoryAdjusting, UILetterfor interface IUITextFieldDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -16244,7 +15989,6 @@ interface UITextFieldDelegate { UIMenu GetEditMenu (UITextField textField, NSRange range, UIMenuElement [] suggestedActions); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIScrollView), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UITextViewDelegate) })] interface UITextView : UITextInput, NSCoding, UIContentSizeCategoryAdjusting, UILetterformAwareAdjusting @@ -16384,7 +16128,7 @@ NSDictionary TypingAttributes2 { [Export ("linkTextAttributes", ArgumentSemantic.Copy)] NSDictionary WeakLinkTextAttributes { get; set; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Export ("usesStandardTextScaling")] bool UsesStandardTextScaling { get; set; } @@ -16395,25 +16139,25 @@ NSDictionary TypingAttributes2 { [Export ("interactionState", ArgumentSemantic.Copy)] NSObject InteractionState { get; set; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("textLayoutManager")] NSTextLayoutManager TextLayoutManager { get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("findInteraction")] [NullAllowed] UIFindInteraction FindInteraction { get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("findInteractionEnabled")] bool FindInteractionEnabled { [Bind ("isFindInteractionEnabled")] get; set; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("textViewUsingTextLayoutManager:")] UITextView GetTextView (bool usingTextLayoutManager); - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("borderStyle", ArgumentSemantic.Assign)] UITextViewBorderStyle BorderStyle { get; set; } @@ -16429,15 +16173,15 @@ NSDictionary TypingAttributes2 { [Export ("writingToolsActive")] bool WritingToolsActive { [Bind ("isWritingToolsActive")] get; } - [NoWatch, NoTV, MacCatalyst (18, 0), iOS (18, 0)] + [NoTV, MacCatalyst (18, 0), iOS (18, 0)] [Export ("writingToolsBehavior", ArgumentSemantic.Assign)] new UIWritingToolsBehavior WritingToolsBehavior { get; set; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0)] [Export ("allowedWritingToolsResultOptions", ArgumentSemantic.Assign)] new UIWritingToolsResultOptions AllowedWritingToolsResultOptions { get; set; } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [Export ("textFormattingConfiguration", ArgumentSemantic.Copy), NullAllowed] UITextFormattingViewControllerConfiguration TextFormattingConfiguration { get; set; } @@ -16449,7 +16193,7 @@ NSDictionary TypingAttributes2 { interface IUITextViewDelegate { } [BaseType (typeof (UIScrollViewDelegate))] - [NoMac, NoWatch] + [NoMac] [MacCatalyst (13, 1)] [Model] [Protocol] @@ -16513,34 +16257,34 @@ interface UITextViewDelegate { UIMenu GetEditMenuForText (UITextView textView, NSRange range, UIMenuElement [] suggestedActions); [IgnoredInDelegate] - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("textView:willPresentEditMenuWithAnimator:")] void WillPresentEditMenu (UITextView textView, IUIEditMenuInteractionAnimating animator); [IgnoredInDelegate] - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("textView:willDismissEditMenuWithAnimator:")] void WillDismissEditMenu (UITextView textView, IUIEditMenuInteractionAnimating aniamtor); [IgnoredInDelegate] - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Export ("textView:primaryActionForTextItem:defaultAction:")] [return: NullAllowed] UIAction GetPrimaryAction (UITextView textView, UITextItem textItem, UIAction defaultAction); [IgnoredInDelegate] - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Export ("textView:menuConfigurationForTextItem:defaultMenu:")] [return: NullAllowed] UITextItemMenuConfiguration GetMenuConfiguration (UITextView textView, UITextItem textItem, UIMenu defaultMenu); [IgnoredInDelegate] - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Export ("textView:textItemMenuWillDisplayForTextItem:animator:")] void WillDisplay (UITextView textView, UITextItem textItem, IUIContextMenuInteractionAnimating animator); [IgnoredInDelegate] - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Export ("textView:textItemMenuWillEndForTextItem:animator:")] void WillEnd (UITextView textView, UITextItem textItem, IUIContextMenuInteractionAnimating animator); @@ -16559,25 +16303,25 @@ interface UITextViewDelegate { NSValue [] GetWritingToolsIgnoredRangesInEnclosingRange (UITextView textView, NSRange enclosingRange); #endif - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [Export ("textView:willBeginFormattingWithViewController:"), EventArgs ("UITextViewTextFormattingViewController")] void WillBeginFormatting (UITextView textView, UITextFormattingViewController viewController); - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [Export ("textView:didBeginFormattingWithViewController:"), EventArgs ("UITextViewTextFormattingViewController")] void DidBeginFormatting (UITextView textView, UITextFormattingViewController viewController); - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [Export ("textView:willEndFormattingWithViewController:"), EventArgs ("UITextViewTextFormattingViewController")] void WillEndFormatting (UITextView textView, UITextFormattingViewController viewController); - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [Export ("textView:didEndFormattingWithViewController:"), EventArgs ("UITextViewTextFormattingViewController")] void DidEndFormatting (UITextView textView, UITextFormattingViewController viewController); } /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIToolbar : UIBarPositioning { @@ -16652,7 +16396,6 @@ interface UIToolbar : UIBarPositioning { interface IUITimingCurveProvider { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UITimingCurveProvider : NSCoding, NSCopying { @@ -16680,7 +16423,7 @@ interface IUIToolbarDelegate { } /// A delegate object for s that exposes an event relating to bar position. /// /// Apple documentation for UIToolbarDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarPositioningDelegate))] [Model] @@ -16688,7 +16431,6 @@ interface IUIToolbarDelegate { } interface UIToolbarDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITouch { @@ -16778,7 +16520,7 @@ interface UITouch { [Export ("estimatedPropertiesExpectingUpdates")] UITouchProperties EstimatedPropertiesExpectingUpdates { get; } - [NoWatch, NoTV, iOS (17, 5), MacCatalyst (17, 5)] + [NoTV, iOS (17, 5), MacCatalyst (17, 5)] [Export ("rollAngle")] nfloat RollAngle { get; } } @@ -16788,7 +16530,7 @@ interface UITouch { /// Application developers must assign to the property prior to displaying the . /// /// Apple documentation for UIVideoEditorController - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UINavigationController), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIVideoEditorControllerDelegate) })] interface UIVideoEditorController { @@ -16827,7 +16569,7 @@ interface IUIVideoEditorControllerDelegate { } /// /// Apple documentation for UIVideoEditorControllerDelegate [BaseType (typeof (UINavigationControllerDelegate))] - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Model] [Protocol] @@ -16842,7 +16584,6 @@ interface UIVideoEditorControllerDelegate { void UserCancelled (UIVideoEditorController editor); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIResponder))] interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynamicItem, NSCoding, UIAccessibilityIdentification, UITraitEnvironment, UICoordinateSpace, UIFocusItem, UIFocusItemContainer @@ -16850,10 +16591,7 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam #if !TVOS , UILargeContentViewerItem, UIPopoverPresentationControllerSourceItem #endif -#if !WATCH - , CALayerDelegate -#endif - { + , CALayerDelegate { [DesignatedInitializer] [Export ("initWithFrame:")] NativeHandle Constructor (CGRect frame); @@ -17418,7 +17156,7 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam [Export ("safeAreaLayoutGuide", ArgumentSemantic.Strong)] UILayoutGuide SafeAreaLayoutGuide { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("keyboardLayoutGuide")] UIKeyboardLayoutGuide KeyboardLayoutGuide { get; } @@ -17492,16 +17230,16 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam bool Focused { [Bind ("isFocused")] get; } [NullAllowed] - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("focusGroupIdentifier")] new string FocusGroupIdentifier { get; set; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("focusGroupPriority")] new nint FocusGroupPriority { get; set; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("focusEffect", ArgumentSemantic.Copy)] new UIFocusEffect FocusEffect { get; set; } @@ -17509,35 +17247,34 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam [Export ("canBecomeFocused")] new bool CanBecomeFocused { get; } - [Watch (5, 0), TV (13, 0)] // Headers state Watch 5.0 + [TV (13, 0)] // Headers state Watch 5.0 [MacCatalyst (13, 1)] [Export ("addInteraction:")] void AddInteraction (IUIInteraction interaction); - [Watch (5, 0), TV (13, 0)] // Headers state Watch 5.0 + [TV (13, 0)] // Headers state Watch 5.0 [MacCatalyst (13, 1)] [Export ("removeInteraction:")] void RemoveInteraction (IUIInteraction interaction); - [Watch (5, 0), TV (13, 0)] // Headers state Watch 5.0 + [TV (13, 0)] // Headers state Watch 5.0 [MacCatalyst (13, 1)] [Export ("interactions", ArgumentSemantic.Copy)] IUIInteraction [] Interactions { get; set; } // UIAccessibilityInvertColors category - [NoWatch] [MacCatalyst (13, 1)] [Export ("accessibilityIgnoresInvertColors")] bool AccessibilityIgnoresInvertColors { get; set; } // From UserInterfaceStyle category - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("overrideUserInterfaceStyle", ArgumentSemantic.Assign)] UIUserInterfaceStyle OverrideUserInterfaceStyle { get; set; } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("transform3D", ArgumentSemantic.Assign)] CATransform3D Transform3D { get; set; } @@ -17545,16 +17282,16 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam // Category UIView (UIContentSizeCategoryLimit) [BindAs (typeof (UIContentSizeCategory))] - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("minimumContentSizeCategory")] NSString MinimumContentSizeCategory { get; set; } [BindAs (typeof (UIContentSizeCategory))] - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("maximumContentSizeCategory")] NSString MaximumContentSizeCategory { get; set; } - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("appliedContentSizeCategoryLimitsDescription")] string AppliedContentSizeCategoryLimitsDescription { get; } @@ -17563,27 +17300,27 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam #endif // From UIView (UILargeContentViewer) - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("showsLargeContentViewer")] new bool ShowsLargeContentViewer { get; set; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("largeContentTitle")] new string LargeContentTitle { get; set; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [NullAllowed, Export ("largeContentImage", ArgumentSemantic.Strong)] new UIImage LargeContentImage { get; set; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("scalesLargeContentImage")] new bool ScalesLargeContentImage { get; set; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("largeContentImageInsets", ArgumentSemantic.Assign)] new UIEdgeInsets LargeContentImageInsets { get; set; } @@ -17591,20 +17328,20 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam #pragma warning restore 0109 #endif - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("anchorPoint", ArgumentSemantic.Assign)] CGPoint AnchorPoint { get; set; } // from the category (UIView) - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitOverrides")] IUITraitOverrides TraitOverrides { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("updateTraitsIfNeeded")] void UpdateTraitsIfNeeded (); - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("hoverStyle", ArgumentSemantic.Copy)] UIHoverStyle HoverStyle { get; set; } @@ -17615,7 +17352,6 @@ interface UIView : UIAppearance, UIAppearanceContainer, UIAccessibility, UIDynam void Animate (double duration, nfloat bounce, nfloat velocity, double delay, UIViewAnimationOptions options, Action animations, [NullAllowed] Action completion); } - [NoWatch] [MacCatalyst (13, 1)] [Category, BaseType (typeof (UIView))] interface UIView_UITextField { @@ -17623,7 +17359,6 @@ interface UIView_UITextField { bool EndEditing (bool force); } - [NoWatch] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (UILayoutGuide))] @@ -17638,7 +17373,6 @@ interface UILayoutGuide_UIConstraintBasedLayoutDebugging { interface IUIContentContainer { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIResponder))] interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer, UITraitEnvironment, UIFocusEnvironment, NSExtensionRequestHandling @@ -17841,7 +17575,7 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer UITabBarController TabBarController { get; } [Deprecated (PlatformName.TvOS, 15, 0, message: "Use 'UIViewController.SetContentScrollView' instead.")] - [TV (13, 0), NoWatch, NoiOS] + [TV (13, 0), NoiOS] [NoMacCatalyst] [NullAllowed, Export ("tabBarObservedScrollView", ArgumentSemantic.Strong)] UIScrollView TabBarObservedScrollView { get; set; } @@ -18121,7 +17855,6 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer new CGSize PreferredContentSize { get; set; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("preferredStatusBarStyle")] UIStatusBarStyle PreferredStatusBarStyle (); @@ -18170,7 +17903,6 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer IUILayoutSupport BottomLayoutGuide { get; } [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("preferredStatusBarUpdateAnimation")] UIStatusBarAnimation PreferredStatusBarUpdateAnimation { get; } @@ -18227,7 +17959,7 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer [Export ("popoverPresentationController")] UIPopoverPresentationController PopoverPresentationController { get; } - [NoTV, NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("sheetPresentationController")] UISheetPresentationController SheetPresentationController { get; } @@ -18293,21 +18025,21 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer [Export ("restoresFocusAfterTransition")] bool RestoresFocusAfterTransition { get; set; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("focusGroupIdentifier")] new string FocusGroupIdentifier { get; set; } - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] [Export ("preferredUserInterfaceStyle")] UIUserInterfaceStyle PreferredUserInterfaceStyle { get; } - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] [Export ("setNeedsUserInterfaceAppearanceUpdate")] void SetNeedsUserInterfaceAppearanceUpdate (); - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] [NullAllowed, Export ("childViewControllerForUserInterfaceStyle")] UIViewController ChildViewControllerForUserInterfaceStyle { get; } @@ -18334,128 +18066,126 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer [RequiresSuper] void ViewSafeAreaInsetsDidChange (); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("childViewControllerForScreenEdgesDeferringSystemGestures")] UIViewController ChildViewControllerForScreenEdgesDeferringSystemGestures { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("preferredScreenEdgesDeferringSystemGestures")] UIRectEdge PreferredScreenEdgesDeferringSystemGestures { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("setNeedsUpdateOfScreenEdgesDeferringSystemGestures")] void SetNeedsUpdateOfScreenEdgesDeferringSystemGestures (); // UIHomeIndicatorAutoHidden (UIViewController) category - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [NullAllowed, Export ("childViewControllerForHomeIndicatorAutoHidden")] UIViewController ChildViewControllerForHomeIndicatorAutoHidden { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("prefersHomeIndicatorAutoHidden")] bool PrefersHomeIndicatorAutoHidden { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("setNeedsUpdateOfHomeIndicatorAutoHidden")] void SetNeedsUpdateOfHomeIndicatorAutoHidden (); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("overrideUserInterfaceStyle", ArgumentSemantic.Assign)] UIUserInterfaceStyle OverrideUserInterfaceStyle { get; set; } - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("modalInPresentation")] bool ModalInPresentation { [Bind ("isModalInPresentation")] get; set; } // From UIViewController (UIPerformsActions) - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("performsActionsWhilePresentingModally")] bool PerformsActionsWhilePresentingModally { get; } // From UIViewController (UIPointerLockSupport) category - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("childViewControllerForPointerLock")] UIViewController ChildViewControllerForPointerLock { get; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("prefersPointerLocked")] bool PrefersPointerLocked { get; } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("setNeedsUpdateOfPrefersPointerLocked")] void SetNeedsUpdateOfPrefersPointerLocked (); [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Export ("setNeedsTouchBarUpdate")] void SetNeedsTouchBarUpdate (); [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [NullAllowed] [Export ("childViewControllerForTouchBar")] UIViewController ChildViewControllerForTouchBar { get; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("interactionActivityTrackingBaseName")] [NullAllowed] string InteractionActivityTrackingBaseName { get; set; } - [TV (16, 0), NoWatch, iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("activePresentationController")] [NullAllowed] UIPresentationController ActivePresentationController { get; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("setNeedsUpdateOfSupportedInterfaceOrientations")] void SetNeedsUpdateOfSupportedInterfaceOrientations (); // from the category (UIViewController) - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitOverrides")] IUITraitOverrides TraitOverrides { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("updateTraitsIfNeeded")] void UpdateTraitsIfNeeded (); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [NullAllowed, Export ("contentUnavailableConfiguration", ArgumentSemantic.Copy)] IUIContentConfiguration ContentUnavailableConfiguration { get; set; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("contentUnavailableConfigurationState")] UIContentUnavailableConfigurationState ContentUnavailableConfigurationState { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("setNeedsUpdateContentUnavailableConfiguration")] void SetNeedsUpdateContentUnavailableConfiguration (); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("updateContentUnavailableConfigurationUsingState:")] void UpdateContentUnavailableConfiguration (UIContentUnavailableConfigurationState state); - [TV (13, 0), NoWatch, iOS (13, 0), MacCatalyst (13, 1)] + [TV (13, 0), iOS (13, 0), MacCatalyst (13, 1)] [Export ("viewIsAppearing:")] void ViewIsAppearing (bool animated); @@ -18469,7 +18199,6 @@ interface UIViewController : NSCoding, UIAppearanceContainer, UIContentContainer UIViewControllerTransition PreferredTransition { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model, BaseType (typeof (NSObject))] partial interface UIViewControllerContextTransitioning { @@ -18545,7 +18274,6 @@ interface IUITraitEnvironment { } [BaseType (typeof (NSObject))] [Model] [Protocol] - [NoWatch] [MacCatalyst (13, 1)] partial interface UITraitEnvironment { [Abstract] @@ -18562,7 +18290,6 @@ partial interface UITraitEnvironment { delegate void UITraitMutations (IUIMutableTraits mutableTraits); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -18571,7 +18298,6 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { [Export ("userInterfaceIdiom")] UIUserInterfaceIdiom UserInterfaceIdiom { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("userInterfaceStyle")] UIUserInterfaceStyle UserInterfaceStyle { get; } @@ -18613,7 +18339,6 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { [Static, Export ("traitCollectionWithForceTouchCapability:")] UITraitCollection FromForceTouchCapability (UIForceTouchCapability capability); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("traitCollectionWithUserInterfaceStyle:")] @@ -18635,7 +18360,7 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { [Internal] UITraitCollection FromPreferredContentSizeCategory (NSString preferredContentSizeCategory); - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithSceneCaptureState:")] UITraitCollection FromSceneCaptureState (UISceneCaptureState sceneCaptureState); @@ -18656,158 +18381,158 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { [Export ("layoutDirection")] UITraitEnvironmentLayoutDirection LayoutDirection { get; } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("sceneCaptureState")] UISceneCaptureState SceneCaptureState { get; } // This class has other members using From* - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("traitCollectionWithAccessibilityContrast:")] UITraitCollection FromAccessibilityContrast (UIAccessibilityContrast accessibilityContrast); - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("accessibilityContrast")] UIAccessibilityContrast AccessibilityContrast { get; } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("traitCollectionWithUserInterfaceLevel:")] UITraitCollection FromUserInterfaceLevel (UIUserInterfaceLevel userInterfaceLevel); - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("userInterfaceLevel")] UIUserInterfaceLevel UserInterfaceLevel { get; } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("traitCollectionWithLegibilityWeight:")] UITraitCollection FromLegibilityWeight (UILegibilityWeight legibilityWeight); - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("legibilityWeight")] UILegibilityWeight LegibilityWeight { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static] [Export ("traitCollectionWithActiveAppearance:")] UITraitCollection FromActiveAppearance (UIUserInterfaceActiveAppearance userInterfaceActiveAppearance); // We have other From* methods - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("activeAppearance")] UIUserInterfaceActiveAppearance ActiveAppearance { get; } // From UITraitCollection (CurrentTraitCollection) - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("currentTraitCollection", ArgumentSemantic.Strong)] UITraitCollection CurrentTraitCollection { get; set; } [ThreadSafe] - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("performAsCurrentTraitCollection:")] void PerformAsCurrentTraitCollection (Action actions); // From UITraitCollection (CurrentTraitCollection) - [TV (13, 0), NoWatch, iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("hasDifferentColorAppearanceComparedToTraitCollection:")] bool HasDifferentColorAppearanceComparedTo ([NullAllowed] UITraitCollection traitCollection); // From UITraitCollection (ImageConfiguration) - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("imageConfiguration", ArgumentSemantic.Strong)] UIImageConfiguration ImageConfiguration { get; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("traitCollectionWithToolbarItemPresentationSize:")] UITraitCollection GetTraitCollection (UINSToolbarItemPresentationSize toolbarItemPresentationSize); - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("toolbarItemPresentationSize")] UINSToolbarItemPresentationSize ToolbarItemPresentationSize { get; } #if !XAMCORE_5_0 [Obsolete ("Use the overload that takes a 'UITraitMutations' parameter instead.")] [EditorBrowsable (EditorBrowsableState.Never)] - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithTraits:")] UITraitCollection GetTraitCollectionWithTraits (Func mutations); #endif - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithTraits:")] UITraitCollection GetTraitCollectionWithTraits (UITraitMutations mutations); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitCollectionByModifyingTraits:")] UITraitCollection GetTraitCollectionByModifyingTraits (UITraitMutations mutations); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithCGFloatValue:forTrait:")] UITraitCollection GetTraitCollectionWithValue (nfloat value, IUICGFloatTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitCollectionByReplacingCGFloatValue:forTrait:")] UITraitCollection GetTraitCollectionByReplacingValue (nfloat value, IUICGFloatTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("valueForCGFloatTrait:")] nfloat GetValueForTrait (IUICGFloatTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithNSIntegerValue:forTrait:")] UITraitCollection GetTraitCollectionWithValue (nint value, IUINSIntegerTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitCollectionByReplacingNSIntegerValue:forTrait:")] UITraitCollection TraitCollectionByReplacingValue (nint value, IUINSIntegerTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("valueForNSIntegerTrait:")] nint GetValueForTrait (IUINSIntegerTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithObject:forTrait:")] UITraitCollection GetTraitCollectionWithObject ([NullAllowed] NSObject @object, IUIObjectTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitCollectionByReplacingObject:forTrait:")] UITraitCollection GetTraitCollectionByReplacingObject ([NullAllowed] NSObject @object, IUIObjectTraitDefinition trait); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("objectForTrait:")] [return: NullAllowed] NSObject GetObject (IUIObjectTraitDefinition trait); #if !XAMCORE_5_0 - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("changedTraitsFromTraitCollection:")] [Obsolete ("Use 'GetChangedTraits2' instead.")] NSSet GetChangedTraits ([NullAllowed] UITraitCollection traitCollection); #endif - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("changedTraitsFromTraitCollection:")] #if XAMCORE_5_0 NSSet GetChangedTraits ([NullAllowed] UITraitCollection traitCollection); @@ -18817,14 +18542,14 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { #endif #if !XAMCORE_5_0 - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("systemTraitsAffectingColorAppearance")] [Obsolete ("Use 'SystemTraitsAffectingColorAppearance2' instead.")] IUITraitDefinition [] SystemTraitsAffectingColorAppearance { get; } #endif - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("systemTraitsAffectingColorAppearance")] #if XAMCORE_5_0 @@ -18835,14 +18560,14 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { #endif #if !XAMCORE_5_0 - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("systemTraitsAffectingImageLookup")] [Obsolete ("Use 'SystemTraitsAffectingImageLookup2' instead.")] IUITraitDefinition [] SystemTraitsAffectingImageLookup { get; } #endif - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("systemTraitsAffectingImageLookup")] #if XAMCORE_5_0 @@ -18852,21 +18577,21 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { Class [] SystemTraitsAffectingImageLookup2 { get; } #endif - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("typesettingLanguage")] string TypesettingLanguage { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithTypesettingLanguage:")] UITraitCollection GetTraitCollection (string language); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] [Export ("traitCollectionWithImageDynamicRange:")] UITraitCollection GetTraitCollection (UIImageDynamicRange imageDynamicRange); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("imageDynamicRange")] UIImageDynamicRange ImageDynamicRange { get; } @@ -18880,7 +18605,6 @@ partial interface UITraitCollection : NSCopying, NSSecureCoding { UIListEnvironment ListEnvironment { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Static] partial interface UITransitionContext { @@ -18899,7 +18623,6 @@ partial interface UITransitionContext { NSString ToViewKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Model, BaseType (typeof (NSObject))] [Protocol] @@ -18921,7 +18644,6 @@ partial interface UIViewControllerAnimatedTransitioning { } interface IUIViewControllerAnimatedTransitioning { } - [NoWatch] [MacCatalyst (13, 1)] [Model, BaseType (typeof (NSObject))] [Protocol] @@ -18944,7 +18666,6 @@ interface IUIViewControllerInteractiveTransitioning { } interface IUIViewControllerTransitioningDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [Model, BaseType (typeof (NSObject))] [Protocol] @@ -18966,7 +18687,6 @@ partial interface UIViewControllerTransitioningDelegate { UIPresentationController GetPresentationControllerForPresentedViewController (UIViewController presentedViewController, [NullAllowed] UIViewController presentingViewController, UIViewController sourceViewController); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] partial interface UIPercentDrivenInteractiveTransition : UIViewControllerInteractiveTransitioning { @@ -19010,7 +18730,6 @@ partial interface UIPercentDrivenInteractiveTransition : UIViewControllerInterac // This protocol is only for consumption (there is no API to set a transition coordinator context, // you'll be provided an existing one), so we do not provide a model to subclass. // - [NoWatch] [MacCatalyst (13, 1)] [Protocol] partial interface UIViewControllerTransitionCoordinatorContext { @@ -19082,7 +18801,6 @@ interface IUIViewControllerTransitionCoordinatorContext { } // This protocol is only for consumption (there is no API to set a transition coordinator, // only get an existing one), so we do not provide a model to subclass. // - [NoWatch] [MacCatalyst (13, 1)] [Protocol] partial interface UIViewControllerTransitionCoordinator : UIViewControllerTransitionCoordinatorContext { @@ -19111,7 +18829,6 @@ bool AnimateAlongsideTransition (Action - [NoMacCatalyst, NoWatch] + [NoMacCatalyst] [NoTV] [Deprecated (PlatformName.iOS, 12, 0, message: "No longer supported; please adopt 'WKWebView'.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "No longer supported; please adopt 'WKWebView'.")] @@ -19231,7 +18948,7 @@ interface IUIWebViewDelegate { } /// /// A strongly typed implementation of a class that can be used to respond to events raised by the . /// Apple documentation for UIWebViewDelegate - [NoMacCatalyst, NoWatch] + [NoMacCatalyst] [NoTV] [Deprecated (PlatformName.iOS, 12, 0, message: "No longer supported; please adopt 'WKWebView' APIs.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "No longer supported; please adopt 'WKWebView' APIs.")] @@ -19252,7 +18969,6 @@ interface UIWebViewDelegate { void LoadFailed (UIWebView webView, NSError error); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextChecker { @@ -19260,9 +18976,11 @@ interface UITextChecker { NSRange RangeOfMisspelledWordInString (string stringToCheck, NSRange range, nint startingOffset, bool wrapFlag, string language); [Export ("guessesForWordRange:inString:language:")] + [return: NullAllowed] string [] GuessesForWordRange (NSRange range, string str, string language); [Export ("completionsForPartialWordRange:inString:language:")] + [return: NullAllowed] string [] CompletionsForPartialWordRange (NSRange range, string str, string language); [Export ("ignoreWord:")] @@ -19290,7 +19008,6 @@ interface UITextChecker { } [Static] - [NoWatch] [MacCatalyst (13, 1)] interface UITextContentType { [Field ("UITextContentTypeName")] @@ -19451,7 +19168,6 @@ interface UITextContentType { NSString CellularImei { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UISplitViewControllerDelegate) })] interface UISplitViewController { @@ -19615,7 +19331,6 @@ interface UISplitViewController { interface IUISplitViewControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -19732,7 +19447,6 @@ interface UISplitViewControllerDelegate { void InteractivePresentationGestureDidEnd (UISplitViewController svc); } - [NoWatch] [MacCatalyst (13, 1)] [Category] [BaseType (typeof (UIViewController))] @@ -19754,7 +19468,7 @@ partial interface UISplitViewController_UIViewController { /// A that displays values that may be increased or decreased by pressing plus or minus buttons. /// /// Apple documentation for UIStepper - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIControl))] interface UIStepper { @@ -19819,11 +19533,10 @@ interface UIStepper { UIImage GetDecrementImage (UIControlState state); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] delegate UIViewController UIStoryboardViewControllerCreator (NSCoder coder); - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIStoryboard { @@ -19837,18 +19550,17 @@ interface UIStoryboard { [Export ("instantiateViewControllerWithIdentifier:")] UIViewController InstantiateViewController (string identifier); - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Export ("instantiateInitialViewControllerWithCreator:")] UIViewController InstantiateInitialViewController ([NullAllowed] UIStoryboardViewControllerCreator creator); - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Export ("instantiateViewControllerWithIdentifier:creator:")] UIViewController InstantiateViewController (string identifier, [NullAllowed] UIStoryboardViewControllerCreator creator); } - [NoWatch] [Deprecated (PlatformName.iOS, 9, 0)] [Deprecated (PlatformName.TvOS, 9, 0)] [MacCatalyst (13, 1)] @@ -19863,7 +19575,6 @@ interface UIStoryboardPopoverSegue { UIPopoverController PopoverController { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSInvalidArgumentException Reason: Don't call -[UIStoryboardSegue init] @@ -19890,7 +19601,6 @@ interface UIStoryboardSegue { UIStoryboardSegue Create ([NullAllowed] string identifier, UIViewController source, UIViewController destination, Action performHandler); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -19907,7 +19617,6 @@ interface UIStoryboardUnwindSegueSource { NSObject Sender { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIPopoverBackgroundViewMethods { @@ -19927,7 +19636,6 @@ interface UIPopoverBackgroundViewMethods { UIEdgeInsets GetContentViewInsets (); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIPopoverBackgroundView : UIPopoverBackgroundViewMethods { @@ -19949,7 +19657,6 @@ interface UIPopoverBackgroundView : UIPopoverBackgroundViewMethods { bool WantsDefaultContentAppearance { get; } } - [NoWatch] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIPopoverControllerDelegate) })] [DisableDefaultCtor] // bug #1786 [Deprecated (PlatformName.iOS, 9, 0, message: "Use 'UIViewController' with style of 'UIModalPresentationStyle.Popover' or UIPopoverPresentationController' instead.")] @@ -20015,7 +19722,6 @@ interface UIPopoverController : UIAppearanceContainer { interface IUIPopoverControllerDelegate { } - [NoWatch] [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -20037,7 +19743,7 @@ interface UIPopoverControllerDelegate { /// Manages the user experience of a popover. /// /// Apple documentation for UIPopoverPresentationController - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIPresentationController), Delegates = new string [] { "WeakDelegate" }, @@ -20102,7 +19808,6 @@ partial interface UIPopoverPresentationController { interface IUIAdaptivePresentationControllerDelegate { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -20166,7 +19871,7 @@ interface IUIPopoverPresentationControllerDelegate { } /// Delegate object for objects. Provides methods relating to presentation and dismissal events and allows fine-grained control for adaptive presentations. /// /// Apple documentation for UIPopoverPresentationControllerDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (UIAdaptivePresentationControllerDelegate))] @@ -20189,7 +19894,6 @@ partial interface UIPopoverPresentationControllerDelegate { void WillRepositionPopover (UIPopoverPresentationController popoverPresentationController, ref CGRect targetRect, ref UIView inView); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIScreenMode { @@ -20200,7 +19904,6 @@ interface UIScreenMode { CGSize Size { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextInputMode : NSSecureCoding { @@ -20213,6 +19916,7 @@ interface UITextInputMode : NSSecureCoding { UITextInputMode CurrentInputMode { get; } [Export ("primaryLanguage", ArgumentSemantic.Retain)] + [NullAllowed] string PrimaryLanguage { get; } [Field ("UITextInputCurrentInputModeDidChangeNotification")] @@ -20227,7 +19931,7 @@ interface UITextInputMode : NSSecureCoding { /// Information about a printer. /// /// Apple documentation for UIPrinter - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSGenericException Reason: -[UIPrinter init] not allowed @@ -20239,12 +19943,14 @@ partial interface UIPrinter { string DisplayName { get; } [Export ("displayLocation")] + [NullAllowed] string DisplayLocation { get; } [Export ("supportedJobTypes")] UIPrinterJobTypes SupportedJobTypes { get; } [Export ("makeAndModel")] + [NullAllowed] string MakeAndModel { get; } [Export ("supportsColor")] @@ -20264,7 +19970,7 @@ partial interface UIPrinter { /// Presents a standard interface for selecting a printer. /// /// Apple documentation for UIPrinterPickerController - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // NSGenericException Reason: -[UIPrinterPickerController init] not allowed @@ -20308,7 +20014,7 @@ interface IUIPrinterPickerControllerDelegate { } /// Delegate object for a . Defines events relating to the presentation and dismissal of the controller, and a method for when a printer has been selected. /// /// Apple documentation for UIPrinterPickerControllerDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -20339,7 +20045,7 @@ partial interface UIPrinterPickerControllerDelegate { /// Paper size and printing region for a print job. /// /// Apple documentation for UIPrintPaper - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIPrintPaper { @@ -20357,7 +20063,7 @@ interface UIPrintPaper { /// Draws pages for printing. /// /// Apple documentation for UIPrintPageRenderer - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIPrintPageRenderer { @@ -20421,7 +20127,7 @@ interface IUIPrintInteractionControllerDelegate { } /// The delegate for the . /// /// Apple documentation for UIPrintInteractionControllerDelegate - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [Model] @@ -20465,7 +20171,7 @@ interface UIPrintInteractionControllerDelegate { delegate void UIPrintInteractionCompletionHandler (UIPrintInteractionController printInteractionController, bool completed, NSError error); /// - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UIPrintInteractionControllerDelegate) })] // Objective-C exception thrown. Name: NSGenericException Reason: -[UIPrintInteractionController init] not allowed @@ -20557,7 +20263,7 @@ interface UIPrintInteractionController { /// Encapsulates information relating to a specific print job. /// /// Apple documentation for UIPrintInfo - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // Objective-C exception thrown. Name: NSGenericException Reason: -[UIPrintInfo init] not allowed @@ -20590,7 +20296,7 @@ interface UIPrintInfo : NSCoding, NSCopying { NSDictionary ToDictionary { get; } } - [NoWatch, NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [BaseType (typeof (NSObject))] interface UIPrintServiceExtension { @@ -20604,7 +20310,7 @@ interface UIPrintServiceExtension { /// Rather than extending this class, application developers should use objects. /// /// Apple documentation for UIViewPrintFormatter - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIPrintFormatter))] interface UIViewPrintFormatter { @@ -20612,13 +20318,11 @@ interface UIViewPrintFormatter { UIView View { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] partial interface UIVisualEffect : NSCopying, NSSecureCoding { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIVisualEffect))] partial interface UIBlurEffect { @@ -20626,7 +20330,6 @@ partial interface UIBlurEffect { UIBlurEffect FromStyle (UIBlurEffectStyle style); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIVisualEffect))] partial interface UIVibrancyEffect { @@ -20635,14 +20338,13 @@ partial interface UIVibrancyEffect { // From interface UIVibrancyEffect - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("effectForBlurEffect:style:")] UIVibrancyEffect FromBlurEffect (UIBlurEffect blurEffect, UIVibrancyEffectStyle style); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] partial interface UIVisualEffectView : NSSecureCoding { @@ -20662,7 +20364,7 @@ partial interface UIVisualEffectView : NSSecureCoding { /// A that provides a single font, color, line-break mode, and alignment. /// /// Apple documentation for UISimpleTextPrintFormatter - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIPrintFormatter))] // accessing the properties fails with 7.0GM if the default `init` is used to create the instance, e.g. @@ -20698,7 +20400,7 @@ interface UISimpleTextPrintFormatter { /// An abstract base class that can be extended to lay out custom printable content. /// /// Apple documentation for UIPrintFormatter - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIPrintFormatter : NSCopying { @@ -20745,7 +20447,7 @@ interface UIPrintFormatter : NSCopying { /// /// Apple documentation for UIMarkupTextPrintFormatter [MacCatalyst (14, 0)] // the headers lie, not usable until at least Mac Catalyst 14.0 - [NoTV, NoWatch] + [NoTV] [BaseType (typeof (UIPrintFormatter))] [DisableDefaultCtor] // nonfunctional (and it doesn't show up in the header anyway) interface UIMarkupTextPrintFormatter { @@ -20757,16 +20459,15 @@ interface UIMarkupTextPrintFormatter { NativeHandle Constructor ([NullAllowed] string text); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] interface UIMotionEffect : NSCoding, NSCopying { [Export ("keyPathsAndRelativeValuesForViewerOffset:")] + [return: NullAllowed] NSDictionary ComputeKeyPathsAndRelativeValues (UIOffset viewerOffset); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIMotionEffect))] interface UIInterpolatingMotionEffect : NSCoding { @@ -20789,7 +20490,6 @@ interface UIInterpolatingMotionEffect : NSCoding { NSObject MaximumRelativeValue { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIMotionEffect))] interface UIMotionEffectGroup { @@ -20798,7 +20498,6 @@ interface UIMotionEffectGroup { UIMotionEffect [] MotionEffects { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // designated @@ -20832,7 +20531,7 @@ interface UISpringTimingParameters : UITimingCurveProvider { } /// Extension class for drawing strings to the screen. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Category, BaseType (typeof (NSString))] interface UIStringDrawing { @@ -20944,7 +20643,6 @@ interface NSStringDrawing { void DrawString (CGRect rect, UIStringAttributes attributes); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIView))] interface UIInputView : NSCoding { @@ -20964,7 +20662,6 @@ interface IUITextInputDelegate { } interface IUITextDocumentProxy { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] partial interface UIInputViewController : UITextInputDelegate { @@ -21012,7 +20709,7 @@ partial interface UIInputViewController : UITextInputDelegate { bool NeedsInputModeSwitchKey { get; } } - [NoWatch, TV (13, 0)] + [TV (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface UIInteraction { @@ -21029,17 +20726,18 @@ interface UIInteraction { void DidMoveToView ([NullAllowed] UIView view); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] partial interface UITextDocumentProxy : UIKeyInput { [Abstract] [Export ("documentContextBeforeInput")] + [NullAllowed] string DocumentContextBeforeInput { get; } [Abstract] [Export ("documentContextAfterInput")] + [NullAllowed] string DocumentContextAfterInput { get; } [Abstract] @@ -21090,7 +20788,6 @@ partial interface UITextDocumentProxy : UIKeyInput { NSUuid DocumentIdentifier { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UILayoutGuide : NSCoding @@ -21138,7 +20835,6 @@ interface UILayoutGuide : NSCoding NSLayoutYAxisAnchor CenterYAnchor { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] [Model] @@ -21178,7 +20874,6 @@ interface IUILayoutSupport { } // This protocol is supposed to be an aggregate to existing classes, // at the moment there is no API that require a specific UIAccessibilityIdentification // implementation, so we don't provide a Model class (for now at least). - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIAccessibilityIdentification { @@ -21192,7 +20887,6 @@ interface IUIAccessibilityIdentification { } /// [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UserNotifications.UNNotificationSettings' instead.")] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UserNotifications.UNNotificationSettings' instead.")] @@ -21214,7 +20908,6 @@ partial interface UIUserNotificationSettings : NSCoding, NSSecureCoding, NSCopyi /// /// /// Apple documentation for UIUserNotificationCategory - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UserNotifications.UNNotificationCategory' instead.")] [MacCatalyst (13, 1)] @@ -21234,7 +20927,6 @@ partial interface UIUserNotificationCategory : NSCopying, NSMutableCopying, NSSe /// /// Apple documentation for UIMutableUserNotificationCategory [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UserNotifications.UNNotificationCategory' instead.")] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UserNotifications.UNNotificationCategory' instead.")] @@ -21253,84 +20945,60 @@ partial interface UIMutableUserNotificationCategory { /// /// Apple documentation for UIUserNotificationAction [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UserNotifications.UNNotificationAction' instead.")] -#if WATCH - [Static] -#else [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UserNotifications.UNNotificationAction' instead.")] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] -#endif partial interface UIUserNotificationAction -#if !WATCH - : NSCopying, NSMutableCopying, NSSecureCoding -#endif - { + : NSCopying, NSMutableCopying, NSSecureCoding { - [NoWatch] [MacCatalyst (13, 1)] [Export ("identifier")] string Identifier { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("title")] string Title { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("activationMode", ArgumentSemantic.Assign)] UIUserNotificationActivationMode ActivationMode { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("authenticationRequired", ArgumentSemantic.Assign)] bool AuthenticationRequired { [Bind ("isAuthenticationRequired")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("destructive", ArgumentSemantic.Assign)] bool Destructive { [Bind ("isDestructive")] get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("parameters", ArgumentSemantic.Copy)] NSDictionary Parameters { get; [NotImplemented] set; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("behavior", ArgumentSemantic.Assign)] UIUserNotificationActionBehavior Behavior { get; [NotImplemented] set; } - [NoWatch] [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNTextInputNotificationAction.TextInputButtonTitle' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UNTextInputNotificationAction.TextInputButtonTitle' instead.")] [Field ("UIUserNotificationTextInputActionButtonTitleKey")] NSString TextInputActionButtonTitleKey { get; } -#if !WATCH // note: defined twice, where watchOS is defined it says it's not in iOS, the other one (for iOS 9) says it's not in tvOS [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UNTextInputNotificationResponse.UserText' instead.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UNTextInputNotificationResponse.UserText' instead.")] [Field ("UIUserNotificationActionResponseTypedTextKey")] NSString ResponseTypedTextKey { get; } -#else -#if !NET // No longer present in watchOS 7.0 - // note: defined twice, where watchOS is defined it says it's not in iOS, the other one (for iOS 9) says it's not in tvOS - [Field ("UIUserNotificationActionResponseTypedTextKey")] - NSString ResponseTypedTextKey { get; } -#endif // !NET -#endif // !WATCH } /// A that can be modified after creation. /// /// Apple documentation for UIMutableUserNotificationAction [Deprecated (PlatformName.iOS, 10, 0, message: "Use 'UserNotifications.UNNotificationAction' instead.")] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'UserNotifications.UNNotificationAction' instead.")] @@ -21366,7 +21034,6 @@ partial interface UIMutableUserNotificationAction { /// A that presents all available document pickers for a given file type and mode. /// /// Apple documentation for UIDocumentMenuViewController - [NoWatch] [NoTV] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'UIDocumentPickerViewController' instead.")] [MacCatalyst (13, 1)] @@ -21400,7 +21067,6 @@ interface IUIDocumentMenuDelegate { } /// Delegate object for objects. Provides methods called when a document is picked or when the picking has been cancelled. /// /// Apple documentation for UIDocumentMenuDelegate - [NoWatch] [NoTV] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -21423,7 +21089,6 @@ partial interface UIDocumentMenuDelegate { /// /// /// Apple documentation for UIDocumentPickerViewController - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController), Delegates = new string [] { "Delegate" }, Events = new Type [] { typeof (UIDocumentPickerDelegate) })] @@ -21509,7 +21174,6 @@ interface IUIDocumentPickerDelegate { } /// Delegate object for object. Defines methods called when the user picks a document or cancels. /// /// Apple documentation for UIDocumentPickerDelegate - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] @@ -21535,7 +21199,6 @@ partial interface UIDocumentPickerDelegate { /// /// Apple documentation for UIDocumentPickerExtensionViewController [Deprecated (PlatformName.iOS, 14, 0, message: "Use enumeration based 'NSFileProviderExtension' instead.")] - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use enumeration based 'NSFileProviderExtension' instead.")] @@ -21569,7 +21232,6 @@ partial interface UIDocumentPickerExtensionViewController { // note: used (internally, not exposed) by UITableView and UICollectionView for state restoration // user objects must adopt the protocol - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIDataSourceModelAssociation { @@ -21583,7 +21245,6 @@ interface UIDataSourceModelAssociation { NSIndexPath GetIndexPath (string identifier, UIView view); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIAccessibilityReadingContent { @@ -21615,7 +21276,6 @@ interface UIAccessibilityReadingContent { NSAttributedString GetAccessibilityAttributedPageContent (); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIGuidedAccessRestrictionDelegate { @@ -21638,20 +21298,19 @@ interface UIGuidedAccessRestrictionDelegate { } [DisableDefaultCtor] // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead - [NoWatch] - [NoWatch] // added in Xcode 7.1 / iOS 9.1 SDK [MacCatalyst (13, 1)] [BaseType (typeof (UIFocusUpdateContext))] interface UICollectionViewFocusUpdateContext { [Export ("previouslyFocusedIndexPath", ArgumentSemantic.Strong)] - NSIndexPath PreviouslyFocusedIndexPath { [return: NullAllowed] get; } + [NullAllowed] + NSIndexPath PreviouslyFocusedIndexPath { get; } [Export ("nextFocusedIndexPath", ArgumentSemantic.Strong)] - NSIndexPath NextFocusedIndexPath { [return: NullAllowed] get; } + [NullAllowed] + NSIndexPath NextFocusedIndexPath { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -21676,7 +21335,6 @@ interface UICubicTimingParameters : UITimingCurveProvider { interface IUIFocusAnimationContext { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIFocusAnimationContext { @@ -21685,7 +21343,6 @@ interface UIFocusAnimationContext { double Duration { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIFocusAnimationCoordinator { @@ -21704,7 +21361,6 @@ interface UIFocusAnimationCoordinator { void AddCoordinatedUnfocusingAnimations ([NullAllowed] Action animations, [NullAllowed] Action completion); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UILayoutGuide))] interface UIFocusGuide { @@ -21722,7 +21378,6 @@ interface UIFocusGuide { IUIFocusEnvironment [] PreferredFocusEnvironments { get; set; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -21745,7 +21400,6 @@ interface UIFocusMovementHint : NSCopying { interface IUIFocusItem { } - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [Protocol] @@ -21756,7 +21410,6 @@ interface UIFocusItem : UIFocusEnvironment { // FIXME: declared as a @required, but this breaks compatibility // Radar: 41121416 - [NoWatch] [MacCatalyst (13, 1)] #if NET [Abstract] @@ -21765,30 +21418,28 @@ interface UIFocusItem : UIFocusEnvironment { CGRect Frame { get; } [NullAllowed] - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("focusEffect", ArgumentSemantic.Copy)] UIFocusEffect FocusEffect { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Export ("focusGroupPriority")] UIFocusGroupPriority FocusGroupPriority { get; } - [NoWatch, TV (18, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (18, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("isTransparentFocusItem")] bool IsTransparentFocusItem { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("didHintFocusMovement:")] void DidHintFocusMovement (UIFocusMovementHint hint); - [iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoWatch] + [iOS (18, 0), MacCatalyst (18, 0), TV (18, 0)] [Export ("focusItemDeferralMode")] UIFocusItemDeferralMode FocusItemDeferralMode { get; } } [DisableDefaultCtor] // [Assert] -init is not a useful initializer for this class. Use one of the designated initializers instead - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIFocusUpdateContext { @@ -21828,7 +21479,6 @@ interface UIFocusUpdateContext { NSString AnimationCoordinatorKey { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -21868,12 +21518,10 @@ interface UIFocusSystem { interface IUIFocusDebuggerOutput { } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIFocusDebuggerOutput { } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIFocusDebugger { @@ -21895,23 +21543,22 @@ interface UIFocusDebugger { // Removed from headers in Xcode 14 [Wrap ("true ? throw new InvalidOperationException (Constants.ApiRemovedGeneral) : false", IsVirtual = true)] - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("checkFocusGroupTreeForEnvironment:")] string CheckFocusGroupTree (IUIFocusEnvironment environment); - [TV (16, 0), NoWatch, iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("preferredFocusEnvironmentsForEnvironment:")] IUIFocusDebuggerOutput GetPreferredFocusEnvironments (IUIFocusEnvironment environment); - [TV (16, 0), NoWatch, iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("focusGroupsForEnvironment:")] IUIFocusDebuggerOutput GetFocusGroups (IUIFocusEnvironment environment); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIPress { @@ -21942,7 +21589,6 @@ interface UIPress { UIKey Key { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIEvent))] interface UIPressesEvent { @@ -21956,7 +21602,7 @@ interface UIPressesEvent { /// Registers views to respond to 3D interactions. /// /// Apple documentation for UIPreviewInteraction - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Delegates = new string [] { "Delegate" }, Events = new Type [] { typeof (UIPreviewInteractionDelegate) })] [DisableDefaultCtor] @@ -21990,7 +21636,7 @@ interface IUIPreviewInteractionDelegate { } /// Delegate object for objects, providing methods that are called during a 3D touch interaction. /// /// Apple documentation for UIPreviewInteractionDelegate - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -22014,19 +21660,20 @@ interface UIPreviewInteractionDelegate { void DidUpdateCommit (UIPreviewInteraction previewInteraction, nfloat transitionProgress, bool ended); } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (UIFocusUpdateContext))] interface UITableViewFocusUpdateContext { [Export ("previouslyFocusedIndexPath", ArgumentSemantic.Strong)] - NSIndexPath PreviouslyFocusedIndexPath { [return: NullAllowed] get; } + [NullAllowed] + NSIndexPath PreviouslyFocusedIndexPath { get; } [Export ("nextFocusedIndexPath", ArgumentSemantic.Strong)] - NSIndexPath NextFocusedIndexPath { [return: NullAllowed] get; } + [NullAllowed] + NSIndexPath NextFocusedIndexPath { get; } } - [NoWatch, NoiOS] + [NoiOS] [NoMacCatalyst] public enum UIFocusSoundIdentifier { @@ -22039,7 +21686,6 @@ public enum UIFocusSoundIdentifier { interface IUIFocusEnvironment { } - [NoWatch] [NoMac] [MacCatalyst (13, 1)] [Protocol] @@ -22110,7 +21756,6 @@ interface UIFocusEnvironment { string FocusGroupIdentifier { get; } } - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22123,7 +21768,6 @@ interface UITextInputPasswordRules : NSSecureCoding, NSCopying { UITextInputPasswordRules Create (string passwordRulesDescriptor); } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Static] @@ -22218,7 +21862,7 @@ interface IUITextDropRequest { } /// /// For example, developers can use this class to dim out or highlight other UI elements during a drag and drop operation. /// - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UIDragAnimating { @@ -22232,7 +21876,7 @@ interface UIDragAnimating { } /// Interface for querying drag-and-drop capabilities and state. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UIDragDropSession { @@ -22262,7 +21906,7 @@ interface UIDragDropSession { } /// An item that is being dragged. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22286,7 +21930,7 @@ interface UIDragItem { } /// A visual representation of a dragging item. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22316,7 +21960,7 @@ interface UIDragPreview : NSCopying { } /// Specifies the appearance of the view that displays the drag preview. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIPreviewParameters))] [DesignatedDefaultCtor] @@ -22335,7 +21979,7 @@ interface UIDragPreviewParameters : NSCopying { } /// Represents the location to which items from dropped or cancelled drag activities will animate. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIPreviewTarget))] [DisableDefaultCtor] @@ -22349,7 +21993,7 @@ interface UIDragPreviewTarget : NSCopying { } /// Interface for providing custom data, visible to the originating activity only, to a drag interaction. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UIDragSession : UIDragDropSession { @@ -22359,7 +22003,7 @@ interface UIDragSession : UIDragDropSession { } /// Interaction for dragging items and delegating drag session calls and item providing. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22383,7 +22027,7 @@ interface UIDragInteraction : UIInteraction { } /// Delegate object for drag interaction events. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -22442,7 +22086,7 @@ interface UIDragInteractionDelegate { } /// An implementation of used for a drop interaction. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] // If Apple adds a delegate setter: Delegates=new string [] {"Delegate"}, Events=new Type [] { typeof (UIDropInteractionDelegate)})] [DisableDefaultCtor] @@ -22460,7 +22104,7 @@ interface UIDropInteraction : UIInteraction { } /// Delegate object for a drop interaction. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -22496,7 +22140,7 @@ interface UIDropInteractionDelegate { } /// Represents a proposed response to a drop operation. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22516,7 +22160,7 @@ interface UIDropProposal : NSCopying { } /// Interface for accessing drop session state and loading drag items. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UIDropSession : UIDragDropSession, NSProgressReporting { @@ -22534,7 +22178,7 @@ interface UIDropSession : UIDragDropSession, NSProgressReporting { } /// A drag item preview for use during drag-and-drop animations. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UITargetedPreview))] [DisableDefaultCtor] @@ -22576,7 +22220,7 @@ interface UITargetedDragPreview : NSCopying { } /// Interface for a drag operation that started from a collection view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -22606,7 +22250,7 @@ interface UICollectionViewDragDelegate { } /// Delegate for handling drops to collection views. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -22636,7 +22280,7 @@ interface UICollectionViewDropDelegate { } /// The proposed method of handling dropped content for a collection view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIDropProposal))] [DisableDefaultCtor] // NSInternalInconsistencyException Reason: Not implemented @@ -22655,7 +22299,7 @@ interface UICollectionViewDropProposal { } /// System-created object used to coordinate drop actions with a collection view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UICollectionViewDropCoordinator { @@ -22692,7 +22336,7 @@ interface UICollectionViewDropCoordinator { IUIDragAnimating DropItemToTarget (UIDragItem dragItem, UIDragPreviewTarget target); } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22706,7 +22350,7 @@ interface UICollectionViewPlaceholder { } /// Developers should use this object as a temporary placeholder while retrieving data from a . - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UICollectionViewPlaceholder))] interface UICollectionViewDropPlaceholder { @@ -22719,7 +22363,7 @@ interface UICollectionViewDropPlaceholder { } /// Data for an item to be dropped into a collection view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UICollectionViewDropItem { @@ -22737,7 +22381,7 @@ interface UICollectionViewDropItem { } /// Contains manages collection view placeholder information. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UICollectionViewDropPlaceholderContext : UIDragAnimating { @@ -22759,7 +22403,7 @@ interface UICollectionViewDropPlaceholderContext : UIDragAnimating { } /// Interface for a drag operation that started from a table view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -22789,7 +22433,7 @@ interface UITableViewDragDelegate { } /// Delegate for handling drops to table views. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -22819,7 +22463,7 @@ interface UITableViewDropDelegate { } /// The proposed method of handling dropped content for a table view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIDropProposal))] [DisableDefaultCtor] // NSInternalInconsistencyException Reason: Not implemented @@ -22838,7 +22482,7 @@ interface UITableViewDropProposal { } /// System-created object used to coordinate drop actions with a table view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITableViewDropCoordinator { @@ -22875,7 +22519,7 @@ interface UITableViewDropCoordinator { IUIDragAnimating DropItemToTarget (UIDragItem dragItem, UIDragPreviewTarget target); } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22889,7 +22533,7 @@ interface UITableViewPlaceholder { } /// A used for a drop operation. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UITableViewPlaceholder))] interface UITableViewDropPlaceholder { @@ -22902,7 +22546,7 @@ interface UITableViewDropPlaceholder { } /// Data for an item to be dropped into a table view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITableViewDropItem { @@ -22920,7 +22564,7 @@ interface UITableViewDropItem { } /// Contains managed table view placeholder information. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITableViewDropPlaceholderContext : UIDragAnimating { @@ -22937,7 +22581,7 @@ interface UITableViewDropPlaceholderContext : UIDragAnimating { bool DeletePlaceholder (); } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -22969,7 +22613,7 @@ interface UITextDragPreviewRenderer { } /// Interface for treating a text view as a drag source. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITextDraggable : UITextInput { @@ -22991,7 +22635,7 @@ interface UITextDraggable : UITextInput { } /// Interface for customizing text view drag source behavior. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -23014,7 +22658,7 @@ interface UITextDragDelegate { } /// System-provided interface for getting information about a drag request that originated in a text view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITextDragRequest { @@ -23040,7 +22684,7 @@ interface UITextDragRequest { } /// The proposed method of handling dropped content for a text view. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIDropProposal))] [DisableDefaultCtor] @@ -23063,7 +22707,7 @@ interface UITextDropProposal : NSCopying { } /// Interface for accepting dropped text data. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITextDroppable : UITextInput, UITextPasteConfigurationSupporting { @@ -23081,7 +22725,7 @@ interface UITextDroppable : UITextInput, UITextPasteConfigurationSupporting { } /// Delegate for handling drops to text views. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -23113,7 +22757,7 @@ interface UITextDropDelegate { } /// Interface that describes a text view drop request. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITextDropRequest { @@ -23134,7 +22778,6 @@ interface UITextDropRequest { IUIDropSession DropSession { get; } } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIDataSourceTranslating { @@ -23162,7 +22805,7 @@ interface UIDataSourceTranslating { } /// Interface for spring-loaded drag activities. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -23184,7 +22827,7 @@ interface UISpringLoadedInteraction : UIInteraction { interface IUISpringLoadedInteractionBehavior { } /// Interface for specifying spring-loaded interaction behavior. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UISpringLoadedInteractionBehavior { @@ -23199,7 +22842,7 @@ interface UISpringLoadedInteractionBehavior { interface IUISpringLoadedInteractionEffect { } /// Interface for applying state-based visual styles to spring-loaded interations. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UISpringLoadedInteractionEffect { @@ -23211,7 +22854,7 @@ interface UISpringLoadedInteractionEffect { interface IUISpringLoadedInteractionContext { } /// Contains information about spring-loaded interaction behavior. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UISpringLoadedInteractionContext { @@ -23233,7 +22876,7 @@ interface UISpringLoadedInteractionContext { } /// Interface for controlling whether spring-loading is enabled for drag and drop. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UISpringLoadedInteractionSupporting { @@ -23245,17 +22888,17 @@ interface UISpringLoadedInteractionSupporting { // https://bugzilla.xamarin.com/show_bug.cgi?id=58282, we should be able to write one delegate with a 'Action'. See original signature: // typedef void (^UIContextualActionHandler)(UIContextualAction * _Nonnull, __kindof UIView * _Nonnull, void (^ _Nonnull)(BOOL)); /// An action to run when the user presses a button. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] delegate void UIContextualActionHandler (UIContextualAction action, UIView sourceView, [BlockCallback] UIContextualActionCompletionHandler completionHandler); /// An action to run after a completes. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] delegate void UIContextualActionCompletionHandler (bool finished); /// A context action for a table row. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -23281,7 +22924,7 @@ interface UIContextualAction { } /// Describes the actions to perform when the user swipes rows on a table. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -23300,7 +22943,7 @@ interface UISwipeActionsConfiguration { interface IUITextPasteConfigurationSupporting { } /// Interface for text controls to respond to paste operations. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITextPasteConfigurationSupporting : UIPasteConfigurationSupporting { @@ -23318,7 +22961,7 @@ interface UITextPasteConfigurationSupporting : UIPasteConfigurationSupporting { interface IUITextPasteDelegate { } /// Interface for pasting and dropping text via item providers. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -23339,7 +22982,7 @@ interface UITextPasteDelegate { interface IUITextPasteItem { } /// Interface for working with paste and drop text items. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Protocol] interface UITextPasteItem { @@ -23377,7 +23020,7 @@ interface UITextPasteItem { } /// Object that paste responders use to tell whether they accept pastes and drops for specific data typed. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -23407,7 +23050,7 @@ interface UIPasteConfiguration : NSSecureCoding, NSCopying { interface IUIPasteConfigurationSupporting { } /// Interface defining methods for objects that support paste configuration. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (16, 0)] [Protocol] interface UIPasteConfigurationSupporting { @@ -23423,7 +23066,7 @@ interface UIPasteConfigurationSupporting { } /// A viewer for browsing documents. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] interface UIDocumentBrowserViewController : NSCoding { @@ -23529,7 +23172,7 @@ interface UIDocumentBrowserViewController : NSCoding { interface IUIDocumentBrowserViewControllerDelegate { } /// Handles user interactions with a document browser. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] [BaseType (typeof (NSObject))] @@ -23560,7 +23203,7 @@ interface UIDocumentBrowserViewControllerDelegate { } /// Contains standard animations for a document browser. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -23573,7 +23216,7 @@ interface UIDocumentBrowserTransitionController : UIViewControllerAnimatedTransi } /// Describes a custom action that the developer can add to the UI of a document browser. - [NoTV, NoWatch] + [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -23602,7 +23245,6 @@ interface UIDocumentBrowserAction { } interface IUIFocusItemContainer { } - [NoWatch] [MacCatalyst (13, 1)] [NoMac] [Protocol] @@ -23616,7 +23258,6 @@ interface UIFocusItemContainer { IUIFocusItem [] GetFocusItems (CGRect rect); } - [NoWatch] [MacCatalyst (13, 1)] [Protocol] interface UIFocusItemScrollableContainer : UIFocusItemContainer { @@ -23633,7 +23274,6 @@ interface UIFocusItemScrollableContainer : UIFocusItemContainer { CGSize VisibleSize { get; } } - [NoWatch] // it was added on 8,0, but was not binded and the method was added in 12,0 [MacCatalyst (13, 1)] [Protocol] interface UIUserActivityRestoring { @@ -23668,23 +23308,19 @@ interface UIFontMetrics { [Export ("scaledValueForValue:")] nfloat GetScaledValue (nfloat value); - [NoWatch] [MacCatalyst (13, 1)] [Export ("scaledFontForFont:compatibleWithTraitCollection:")] UIFont GetScaledFont (UIFont font, [NullAllowed] UITraitCollection traitCollection); - [NoWatch] [MacCatalyst (13, 1)] [Export ("scaledFontForFont:maximumPointSize:compatibleWithTraitCollection:")] UIFont GetScaledFont (UIFont font, nfloat maximumPointSize, [NullAllowed] UITraitCollection traitCollection); - [NoWatch] [MacCatalyst (13, 1)] [Export ("scaledValueForValue:compatibleWithTraitCollection:")] nfloat GetScaledValue (nfloat value, [NullAllowed] UITraitCollection traitCollection); } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Native] @@ -23701,7 +23337,7 @@ public enum UIPencilPreferredAction : long { RunSystemShortcut, } - [NoWatch, NoTV, iOS (17, 5), MacCatalyst (17, 5)] + [NoTV, iOS (17, 5), MacCatalyst (17, 5)] [Native] public enum UIPencilInteractionPhase : ulong { Began, @@ -23710,7 +23346,6 @@ public enum UIPencilInteractionPhase : ulong { Cancelled, } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -23750,7 +23385,7 @@ interface UIPencilInteraction : UIInteraction { bool Enabled { [Bind ("isEnabled")] get; set; } } - [NoWatch, NoTV, iOS (17, 5), MacCatalyst (17, 5)] + [NoTV, iOS (17, 5), MacCatalyst (17, 5)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIPencilHoverPose { @@ -23774,7 +23409,7 @@ interface UIPencilHoverPose { nfloat RollAngle { get; } } - [NoWatch, NoTV, iOS (17, 5), MacCatalyst (17, 5)] + [NoTV, iOS (17, 5), MacCatalyst (17, 5)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIPencilInteractionTap { @@ -23786,7 +23421,7 @@ interface UIPencilInteractionTap { UIPencilHoverPose HoverPose { get; } } - [NoWatch, NoTV, iOS (17, 5), MacCatalyst (17, 5)] + [NoTV, iOS (17, 5), MacCatalyst (17, 5)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIPencilInteractionSqueeze { @@ -23803,7 +23438,6 @@ interface UIPencilInteractionSqueeze { interface IUIPencilInteractionDelegate { } - [NoWatch] [NoTV] [MacCatalyst (13, 1)] [Protocol, Model] @@ -23824,7 +23458,7 @@ interface UIPencilInteractionDelegate { void DidReceiveSqueeze (UIPencilInteraction interaction, UIPencilInteractionSqueeze squeeze); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "UIOpenURLContext")] [DisableDefaultCtor] @@ -23837,7 +23471,7 @@ interface UIOpenUrlContext { UISceneOpenUrlOptions Options { get; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIResponder))] [DisableDefaultCtor] @@ -23900,7 +23534,7 @@ interface UIScene { // UIScene (PointerLockState) category - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed, Export ("pointerLockState")] UIPointerLockState PointerLockState { get; } @@ -23916,11 +23550,11 @@ interface UIScene { void CompleteStateRestoration (); // Inlined from the UIScene (SystemProtection) category - [iOS (18, 0), NoWatch, NoTV, MacCatalyst (18, 0)] + [iOS (18, 0), NoTV, MacCatalyst (18, 0)] [Export ("systemProtectionManager"), NullAllowed] UISceneSystemProtectionManager SystemProtectionManager { get; } - [iOS (18, 0), NoWatch, NoTV, MacCatalyst (18, 0)] + [iOS (18, 0), NoTV, MacCatalyst (18, 0)] [Notification] [Field ("UISceneSystemProtectionDidChangeNotification")] NSString SystemProtectionDidChangeNotification { get; } @@ -23928,7 +23562,7 @@ interface UIScene { interface IUISceneDelegate { } - [iOS (13, 0), TV (13, 0), NoWatch, NoMac] + [iOS (13, 0), TV (13, 0), NoMac] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -23979,7 +23613,7 @@ interface UISceneDelegate { void DidUpdateUserActivity (UIScene scene, NSUserActivity userActivity); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -23992,7 +23626,7 @@ interface UISceneActivationConditions : NSSecureCoding { NSPredicate PrefersToActivateForTargetContentIdentifierPredicate { get; set; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UISceneActivationRequestOptions : NSCopying { @@ -24001,12 +23635,12 @@ interface UISceneActivationRequestOptions : NSCopying { UIScene RequestingScene { get; set; } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [NoWatch, NoTV, NoiOS] + [NoTV, NoiOS] [Export ("collectionJoinBehavior", ArgumentSemantic.Assign)] UISceneCollectionJoinBehavior CollectionJoinBehavior { get; set; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24053,7 +23687,7 @@ Type DelegateType { UIStoryboard Storyboard { get; set; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24085,14 +23719,14 @@ interface UISceneConnectionOptions { CKShareMetadata CloudKitShareMetadata { get; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UISceneDestructionRequestOptions { } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "UISceneOpenExternalURLOptions")] interface UISceneOpenExternalUrlOptions { @@ -24107,7 +23741,7 @@ interface UISceneOpenExternalUrlOptions { UIEventAttribution EventAttribution { get; set; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject), Name = "UISceneOpenURLOptions")] [DisableDefaultCtor] @@ -24129,7 +23763,7 @@ interface UISceneOpenUrlOptions { UIEventAttribution EventAttribution { get; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24156,7 +23790,6 @@ interface UISceneSession : NSSecureCoding { } [iOS (13, 0), TV (13, 0)] - [Watch (5, 2)] [MacCatalyst (13, 1)] /* NS_TYPED_ENUM */ enum UIFontDescriptorSystemDesign { @@ -24165,17 +23798,15 @@ enum UIFontDescriptorSystemDesign { Default, [Field ("UIFontDescriptorSystemDesignRounded")] Rounded, - [Watch (7, 0)] [MacCatalyst (13, 1)] [Field ("UIFontDescriptorSystemDesignSerif")] Serif, - [Watch (7, 0)] [MacCatalyst (13, 1)] [Field ("UIFontDescriptorSystemDesignMonospaced")] Monospaced, } - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIBarAppearance : NSCopying, NSSecureCoding { @@ -24219,7 +23850,7 @@ interface UIBarAppearance : NSCopying, NSSecureCoding { UIImage ShadowImage { get; set; } } - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24238,7 +23869,7 @@ interface UIBarButtonItemStateAppearance { UIOffset BackgroundImagePositionAdjustment { get; set; } } - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIBarButtonItemAppearance : NSCopying, NSSecureCoding { @@ -24263,7 +23894,7 @@ interface UIBarButtonItemAppearance : NSCopying, NSSecureCoding { UIBarButtonItemStateAppearance Focused { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UICollectionViewCompositionalLayoutConfiguration : NSCopying { @@ -24277,17 +23908,17 @@ interface UICollectionViewCompositionalLayoutConfiguration : NSCopying { [Export ("boundarySupplementaryItems", ArgumentSemantic.Copy)] NSCollectionLayoutBoundarySupplementaryItem [] BoundarySupplementaryItems { get; set; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Export ("contentInsetsReference", ArgumentSemantic.Assign)] UIContentInsetsReference ContentInsetsReference { get; set; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate NSCollectionLayoutSection UICollectionViewCompositionalLayoutSectionProvider (nint section, INSCollectionLayoutEnvironment layoutEnvironment); - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UICollectionViewLayout))] [DisableDefaultCtor] @@ -24317,7 +23948,7 @@ interface UICollectionViewCompositionalLayout { UICollectionViewCompositionalLayout GetLayout (UICollectionLayoutListConfiguration listConfiguration); } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24337,7 +23968,7 @@ interface UICommandAlternate : NSCopying, NSSecureCoding { UICommandAlternate Create (string title, Selector action, UIKeyModifierFlags modifierFlags); } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIMenuElement))] [DisableDefaultCtor] @@ -24381,7 +24012,7 @@ interface UICommand : UIMenuLeaf { interface IUIFontPickerViewControllerDelegate { } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -24398,7 +24029,7 @@ interface UIFontPickerViewControllerDelegate { void DidPickFont (UIFontPickerViewController viewController); } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] @@ -24422,7 +24053,7 @@ interface UIFontPickerViewController { UIFontDescriptor SelectedFontDescriptor { get; set; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UIFontPickerViewControllerConfiguration : NSCopying { @@ -24447,7 +24078,7 @@ interface UIFontPickerViewControllerConfiguration : NSCopying { NSPredicate FilterPredicate (string [] filteredLanguages); } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIGestureRecognizer))] [DisableDefaultCtor] @@ -24485,7 +24116,7 @@ interface UIHoverGestureRecognizer { interface IUILargeContentViewerItem { } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface UILargeContentViewerItem { @@ -24511,7 +24142,7 @@ interface UILargeContentViewerItem { UIEdgeInsets LargeContentImageInsets { get; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24542,7 +24173,7 @@ interface UILargeContentViewerInteraction : UIInteraction { interface IUILargeContentViewerInteractionDelegate { } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -24565,7 +24196,7 @@ interface UILargeContentViewerInteractionDelegate { interface IUIMenuBuilder { } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface UIMenuBuilder { @@ -24618,7 +24249,7 @@ interface UIMenuBuilder { void RemoveMenu (string removedIdentifier); } - [NoWatch, iOS (13, 0), TV (13, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24639,7 +24270,7 @@ interface UIMenuSystem { void SetNeedsRevalidate (); } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarAppearance))] interface UINavigationBarAppearance { @@ -24686,11 +24317,11 @@ interface UINavigationBarAppearance { void SetBackIndicatorImage ([NullAllowed] UIImage backIndicatorImage, [NullAllowed] UIImage backIndicatorTransitionMaskImage); } - [NoWatch, iOS (13, 0), TV (13, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] delegate NSDictionary UITextAttributesConversionHandler (NSDictionary textAttributes); - [NoWatch, iOS (13, 0), TV (13, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24706,13 +24337,13 @@ interface UIScreenshotService { UIWindowScene WindowScene { get; } } - [NoWatch, iOS (13, 0), TV (13, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] delegate NSDictionary UIScreenshotServiceDelegatePdfHandler (NSData pdfData, nint indexOfCurrentPage, CGRect rectInCurrentPage); interface IUIScreenshotServiceDelegate { } - [NoWatch, iOS (13, 0), TV (13, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -24726,7 +24357,7 @@ interface UIScreenshotServiceDelegate { void GeneratePdfRepresentation (UIScreenshotService screenshotService, UIScreenshotServiceDelegatePdfHandler completionHandler); } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UITextField))] interface UISearchTextField { @@ -24770,7 +24401,7 @@ interface UISearchTextField { IUISearchSuggestion [] SearchSuggestions { get; set; } } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24786,7 +24417,7 @@ interface UISearchToken { interface IUISearchTextFieldDelegate { } - [NoTV, iOS (13, 0), NoWatch] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -24807,7 +24438,7 @@ interface UISearchTextFieldDelegate : UITextFieldDelegate { interface IUISearchTextFieldPasteItem { } - [NoTV, iOS (13, 0), NoWatch] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface UISearchTextFieldPasteItem : UITextPasteItem { @@ -24817,7 +24448,7 @@ interface UISearchTextFieldPasteItem : UITextPasteItem { void SetSearchTokenResult (UISearchToken token); } - [NoTV, iOS (13, 0), NoWatch] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24833,7 +24464,7 @@ interface UIStatusBarManager { CGRect StatusBarFrame { get; } } - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24867,7 +24498,7 @@ interface UITabBarItemStateAppearance { UIOffset BadgeTitlePositionAdjustment { get; set; } } - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarAppearance))] interface UITabBarAppearance { @@ -24907,7 +24538,7 @@ interface UITabBarAppearance { interface IUITextFormattingCoordinatorDelegate { } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -24922,7 +24553,7 @@ interface UITextFormattingCoordinatorDelegate { void UpdateTextAttributes (UITextAttributesConversionHandler conversionHandler); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -24958,7 +24589,7 @@ interface UITextFormattingCoordinator void ToggleFontPanel (NSObject sender); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITextPlaceholder { @@ -24969,7 +24600,7 @@ interface UITextPlaceholder { interface IUITextInteractionDelegate { } - [iOS (13, 0), NoTV, NoWatch] + [iOS (13, 0), NoTV] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -24989,7 +24620,7 @@ interface UITextInteractionDelegate { void DidEnd (UITextInteraction interaction); } - [NoWatch, NoTV, iOS (13, 0)] + [NoTV, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -25016,7 +24647,7 @@ interface UITextInteraction : UIInteraction { UITextInteraction Create (UITextInteractionMode mode); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIBarAppearance))] interface UIToolbarAppearance { @@ -25036,7 +24667,7 @@ interface UIToolbarAppearance { UIBarButtonItemAppearance DoneButtonAppearance { get; set; } } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIScene))] [DisableDefaultCtor] @@ -25071,7 +24702,7 @@ interface UIWindowScene : [NullAllowed, Export ("keyWindow", ArgumentSemantic.Strong)] UIWindow KeyWindow { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("activityItemsConfigurationSource", ArgumentSemantic.Weak)] IUIActivityItemsConfigurationProviding ActivityItemsConfigurationSource { get; set; } @@ -25085,11 +24716,10 @@ interface UIWindowScene : [NullAllowed, Export ("screenshotService")] UIScreenshotService ScreenshotService { get; } - [NoWatch, TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("focusSystem")] UIFocusSystem FocusSystem { get; } - [NoWatch] [NoTV] [NoiOS] [MacCatalyst (13, 1)] @@ -25097,31 +24727,31 @@ interface UIWindowScene : [NullAllowed] UITitlebar Titlebar { get; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("requestGeometryUpdateWithPreferences:errorHandler:")] void RequestGeometryUpdate (UIWindowSceneGeometryPreferences geometryPreferences, [NullAllowed] Action errorHandler); - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("effectiveGeometry")] UIWindowSceneGeometry EffectiveGeometry { get; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("windowingBehaviors")] [NullAllowed] UISceneWindowingBehaviors WindowingBehaviors { get; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("fullScreen")] bool FullScreen { [Bind ("isFullScreen")] get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("traitOverrides")] IUITraitOverrides TraitOverrides { get; } } interface IUIWindowSceneDelegate { } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] @@ -25148,7 +24778,7 @@ interface UIWindowSceneDelegate : UISceneDelegate { void UserDidAcceptCloudKitShare (UIWindowScene windowScene, CKShareMetadata cloudKitShareMetadata); } - [iOS (13, 0), TV (13, 0), NoWatch] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UISceneDestructionRequestOptions))] interface UIWindowSceneDestructionRequestOptions { @@ -25157,7 +24787,7 @@ interface UIWindowSceneDestructionRequestOptions { UIWindowSceneDismissalAnimation WindowDismissalAnimation { get; set; } } - [TV (13, 0), iOS (13, 0), NoWatch] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITabBarItemAppearance : NSCopying, NSSecureCoding { @@ -25182,15 +24812,15 @@ interface UITabBarItemAppearance : NSCopying, NSSecureCoding { UITabBarItemStateAppearance Focused { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate UICollectionViewCell UICollectionViewDiffableDataSourceCellProvider (UICollectionView collectionView, NSIndexPath indexPath, NSObject itemIdentifier); - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate UICollectionReusableView UICollectionViewDiffableDataSourceSupplementaryViewProvider (UICollectionView collectionView, string elementKind, NSIndexPath indexPath); - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -25266,11 +24896,11 @@ interface UICollectionViewDiffableDataSource SectionSnapshotHandlers { get; set; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate UITableViewCell UITableViewDiffableDataSourceCellProvider (UITableView tableView, NSIndexPath indexPath, NSObject obj); - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -25322,7 +24952,7 @@ interface UITableViewDiffableDataSource completion); } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -25576,7 +25206,7 @@ interface UIPointerRegion : NSCopying { UIPointerRegion Create (CGRect rect, [NullAllowed] NSObject identifier); } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (UIHoverStyle))] [DisableDefaultCtor] @@ -25604,7 +25234,7 @@ interface UIPointerStyle : NSCopying { UIPointerStyle CreateSystemPointerStyle (); } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -25618,21 +25248,21 @@ interface UIPointerEffect : NSCopying, UIHoverEffect { UIPointerEffect Create (UITargetedPreview preview); } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (UIPointerEffect))] interface UIPointerHighlightEffect { } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (UIPointerEffect))] interface UIPointerLiftEffect { } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (UIPointerEffect))] interface UIPointerHoverEffect { @@ -25647,7 +25277,7 @@ interface UIPointerHoverEffect { bool PrefersScaledContent { get; set; } } - [NoWatch, NoTV, iOS (13, 4)] + [NoTV, iOS (13, 4)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -25670,7 +25300,7 @@ interface UIPointerShape : NSCopying { UIPointerShape CreateBeam (nfloat preferredLength, UIAxis axis); } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] interface NSDiffableDataSourceSectionSnapshot : NSCopying @@ -25750,7 +25380,7 @@ interface NSDiffableDataSourceSectionSnapshot : NSCopying string VisualDescription { get; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -25806,7 +25436,7 @@ interface UIBackgroundConfiguration : NSCopying, NSSecureCoding { [Export ("listSidebarCellConfiguration")] UIBackgroundConfiguration ListSidebarCellConfiguration { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Static] [Export ("listAccompaniedSidebarCellConfiguration")] @@ -25839,11 +25469,11 @@ interface UIBackgroundConfiguration : NSCopying, NSSecureCoding { [NullAllowed, Export ("visualEffect", ArgumentSemantic.Copy)] UIVisualEffect VisualEffect { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("image", ArgumentSemantic.Strong)] UIImage Image { get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("imageContentMode", ArgumentSemantic.Assign)] UIViewContentMode ImageContentMode { get; set; } @@ -25882,7 +25512,7 @@ interface UIBackgroundConfiguration : NSCopying, NSSecureCoding { UIShadowProperties ShadowProperties { get; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] @@ -25904,21 +25534,21 @@ interface UICellAccessory : NSCopying, NSSecureCoding { UIColor TintColor { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] interface UICellAccessoryDisclosureIndicator { } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] interface UICellAccessoryCheckmark { } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] interface UICellAccessoryDelete { @@ -25930,7 +25560,7 @@ interface UICellAccessoryDelete { Action ActionHandler { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] interface UICellAccessoryInsert { @@ -25942,7 +25572,7 @@ interface UICellAccessoryInsert { Action ActionHandler { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] interface UICellAccessoryReorder { @@ -25951,7 +25581,7 @@ interface UICellAccessoryReorder { bool ShowsVerticalSeparator { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] interface UICellAccessoryMultiselect { @@ -25960,7 +25590,7 @@ interface UICellAccessoryMultiselect { UIColor BackgroundColor { get; set; } } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] interface UICellAccessoryOutlineDisclosure { @@ -25972,7 +25602,7 @@ interface UICellAccessoryOutlineDisclosure { Action ActionHandler { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] [DisableDefaultCtor] @@ -25992,11 +25622,11 @@ interface UICellAccessoryLabel { bool AdjustsFontForContentSizeCategory { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] delegate nuint UICellAccessoryPosition (UICellAccessory [] accessories); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICellAccessory))] [DisableDefaultCtor] @@ -26019,7 +25649,7 @@ interface UICellAccessoryCustomView { UICellAccessoryPosition Position { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UIViewConfigurationState))] [DisableDefaultCtor] @@ -26041,12 +25671,12 @@ interface UICellConfigurationState { [Export ("reordering")] bool Reordering { [Bind ("isReordering")] get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("cellDragState", ArgumentSemantic.Assign)] UICellConfigurationDragState CellDragState { get; set; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("cellDropState", ArgumentSemantic.Assign)] UICellConfigurationDropState CellDropState { get; set; } @@ -26060,7 +25690,7 @@ interface UICellConfigurationState { [MacCatalyst (13, 1)] delegate UIListSeparatorConfiguration UICollectionLayoutListItemSeparatorHandler (NSIndexPath indexPath, UIListSeparatorConfiguration sectionSeparatorConfiguration); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26078,12 +25708,12 @@ interface UICollectionLayoutListConfiguration : NSCopying { [Export ("showsSeparators")] bool ShowsSeparators { get; set; } - [Watch (7, 4), NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [Export ("separatorConfiguration", ArgumentSemantic.Copy)] UIListSeparatorConfiguration SeparatorConfiguration { get; set; } - [Watch (7, 4), NoTV, iOS (14, 5)] + [NoTV, iOS (14, 5)] [MacCatalyst (14, 5)] [NullAllowed] [Export ("itemSeparatorHandler", ArgumentSemantic.Copy)] @@ -26119,11 +25749,11 @@ interface UICollectionLayoutListConfiguration : NSCopying { UICollectionLayoutListContentHuggingElements ContentHuggingElements { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] delegate void UICollectionViewCellRegistrationConfigurationHandler (UICollectionViewCell cell, NSIndexPath indexPath, NSObject item); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26154,11 +25784,11 @@ interface UICollectionViewCellRegistration { UICollectionViewCellRegistrationConfigurationHandler ConfigurationHandler { get; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] delegate void UICollectionViewSupplementaryRegistrationConfigurationHandler (UICollectionReusableView supplementaryView, string elementKind, NSIndexPath indexPath); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26192,7 +25822,7 @@ interface UICollectionViewSupplementaryRegistration { UICollectionViewSupplementaryRegistrationConfigurationHandler ConfigurationHandler { get; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UICollectionViewCell))] interface UICollectionViewListCell { @@ -26223,7 +25853,7 @@ interface UICollectionViewListCell { interface IUIColorPickerViewControllerDelegate { } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -26246,7 +25876,7 @@ interface UIColorPickerViewControllerDelegate { void DidFinish (UIColorPickerViewController viewController); } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UIViewController))] [DesignatedDefaultCtor] @@ -26268,7 +25898,7 @@ interface UIColorPickerViewController { bool SupportsAlpha { get; set; } } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UIControl))] interface UIColorWell { @@ -26288,7 +25918,7 @@ interface UIColorWell { interface IUIConfigurationState { } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Protocol] interface UIConfigurationState : NSCopying, NSSecureCoding { @@ -26323,7 +25953,7 @@ interface UIConfigurationState : NSCopying, NSSecureCoding { interface IUIContentConfiguration { } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [NoMac] [Protocol] @@ -26340,7 +25970,7 @@ interface UIContentConfiguration : NSCopying { interface IUIContentView { } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [NoMac] [MacCatalyst (14, 0)] [Protocol] @@ -26350,20 +25980,20 @@ interface UIContentView { [Export ("configuration", ArgumentSemantic.Copy)] IUIContentConfiguration Configuration { get; set; } - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("supportsConfiguration:")] bool SupportsConfiguration (IUIContentConfiguration configuration); } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] delegate void UIDeferredMenuElementCompletionHandler (UIMenuElement [] elements); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] delegate void UIDeferredMenuElementProviderHandler ([BlockCallback] UIDeferredMenuElementCompletionHandler completion); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UIMenuElement))] [DisableDefaultCtor] @@ -26379,7 +26009,7 @@ interface UIDeferredMenuElement { UIDeferredMenuElement CreateUncached (UIDeferredMenuElementProviderHandler elementProvider); } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] interface NSDiffableDataSourceSectionTransaction @@ -26401,7 +26031,7 @@ interface NSDiffableDataSourceSectionTransaction @@ -26423,7 +26053,7 @@ interface NSDiffableDataSourceTransaction [] SectionTransactions { get; } } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26446,7 +26076,7 @@ interface UIIndirectScribbleInteraction : UIInteraction { interface IUIIndirectScribbleInteractionDelegate { } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -26482,7 +26112,7 @@ interface UIIndirectScribbleInteractionDelegate { void DidFinishWriting (UIIndirectScribbleInteraction interaction, NSObject elementIdentifier); } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26528,12 +26158,12 @@ interface UIListContentConfiguration : UIContentConfiguration, NSSecureCoding { [Export ("groupedFooterConfiguration")] UIListContentConfiguration GroupedFooterConfiguration { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("prominentInsetGroupedHeaderConfiguration")] UIListContentConfiguration ProminentInsetGroupedHeaderConfiguration { get; } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("extraProminentInsetGroupedHeaderConfiguration")] UIListContentConfiguration ExtraProminentInsetGroupedHeaderConfiguration { get; } @@ -26631,7 +26261,7 @@ interface UIListContentConfiguration : UIContentConfiguration, NSSecureCoding { nfloat Alpha { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (UIView))] [DisableDefaultCtor] @@ -26657,7 +26287,7 @@ interface UIListContentView : UIContentView { delegate UIColor UIConfigurationColorTransformerHandler (UIColor color); - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26707,7 +26337,7 @@ interface UIListContentImageProperties : NSCopying, NSSecureCoding { UIColor GetResolvedStrokeColor (UIColor tintColor); } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26755,14 +26385,14 @@ interface UIListContentTextProperties : NSCopying, NSSecureCoding { } interface UIPointerLockStateDidChangeEventArgs { - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [NullAllowed] [Export ("UIPointerLockStateSceneUserInfoKey")] UIScene Scene { get; } } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26776,7 +26406,7 @@ interface UIPointerLockState { bool Locked { [Bind ("isLocked")] get; } } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26803,7 +26433,7 @@ interface UIScribbleInteraction : UIInteraction { interface IUIScribbleInteractionDelegate { } - [NoWatch, NoTV, iOS (14, 0)] + [NoTV, iOS (14, 0)] [MacCatalyst (14, 0)] #if NET [Protocol, Model] @@ -26828,7 +26458,7 @@ interface UIScribbleInteractionDelegate { interface IUISearchSuggestion { } - [TV (14, 0), NoWatch, iOS (16, 0)] + [TV (14, 0), iOS (16, 0)] [MacCatalyst (16, 0)] [Protocol] interface UISearchSuggestion { @@ -26863,7 +26493,7 @@ interface UISearchSuggestion { NSObject RepresentedObject { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Static, Partial] interface UIConfigurationColorTransformer { @@ -26890,7 +26520,7 @@ interface UIConfigurationColorTransformer { IntPtr _MonochromeTint { get; } } - [TV (14, 0), NoWatch, iOS (16, 0), MacCatalyst (16, 0)] + [TV (14, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UISearchSuggestionItem : UISearchSuggestion { @@ -26963,7 +26593,7 @@ interface UISearchSuggestionItem : UISearchSuggestion { new NSObject RepresentedObject { get; set; } } - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -26988,13 +26618,13 @@ interface UIViewConfigurationState : UIConfigurationState { [Export ("focused")] bool Focused { [Bind ("isFocused")] get; set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("pinned")] bool Pinned { [Bind ("isPinned")] get; set; } } // TODO: Our trampolines generator does not support generic delegate definitions - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] interface UICollectionViewDiffableDataSourceSectionSnapshotHandlers : NSCopying @@ -27017,7 +26647,7 @@ interface UICollectionViewDiffableDataSourceSectionSnapshotHandlers : } // TODO: Our trampolines generator does not support generic delegate definitions - [NoWatch, TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [BaseType (typeof (NSObject))] interface UICollectionViewDiffableDataSourceReorderingHandlers : NSCopying @@ -27036,7 +26666,6 @@ interface UICollectionViewDiffableDataSourceReorderingHandlers selectionHandler); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate NSDictionary UIConfigurationTextAttributesTransformerHandler (NSDictionary textAttributes); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIButtonConfiguration : NSCopying, NSSecureCoding { @@ -27300,17 +26929,17 @@ interface UIButtonConfiguration : NSCopying, NSSecureCoding { [Export ("automaticallyUpdateForSelection")] bool AutomaticallyUpdateForSelection { get; set; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("indicator", ArgumentSemantic.Assign)] UIButtonConfigurationIndicator Indicator { get; set; } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("indicatorColorTransformer", ArgumentSemantic.Copy)] [NullAllowed] UIConfigurationColorTransformerHandler IndicatorColorTransformer { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIFocusEffect : NSCopying { @@ -27320,7 +26949,7 @@ interface UIFocusEffect : NSCopying { UIFocusEffect Create (); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UIFocusEffect))] [DisableDefaultCtor] interface UIFocusHaloEffect { @@ -27347,23 +26976,23 @@ interface UIFocusHaloEffect { UIFocusHaloEffectPosition Position { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UITrackingLayoutGuide))] interface UIKeyboardLayoutGuide { [Export ("followsUndockedKeyboard")] bool FollowsUndockedKeyboard { get; set; } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Export ("usesBottomSafeArea")] bool UsesBottomSafeArea { get; set; } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Export ("keyboardDismissPadding")] nfloat KeyboardDismissPadding { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UISheetPresentationControllerDetent { @@ -27371,7 +27000,7 @@ interface UISheetPresentationControllerDetent { [Field ("UISheetPresentationControllerAutomaticDimension")] nfloat AutomaticDimension { get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Field ("UISheetPresentationControllerDetentInactive")] nfloat DetentInactive { get; } @@ -27384,21 +27013,21 @@ interface UISheetPresentationControllerDetent { UISheetPresentationControllerDetent CreateLargeDetent (); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("identifier", ArgumentSemantic.Strong)] string Identifier { get; } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Static] [Export ("customDetentWithIdentifier:resolver:")] UISheetPresentationControllerDetent Create ([NullAllowed] string identifier, Func resolver); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Export ("resolvedValueInContext:")] nfloat GetResolvedValue (IUISheetPresentationControllerDetentResolutionContext context); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface UIToolTipInteraction : UIInteraction { @@ -27419,7 +27048,7 @@ interface UIToolTipInteraction : UIInteraction { NativeHandle Constructor (string defaultToolTip); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIToolTipConfiguration { @@ -27441,7 +27070,7 @@ interface UIToolTipConfiguration { interface IUIToolTipInteractionDelegate { } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -27455,7 +27084,7 @@ interface UIToolTipInteractionDelegate { UIToolTipConfiguration GetConfiguration (UIToolTipInteraction interaction, CGPoint point); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UILayoutGuide))] interface UITrackingLayoutGuide { @@ -27475,10 +27104,10 @@ interface UITrackingLayoutGuide { void RemoveAllTrackedConstraints (); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] delegate UIWindowSceneActivationConfiguration UIWindowSceneActivationActionConfigurationProvider (UIWindowSceneActivationAction action); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UIAction))] [DisableDefaultCtor] interface UIWindowSceneActivationAction { @@ -27491,7 +27120,7 @@ interface UIWindowSceneActivationAction { UIWindowSceneActivationAction Create ([NullAllowed][BindAs (typeof (UIActionIdentifier))] NSString identifier, [NullAllowed] UIAction alternateAction, UIWindowSceneActivationActionConfigurationProvider configurationProvider); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIWindowSceneActivationConfiguration { @@ -27510,10 +27139,10 @@ interface UIWindowSceneActivationConfiguration { NativeHandle Constructor (NSUserActivity userActivity); } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] delegate UIWindowSceneActivationConfiguration UIWindowSceneActivationInteractionConfigurationProvider (UIWindowSceneActivationInteraction interaction, CGPoint location); - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIWindowSceneActivationInteraction : UIInteraction { @@ -27523,7 +27152,7 @@ interface UIWindowSceneActivationInteraction : UIInteraction { NativeHandle Constructor (UIWindowSceneActivationInteractionConfigurationProvider configurationProvider, Action errorHandler); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (UISceneActivationRequestOptions))] interface UIWindowSceneActivationRequestOptions { @@ -27534,12 +27163,12 @@ interface UIWindowSceneActivationRequestOptions { UIWindowScenePresentationStyle PreferredPresentationStyle { get; set; } [NullAllowed] - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Export ("placement", ArgumentSemantic.Copy)] UIWindowScenePlacement Placement { get; set; } } - [NoWatch, NoTV, iOS (15, 0), MacCatalyst (15, 0)] + [NoTV, iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIPointerAccessory : NSCopying { @@ -27564,7 +27193,6 @@ interface UIPointerAccessory : NSCopying { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum UITitlebarTitleVisibility : long { @@ -27575,7 +27203,6 @@ public enum UITitlebarTitleVisibility : long { [MacCatalyst (14, 0)] [NoiOS] [NoTV] - [NoWatch] [Native] public enum UITitlebarToolbarStyle : long { Automatic, @@ -27587,7 +27214,6 @@ public enum UITitlebarToolbarStyle : long { [NoiOS] [NoTV] - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface UITitlebar { @@ -27612,7 +27238,7 @@ interface UITitlebar { NSUrl RepresentedUrl { get; set; } } - [NoWatch, TV (15, 4), iOS (15, 4), MacCatalyst (15, 4)] + [TV (15, 4), iOS (15, 4), MacCatalyst (15, 4)] [BaseType (typeof (UICellAccessory))] [DesignatedDefaultCtor] interface UICellAccessoryDetail { @@ -27623,7 +27249,7 @@ interface UICellAccessoryDetail { interface IUICalendarSelectionMultiDateDelegate { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -27646,7 +27272,7 @@ interface UICalendarSelectionMultiDateDelegate { bool CanDeselectDate (UICalendarSelectionMultiDate selection, NSDateComponents dateComponents); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UICalendarSelection))] interface UICalendarSelectionMultiDate { [Export ("selectedDates", ArgumentSemantic.Copy)] @@ -27668,7 +27294,7 @@ interface UICalendarSelectionMultiDate { interface IUICalendarSelectionSingleDateDelegate { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -27684,7 +27310,7 @@ interface UICalendarSelectionSingleDateDelegate { bool CanSelectDate (UICalendarSelectionSingleDate selection, [NullAllowed] NSDateComponents dateComponents); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UICalendarSelection { @@ -27693,7 +27319,7 @@ interface UICalendarSelection { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UICalendarSelection))] interface UICalendarSelectionSingleDate { [Wrap ("WeakDelegate")] @@ -27715,7 +27341,7 @@ interface UICalendarSelectionSingleDate { interface IUICalendarViewDelegate { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -27733,7 +27359,7 @@ interface UICalendarViewDelegate { void DidChangeVisibleDateComponents (UICalendarView calendarView, NSDateComponents previousDateComponents); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface UICalendarViewDecoration { [Export ("initWithImage:color:size:")] @@ -27759,7 +27385,7 @@ interface UICalendarViewDecoration { UICalendarViewDecoration Create (Func customViewProvider); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIView))] interface UICalendarView { @@ -27808,7 +27434,7 @@ interface UICalendarView { interface IUIEditMenuInteractionAnimating { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface UIEditMenuInteractionAnimating { [Abstract] @@ -27822,7 +27448,7 @@ interface UIEditMenuInteractionAnimating { interface IUIEditMenuInteractionDelegate { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -27846,7 +27472,7 @@ interface UIEditMenuInteractionDelegate { interface IUILayoutGuideAspectFitting { } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface UILayoutGuideAspectFitting { [Abstract] @@ -27854,7 +27480,7 @@ interface UILayoutGuideAspectFitting { nfloat AspectRatio { get; set; } } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface UIMenuLeaf { [Abstract] @@ -27903,7 +27529,7 @@ interface IUINavigationItemRenameDelegate { } interface IUIPopoverPresentationControllerSourceItem { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0), NoMac] + [NoTV, iOS (16, 0), MacCatalyst (16, 0), NoMac] [Protocol] interface UIPopoverPresentationControllerSourceItem { @@ -27915,7 +27541,7 @@ interface UIPopoverPresentationControllerSourceItem { CGRect GetFrame (UIView referenceView); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] #if NET [Protocol, Model] #else @@ -27939,7 +27565,7 @@ interface UINavigationItemRenameDelegate { interface IUISheetPresentationControllerDetentResolutionContext { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface UISheetPresentationControllerDetentResolutionContext { [Abstract] @@ -27953,7 +27579,7 @@ interface UISheetPresentationControllerDetentResolutionContext { interface IUITextSearchAggregator { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface UITextSearchAggregator { [Abstract] @@ -27977,7 +27603,7 @@ interface UITextSearchAggregator { void Invalidate (); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface UITextSearchOptions { [Export ("wordMatchMethod")] @@ -27989,7 +27615,7 @@ interface UITextSearchOptions { interface IUITextSearching { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [Protocol] interface UITextSearching { [Abstract] @@ -28037,7 +27663,7 @@ interface UITextSearching { NSComparisonResult CompareOrder (INSCopying fromDocument, INSCopying toDocument); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIEditMenuInteraction : UIInteraction { @@ -28067,7 +27693,7 @@ interface UIEditMenuInteraction : UIInteraction { CGPoint GetLocation ([NullAllowed] UIView inView); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIEditMenuConfiguration { @@ -28085,7 +27711,7 @@ interface UIEditMenuConfiguration { UIEditMenuConfiguration Create ([NullAllowed] INSCopying identifier, CGPoint sourcePoint); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UICellAccessory))] [DisableDefaultCtor] interface UICellAccessoryPopUpMenu { @@ -28100,7 +27726,7 @@ interface UICellAccessoryPopUpMenu { Action SelectedElementDidChangeHandler { get; set; } } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIDocumentProperties { @@ -28123,10 +27749,10 @@ interface UIDocumentProperties { bool WantsIconRepresentation { get; set; } } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] delegate UIMenu OptionsMenuProviderHandler (UIMenuElement [] elements); - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIFindInteraction : UIInteraction { @@ -28172,7 +27798,7 @@ interface UIFindInteraction : UIInteraction { void UpdateResultCount (); } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface UIFindSession { [Export ("resultCount")] @@ -28206,7 +27832,7 @@ interface UIFindSession { bool AllowsReplacementForCurrentlyHighlightedResult { get; } } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface UIPasteControlConfiguration : NSSecureCoding { [Export ("displayMode", ArgumentSemantic.Assign)] @@ -28231,7 +27857,7 @@ interface UIPasteControlConfiguration : NSSecureCoding { interface IUIFindInteractionDelegate { } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0), NoMac] + [NoTV, iOS (16, 0), MacCatalyst (16, 0), NoMac] #if NET [Protocol, Model] #else @@ -28243,7 +27869,7 @@ interface UIFindInteractionDelegate { // implements this interface and has iOS 11 support. When inlining // this method, the attributes are not carried over and causes issues // since it is not supported until iOS 16 - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0), NoMac] + [NoTV, iOS (16, 0), MacCatalyst (16, 0), NoMac] [Abstract] [Export ("findInteraction:sessionForView:")] [return: NullAllowed] @@ -28256,7 +27882,7 @@ interface UIFindInteractionDelegate { void DidEndFindSession (UIFindInteraction interaction, UIFindSession session); } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UISceneWindowingBehaviors { @@ -28267,7 +27893,7 @@ interface UISceneWindowingBehaviors { bool Miniaturizable { [Bind ("isMiniaturizable")] get; set; } } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIFindSession))] [DisableDefaultCtor] interface UITextSearchingFindSession { @@ -28279,7 +27905,7 @@ interface UITextSearchingFindSession { NativeHandle Constructor (IUITextSearching searchableObject); } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIWindowSceneGeometry : NSCopying { @@ -28292,11 +27918,11 @@ interface UIWindowSceneGeometry : NSCopying { UIInterfaceOrientation InterfaceOrientation { get; } } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSObject))] interface UIWindowSceneGeometryPreferences { } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIWindowSceneGeometryPreferences))] [DisableDefaultCtor] interface UIWindowSceneGeometryPreferencesMac { @@ -28311,7 +27937,7 @@ interface UIWindowSceneGeometryPreferencesMac { CGRect SystemFrame { get; set; } } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIWindowSceneGeometryPreferences))] [DisableDefaultCtor] interface UIWindowSceneGeometryPreferencesIOS { @@ -28326,7 +27952,7 @@ interface UIWindowSceneGeometryPreferencesIOS { UIInterfaceOrientationMask InterfaceOrientations { get; set; } } - [NoWatch, NoTV, iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (UIControl))] interface UIPasteControl { [Export ("configuration")] @@ -28346,7 +27972,7 @@ interface UIPasteControl { [Static] [Internal] - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] interface UIFontWidthConstants { [Field ("UIFontWidthCondensed")] nfloat Condensed { get; } @@ -28361,7 +27987,7 @@ interface UIFontWidthConstants { nfloat Compressed { get; } } - [NoWatch, NoTV, iOS (16, 4), MacCatalyst (16, 4)] + [NoTV, iOS (16, 4), MacCatalyst (16, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextInputContext { @@ -28380,7 +28006,7 @@ interface UITextInputContext { UITextInputContext Current { get; } } - [NoWatch, TV (17, 0), iOS (17, 0)] + [TV (17, 0), iOS (17, 0)] [Native] public enum UICollectionLayoutSectionOrthogonalScrollingBounce : long { Automatic, @@ -28388,14 +28014,14 @@ public enum UICollectionLayoutSectionOrthogonalScrollingBounce : long { Never, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UIContentUnavailableAlignment : long { Center, Natural, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UISceneCaptureState : long { Unspecified = -1, @@ -28403,7 +28029,7 @@ public enum UISceneCaptureState : long { Active = 1, } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Flags] [Native] public enum UIAccessibilityDirectTouchOptions : ulong { @@ -28412,7 +28038,7 @@ public enum UIAccessibilityDirectTouchOptions : ulong { RequiresActivation = 1uL << 1, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UICornerCurve : long { Automatic, @@ -28420,7 +28046,7 @@ public enum UICornerCurve : long { Continuous, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UIImageDynamicRange : long { Unspecified = -1, @@ -28429,21 +28055,21 @@ public enum UIImageDynamicRange : long { High = 2, } - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UILabelVibrancy : long { None, Automatic, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UILetterformAwareSizingRule : long { Typographic, Oversize, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UITextInlinePredictionType : long { Default, @@ -28451,7 +28077,7 @@ public enum UITextInlinePredictionType : long { Yes, } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UITextItemContentType : long { Link = 0, @@ -28459,7 +28085,7 @@ public enum UITextItemContentType : long { Tag = 2, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Native] public enum UITextViewBorderStyle : long { None, @@ -28467,7 +28093,7 @@ public enum UITextViewBorderStyle : long { RoundedRect, } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UICollectionLayoutSectionOrthogonalScrollingProperties : NSCopying { [Export ("decelerationRate")] @@ -28477,7 +28103,7 @@ interface UICollectionLayoutSectionOrthogonalScrollingProperties : NSCopying { UICollectionLayoutSectionOrthogonalScrollingBounce Bounce { get; set; } } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIContentUnavailableButtonProperties : NSCopying, NSSecureCoding { [NullAllowed, Export ("primaryAction", ArgumentSemantic.Copy)] @@ -28489,12 +28115,11 @@ interface UIContentUnavailableButtonProperties : NSCopying, NSSecureCoding { [Export ("enabled")] bool Enabled { [Bind ("isEnabled")] get; set; } - [NoWatch] [Export ("role", ArgumentSemantic.Assign)] UIButtonRole Role { get; set; } } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIContentUnavailableConfiguration : UIContentConfiguration, NSSecureCoding { @@ -28534,14 +28159,12 @@ interface UIContentUnavailableConfiguration : UIContentConfiguration, NSSecureCo [Export ("secondaryTextProperties")] UIContentUnavailableTextProperties SecondaryTextProperties { get; } - [NoWatch] [Export ("button", ArgumentSemantic.Strong)] UIButtonConfiguration Button { get; set; } [Export ("buttonProperties")] UIContentUnavailableButtonProperties ButtonProperties { get; } - [NoWatch] [Export ("secondaryButton", ArgumentSemantic.Strong)] UIButtonConfiguration SecondaryButton { get; set; } @@ -28551,7 +28174,6 @@ interface UIContentUnavailableConfiguration : UIContentConfiguration, NSSecureCo [Export ("alignment", ArgumentSemantic.Assign)] UIContentUnavailableAlignment Alignment { get; set; } - [NoWatch] [Export ("axesPreservingSuperviewLayoutMargins", ArgumentSemantic.Assign)] UIAxis AxesPreservingSuperviewLayoutMargins { get; set; } @@ -28570,12 +28192,11 @@ interface UIContentUnavailableConfiguration : UIContentConfiguration, NSSecureCo [Export ("buttonToSecondaryButtonPadding")] nfloat ButtonToSecondaryButtonPadding { get; set; } - [NoWatch] [Export ("background", ArgumentSemantic.Strong)] UIBackgroundConfiguration Background { get; set; } } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIContentUnavailableImageProperties : NSCopying, NSSecureCoding { [NullAllowed, Export ("preferredSymbolConfiguration", ArgumentSemantic.Copy)] @@ -28594,7 +28215,7 @@ interface UIContentUnavailableImageProperties : NSCopying, NSSecureCoding { bool AccessibilityIgnoresInvertColors { get; set; } } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIContentUnavailableTextProperties : NSCopying, NSSecureCoding { [Export ("font", ArgumentSemantic.Strong)] @@ -28619,7 +28240,7 @@ interface UIContentUnavailableTextProperties : NSCopying, NSSecureCoding { bool AllowsDefaultTighteningForTruncation { get; set; } } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIContentUnavailableConfigurationState : UIConfigurationState { @@ -28631,7 +28252,7 @@ interface UIContentUnavailableConfigurationState : UIConfigurationState { string SearchText { get; set; } } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (UIView))] [DisableDefaultCtor] interface UIContentUnavailableView : UIContentView { @@ -28643,7 +28264,7 @@ interface UIContentUnavailableView : UIContentView { bool ScrollEnabled { [Bind ("isScrollEnabled")] get; set; } } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [DisableDefaultCtor] // It crashes the app. #if XAMCORE_5_0 [BaseType (typeof(UIViewController))] @@ -28685,7 +28306,7 @@ interface UIDocViewController interface IUIShapeProvider { } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UIShapeProvider { [Abstract] @@ -28693,7 +28314,7 @@ interface UIShapeProvider { UIResolvedShape CreateResolvedShape (UIShapeResolutionContext context); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIShape : UIShapeProvider, NSCopying { @@ -28748,7 +28369,7 @@ interface UIShape : UIShapeProvider, NSCopying { UIShape CreateShapeByApplyingInset (nfloat inset); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIResolvedShape : NSCopying { @@ -28770,11 +28391,11 @@ interface UIResolvedShape : NSCopying { interface IUIHoverEffect { } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UIHoverEffect { } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIHoverAutomaticEffect : UIHoverEffect, NSCopying { @@ -28783,7 +28404,7 @@ interface UIHoverAutomaticEffect : UIHoverEffect, NSCopying { UIHoverAutomaticEffect Create (); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIHoverHighlightEffect : UIHoverEffect, NSCopying { @@ -28792,7 +28413,7 @@ interface UIHoverHighlightEffect : UIHoverEffect, NSCopying { UIHoverHighlightEffect Create (); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIHoverLiftEffect : UIHoverEffect, NSCopying { @@ -28801,7 +28422,7 @@ interface UIHoverLiftEffect : UIHoverEffect, NSCopying { UIHoverLiftEffect Create (); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIHoverStyle : NSCopying { @@ -28828,7 +28449,7 @@ interface UIHoverStyle : NSCopying { UIHoverStyle CreateAutomatic (); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIShapeResolutionContext { @@ -28836,11 +28457,11 @@ interface UIShapeResolutionContext { UIResolvedShape ContentShape { get; } } - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIWindowScenePlacement : NSCopying { } - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (UIWindowScenePlacement))] interface UIWindowSceneStandardPlacement { [Static] @@ -28848,7 +28469,7 @@ interface UIWindowSceneStandardPlacement { UIWindowSceneStandardPlacement Create (); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (UIWindowScenePlacement))] interface UIWindowSceneProminentPlacement { [Static] @@ -28856,7 +28477,7 @@ interface UIWindowSceneProminentPlacement { UIWindowSceneProminentPlacement Create (); } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIImageReader { [Static] @@ -28885,7 +28506,7 @@ interface UIImageReader { void GetImage (NSData data, Action completion); } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIImageReaderConfiguration : NSCopying { [Export ("prefersHighDynamicRange")] @@ -28903,7 +28524,7 @@ interface UIImageReaderConfiguration : NSCopying { interface IUIPageControlProgressDelegate { } - [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoWatch] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -28920,7 +28541,7 @@ interface UIPageControlProgressDelegate { interface IUIPageControlTimerProgressDelegate { } - [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoWatch] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -28935,7 +28556,7 @@ interface UIPageControlTimerProgressDelegate : UIPageControlProgressDelegate { bool ShouldAdvanceToPage (UIPageControlTimerProgress progress, nint page); } - [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoWatch] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIPageControlProgress { [Wrap ("WeakDelegate")] @@ -28952,7 +28573,7 @@ interface UIPageControlProgress { bool ProgressVisible { [Bind ("isProgressVisible")] get; } } - [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoWatch] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (UIPageControlProgress))] [DisableDefaultCtor] interface UIPageControlTimerProgress { @@ -28989,7 +28610,7 @@ interface UIPageControlTimerProgress { double GetDuration (nint page); } - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UISceneSessionActivationRequest : NSCopying { @@ -29018,7 +28639,7 @@ interface UISceneSessionActivationRequest : NSCopying { UISceneSessionActivationRequest Create (UISceneSession session); } - [NoWatch, TV (17, 0), iOS (17, 0)] + [TV (17, 0), iOS (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UISymbolEffectCompletionContext { @@ -29035,7 +28656,7 @@ interface UISymbolEffectCompletionContext { NSSymbolContentTransition ContentTransition { get; } } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextItem { @@ -29055,7 +28676,7 @@ interface UITextItem { string TagIdentifier { get; } } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UIWindowSceneDragInteraction : UIInteraction { [NoMacCatalyst] @@ -29063,7 +28684,7 @@ interface UIWindowSceneDragInteraction : UIInteraction { UIGestureRecognizer GestureForFailureRelationships { get; } } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextItemMenuPreview { @@ -29075,7 +28696,7 @@ interface UITextItemMenuPreview { NativeHandle Constructor (UIView view); } - [NoWatch, NoTV, iOS (17, 0), MacCatalyst (17, 0)] + [NoTV, iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextItemMenuConfiguration { @@ -29088,7 +28709,7 @@ interface UITextItemMenuConfiguration { UITextItemMenuConfiguration Create ([NullAllowed] UITextItemMenuPreview preview, UIMenu menu); } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITextLoupeSession { [Static] @@ -29105,7 +28726,7 @@ interface UITextLoupeSession { interface IUITextCursorView { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UITextCursorView : UICoordinateSpace { [Abstract] @@ -29119,7 +28740,7 @@ interface UITextCursorView : UICoordinateSpace { interface IUITextSelectionHighlightView { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UITextSelectionHighlightView : UICoordinateSpace { [Abstract] @@ -29129,7 +28750,7 @@ interface UITextSelectionHighlightView : UICoordinateSpace { interface IUITextSelectionHandleView { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UITextSelectionHandleView : UICoordinateSpace { [Abstract] @@ -29149,7 +28770,7 @@ interface UITextSelectionHandleView : UICoordinateSpace { CGRect GetPreferredFrame (CGRect rect); } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextSelectionDisplayInteraction : UIInteraction { @@ -29188,7 +28809,7 @@ interface UITextSelectionDisplayInteraction : UIInteraction { interface IUITextSelectionDisplayInteractionDelegate { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -29203,7 +28824,7 @@ interface UITextSelectionDisplayInteractionDelegate { interface IUITraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UITraitDefinition { [Static] @@ -29221,7 +28842,7 @@ interface UITraitDefinition { interface IUICGFloatTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -29235,7 +28856,7 @@ interface UICGFloatTraitDefinition : UITraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UILetterformAwareAdjusting { [Abstract] @@ -29243,7 +28864,7 @@ interface UILetterformAwareAdjusting { UILetterformAwareSizingRule SizingRule { get; set; } } - [NoWatch, TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), NoMac, iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UILookToDictateCapable { [NoTV] @@ -29254,7 +28875,7 @@ interface UILookToDictateCapable { interface IUINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -29269,7 +28890,7 @@ interface UINSIntegerTraitDefinition : UITraitDefinition { interface IUIObjectTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -29284,7 +28905,7 @@ interface UIObjectTraitDefinition : UITraitDefinition { interface IUIMutableTraits { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] #if NET [Protocol, Model] #else @@ -29353,12 +28974,11 @@ interface UIMutableTraits { [Export ("displayGamut", ArgumentSemantic.Assign)] UIDisplayGamut DisplayGamut { get; set; } - [NoWatch] [Abstract] [Export ("accessibilityContrast", ArgumentSemantic.Assign)] UIAccessibilityContrast AccessibilityContrast { get; set; } - [NoWatch, NoTV] + [NoTV] [Abstract] [Export ("userInterfaceLevel", ArgumentSemantic.Assign)] UIUserInterfaceLevel UserInterfaceLevel { get; set; } @@ -29396,94 +29016,94 @@ interface UIMutableTraits { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitUserInterfaceIdiom : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitUserInterfaceStyle : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitLayoutDirection : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitDisplayScale : UICGFloatTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitHorizontalSizeClass : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitVerticalSizeClass : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitForceTouchCapability : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitPreferredContentSizeCategory : UIObjectTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitDisplayGamut : UINSIntegerTraitDefinition { } - [TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitAccessibilityContrast : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), NoWatch, iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitUserInterfaceLevel : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitLegibilityWeight : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitActiveAppearance : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitToolbarItemPresentationSize : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitImageDynamicRange : UINSIntegerTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitTypesettingLanguage : UIObjectTraitDefinition { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [BaseType (typeof (NSObject))] interface UITraitSceneCaptureState : UINSIntegerTraitDefinition { } interface IUITraitOverrides { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UITraitOverrides : UIMutableTraits { [Abstract] @@ -29505,7 +29125,7 @@ interface UITraitOverrides : UIMutableTraits { #endif } - [iOS (17, 0), TV (17, 0), Watch (10, 0), MacCatalyst (17, 0)] + [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0)] public enum UIAccessibilityPriority { [Field ("UIAccessibilityPriorityHigh")] High, @@ -29516,7 +29136,7 @@ public enum UIAccessibilityPriority { } // cannot be an enum because the values are doubles - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Static] public interface UICollectionLayoutSectionOrthogonalScrollingDecelerationRate { @@ -29586,22 +29206,22 @@ public enum UIAccessibilityTraits : long { [Field ("UIAccessibilityTraitTabBar")] TabBar, - [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0), Watch (10, 0)] + [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] [Field ("UIAccessibilityTraitSupportsZoom")] SupportsZoom, - [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0), Watch (10, 0)] + [iOS (17, 0), MacCatalyst (17, 0), TV (17, 0)] [Field ("UIAccessibilityTraitToggleButton")] ToggleButton, } interface IUITraitChangeRegistration { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UITraitChangeRegistration : NSCopying { } - [NoWatch, TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0)] [Protocol] interface UITraitChangeObservable { #if NET @@ -29642,7 +29262,7 @@ interface UITraitChangeObservable { void UnregisterForTraitChanges (IUITraitChangeRegistration registration); } - [NoWatch, TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextCursorDropPositionAnimator { @@ -29668,7 +29288,7 @@ interface UITextCursorDropPositionAnimator { void AnimateAlongsideChanges ([NullAllowed] Action animation, [NullAllowed] Action completion); } - [NoWatch, TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] interface UIMenuDisplayPreferences : NSCopying, NSSecureCoding { @@ -29676,7 +29296,7 @@ interface UIMenuDisplayPreferences : NSCopying, NSSecureCoding { nint MaximumNumberOfTitleLines { get; set; } } - [NoWatch, TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface UIItemProviderReadingAugmentationProviding { @@ -29694,7 +29314,7 @@ interface UIItemProviderReadingAugmentationProviding { string [] AdditionalTrailingReadableTypeIdentifiersForItemProvider { get; } } - [NoWatch, TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] + [TV (17, 4), iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (UIView))] [DisableDefaultCtor] interface UIStandardTextCursorView : UITextCursorView { @@ -29703,7 +29323,7 @@ interface UIStandardTextCursorView : UITextCursorView { NativeHandle Constructor (CGRect frame); } - [NoWatch, NoTV, iOS (17, 5), MacCatalyst (17, 5)] + [NoTV, iOS (17, 5), MacCatalyst (17, 5)] [BaseType (typeof (UIFeedbackGenerator))] [DisableDefaultCtor] interface UICanvasFeedbackGenerator { @@ -29722,28 +29342,28 @@ interface UICanvasFeedbackGenerator { } [Native] - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UIActivityCollaborationMode : long { SendCopy, Collaborate, } [Native] - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UIActivitySectionTypes : ulong { None = 0, PeopleSuggestions, } [Native] - [NoWatch, TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UICollectionLayoutListContentHuggingElements : ulong { None = 0, SupplementaryHeader = 1 << 0, } [Native] - [NoWatch, TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UIColorProminence : long { Primary, Secondary, @@ -29751,7 +29371,7 @@ enum UIColorProminence : long { Quaternary, } - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UIDocumentCreationIntent { [DefaultEnumValue] [Field ("UIDocumentCreationIntentDefault")] @@ -29759,7 +29379,7 @@ enum UIDocumentCreationIntent { } [Native] - [NoWatch, TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UITabPlacement : long { Automatic = 0, Default = 1, @@ -29771,7 +29391,7 @@ enum UITabPlacement : long { } [Native] - [NoWatch, TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UITabBarControllerMode : long { Automatic = 0, TabBar = 1, @@ -29780,7 +29400,7 @@ enum UITabBarControllerMode : long { } [Native] - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UITabBarControllerSidebarLayout : long { Automatic = 0, Overlap = 1, @@ -29788,7 +29408,7 @@ enum UITabBarControllerSidebarLayout : long { } [Native] - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UITabGroupSidebarAppearance : ulong { Automatic = 0, Inline = 1, @@ -29796,14 +29416,14 @@ enum UITabGroupSidebarAppearance : ulong { } [Native] - [NoWatch, TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UITableViewContentHuggingElements : long { None = 0, SectionHeaders = 1 << 0, } [Native] - [NoWatch, TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UITextMathExpressionCompletionType : long { Default, No, @@ -29811,7 +29431,7 @@ enum UITextMathExpressionCompletionType : long { } [Native] - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UIWritingToolsBehavior : long { None = -1, Default = 0, @@ -29821,7 +29441,7 @@ enum UIWritingToolsBehavior : long { [Flags] [Native] - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UIWritingToolsResultOptions : ulong { Default = 0, PlainText = 1 << 0, @@ -29831,7 +29451,7 @@ enum UIWritingToolsResultOptions : ulong { } [Native] - [NoWatch, TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), NoMac, iOS (18, 0), MacCatalyst (18, 0)] enum UIListEnvironment : long { Unspecified = 0, None = 1, @@ -29845,7 +29465,7 @@ enum UIListEnvironment : long { SidebarPlain = 6, } - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIActivityCollaborationModeRestriction : NSSecureCoding, NSCopying { @@ -29881,7 +29501,7 @@ interface UIActivityCollaborationModeRestriction : NSSecureCoding, NSCopying { NativeHandle Constructor (UIActivityCollaborationMode disabledMode, string alertTitle, string alertMessage, string alertDismissButtonTitle, string alertRecoverySuggestionButtonTitle, NSUrl alertRecoverySuggestionButtonLaunchUrl); } - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (UICalendarSelection))] [DisableDefaultCtor] interface UICalendarSelectionWeekOfYear { @@ -29902,7 +29522,7 @@ interface UICalendarSelectionWeekOfYear { NativeHandle Constructor ([NullAllowed] IUICalendarSelectionWeekOfYearDelegate @delegate); } - [NoWatch, NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, NoMac, iOS (18, 0), MacCatalyst (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] interface UICalendarSelectionWeekOfYearDelegate { @@ -29916,7 +29536,7 @@ interface UICalendarSelectionWeekOfYearDelegate { interface IUICalendarSelectionWeekOfYearDelegate { } - [iOS (18, 0), MacCatalyst (18, 0), NoWatch, NoTV] + [iOS (18, 0), MacCatalyst (18, 0), NoTV] [BaseType (typeof (NSObject))] interface UIDocumentViewControllerLaunchOptions { [Export ("browserViewController", ArgumentSemantic.Strong)] @@ -29948,7 +29568,7 @@ interface UIDocumentViewControllerLaunchOptions { UIAction CreateDocumentAction (UIDocumentCreationIntent indent); } - [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (UITab))] [DisableDefaultCtor] interface UISearchTab { @@ -29957,7 +29577,7 @@ interface UISearchTab { NativeHandle Constructor ([NullAllowed] Func viewControllerProvider); } - [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0), NoWatch] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITab : UIAccessibilityIdentification @@ -30011,7 +29631,7 @@ interface UITab : UIAccessibilityIdentification NativeHandle Constructor (string title, [NullAllowed] UIImage image, string identifier, [NullAllowed] Func viewControllerProvider); } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITabSidebarScrollTarget { @@ -30029,7 +29649,7 @@ interface UITabSidebarScrollTarget { } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITabBarControllerSidebar { @@ -30062,7 +29682,7 @@ interface UITabBarControllerSidebar { void ReconfigureItemForTab (UITab tab); } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] interface UITabBarControllerSidebarDelegate { @@ -30096,7 +29716,7 @@ interface UITabBarControllerSidebarDelegate { interface IUITabBarControllerSidebarDelegate { } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (UITab))] [DisableDefaultCtor] interface UITabGroup { @@ -30136,7 +29756,7 @@ interface UITabGroup { NativeHandle Constructor (string title, [NullAllowed] UIImage image, string identifier, UITab [] children, [NullAllowed] Func viewControllerProvider); } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITabSidebarItem : NSCopying { @@ -30169,7 +29789,7 @@ interface UITabSidebarItem : NSCopying { UITabSidebarItem GetItem (UITabSidebarItemRequest request); } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITabSidebarItemRequest { @@ -30180,12 +29800,12 @@ interface UITabSidebarItemRequest { UIAction Action { get; } } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] interface UITraitListEnvironment : UINSIntegerTraitDefinition { } - [TV (18, 0), NoWatch, iOS (18, 0), NoMacCatalyst] + [TV (18, 0), iOS (18, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIUpdateActionPhase { @@ -30238,7 +29858,7 @@ interface UIUpdateActionPhase { UIUpdateActionPhase AfterUpdateComplete { get; } } - [TV (18, 0), NoWatch, iOS (18, 0), NoMacCatalyst] + [TV (18, 0), iOS (18, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIUpdateInfo { @@ -30273,7 +29893,7 @@ interface UIUpdateInfo { delegate void UIUpdateLinkCallback (UIUpdateLink updateLink, UIUpdateInfo updateInfo); - [TV (18, 0), NoWatch, iOS (18, 0), NoMacCatalyst] + [TV (18, 0), iOS (18, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIUpdateLink { @@ -30303,10 +29923,8 @@ interface UIUpdateLink { [Export ("wantsImmediatePresentation")] bool WantsImmediatePresentation { get; set; } -#if !WATCH [Export ("preferredFrameRateRange")] CAFrameRateRange PreferredFrameRateRange { get; set; } -#endif [NullAllowed] [Export ("currentUpdateInfo")] @@ -30341,7 +29959,7 @@ interface UIUpdateLink { void UpdateLink (UIView windowScene, NSObject target, Selector selector); } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIViewControllerTransition { @@ -30366,7 +29984,7 @@ interface UIViewControllerTransition { UIViewControllerTransition PartialCurlTransition { get; } } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UIZoomTransitionSourceViewProviderContext { @@ -30377,7 +29995,7 @@ interface UIZoomTransitionSourceViewProviderContext { UIViewController ZoomedViewController { get; } } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] interface UIZoomTransitionOptions : NSCopying { [Export ("interactiveDismissShouldBegin", ArgumentSemantic.Copy), NullAllowed] @@ -30393,7 +30011,7 @@ interface UIZoomTransitionOptions : NSCopying { UIBlurEffect DimmingVisualEffect { get; set; } } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] interface UIZoomTransitionInteractionContext { [Export ("location")] @@ -30406,7 +30024,7 @@ interface UIZoomTransitionInteractionContext { bool WillBegin { get; } } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] interface UIZoomTransitionAlignmentRectContext { [Export ("sourceView")] @@ -30416,7 +30034,7 @@ interface UIZoomTransitionAlignmentRectContext { UIViewController ZoomedViewController { get; } } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [Category] [BaseType (typeof (NSObject))] interface NSObject_UIAccessibilityHitTest { @@ -30425,7 +30043,7 @@ interface NSObject_UIAccessibilityHitTest { NSObject AccessibilityHitTest (CGPoint point, [NullAllowed] UIEvent withEvent); } - [NoTV, NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, iOS (18, 0), MacCatalyst (18, 0)] [Category] [BaseType (typeof (NSObject))] interface NSObject_UIAccessibilityTextNavigation { @@ -30458,19 +30076,18 @@ interface NSObject_UIAccessibilityTextNavigation { void SetAccessibilityNextTextNavigationElementBlock ([NullAllowed] AXObjectReturnBlock element); } - [NoWatch] [return: NullAllowed] delegate NSObject AXObjectReturnBlock (); [Native] - [TV (18, 0), Watch (11, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] enum UIAccessibilityExpandedStatus : long { Unsupported = 0, Expanded, Collapsed, } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] interface UIShadowProperties : NSCopying, NSSecureCoding { [Export ("color", ArgumentSemantic.Strong)] @@ -30489,7 +30106,7 @@ interface UIShadowProperties : NSCopying, NSSecureCoding { UIBezierPath Path { get; set; } } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] interface UITextFormattingViewControllerDelegate { @@ -30509,7 +30126,7 @@ interface UITextFormattingViewControllerDelegate { interface IUITextFormattingViewControllerDelegate { } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [BaseType (typeof (UIViewController))] [DisableDefaultCtor] interface UITextFormattingViewController { @@ -30534,7 +30151,7 @@ interface UITextFormattingViewController { NativeHandle Constructor (UITextFormattingViewControllerConfiguration configuration); } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] enum UITextFormattingViewControllerChangeType { [DefaultEnumValue] [Field ("UITextFormattingViewControllerUndefinedChangeType")] @@ -30601,7 +30218,7 @@ enum UITextFormattingViewControllerChangeType { Highlight, } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextFormattingViewControllerChangeValue : NSCopying, NSSecureCoding { @@ -30636,7 +30253,7 @@ interface UITextFormattingViewControllerChangeValue : NSCopying, NSSecureCoding NSString Highlight { get; } } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] enum UITextFormattingViewControllerComponentKey { [Field ("UITextFormattingViewControllerFormattingStylesComponentKey")] FormattingStyles, @@ -30678,7 +30295,7 @@ enum UITextFormattingViewControllerComponentKey { HighlightPicker, } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [Native] public enum UITextFormattingViewControllerComponentSize : long { Automatic = 0, @@ -30689,7 +30306,7 @@ public enum UITextFormattingViewControllerComponentSize : long { ExtraLarge = 5, } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextFormattingViewControllerComponent : NSCopying, NSSecureCoding { @@ -30705,7 +30322,7 @@ interface UITextFormattingViewControllerComponent : NSCopying, NSSecureCoding { NativeHandle Constructor ([BindAs (typeof (UITextFormattingViewControllerComponentKey))] NSString componentKey, UITextFormattingViewControllerComponentSize preferredSize); } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextFormattingViewControllerComponentGroup : NSCopying, NSSecureCoding { @@ -30717,7 +30334,7 @@ interface UITextFormattingViewControllerComponentGroup : NSCopying, NSSecureCodi NativeHandle Constructor (UITextFormattingViewControllerComponent [] components); } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextFormattingViewControllerConfiguration : NSCopying, NSSecureCoding { @@ -30739,7 +30356,7 @@ interface UITextFormattingViewControllerConfiguration : NSCopying, NSSecureCodin } [Flags] - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] enum UITextFormattingViewControllerTextAlignment { [Field ("UITextFormattingViewControllerTextAlignmentLeft")] Left = 1, @@ -30758,7 +30375,7 @@ enum UITextFormattingViewControllerTextAlignment { } [Flags] - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] enum UITextFormattingViewControllerTextList { [Field ("UITextFormattingViewControllerTextListDisc")] Disc = 1, @@ -30774,7 +30391,7 @@ enum UITextFormattingViewControllerTextList { } [Flags] - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] enum UITextFormattingViewControllerHighlight { [DefaultEnumValue] [Field ("UITextFormattingViewControllerHighlightDefault")] @@ -30796,7 +30413,7 @@ enum UITextFormattingViewControllerHighlight { Blue = 32, } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UITextFormattingViewControllerFormattingDescriptor : NSCopying, NSSecureCoding { @@ -30862,7 +30479,7 @@ UITextFormattingViewControllerHighlight Highlights { string FormattingStyleKey { get; set; } } - [NoWatch, NoTV, NoMacCatalyst, iOS (18, 0)] + [NoTV, NoMacCatalyst, iOS (18, 0)] [BaseType (typeof (NSObject))] interface UITextFormattingViewControllerFormattingStyle : NSCopying, NSSecureCoding { [Export ("styleKey")] @@ -30884,7 +30501,7 @@ interface UITextFormattingViewControllerFormattingStyle : NSCopying, NSSecureCod NativeHandle Constructor (string styleKey, string title, UIStringAttributes attributes); } - [NoWatch, NoTV, iOS (18, 0)] + [NoTV, iOS (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface UITabBarControllerSidebarAnimating { [Abstract] @@ -30898,7 +30515,7 @@ interface UITabBarControllerSidebarAnimating { interface IUITabBarControllerSidebarAnimating { } - [TV (18, 0), NoWatch, iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] public enum UIFocusItemDeferralMode : long { Automatic, @@ -30906,7 +30523,7 @@ public enum UIFocusItemDeferralMode : long { Never, } - [NoWatch, NoTV, MacCatalyst (18, 0), iOS (18, 0)] + [NoTV, MacCatalyst (18, 0), iOS (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UISceneSystemProtectionManager { @@ -30914,7 +30531,7 @@ interface UISceneSystemProtectionManager { bool UserAuthenticationEnabled { [Bind ("isUserAuthenticationEnabled")] get; } } - [NoWatch, NoTV, NoiOS, MacCatalyst (16, 0)] + [NoTV, NoiOS, MacCatalyst (16, 0)] [BaseType (typeof (NSToolbarItem))] [DisableDefaultCtor] interface NSUIViewToolbarItem { @@ -30926,10 +30543,10 @@ interface NSUIViewToolbarItem { UIView UIView { get; [Bind ("setUIView:")] set; } } - [NoMac, NoWatch, NoTV, iOS (18, 1), MacCatalyst (18, 1)] + [NoMac, NoTV, iOS (18, 1), MacCatalyst (18, 1)] delegate IUITextInput UITextInputReturnHandler (); - [NoMac, NoWatch, NoTV, iOS (18, 1), MacCatalyst (18, 1)] + [NoMac, NoTV, iOS (18, 1), MacCatalyst (18, 1)] [Category] [BaseType (typeof (NSObject))] interface NSObject_UIAccessibilityTextOperations { diff --git a/src/uniformtypeidentifiers.cs b/src/uniformtypeidentifiers.cs index e1bb2a9a0420..ba8c034816e7 100644 --- a/src/uniformtypeidentifiers.cs +++ b/src/uniformtypeidentifiers.cs @@ -6,7 +6,7 @@ namespace UniformTypeIdentifiers { [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UTType : NSCopying, NSSecureCoding { @@ -123,18 +123,18 @@ interface UTType : NSCopying, NSSecureCoding { // extension methods used in ShazamKit [Static] - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("SHCustomCatalogContentType", ArgumentSemantic.Strong)] UTType SHCustomCatalogContentType { get; } [Static] - [Watch (9, 0), TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("SHSignatureContentType", ArgumentSemantic.Strong)] UTType SHSignatureContentType { get; } } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] enum UTTagClass { [Field ("UTTagClassFilenameExtension")] FilenameExtension, @@ -145,7 +145,7 @@ enum UTTagClass { // split from UTType for clarity between members (selectors) and constants (fields) [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [Static] interface UTTypes { @@ -230,7 +230,7 @@ interface UTTypes { [Field ("UTTypeYAML")] UTType Yaml { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UTTypeCSS")] UTType Css { get; } @@ -291,7 +291,7 @@ interface UTTypes { [Field ("UTTypePHPScript")] UTType PhpScript { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Field ("UTTypeMakefile")] UTType Makefile { get; } @@ -358,18 +358,18 @@ interface UTTypes { [Field ("UTTypeHEIC")] UTType Heic { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UTTypeHEICS")] UTType Heics { get; } [Field ("UTTypeWebP")] UTType WebP { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UTTypeEXR")] UTType Exr { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UTTypeDNG")] UTType Dng { get; } @@ -508,7 +508,7 @@ interface UTTypes { [Field ("UTTypeAppleArchive")] UTType AppleArchive { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UTTypeTarArchive")] UTType TarArchive { get; } @@ -563,15 +563,15 @@ interface UTTypes { [Field ("UTTypeLog")] UTType Log { get; } - [Watch (10, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] + [TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), iOS (17, 0)] [Field ("UTTypeAHAP")] UTType Ahap { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UTTypeGeoJSON")] UTType GeoJson { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("UTTypeLinkPresentationMetadata")] UTType LinkPresentationMetadata { get; } @@ -581,7 +581,7 @@ interface UTTypes { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [Category] [BaseType (typeof (NSString))] interface NSString_UTAdditions { @@ -594,7 +594,7 @@ interface NSString_UTAdditions { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [Category] [BaseType (typeof (NSUrl))] interface NSUrl_UTAdditions { diff --git a/src/usernotifications.cs b/src/usernotifications.cs index 6be85755f165..44e9279ac6d6 100644 --- a/src/usernotifications.cs +++ b/src/usernotifications.cs @@ -12,14 +12,11 @@ using ObjCRuntime; using CoreGraphics; using CoreLocation; - -#if !WATCH using CoreMedia; -#endif using Intents; -#if MONOMAC || WATCH +#if MONOMAC using UIScene = Foundation.NSObject; #else using UIKit; @@ -71,7 +68,6 @@ public enum UNNotificationCategoryOptions : ulong { HiddenPreviewsShowTitle = (1 << 2), HiddenPreviewsShowSubtitle = (1 << 3), [iOS (13, 0)] - [Watch (6, 0)] [NoMac] [MacCatalyst (13, 1)] AllowAnnouncement = (1 << 4), @@ -83,11 +79,10 @@ public enum UNAuthorizationStatus : long { NotDetermined = 0, Denied, Authorized, - [Watch (5, 0)] [MacCatalyst (13, 1)] Provisional, [iOS (14, 0)] - [NoMac, NoWatch, NoTV] + [NoMac, NoTV] [MacCatalyst (14, 0)] Ephemeral, } @@ -102,7 +97,6 @@ public enum UNNotificationSetting : long { /// Enumerates the kinds of alerts that notifications display. [Unavailable (PlatformName.TvOS)] - [Unavailable (PlatformName.WatchOS)] [MacCatalyst (13, 1)] [Native] public enum UNAlertStyle : long { @@ -120,26 +114,21 @@ public enum UNAuthorizationOptions : ulong { Sound = (1 << 1), Alert = (1 << 2), CarPlay = (1 << 3), - [Watch (5, 0)] [MacCatalyst (13, 1)] CriticalAlert = (1 << 4), - [Watch (5, 0)] [MacCatalyst (13, 1)] ProvidesAppNotificationSettings = (1 << 5), - [Watch (5, 0)] [MacCatalyst (13, 1)] Provisional = (1 << 6), [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] [Deprecated (PlatformName.iOS, 15, 0, message: "Announcement is always included.")] [Deprecated (PlatformName.TvOS, 15, 0, message: "Announcement is always included.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Announcement is always included.")] [Deprecated (PlatformName.MacOSX, 15, 0, message: "Announcement is always included.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "Announcement is always included.")] Announcement = (1 << 7), - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] TimeSensitive = (1 << 8), } @@ -152,24 +141,21 @@ public enum UNNotificationPresentationOptions : ulong { Sound = (1 << 1), [Deprecated (PlatformName.iOS, 14, 0, message: "Use 'List | Banner' instead.")] [Deprecated (PlatformName.TvOS, 14, 0, message: "Use 'List | Banner' instead.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'List | Banner' instead.")] [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'List | Banner' instead.")] [Deprecated (PlatformName.MacCatalyst, 14, 0, message: "Use 'List | Banner' instead.")] Alert = (1 << 2), [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] List = (1 << 3), [iOS (14, 0)] [TV (14, 0)] - [Watch (7, 0)] [MacCatalyst (14, 0)] Banner = (1 << 4), } /// Enumerates times when notification previews are shown. - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Native] public enum UNShowPreviewsSetting : long { @@ -178,7 +164,7 @@ public enum UNShowPreviewsSetting : long { Never } - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [Native] public enum UNNotificationInterruptionLevel : long { #if XAMCORE_5_0 @@ -242,12 +228,12 @@ interface UNNotificationAction : NSCopying, NSSecureCoding { [Export ("actionWithIdentifier:title:options:")] UNNotificationAction FromIdentifier (string identifier, string title, UNNotificationActionOptions options); - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("actionWithIdentifier:title:options:icon:")] UNNotificationAction FromIdentifier (string identifier, string title, UNNotificationActionOptions options, [NullAllowed] UNNotificationActionIcon icon); - [Watch (8, 0), iOS (15, 0), MacCatalyst (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [NullAllowed, Export ("icon", ArgumentSemantic.Copy)] UNNotificationActionIcon Icon { get; } } @@ -265,7 +251,7 @@ interface UNTextInputNotificationAction { [Export ("actionWithIdentifier:title:options:textInputButtonTitle:textInputPlaceholder:")] UNTextInputNotificationAction FromIdentifier (string identifier, string title, UNNotificationActionOptions options, string textInputButtonTitle, string textInputPlaceholder); - [iOS (15, 0), MacCatalyst (15, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("actionWithIdentifier:title:options:icon:textInputButtonTitle:textInputPlaceholder:")] UNTextInputNotificationAction FromIdentifier (string identifier, string title, UNNotificationActionOptions options, [NullAllowed] UNNotificationActionIcon icon, string textInputButtonTitle, string textInputPlaceholder); @@ -338,10 +324,8 @@ interface UNNotificationAttachmentOptions { // can be either a CMTime or a NSNumber (in seconds). Exposing both options // in the strong dictionary because watchOS does not have CMTime or // CoreMedia framework at all. -#if !WATCH [Export ("ThumbnailTime")] CMTime ThumbnailTime { get; set; } -#endif // !WATCH [Export ("ThumbnailTime")] double ThumbnailTimeInSeconds { get; set; } @@ -368,7 +352,6 @@ interface UNNotificationCategory : NSCopying, NSSecureCoding { [Export ("options")] UNNotificationCategoryOptions Options { get; } - [NoWatch] [MacCatalyst (13, 1)] [Export ("hiddenPreviewsBodyPlaceholder")] string HiddenPreviewsBodyPlaceholder { get; } @@ -377,19 +360,16 @@ interface UNNotificationCategory : NSCopying, NSSecureCoding { [Export ("categoryWithIdentifier:actions:intentIdentifiers:options:")] UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction [] actions, string [] intentIdentifiers, UNNotificationCategoryOptions options); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:options:")] UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction [] actions, string [] intentIdentifiers, string hiddenPreviewsBodyPlaceholder, UNNotificationCategoryOptions options); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("categoryWithIdentifier:actions:intentIdentifiers:hiddenPreviewsBodyPlaceholder:categorySummaryFormat:options:")] UNNotificationCategory FromIdentifier (string identifier, UNNotificationAction [] actions, string [] intentIdentifiers, [NullAllowed] string hiddenPreviewsBodyPlaceholder, [NullAllowed] NSString categorySummaryFormat, UNNotificationCategoryOptions options); - [NoWatch] [MacCatalyst (13, 1)] [Export ("categorySummaryFormat")] string CategorySummaryFormat { get; } @@ -441,14 +421,14 @@ interface UNNotificationContent : NSCopying, NSMutableCopying, NSSecureCoding { [Export ("userInfo", ArgumentSemantic.Copy)] NSDictionary UserInfo { get; } - [NoWatch, NoTV] + [NoTV] [Deprecated (PlatformName.iOS, 15, 0, message: "This property is ignored.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "This property is ignored.")] [Export ("summaryArgument")] string SummaryArgument { get; } - [NoWatch, NoTV] + [NoTV] [Deprecated (PlatformName.iOS, 15, 0, message: "This property is ignored.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "This property is ignored.")] @@ -457,25 +437,24 @@ interface UNNotificationContent : NSCopying, NSMutableCopying, NSSecureCoding { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] // no direct mention in headers [MacCatalyst (13, 1)] [NullAllowed, Export ("targetContentIdentifier")] string TargetContentIdentifier { get; [NotImplemented] set; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("contentByUpdatingWithProvider:error:")] [return: NullAllowed] UNNotificationContent Update (IUNNotificationContentProviding fromProvider, [NullAllowed] out NSError outError); - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("interruptionLevel", ArgumentSemantic.Assign)] UNNotificationInterruptionLevel InterruptionLevel { get; } - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("relevanceScore")] double RelevanceScore { get; } - [Watch (9, 0), NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("filterCriteria")] [NullAllowed] string FilterCriteria { get; } @@ -524,14 +503,14 @@ interface UNMutableNotificationContent { [Export ("userInfo", ArgumentSemantic.Copy)] NSDictionary UserInfo { get; set; } - [NoWatch, NoTV] + [NoTV] [Deprecated (PlatformName.iOS, 15, 0, message: "This property is ignored.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "This property is ignored.")] [Export ("summaryArgument")] string SummaryArgument { get; set; } - [NoWatch, NoTV] + [NoTV] [Deprecated (PlatformName.iOS, 15, 0, message: "This property is ignored.")] [MacCatalyst (13, 1)] [Deprecated (PlatformName.MacCatalyst, 15, 0, message: "This property is ignored.")] @@ -540,20 +519,19 @@ interface UNMutableNotificationContent { [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] // no direct mention in headers [MacCatalyst (13, 1)] [NullAllowed, Export ("targetContentIdentifier")] string TargetContentIdentifier { get; set; } - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [Export ("interruptionLevel", ArgumentSemantic.Assign)] UNNotificationInterruptionLevel InterruptionLevel { get; set; } - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [Export ("relevanceScore")] double RelevanceScore { get; set; } - [TV (16, 0), Watch (9, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("filterCriteria")] string FilterCriteria { get; set; } } @@ -614,7 +592,7 @@ interface UNNotificationResponse : NSCopying, NSSecureCoding { [Wrap ("!IsDefaultAction && !IsDismissAction")] bool IsCustomAction { get; } - [iOS (13, 0), NoWatch, NoMac] + [iOS (13, 0), NoMac] [MacCatalyst (13, 1)] [NullAllowed, Export ("targetScene")] UIScene TargetScene { get; } @@ -636,7 +614,6 @@ interface UNTextInputNotificationResponse { /// Class for processing push notification payloads before delivery. /// Developers can use this class to, for example, replace a payload, download a large payload in parts, or etc. /// Apple documentation for UNNotificationServiceExtension - [Watch (6, 0)] [Unavailable (PlatformName.TvOS)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] @@ -663,7 +640,6 @@ interface UNNotificationSettings : NSCopying, NSSecureCoding { [Export ("soundSetting")] UNNotificationSetting SoundSetting { get; } - [Unavailable (PlatformName.WatchOS)] [Export ("badgeSetting")] UNNotificationSetting BadgeSetting { get; } @@ -676,49 +652,47 @@ interface UNNotificationSettings : NSCopying, NSSecureCoding { UNNotificationSetting NotificationCenterSetting { get; } [Unavailable (PlatformName.TvOS)] - [Unavailable (PlatformName.WatchOS)] [Export ("lockScreenSetting")] UNNotificationSetting LockScreenSetting { get; } - [NoWatch, NoTV, NoMac] + [NoTV, NoMac] [MacCatalyst (13, 1)] [Export ("carPlaySetting")] UNNotificationSetting CarPlaySetting { get; } [Unavailable (PlatformName.TvOS)] - [Unavailable (PlatformName.WatchOS)] [Export ("alertStyle")] UNAlertStyle AlertStyle { get; } - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("showPreviewsSetting")] UNShowPreviewsSetting ShowPreviewsSetting { get; } - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("criticalAlertSetting")] UNNotificationSetting CriticalAlertSetting { get; } - [Watch (5, 0), NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("providesAppNotificationSettings")] bool ProvidesAppNotificationSettings { get; } - [Watch (6, 0), NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("announcementSetting")] UNNotificationSetting AnnouncementSetting { get; } - [iOS (15, 0), MacCatalyst (15, 0), Watch (8, 0), TV (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [Export ("timeSensitiveSetting")] UNNotificationSetting TimeSensitiveSetting { get; } - [iOS (15, 0), MacCatalyst (15, 0), Watch (8, 0), TV (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [Export ("scheduledDeliverySetting")] UNNotificationSetting ScheduledDeliverySetting { get; } - [iOS (15, 0), MacCatalyst (15, 0), Watch (8, 0), TV (15, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [Export ("directMessagesSetting")] UNNotificationSetting DirectMessagesSetting { get; } } @@ -736,40 +710,35 @@ interface UNNotificationSound : NSCopying, NSSecureCoding { [Export ("defaultSound")] UNNotificationSound Default { get; } - [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (15, 2)] + [NoTV, NoMacCatalyst, NoMac, iOS (15, 2)] [Static] [Export ("defaultRingtoneSound", ArgumentSemantic.Copy)] UNNotificationSound DefaultRingtoneSound { get; } - [Unavailable (PlatformName.WatchOS)] [Static] [Export ("soundNamed:")] UNNotificationSound GetSound (string name); - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] [Export ("defaultCriticalSound", ArgumentSemantic.Copy)] UNNotificationSound DefaultCriticalSound { get; } - [Watch (5, 0)] [MacCatalyst (13, 1)] [Static] [Export ("defaultCriticalSoundWithAudioVolume:")] UNNotificationSound GetDefaultCriticalSound (float volume); - [NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (15, 2)] + [NoTV, NoMacCatalyst, NoMac, iOS (15, 2)] [Static] [Export ("ringtoneSoundNamed:")] UNNotificationSound GetRingtoneSound (string name); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("criticalSoundNamed:")] UNNotificationSound GetCriticalSound (string name); - [NoWatch] [MacCatalyst (13, 1)] [Static] [Export ("criticalSoundNamed:withAudioVolume:")] @@ -838,7 +807,6 @@ interface UNLocationNotificationTrigger { [Export ("region", ArgumentSemantic.Copy)] CLRegion Region { get; } - [Watch (8, 0)] [Static] [Export ("triggerWithRegion:repeats:")] UNLocationNotificationTrigger CreateTrigger (CLRegion region, bool repeats); @@ -858,7 +826,7 @@ interface UNUserNotificationCenterDelegate { [Export ("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")] void DidReceiveNotificationResponse (UNUserNotificationCenter center, UNNotificationResponse response, Action completionHandler); - [NoWatch, NoTV] + [NoTV] [MacCatalyst (13, 1)] [Export ("userNotificationCenter:openSettingsForNotification:")] void OpenSettings (UNUserNotificationCenter center, [NullAllowed] UNNotification notification); @@ -924,12 +892,12 @@ interface UNUserNotificationCenter { void RemoveAllDeliveredNotifications (); [Async] - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("setBadgeCount:withCompletionHandler:")] void SetBadgeCount (nint newBadgeCount, [NullAllowed] Action completionHandler); } - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UNNotificationActionIcon : NSCopying, NSSecureCoding { @@ -944,12 +912,12 @@ interface UNNotificationActionIcon : NSCopying, NSSecureCoding { interface IUNNotificationContentProviding { } - [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0), Watch (8, 0)] + [iOS (15, 0), MacCatalyst (15, 0), TV (15, 0)] [Protocol] interface UNNotificationContentProviding { } - [Watch (11, 0), NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface UNNotificationAttributedMessageContext : UNNotificationContentProviding { diff --git a/src/usernotificationsui.cs b/src/usernotificationsui.cs index b928950cbc28..4d125ea44ca5 100644 --- a/src/usernotificationsui.cs +++ b/src/usernotificationsui.cs @@ -23,7 +23,6 @@ namespace UserNotificationsUI { /// Enumerates the kinds of media control button sets that the system will provide for playable notification content. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Native] public enum UNNotificationContentExtensionMediaPlayPauseButtonType : ulong { @@ -34,7 +33,6 @@ public enum UNNotificationContentExtensionMediaPlayPauseButtonType : ulong { /// Enumerates preferred notification responses. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Native] public enum UNNotificationContentExtensionResponseOption : ulong { @@ -47,7 +45,6 @@ interface IUNNotificationContentExtension { } /// Interface that contains the mandatory methods, if any, for the protocol, which is required for displaying notification content from a view controller's view with custom UI. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Protocol] interface UNNotificationContentExtension { @@ -77,7 +74,6 @@ interface UNNotificationContentExtension { /// Content extension for presenting notification UI, including UI for playable content. [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Unavailable (PlatformName.WatchOS)] [Unavailable (PlatformName.TvOS)] [Category] [BaseType (typeof (NSExtensionContext))] diff --git a/src/videosubscriberaccount.cs b/src/videosubscriberaccount.cs index 4e1d3b7d7649..79d6ca88a5d6 100644 --- a/src/videosubscriberaccount.cs +++ b/src/videosubscriberaccount.cs @@ -26,7 +26,6 @@ namespace VideoSubscriberAccount { /// Encapsulates errors that may occur during attempts to verify credentials. [Native] - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [ErrorDomain ("VSErrorDomain")] public enum VSErrorCode : long { @@ -42,7 +41,6 @@ public enum VSErrorCode : long { /// Enumerates the types of access the app has to the user's subscription. [Native] - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] public enum VSAccountAccessStatus : long { NotDetermined = 0, @@ -85,7 +83,6 @@ public enum VSOriginatingDeviceCategory : long { } - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [Static] [Internal] @@ -105,7 +102,6 @@ interface VSErrorInfoKeys { } [NoMacCatalyst] - [Unavailable (PlatformName.WatchOS)] [StrongDictionary ("VSErrorInfoKeys")] interface VSErrorInfo { @@ -128,7 +124,6 @@ interface IVSAccountManagerDelegate { } /// Apple documentation for VSAccountManagerDelegate [Protocol, Model] - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface VSAccountManagerDelegate { @@ -158,7 +153,6 @@ interface VSAccountManagerDelegate { /// Coordinates access to the user's subscription. /// /// Apple documentation for VSAccountManager - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface VSAccountManager { @@ -183,7 +177,6 @@ interface VSAccountManager { NSString OpenTVProviderSettingsUrl { get; } } - [Unavailable (PlatformName.WatchOS)] [Static] [Internal] [NoMacCatalyst] @@ -194,7 +187,6 @@ interface VSCheckAccessOptionKeys { } /// A holding keys appropriate to and . - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [StrongDictionary ("VSCheckAccessOptionKeys")] interface VSAccountManagerAccessOptions { @@ -206,7 +198,6 @@ interface VSAccountManagerAccessOptions { /// Represents a cancellable request that is still "in flight". /// /// Apple documentation for VSAccountManagerResult - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -219,7 +210,6 @@ interface VSAccountManagerResult { /// Information about a subscription. /// /// Apple documentation for VSAccountMetadata - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface VSAccountMetadata { @@ -243,7 +233,6 @@ interface VSAccountMetadata { /// Specifies information being requested from the subscriber's account. /// /// Apple documentation for VSAccountMetadataRequest - [Unavailable (PlatformName.WatchOS)] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface VSAccountMetadataRequest { @@ -448,7 +437,7 @@ interface VSUserAccount { [Export ("deviceCategory")] VSOriginatingDeviceCategory DeviceCategory { get; } - [TV (17, 4), NoWatch, NoMacCatalyst, Mac (14, 4), iOS (17, 4)] + [TV (17, 4), NoMacCatalyst, Mac (14, 4), iOS (17, 4)] [NullAllowed, Export ("appleSubscription", ArgumentSemantic.Strong)] VSAppleSubscription AppleSubscription { get; set; } @@ -456,7 +445,7 @@ interface VSUserAccount { NativeHandle Constructor (VSUserAccountType accountType, [NullAllowed] NSUrl url); } - [TV (17, 4), NoWatch, NoMacCatalyst, Mac (14, 4), iOS (17, 4)] + [TV (17, 4), NoMacCatalyst, Mac (14, 4), iOS (17, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VSAppleSubscription { diff --git a/src/videotoolbox.cs b/src/videotoolbox.cs index 01b50f7e1099..951c82320274 100644 --- a/src/videotoolbox.cs +++ b/src/videotoolbox.cs @@ -81,7 +81,7 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_Depth")] NSString Depth { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Field ("kVTCompressionPropertyKey_PreserveAlphaChannel")] NSString PreserveAlphaChannel { get; } @@ -109,7 +109,7 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_ExpectedFrameRate")] NSString ExpectedFrameRate { get; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kVTCompressionPropertyKey_MaximumRealTimeFrameRate")] NSString MaximumRealTimeFrameRate { get; } @@ -126,11 +126,11 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_BaseLayerFrameRate")] NSString BaseLayerFrameRate { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Field ("kVTCompressionPropertyKey_ReferenceBufferCount")] NSString ReferenceBufferCount { get; } - [Mac (14, 4), iOS (17, 4), TV (17, 4), MacCatalyst (17, 4), NoWatch] + [Mac (14, 4), iOS (17, 4), TV (17, 4), MacCatalyst (17, 4)] [Field ("kVTCompressionPropertyKey_CalculateMeanSquaredError")] NSString CalculateMeanSquaredError { get; } @@ -211,15 +211,15 @@ interface VTCompressionPropertyKey { [MacCatalyst (13, 1)] NSString EncoderId { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (14, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] [Field ("kVTCompressionPropertyKey_RecommendedParallelizationLimit")] NSString RecommendedParallelizationLimit { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (14, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] [Field ("kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumFrameCount")] NSString RecommendedParallelizedSubdivisionMinimumFrameCount { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (14, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] [Field ("kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumDuration")] NSString RecommendedParallelizedSubdivisionMinimumDuration { get; } @@ -228,7 +228,7 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_UsingGPURegistryID")] NSString UsingGpuRegistryId { get; } - [Watch (7, 0), TV (14, 0), iOS (14, 0)] + [TV (14, 0), iOS (14, 0)] [MacCatalyst (14, 0)] [Field ("kVTCompressionPropertyKey_HDRMetadataInsertionMode")] NSString HdrMetadataInsertionMode { get; } @@ -238,11 +238,11 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality")] NSString PrioritizeEncodingSpeedOverQuality { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Field ("kVTCompressionPropertyKey_ConstantBitRate")] NSString ConstantBitRate { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Field ("kVTCompressionPropertyKey_EstimatedAverageBytesPerFrame")] NSString EstimatedAverageBytesPerFrame { get; } @@ -270,7 +270,7 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_MaxAllowedFrameQP")] NSString MaxAllowedFrameQP { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Field ("kVTCompressionPropertyKey_MinAllowedFrameQP")] NSString MinAllowedFrameQP { get; } @@ -278,59 +278,59 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_SupportsBaseFrameQP")] NSString SupportsBaseFrameQP { get; } - [Watch (8, 5), TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] + [TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] [Field ("kVTCompressionPropertyKey_OutputBitDepth")] NSString OutputBitDepth { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kVTCompressionPropertyKey_ProjectionKind")] NSString ProjectionKind { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("kVTCompressionPropertyKey_ViewPackingKind")] NSString ViewPackingKind { get; } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Field ("kVTCompressionPropertyKey_SuggestedLookAheadFrameCount")] NSString SuggestedLookAheadFrameCount { get; } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Field ("kVTCompressionPropertyKey_SpatialAdaptiveQPLevel")] NSString SpatialAdaptiveQPLevel { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_MVHEVCVideoLayerIDs")] NSString MvHevcVideoLayerIds { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_MVHEVCViewIDs")] NSString MvHevcViewIds { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_MVHEVCLeftAndRightViewIDs")] NSString MvHevcLeftAndRightViewIds { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_HeroEye")] NSString HeroEye { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_StereoCameraBaseline")] NSString StereoCameraBaseline { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_HorizontalDisparityAdjustment")] NSString HorizontalDisparityAdjustment { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_HasLeftStereoEyeView")] NSString HasLeftStereoEyeView { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_HasRightStereoEyeView")] NSString HasRightStereoEyeView { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_HorizontalFieldOfView")] NSString HorizontalFieldOfView { get; } @@ -391,7 +391,7 @@ interface VTCompressionProperties { [Export ("Depth")] CMPixelFormat Depth { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("PreserveAlphaChannel")] bool PreserveAlphaChannel { get; set; } @@ -415,7 +415,7 @@ interface VTCompressionProperties { [Export ("ExpectedFrameRate")] double ExpectedFrameRate { get; set; } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("MaximumRealTimeFrameRate")] double MaximumRealTimeFrameRate { get; } @@ -426,11 +426,11 @@ interface VTCompressionProperties { [Export ("BaseLayerFrameRate")] double BaseLayerFrameRate { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("ReferenceBufferCount")] long ReferenceBufferCount { get; } - [Mac (14, 4), iOS (17, 4), TV (17, 4), MacCatalyst (17, 4), NoWatch] + [Mac (14, 4), iOS (17, 4), TV (17, 4), MacCatalyst (17, 4)] [Export ("CalculateMeanSquaredError")] bool CalculateMeanSquaredError { get; } @@ -470,15 +470,15 @@ interface VTCompressionProperties { [Export ("EncoderId")] string EncoderId { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (14, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] [Export ("RecommendedParallelizationLimit")] int RecommendedParallelizationLimit { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (14, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] [Export ("RecommendedParallelizedSubdivisionMinimumFrameCount")] ulong RecommendedParallelizedSubdivisionMinimumFrameCount { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (14, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] [Export ("RecommendedParallelizedSubdivisionMinimumDuration")] NSDictionary RecommendedParallelizedSubdivisionMinimumDuration { get; } @@ -497,11 +497,11 @@ interface VTCompressionProperties { [Export ("UsingGpuRegistryId")] uint UsingGpuRegistryId { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("ConstantBitRate")] long ConstantBitRate { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("EstimatedAverageBytesPerFrame")] long EstimatedAverageBytesPerFrame { get; } @@ -513,89 +513,88 @@ interface VTCompressionProperties { [TV (14, 5)] [iOS (14, 5)] - [NoWatch] [MacCatalyst (14, 5)] [Export ("EnableLowLatencyRateControl")] bool EnableLowLatencyRateControl { get; set; } - [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("BaseLayerBitRateFraction")] float BaseLayerBitRateFraction { get; set; } - [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("EnableLtr")] bool EnableLtr { get; set; } - [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("MaxAllowedFrameQP")] uint MaxAllowedFrameQP { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Export ("MinAllowedFrameQP")] uint MinAllowedFrameQP { get; } - [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0), NoWatch] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("SupportsBaseFrameQP")] bool SupportsBaseFrameQP { get; } - [Watch (8, 5), TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] + [TV (15, 4), Mac (12, 3), iOS (15, 4), MacCatalyst (15, 4)] [Export ("OutputBitDepth")] bool OutputBitDepth { get; set; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("ProjectionKind")] CMFormatDescriptionProjectionKind /* NSString */ ProjectionKind { get; } - [NoWatch, NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("ViewPackingKind")] CMFormatDescriptionViewPackingKind /* NSString */ ViewPackingKind { get; } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("SuggestedLookAheadFrameCount")] nint /* NSNumber */ SuggestedLookAheadFrameCount { get; } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("SpatialAdaptiveQPLevel")] VTQPModulationLevel /* NSNumber */ SpatialAdaptiveQPLevel { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("MvHevcVideoLayerIds")] NSNumber [] MvHevcVideoLayerIds { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("MvHevcViewIds")] NSNumber [] MvHevcViewIds { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("MvHevcLeftAndRightViewIds")] NSNumber [] MvHevcLeftAndRightViewIds { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HeroEye")] string HeroEye { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("StereoCameraBaseline")] uint StereoCameraBaseline { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HorizontalDisparityAdjustment")] int HorizontalDisparityAdjustment { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HasLeftStereoEyeView")] bool HasLeftStereoEyeView { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HasRightStereoEyeView")] bool HasRightStereoEyeView { get; } - [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0), NoWatch] + [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HorizontalFieldOfView")] uint HorizontalFieldOfView { get; } } - [NoWatch, NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] + [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] public enum VTQPModulationLevel { Default = -1, Disable = 0, @@ -911,13 +910,13 @@ interface VTSampleAttachmentKey { [Field ("kVTSampleAttachmentKey_RequireLTRAcknowledgementToken")] NSString RequireLtrAcknowledgementToken { get; } - [iOS (17, 4), TV (17, 4), NoWatch, Mac (14, 4), MacCatalyst (17, 4)] + [iOS (17, 4), TV (17, 4), Mac (14, 4), MacCatalyst (17, 4)] [Field ("kVTSampleAttachmentKey_QualityMetrics")] NSString QualityMetrics { get; } } [Static] - [iOS (17, 4), TV (17, 4), NoWatch, Mac (14, 4), MacCatalyst (17, 4)] + [iOS (17, 4), TV (17, 4), Mac (14, 4), MacCatalyst (17, 4)] interface VTSampleAttachmentQualityMetricsKey { [Field ("kVTSampleAttachmentQualityMetricsKey_LumaMeanSquaredError")] NSString LumaMeanSquaredError { get; } @@ -1072,15 +1071,15 @@ interface VTDecompressionPropertyKey { [Field ("kVTDecompressionPropertyKey_AllowBitstreamToChangeFrameDimensions")] NSString AllowBitstreamToChangeFrameDimensions { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (15, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (15, 0)] [Field ("kVTDecompressionPropertyKey_DecoderProducesRAWOutput")] NSString DecoderProducesRawOutput { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (15, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (15, 0)] [Field ("kVTDecompressionPropertyKey_RequestRAWOutput")] NSString RequestRawWOutput { get; } - [iOS (17, 0), NoTV, NoWatch, Mac (14, 0), MacCatalyst (17, 0)] + [iOS (17, 0), NoTV, Mac (14, 0), MacCatalyst (17, 0)] [Field ("kVTDecompressionPropertyKey_RequestedMVHEVCVideoLayerIDs")] NSString RequestedMvHevcVideoLayerIds { get; } } @@ -1182,14 +1181,14 @@ interface VTDecompressionProperties { bool AllowBitstreamToChangeFrameDimensions { get; } [Export ("DecoderProducesRawOutput")] - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (15, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (15, 0)] bool DecoderProducesRawOutput { get; } [Export ("RequestRawWOutput")] - [NoiOS, NoTV, NoWatch, NoMacCatalyst, Mac (15, 0)] + [NoiOS, NoTV, NoMacCatalyst, Mac (15, 0)] bool RequestRawWOutput { get; } - [iOS (17, 0), NoTV, NoWatch, Mac (14, 0), MacCatalyst (17, 0)] + [iOS (17, 0), NoTV, Mac (14, 0), MacCatalyst (17, 0)] [Export ("RequestedMvHevcVideoLayerIds")] NSNumber [] RequestedMvHevcVideoLayerIds { get; } } @@ -1512,7 +1511,7 @@ interface VTPixelTransferPropertyKeys { NSString RealTime { get; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [StrongDictionary ("VTPixelRotationPropertyKeys")] interface VTPixelRotationProperties { [Export ("FlipHorizontalOrientation")] @@ -1522,7 +1521,7 @@ interface VTPixelRotationProperties { bool FlipVerticalOrientation { get; set; } } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), Watch (9, 0), TV (16, 0)] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] [Static] [Advanced] interface VTPixelRotationPropertyKeys { @@ -1543,13 +1542,13 @@ interface VTPixelRotationPropertyKeys { NSString FlipVerticalOrientation { get; } } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] public enum VTHdrPerFrameMetadataGenerationHdrFormatType { [Field ("kVTHDRPerFrameMetadataGenerationHDRFormatType_DolbyVision")] DolbyVision, } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Static] interface VTHdrPerFrameMetadataGenerationOptionsKey { [Field ("kVTHDRPerFrameMetadataGenerationOptionsKey_HDRFormats")] @@ -1557,14 +1556,14 @@ interface VTHdrPerFrameMetadataGenerationOptionsKey { } - [NoWatch, TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [StrongDictionary ("VTHdrPerFrameMetadataGenerationOptionsKey")] interface VTHdrPerFrameMetadataGenerationOptions { [Export ("HdrFormats")] VTHdrPerFrameMetadataGenerationHdrFormatType HdrFormats { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Static] interface VTExtensionPropertiesKey { [Field ("kVTExtensionProperties_ExtensionIdentifierKey")] @@ -1586,7 +1585,7 @@ interface VTExtensionPropertiesKey { NSString CodecName { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [StrongDictionary ("VTExtensionPropertiesKey")] interface VTDecoderExtensionProperties { [Export ("ExtensionIdentifier")] @@ -1608,7 +1607,7 @@ interface VTDecoderExtensionProperties { string CodecName { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Static] interface VTRawProcessingParameterKey { [Field ("kVTRAWProcessingParameter_Key")] @@ -1651,7 +1650,7 @@ interface VTRawProcessingParameterKey { NSString CurrentValue { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Static] interface VTRawProcessingParameterListElementKey { [Field ("kVTRAWProcessingParameterListElement_Label")] @@ -1664,7 +1663,7 @@ interface VTRawProcessingParameterListElementKey { NSString ListElementId { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [StrongDictionary ("VTRawProcessingParameterListElementKey")] interface VTRawProcessingParametersListElement { [Export ("Label")] @@ -1677,7 +1676,7 @@ interface VTRawProcessingParametersListElement { nint ListElementId { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Static] interface VTRawProcessingParameterValueTypeKey { [Field ("kVTRAWProcessingParameterValueType_Boolean")] @@ -1696,7 +1695,7 @@ interface VTRawProcessingParameterValueTypeKey { NSString SubGroup { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [StrongDictionary ("VTRawProcessingParameterValueTypeKey")] interface VTRawProcessingParameterValueType { [Export ("Boolean")] @@ -1715,7 +1714,7 @@ interface VTRawProcessingParameterValueType { NSDictionary SubGroup { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [StrongDictionary ("VTRawProcessingParameterKey")] interface VTRawProcessingParameters { [Export ("Key")] @@ -1760,7 +1759,7 @@ interface VTRawProcessingParameters { NSObject CurrentValue { get; set; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [Static] interface VTRawProcessingPropertyKey { [Field ("kVTRAWProcessingPropertyKey_MetalDeviceRegistryID")] @@ -1770,7 +1769,7 @@ interface VTRawProcessingPropertyKey { NSString OutputColorAttachments { get; } } - [NoWatch, NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] + [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] [StrongDictionary ("VTRawProcessingPropertyKey", Suffix = "")] interface VTRawProcessingProperty { ulong MetalDeviceRegistryId { get; set; } @@ -1784,12 +1783,12 @@ interface VTSampleAttachments { [TV (15, 0), Mac (12, 0), iOS (15, 0), MacCatalyst (15, 0)] NSNumber RequireLtrAcknowledgementToken { get; set; } - [iOS (17, 4), TV (17, 4), NoWatch, Mac (14, 4), MacCatalyst (17, 4)] + [iOS (17, 4), TV (17, 4), Mac (14, 4), MacCatalyst (17, 4)] VTSampleAttachmentQualityMetrics QualityMetrics { get; } } [StrongDictionary ("VTSampleAttachmentQualityMetricsKey", Suffix = "")] - [iOS (17, 4), TV (17, 4), NoWatch, Mac (14, 4), MacCatalyst (17, 4)] + [iOS (17, 4), TV (17, 4), Mac (14, 4), MacCatalyst (17, 4)] interface VTSampleAttachmentQualityMetrics { // This can be either CFNumber or CFArray, so we have to bind it as NSObject NSObject LumaMeanSquaredError { get; } diff --git a/src/visionkit.cs b/src/visionkit.cs index c3bbac603408..37510bf0c8a6 100644 --- a/src/visionkit.cs +++ b/src/visionkit.cs @@ -14,7 +14,7 @@ namespace VisionKit { - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -30,7 +30,7 @@ interface VNDocumentCameraScan { string Title { get; } } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (UIViewController))] interface VNDocumentCameraViewController { @@ -51,7 +51,7 @@ interface VNDocumentCameraViewController { interface IVNDocumentCameraViewControllerDelegate { } - [NoWatch, NoTV, NoMac, iOS (13, 0)] + [NoTV, NoMac, iOS (13, 0)] [MacCatalyst (13, 1)] #if NET [Protocol, Model] diff --git a/src/watchconnectivity.cs b/src/watchconnectivity.cs index b0008b8abc06..fa6404445fbb 100644 --- a/src/watchconnectivity.cs +++ b/src/watchconnectivity.cs @@ -41,7 +41,6 @@ interface WCSession { [Export ("activateSession")] void ActivateSession (); -#if !WATCH [Export ("paired")] bool Paired { [Bind ("isPaired")] get; } @@ -54,7 +53,6 @@ interface WCSession { [Export ("watchDirectoryURL")] [NullAllowed] NSUrl WatchDirectoryUrl { get; } -#endif [Export ("reachable")] bool Reachable { [Bind ("isReachable")] get; } @@ -81,10 +79,8 @@ interface WCSession { [Export ("transferUserInfo:")] WCSessionUserInfoTransfer TransferUserInfo (NSDictionary userInfo); -#if !WATCH [Export ("transferCurrentComplicationUserInfo:")] WCSessionUserInfoTransfer TransferCurrentComplicationUserInfo (NSDictionary userInfo); -#endif [Export ("outstandingUserInfoTransfers", ArgumentSemantic.Copy)] WCSessionUserInfoTransfer [] OutstandingUserInfoTransfers { get; } @@ -104,11 +100,9 @@ interface WCSession { [Export ("hasContentPending")] bool HasContentPending { get; } - [NoWatch] [Export ("remainingComplicationUserInfoTransfers")] nuint RemainingComplicationUserInfoTransfers { get; } - [Watch (6, 0)] [NoiOS] [Export ("companionAppInstalled")] bool CompanionAppInstalled { [Bind ("isCompanionAppInstalled")] get; } @@ -128,11 +122,8 @@ interface IWCSessionDelegate { } [Protocol, Model] [BaseType (typeof (NSObject))] interface WCSessionDelegate { - -#if !WATCH [Export ("sessionWatchStateDidChange:")] void SessionWatchStateDidChange (WCSession session); -#endif [Export ("sessionReachabilityDidChange:")] void SessionReachabilityDidChange (WCSession session); @@ -173,18 +164,15 @@ interface WCSessionDelegate { #if NET [Abstract] // OS 10 beta 1 SDK made this required #endif - [NoWatch] [Export ("sessionDidBecomeInactive:")] void DidBecomeInactive (WCSession session); #if NET [Abstract] // OS 10 beta 1 SDK made this required #endif - [NoWatch] [Export ("sessionDidDeactivate:")] void DidDeactivate (WCSession session); - [Watch (6, 0)] [NoiOS] [Export ("sessionCompanionAppInstalledDidChange:")] void CompanionAppInstalledDidChange (WCSession session); @@ -221,7 +209,6 @@ interface WCSessionFileTransfer { [Export ("cancel")] void Cancel (); - [Watch (5, 0)] [Export ("progress")] NSProgress Progress { get; } } @@ -233,10 +220,8 @@ interface WCSessionFileTransfer { [DisableDefaultCtor] // no handle, doc: You do not create instances of this class yourself. interface WCSessionUserInfoTransfer : NSSecureCoding { -#if !WATCH [Export ("currentComplicationInfo")] bool CurrentComplicationInfo { [Bind ("isCurrentComplicationInfo")] get; } -#endif [Export ("userInfo", ArgumentSemantic.Copy)] NSDictionary UserInfo { get; } diff --git a/src/watchkit.cs b/src/watchkit.cs deleted file mode 100644 index a71267ef0be1..000000000000 --- a/src/watchkit.cs +++ /dev/null @@ -1,1887 +0,0 @@ -// -// This file describes the API that the generator will produce -// -// Authors: -// Miguel de Icaza -// -// Copyright 2014-2016, Xamarin Inc. -// Copyright 2019 Microsoft Corporation -// -// -using ObjCRuntime; -using Foundation; -using CloudKit; -using CoreGraphics; -using CoreLocation; -using HealthKit; -using HomeKit; -using Intents; -using PassKit; -using SpriteKit; -using SceneKit; -using UIKit; -using MapKit; -using UserNotifications; -using System; -using System.ComponentModel; - -#if !NET -using NativeHandle = System.IntPtr; -#endif - -namespace WatchKit { - [Unavailable (PlatformName.iOS)] - [BaseType (typeof (NSObject))] - [Abstract] // To use this class, subclass it - [DisableDefaultCtor] // DesignatedInitializer below - interface WKInterfaceController { - - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("awakeWithContext:")] - void Awake ([NullAllowed] NSObject context); - - [Export ("contentFrame")] - CGRect ContentFrame { get; } - - // The super implementation of this method does nothing. - [Export ("willActivate")] - void WillActivate (); - - // The super implementation of this method does nothing. - [Export ("didDeactivate")] - void DidDeactivate (); - - [Export ("didAppear")] - void DidAppear (); - - [Export ("willDisappear")] - void WillDisappear (); - - [Export ("table:didSelectRowAtIndex:")] - void DidSelectRow (WKInterfaceTable table, nint rowIndex); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("handleActionWithIdentifier:forRemoteNotification:")] - void HandleRemoteNotificationAction ([NullAllowed] string identifier, NSDictionary remoteNotification); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("handleActionWithIdentifier:forLocalNotification:")] - void HandleLocalNotificationAction ([NullAllowed] string identifier, UILocalNotification localNotification); - - [NoWatch] - [Export ("handleActionWithIdentifier:forNotification:")] - void HandleAction ([NullAllowed] string identifier, UNNotification notification); - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'WKExtensionDelegate.HandleUserActivity' instead.")] - [Export ("handleUserActivity:")] - // This NSDictionary is OK, it is arbitrary and user specific - void HandleUserActivity ([NullAllowed] NSDictionary userActivity); - - [Export ("setTitle:")] - void SetTitle ([NullAllowed] string title); - - [ThreadSafe (false)] - [Export ("pushControllerWithName:context:")] - void PushController (string name, [NullAllowed] NSObject context); - - [ThreadSafe (false)] - [Export ("popController")] - void PopController (); - - [ThreadSafe (false)] - [Export ("popToRootController")] - void PopToRootController (); - - [ThreadSafe (false)] - [Export ("becomeCurrentPage")] - void BecomeCurrentPage (); - - [ThreadSafe (false)] - [Export ("presentControllerWithName:context:")] - void PresentController (string name, [NullAllowed] NSObject context); - - [ThreadSafe (false)] - [Export ("presentControllerWithNames:contexts:")] - void PresentController (string [] names, [NullAllowed] NSObject [] contexts); - - [ThreadSafe (false)] - [Export ("dismissController")] - void DismissController (); - - [Export ("dismissTextInputController")] - void DismissTextInputController (); - - [return: NullAllowed] - [Export ("contextForSegueWithIdentifier:")] - NSObject GetContextForSegue (string segueIdentifier); - - [return: NullAllowed] - [Export ("contextsForSegueWithIdentifier:")] - NSObject [] GetContextsForSegue (string segueIdentifier); - - [return: NullAllowed] - [Export ("contextForSegueWithIdentifier:inTable:rowIndex:")] - NSObject GetContextForSegue (string segueIdentifier, WKInterfaceTable table, nint rowIndex); - - [return: NullAllowed] - [Export ("contextsForSegueWithIdentifier:inTable:rowIndex:")] - NSObject [] GetContextsForSegue (string segueIdentifier, WKInterfaceTable table, nint rowIndex); - - [Deprecated (PlatformName.WatchOS, 7, 0)] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("addMenuItemWithImage:title:action:")] - void AddMenuItem (UIImage image, string title, Selector action); - - [Deprecated (PlatformName.WatchOS, 7, 0)] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("addMenuItemWithImageNamed:title:action:")] - void AddMenuItem (string imageName, string title, Selector action); - - [Deprecated (PlatformName.WatchOS, 7, 0)] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("addMenuItemWithItemIcon:title:action:")] - void AddMenuItem (WKMenuItemIcon itemIcon, string title, Selector action); - - [Deprecated (PlatformName.WatchOS, 7, 0)] - [Export ("clearAllMenuItems")] - void ClearAllMenuItems (); - - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'UpdateUserActivity(NSUserActivity)' instead.")] - [Export ("updateUserActivity:userInfo:webpageURL:")] - // This NSDictionary is OK, it is arbitrary and user specific - void UpdateUserActivity (string type, [NullAllowed] NSDictionary userInfo, [NullAllowed] NSUrl webpageURL); - - [Watch (5, 0)] - [Export ("updateUserActivity:")] - void UpdateUserActivity (NSUserActivity userActivity); - - [Export ("invalidateUserActivity")] - void InvalidateUserActivity (); - - [ThreadSafe (false)] - [Export ("presentTextInputControllerWithSuggestions:allowedInputMode:completion:")] - [Async] - void PresentTextInputController ([NullAllowed] string [] suggestions, WKTextInputMode inputMode, Action completion); - - [Export ("presentTextInputControllerWithSuggestionsForLanguage:allowedInputMode:completion:")] - [Async] - void PresentTextInputController ([NullAllowed] Func suggestionsHandler, WKTextInputMode inputMode, Action completion); - - [NoWatch] - [Static, Export ("openParentApplication:reply:")] - bool OpenParentApplication (NSDictionary userInfo, [NullAllowed] Action reply); - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ReloadRootPageControllers' instead.")] - [Static, Export ("reloadRootControllersWithNames:contexts:")] - void ReloadRootControllers (string [] names, [NullAllowed] NSObject [] contexts); - - [Static] - [Export ("reloadRootPageControllersWithNames:contexts:orientation:pageIndex:")] - void ReloadRootPageControllers (string [] names, [NullAllowed] NSObject [] contexts, WKPageOrientation orientation, nint pageIndex); - - [Export ("dismissMediaPlayerController")] - void DismissMediaPlayerController (); - - [Export ("presentAudioRecorderControllerWithOutputURL:preset:options:completion:")] - [Async] - void PresentAudioRecorderController (NSUrl outputUrl, WKAudioRecorderPreset preset, [NullAllowed] NSDictionary options, Action completion); - - [Export ("dismissAudioRecorderController")] - void DismissAudioRecorderController (); - - [Export ("animateWithDuration:animations:")] - void AnimateWithDuration (double duration, Action animations); - - [Export ("presentAlertControllerWithTitle:message:preferredStyle:actions:")] - void PresentAlertController ([NullAllowed] string title, [NullAllowed] string message, WKAlertControllerStyle preferredStyle, WKAlertAction [] actions); - - [Export ("presentAddPassesControllerWithPasses:completion:")] - [Async] - void PresentAddPassesController (PKPass [] passes, Action completion); - - [Export ("dismissAddPassesController")] - void DismissAddPassesController (); - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Glances support was removed.")] - [Export ("beginGlanceUpdates")] - void BeginGlanceUpdates (); - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Glances support was removed.")] - [Export ("endGlanceUpdates")] - void EndGlanceUpdates (); - - [Export ("pickerDidFocus:")] - void PickerDidFocus (WKInterfacePicker picker); - - [Export ("pickerDidResignFocus:")] - void PickerDidResignFocus (WKInterfacePicker picker); - - [Export ("pickerDidSettle:")] - void PickerDidSettle (WKInterfacePicker picker); - -#if WATCH - [Export ("presentMediaPlayerControllerWithURL:options:completion:")] - [Async (ResultType = typeof (WKPresentMediaPlayerResult))] - void PresentMediaPlayerController (NSUrl url, [NullAllowed] NSDictionary options, Action completion); -#endif - - [Export ("crownSequencer", ArgumentSemantic.Strong)] - WKCrownSequencer CrownSequencer { get; } - - [Export ("scrollToObject:atScrollPosition:animated:")] - void ScrollTo (WKInterfaceObject @object, WKInterfaceScrollPosition scrollPosition, bool animated); - - [Export ("interfaceDidScrollToTop")] - void InterfaceDidScrollToTop (); - - [Export ("interfaceOffsetDidScrollToTop")] - void InterfaceOffsetDidScrollToTop (); - - [Export ("interfaceOffsetDidScrollToBottom")] - void InterfaceOffsetDidScrollToBottom (); - - [Watch (5, 0)] - [Export ("contentSafeAreaInsets")] - UIEdgeInsets ContentSafeAreaInsets { get; } - - [Watch (5, 0)] - [Export ("systemMinimumLayoutMargins")] - NSDirectionalEdgeInsets SystemMinimumLayoutMargins { get; } - - [Watch (5, 0)] - [Export ("tableScrollingHapticFeedbackEnabled")] - bool TableScrollingHapticFeedbackEnabled { [Bind ("isTableScrollingHapticFeedbackEnabled")] get; set; } - } - - [Unavailable (PlatformName.iOS)] - [BaseType (typeof (WKInterfaceController))] - [DisableDefaultCtor] // DesignatedInitializer below - interface WKUserNotificationInterfaceController { - - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'DidReceiveNotification' instead.")] - [Export ("didReceiveRemoteNotification:withCompletion:")] - void DidReceiveRemoteNotification (NSDictionary remoteNotification, Action completionHandler); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'DidReceiveNotification' instead.")] - [Export ("didReceiveLocalNotification:withCompletion:")] - void DidReceiveLocalNotification (UILocalNotification localNotification, Action completionHandler); - - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'DidReceiveNotification(UNNotification)' instead.")] - [Export ("didReceiveNotification:withCompletion:")] - void DidReceiveNotification (UNNotification notification, Action completionHandler); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use overload accepting an 'UNNotification' parameter.")] - [Export ("suggestionsForResponseToActionWithIdentifier:forRemoteNotification:inputLanguage:")] - string [] GetSuggestionsForResponseToAction (string identifier, NSDictionary remoteNotification, string inputLanguage); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use overload accepting an 'UNNotification' parameter.")] - [Export ("suggestionsForResponseToActionWithIdentifier:forLocalNotification:inputLanguage:")] - string [] GetSuggestionsForResponseToAction (string identifier, UILocalNotification localNotification, string inputLanguage); - - [Export ("suggestionsForResponseToActionWithIdentifier:forNotification:inputLanguage:")] - string [] GetSuggestionsForResponseToAction (string identifier, UNNotification notification, string inputLanguage); - - [Watch (5, 0)] - [Export ("notificationActions", ArgumentSemantic.Copy)] - UNNotificationAction [] NotificationActions { get; set; } - - [Watch (5, 0)] - [Export ("didReceiveNotification:")] - void DidReceiveNotification (UNNotification notification); - - [Watch (5, 0)] - [Export ("performNotificationDefaultAction")] - void PerformNotificationDefaultAction (); - - [Watch (5, 0)] - [Export ("performDismissAction")] - void PerformDismissAction (); - - [Deprecated (PlatformName.WatchOS, 5, 0, message: "Use 'PerformDismissAction' instead.")] - [Export ("dismissController")] - void DismissController (); - - } - - [Unavailable (PlatformName.iOS)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - // just like we inlined UIAccessibility into UIViewm UIImage and UIBarItem instead of stuffing it all into NSObject - interface WKInterfaceObject : UIAccessibility { - [Export ("interfaceProperty")] - string InterfaceProperty { get; } - - [Export ("setHidden:")] - void SetHidden (bool hidden); - - [Export ("setAlpha:")] - void SetAlpha (nfloat alpha); - - [Export ("setWidth:")] - void SetWidth (nfloat width); - - [Export ("setHeight:")] - void SetHeight (nfloat height); - - [Export ("setSemanticContentAttribute:")] - void SetSemanticContentAttribute (WKInterfaceSemanticContentAttribute semanticContentAttribute); - - [Export ("setHorizontalAlignment:")] - void SetHorizontalAlignment (WKInterfaceObjectHorizontalAlignment horizontalAlignment); - - [Export ("setVerticalAlignment:")] - void SetVerticalAlignment (WKInterfaceObjectVerticalAlignment verticalAlignment); - - [Export ("setRelativeWidth:withAdjustment:")] - void SetRelativeWidth (nfloat width, nfloat adjustment); - - [Export ("setRelativeHeight:withAdjustment:")] - void SetRelativeHeight (nfloat height, nfloat adjustment); - - [Export ("sizeToFitWidth")] - void SizeToFitWidth (); - - [Export ("sizeToFitHeight")] - void SizeToFitHeight (); - } - - [Unavailable (PlatformName.iOS)] - [Category] - [BaseType (typeof (WKInterfaceObject))] - interface WKAccessibility { - [Export ("setAccessibilityLabel:")] - void SetAccessibilityLabel ([NullAllowed] string accessibilityLabel); - - [Export ("setAccessibilityHint:")] - void SetAccessibilityHint ([NullAllowed] string accessibilityHint); - - [Export ("setAccessibilityValue:")] - void SetAccessibilityValue ([NullAllowed] string accessibilityValue); - - [Export ("setAccessibilityImageRegions:")] - void SetAccessibilityImageRegions (WKAccessibilityImageRegion [] accessibilityImageRegions); - - [Export ("setAccessibilityTraits:")] - void SetAccessibilityTraits (UIAccessibilityTrait accessibilityTraits); - - [Export ("setIsAccessibilityElement:")] - void SetIsAccessibilityElement (bool isAccessibilityElement); - - [Export ("setAccessibilityIdentifier:")] - void SetAccessibilityIdentifier ([NullAllowed] string accessibilityIdentifier); - - [Notification] - [Field ("WKAccessibilityVoiceOverStatusChanged")] - NSString VoiceOverStatusChanged { get; } - - [Notification] - [Field ("WKAccessibilityReduceMotionStatusDidChangeNotification")] - NSString ReduceMotionStatusDidChangeNotification { get; } - } - - [Unavailable (PlatformName.iOS)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // does not make sense to create, it should only be used thru the singleton - interface WKInterfaceDevice { - [Export ("screenBounds")] - CGRect ScreenBounds { get; } - - [Export ("screenScale")] - nfloat ScreenScale { get; } - - [NoWatch] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("cachedImages")] - NSDictionary WeakCachedImages { get; } - - [Internal] - [Export ("preferredContentSizeCategory")] - NSString _PreferredContentSizeCategory { get; } - - [Static, Export ("currentDevice")] - WKInterfaceDevice CurrentDevice { get; } - - [NoWatch] - [Export ("addCachedImage:name:")] - bool AddCachedImage (UIImage image, string name); - - [NoWatch] - [Export ("addCachedImageWithData:name:")] - bool AddCachedImage (NSData imageData, string name); - - [NoWatch] - [Export ("removeCachedImageWithName:")] - void RemoveCachedImage (string name); - - [NoWatch] - [Export ("removeAllCachedImages")] - void RemoveAllCachedImages (); - - [Export ("systemVersion")] - string SystemVersion { get; } - - [Export ("name")] - string Name { get; } - - [Export ("model")] - string Model { get; } - - [Export ("localizedModel")] - string LocalizedModel { get; } - - [Export ("systemName")] - string SystemName { get; } - - [Export ("waterResistanceRating")] - WKWaterResistanceRating WaterResistanceRating { get; } - - [Export ("playHaptic:")] - void PlayHaptic (WKHapticType type); - - [Export ("layoutDirection")] - WKInterfaceLayoutDirection LayoutDirection { get; } - - [Static] - [Export ("interfaceLayoutDirectionForSemanticContentAttribute:")] - WKInterfaceLayoutDirection GetInterfaceLayoutDirection (WKInterfaceSemanticContentAttribute semanticContentAttribute); - - [Export ("wristLocation")] - WKInterfaceDeviceWristLocation WristLocation { get; } - - [Export ("crownOrientation")] - WKInterfaceDeviceCrownOrientation CrownOrientation { get; } - - [Export ("batteryMonitoringEnabled")] - bool BatteryMonitoringEnabled { [Bind ("isBatteryMonitoringEnabled")] get; set; } - - [Export ("batteryLevel")] - float BatteryLevel { get; } - - [Export ("batteryState")] - WKInterfaceDeviceBatteryState BatteryState { get; } - - [Watch (6, 0)] - [Export ("supportsAudioStreaming")] - bool SupportsAudioStreaming { get; } - - [Watch (6, 2)] - [NullAllowed, Export ("identifierForVendor", ArgumentSemantic.Strong)] - NSUuid IdentifierForVendor { get; } - - [Watch (6, 1)] - [Export ("enableWaterLock")] - void EnableWaterLock (); - - [Watch (6, 1)] - [Export ("isWaterLockEnabled")] - bool IsWaterLockEnabled { get; } - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceButton { - [Export ("setTitle:")] - void SetTitle ([NullAllowed] string title); - - [Export ("setAttributedTitle:")] - void SetTitle ([NullAllowed] NSAttributedString attributedTitle); - - [Export ("setBackgroundColor:")] - void SetBackgroundColor ([NullAllowed] UIColor color); - - [Export ("setBackgroundImage:")] - void SetBackgroundImage ([NullAllowed] UIImage image); - - [Export ("setBackgroundImageData:")] - void SetBackgroundImage ([NullAllowed] NSData imageData); - - [Export ("setBackgroundImageNamed:")] - void SetBackgroundImage ([NullAllowed] string imageName); - - [Export ("setEnabled:")] - void SetEnabled (bool enabled); - } - - [Unavailable (PlatformName.iOS)] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - interface WKInterfaceGroup : WKImageAnimatable { - [Export ("setBackgroundColor:")] - void SetBackgroundColor ([NullAllowed] UIColor color); - - [Export ("setBackgroundImage:")] - void SetBackgroundImage ([NullAllowed] UIImage image); - - [Export ("setBackgroundImageData:")] - void SetBackgroundImage ([NullAllowed] NSData imageData); - - [Export ("setBackgroundImageNamed:")] - void SetBackgroundImage ([NullAllowed] string imageName); - - [Export ("setCornerRadius:")] - void SetCornerRadius (nfloat cornerRadius); - - [Export ("setContentInset:")] - void SetContentInset (UIEdgeInsets contentInset); - } - - [Unavailable (PlatformName.iOS)] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - interface WKInterfaceImage : WKImageAnimatable { - [Export ("setImage:")] - void SetImage ([NullAllowed] UIImage image); - - [Export ("setImageData:")] - void SetImage ([NullAllowed] NSData imageData); - - [Export ("setImageNamed:")] - void SetImage ([NullAllowed] string imageName); - - [Export ("setTintColor:")] - void SetTintColor ([NullAllowed] UIColor color); - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceLabel { - - [Export ("setText:")] - void SetText ([NullAllowed] string text); - - [Export ("setTextColor:")] - void SetTextColor ([NullAllowed] UIColor color); - - [Export ("setAttributedText:")] - void SetText ([NullAllowed] NSAttributedString attributedText); - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceDate { - [Export ("setTextColor:")] - void SetTextColor ([NullAllowed] UIColor color); - - [Export ("setTimeZone:")] - void SetTimeZone ([NullAllowed] NSTimeZone timeZone); - - [Export ("setCalendar:")] - void SetCalendar ([NullAllowed] NSCalendar calendar); - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceTimer { - - [Export ("setTextColor:")] - void SetTextColor ([NullAllowed] UIColor color); - - [Export ("setDate:")] - void SetDate (NSDate date); - - [Export ("start")] - void Start (); - - [Export ("stop")] - void Stop (); - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceTable { - [Export ("numberOfRows")] - nint NumberOfRows { get; } - - [Export ("setRowTypes:")] - void SetRowTypes (string [] rowTypes); - - [Export ("setNumberOfRows:withRowType:")] - void SetNumberOfRows (nint numberOfRows, string rowType); - - [return: NullAllowed] - [Export ("rowControllerAtIndex:")] - NSObject GetRowController (nint index); - - [Export ("insertRowsAtIndexes:withRowType:")] - void InsertRows (NSIndexSet rowIndexes, string rowType); - - [Export ("removeRowsAtIndexes:")] - void RemoveRows (NSIndexSet rowIndexes); - - [Export ("scrollToRowAtIndex:")] - void ScrollToRow (nint index); - - [Export ("performSegueForRow:")] - void PerformSegue (nint row); - - [Watch (5, 1)] - [Export ("curvesAtTop")] - bool CurvesAtTop { get; set; } - - [Watch (5, 1)] - [Export ("curvesAtBottom")] - bool CurvesAtBottom { get; set; } - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceMap { - - [Watch (6, 0)] - [Advice ("This API exists for SwiftUI and is not generally needed.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'MKMapView' instead.")] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("addAnnotation:withImage:centerOffset:")] - void AddAnnotation (CLLocationCoordinate2D location, [NullAllowed] UIImage image, CGPoint offset); - - [Export ("addAnnotation:withImageNamed:centerOffset:")] - void AddAnnotation (CLLocationCoordinate2D location, [NullAllowed] string name, CGPoint offset); - - [Export ("addAnnotation:withPinColor:")] - void AddAnnotation (CLLocationCoordinate2D location, WKInterfaceMapPinColor pinColor); - - [Export ("setRegion:")] - void SetRegion (MKCoordinateRegion coordinateRegion); - - [Export ("setVisibleMapRect:")] - void SetVisible (MKMapRect mapRect); - - [Export ("removeAllAnnotations")] - void RemoveAllAnnotations (); - - [Watch (6, 1)] - [Export ("setShowsUserHeading:")] - void SetShowsUserHeading (bool showsUserHeading); - - [Watch (6, 1)] - [Export ("setShowsUserLocation:")] - void SetShowsUserLocation (bool showsUserLocation); - - [Watch (6, 1)] - [Export ("setUserTrackingMode:animated:")] - void SetUserTrackingMode (WKInterfaceMapUserTrackingMode mode, bool animated); - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceSeparator { - [Export ("setColor:")] - void SetColor ([NullAllowed] UIColor color); - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceSlider { - [Export ("setEnabled:")] - void SetEnabled (bool enabled); - - [Export ("setValue:")] - void SetValue (float value); - - [Export ("setColor:")] - void SetColor ([NullAllowed] UIColor color); - - [Export ("setNumberOfSteps:")] - void SetNumberOfSteps (nint numberOfSteps); - } - - [Unavailable (PlatformName.iOS)] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - [BaseType (typeof (WKInterfaceObject))] - interface WKInterfaceSwitch { - - [Export ("setColor:")] - void SetColor ([NullAllowed] UIColor color); - - [Export ("setEnabled:")] - void SetEnabled (bool enabled); - - [Export ("setOn:")] - void SetOn (bool on); - - [Export ("setTitle:")] - void SetTitle ([NullAllowed] string title); - - [Export ("setAttributedTitle:")] - void SetTitle ([NullAllowed] NSAttributedString attributedTitle); - } - - [Unavailable (PlatformName.iOS)] - [BaseType (typeof (NSObject))] - interface WKAccessibilityImageRegion { - - [Export ("frame")] - CGRect Frame { get; set; } - - [Export ("label")] - string Label { get; set; } - } - - interface IWKImageAnimatable { } - - [Unavailable (PlatformName.iOS)] - [Protocol] - interface WKImageAnimatable { - - [Abstract] - [Export ("startAnimating")] - void StartAnimating (); - - [Abstract] - [Export ("startAnimatingWithImagesInRange:duration:repeatCount:")] - void StartAnimating (NSRange imageRange, double duration, nint repeatCount); - - [Abstract] - [Export ("stopAnimating")] - void StopAnimating (); - } - - [NoiOS] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface WKImage : NSCopying, NSSecureCoding { - [Static] - [Export ("imageWithImage:")] - WKImage CreateFromImage (UIImage image); - - [Static] - [Export ("imageWithImageData:")] - WKImage CreateFromData (NSData imageData); - - [Static] - [Export ("imageWithImageName:")] - WKImage CreateFromName (string imageName); - - [NullAllowed, Export ("image")] - UIImage Image { get; } - - [NullAllowed, Export ("imageData")] - NSData ImageData { get; } - - [NullAllowed, Export ("imageName")] - string ImageName { get; } - } - - [NoiOS] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface WKAlertAction { - [Static] - [Export ("actionWithTitle:style:handler:")] - WKAlertAction Create (string title, WKAlertActionStyle style, Action handler); - } - - [NoiOS] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AVPlayer' or 'AVQueuePlayer' instead.")] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface WKAudioFileAsset { - [Static] - [Export ("assetWithURL:")] - WKAudioFileAsset Create (NSUrl url); - - [Static] - [Export ("assetWithURL:title:albumTitle:artist:")] - WKAudioFileAsset Create (NSUrl url, [NullAllowed] string title, [NullAllowed] string albumTitle, [NullAllowed] string artist); - - [Export ("URL")] - NSUrl Url { get; } - - [Export ("duration")] - double Duration { get; } - - [NullAllowed, Export ("title")] - string Title { get; } - - [NullAllowed, Export ("albumTitle")] - string AlbumTitle { get; } - - [NullAllowed, Export ("artist")] - string Artist { get; } - } - - [NoiOS] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AVPlayer' or 'AVQueuePlayer' instead.")] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface WKAudioFilePlayer { - [Static] - [Export ("playerWithPlayerItem:")] - WKAudioFilePlayer Create (WKAudioFilePlayerItem item); - - [Export ("play")] - void Play (); - - [Export ("pause")] - void Pause (); - - [Export ("replaceCurrentItemWithPlayerItem:")] - void ReplaceCurrentItem ([NullAllowed] WKAudioFilePlayerItem item); - - [NullAllowed, Export ("currentItem")] - WKAudioFilePlayerItem CurrentItem { get; } - - [Export ("status")] - WKAudioFilePlayerStatus Status { get; } - - [NullAllowed, Export ("error")] - NSError Error { get; } - - [Export ("rate")] - float Rate { get; set; } - - [Export ("currentTime")] - double CurrentTime { get; } - } - - [NoiOS] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AVPlayer' or 'AVQueuePlayer' instead.")] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface WKAudioFilePlayerItem { - [Static] - [Export ("playerItemWithAsset:")] - WKAudioFilePlayerItem Create (WKAudioFileAsset asset); - - [Export ("asset")] - WKAudioFileAsset Asset { get; } - - [Export ("status")] - WKAudioFilePlayerItemStatus Status { get; } - - [NullAllowed, Export ("error")] - NSError Error { get; } - - [Export ("currentTime")] - double CurrentTime { - get; -#if NET - set; - } -#else - } - [Export ("setCurrentTime:")] - void SetCurrentTime (double time); -#endif - - [Notification] - [Field ("WKAudioFilePlayerItemTimeJumpedNotification")] - NSString TimeJumpedNotification { get; } - - [Notification] - [Field ("WKAudioFilePlayerItemDidPlayToEndTimeNotification")] - NSString DidPlayToEndTimeNotification { get; } - - [Notification] - [Field ("WKAudioFilePlayerItemFailedToPlayToEndTimeNotification")] - NSString FailedToPlayToEndTimeNotification { get; } - } - - [NoiOS] - [BaseType (typeof (NSObject))] - interface WKExtension { - [Static] - [Export ("sharedExtension")] - WKExtension SharedExtension { get; } - - [Export ("openSystemURL:")] - void OpenSystemUrl (NSUrl url); - - [Wrap ("WeakDelegate")] - [NullAllowed] - IWKExtensionDelegate Delegate { get; set; } - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - NSObject WeakDelegate { get; set; } - - [NullAllowed, Export ("rootInterfaceController")] - WKInterfaceController RootInterfaceController { get; } - - [Export ("applicationState")] - WKApplicationState ApplicationState { get; } - - [NullAllowed, Export ("visibleInterfaceController")] - WKInterfaceController VisibleInterfaceController { get; } - - [Export ("isApplicationRunningInDock")] - bool IsApplicationRunningInDock { get; } - - [Export ("autorotating")] - bool Autorotating { [Bind ("isAutorotating")] get; set; } - - [Watch (4, 2)] - [Export ("autorotated")] - bool Autorotated { [Bind ("isAutorotated")] get; } - - [Deprecated (PlatformName.WatchOS, 7, 0)] - [Export ("frontmostTimeoutExtended")] - bool FrontmostTimeoutExtended { [Bind ("isFrontmostTimeoutExtended")] get; set; } - - [Export ("enableWaterLock")] - [Deprecated (PlatformName.WatchOS, 6, 1, message: "Use 'WKInterfaceDevice.EnableWaterLock' instead.")] - void EnableWaterLock (); - - [Watch (6, 0)] - [Export ("registerForRemoteNotifications")] - void RegisterForRemoteNotifications (); - - [Watch (6, 0)] - [Export ("unregisterForRemoteNotifications")] - void UnregisterForRemoteNotifications (); - - [Watch (6, 0)] - [Export ("registeredForRemoteNotifications")] - bool RegisteredForRemoteNotifications { [Bind ("isRegisteredForRemoteNotifications")] get; } - - [Watch (7, 0)] - [Export ("globalTintColor")] - UIColor GlobalTintColor { get; } - - [Watch (7, 0)] - [Notification, Field ("WKApplicationDidFinishLaunchingNotification")] - NSString DidFinishLaunchingNotification { get; } - - [Watch (7, 0)] - [Notification, Field ("WKApplicationDidBecomeActiveNotification")] - NSString DidBecomeActiveNotification { get; } - - [Watch (7, 0)] - [Notification, Field ("WKApplicationWillResignActiveNotification")] - NSString WillResignActiveNotification { get; } - - [Watch (7, 0)] - [Notification, Field ("WKApplicationWillEnterForegroundNotification")] - NSString WillEnterForegroundNotification { get; } - - [Watch (7, 0)] - [Notification, Field ("WKApplicationDidEnterBackgroundNotification")] - NSString DidEnterBackgroundNotification { get; } - } - - interface IWKExtensionDelegate { } - - [NoiOS] - [Protocol] - [Model] - [BaseType (typeof (NSObject))] - interface WKExtensionDelegate { - [Export ("applicationDidFinishLaunching")] - void ApplicationDidFinishLaunching (); - - [Export ("applicationDidBecomeActive")] - void ApplicationDidBecomeActive (); - - [Export ("applicationWillResignActive")] - void ApplicationWillResignActive (); - - [Export ("applicationWillEnterForeground")] - void ApplicationWillEnterForeground (); - - [Export ("applicationDidEnterBackground")] - void ApplicationDidEnterBackground (); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("handleActionWithIdentifier:forRemoteNotification:")] - void HandleAction ([NullAllowed] string identifier, NSDictionary remoteNotification); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("handleActionWithIdentifier:forLocalNotification:")] - void HandleAction ([NullAllowed] string identifier, UILocalNotification localNotification); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("handleActionWithIdentifier:forRemoteNotification:withResponseInfo:")] - void HandleAction ([NullAllowed] string identifier, NSDictionary remoteNotification, NSDictionary responseInfo); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("handleActionWithIdentifier:forLocalNotification:withResponseInfo:")] - void HandleAction ([NullAllowed] string identifier, UILocalNotification localNotification, NSDictionary responseInfo); - - [Export ("handleUserActivity:")] - void HandleUserActivity ([NullAllowed] NSDictionary userInfo); - - [Export ("handleActivity:")] - void HandleUserActivity (NSUserActivity userActivity); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("didReceiveRemoteNotification:")] - void DidReceiveRemoteNotification (NSDictionary userInfo); - - [Deprecated (PlatformName.WatchOS, 3, 0, message: "Use 'UNUserNotificationCenterDelegate' instead.")] - [Export ("didReceiveLocalNotification:")] - void DidReceiveLocalNotification (UILocalNotification notification); - - [Export ("handleBackgroundTasks:")] - void HandleBackgroundTasks (NSSet backgroundTasks); - - [Export ("handleWorkoutConfiguration:")] - void HandleWorkoutConfiguration (HKWorkoutConfiguration workoutConfiguration); - - [Export ("deviceOrientationDidChange")] - void DeviceOrientationDidChange (); - - [Watch (5, 0)] - [Export ("handleActiveWorkoutRecovery")] - void HandleActiveWorkoutRecovery (); - - [Watch (5, 0)] - [Export ("handleRemoteNowPlayingActivity")] - void HandleRemoteNowPlayingActivity (); - - [Watch (5, 0)] - [Export ("handleIntent:completionHandler:")] - void HandleIntent (INIntent intent, Action completionHandler); - - [Watch (6, 0)] - [Export ("handleExtendedRuntimeSession:")] - void HandleExtendedRuntimeSession (WKExtendedRuntimeSession extendedRuntimeSession); - - [Watch (6, 0)] - [Export ("didRegisterForRemoteNotificationsWithDeviceToken:")] - void DidRegisterForRemoteNotifications (NSData deviceToken); - - [Watch (6, 0)] - [Export ("didFailToRegisterForRemoteNotificationsWithError:")] - void DidFailToRegisterForRemoteNotifications (NSError error); - - [Watch (6, 0)] - [Export ("didReceiveRemoteNotification:fetchCompletionHandler:")] - void DidReceiveRemoteNotification (NSDictionary userInfo, Action completionHandler); - - [Watch (7, 0)] - [Export ("userDidAcceptCloudKitShareWithMetadata:")] - void UserDidAcceptCloudKitShare (CKShareMetadata cloudKitShareMetadata); - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // The super class' init method is unavailable. - interface WKInterfaceActivityRing { - [Watch (6, 0)] - [Advice ("This API exists for SwiftUI and is not generally needed.")] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("setActivitySummary:animated:")] - void SetActivitySummary ([NullAllowed] HKActivitySummary activitySummary, bool animated); - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // The super class' init method is unavailable. - interface WKInterfaceMovie { - - [Watch (6, 0)] - [Advice ("This API exists for SwiftUI and is not generally needed.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'AVVideoPlayer' instead.")] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("setMovieURL:")] - void SetMovieUrl (NSUrl url); - - [Export ("setVideoGravity:")] - void SetVideoGravity (WKVideoGravity videoGravity); - - [Export ("setLoops:")] - void SetLoops (bool loops); - - [Export ("setPosterImage:")] - void SetPosterImage ([NullAllowed] WKImage posterImage); - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // The super class' init method is unavailable. - interface WKInterfacePicker { - [Export ("focus")] - void Focus (); - - [Export ("resignFocus")] - void ResignFocus (); - - [Export ("setSelectedItemIndex:")] - void SetSelectedItem (nint itemIndex); - - [Export ("setItems:")] - void SetItems ([NullAllowed] WKPickerItem [] items); - - [Export ("setCoordinatedAnimations:")] - void SetCoordinatedAnimations ([NullAllowed] IWKImageAnimatable [] coordinatedAnimations); - - [Export ("setEnabled:")] - void SetEnabled (bool enabled); - } - - [NoiOS] - [BaseType (typeof (NSObject))] - interface WKPickerItem : NSSecureCoding { - [NullAllowed, Export ("title")] - string Title { get; set; } - - [NullAllowed, Export ("caption")] - string Caption { get; set; } - - [NullAllowed, Export ("accessoryImage", ArgumentSemantic.Copy)] - WKImage AccessoryImage { get; set; } - - [NullAllowed, Export ("contentImage", ArgumentSemantic.Copy)] - WKImage ContentImage { get; set; } - } - - [NoiOS] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use 'AVPlayer' or 'AVQueuePlayer' instead.")] - [BaseType (typeof (WKAudioFilePlayer))] - [DisableDefaultCtor] - interface WKAudioFileQueuePlayer { - [Static] - [Export ("queuePlayerWithItems:")] - WKAudioFileQueuePlayer FromItems (WKAudioFilePlayerItem [] items); - - [Export ("advanceToNextItem")] - void AdvanceToNextItem (); - - [Export ("appendItem:")] - void AppendItem (WKAudioFilePlayerItem item); - - [Export ("removeItem:")] - void RemoveItem (WKAudioFilePlayerItem item); - - [Export ("removeAllItems")] - void RemoveAllItems (); - - [Export ("items")] - WKAudioFilePlayerItem [] Items { get; } - } - - // to be made [Internal] once #34656 is fixed - [Static] - [NoiOS] - interface WKMediaPlayerControllerOptionsKeys { - [Field ("WKMediaPlayerControllerOptionsAutoplayKey")] - NSString AutoplayKey { get; } - - [Field ("WKMediaPlayerControllerOptionsStartTimeKey")] - NSString StartTimeKey { get; } - - [Field ("WKMediaPlayerControllerOptionsVideoGravityKey")] - NSString VideoGravityKey { get; } - - [Field ("WKMediaPlayerControllerOptionsLoopsKey")] - NSString LoopsKey { get; } - } - - // to be made [Internal] once #34656 is fixed - [Static] - [NoiOS] - interface WKAudioRecorderControllerOptionsKey { - [Field ("WKAudioRecorderControllerOptionsActionTitleKey")] - NSString ActionTitleKey { get; } - - [Field ("WKAudioRecorderControllerOptionsAlwaysShowActionTitleKey")] - NSString AlwaysShowActionTitleKey { get; } - - [Field ("WKAudioRecorderControllerOptionsAutorecordKey")] - NSString AutorecordKey { get; } - - [Field ("WKAudioRecorderControllerOptionsMaximumDurationKey")] - NSString MaximumDurationKey { get; } - } - - [NoiOS] - [BaseType (typeof (NSObject))] - interface WKRefreshBackgroundTask { - - [NullAllowed, Export ("userInfo")] - INSSecureCoding UserInfo { get; } - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'SetTaskCompleted (false)' instead.")] - [Export ("setTaskCompleted")] - void SetTaskCompleted (); - - [Export ("setTaskCompletedWithSnapshot:")] - void SetTaskCompleted (bool refreshSnapshot); - - [Watch (8, 0)] - [NullAllowed, Export ("expirationHandler", ArgumentSemantic.Strong)] - Action ExpirationHandler { get; set; } - } - - [NoiOS] - [BaseType (typeof (WKRefreshBackgroundTask))] - interface WKApplicationRefreshBackgroundTask { - } - - [NoiOS] - [BaseType (typeof (WKRefreshBackgroundTask))] - interface WKSnapshotRefreshBackgroundTask { - - [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'ReasonForSnapshot' instead.")] - [Export ("returnToDefaultState")] - bool ReturnToDefaultState { get; } - - [Export ("reasonForSnapshot")] - WKSnapshotReason ReasonForSnapshot { get; } - - [Export ("setTaskCompletedWithDefaultStateRestored:estimatedSnapshotExpiration:userInfo:")] - void SetTaskCompleted (bool restoredDefaultState, [NullAllowed] NSDate estimatedSnapshotExpiration, [NullAllowed] INSSecureCoding userInfo); - } - - [NoiOS] - [BaseType (typeof (WKRefreshBackgroundTask), Name = "WKURLSessionRefreshBackgroundTask")] - interface WKUrlSessionRefreshBackgroundTask { - - [Export ("sessionIdentifier")] - string SessionIdentifier { get; } - } - - [NoiOS] - [BaseType (typeof (WKRefreshBackgroundTask))] - interface WKWatchConnectivityRefreshBackgroundTask { - } - - [Watch (5, 0)] - [NoiOS] - [BaseType (typeof (WKRefreshBackgroundTask))] - interface WKRelevantShortcutRefreshBackgroundTask { - } - - [Watch (5, 0)] - [NoiOS] - [BaseType (typeof (WKRefreshBackgroundTask))] - interface WKIntentDidRunRefreshBackgroundTask { - } - - [NoiOS] - [Category] - [BaseType (typeof (WKExtension))] - interface WKExtension_WKBackgroundTasks { - - [Export ("scheduleBackgroundRefreshWithPreferredDate:userInfo:scheduledCompletion:")] - void ScheduleBackgroundRefresh (NSDate preferredFireDate, [NullAllowed] INSSecureCoding userInfo, Action scheduledCompletion); - - [Export ("scheduleSnapshotRefreshWithPreferredDate:userInfo:scheduledCompletion:")] - void ScheduleSnapshotRefresh (NSDate preferredFireDate, [NullAllowed] INSSecureCoding userInfo, Action scheduledCompletion); - } - - [NoiOS] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface WKCrownSequencer { - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - IWKCrownDelegate Delegate { get; set; } - - [Export ("rotationsPerSecond")] - double RotationsPerSecond { get; } - - [Export ("idle")] - bool Idle { [Bind ("isIdle")] get; } - - [Export ("focus")] - void Focus (); - - [Export ("resignFocus")] - void ResignFocus (); - - [Watch (5, 0)] - [Export ("hapticFeedbackEnabled")] - bool HapticFeedbackEnabled { [Bind ("isHapticFeedbackEnabled")] get; set; } - } - - interface IWKCrownDelegate { } - - [NoiOS] - [Protocol] - [Model] - [BaseType (typeof (NSObject))] - interface WKCrownDelegate { - [Export ("crownDidRotate:rotationalDelta:")] - void CrownDidRotate ([NullAllowed] WKCrownSequencer crownSequencer, double rotationalDelta); - - [Export ("crownDidBecomeIdle:")] - void CrownDidBecomeIdle ([NullAllowed] WKCrownSequencer crownSequencer); - } - - [NoiOS] - [Abstract] - [BaseType (typeof (NSObject))] - interface WKGestureRecognizer { - - [Export ("state")] - WKGestureRecognizerState State { get; } - - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } - - [Export ("locationInObject")] - CGPoint LocationInObject { get; } - - [Export ("objectBounds")] - CGRect ObjectBounds { get; } - } - - [NoiOS] - [BaseType (typeof (WKGestureRecognizer))] - interface WKTapGestureRecognizer { - - [Export ("numberOfTapsRequired")] - nuint NumberOfTapsRequired { get; set; } - } - - [NoiOS] - [BaseType (typeof (WKGestureRecognizer))] - interface WKLongPressGestureRecognizer { - - [Export ("minimumPressDuration")] - double MinimumPressDuration { get; set; } - - [Export ("numberOfTapsRequired")] - nuint NumberOfTapsRequired { get; set; } - - [Export ("allowableMovement")] - nfloat AllowableMovement { get; set; } - } - - [NoiOS] - [BaseType (typeof (WKGestureRecognizer))] - interface WKSwipeGestureRecognizer { - - [Export ("direction", ArgumentSemantic.Assign)] - WKSwipeGestureRecognizerDirection Direction { get; set; } - } - - [NoiOS] - [BaseType (typeof (WKGestureRecognizer))] - interface WKPanGestureRecognizer { - [Export ("translationInObject")] - CGPoint TranslationInObject { get; } - - [Export ("velocityInObject")] - CGPoint VelocityInObject { get; } - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - interface WKInterfaceHMCamera { - - [Watch (6, 0)] - [Advice ("This API exists for SwiftUI and is not generally needed.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'HMCameraView' instead.")] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("setCameraSource:")] - void SetCameraSource ([NullAllowed] HMCameraSource cameraSource); - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - interface WKInterfaceInlineMovie { - - [Watch (6, 0)] - [Advice ("This API exists for SwiftUI and is not generally needed.")] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("setMovieURL:")] - void SetMovieUrl (NSUrl url); - - [Export ("setVideoGravity:")] - void SetVideoGravity (WKVideoGravity videoGravity); - - [Export ("setLoops:")] - void SetLoops (bool loops); - - [Export ("setAutoplays:")] - void SetAutoplays (bool autoplays); - - [Export ("setPosterImage:")] - void SetPosterImage ([NullAllowed] WKImage posterImage); - - [Export ("play")] - void Play (); - - [Export ("playFromBeginning")] - void PlayFromBeginning (); - - [Export ("pause")] - void Pause (); - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - interface WKInterfacePaymentButton { - - [Watch (6, 0)] - [Export ("initWithTarget:action:")] - NativeHandle Constructor ([NullAllowed] NSObject target, Selector action); - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - interface WKInterfaceSCNScene : SCNSceneRenderer { - - [Watch (6, 0)] - [Advice ("This API exists for SwiftUI and is not generally needed.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'SCNSceneView' instead.")] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("snapshot")] - UIImage GetSnapshot (); - - [Export ("preferredFramesPerSecond")] - nint PreferredFramesPerSecond { get; set; } - - [Export ("antialiasingMode", ArgumentSemantic.Assign)] - SCNAntialiasingMode AntialiasingMode { get; set; } - } - - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called - interface WKInterfaceSKScene { - - [Watch (6, 0)] - [Advice ("This API exists for SwiftUI and is not generally needed.")] - [Deprecated (PlatformName.WatchOS, 7, 0, message: "Use 'SKSpriteView' instead.")] - [EditorBrowsable (EditorBrowsableState.Advanced)] - [Export ("init")] - NativeHandle Constructor (); - - [Export ("paused")] - bool Paused { [Bind ("isPaused")] get; set; } - - [Export ("preferredFramesPerSecond")] - nint PreferredFramesPerSecond { get; set; } - - [Export ("presentScene:")] - void PresentScene ([NullAllowed] SKScene scene); - - [Export ("presentScene:transition:")] - void PresentScene (SKScene scene, SKTransition transition); - - [NullAllowed, Export ("scene")] - SKScene Scene { get; } - - [Export ("textureFromNode:")] - [return: NullAllowed] - SKTexture CreateTexture (SKNode node); - - [Export ("textureFromNode:crop:")] - [return: NullAllowed] - SKTexture CreateTexture (SKNode node, CGRect crop); - } - - [Watch (5, 0)] - [NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] - interface WKInterfaceVolumeControl { - [Watch (6, 0)] - [Export ("initWithOrigin:")] - NativeHandle Constructor (WKInterfaceVolumeControlOrigin origin); - - [Export ("setTintColor:")] - void SetTintColor ([NullAllowed] UIColor tintColor); - - [Watch (6, 0)] - [Export ("focus")] - void Focus (); - - [Watch (6, 0)] - [Export ("resignFocus")] - void ResignFocus (); - } - - [Watch (6, 0), NoiOS] - [Native] - enum WKBackgroundFetchResult : ulong { - NewData, - NoData, - Failed, - } - - [Watch (6, 0), NoiOS] - [Native] - [ErrorDomain ("WKExtendedRuntimeSessionErrorDomain")] - enum WKExtendedRuntimeSessionErrorCode : long { - Unknown = 1, - ScheduledTooFarInAdvance = 2, - MustBeActiveToStartOrSchedule = 3, - NotYetStarted = 4, - ExceededResourceLimits = 5, - BARDisabled = 6, - NotApprovedToStartSession = 7, - NotApprovedToSchedule = 8, - MustBeActiveToPrompt = 9, - UnsupportedSessionType = 10, - } - - [Watch (6, 0), NoiOS] - [Native] - enum WKExtendedRuntimeSessionInvalidationReason : long { - None, - SessionInProgress, - Expired, - ResignedFrontmost, - SuppressedBySystem, - Error = -1, - } - - [Watch (6, 0), NoiOS] - [Native] - enum WKExtendedRuntimeSessionState : long { - NotStarted, - Scheduled, - Running, - Invalid, - } - - [Watch (6, 0), NoiOS] - [Native] - enum WKInterfaceVolumeControlOrigin : long { - Local, - Companion, - } - - [Watch (6, 1), NoiOS] - [Native] - enum WKInterfaceAuthorizationAppleIdButtonStyle : long { - Default, - White, - } - - [Watch (6, 1), NoiOS] - [Native] - enum WKInterfaceMapUserTrackingMode : long { - None, - Follow, - } - - interface IWKExtendedRuntimeSessionDelegate { } - - [Watch (6, 0), NoiOS] -#if NET - [Protocol, Model] -#else - [Protocol, Model (AutoGeneratedName = true)] -#endif - [BaseType (typeof (NSObject))] - interface WKExtendedRuntimeSessionDelegate { - - [Abstract] - [Export ("extendedRuntimeSession:didInvalidateWithReason:error:")] - void DidInvalidate (WKExtendedRuntimeSession extendedRuntimeSession, WKExtendedRuntimeSessionInvalidationReason reason, [NullAllowed] NSError error); - - [Abstract] - [Export ("extendedRuntimeSessionDidStart:")] - void DidStart (WKExtendedRuntimeSession extendedRuntimeSession); - - [Abstract] - [Export ("extendedRuntimeSessionWillExpire:")] - void WillExpire (WKExtendedRuntimeSession extendedRuntimeSession); - } - - [Watch (6, 0), NoiOS] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // Create method exists and `NSInvalidArgumentException Reason: *** -[__NSSetM addObject:]: object cannot be nil` - interface WKExtendedRuntimeSession { - - [Static] - [Export ("session")] - WKExtendedRuntimeSession Create (); - - [Watch (9, 0), NoiOS] - [Static] - [Async] - [Export ("requestAutoLaunchAuthorizationStatusWithCompletion:")] - void RequestAutoLaunchAuthorizationStatus (WKRequestAutoLaunchAuthorizationStatusCompletionHandler completion); - - [Wrap ("WeakDelegate")] - [NullAllowed] - IWKExtendedRuntimeSessionDelegate Delegate { get; set; } - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - NSObject WeakDelegate { get; set; } - - [Export ("state")] - WKExtendedRuntimeSessionState State { get; } - - [NullAllowed, Export ("expirationDate")] - NSDate ExpirationDate { get; } - - [Export ("start")] - void Start (); - - [Export ("startAtDate:")] - void Start (NSDate date); - - [Export ("invalidate")] - void Invalidate (); - - [Export ("notifyUserWithHaptic:repeatHandler:")] - void NotifyUser (WKHapticType type, [NullAllowed] WKNofityUserIntervalHandler repeatHandler); - } - - delegate double WKNofityUserIntervalHandler (WKHapticType type); - delegate void WKRequestAutoLaunchAuthorizationStatusCompletionHandler (WKExtendedRuntimeSessionAutoLaunchAuthorizationStatus authorizationStatus, [NullAllowed] NSError error); - - [Watch (6, 0), NoiOS] - [BaseType (typeof (WKInterfaceObject), Name = "WKInterfaceAuthorizationAppleIDButton")] - [DisableDefaultCtor] // Handle is `nil` - interface WKInterfaceAuthorizationAppleIdButton { - [Export ("initWithTarget:action:")] - [Deprecated (PlatformName.WatchOS, 6, 1, message: "Use 'new WKInterfaceAuthorizationAppleIdButton (WKInterfaceVolumeControlOrigin,NSObject,Selector)' instead.")] - NativeHandle Constructor ([NullAllowed] NSObject target, Selector action); - - [Watch (6, 1)] - [Export ("initWithStyle:target:action:")] - NativeHandle Constructor (WKInterfaceAuthorizationAppleIdButtonStyle style, [NullAllowed] NSObject target, Selector action); - } - - [Watch (6, 0), NoiOS] - enum WKTextContentType { - [DefaultEnumValue] - [Field (null)] // API using fields accept `nil` - None, - [Field ("WKTextContentTypeName")] - Name, - [Field ("WKTextContentTypeNamePrefix")] - NamePrefix, - [Field ("WKTextContentTypeGivenName")] - GivenName, - [Field ("WKTextContentTypeMiddleName")] - MiddleName, - [Field ("WKTextContentTypeFamilyName")] - FamilyName, - [Field ("WKTextContentTypeNameSuffix")] - NameSuffix, - [Field ("WKTextContentTypeNickname")] - Nickname, - [Field ("WKTextContentTypeJobTitle")] - JobTitle, - [Field ("WKTextContentTypeOrganizationName")] - OrganizationName, - [Field ("WKTextContentTypeLocation")] - Location, - [Field ("WKTextContentTypeFullStreetAddress")] - FullStreetAddress, - [Field ("WKTextContentTypeStreetAddressLine1")] - StreetAddressLine1, - [Field ("WKTextContentTypeStreetAddressLine2")] - StreetAddressLine2, - [Field ("WKTextContentTypeAddressCity")] - AddressCity, - [Field ("WKTextContentTypeAddressState")] - AddressState, - [Field ("WKTextContentTypeAddressCityAndState")] - AddressCityAndState, - [Field ("WKTextContentTypeSublocality")] - Sublocality, - [Field ("WKTextContentTypeCountryName")] - CountryName, - [Field ("WKTextContentTypePostalCode")] - PostalCode, - [Field ("WKTextContentTypeTelephoneNumber")] - TelephoneNumber, - [Field ("WKTextContentTypeEmailAddress")] - EmailAddress, - [Field ("WKTextContentTypeURL")] - Url, - [Field ("WKTextContentTypeCreditCardNumber")] - CreditCardNumber, - [Field ("WKTextContentTypeUsername")] - Username, - [Field ("WKTextContentTypePassword")] - Password, - [Field ("WKTextContentTypeNewPassword")] - NewPassword, - [Field ("WKTextContentTypeOneTimeCode")] - OneTimeCode, - } - - [Watch (6, 0), NoiOS] - [BaseType (typeof (WKInterfaceObject))] - [DisableDefaultCtor] // Handle is `nil` - interface WKInterfaceTextField { - - [Export ("setText:")] - void SetText ([NullAllowed] string text); - - [Export ("setAttributedText:")] - void SetText ([NullAllowed] NSAttributedString attributedText); - - [Export ("setPlaceholder:")] - void SetPlaceholder ([NullAllowed] string placeholder); - - [Export ("setAttributedPlaceholder:")] - void SetPlaceholder ([NullAllowed] NSAttributedString attributedPlaceholder); - - [Export ("setTextColor:")] - void SetTextColor ([NullAllowed] UIColor color); - - [Export ("setEnabled:")] - void SetEnabled (bool enabled); - - [Export ("setTextContentType:")] - void SetTextContentType ([BindAs (typeof (WKTextContentType?))][NullAllowed] NSString textContentType); - - [Export ("setSecureTextEntry:")] - void SetSecureTextEntry (bool secureTextEntry); - } - - [Watch (7, 0), NoiOS] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface WKApplication { - [Static] - [Export ("sharedApplication")] - WKApplication SharedApplication { get; } - - [Export ("openSystemURL:")] - void OpenSystemUrl (NSUrl url); - - [Wrap ("WeakDelegate")] - [NullAllowed] - IWKApplicationDelegate Delegate { get; } - - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - NSObject WeakDelegate { get; } - - [NullAllowed, Export ("rootInterfaceController")] - WKInterfaceController RootInterfaceController { get; } - - [NullAllowed, Export ("visibleInterfaceController")] - WKInterfaceController VisibleInterfaceController { get; } - - [Export ("applicationState")] - WKApplicationState ApplicationState { get; } - - [Export ("isApplicationRunningInDock")] - bool IsApplicationRunningInDock { get; } - - [Export ("autorotating")] - bool IsAutorotating { [Bind ("isAutorotating")] get; set; } - - [Export ("autorotated")] - bool Autorotated { [Bind ("isAutorotated")] get; } - - [Export ("registerForRemoteNotifications")] - void RegisterForRemoteNotifications (); - - [Export ("unregisterForRemoteNotifications")] - void UnregisterForRemoteNotifications (); - - [Export ("registeredForRemoteNotifications")] - bool RegisteredForRemoteNotifications { [Bind ("isRegisteredForRemoteNotifications")] get; } - - [Export ("globalTintColor")] - UIColor GlobalTintColor { get; } - - // from interface WKBackgroundTasks (WKApplication) - [Async] - [Export ("scheduleBackgroundRefreshWithPreferredDate:userInfo:scheduledCompletion:")] - void ScheduleBackgroundRefresh (NSDate preferredFireDate, [NullAllowed] NSObject userInfo, Action scheduledCompletion); - - [Async] - [Export ("scheduleSnapshotRefreshWithPreferredDate:userInfo:scheduledCompletion:")] - void ScheduleSnapshotRefresh (NSDate preferredFireDate, [NullAllowed] NSObject userInfo, Action scheduledCompletion); - } - - interface IWKApplicationDelegate { } - - [Watch (7, 0), NoiOS] -#if NET - [Protocol, Model] -#else - [Protocol, Model (AutoGeneratedName = true)] -#endif - [BaseType (typeof (NSObject))] - interface WKApplicationDelegate { - [Export ("applicationDidFinishLaunching")] - void ApplicationDidFinishLaunching (); - - [Export ("applicationDidBecomeActive")] - void ApplicationDidBecomeActive (); - - [Export ("applicationWillResignActive")] - void ApplicationWillResignActive (); - - [Export ("applicationWillEnterForeground")] - void ApplicationWillEnterForeground (); - - [Export ("applicationDidEnterBackground")] - void ApplicationDidEnterBackground (); - - [Export ("handleWorkoutConfiguration:")] - void HandleWorkoutConfiguration (HKWorkoutConfiguration workoutConfiguration); - - [Export ("handleActiveWorkoutRecovery")] - void HandleActiveWorkoutRecovery (); - - [Export ("handleExtendedRuntimeSession:")] - void HandleExtendedRuntimeSession (WKExtendedRuntimeSession extendedRuntimeSession); - - [Export ("handleRemoteNowPlayingActivity")] - void HandleRemoteNowPlayingActivity (); - - [Export ("handleUserActivity:")] - void HandleUserActivity ([NullAllowed] NSDictionary userInfo); - - [Export ("handleActivity:")] - void HandleActivity (NSUserActivity userActivity); - - [Export ("handleIntent:completionHandler:")] - void HandleIntent (INIntent intent, Action completionHandler); - - [Export ("handleBackgroundTasks:")] - void HandleBackgroundTasks (NSSet backgroundTasks); - - [Export ("deviceOrientationDidChange")] - void DeviceOrientationDidChange (); - - [Export ("didRegisterForRemoteNotificationsWithDeviceToken:")] - void DidRegisterForRemoteNotifications (NSData deviceToken); - - [Export ("didFailToRegisterForRemoteNotificationsWithError:")] - void DidFailToRegisterForRemoteNotifications (NSError error); - - [Export ("didReceiveRemoteNotification:fetchCompletionHandler:")] - void DidReceiveRemoteNotification (NSDictionary userInfo, Action completionHandler); - - [Export ("userDidAcceptCloudKitShareWithMetadata:")] - void UserDidAcceptCloudKitShare (CKShareMetadata cloudKitShareMetadata); - } - - [Watch (9, 0), NoiOS] - [BaseType (typeof (WKRefreshBackgroundTask))] - interface WKBluetoothAlertRefreshBackgroundTask { } -} diff --git a/src/webkit.cs b/src/webkit.cs index 35d04998e0a8..08a7e3be2435 100644 --- a/src/webkit.cs +++ b/src/webkit.cs @@ -68,7 +68,7 @@ namespace WebKit { - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (WebScriptObject), Name = "DOMObject")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMObject init]: should never be used @@ -78,7 +78,7 @@ partial interface DomObject : NSCopying { ///////////////////////// // DomObject subclasses - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMAbstractView")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMAbstractView init]: should never be used @@ -87,7 +87,7 @@ partial interface DomAbstractView { DomDocument Document { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMCSSRule")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSRule init]: should never be used @@ -105,7 +105,7 @@ partial interface DomCssRule { DomCssRule ParentRule { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCssRule), Name = "DOMCSSCharsetRule")] [DisableDefaultCtor] @@ -114,7 +114,7 @@ partial interface DomCssCharsetRule { string Encoding { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCssRule), Name = "DOMCSSFontFaceRule")] [DisableDefaultCtor] @@ -123,7 +123,7 @@ partial interface DomCssFontFaceRule { DomCssStyleDeclaration Style { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCssRule), Name = "DOMCSSImportRule")] [DisableDefaultCtor] @@ -138,7 +138,7 @@ partial interface DomImportCssRule { DomCssStyleSheet StyleSheet { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCssRule), Name = "DOMCSSMediaRule")] [DisableDefaultCtor] @@ -156,7 +156,7 @@ partial interface DomCssMediaRule { void DeleteRule (uint index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCssRule), Name = "DOMCSSPageRule")] [DisableDefaultCtor] @@ -168,7 +168,7 @@ partial interface DomCssPageRule { DomCssStyleDeclaration Style { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCssRule), Name = "DOMCSSStyleRule")] [DisableDefaultCtor] @@ -180,14 +180,14 @@ partial interface DomCssStyleRule { DomCssStyleDeclaration Style { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCssRule), Name = "DOMCSSUnknownRule")] [DisableDefaultCtor] partial interface DomCssUnknownRule { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMCSSRuleList")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSRuleList init]: should never be used @@ -199,7 +199,7 @@ partial interface DomCssRuleList { DomCssRule GetItem (int /* unsigned int */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMCSSStyleDeclaration")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSStyleDeclaration init]: should never be used @@ -238,7 +238,7 @@ partial interface DomCssStyleDeclaration { bool IsPropertyImplicit (string propertyName); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomStyleSheet), Name = "DOMCSSStyleSheet")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSStyleSheet init]: should never be used @@ -265,7 +265,7 @@ partial interface DomCssStyleSheet { void RemoveRule (uint /* unsigned int */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMCSSValue")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMCSSValue init]: should never be used @@ -277,7 +277,7 @@ partial interface DomCssValue { DomCssValueType Type { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMHTMLCollection")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLCollection init]: should never be used @@ -295,7 +295,7 @@ partial interface DomHtmlCollection { DomNodeList GetTags (string name); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMImplementation")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMImplementation init]: should never be used @@ -316,7 +316,7 @@ partial interface DomImplementation { DomHtmlDocument CreateHtmlDocument (string title); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMMediaList")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMMediaList init]: should never be used @@ -337,7 +337,7 @@ partial interface DomMediaList { void AppendMedium (string newMedium); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMNamedNodeMap")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMNamedNodeMap init]: should never be used @@ -367,7 +367,7 @@ partial interface DomNamedNodeMap { DomNode RemoveNamedItemNS (string namespaceURI, string localName); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMNode")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMNode init]: should never be used @@ -472,10 +472,10 @@ partial interface DomNode : DomEventTarget { DomDocumentPosition CompareDocumentPosition (DomNode other); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] interface IDomNodeFilter { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] #if NET [Protocol, Model] @@ -489,7 +489,7 @@ interface DomNodeFilter { short AcceptNode (DomNode n); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMNodeIterator")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -522,7 +522,7 @@ interface DomNodeIterator { void Detach (); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMNodeList")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMNodeList init]: should never be used @@ -534,7 +534,7 @@ partial interface DomNodeList { DomNode GetItem (int /* unsigned int */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMRange")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMRange init]: should never be used @@ -630,7 +630,7 @@ partial interface DomRange { bool IsPointInRange (DomNode refNode, int /* int, not NSInteger */ offset); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMStyleSheet")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMStyleSheet init]: should never be used @@ -657,7 +657,7 @@ partial interface DomStyleSheet { DomMediaList Media { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMStyleSheetList")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMStyleSheetList init]: should never be used @@ -672,7 +672,7 @@ partial interface DomStyleSheetList { /////////////////////// // DomNode subclasses - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomNode), Name = "DOMAttr")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMAttr init]: should never be used @@ -693,7 +693,7 @@ partial interface DomAttr { DomCssStyleDeclaration Style { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomNode), Name = "DOMCharacterData")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMCharacterData init]: should never be used @@ -720,7 +720,7 @@ partial interface DomCharacterData { void ReplaceData (uint /* unsigned int */ offset, uint /* unsigned int */ length, string data); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomNode), Name = "DOMDocument")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocument init]: should never be used @@ -966,14 +966,14 @@ partial interface DomDocument { DomNodeList QuerySelectorAll (string selectors); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomNode), Name = "DOMDocumentFragment")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocumentFragment init]: should never be used partial interface DomDocumentFragment { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomNode), Name = "DOMDocumentType")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMDocumentType init]: should never be used @@ -998,7 +998,7 @@ partial interface DomDocumentType { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomNode), Name = "DOMElement")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMElement init]: should never be used @@ -1148,7 +1148,7 @@ partial interface DomElement { void WebKitRequestFullScreen (ushort flags); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomNode), Name = "DOMEntityReference")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMEntityReference init]: should never be used @@ -1157,7 +1157,7 @@ partial interface DomEntityReference { interface IDomEventTarget { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject), Name = "DOMEventTarget")] [Protocol] @@ -1176,7 +1176,7 @@ partial interface DomEventTarget : NSCopying { bool DispatchEvent (DomEvent evt); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMEvent")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMEvent init]: should never be used @@ -1224,7 +1224,7 @@ partial interface DomEvent { // Note: DOMMutationEvent is not bound since it is deprecated // by the W3C to be replaced with Mutation Observers - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomEvent), Name = "DOMOverflowEvent")] [DisableDefaultCtor] @@ -1242,7 +1242,7 @@ partial interface DomOverflowEvent { bool HasVerticalOverflow { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomEvent), Name = "DOMProgressEvent")] [DisableDefaultCtor] @@ -1257,7 +1257,7 @@ partial interface DomProgressEvent { ulong Total { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomEvent), Name = "DOMUIEvent")] [DisableDefaultCtor] @@ -1290,7 +1290,7 @@ partial interface DomUIEvent { int Which { get; } /* int, not NSInteger */ } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomUIEvent), Name = "DOMKeyboardEvent")] [DisableDefaultCtor] @@ -1332,7 +1332,7 @@ partial interface DomKeyboardEvent { int CharCode { get; } /* int, not NSInteger */ } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomUIEvent), Name = "DOMMouseEvent")] [DisableDefaultCtor] @@ -1389,7 +1389,7 @@ partial interface DomMouseEvent { DomNode ToElement { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomMouseEvent), Name = "DOMWheelEvent")] [DisableDefaultCtor] @@ -1410,7 +1410,7 @@ partial interface DomWheelEvent { bool IsHorizontal { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject), Name = "DOMEventListener")] [Model] @@ -1423,7 +1423,7 @@ partial interface DomEventListener { interface IDomEventListener { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCharacterData), Name = "DOMProcessingInstruction")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMProcessingInstruction init]: should never be used @@ -1441,7 +1441,7 @@ partial interface DomProcessingInstruction { //////////////////////////////// // DomCharacterData subclasses - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCharacterData), Name = "DOMText")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMText init]: should never be used @@ -1456,7 +1456,7 @@ partial interface DomText { DomText ReplaceWholeText (string content); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomCharacterData), Name = "DOMComment")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMComment init]: should never be used @@ -1466,7 +1466,7 @@ partial interface DomComment { /////////////////////////// // DomText subclasses - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomText), Name = "DOMCDATASection")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMCDATASection init]: should never be used @@ -1476,7 +1476,7 @@ partial interface DomCDataSection { /////////////////////////// // DomDocument subclasses - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomDocument), Name = "DOMHTMLDocument")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLDocument init]: should never be used @@ -1551,7 +1551,7 @@ partial interface DomHtmlDocument { ////////////////////////// // DomElement subclasses - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLInputElement")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used @@ -1656,7 +1656,7 @@ partial interface DomHtmlInputElement { DomFileList Files { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLTextAreaElement")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used @@ -1708,7 +1708,7 @@ partial interface DomHtmlTextAreaElement { DomHtmlFormElement Form { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomElement), Name = "DOMHTMLElement")] [DisableDefaultCtor] // An uncaught exception was raised: +[DOMHTMLElement init]: should never be used @@ -1755,7 +1755,7 @@ partial interface DomHtmlElement { ////////////////////////////////////////////////////////////////// - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] partial interface WebArchive : NSCoding, NSCopying { @@ -1778,7 +1778,7 @@ partial interface WebArchive : NSCoding, NSCopying { NSData Data { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] partial interface WebBackForwardList { @@ -1826,7 +1826,7 @@ partial interface WebBackForwardList { int Capacity { get; set; } /* int, not NSInteger */ } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] partial interface WebDataSource { @@ -1881,7 +1881,7 @@ partial interface WebDataSource { interface IWebDocumentRepresentation { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] [Model] @@ -1950,7 +1950,7 @@ partial interface WebDocumentRepresentation { // } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSUrlDownload))] partial interface WebDownload { @@ -1958,7 +1958,7 @@ partial interface WebDownload { interface IWebDownloadDelegate { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] [Model] @@ -1968,7 +1968,7 @@ partial interface WebDownloadDelegate { NSWindow OnDownloadWindowForSheet (WebDownload download); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // invalid handle returned @@ -2043,7 +2043,7 @@ partial interface WebFrame { interface IWebFrameLoadDelegate { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [Model] [Protocol (FormalSince = "10.11")] @@ -2095,7 +2095,7 @@ partial interface WebFrameLoadDelegate { void DidCreateJavaScriptContext (WebView webView, JSContext context, WebFrame frame); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSView))] partial interface WebFrameView { @@ -2126,7 +2126,7 @@ partial interface WebFrameView { bool AllowsScrolling { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] interface WebHistory { @@ -2167,7 +2167,7 @@ interface WebHistory { WebHistoryItem GetHistoryItemForUrl (NSUrl url); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] partial interface WebHistoryItem : NSCopying { @@ -2198,7 +2198,7 @@ partial interface WebHistoryItem : NSCopying { NSString ChangedNotification { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] #if NET @@ -2231,7 +2231,7 @@ interface IWebOpenPanelResultListener { } interface IWebPolicyDelegate { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] [Model] @@ -2265,7 +2265,7 @@ partial interface WebPolicyDelegate { NSString WebActionOriginalUrlKey { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] #if NET @@ -2294,7 +2294,7 @@ partial interface WebPolicyDecisionListener { void Ignore (); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] partial interface WebPreferences : NSCoding { @@ -2388,7 +2388,7 @@ partial interface WebPreferences : NSCoding { WebCacheModel CacheModel { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (NSObject))] partial interface WebResource : NSCoding, NSCopying { [Export ("initWithData:URL:MIMEType:textEncodingName:frameName:")] @@ -2412,7 +2412,7 @@ partial interface WebResource : NSCoding, NSCopying { interface IWebResourceLoadDelegate { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] [Model] @@ -2448,7 +2448,7 @@ partial interface WebResourceLoadDelegate { interface IWebUIDelegate { } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] [Model] @@ -2598,7 +2598,7 @@ partial interface WebUIDelegate { CGRect UIGetContentRect (WebView sender); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // crash on dispose, documented as "You can not create a WebScriptObject object directly." @@ -2635,7 +2635,7 @@ partial interface WebScriptObject { JSValue JSValue { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (NSView), Events = new Type [] { @@ -3000,7 +3000,7 @@ partial interface WebView : NSUserInterfaceValidations { void SelectSentence (NSObject sender); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMBlob")] [DisableDefaultCtor] @@ -3009,7 +3009,7 @@ partial interface DomBlob { ulong Size { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomBlob), Name = "DOMFile")] [DisableDefaultCtor] @@ -3018,7 +3018,7 @@ partial interface DomFile { string Name { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMFileList")] [DisableDefaultCtor] @@ -3030,7 +3030,7 @@ partial interface DomFileList { DomFile GetItem (int /* unsigned int */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLFormElement")] [DisableDefaultCtor] @@ -3069,7 +3069,7 @@ partial interface DomHtmlFormElement { void Reset (); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLAnchorElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3137,7 +3137,7 @@ interface DomHtmlAnchorElement { NSUrl AbsoluteImageUrl { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLAppletElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3177,7 +3177,7 @@ interface DomHtmlAppletElement { string Width { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLAreaElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3230,7 +3230,7 @@ interface DomHtmlAreaElement { NSUrl AbsoluteImageUrl { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLBRElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3240,7 +3240,7 @@ interface DomHtmlBRElement { string Clear { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLBaseElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3253,7 +3253,7 @@ interface DomHtmlBaseElement { string Target { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLBaseFontElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3269,7 +3269,7 @@ interface DomHtmlBaseFontElement { string Size { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLBodyElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3294,7 +3294,7 @@ interface DomHtmlBodyElement { string VLink { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLButtonElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3329,7 +3329,7 @@ interface DomHtmlButtonElement { void Click (); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLDListElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3339,7 +3339,7 @@ interface DomHtmlDListElement { bool Compact { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLDirectoryElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3349,7 +3349,7 @@ interface DomHtmlDirectoryElement { bool Compact { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLDivElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3359,7 +3359,7 @@ interface DomHtmlDivElement { string Align { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLEmbedElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3384,7 +3384,7 @@ interface DomHtmlEmbedElement { int Width { get; set; } /* int, not NSInteger */ } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLFieldSetElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3394,7 +3394,7 @@ interface DomHtmlFieldSetElement { DomHtmlFormElement Form { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLFontElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3410,7 +3410,7 @@ interface DomHtmlFontElement { string Size { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLFrameElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3456,7 +3456,7 @@ interface DomHtmlFrameElement { int Height { get; } /* int, not NSInteger */ } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLFrameSetElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3469,7 +3469,7 @@ interface DomHtmlFrameSetElement { string Rows { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLHRElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3488,7 +3488,7 @@ interface DomHtmlHRElement { string Width { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLHeadElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3498,7 +3498,7 @@ interface DomHtmlHeadElement { string Profile { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLHeadingElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3508,7 +3508,7 @@ interface DomHtmlHeadingElement { string Align { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLHtmlElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3518,7 +3518,7 @@ interface DomHtmlHtmlElement { string Version { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLIFrameElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3561,7 +3561,7 @@ interface DomHtmlIFrameElement { DomAbstractView ContentWindow { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLImageElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3628,7 +3628,7 @@ interface DomHtmlImageElement { NSUrl AbsoluteImageUrl { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLLIElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3641,7 +3641,7 @@ interface DomHtmlLIElement { int Value { get; set; } /* int, not NSInteger */ } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLLabelElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3658,7 +3658,7 @@ interface DomHtmlLabelElement { string AccessKey { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLLegendElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3675,7 +3675,7 @@ interface DomHtmlLegendElement { string AccessKey { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLLinkElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3715,7 +3715,7 @@ interface DomHtmlLinkElement { NSUrl AbsoluteImageUrl { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLMapElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3728,7 +3728,7 @@ interface DomHtmlMapElement { string Name { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLMarqueeElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3741,7 +3741,7 @@ interface DomHtmlMarqueeElement { void Stop (); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLMenuElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3751,7 +3751,7 @@ interface DomHtmlMenuElement { bool Compact { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLMetaElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3770,7 +3770,7 @@ interface DomHtmlMetaElement { string Scheme { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLModElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3783,7 +3783,7 @@ interface DomHtmlModElement { string DateTime { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLOListElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3799,7 +3799,7 @@ interface DomHtmlOListElement { string Type { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLObjectElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3863,7 +3863,7 @@ interface DomHtmlObjectElement { NSUrl AbsoluteImageUrl { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLOptGroupElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3876,7 +3876,7 @@ interface DomHtmlOptGroupElement { string Label { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLOptionElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3907,7 +3907,7 @@ interface DomHtmlOptionElement { int Index { get; } /* int, not NSInteger */ } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomObject), Name = "DOMHTMLOptionsCollection")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3932,7 +3932,7 @@ interface DomHtmlOptionsCollection { DomNode GetItem (uint /* unsigned int */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLParagraphElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3942,7 +3942,7 @@ interface DomHtmlParagraphElement { string Align { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLParamElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3961,7 +3961,7 @@ interface DomHtmlParamElement { string ValueType { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLPreElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3974,7 +3974,7 @@ interface DomHtmlPreElement { bool Wrap { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLQuoteElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -3984,7 +3984,7 @@ interface DomHtmlQuoteElement { string Cite { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLScriptElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4012,7 +4012,7 @@ interface DomHtmlScriptElement { string Type { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLSelectElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4067,7 +4067,7 @@ interface DomHtmlSelectElement { void Remove (int /* int, not NSInteger */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLStyleElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4086,7 +4086,7 @@ interface DomHtmlStyleElement { DomStyleSheet Sheet { get; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLTableCaptionElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4096,7 +4096,7 @@ interface DomHtmlTableCaptionElement { string Align { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLTableCellElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4148,7 +4148,7 @@ interface DomHtmlTableCellElement { string Width { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLTableColElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4173,7 +4173,7 @@ interface DomHtmlTableColElement { string Width { get; set; } } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLTableElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4246,7 +4246,7 @@ interface DomHtmlTableElement { void DeleteRow (int /* int, not NSInteger */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Deprecated (PlatformName.MacOSX, 10, 14, message: "No longer supported.")] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLTableRowElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used @@ -4283,7 +4283,7 @@ interface DomHtmlTableRowElement { void DeleteCell (int /* int, not NSInteger */ index); } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [BaseType (typeof (DomHtmlElement), Name = "DOMHTMLTableSectionElement")] [DisableDefaultCtor] // ObjCException: +[ init]: should never be used [Deprecated (PlatformName.MacOSX, 10, 14)] @@ -4876,7 +4876,7 @@ interface WKWebsiteDataType { [Field ("WKWebsiteDataTypeServiceWorkerRegistrations")] NSString ServiceWorkerRegistrations { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Field ("WKWebsiteDataTypeFileSystem")] NSString FileSystem { get; } @@ -4982,7 +4982,7 @@ interface WKWebsiteDataStore : NSSecureCoding { NWProxyConfig [] ProxyConfigurations { get; set; } } - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [NoMacCatalyst] [BaseType (typeof (NSObject))] interface WKOpenPanelParameters { @@ -5017,7 +5017,7 @@ WKWebView CreateWebView (WKWebView webView, WKWebViewConfiguration configuration void RunJavaScriptTextInputPanel (WKWebView webView, string prompt, [NullAllowed] string defaultText, WKFrameInfo frame, Action completionHandler); - [NoiOS, NoWatch, NoTV] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:")] void RunOpenPanel (WKWebView webView, WKOpenPanelParameters parameters, WKFrameInfo frame, Action completionHandler); @@ -5523,28 +5523,28 @@ interface WKWebView [Export ("fullscreenState")] WKFullscreenState FullscreenState { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("minimumViewportInset")] UIEdgeInsets MinimumViewportInset { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("maximumViewportInset")] UIEdgeInsets MaximumViewportInset { get; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("setMinimumViewportInset:maximumViewportInset:")] void SetViewportInsets (UIEdgeInsets minimumViewportInset, UIEdgeInsets maximumViewportInset); - [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoWatch, NoTV] + [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoTV] [Export ("findInteractionEnabled")] bool FindInteractionEnabled { [Bind ("isFindInteractionEnabled")] get; set; } - [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoWatch, NoTV] + [iOS (16, 0), MacCatalyst (16, 0), NoMac, NoTV] [Export ("findInteraction")] [NullAllowed] UIFindInteraction FindInteraction { get; } - [Mac (13, 3), MacCatalyst (16, 4), iOS (16, 4), NoWatch, NoTV] + [Mac (13, 3), MacCatalyst (16, 4), iOS (16, 4), NoTV] [Export ("inspectable")] bool Inspectable { [Bind ("isInspectable")] get; set; } @@ -5832,7 +5832,7 @@ interface WKWebpagePreferences { [Export ("allowsContentJavaScript")] bool AllowsContentJavaScript { get; set; } - [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoWatch, NoTV] + [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), NoTV] [Export ("lockdownModeEnabled")] bool LockdownModeEnabled { [Bind ("isLockdownModeEnabled")] get; set; } diff --git a/src/xkit.cs b/src/xkit.cs index 7c88f8c673bd..6aa374e5d656 100644 --- a/src/xkit.cs +++ b/src/xkit.cs @@ -5,9 +5,7 @@ using System.ComponentModel; using Foundation; using ObjCRuntime; -#if !WATCH using CoreAnimation; -#endif using CoreGraphics; using CoreText; using UniformTypeIdentifiers; @@ -45,13 +43,6 @@ using NSTypesetterBehavior = System.Object; using NSView = System.Object; using NSWindow = System.Object; -#if WATCH -using CATransform3D=System.Object; -using NSTextContainer=System.Object; -using NSTextStorage=System.Object; -using UIDynamicItem=System.Object; -using UITraitCollection = Foundation.NSObject; -#endif // WATCH #else using UICollectionLayoutListConfiguration=System.Object; using UIContentInsetsReference=System.Object; @@ -77,12 +68,8 @@ using CollectionLayoutSectionOrthogonalScrollingBehavior = UIKit.UICollectionLayoutSectionOrthogonalScrollingBehavior; using CollectionElementCategory = UIKit.UICollectionElementCategory; using StringAttributes = UIKit.UIStringAttributes; -#if WATCH -using View=System.Object; -#else using View = UIKit.UIView; #endif -#endif #if MONOMAC using IXWritingToolsCoordinatorDelegate = AppKit.INSWritingToolsCoordinatorDelegate; @@ -152,7 +139,6 @@ namespace UIKit { /// An enumeration whose values specify actions caused by control characters. [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum NSControlCharacterAction : long { ZeroAdvancement = (1 << 0), @@ -178,7 +164,7 @@ public enum NSControlCharacterAction : long { #endif } - [Watch (6, 0), TV (13, 0), iOS (13, 0), MacCatalyst (13, 0)] + [TV (13, 0), iOS (13, 0), MacCatalyst (13, 0)] [Flags] [Native] public enum NSDirectionalRectEdge : ulong { @@ -192,7 +178,6 @@ public enum NSDirectionalRectEdge : ulong { // NSInteger -> NSLayoutManager.h /// An enumeration whose values specify characteristics of a glyph. - [NoWatch] [MacCatalyst (13, 1)] [Native] public enum NSGlyphProperty : long { @@ -206,7 +191,6 @@ public enum NSGlyphProperty : long { /// An enumeration of attributes for use with constraint-based layouts. /// Values used to specify particular constraint attributes in constraint-based layouts. These values are primarily used by methods in the class. [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum NSLayoutAttribute : long { NoAttribute = 0, @@ -256,7 +240,6 @@ public enum NSLayoutAttribute : long { /// [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum NSLayoutFormatOptions : ulong { None = 0, @@ -300,7 +283,6 @@ public enum NSLayoutFormatOptions : ulong { /// An enumeration that specifies the relation between two attributes in a /// Constraint-based layouts are based on relationships between the values of two s. Constraints can be made more flexible by allowing relationships other than strict equality, that is, or . With relations other than the constraint solver will attempt to minimize the difference in attributes. If is specified and the constraint solver cannot solve the system of constraints, the constraint solver will throw an exception. [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum NSLayoutRelation : long { LessThanOrEqual = -1, @@ -312,16 +294,16 @@ public enum NSLayoutRelation : long { [Flags] [Native] public enum NSLineBreakStrategy : ulong { - [iOS (14, 0), TV (14, 0), Watch (7, 0), MacCatalyst (14, 0)] + [iOS (14, 0), TV (14, 0), MacCatalyst (14, 0)] None = 0x0, PushOut = 1uL << 0, - [iOS (14, 0), TV (14, 0), Watch (7, 0), MacCatalyst (14, 0)] + [iOS (14, 0), TV (14, 0), MacCatalyst (14, 0)] HangulWordPriority = 1uL << 1, - [iOS (14, 0), TV (14, 0), Watch (7, 0), MacCatalyst (14, 0)] + [iOS (14, 0), TV (14, 0), MacCatalyst (14, 0)] Standard = 0xffff, } - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Native] public enum NSRectAlignment : long { @@ -347,7 +329,6 @@ public enum NSTextScalingType : long { // NSInteger -> NSLayoutManager.h /// An enumeration whose values specify the direction in which text is laid out. Used with . [Native] - [NoWatch] [MacCatalyst (13, 1)] public enum NSTextLayoutOrientation : long { Horizontal, @@ -358,7 +339,6 @@ public enum NSTextLayoutOrientation : long { /// A flagging enumeration whose values are used by Text Kit to specify whether actions pertain to attributes, characters, or both. [Native] [Flags] - [NoWatch] [MacCatalyst (13, 1)] public enum NSTextStorageEditActions : ulong { Attributes = 1, @@ -367,7 +347,6 @@ public enum NSTextStorageEditActions : ulong { /// [MacCatalyst (13, 1)] - [NoWatch] // Header is not present in watchOS SDK. [DesignatedDefaultCtor] [BaseType (typeof (NSObject))] partial interface NSLayoutManager : NSSecureCoding { @@ -1109,7 +1088,7 @@ partial interface NSLayoutManager : NSSecureCoding { [Export ("temporaryAttributesAtCharacterIndex:effectiveRange:")] NSDictionary GetTemporaryAttributes (nuint characterIndex, out NSRange effectiveCharacterRange); - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("setTemporaryAttributes:forCharacterRange:")] void SetTemporaryAttributes (NSDictionary attrs, NSRange charRange); @@ -1313,7 +1292,6 @@ partial interface NSLayoutManager : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Please use 'UsesDefaultHyphenation' or 'NSParagraphStyle.HyphenationFactor' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Please use 'UsesDefaultHyphenation' or 'NSParagraphStyle.HyphenationFactor' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Please use 'UsesDefaultHyphenation' or 'NSParagraphStyle.HyphenationFactor' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Please use 'UsesDefaultHyphenation' or 'NSParagraphStyle.HyphenationFactor' instead.")] [NoMacCatalyst] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Please use 'UsesDefaultHyphenation' or 'NSParagraphStyle.HyphenationFactor' instead.")] @@ -1440,7 +1418,6 @@ partial interface NSLayoutManager : NSSecureCoding { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use the overload that takes 'nint glyphCount' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use the overload that takes 'nint glyphCount' instead.")] - [Deprecated (PlatformName.WatchOS, 6, 0, message: "Use the overload that takes 'nint glyphCount' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use the overload that takes 'nint glyphCount' instead.")] [NoMacCatalyst] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use the overload that takes 'nint glyphCount' instead.")] @@ -1448,7 +1425,7 @@ partial interface NSLayoutManager : NSSecureCoding { [Export ("showCGGlyphs:positions:count:font:matrix:attributes:inContext:")] void ShowGlyphs (IntPtr glyphs, IntPtr positions, nuint glyphCount, NSFont font, CGAffineTransform textMatrix, NSDictionary attributes, CGContext graphicsContext); - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protected] // Can be overridden [Export ("showCGGlyphs:positions:count:font:textMatrix:attributes:inContext:")] @@ -1490,7 +1467,6 @@ partial interface NSLayoutManager : NSSecureCoding { } [NoiOS] - [NoWatch] [NoTV] [NoMacCatalyst] [Category] @@ -1526,7 +1502,6 @@ interface INSLayoutManagerDelegate { } /// A delegate object that exposes events for s. /// /// Apple documentation for NSLayoutManagerDelegate - [NoWatch] // Header not present in watchOS SDK. [BaseType (typeof (NSObject))] [Model] [Protocol] @@ -1632,7 +1607,7 @@ interface NSLayoutManagerDelegate { bool ShouldSetLineFragmentRect (NSLayoutManager layoutManager, ref CGRect lineFragmentRect, ref CGRect lineFragmentUsedRect, ref nfloat baselineOffset, NSTextContainer textContainer, NSRange glyphRange); } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface NSDiffableDataSourceSnapshot : NSCopying @@ -1778,7 +1753,7 @@ interface NSParagraphStyle : NSSecureCoding, NSMutableCopying { [Export ("hyphenationFactor")] float HyphenationFactor { get; [NotImplemented] set; } // Returns a float, not nfloat. - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("usesDefaultHyphenation")] bool UsesDefaultHyphenation { get; } @@ -1815,7 +1790,7 @@ interface NSParagraphStyle : NSSecureCoding, NSMutableCopying { [Export ("allowsDefaultTighteningForTruncation")] bool AllowsDefaultTighteningForTruncation { get; [NotImplemented] set; } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("textBlocks")] #if NET @@ -1824,16 +1799,16 @@ interface NSParagraphStyle : NSSecureCoding, NSMutableCopying { NSTextTableBlock [] TextBlocks { get; [NotImplemented] set; } #endif - [NoWatch, MacCatalyst (13, 1)] + [MacCatalyst (13, 1)] [Export ("textLists")] NSTextList [] TextLists { get; [NotImplemented] set; } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("tighteningFactorForTruncation")] float TighteningFactorForTruncation { get; [NotImplemented] set; } /* float, not CGFloat */ - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("headerLevel")] nint HeaderLevel { get; [NotImplemented] set; } @@ -1906,7 +1881,7 @@ interface NSMutableParagraphStyle { [Override] float HyphenationFactor { get; set; } // Returns a float, not nfloat. - [Watch (8, 0), TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("usesDefaultHyphenation")] bool UsesDefaultHyphenation { get; set; } @@ -1936,7 +1911,7 @@ interface NSMutableParagraphStyle { [Export ("setParagraphStyle:")] void SetParagraphStyle (NSParagraphStyle paragraphStyle); - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Override] [Export ("textBlocks")] @@ -1946,18 +1921,18 @@ interface NSMutableParagraphStyle { NSTextTableBlock [] TextBlocks { get; set; } #endif - [NoWatch, MacCatalyst (13, 1)] + [MacCatalyst (13, 1)] [Override] [Export ("textLists")] NSTextList [] TextLists { get; set; } - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("tighteningFactorForTruncation")] [Override] float TighteningFactorForTruncation { get; set; } /* float, not CGFloat */ - [NoiOS, NoTV, NoWatch] + [NoiOS, NoTV] [NoMacCatalyst] [Export ("headerLevel")] [Override] @@ -1969,11 +1944,11 @@ interface NSMutableParagraphStyle { NSLineBreakStrategy LineBreakStrategy { get; set; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate NSCollectionLayoutGroupCustomItem [] NSCollectionLayoutGroupCustomItemProvider (INSCollectionLayoutEnvironment layoutEnvironment); - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSCollectionLayoutItem))] [DisableDefaultCtor] @@ -2031,22 +2006,22 @@ interface NSCollectionLayoutGroup : NSCopying { [Export ("visualDescription")] string VisualDescription { get; } - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0)] [Static] [Export ("horizontalGroupWithLayoutSize:repeatingSubitem:count:")] NSCollectionLayoutGroup GetHorizontalGroup (NSCollectionLayoutSize layoutSize, NSCollectionLayoutItem repeatingSubitem, nint count); - [Watch (9, 0), TV (16, 0), iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0), Mac (13, 0)] [Static] [Export ("verticalGroupWithLayoutSize:repeatingSubitem:count:")] NSCollectionLayoutGroup GetVerticalGroup (NSCollectionLayoutSize layoutSize, NSCollectionLayoutItem repeatingSubitem, nint count); } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] delegate void NSCollectionLayoutSectionVisibleItemsInvalidationHandler (INSCollectionLayoutVisibleItem [] visibleItems, CGPoint contentOffset, INSCollectionLayoutEnvironment layoutEnvironment); - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2077,7 +2052,6 @@ interface NSCollectionLayoutSection : NSCopying { [Deprecated (PlatformName.iOS, 16, 0)] [Deprecated (PlatformName.TvOS, 16, 0)] [Deprecated (PlatformName.MacCatalyst, 16, 0)] - [Deprecated (PlatformName.WatchOS, 9, 0)] [Export ("supplementariesFollowContentInsets")] bool SupplementariesFollowContentInsets { get; set; } @@ -2096,22 +2070,22 @@ interface NSCollectionLayoutSection : NSCopying { NSCollectionLayoutSection GetSection (UICollectionLayoutListConfiguration listConfiguration, INSCollectionLayoutEnvironment layoutEnvironment); // NSCollectionLayoutSection (TVMediaItemContentConfiguration) category - [TV (15, 0), NoWatch, NoMac, NoiOS, NoMacCatalyst] + [TV (15, 0), NoMac, NoiOS, NoMacCatalyst] [Static] [Export ("orthogonalLayoutSectionForMediaItems")] NSCollectionLayoutSection GetOrthogonalLayoutSectionForMediaItems (); - [Watch (9, 0), TV (16, 0), iOS (16, 0), NoMac] + [TV (16, 0), iOS (16, 0), NoMac] [MacCatalyst (16, 0)] [Export ("supplementaryContentInsetsReference", ArgumentSemantic.Assign)] UIContentInsetsReference SupplementaryContentInsetsReference { get; set; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoMac] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoMac] [Export ("orthogonalScrollingProperties")] UICollectionLayoutSectionOrthogonalScrollingProperties OrthogonalScrollingProperties { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2133,7 +2107,7 @@ interface NSCollectionLayoutGroupCustomItem : NSCopying { interface INSCollectionLayoutContainer { } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface NSCollectionLayoutContainer { @@ -2156,7 +2130,7 @@ interface NSCollectionLayoutContainer { interface INSCollectionLayoutEnvironment { } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface NSCollectionLayoutEnvironment { @@ -2174,11 +2148,11 @@ interface NSCollectionLayoutEnvironment { interface INSCollectionLayoutVisibleItem { } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Protocol] interface NSCollectionLayoutVisibleItem -#if !MONOMAC && !WATCH +#if !MONOMAC : UIDynamicItem #endif { @@ -2199,7 +2173,6 @@ interface NSCollectionLayoutVisibleItem // Inherited from UIDynamicItem for !MONOMAC [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Abstract] [Export ("center", ArgumentSemantic.Assign)] @@ -2209,7 +2182,6 @@ interface NSCollectionLayoutVisibleItem #pragma warning disable 0109 // warning CS0109: The member 'NSCollectionLayoutVisibleItem.Bounds' does not hide an accessible member. The new keyword is not required. [NoiOS] [NoMacCatalyst] - [NoWatch] [NoTV] [Abstract] [Export ("bounds")] @@ -2246,7 +2218,6 @@ CollectionElementCategory RepresentedElementCategory { } /// - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] // Handle is nil @@ -2296,28 +2267,24 @@ interface NSLayoutAnchor : NSCopying, NSCoding { [NoiOS] [NoMacCatalyst] [NoTV] - [NoWatch] [Export ("name")] string Name { get; } [NoiOS] [NoMacCatalyst] [NoTV] - [NoWatch] [NullAllowed, Export ("item", ArgumentSemantic.Weak)] NSObject Item { get; } [NoiOS] [NoMacCatalyst] [NoTV] - [NoWatch] [Export ("hasAmbiguousLayout")] bool HasAmbiguousLayout { get; } [NoiOS] [NoMacCatalyst] [NoTV] - [NoWatch] [Export ("constraintsAffectingLayout")] NSLayoutConstraint [] ConstraintsAffectingLayout { get; } } @@ -2325,7 +2292,6 @@ interface NSLayoutAnchor : NSCopying, NSCoding { /// An whose methods create horizontal objects. /// /// Apple documentation for NSLayoutXAxisAnchor - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSLayoutAnchor))] [DisableDefaultCtor] // Handle is nil @@ -2354,7 +2320,6 @@ interface NSLayoutXAxisAnchor { /// An whose methods create vertical objects. /// /// Apple documentation for NSLayoutYAxisAnchor - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSLayoutAnchor))] [DisableDefaultCtor] // Handle is nil @@ -2383,7 +2348,6 @@ interface NSLayoutYAxisAnchor { /// An whose methods create dimensional objects. /// /// Apple documentation for NSLayoutDimension - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSLayoutAnchor))] [DisableDefaultCtor] // Handle is nil @@ -2453,7 +2417,6 @@ interface NSLayoutDimension { } /// - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] interface NSLayoutConstraint @@ -2535,14 +2498,12 @@ interface NSLayoutConstraint /// Defines the relationship between s and a . /// /// Apple documentation for NSTextAttachmentContainer - [NoWatch] [Introduced (PlatformName.iOS)] [MacCatalyst (13, 1)] [Model] [Protocol] [BaseType (typeof (NSObject))] partial interface NSTextAttachmentContainer { - [NoWatch] [MacCatalyst (13, 1)] [Abstract] [Export ("imageForBounds:textContainer:characterIndex:")] @@ -2553,7 +2514,6 @@ partial interface NSTextAttachmentContainer { Image GetImageForBounds (CGRect bounds, [NullAllowed] NSTextContainer textContainer, nuint characterIndex); #endif - [NoWatch] [MacCatalyst (13, 1)] [Abstract] [Export ("attachmentBoundsForTextContainer:proposedLineFragment:glyphPosition:characterIndex:")] @@ -2565,12 +2525,11 @@ partial interface NSTextAttachmentContainer { /// /// Apple documentation for NSTextAttachment [MacCatalyst (13, 1)] - [NoWatch] [BaseType (typeof (NSObject))] partial interface NSTextAttachment : NSTextAttachmentContainer, NSSecureCoding, NSTextAttachmentLayout -#if !WATCH && !MONOMAC +#if !MONOMAC , UIAccessibilityContentSizeCategoryImageAdjusting -#endif // !WATCH +#endif // !MONOMAC { [NoiOS] [NoTV] @@ -2614,55 +2573,52 @@ partial interface NSTextAttachment : NSTextAttachmentContainer, NSSecureCoding, NSTextAttachmentCell AttachmentCell { get; set; } [NoMac] - [Watch (6, 0), TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Static] [Export ("textAttachmentWithImage:")] NSTextAttachment Create (Image image); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("lineLayoutPadding")] nfloat LineLayoutPadding { get; set; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("textAttachmentViewProviderClassForFileType:")] [return: NullAllowed] Class GetTextAttachmentViewProviderClass (string fileType); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Static] [Export ("registerTextAttachmentViewProviderClass:forFileType:")] void RegisterViewProviderClass (Class textAttachmentViewProviderClass, string fileType); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("allowsTextAttachmentView")] bool AllowsTextAttachmentView { get; set; } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Export ("usesTextAttachmentView")] bool UsesTextAttachmentView { get; } } - [TV (15, 0), Watch (9, 0), iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [MacCatalyst (15, 0)] [Protocol] interface NSTextAttachmentLayout { - [NoWatch] [MacCatalyst (15, 0)] [Abstract] [Export ("imageForBounds:attributes:location:textContainer:")] [return: NullAllowed] Image GetImageForBounds (CGRect bounds, NSDictionary attributes, INSTextLocation location, [NullAllowed] NSTextContainer textContainer); - [NoWatch] [MacCatalyst (15, 0)] [Abstract] [Export ("attachmentBoundsForAttributes:location:textContainer:proposedLineFragment:position:")] CGRect GetAttachmentBounds (NSDictionary attributes, INSTextLocation location, [NullAllowed] NSTextContainer textContainer, CGRect proposedLineFragment, CGPoint position); - [NoWatch] [MacCatalyst (15, 0)] [Abstract] [Export ("viewProviderForParentView:location:textContainer:")] @@ -2671,7 +2627,6 @@ interface NSTextAttachmentLayout { } /// - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSMutableAttributedString), Delegates = new string [] { "Delegate" }, Events = new Type [] { typeof (NSTextStorageDelegate) })] partial interface NSTextStorage : NSSecureCoding { @@ -2771,7 +2726,6 @@ interface INSTextStorageDelegate { } /// A delegate object that provides events relating to processing editing for . /// /// Apple documentation for NSTextStorageDelegate - [NoWatch] [MacCatalyst (13, 1)] [Model] [BaseType (typeof (NSObject))] @@ -2802,7 +2756,7 @@ partial interface NSTextStorageDelegate { void DidProcessEditing (NSTextStorage textStorage, NSTextStorageEditActions editedMask, NSRange editedRange, nint delta); } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2832,7 +2786,7 @@ interface NSCollectionLayoutAnchor : NSCopying, INSCopying { bool IsFractionalOffset { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2884,18 +2838,18 @@ interface NSCollectionLayoutDimension : NSCopying { [Export ("dimension")] nfloat Dimension { get; } - [Watch (10, 0), TV (17, 0), iOS (17, 0), NoMac, MacCatalyst (17, 0)] + [TV (17, 0), iOS (17, 0), NoMac, MacCatalyst (17, 0)] [Static] [Export ("uniformAcrossSiblingsWithEstimate:")] NSCollectionLayoutDimension CreateUniformAcrossSiblings (nfloat estimatedDimension); - [Watch (10, 0), TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoMac] + [TV (17, 0), iOS (17, 0), MacCatalyst (17, 0), NoMac] [Export ("isUniformAcrossSiblings")] bool IsUniformAcrossSiblings { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2911,7 +2865,7 @@ interface NSCollectionLayoutSize : NSCopying { NSCollectionLayoutDimension HeightDimension { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2942,7 +2896,7 @@ interface NSCollectionLayoutSpacing : NSCopying { bool IsFixedSpacing { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -2968,7 +2922,7 @@ interface NSCollectionLayoutEdgeSpacing : NSCopying { NSCollectionLayoutSpacing Bottom { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSCollectionLayoutItem))] [DisableDefaultCtor] @@ -2994,7 +2948,7 @@ interface NSCollectionLayoutSupplementaryItem : NSCopying { NSCollectionLayoutAnchor ItemAnchor { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] @@ -3020,7 +2974,7 @@ interface NSCollectionLayoutItem : NSCopying { NSCollectionLayoutSupplementaryItem [] SupplementaryItems { get; } } - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [BaseType (typeof (NSCollectionLayoutSupplementaryItem))] [DisableDefaultCtor] @@ -3047,7 +3001,7 @@ interface NSCollectionLayoutBoundarySupplementaryItem : NSCopying { } [MacCatalyst (13, 1)] - [NoWatch, TV (13, 0), iOS (13, 0)] + [TV (13, 0), iOS (13, 0)] [BaseType (typeof (NSCollectionLayoutItem))] [DisableDefaultCtor] interface NSCollectionLayoutDecorationItem : NSCopying { @@ -3090,14 +3044,12 @@ interface NSDataAsset : NSCopying { /// /// Apple documentation for NSShadow [MacCatalyst (13, 1)] - [Watch (6, 0)] [BaseType (typeof (NSObject))] [DesignatedDefaultCtor] interface NSShadow : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] [NoTV] - [NoWatch] [Export ("set")] void Set (); @@ -3129,7 +3081,6 @@ interface NSTextTab : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] [NoTV] - [NoWatch] [Export ("initWithType:location:")] NativeHandle Constructor (NSTextTabType type, nfloat location); @@ -3145,7 +3096,6 @@ interface NSTextTab : NSSecureCoding, NSCopying { [NoiOS] [NoMacCatalyst] [NoTV] - [NoWatch] [Export ("tabStopType")] NSTextTabType TabStopType { get; } @@ -3159,7 +3109,6 @@ interface NSTextTab : NSSecureCoding, NSCopying { } [MacCatalyst (13, 1)] - [NoWatch] [Protocol] // no [Model] since it's not exposed in any API // only NSTextContainer conforms to it but it's only queried by iOS itself @@ -3172,7 +3121,6 @@ NSTextLayoutOrientation LayoutOrientation { } /// - [NoWatch] [MacCatalyst (13, 1)] [BaseType (typeof (NSObject))] partial interface NSTextContainer : NSTextLayoutOrientationProvider, NSSecureCoding { @@ -3287,7 +3235,7 @@ interface NSExtendedStringDrawing { CGRect GetBoundingRect (CGSize size, NSStringDrawingOptions options, StringAttributes attributes, [NullAllowed] NSStringDrawingContext context); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -3306,7 +3254,7 @@ interface NSTextLayoutManagerDelegate { NSDictionary GetRenderingAttributes (NSTextLayoutManager textLayoutManager, NSObject link, INSTextLocation location, NSDictionary renderingAttributes); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextLayoutManagerSegmentType : long { Standard = 0, @@ -3314,7 +3262,7 @@ public enum NSTextLayoutManagerSegmentType : long { Highlight = 2, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum NSTextLayoutManagerSegmentOptions : ulong { @@ -3326,7 +3274,7 @@ public enum NSTextLayoutManagerSegmentOptions : ulong { UpstreamAffinity = (1uL << 4), } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum NSTextLayoutFragmentEnumerationOptions : ulong { @@ -3339,13 +3287,13 @@ public enum NSTextLayoutFragmentEnumerationOptions : ulong { interface INSTextLayoutManagerDelegate { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate bool NSTextLayoutManagerEnumerateRenderingAttributesDelegate (NSTextLayoutManager textLayoutManager, NSDictionary attributes, NSTextRange textRange); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate bool NSTextLayoutManagerEnumerateTextSegmentsDelegate (NSTextRange textSegmentRange, CGRect textSegmentFrame, nfloat baselinePosition, NSTextContainer textContainer); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [DesignatedDefaultCtor] [BaseType (typeof (NSObject))] interface NSTextLayoutManager : NSSecureCoding, NSTextSelectionDataSource { @@ -3445,7 +3393,7 @@ interface NSTextLayoutManager : NSSecureCoding, NSTextSelectionDataSource { void ReplaceContents (NSTextRange range, NSAttributedString attributedString); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum NSTextContentManagerEnumerationOptions : ulong { @@ -3453,7 +3401,7 @@ public enum NSTextContentManagerEnumerationOptions : ulong { Reverse = (1uL << 0), } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -3469,7 +3417,7 @@ interface NSTextContentManagerDelegate { bool ShouldEnumerateTextElement (NSTextContentManager textContentManager, NSTextElement textElement, NSTextContentManagerEnumerationOptions options); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Protocol] interface NSTextElementProvider { [Abstract] @@ -3503,7 +3451,7 @@ interface NSTextElementProvider { interface INSTextContentManagerDelegate { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextContentManager : NSTextElementProvider, NSSecureCoding { @@ -3560,7 +3508,7 @@ interface NSTextContentManager : NSTextElementProvider, NSSecureCoding { interface INSTextLocation { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Protocol] interface NSTextLocation { [Abstract] @@ -3568,7 +3516,7 @@ interface NSTextLocation { NSComparisonResult Compare (INSTextLocation location); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] interface NSTextElement { [Export ("initWithTextContentManager:")] @@ -3581,20 +3529,20 @@ interface NSTextElement { [NullAllowed, Export ("elementRange", ArgumentSemantic.Strong)] NSTextRange ElementRange { get; set; } - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("childElements", ArgumentSemantic.Copy)] NSTextElement [] ChildElements { get; } - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [NullAllowed, Export ("parentElement", ArgumentSemantic.Weak)] NSTextElement ParentElement { get; } - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("isRepresentedElement")] bool IsRepresentedElement { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSTextElement))] interface NSTextParagraph { [Export ("initWithAttributedString:")] @@ -3615,7 +3563,7 @@ interface NSTextParagraph { NSTextRange ParagraphSeparatorRange { get; } } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextLineFragment : NSSecureCoding { @@ -3651,7 +3599,7 @@ interface NSTextLineFragment : NSSecureCoding { nfloat GetFractionOfDistanceThroughGlyph (CGPoint point); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextLayoutFragmentState : ulong { None = 0, @@ -3660,7 +3608,7 @@ public enum NSTextLayoutFragmentState : ulong { LayoutAvailable = 3, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextAttachmentViewProvider { @@ -3690,7 +3638,7 @@ interface NSTextAttachmentViewProvider { CGRect GetAttachmentBounds (NSDictionary attributes, INSTextLocation location, [NullAllowed] NSTextContainer textContainer, CGRect proposedLineFragment, CGPoint position); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextLayoutFragment : NSSecureCoding { @@ -3757,7 +3705,7 @@ interface NSTextLayoutFragment : NSSecureCoding { NSTextLineFragment GetTextLineFragment (INSTextLocation textLocation, bool isUpstreamAffinity); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextRange { @@ -3799,7 +3747,7 @@ interface NSTextRange { interface INSTextViewportLayoutControllerDelegate { } - [TV (15, 0), NoWatch, iOS (15, 0)] + [TV (15, 0), iOS (15, 0)] [MacCatalyst (15, 0)] #if NET [Protocol, Model] @@ -3823,7 +3771,7 @@ interface NSTextViewportLayoutControllerDelegate { void DidLayout (NSTextViewportLayoutController textViewportLayoutController); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextViewportLayoutController { @@ -3857,7 +3805,7 @@ interface NSTextViewportLayoutController { void AdjustViewport (nfloat verticalOffset); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextSelectionGranularity : long { Character, @@ -3867,7 +3815,7 @@ public enum NSTextSelectionGranularity : long { Sentence, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextSelectionAffinity : long { Upstream = 0, @@ -3875,7 +3823,7 @@ public enum NSTextSelectionAffinity : long { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextSelection : NSSecureCoding { @@ -3917,30 +3865,30 @@ interface NSTextSelection : NSSecureCoding { NSTextSelection GetTextSelection (NSTextRange [] textRanges); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSTextSelectionDataSourceEnumerateSubstringsDelegate (NSString substring, NSTextRange substringRange, NSTextRange enclodingRange, out bool stop); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSTextSelectionDataSourceEnumerateCaretOffsetsDelegate (nfloat caretOffset, INSTextLocation location, bool leadingEdge, out bool stop); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] delegate void NSTextSelectionDataSourceEnumerateContainerBoundariesDelegate (INSTextLocation location, out bool stop); - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextSelectionNavigationLayoutOrientation : long { Horizontal = 0, Vertical = 1, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextSelectionNavigationWritingDirection : long { LeftToRight = 0, RightToLeft = 1, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -3990,7 +3938,7 @@ interface NSTextSelectionDataSource { NSTextSelectionNavigationLayoutOrientation GetTextLayoutOrientation (INSTextLocation location); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextSelectionNavigationDirection : long { Forward, @@ -4001,7 +3949,7 @@ public enum NSTextSelectionNavigationDirection : long { Down, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Native] public enum NSTextSelectionNavigationDestination : long { Character, @@ -4013,7 +3961,7 @@ public enum NSTextSelectionNavigationDestination : long { Document, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Flags] [Native] public enum NSTextSelectionNavigationModifier : ulong { @@ -4024,7 +3972,7 @@ public enum NSTextSelectionNavigationModifier : ulong { interface INSTextSelectionDataSource { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSTextSelectionNavigation { @@ -4070,7 +4018,7 @@ interface NSTextSelectionNavigation { NSTextRange [] GetDeletionRanges (NSTextSelection textSelection, NSTextSelectionNavigationDirection direction, NSTextSelectionNavigationDestination destination, bool allowsDecomposition); } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] #if NET [Protocol, Model] #else @@ -4087,7 +4035,7 @@ interface INSTextContentStorageDelegate { } interface INSTextStorageObserving { } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [Protocol] interface NSTextStorageObserving { [Abstract] @@ -4103,7 +4051,7 @@ interface NSTextStorageObserving { void PerformEditingTransaction (NSTextStorage textStorage, Action transaction); } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] enum NSTextListMarkerFormats { [DefaultEnumValue] [Field (null)] @@ -4178,7 +4126,7 @@ enum NSTextListMarkerFormats { Decimal, } - [NoWatch, TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), iOS (16, 0), MacCatalyst (16, 0)] [Flags] [Native] public enum NSTextListOptions : ulong { @@ -4186,7 +4134,7 @@ public enum NSTextListOptions : ulong { PrependEnclosingMarker = 1, } - [TV (15, 0), NoWatch, iOS (15, 0), MacCatalyst (15, 0)] + [TV (15, 0), iOS (15, 0), MacCatalyst (15, 0)] [BaseType (typeof (NSTextContentManager))] interface NSTextContentStorage : NSTextStorageObserving { [Wrap ("WeakDelegate")] @@ -4219,7 +4167,7 @@ interface NSTextContentStorage : NSTextStorageObserving { NSTextRange GetAdjustedRange (NSTextRange textRange, bool forEditingTextSelection); } - [NoWatch, MacCatalyst (13, 0)] + [MacCatalyst (13, 0)] [BaseType (typeof (NSObject))] interface NSTextList : NSCoding, NSCopying, NSSecureCoding { [Export ("initWithMarkerFormat:options:")] @@ -4250,7 +4198,7 @@ interface NSTextList : NSCoding, NSCopying, NSSecureCoding { [Export ("markerFormat")] string CustomMarkerFormat { get; } - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("initWithMarkerFormat:options:startingItemNumber:")] [DesignatedInitializer] NativeHandle Constructor (string markerFormat, NSTextListOptions options, nint startingItemNumber); @@ -4265,13 +4213,13 @@ interface NSTextList : NSCoding, NSCopying, NSSecureCoding { [Export ("startingItemNumber")] nint StartingItemNumber { get; set; } - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [Export ("ordered")] bool Ordered { [Bind ("isOrdered")] get; } } - [TV (16, 0), NoWatch, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] + [TV (16, 0), Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] [BaseType (typeof (NSTextParagraph))] interface NSTextListElement { [Export ("initWithAttributedString:")] @@ -4331,27 +4279,27 @@ enum NSAttributedStringDocumentType { [Field ("NSHTMLTextDocumentType")] Html = NSDocumentType.HTML, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSMacSimpleTextDocumentType")] MacSimple = NSDocumentType.MacSimpleText, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSDocFormatTextDocumentType")] DocFormat = NSDocumentType.DocFormat, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSWordMLTextDocumentType")] WordML = NSDocumentType.WordML, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSWebArchiveTextDocumentType")] WebArchive = NSDocumentType.WebArchive, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSOfficeOpenXMLTextDocumentType")] OfficeOpenXml = NSDocumentType.OfficeOpenXml, - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSOpenDocumentTextDocumentType")] OpenDocument = NSDocumentType.OpenDocument, } @@ -4362,63 +4310,63 @@ interface NSAttributedStringDocumentAttributeKey { [Field ("NSDocumentTypeDocumentAttribute")] NSString DocumentTypeDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSConvertedDocumentAttribute")] NSString ConvertedDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSFileTypeDocumentAttribute")] NSString FileTypeDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSTitleDocumentAttribute")] NSString TitleDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSCompanyDocumentAttribute")] NSString CompanyDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSCopyrightDocumentAttribute")] NSString CopyrightDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSSubjectDocumentAttribute")] NSString SubjectDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSAuthorDocumentAttribute")] NSString AuthorDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSKeywordsDocumentAttribute")] NSString KeywordsDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSCommentDocumentAttribute")] NSString CommentDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSEditorDocumentAttribute")] NSString EditorDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSCreationTimeDocumentAttribute")] NSString CreationTimeDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSModificationTimeDocumentAttribute")] NSString ModificationTimeDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSManagerDocumentAttribute")] NSString ManagerDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSCategoryDocumentAttribute")] NSString CategoryDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSAppearanceDocumentAttribute")] NSString AppearanceDocumentAttribute { get; } @@ -4436,19 +4384,19 @@ interface NSAttributedStringDocumentAttributeKey { [Field ("NSPaperMarginDocumentAttribute")] NSString PaperMarginDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSLeftMarginDocumentAttribute")] NSString LeftMarginDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSRightMarginDocumentAttribute")] NSString RightMarginDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSTopMarginDocumentAttribute")] NSString TopMarginDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSBottomMarginDocumentAttribute")] NSString BottomMarginDocumentAttribute { get; } @@ -4476,35 +4424,35 @@ interface NSAttributedStringDocumentAttributeKey { [Field ("NSTextLayoutSectionsAttribute")] NSString TextLayoutSectionsAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSExcludedElementsDocumentAttribute")] NSString ExcludedElementsDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSTextEncodingNameDocumentAttribute")] NSString TextEncodingNameDocumentAttribute { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSPrefixSpacesDocumentAttribute")] NSString PrefixSpacesDocumentAttribute { get; } [Field ("NSTextScalingDocumentAttribute")] - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] NSString TextScalingDocumentAttribute { get; } [Field ("NSSourceTextScalingDocumentAttribute")] - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] NSString SourceTextScalingDocumentAttribute { get; } [Field ("NSCocoaVersionDocumentAttribute")] - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] NSString CocoaVersionDocumentAttribute { get; } [Field ("NSDefaultFontExcludedDocumentAttribute")] - [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] NSString DefaultFontExcludedDocumentAttribute { get; } } @@ -4522,35 +4470,33 @@ interface NSAttributedStringDocumentReadingOptions { NSStringEncoding CharacterEncoding { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] WebPreferences WebPreferences { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] NSObject WebResourceLoadDelegate { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] NSUrl BaseUrl { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] string TextEncodingName { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] float TextSizeMultiplier { get; set; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] float Timeout { get; set; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] NSTextScalingType TargetTextScaling { get; set; } [iOS (13, 0)] [TV (13, 0)] - [Watch (6, 0)] NSTextScalingType SourceTextScaling { get; set; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] bool TextKit1ListMarkerFormat { get; set; } } @@ -4569,51 +4515,51 @@ interface NSAttributedStringDocumentReadingOptionKey { [Field ("NSCharacterEncodingDocumentOption")] NSString CharacterEncodingDocumentOption { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSWebPreferencesDocumentOption")] NSString WebPreferencesDocumentOption { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSWebResourceLoadDelegateDocumentOption")] NSString WebResourceLoadDelegateDocumentOption { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSBaseURLDocumentOption")] NSString BaseUrlDocumentOption { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSTextEncodingNameDocumentOption")] NSString TextEncodingNameDocumentOption { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSTextSizeMultiplierDocumentOption")] NSString TextSizeMultiplierDocumentOption { get; } - [NoiOS, NoTV, NoWatch, NoMacCatalyst] + [NoiOS, NoTV, NoMacCatalyst] [Field ("NSTimeoutDocumentOption")] NSString TimeoutDocumentOption { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Field ("NSTargetTextScalingDocumentOption")] NSString TargetTextScalingDocumentOption { get; } - [iOS (13, 0), TV (13, 0), Watch (6, 0)] + [iOS (13, 0), TV (13, 0)] [MacCatalyst (13, 1)] [Field ("NSSourceTextScalingDocumentOption")] NSString SourceTextScalingDocumentOption { get; } // comes from webkit - [iOS (13, 0), MacCatalyst (13, 1), NoTV, NoWatch] + [iOS (13, 0), MacCatalyst (13, 1), NoTV] [Field ("NSReadAccessURLDocumentOption", "WebKit")] NSString ReadAccessUrlDocumentOption { get; } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Field ("NSTextKit1ListMarkerFormatDocumentOption")] NSString TextKit1ListMarkerFormatDocumentOption { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface NSAdaptiveImageGlyph : NSCopying, NSSecureCoding, CTAdaptiveImageProviding { @@ -4635,14 +4581,14 @@ interface NSAdaptiveImageGlyph : NSCopying, NSSecureCoding, CTAdaptiveImageProvi UTType ContentType { get; } } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum NSTextHighlightStyle { [DefaultEnumValue] [Field ("NSTextHighlightStyleDefault")] Default, } - [Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] + [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] enum NSTextHighlightColorScheme { [DefaultEnumValue] [Field ("NSTextHighlightColorSchemeDefault")] diff --git a/tests/Makefile b/tests/Makefile index ffb9a5621d95..23b0f204d862 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -133,18 +133,13 @@ all-local:: xharness $(TOP)/tools/common/SdkVersions.cs: $(TOP)/tools/common/SdkVersions.in.cs @$(MAKE) -C $(TOP)/tools/mtouch ../common/SdkVersions.cs -.stamp-src-project-files: - @$(MAKE) -C $(TOP)/src project-files - @touch $@ - +-include xharness/xharness.csproj.inc $(XHARNESS_EXECUTABLE): MSBUILD_EXE_PATH= -$(XHARNESS_EXECUTABLE): $(xharness_dependencies) test.config test-system.config .stamp-src-project-files $(TOP)/tools/common/SdkVersions.cs +$(XHARNESS_EXECUTABLE): $(xharness_dependencies) test.config test-system.config $(TOP)/tools/common/SdkVersions.cs $(Q_GEN) $(DOTNET) build "/bl:$@.binlog" $(MSBUILD_VERBOSITY_QUIET) xharness/xharness.csproj xharness/xharness.csproj.inc: export BUILD_VERBOSITY=$(DOTNET_BUILD_VERBOSITY) -xharness/xharness.csproj.inc: export ABSOLUTE_PATHS=1 xharness/xharness.csproj.inc: export DOTNET:=$(DOTNET) xharness/xharness.csproj.inc: export MSBUILD_EXE_PATH= --include xharness/xharness.csproj.inc killall: @killall "iPhone Simulator" >/dev/null 2>&1 || true @@ -178,18 +173,12 @@ else endif jenkins: $(XHARNESS_EXECUTABLE) - $(Q) $(DOTNET) $< $(XHARNESS_VERBOSITY) --jenkins --autoconf --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --markdown-summary=$(abspath $(CURDIR))/TestSummary.md --use-system=true $(TESTS_EXTRA_ARGUMENTS) $(TESTS_PERIODIC_COMMAND) + $(Q) $(DOTNET) $< $(XHARNESS_VERBOSITY) --jenkins --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --markdown-summary=$(abspath $(CURDIR))/TestSummary.md --use-system=true $(TESTS_EXTRA_ARGUMENTS) $(TESTS_PERIODIC_COMMAND) # This will launch xharness' interactive test runner in the system's default browser runner: $(XHARNESS_EXECUTABLE) @echo "Running xharness in server mode. Press Ctrl-C to exit (or click Quit / press Q in the browser page)" - $(Q) $(DOTNET) $< $(XHARNESS_VERBOSITY) --jenkins:server --autoconf --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) - -# This makefile target will run the device tests using the Xamarin.iOS version -# installed on the system. -vsts-device-tests: $(XHARNESS_EXECUTABLE) - $(MAKE) -C $(TOP)/builds download -j - $(Q) ulimit -n 4096 && $(DOTNET) $< $(XHARNESS_VERBOSITY) --jenkins --autoconf --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) --use-system:true --label=skip-all-tests,run-device-tests --markdown-summary=$(CURDIR)/TestSummary.md $(TESTS_EXTRA_ARGUMENTS) $(TESTS_PERIODIC_COMMAND) + $(Q) $(DOTNET) $< $(XHARNESS_VERBOSITY) --jenkins:server --rootdir $(CURDIR) --sdkroot $(XCODE_DEVELOPER_ROOT) verify-system-vsmac-xcode-match: @SYSTEM_XCODE=$$(dirname $$(dirname $$(xcode-select -p))); \ diff --git a/tests/bgen/bgen-tests.csproj b/tests/bgen/bgen-tests.csproj index cef7c5856f16..3d7e7fd837b8 100644 --- a/tests/bgen/bgen-tests.csproj +++ b/tests/bgen/bgen-tests.csproj @@ -15,6 +15,7 @@ + diff --git a/tests/bindings-test/ApiDefinition.cs b/tests/bindings-test/ApiDefinition.cs index 349eb550a6b3..d3b481cc71af 100644 --- a/tests/bindings-test/ApiDefinition.cs +++ b/tests/bindings-test/ApiDefinition.cs @@ -487,7 +487,6 @@ interface ProtocolWithBlockProperties { } interface IProtocolWithBlockProperties { } -#if NET [BaseType (typeof (NSObject))] interface SwiftTestClass { [Export ("SayHello")] @@ -508,5 +507,10 @@ interface SwiftTestClass { // provide an actual argument when calling the method. void DoSomethingComplexAsync (string message, IntPtr complexParameter, Action completionHandler); } -#endif + + [BaseType (typeof (SwiftTestClass), IsStubClass = true)] + interface SwiftTestClass2 { + [Export ("SayHello2")] + string SayHello2 (); + } } diff --git a/tests/bindings-test/RuntimeTest.cs b/tests/bindings-test/RuntimeTest.cs index ddc385b1a05c..5279e0dbc5ce 100644 --- a/tests/bindings-test/RuntimeTest.cs +++ b/tests/bindings-test/RuntimeTest.cs @@ -96,7 +96,6 @@ public override void AssertMainThreadBlockReleaseCallback (InnerBlock completion } } -#if NET [Test] public void SwiftTest () { @@ -125,6 +124,13 @@ public void SwiftTypeEncodings () Assert.AreEqual ("fish", asyncResult, "DoSomethingComplexAsync"); Assert.IsTrue (done, "Done 2"); } -#endif + + [Test] + public void SwiftTestClass2 () + { + TestRuntime.AssertXcodeVersion (13, 0); + using var obj = new SwiftTestClass2 (); + Assert.AreEqual ("Hello from Swift 2", obj.SayHello2 (), "Hello"); + } } } diff --git a/tests/bindings-test/dotnet/shared.csproj b/tests/bindings-test/dotnet/shared.csproj index 38b67f3715dd..4a6a2579af4a 100644 --- a/tests/bindings-test/dotnet/shared.csproj +++ b/tests/bindings-test/dotnet/shared.csproj @@ -45,6 +45,11 @@ Framework true + + + Framework + true + diff --git a/tests/cecil-tests/ApiAvailabilityTest.cs b/tests/cecil-tests/ApiAvailabilityTest.cs index d932cb7d8a0d..989251215106 100644 --- a/tests/cecil-tests/ApiAvailabilityTest.cs +++ b/tests/cecil-tests/ApiAvailabilityTest.cs @@ -428,6 +428,8 @@ bool SkipSupportedAndObsoleteAtTheSameTime (ICustomAttributeProvider api, AppleP case "SceneKit.SCNAnimationPlayer.RemoveAnimation(Foundation.NSString, System.Runtime.InteropServices.NFloat)": case "SceneKit.SCNAnimationPlayer.ResumeAnimation(Foundation.NSString)": case "System.Boolean PdfKit.PdfView::EnableDataDetectors()": // added in tvOS 18.2, when it was already obsoleted on other platforms. + case "System.Boolean AVFoundation.AVCaptureConnection::SupportsVideoOrientation()": // added in tvOS 17.0, when it was already obsoleted on other platforms. + case "AVFoundation.AVCapturePhoto.GetFileDataRepresentation(Foundation.NSDictionary`2, Foundation.NSDictionary`2, CoreVideo.CVPixelBuffer, AVFoundation.AVDepthData)": // added in tvOS 17.0, when it was already obsoleted on other platforms. return true; } break; diff --git a/tests/cecil-tests/AttributeTest.cs b/tests/cecil-tests/AttributeTest.cs index 85e0678eb54f..23d791dc0619 100644 --- a/tests/cecil-tests/AttributeTest.cs +++ b/tests/cecil-tests/AttributeTest.cs @@ -193,10 +193,6 @@ public void FindSupportedOnElementsThatDoNotExistInThatAssembly () continue; } foreach (var member in GetAllTypeMembers (type)) { - // If a member is hidden, it's probably because it's broken in some way, so don't consider it. - if (ObsoleteTest.HasEditorBrowseableNeverAttribute (member)) - continue; - var mentionedPlatforms = GetAvailabilityAttributes (member).ToList (); if (mentionedPlatforms.Any ()) { var claimedPlatforms = GetSupportedAvailabilityAttributes (member).ToList (); diff --git a/tests/cecil-tests/ConstructorTest.KnownFailures.cs b/tests/cecil-tests/ConstructorTest.KnownFailures.cs index 76f119f65078..3520ac353fa6 100644 --- a/tests/cecil-tests/ConstructorTest.KnownFailures.cs +++ b/tests/cecil-tests/ConstructorTest.KnownFailures.cs @@ -97,8 +97,6 @@ public partial class ConstructorTest { "AVFoundation.AVAudioFile::.ctor(Foundation.NSUrl,Foundation.NSDictionary,AVFoundation.AVAudioCommonFormat,System.Boolean,Foundation.NSError&)", "AVFoundation.AVAudioFile::.ctor(Foundation.NSUrl,Foundation.NSDictionary,Foundation.NSError&)", "AVFoundation.AVAudioFile::.ctor(Foundation.NSUrl,Foundation.NSError&)", - "AVFoundation.AVAudioPlayer::.ctor(Foundation.NSData,System.String,Foundation.NSError&)", - "AVFoundation.AVAudioPlayer::.ctor(Foundation.NSUrl,System.String,Foundation.NSError&)", "AVFoundation.AVAudioRecorder::.ctor(Foundation.NSUrl,AVFoundation.AudioSettings,Foundation.NSError&)", "AVFoundation.AVAudioRecorder::.ctor(Foundation.NSUrl,AVFoundation.AVAudioFormat,Foundation.NSError&)", "AVFoundation.AVCaptureDeviceInput::.ctor(AVFoundation.AVCaptureDevice,Foundation.NSError&)", @@ -122,13 +120,6 @@ public partial class ConstructorTest { "CoreML.MLMultiArray::.ctor(System.IntPtr,Foundation.NSNumber[],CoreML.MLMultiArrayDataType,Foundation.NSNumber[],System.Action`1,Foundation.NSError&)", "CoreML.MLMultiArray::.ctor(System.IntPtr,System.IntPtr[],CoreML.MLMultiArrayDataType,System.IntPtr[],System.Action`1,Foundation.NSError&)", "CoreML.MLMultiArray::.ctor(System.IntPtr[],CoreML.MLMultiArrayDataType,Foundation.NSError&)", - "Foundation.NSAttributedString::.ctor(Foundation.NSData,Foundation.NSAttributedStringDocumentAttributes,Foundation.NSError&)", - "Foundation.NSAttributedString::.ctor(Foundation.NSData,Foundation.NSAttributedStringMarkdownParsingOptions,Foundation.NSUrl,Foundation.NSError&)", - "Foundation.NSAttributedString::.ctor(Foundation.NSData,Foundation.NSError&)", - "Foundation.NSAttributedString::.ctor(Foundation.NSUrl,Foundation.NSAttributedStringDocumentAttributes,Foundation.NSError&)", - "Foundation.NSAttributedString::.ctor(Foundation.NSUrl,Foundation.NSAttributedStringMarkdownParsingOptions,Foundation.NSUrl,Foundation.NSError&)", - "Foundation.NSAttributedString::.ctor(Foundation.NSUrl,Foundation.NSError&)", - "Foundation.NSAttributedString::.ctor(System.String,Foundation.NSAttributedStringMarkdownParsingOptions,Foundation.NSUrl,Foundation.NSError&)", "Foundation.NSDataDetector::.ctor(Foundation.NSTextCheckingType,Foundation.NSError&)", "Foundation.NSDataDetector::.ctor(Foundation.NSTextCheckingTypes,Foundation.NSError&)", "Foundation.NSDictionary::.ctor(Foundation.NSUrl,Foundation.NSError&)", diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index f21be5062d96..224642bbeb8e 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -176,6 +176,7 @@ E:AVFoundation.AVSpeechSynthesizer.DidContinueSpeechUtterance E:AVFoundation.AVSpeechSynthesizer.DidFinishSpeechUtterance E:AVFoundation.AVSpeechSynthesizer.DidPauseSpeechUtterance E:AVFoundation.AVSpeechSynthesizer.DidStartSpeechUtterance +E:AVFoundation.AVSpeechSynthesizer.WillSpeakMarker E:AVFoundation.AVSpeechSynthesizer.WillSpeakRangeOfSpeechString E:CoreAnimation.CAAnimation.AnimationStarted E:CoreAnimation.CAAnimation.AnimationStopped @@ -4985,9 +4986,14 @@ F:AVFoundation.AVAssetExportSessionStatus.Exporting F:AVFoundation.AVAssetExportSessionStatus.Failed F:AVFoundation.AVAssetExportSessionStatus.Unknown F:AVFoundation.AVAssetExportSessionStatus.Waiting +F:AVFoundation.AVAssetImageGeneratorDynamicRangePolicy.DynamicRangePolicyForceSdr +F:AVFoundation.AVAssetImageGeneratorDynamicRangePolicy.DynamicRangePolicyMatchSource F:AVFoundation.AVAssetImageGeneratorResult.Cancelled F:AVFoundation.AVAssetImageGeneratorResult.Failed F:AVFoundation.AVAssetImageGeneratorResult.Succeeded +F:AVFoundation.AVAssetPlaybackConfigurationOption.SpatialVideo +F:AVFoundation.AVAssetPlaybackConfigurationOption.StereoMultiviewVideo +F:AVFoundation.AVAssetPlaybackConfigurationOption.StereoVideo F:AVFoundation.AVAssetReaderStatus.Cancelled F:AVFoundation.AVAssetReaderStatus.Completed F:AVFoundation.AVAssetReaderStatus.Failed @@ -5001,6 +5007,9 @@ F:AVFoundation.AVAssetReferenceRestrictions.ForbidNone F:AVFoundation.AVAssetReferenceRestrictions.ForbidRemoteReferenceToLocal F:AVFoundation.AVAssetSegmentType.Initialization F:AVFoundation.AVAssetSegmentType.Separable +F:AVFoundation.AVAssetTrackGroupOutputHandling.DefaultPolicy +F:AVFoundation.AVAssetTrackGroupOutputHandling.None +F:AVFoundation.AVAssetTrackGroupOutputHandling.PreserveAlternateTracks F:AVFoundation.AVAssetWriterInputMediaDataLocation.BeforeMainMediaDataNotInterleaved F:AVFoundation.AVAssetWriterInputMediaDataLocation.InterleavedWithMainMediaData F:AVFoundation.AVAssetWriterStatus.Cancelled @@ -5174,6 +5183,7 @@ F:AVFoundation.AVAudioSessionRouteChangeReason.WakeFromSleep F:AVFoundation.AVAudioSessionRouteSharingPolicy.Default F:AVFoundation.AVAudioSessionRouteSharingPolicy.Independent F:AVFoundation.AVAudioSessionRouteSharingPolicy.LongForm +F:AVFoundation.AVAudioSessionRouteSharingPolicy.LongFormAudio F:AVFoundation.AVAudioSessionRouteSharingPolicy.LongFormVideo F:AVFoundation.AVAudioSessionSetActiveOptions.NotifyOthersOnDeactivation F:AVFoundation.AVAudioSessionSilenceSecondaryAudioHintType.Begin @@ -5233,6 +5243,12 @@ F:AVFoundation.AVAudioUnitReverbPreset.MediumHall3 F:AVFoundation.AVAudioUnitReverbPreset.MediumRoom F:AVFoundation.AVAudioUnitReverbPreset.Plate F:AVFoundation.AVAudioUnitReverbPreset.SmallRoom +F:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingLevel.Default +F:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingLevel.Max +F:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingLevel.Mid +F:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingLevel.Min +F:AVFoundation.AVAudioVoiceProcessingSpeechActivityEvent.Ended +F:AVFoundation.AVAudioVoiceProcessingSpeechActivityEvent.Started F:AVFoundation.AVAuthorizationMediaType.Audio F:AVFoundation.AVAuthorizationMediaType.Video F:AVFoundation.AVAuthorizationStatus.Authorized @@ -5300,6 +5316,7 @@ F:AVFoundation.AVCaptureAutoFocusSystem.PhaseDetection F:AVFoundation.AVCaptureCenterStageControlMode.App F:AVFoundation.AVCaptureCenterStageControlMode.Cooperative F:AVFoundation.AVCaptureCenterStageControlMode.User +F:AVFoundation.AVCaptureColorSpace.AppleLog F:AVFoundation.AVCaptureColorSpace.HlgBT2020 F:AVFoundation.AVCaptureColorSpace.P3D65 F:AVFoundation.AVCaptureColorSpace.Srgb @@ -5318,8 +5335,11 @@ F:AVFoundation.AVCaptureDeviceType.BuiltInTripleCamera F:AVFoundation.AVCaptureDeviceType.BuiltInTrueDepthCamera F:AVFoundation.AVCaptureDeviceType.BuiltInUltraWideCamera F:AVFoundation.AVCaptureDeviceType.BuiltInWideAngleCamera +F:AVFoundation.AVCaptureDeviceType.ContinuityCamera +F:AVFoundation.AVCaptureDeviceType.DeskViewCamera F:AVFoundation.AVCaptureDeviceType.External F:AVFoundation.AVCaptureDeviceType.ExternalUnknown +F:AVFoundation.AVCaptureDeviceType.Microphone F:AVFoundation.AVCaptureExposureMode.AutoExpose F:AVFoundation.AVCaptureExposureMode.ContinuousAutoExposure F:AVFoundation.AVCaptureExposureMode.Custom @@ -5338,10 +5358,18 @@ F:AVFoundation.AVCaptureLensStabilizationStatus.Unsupported F:AVFoundation.AVCaptureMicrophoneMode.Standard F:AVFoundation.AVCaptureMicrophoneMode.VoiceIsolation F:AVFoundation.AVCaptureMicrophoneMode.WideSpectrum +F:AVFoundation.AVCaptureMultichannelAudioMode.FirstOrderAmbisonics +F:AVFoundation.AVCaptureMultichannelAudioMode.None +F:AVFoundation.AVCaptureMultichannelAudioMode.Stereo F:AVFoundation.AVCaptureOutputDataDroppedReason.Discontinuity F:AVFoundation.AVCaptureOutputDataDroppedReason.LateData F:AVFoundation.AVCaptureOutputDataDroppedReason.None F:AVFoundation.AVCaptureOutputDataDroppedReason.OutOfBuffers +F:AVFoundation.AVCapturePhotoOutputCaptureReadiness.NotReadyMomentarily +F:AVFoundation.AVCapturePhotoOutputCaptureReadiness.NotReadyWaitingForCapture +F:AVFoundation.AVCapturePhotoOutputCaptureReadiness.NotReadyWaitingForProcessing +F:AVFoundation.AVCapturePhotoOutputCaptureReadiness.Ready +F:AVFoundation.AVCapturePhotoOutputCaptureReadiness.SessionNotRunning F:AVFoundation.AVCapturePhotoQualityPrioritization.Balanced F:AVFoundation.AVCapturePhotoQualityPrioritization.Quality F:AVFoundation.AVCapturePhotoQualityPrioritization.Speed @@ -5366,6 +5394,7 @@ F:AVFoundation.AVCaptureSessionInterruptionReason.VideoDeviceInUseByAnotherClien F:AVFoundation.AVCaptureSessionInterruptionReason.VideoDeviceNotAvailableDueToSystemPressure F:AVFoundation.AVCaptureSessionInterruptionReason.VideoDeviceNotAvailableInBackground F:AVFoundation.AVCaptureSessionInterruptionReason.VideoDeviceNotAvailableWithMultipleForegroundApps +F:AVFoundation.AVCaptureSystemPressureFactors.CameraTemperature F:AVFoundation.AVCaptureSystemPressureFactors.DepthModuleTemperature F:AVFoundation.AVCaptureSystemPressureFactors.None F:AVFoundation.AVCaptureSystemPressureFactors.PeakPower @@ -5447,6 +5476,7 @@ F:AVFoundation.AVEdgeWidths.Right F:AVFoundation.AVEdgeWidths.Top F:AVFoundation.AVError.AirPlayControllerRequiresInternet F:AVFoundation.AVError.AirPlayReceiverRequiresInternet +F:AVFoundation.AVError.AirPlayReceiverTemporarilyUnavailable F:AVFoundation.AVError.ApplicationIsNotAuthorized F:AVFoundation.AVError.ApplicationIsNotAuthorizedToUseDevice F:AVFoundation.AVError.CompositionTrackSegmentsNotContiguous @@ -5466,11 +5496,13 @@ F:AVFoundation.AVError.DeviceNotConnected F:AVFoundation.AVError.DeviceWasDisconnected F:AVFoundation.AVError.DiskFull F:AVFoundation.AVError.DisplayWasDisabled +F:AVFoundation.AVError.EncodeFailed F:AVFoundation.AVError.EncoderNotFound F:AVFoundation.AVError.EncoderTemporarilyUnavailable F:AVFoundation.AVError.ExportFailed F:AVFoundation.AVError.ExternalPlaybackNotSupportedForAsset F:AVFoundation.AVError.FailedToLoadMediaData +F:AVFoundation.AVError.FailedToLoadSampleData F:AVFoundation.AVError.FailedToParse F:AVFoundation.AVError.FailedToParse2 F:AVFoundation.AVError.FileAlreadyExists @@ -5483,6 +5515,7 @@ F:AVFoundation.AVError.InvalidCompositionTrackSegmentDuration F:AVFoundation.AVError.InvalidCompositionTrackSegmentSourceDuration F:AVFoundation.AVError.InvalidCompositionTrackSegmentSourceStartTime F:AVFoundation.AVError.InvalidOutputURLPathExtension +F:AVFoundation.AVError.InvalidSampleCursor F:AVFoundation.AVError.InvalidSourceMedia F:AVFoundation.AVError.InvalidVideoComposition F:AVFoundation.AVError.MalformedDepth @@ -5492,6 +5525,8 @@ F:AVFoundation.AVError.MaximumNumberOfSamplesForFileFormatReached F:AVFoundation.AVError.MaximumStillImageCaptureRequestsExceeded F:AVFoundation.AVError.MediaChanged F:AVFoundation.AVError.MediaDiscontinuity +F:AVFoundation.AVError.MediaExtensionConflict +F:AVFoundation.AVError.MediaExtensionDisabled F:AVFoundation.AVError.MediaServicesWereReset F:AVFoundation.AVError.NoCompatibleAlternatesForExternalDisplay F:AVFoundation.AVError.NoDataCaptured @@ -5508,6 +5543,7 @@ F:AVFoundation.AVError.RecordingAlreadyInProgress F:AVFoundation.AVError.ReferenceForbiddenByReferencePolicy F:AVFoundation.AVError.RequestCancelled F:AVFoundation.AVError.RosettaNotInstalled +F:AVFoundation.AVError.SandboxExtensionDenied F:AVFoundation.AVError.ScreenCaptureFailed F:AVFoundation.AVError.SegmentStartedWithNonSyncSample F:AVFoundation.AVError.ServerIncorrectlyConfigured @@ -5515,16 +5551,21 @@ F:AVFoundation.AVError.SessionConfigurationChanged F:AVFoundation.AVError.SessionHardwareCostOverage F:AVFoundation.AVError.SessionNotRunning F:AVFoundation.AVError.SessionWasInterrupted +F:AVFoundation.AVError.ToneMappingFailed F:AVFoundation.AVError.TorchLevelUnavailable F:AVFoundation.AVError.UndecodableMediaData F:AVFoundation.AVError.Unknown F:AVFoundation.AVError.UnsupportedDeviceActiveFormat F:AVFoundation.AVError.UnsupportedOutputSettings F:AVFoundation.AVError.VideoCompositorFailed +F:AVFoundation.AVExternalContentProtectionStatus.Insufficient +F:AVFoundation.AVExternalContentProtectionStatus.Pending +F:AVFoundation.AVExternalContentProtectionStatus.Sufficient F:AVFoundation.AVFileTypeProfile.Mpeg4AppleHls F:AVFoundation.AVFileTypeProfile.Mpeg4CmafCompliant F:AVFoundation.AVFileTypeProfile.None F:AVFoundation.AVFileTypes.AC3 +F:AVFoundation.AVFileTypes.Ahap F:AVFoundation.AVFileTypes.Aifc F:AVFoundation.AVFileTypes.Aiff F:AVFoundation.AVFileTypes.Amr @@ -5556,26 +5597,33 @@ F:AVFoundation.AVLayerVideoGravity.Resize F:AVFoundation.AVLayerVideoGravity.ResizeAspect F:AVFoundation.AVLayerVideoGravity.ResizeAspectFill F:AVFoundation.AVMediaCharacteristics.Audible +F:AVFoundation.AVMediaCharacteristics.CarriesVideoStereoMetadata F:AVFoundation.AVMediaCharacteristics.ContainsAlphaChannel F:AVFoundation.AVMediaCharacteristics.ContainsHdrVideo F:AVFoundation.AVMediaCharacteristics.ContainsOnlyForcedSubtitles +F:AVFoundation.AVMediaCharacteristics.ContainsStereoMultiviewVideo F:AVFoundation.AVMediaCharacteristics.DescribesMusicAndSoundForAccessibility F:AVFoundation.AVMediaCharacteristics.DescribesVideoForAccessibility F:AVFoundation.AVMediaCharacteristics.DubbedTranslation F:AVFoundation.AVMediaCharacteristics.EasyToRead +F:AVFoundation.AVMediaCharacteristics.EnhancesSpeechIntelligibility F:AVFoundation.AVMediaCharacteristics.FrameBased +F:AVFoundation.AVMediaCharacteristics.IndicatesHorizontalFieldOfView F:AVFoundation.AVMediaCharacteristics.IsAuxiliaryContent F:AVFoundation.AVMediaCharacteristics.IsMainProgramContent F:AVFoundation.AVMediaCharacteristics.IsOriginalContent F:AVFoundation.AVMediaCharacteristics.LanguageTranslation F:AVFoundation.AVMediaCharacteristics.Legible +F:AVFoundation.AVMediaCharacteristics.TactileMinimal F:AVFoundation.AVMediaCharacteristics.TranscribesSpokenDialogForAccessibility F:AVFoundation.AVMediaCharacteristics.UsesWideGamutColorSpace F:AVFoundation.AVMediaCharacteristics.Visual F:AVFoundation.AVMediaCharacteristics.VoiceOverTranslation F:AVFoundation.AVMediaTypes.Audio +F:AVFoundation.AVMediaTypes.AuxiliaryPicture F:AVFoundation.AVMediaTypes.ClosedCaption F:AVFoundation.AVMediaTypes.DepthData +F:AVFoundation.AVMediaTypes.Haptic F:AVFoundation.AVMediaTypes.Metadata F:AVFoundation.AVMediaTypes.MetadataObject F:AVFoundation.AVMediaTypes.Muxed @@ -5605,6 +5653,7 @@ F:AVFoundation.AVMetadataObjectType.GS1DataBarCode F:AVFoundation.AVMetadataObjectType.GS1DataBarExpandedCode F:AVFoundation.AVMetadataObjectType.GS1DataBarLimitedCode F:AVFoundation.AVMetadataObjectType.HumanBody +F:AVFoundation.AVMetadataObjectType.HumanFullBody F:AVFoundation.AVMetadataObjectType.Interleaved2of5Code F:AVFoundation.AVMetadataObjectType.ITF14Code F:AVFoundation.AVMetadataObjectType.MicroPdf417Code @@ -5614,6 +5663,57 @@ F:AVFoundation.AVMetadataObjectType.PDF417Code F:AVFoundation.AVMetadataObjectType.QRCode F:AVFoundation.AVMetadataObjectType.SalientObject F:AVFoundation.AVMetadataObjectType.UPCECode +F:AVFoundation.AVMidiControlChangeMessageType.AllNotesOff +F:AVFoundation.AVMidiControlChangeMessageType.AllSoundOff +F:AVFoundation.AVMidiControlChangeMessageType.AttackTime +F:AVFoundation.AVMidiControlChangeMessageType.Balance +F:AVFoundation.AVMidiControlChangeMessageType.BankSelect +F:AVFoundation.AVMidiControlChangeMessageType.Breath +F:AVFoundation.AVMidiControlChangeMessageType.Brightness +F:AVFoundation.AVMidiControlChangeMessageType.ChorusLevel +F:AVFoundation.AVMidiControlChangeMessageType.DataEntry +F:AVFoundation.AVMidiControlChangeMessageType.DecayTime +F:AVFoundation.AVMidiControlChangeMessageType.Expression +F:AVFoundation.AVMidiControlChangeMessageType.FilterResonance +F:AVFoundation.AVMidiControlChangeMessageType.Foot +F:AVFoundation.AVMidiControlChangeMessageType.Hold2Pedal +F:AVFoundation.AVMidiControlChangeMessageType.LegatoPedal +F:AVFoundation.AVMidiControlChangeMessageType.ModWheel +F:AVFoundation.AVMidiControlChangeMessageType.MonoModeOff +F:AVFoundation.AVMidiControlChangeMessageType.MonoModeOn +F:AVFoundation.AVMidiControlChangeMessageType.OmniModeOff +F:AVFoundation.AVMidiControlChangeMessageType.OmniModeOn +F:AVFoundation.AVMidiControlChangeMessageType.Pan +F:AVFoundation.AVMidiControlChangeMessageType.Portamento +F:AVFoundation.AVMidiControlChangeMessageType.PortamentoTime +F:AVFoundation.AVMidiControlChangeMessageType.ReleaseTime +F:AVFoundation.AVMidiControlChangeMessageType.ResetAllControllers +F:AVFoundation.AVMidiControlChangeMessageType.ReverbLevel +F:AVFoundation.AVMidiControlChangeMessageType.RpnLsb +F:AVFoundation.AVMidiControlChangeMessageType.RpnMsb +F:AVFoundation.AVMidiControlChangeMessageType.Soft +F:AVFoundation.AVMidiControlChangeMessageType.Sostenuto +F:AVFoundation.AVMidiControlChangeMessageType.Sustain +F:AVFoundation.AVMidiControlChangeMessageType.VibratoDelay +F:AVFoundation.AVMidiControlChangeMessageType.VibratoDepth +F:AVFoundation.AVMidiControlChangeMessageType.VibratoRate +F:AVFoundation.AVMidiControlChangeMessageType.Volume +F:AVFoundation.AVMidiMetaEventType.Copyright +F:AVFoundation.AVMidiMetaEventType.CuePoint +F:AVFoundation.AVMidiMetaEventType.EndOfTrack +F:AVFoundation.AVMidiMetaEventType.Instrument +F:AVFoundation.AVMidiMetaEventType.KeySignature +F:AVFoundation.AVMidiMetaEventType.Lyric +F:AVFoundation.AVMidiMetaEventType.Marker +F:AVFoundation.AVMidiMetaEventType.MidiChannel +F:AVFoundation.AVMidiMetaEventType.MidiPort +F:AVFoundation.AVMidiMetaEventType.ProprietaryEvent +F:AVFoundation.AVMidiMetaEventType.SequenceNumber +F:AVFoundation.AVMidiMetaEventType.SmpteOffset +F:AVFoundation.AVMidiMetaEventType.Tempo +F:AVFoundation.AVMidiMetaEventType.Text +F:AVFoundation.AVMidiMetaEventType.TimeSignature +F:AVFoundation.AVMidiMetaEventType.TrackName F:AVFoundation.AVMovieWritingOptions.AddMovieHeaderToDestination F:AVFoundation.AVMovieWritingOptions.TruncateDestinationToMovieHeaderOnly F:AVFoundation.AVMusicSequenceLoadOptions.ChannelsToTracks @@ -5629,6 +5729,8 @@ F:AVFoundation.AVOutputSettingsPreset.PresetHevc1920x1080WithAlpha F:AVFoundation.AVOutputSettingsPreset.PresetHevc3840x2160 F:AVFoundation.AVOutputSettingsPreset.PresetHevc3840x2160WithAlpha F:AVFoundation.AVOutputSettingsPreset.PresetHevc7680x4320 +F:AVFoundation.AVOutputSettingsPreset.PresetMvHevc1440x1440 +F:AVFoundation.AVOutputSettingsPreset.PresetMvHevc960x960 F:AVFoundation.AVPixelAspectRatio.HorizontalSpacing F:AVFoundation.AVPixelAspectRatio.VerticalSpacing F:AVFoundation.AVPlayerActionAtItemEnd.Advance @@ -5640,13 +5742,28 @@ F:AVFoundation.AVPlayerAudiovisualBackgroundPlaybackPolicy.Pauses F:AVFoundation.AVPlayerHdrMode.DolbyVision F:AVFoundation.AVPlayerHdrMode.Hdr10 F:AVFoundation.AVPlayerHdrMode.Hlg +F:AVFoundation.AVPlayerIntegratedTimelineSnapshotsOutOfSyncReason.CurrentSegmentChanged +F:AVFoundation.AVPlayerIntegratedTimelineSnapshotsOutOfSyncReason.LoadedTimeRangesChanged +F:AVFoundation.AVPlayerIntegratedTimelineSnapshotsOutOfSyncReason.SegmentsChanged +F:AVFoundation.AVPlayerInterstitialEventAssetListResponseStatus.Available +F:AVFoundation.AVPlayerInterstitialEventAssetListResponseStatus.Cleared +F:AVFoundation.AVPlayerInterstitialEventAssetListResponseStatus.Unavailable +F:AVFoundation.AVPlayerInterstitialEventCue.JoinCue +F:AVFoundation.AVPlayerInterstitialEventCue.LeaveCue +F:AVFoundation.AVPlayerInterstitialEventCue.NoCue F:AVFoundation.AVPlayerInterstitialEventRestrictions.ConstrainsSeekingForwardInPrimaryContent F:AVFoundation.AVPlayerInterstitialEventRestrictions.DefaultPolicy F:AVFoundation.AVPlayerInterstitialEventRestrictions.None F:AVFoundation.AVPlayerInterstitialEventRestrictions.RequiresPlaybackAtPreferredRateForAdvancement +F:AVFoundation.AVPlayerInterstitialEventTimelineOccupancy.Fill +F:AVFoundation.AVPlayerInterstitialEventTimelineOccupancy.SinglePoint +F:AVFoundation.AVPlayerItemSegmentType.Interstitial +F:AVFoundation.AVPlayerItemSegmentType.Primary F:AVFoundation.AVPlayerItemStatus.Failed F:AVFoundation.AVPlayerItemStatus.ReadyToPlay F:AVFoundation.AVPlayerItemStatus.Unknown +F:AVFoundation.AVPlayerLooperItemOrdering.FollowExistingItems +F:AVFoundation.AVPlayerLooperItemOrdering.PrecedeExistingItems F:AVFoundation.AVPlayerLooperStatus.Cancelled F:AVFoundation.AVPlayerLooperStatus.Failed F:AVFoundation.AVPlayerLooperStatus.Ready @@ -5701,13 +5818,28 @@ F:AVFoundation.AVSemanticSegmentationMatteType.Hair F:AVFoundation.AVSemanticSegmentationMatteType.None F:AVFoundation.AVSemanticSegmentationMatteType.Skin F:AVFoundation.AVSemanticSegmentationMatteType.Teeth +F:AVFoundation.AVSpatialCaptureDiscomfortReason.NotEnoughLight +F:AVFoundation.AVSpatialCaptureDiscomfortReason.SubjectTooClose F:AVFoundation.AVSpeechBoundary.Immediate F:AVFoundation.AVSpeechBoundary.Word +F:AVFoundation.AVSpeechSynthesisMarkerMark.Bookmark +F:AVFoundation.AVSpeechSynthesisMarkerMark.Paragraph +F:AVFoundation.AVSpeechSynthesisMarkerMark.Phoneme +F:AVFoundation.AVSpeechSynthesisMarkerMark.Sentence +F:AVFoundation.AVSpeechSynthesisMarkerMark.Word +F:AVFoundation.AVSpeechSynthesisPersonalVoiceAuthorizationStatus.Authorized +F:AVFoundation.AVSpeechSynthesisPersonalVoiceAuthorizationStatus.Denied +F:AVFoundation.AVSpeechSynthesisPersonalVoiceAuthorizationStatus.NotDetermined +F:AVFoundation.AVSpeechSynthesisPersonalVoiceAuthorizationStatus.Unsupported F:AVFoundation.AVSpeechSynthesisVoiceGender.Female F:AVFoundation.AVSpeechSynthesisVoiceGender.Male F:AVFoundation.AVSpeechSynthesisVoiceGender.Unspecified F:AVFoundation.AVSpeechSynthesisVoiceQuality.Default F:AVFoundation.AVSpeechSynthesisVoiceQuality.Enhanced +F:AVFoundation.AVSpeechSynthesisVoiceQuality.Premium +F:AVFoundation.AVSpeechSynthesisVoiceTraits.IsNoveltyVoice +F:AVFoundation.AVSpeechSynthesisVoiceTraits.IsPersonalVoice +F:AVFoundation.AVSpeechSynthesisVoiceTraits.None F:AVFoundation.AVVariantPreferences.None F:AVFoundation.AVVariantPreferences.ScalabilityToLosslessAudio F:AVFoundation.AVVideoApertureMode.CleanAperture @@ -5720,10 +5852,14 @@ F:AVFoundation.AVVideoCodecType.AppleProRes422HQ F:AVFoundation.AVVideoCodecType.AppleProRes422LT F:AVFoundation.AVVideoCodecType.AppleProRes422Proxy F:AVFoundation.AVVideoCodecType.AppleProRes4444 +F:AVFoundation.AVVideoCodecType.AppleProRes4444XQ F:AVFoundation.AVVideoCodecType.H264 F:AVFoundation.AVVideoCodecType.Hevc F:AVFoundation.AVVideoCodecType.HevcWithAlpha F:AVFoundation.AVVideoCodecType.Jpeg +F:AVFoundation.AVVideoCodecType.JpegXl +F:AVFoundation.AVVideoCompositionPerFrameHdrDisplayMetadataPolicy.Generate +F:AVFoundation.AVVideoCompositionPerFrameHdrDisplayMetadataPolicy.Propagate F:AVFoundation.AVVideoFieldMode.Both F:AVFoundation.AVVideoFieldMode.BottomOnly F:AVFoundation.AVVideoFieldMode.Deinterlace @@ -5749,6 +5885,8 @@ F:AVFoundation.AVVideoScalingMode.Fit F:AVFoundation.AVVideoScalingMode.Resize F:AVFoundation.AVVideoScalingMode.ResizeAspect F:AVFoundation.AVVideoScalingMode.ResizeAspectFill +F:AVFoundation.CMTagCollectionVideoOutputPreset.Monoscopic +F:AVFoundation.CMTagCollectionVideoOutputPreset.Stereoscopic F:AVKit.AVAudioSessionRouteSelection.External F:AVKit.AVAudioSessionRouteSelection.Local F:AVKit.AVAudioSessionRouteSelection.None @@ -6663,6 +6801,9 @@ F:CoreFoundation.CFBundle.Architecture.X86_64 F:CoreFoundation.CFBundle.PackageType.Application F:CoreFoundation.CFBundle.PackageType.Bundle F:CoreFoundation.CFBundle.PackageType.Framework +F:CoreFoundation.CFComparisonResult.EqualTo +F:CoreFoundation.CFComparisonResult.GreaterThan +F:CoreFoundation.CFComparisonResult.LessThan F:CoreFoundation.CFErrorDomain.Cocoa F:CoreFoundation.CFErrorDomain.Mach F:CoreFoundation.CFErrorDomain.OSStatus @@ -7538,6 +7679,7 @@ F:CoreMedia.CMMediaType.ClosedCaption F:CoreMedia.CMMediaType.Metadata F:CoreMedia.CMMediaType.Muxed F:CoreMedia.CMMediaType.Subtitle +F:CoreMedia.CMMediaType.TaggedBufferGroup F:CoreMedia.CMMediaType.Text F:CoreMedia.CMMediaType.TimeCode F:CoreMedia.CMMediaType.Video @@ -7549,6 +7691,9 @@ F:CoreMedia.CMMuxedStreamType.DV F:CoreMedia.CMMuxedStreamType.MPEG1System F:CoreMedia.CMMuxedStreamType.MPEG2Program F:CoreMedia.CMMuxedStreamType.MPEG2Transport +F:CoreMedia.CMPackingType.None +F:CoreMedia.CMPackingType.OverUnder +F:CoreMedia.CMPackingType.SideBySide F:CoreMedia.CMPixelFormat.AlphaRedGreenBlue32bits F:CoreMedia.CMPixelFormat.BigEndian555_16bits F:CoreMedia.CMPixelFormat.BigEndian565_16bits @@ -7565,6 +7710,10 @@ F:CoreMedia.CMPixelFormat.YpCbCr422yuvs_8bits F:CoreMedia.CMPixelFormat.YpCbCr444_10bits F:CoreMedia.CMPixelFormat.YpCbCr444_8bits F:CoreMedia.CMPixelFormat.YpCbCrA4444_8bits +F:CoreMedia.CMProjectionType.Equirectangular +F:CoreMedia.CMProjectionType.Fisheye +F:CoreMedia.CMProjectionType.HalfEquirectangular +F:CoreMedia.CMProjectionType.Rectangular F:CoreMedia.CMSampleBufferAttachmentKey.CameraIntrinsicMatrix F:CoreMedia.CMSampleBufferAttachmentKey.DependsOnOthers F:CoreMedia.CMSampleBufferAttachmentKey.DisplayEmptyMediaImmediately @@ -7619,6 +7768,12 @@ F:CoreMedia.CMSampleBufferError.SampleTimingInfoInvalid F:CoreMedia.CMSampleTimingInfo.DecodeTimeStamp F:CoreMedia.CMSampleTimingInfo.Duration F:CoreMedia.CMSampleTimingInfo.PresentationTimeStamp +F:CoreMedia.CMStereoViewComponents.LeftEye +F:CoreMedia.CMStereoViewComponents.None +F:CoreMedia.CMStereoViewComponents.RightEye +F:CoreMedia.CMStereoViewInterpretationOptions.AdditionalViews +F:CoreMedia.CMStereoViewInterpretationOptions.Default +F:CoreMedia.CMStereoViewInterpretationOptions.StereoOrderReversed F:CoreMedia.CMSubtitleFormatType.Text3G F:CoreMedia.CMSubtitleFormatType.WebVTT F:CoreMedia.CMSyncError.AllocationFailed @@ -7626,6 +7781,41 @@ F:CoreMedia.CMSyncError.InvalidParameter F:CoreMedia.CMSyncError.MissingRequiredParameter F:CoreMedia.CMSyncError.None F:CoreMedia.CMSyncError.RateMustBeNonZero +F:CoreMedia.CMTagCategory.ChannelId +F:CoreMedia.CMTagCategory.MediaSubType +F:CoreMedia.CMTagCategory.MediaType +F:CoreMedia.CMTagCategory.PackingType +F:CoreMedia.CMTagCategory.PixelFormat +F:CoreMedia.CMTagCategory.ProjectionType +F:CoreMedia.CMTagCategory.StereoView +F:CoreMedia.CMTagCategory.StereoViewInterpretation +F:CoreMedia.CMTagCategory.TrackId +F:CoreMedia.CMTagCategory.Undefined +F:CoreMedia.CMTagCategory.VideoLayerId +F:CoreMedia.CMTagCollectionError.AllocationFailed +F:CoreMedia.CMTagCollectionError.ExhaustedBufferSize +F:CoreMedia.CMTagCollectionError.InternalError +F:CoreMedia.CMTagCollectionError.InvalidTag +F:CoreMedia.CMTagCollectionError.InvalidTagCollectionData +F:CoreMedia.CMTagCollectionError.InvalidTagCollectionDataVersion +F:CoreMedia.CMTagCollectionError.InvalidTagCollectionDictionary +F:CoreMedia.CMTagCollectionError.NotYetImplemented +F:CoreMedia.CMTagCollectionError.ParamErr +F:CoreMedia.CMTagCollectionError.Success +F:CoreMedia.CMTagCollectionError.TagNotFound +F:CoreMedia.CMTagDataType.Flags +F:CoreMedia.CMTagDataType.Float64 +F:CoreMedia.CMTagDataType.Invalid +F:CoreMedia.CMTagDataType.OSType +F:CoreMedia.CMTagDataType.SInt64 +F:CoreMedia.CMTagError.AllocationFailed +F:CoreMedia.CMTagError.ParamErr +F:CoreMedia.CMTagError.Success +F:CoreMedia.CMTaggedBufferGroupError.AllocationFailed +F:CoreMedia.CMTaggedBufferGroupError.InternalError +F:CoreMedia.CMTaggedBufferGroupError.ParamErr +F:CoreMedia.CMTaggedBufferGroupError.Success +F:CoreMedia.CMTaggedBufferGroupFormatType.TaggedBufferGroup F:CoreMedia.CMTime.EpochKey F:CoreMedia.CMTime.Flags.HasBeenRounded F:CoreMedia.CMTime.Flags.ImpliedValueFlagsMask @@ -16578,16 +16768,6 @@ F:ObjCRuntime.LinkTarget.Simulator F:ObjCRuntime.LinkTarget.Simulator64 F:ObjCRuntime.LinkTarget.Thumb F:ObjCRuntime.LinkTarget.x86_64 -F:ObjCRuntime.MarshalManagedExceptionMode.Abort -F:ObjCRuntime.MarshalManagedExceptionMode.Default -F:ObjCRuntime.MarshalManagedExceptionMode.Disable -F:ObjCRuntime.MarshalManagedExceptionMode.ThrowObjectiveCException -F:ObjCRuntime.MarshalManagedExceptionMode.UnwindNativeCode -F:ObjCRuntime.MarshalObjectiveCExceptionMode.Abort -F:ObjCRuntime.MarshalObjectiveCExceptionMode.Default -F:ObjCRuntime.MarshalObjectiveCExceptionMode.Disable -F:ObjCRuntime.MarshalObjectiveCExceptionMode.ThrowManagedException -F:ObjCRuntime.MarshalObjectiveCExceptionMode.UnwindManagedCode F:ObjCRuntime.NativeHandle.Zero F:ObjCRuntime.NMath.E F:ObjCRuntime.NMath.PI @@ -16685,7 +16865,6 @@ F:OSLog.OSLogMessageComponentArgumentCategory.String F:OSLog.OSLogMessageComponentArgumentCategory.UInt64 F:OSLog.OSLogMessageComponentArgumentCategory.Undefined F:OSLog.OSLogStoreScope.CurrentProcessIdentifier -F:OSLog.OSLogStoreScope.System F:PassKit.PKAddPassButtonStyle.Black F:PassKit.PKAddPassButtonStyle.Outline F:PassKit.PKAddPaymentPassError.SystemCancelled @@ -25741,6 +25920,7 @@ M:AVFoundation.AVAssetDownloadDelegate_Extensions.DidLoadTimeRange(AVFoundation. M:AVFoundation.AVAssetDownloadDelegate_Extensions.DidResolveMediaSelection(AVFoundation.IAVAssetDownloadDelegate,Foundation.NSUrlSession,AVFoundation.AVAssetDownloadTask,AVFoundation.AVMediaSelection) M:AVFoundation.AVAssetDownloadDelegate_Extensions.WillDownloadToUrl(AVFoundation.IAVAssetDownloadDelegate,Foundation.NSUrlSession,AVFoundation.AVAggregateAssetDownloadTask,Foundation.NSUrl) M:AVFoundation.AVAssetDownloadDelegate_Extensions.WillDownloadVariants(AVFoundation.IAVAssetDownloadDelegate,Foundation.NSUrlSession,AVFoundation.AVAssetDownloadTask,AVFoundation.AVAssetVariant[]) +M:AVFoundation.AVAssetDownloadDelegate_Extensions.WilllDownloadToUrl(AVFoundation.IAVAssetDownloadDelegate,Foundation.NSUrlSession,AVFoundation.AVAssetDownloadTask,Foundation.NSUrl) M:AVFoundation.AVAssetDownloadDelegate.DidCompleteWithError(Foundation.NSUrlSession,Foundation.NSUrlSessionTask,Foundation.NSError) M:AVFoundation.AVAssetDownloadDelegate.DidCreateTask(Foundation.NSUrlSession,Foundation.NSUrlSessionTask) M:AVFoundation.AVAssetDownloadDelegate.DidFinishCollectingMetrics(Foundation.NSUrlSession,Foundation.NSUrlSessionTask,Foundation.NSUrlSessionTaskMetrics) @@ -25783,6 +25963,7 @@ M:AVFoundation.AVAssetExportSession.EstimateMaximumDurationAsync M:AVFoundation.AVAssetExportSession.EstimateOutputFileLengthAsync M:AVFoundation.AVAssetExportSession.ExportTaskAsync M:AVFoundation.AVAssetImageGenerator.GenerateCGImagesAsynchronously(Foundation.NSValue[],AVFoundation.AVAssetImageGeneratorCompletionHandler2) +M:AVFoundation.AVAssetPlaybackAssistant.LoadPlaybackConfigurationOptionsAsync M:AVFoundation.AVAssetReaderAudioMixOutput.#ctor(AVFoundation.AVAssetTrack[],AVFoundation.AudioSettings) M:AVFoundation.AVAssetReaderAudioMixOutput.Create(AVFoundation.AVAssetTrack[],AVFoundation.AudioSettings) M:AVFoundation.AVAssetReaderCaptionValidationHandling_Extensions.DidVendCaption(AVFoundation.IAVAssetReaderCaptionValidationHandling,AVFoundation.AVAssetReaderOutputCaptionAdaptor,AVFoundation.AVCaption,System.String[]) @@ -25904,6 +26085,7 @@ M:AVFoundation.AVAudioFormat.op_Equality(AVFoundation.AVAudioFormat,AVFoundation M:AVFoundation.AVAudioFormat.op_Inequality(AVFoundation.AVAudioFormat,AVFoundation.AVAudioFormat) M:AVFoundation.AVAudioInputNode.DestinationForMixer(AVFoundation.AVAudioNode,System.UIntPtr) M:AVFoundation.AVAudioInputNode.SetManualRenderingInputPcmFormat(AVFoundation.AVAudioFormat,AVFoundation.AVAudioIONodeInputBlock) +M:AVFoundation.AVAudioInputNode.SetMutedSpeechActivityEventListener(AVFoundation.AVAudioInputNodeMutedSpeechEventListener) M:AVFoundation.AVAudioIONode.SetVoiceProcessingEnabled(System.Boolean,Foundation.NSError@) M:AVFoundation.AVAudioMixerNode.DestinationForMixer(AVFoundation.AVAudioNode,System.UIntPtr) M:AVFoundation.AVAudioMixingDestination.DestinationForMixer(AVFoundation.AVAudioNode,System.UIntPtr) @@ -25915,18 +26097,12 @@ M:AVFoundation.AVAudioNode.InstallTapOnBus(System.UIntPtr,System.UInt32,AVFounda M:AVFoundation.AVAudioNode.RemoveTapOnBus(System.UIntPtr) M:AVFoundation.AVAudioPcmBuffer.#ctor(AVFoundation.AVAudioFormat,AudioToolbox.AudioBuffers,System.Action{AudioToolbox.AudioBuffers}) M:AVFoundation.AVAudioPcmBuffer.#ctor(AVFoundation.AVAudioFormat,System.UInt32) -M:AVFoundation.AVAudioPlayer.#ctor(Foundation.NSData,System.String,Foundation.NSError@) -M:AVFoundation.AVAudioPlayer.#ctor(Foundation.NSUrl,System.String,Foundation.NSError@) M:AVFoundation.AVAudioPlayer.add_BeginInterruption(System.EventHandler) M:AVFoundation.AVAudioPlayer.add_DecoderError(System.EventHandler{AVFoundation.AVErrorEventArgs}) M:AVFoundation.AVAudioPlayer.add_EndInterruption(System.EventHandler) M:AVFoundation.AVAudioPlayer.add_FinishedPlaying(System.EventHandler{AVFoundation.AVStatusEventArgs}) M:AVFoundation.AVAudioPlayer.AveragePower(System.UIntPtr) M:AVFoundation.AVAudioPlayer.Dispose(System.Boolean) -M:AVFoundation.AVAudioPlayer.FromData(Foundation.NSData,Foundation.NSError@) -M:AVFoundation.AVAudioPlayer.FromData(Foundation.NSData) -M:AVFoundation.AVAudioPlayer.FromUrl(Foundation.NSUrl,Foundation.NSError@) -M:AVFoundation.AVAudioPlayer.FromUrl(Foundation.NSUrl) M:AVFoundation.AVAudioPlayer.PeakPower(System.UIntPtr) M:AVFoundation.AVAudioPlayer.PlayAtTime(System.Double) M:AVFoundation.AVAudioPlayer.PrepareToPlay @@ -26003,6 +26179,7 @@ M:AVFoundation.AVAudioRecorderDelegate.FinishedRecording(AVFoundation.AVAudioRec M:AVFoundation.AVAudioRoutingArbiter.BeginArbitration(AVFoundation.AVAudioRoutingArbitrationCategory,System.Action{System.Boolean,Foundation.NSError}) M:AVFoundation.AVAudioRoutingArbiter.LeaveArbitration M:AVFoundation.AVAudioSequencer.#ctor(AVFoundation.AVAudioEngine) +M:AVFoundation.AVAudioSequencer.CreateAndAppendTrack M:AVFoundation.AVAudioSequencer.GetBeats(System.Double) M:AVFoundation.AVAudioSequencer.GetBeats(System.UInt64,Foundation.NSError@) M:AVFoundation.AVAudioSequencer.GetData(System.IntPtr,Foundation.NSError@) @@ -26011,9 +26188,13 @@ M:AVFoundation.AVAudioSequencer.GetSeconds(System.Double) M:AVFoundation.AVAudioSequencer.Load(Foundation.NSData,AVFoundation.AVMusicSequenceLoadOptions,Foundation.NSError@) M:AVFoundation.AVAudioSequencer.Load(Foundation.NSUrl,AVFoundation.AVMusicSequenceLoadOptions,Foundation.NSError@) M:AVFoundation.AVAudioSequencer.PrepareToPlay +M:AVFoundation.AVAudioSequencer.ReverseEvents +M:AVFoundation.AVAudioSequencer.SetUserCallback(AVFoundation.AVAudioSequencerUserCallback) M:AVFoundation.AVAudioSequencer.Start(Foundation.NSError@) M:AVFoundation.AVAudioSequencer.Stop M:AVFoundation.AVAudioSequencer.Write(Foundation.NSUrl,System.IntPtr,System.Boolean,Foundation.NSError@) +M:AVFoundation.AVAudioSequencerInfoDictionary.#ctor +M:AVFoundation.AVAudioSequencerInfoDictionary.#ctor(Foundation.NSDictionary) M:AVFoundation.AVAudioSession.Activate(AVFoundation.AVAudioSessionActivationOptions,System.Action{System.Boolean,Foundation.NSError}) M:AVFoundation.AVAudioSession.ActivateAsync(AVFoundation.AVAudioSessionActivationOptions) M:AVFoundation.AVAudioSession.add_BeginInterruption(System.EventHandler) @@ -26069,6 +26250,7 @@ M:AVFoundation.AVAudioSession.SetPreferredMicrophoneInjectionMode(AVFoundation.A M:AVFoundation.AVAudioSession.SetPreferredOutputNumberOfChannels(System.IntPtr,Foundation.NSError@) M:AVFoundation.AVAudioSession.SetPreferredSampleRate(System.Double,Foundation.NSError@) M:AVFoundation.AVAudioSession.SetPrefersEchoCancelledInput(System.Boolean,Foundation.NSError@) +M:AVFoundation.AVAudioSession.SetPrefersInterruptionOnRouteDisconnect(System.Boolean,Foundation.NSError@) M:AVFoundation.AVAudioSession.SetPrefersNoInterruptionsFromSystemAlerts(System.Boolean,Foundation.NSError@) M:AVFoundation.AVAudioSession.SetSupportsMultichannelContent(System.Boolean,Foundation.NSError@) M:AVFoundation.AVAudioSession.SharedInstance @@ -26131,6 +26313,7 @@ M:AVFoundation.AVAudioUnitSampler.LoadSoundBank(Foundation.NSUrl,System.Byte,Sys M:AVFoundation.AVAudioUnitTimeEffect.#ctor(AudioUnit.AudioComponentDescription) M:AVFoundation.AVAudioUnitTimePitch.#ctor(AudioUnit.AudioComponentDescription) M:AVFoundation.AVAudioUnitVarispeed.#ctor(AudioUnit.AudioComponentDescription) +M:AVFoundation.AVAUPresetEvent.#ctor(System.UInt32,System.UInt32,Foundation.NSDictionary) M:AVFoundation.AVBeatRange.#ctor(System.Double,System.Double) M:AVFoundation.AVBeatRange.Equals(AVFoundation.AVBeatRange) M:AVFoundation.AVBeatRange.Equals(System.Object) @@ -26148,6 +26331,8 @@ M:AVFoundation.AVCaptionSize.Create(AVFoundation.AVCaptionDimension,AVFoundation M:AVFoundation.AVCaptureAudioDataOutputSampleBufferDelegate_Extensions.DidOutputSampleBuffer(AVFoundation.IAVCaptureAudioDataOutputSampleBufferDelegate,AVFoundation.AVCaptureOutput,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureConnection) M:AVFoundation.AVCaptureDepthDataOutputDelegate_Extensions.DidDropDepthData(AVFoundation.IAVCaptureDepthDataOutputDelegate,AVFoundation.AVCaptureDepthDataOutput,AVFoundation.AVDepthData,CoreMedia.CMTime,AVFoundation.AVCaptureConnection,AVFoundation.AVCaptureOutputDataDroppedReason) M:AVFoundation.AVCaptureDepthDataOutputDelegate_Extensions.DidOutputDepthData(AVFoundation.IAVCaptureDepthDataOutputDelegate,AVFoundation.AVCaptureDepthDataOutput,AVFoundation.AVDepthData,CoreMedia.CMTime,AVFoundation.AVCaptureConnection) +M:AVFoundation.AVCaptureDeskViewApplication.PresentAsync +M:AVFoundation.AVCaptureDeskViewApplication.PresentAsync(AVFoundation.AVCaptureDeskViewApplicationLaunchConfiguration) M:AVFoundation.AVCaptureDevice.Dispose(System.Boolean) M:AVFoundation.AVCaptureDevice.GetAuthorizationStatus(AVFoundation.AVAuthorizationMediaType) M:AVFoundation.AVCaptureDevice.GetDefaultDevice(AVFoundation.AVCaptureDeviceType,System.String,AVFoundation.AVCaptureDevicePosition) @@ -26161,6 +26346,7 @@ M:AVFoundation.AVCaptureDevice.SetExposureTargetBiasAsync(System.Single) M:AVFoundation.AVCaptureDevice.SetFocusModeLockedAsync(System.Single) M:AVFoundation.AVCaptureDevice.SetWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsAsync(AVFoundation.AVCaptureWhiteBalanceGains) M:AVFoundation.AVCaptureDeviceInput.FromDevice(AVFoundation.AVCaptureDevice) +M:AVFoundation.AVCaptureDeviceRotationCoordinator.Dispose(System.Boolean) M:AVFoundation.AVCaptureFileOutput.Dispose(System.Boolean) M:AVFoundation.AVCaptureFileOutput.StartRecordingToOutputFile(Foundation.NSUrl,System.Action{Foundation.NSObject[]},System.Action{Foundation.NSObject[],Foundation.NSError}) M:AVFoundation.AVCaptureFileOutputDelegate_Extensions.DidOutputSampleBuffer(AVFoundation.IAVCaptureFileOutputDelegate,AVFoundation.AVCaptureOutput,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureConnection) @@ -26172,6 +26358,7 @@ M:AVFoundation.AVCaptureFileOutputRecordingDelegate_Extensions.WillFinishRecordi M:AVFoundation.AVCaptureMetadataOutputObjectsDelegate_Extensions.DidOutputMetadataObjects(AVFoundation.IAVCaptureMetadataOutputObjectsDelegate,AVFoundation.AVCaptureMetadataOutput,AVFoundation.AVMetadataObject[],AVFoundation.AVCaptureConnection) M:AVFoundation.AVCapturePhotoCaptureDelegate_Extensions.DidCapturePhoto(AVFoundation.IAVCapturePhotoCaptureDelegate,AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCaptureResolvedPhotoSettings) M:AVFoundation.AVCapturePhotoCaptureDelegate_Extensions.DidFinishCapture(AVFoundation.IAVCapturePhotoCaptureDelegate,AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCaptureResolvedPhotoSettings,Foundation.NSError) +M:AVFoundation.AVCapturePhotoCaptureDelegate_Extensions.DidFinishCapturingDeferredPhotoProxy(AVFoundation.IAVCapturePhotoCaptureDelegate,AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCaptureDeferredPhotoProxy,Foundation.NSError) M:AVFoundation.AVCapturePhotoCaptureDelegate_Extensions.DidFinishProcessingLivePhotoMovie(AVFoundation.IAVCapturePhotoCaptureDelegate,AVFoundation.AVCapturePhotoOutput,Foundation.NSUrl,CoreMedia.CMTime,CoreMedia.CMTime,AVFoundation.AVCaptureResolvedPhotoSettings,Foundation.NSError) M:AVFoundation.AVCapturePhotoCaptureDelegate_Extensions.DidFinishProcessingPhoto(AVFoundation.IAVCapturePhotoCaptureDelegate,AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCapturePhoto,Foundation.NSError) M:AVFoundation.AVCapturePhotoCaptureDelegate_Extensions.DidFinishProcessingPhoto(AVFoundation.IAVCapturePhotoCaptureDelegate,AVFoundation.AVCapturePhotoOutput,CoreMedia.CMSampleBuffer,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureResolvedPhotoSettings,AVFoundation.AVCaptureBracketedStillImageSettings,Foundation.NSError) @@ -26188,6 +26375,7 @@ M:AVFoundation.AVCapturePhotoFileDataRepresentationCustomizer_Extensions.GetRepl M:AVFoundation.AVCapturePhotoOutput.Dispose(System.Boolean) M:AVFoundation.AVCapturePhotoOutput.GetSupportedPhotoCodecTypesForFileType(System.String) M:AVFoundation.AVCapturePhotoOutput.SetPreparedPhotoSettingsAsync(AVFoundation.AVCapturePhotoSettings[]) +M:AVFoundation.AVCapturePhotoOutputReadinessCoordinator.Dispose(System.Boolean) M:AVFoundation.AVCapturePhotoSettings.Dispose(System.Boolean) M:AVFoundation.AVCapturePhotoSettingsThumbnailFormat.#ctor M:AVFoundation.AVCapturePhotoSettingsThumbnailFormat.#ctor(Foundation.NSDictionary) @@ -26195,6 +26383,7 @@ M:AVFoundation.AVCaptureReactionTypeExtensions.GetConstant(AVFoundation.AVCaptur M:AVFoundation.AVCaptureReactionTypeExtensions.GetValue(Foundation.NSString) M:AVFoundation.AVCaptureSessionRuntimeErrorEventArgs.#ctor(Foundation.NSNotification) M:AVFoundation.AVCaptureStillImageOutput.CaptureStillImageTaskAsync(AVFoundation.AVCaptureConnection) +M:AVFoundation.AVCaptureVideoDataOutput.GetRecommendedVideoSettings(AVFoundation.AVVideoCodecType,AVFoundation.AVFileTypes,Foundation.NSUrl) M:AVFoundation.AVCaptureVideoDataOutput.GetRecommendedVideoSettings(System.String,System.String) M:AVFoundation.AVCaptureVideoDataOutputSampleBufferDelegate_Extensions.DidDropSampleBuffer(AVFoundation.IAVCaptureVideoDataOutputSampleBufferDelegate,AVFoundation.AVCaptureOutput,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureConnection) M:AVFoundation.AVCaptureVideoDataOutputSampleBufferDelegate_Extensions.DidOutputSampleBuffer(AVFoundation.IAVCaptureVideoDataOutputSampleBufferDelegate,AVFoundation.AVCaptureOutput,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureConnection) @@ -26260,10 +26449,12 @@ M:AVFoundation.AVContentKeySession.MakeSecureTokenAsync(Foundation.NSData) M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidChange(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession) M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidFail(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest,Foundation.NSError) M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidGenerateExpiredSessionReport(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession) +M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidProvideContentKeyRequests(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest[],Foundation.NSData) M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidProvidePersistableContentKeyRequest(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,AVFoundation.AVPersistableContentKeyRequest) M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidProvideRenewingContentKeyRequest(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest) M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidSucceed(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest) M:AVFoundation.AVContentKeySessionDelegate_Extensions.DidUpdate(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,Foundation.NSData,Foundation.NSObject) +M:AVFoundation.AVContentKeySessionDelegate_Extensions.ExternalProtectionStatusDidChange(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,AVFoundation.AVContentKey) M:AVFoundation.AVContentKeySessionDelegate_Extensions.ShouldRetryContentKeyRequest(AVFoundation.IAVContentKeySessionDelegate,AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest,System.String) M:AVFoundation.AVContentKeySessionServerPlaybackContextOptions.#ctor M:AVFoundation.AVContentKeySessionServerPlaybackContextOptions.#ctor(Foundation.NSDictionary) @@ -26278,6 +26469,10 @@ M:AVFoundation.AVEdgeWidths.op_Equality(AVFoundation.AVEdgeWidths,AVFoundation.A M:AVFoundation.AVEdgeWidths.op_Inequality(AVFoundation.AVEdgeWidths,AVFoundation.AVEdgeWidths) M:AVFoundation.AVEdgeWidths.ToString M:AVFoundation.AVErrorEventArgs.#ctor(Foundation.NSError) +M:AVFoundation.AVExtendedNoteOnEvent.#ctor(System.Single,System.Single,System.UInt32,System.Double) +M:AVFoundation.AVExtendedNoteOnEvent.#ctor(System.Single,System.Single,System.UInt32,System.UInt32,System.Double) +M:AVFoundation.AVExtendedTempoEvent.#ctor(System.Double) +M:AVFoundation.AVExternalStorageDevice.RequestAccessAsync M:AVFoundation.AVFragmentedAsset_AVFragmentedAssetTrackInspection.GetTrack(AVFoundation.AVFragmentedAsset,System.Int32) M:AVFoundation.AVFragmentedAsset_AVFragmentedAssetTrackInspection.GetTracks(AVFoundation.AVFragmentedAsset,AVFoundation.AVMediaCharacteristics) M:AVFoundation.AVFragmentedAsset_AVFragmentedAssetTrackInspection.GetTracks(AVFoundation.AVFragmentedAsset,AVFoundation.AVMediaTypes) @@ -26306,11 +26501,21 @@ M:AVFoundation.AVMediaSelection.Dispose(System.Boolean) M:AVFoundation.AVMetadataItem.LoadValuesTaskAsync(System.String[]) M:AVFoundation.AVMetadataItemValueRequest.Dispose(System.Boolean) M:AVFoundation.AVMetadataObjectTypeExtensions.ToFlags(System.Collections.Generic.IEnumerable{Foundation.NSString}) +M:AVFoundation.AVMetricEventStream.SubscribeTo(System.Type) +M:AVFoundation.AVMetricEventStream.SubscribeTo(System.Type[]) +M:AVFoundation.AVMidiChannelPressureEvent.#ctor(System.UInt32,System.UInt32) +M:AVFoundation.AVMidiControlChangeEvent.#ctor(System.UInt32,AVFoundation.AVMidiControlChangeMessageType,System.UInt32) +M:AVFoundation.AVMidiMetaEvent.#ctor(AVFoundation.AVMidiMetaEventType,Foundation.NSData) +M:AVFoundation.AVMidiNoteEvent.#ctor(System.UInt32,System.UInt32,System.UInt32,System.Double) +M:AVFoundation.AVMidiPitchBendEvent.#ctor(System.UInt32,System.UInt32) M:AVFoundation.AVMidiPlayer.#ctor(Foundation.NSData,Foundation.NSUrl,Foundation.NSError@) M:AVFoundation.AVMidiPlayer.#ctor(Foundation.NSUrl,Foundation.NSUrl,Foundation.NSError@) M:AVFoundation.AVMidiPlayer.PlayAsync M:AVFoundation.AVMidiPlayer.PrepareToPlay M:AVFoundation.AVMidiPlayer.Stop +M:AVFoundation.AVMidiPolyPressureEvent.#ctor(System.UInt32,System.UInt32,System.UInt32) +M:AVFoundation.AVMidiProgramChangeEvent.#ctor(System.UInt32,System.UInt32) +M:AVFoundation.AVMidiSysexEvent.#ctor(Foundation.NSData) M:AVFoundation.AVMovie_AVMovieMovieHeaderSupport.GetMovieHeader(AVFoundation.AVMovie,System.String,Foundation.NSError@) M:AVFoundation.AVMovie_AVMovieMovieHeaderSupport.IsCompatibleWithFileType(AVFoundation.AVMovie,System.String) M:AVFoundation.AVMovie_AVMovieMovieHeaderSupport.WriteMovieHeader(AVFoundation.AVMovie,Foundation.NSUrl,System.String,AVFoundation.AVMovieWritingOptions,Foundation.NSError@) @@ -26325,6 +26530,14 @@ M:AVFoundation.AVMovie_AVMovieTrackInspection.LoadTracksWithMediaCharacteristic( M:AVFoundation.AVMovie_AVMovieTrackInspection.LoadTracksWithMediaCharacteristicAsync(AVFoundation.AVMovie,System.String) M:AVFoundation.AVMovie_AVMovieTrackInspection.LoadTracksWithMediaType(AVFoundation.AVMovie,System.String,System.Action{Foundation.NSArray{AVFoundation.AVMutableCompositionTrack},Foundation.NSError}) M:AVFoundation.AVMovie_AVMovieTrackInspection.LoadTracksWithMediaTypeAsync(AVFoundation.AVMovie,System.String) +M:AVFoundation.AVMusicTrack.AddEvent(AVFoundation.AVMusicEvent,System.Double) +M:AVFoundation.AVMusicTrack.ClearEvents(AVFoundation.AVBeatRange) +M:AVFoundation.AVMusicTrack.CopyAndMergeEvents(AVFoundation.AVBeatRange,AVFoundation.AVMusicTrack,System.Double) +M:AVFoundation.AVMusicTrack.CopyEvents(AVFoundation.AVBeatRange,AVFoundation.AVMusicTrack,System.Double) +M:AVFoundation.AVMusicTrack.CutEvents(AVFoundation.AVBeatRange) +M:AVFoundation.AVMusicTrack.EnumerateEvents(AVFoundation.AVBeatRange,AVFoundation.AVMusicEventEnumerationBlock) +M:AVFoundation.AVMusicTrack.MoveEvents(AVFoundation.AVBeatRange,System.Double) +M:AVFoundation.AVMusicUserEvent.#ctor(Foundation.NSData) M:AVFoundation.AVMutableComposition_AVMutableCompositionTrackInspection.GetTrack(AVFoundation.AVMutableComposition,System.Int32) M:AVFoundation.AVMutableComposition_AVMutableCompositionTrackInspection.GetTracks(AVFoundation.AVMutableComposition,AVFoundation.AVMediaCharacteristics) M:AVFoundation.AVMutableComposition_AVMutableCompositionTrackInspection.GetTracks(AVFoundation.AVMutableComposition,AVFoundation.AVMediaTypes) @@ -26337,6 +26550,7 @@ M:AVFoundation.AVMutableComposition_AVMutableCompositionTrackInspection.LoadTrac M:AVFoundation.AVMutableComposition_AVMutableCompositionTrackInspection.LoadTracksWithMediaType(AVFoundation.AVMutableComposition,System.String,System.Action{Foundation.NSArray{AVFoundation.AVMutableCompositionTrack},Foundation.NSError}) M:AVFoundation.AVMutableComposition_AVMutableCompositionTrackInspection.LoadTracksWithMediaTypeAsync(AVFoundation.AVMutableComposition,System.String) M:AVFoundation.AVMutableComposition.AddTracks(Cinematic.CNAssetInfo,System.Int32) +M:AVFoundation.AVMutableComposition.InsertAsync(CoreMedia.CMTimeRange,AVFoundation.AVAsset,CoreMedia.CMTime) M:AVFoundation.AVMutableMovie_AVMutableMovieMovieLevelEditing.InsertEmptyTimeRange(AVFoundation.AVMutableMovie,CoreMedia.CMTimeRange) M:AVFoundation.AVMutableMovie_AVMutableMovieMovieLevelEditing.InsertTimeRange(AVFoundation.AVMutableMovie,CoreMedia.CMTimeRange,AVFoundation.AVAsset,CoreMedia.CMTime,System.Boolean,Foundation.NSError@) M:AVFoundation.AVMutableMovie_AVMutableMovieMovieLevelEditing.RemoveTimeRange(AVFoundation.AVMutableMovie,CoreMedia.CMTimeRange) @@ -26359,6 +26573,10 @@ M:AVFoundation.AVMutableMovieTrack_AVMutableMovieTrack_TrackLevelEditing.RemoveT M:AVFoundation.AVMutableMovieTrack_AVMutableMovieTrack_TrackLevelEditing.ScaleTimeRange(AVFoundation.AVMutableMovieTrack,CoreMedia.CMTimeRange,CoreMedia.CMTime) M:AVFoundation.AVMutableMovieTrack_AVMutableMovieTrackTrackAssociations.AddTrackAssociation(AVFoundation.AVMutableMovieTrack,AVFoundation.AVMovieTrack,System.String) M:AVFoundation.AVMutableMovieTrack_AVMutableMovieTrackTrackAssociations.RemoveTrackAssociation(AVFoundation.AVMutableMovieTrack,AVFoundation.AVMovieTrack,System.String) +M:AVFoundation.AVMutableVideoComposition.CreateAsync(AVFoundation.AVAsset,AVFoundation.AVMutableVideoCompositionCreateApplier) +M:AVFoundation.AVMutableVideoComposition.CreateAsync(AVFoundation.AVAsset,AVFoundation.AVVideoCompositionInstruction) +M:AVFoundation.AVMutableVideoComposition.CreateAsync(AVFoundation.AVAsset) +M:AVFoundation.AVParameterEvent.#ctor(System.UInt32,System.UInt32,System.UInt32,System.Single) M:AVFoundation.AVPixelAspectRatio.#ctor(System.IntPtr,System.IntPtr) M:AVFoundation.AVPixelAspectRatio.Equals(System.Object) M:AVFoundation.AVPixelAspectRatio.GetHashCode @@ -26367,6 +26585,7 @@ M:AVFoundation.AVPixelAspectRatio.op_Inequality(AVFoundation.AVPixelAspectRatio, M:AVFoundation.AVPixelAspectRatio.ToString M:AVFoundation.AVPixelAspectRatioProperties.#ctor M:AVFoundation.AVPixelAspectRatioProperties.#ctor(Foundation.NSDictionary) +M:AVFoundation.AVPlayer.Dispose(System.Boolean) M:AVFoundation.AVPlayer.PrerollAsync(System.Single) M:AVFoundation.AVPlayer.SeekAsync(CoreMedia.CMTime,CoreMedia.CMTime,CoreMedia.CMTime) M:AVFoundation.AVPlayer.SeekAsync(CoreMedia.CMTime) @@ -26391,6 +26610,8 @@ M:AVFoundation.AVPlayerItem.SeekAsync(CoreMedia.CMTime) M:AVFoundation.AVPlayerItem.SeekAsync(Foundation.NSDate,System.Boolean@) M:AVFoundation.AVPlayerItem.SeekAsync(Foundation.NSDate) M:AVFoundation.AVPlayerItemErrorEventArgs.#ctor(Foundation.NSNotification) +M:AVFoundation.AVPlayerItemIntegratedTimeline.SeekToDateAsync(Foundation.NSDate) +M:AVFoundation.AVPlayerItemIntegratedTimeline.SeekToTimeAsync(CoreMedia.CMTime,CoreMedia.CMTime,CoreMedia.CMTime) M:AVFoundation.AVPlayerItemLegibleOutputPushDelegate_Extensions.DidOutputAttributedStrings(AVFoundation.IAVPlayerItemLegibleOutputPushDelegate,AVFoundation.AVPlayerItemLegibleOutput,Foundation.NSAttributedString[],CoreMedia.CMSampleBuffer[],CoreMedia.CMTime) M:AVFoundation.AVPlayerItemMetadataCollector.Dispose(System.Boolean) M:AVFoundation.AVPlayerItemMetadataOutput.Dispose(System.Boolean) @@ -26398,6 +26619,7 @@ M:AVFoundation.AVPlayerItemMetadataOutputPushDelegate_Extensions.DidOutputTimedM M:AVFoundation.AVPlayerItemOutputPullDelegate_Extensions.OutputMediaDataWillChange(AVFoundation.IAVPlayerItemOutputPullDelegate,AVFoundation.AVPlayerItemOutput) M:AVFoundation.AVPlayerItemOutputPullDelegate_Extensions.OutputSequenceWasFlushed(AVFoundation.IAVPlayerItemOutputPullDelegate,AVFoundation.AVPlayerItemOutput) M:AVFoundation.AVPlayerItemOutputPushDelegate_Extensions.OutputSequenceWasFlushed(AVFoundation.IAVPlayerItemOutputPushDelegate,AVFoundation.AVPlayerItemOutput) +M:AVFoundation.AVPlayerItemRenderedLegibleOutput.Dispose(System.Boolean) M:AVFoundation.AVPlayerItemTimeJumpedEventArgs.#ctor(Foundation.NSNotification) M:AVFoundation.AVPlayerItemVideoOutput.#ctor(AVFoundation.AVPlayerItemVideoOutputSettings) M:AVFoundation.AVPlayerItemVideoOutput.#ctor(CoreVideo.CVPixelBufferAttributes) @@ -26410,11 +26632,20 @@ M:AVFoundation.AVPlayerPlaybackCoordinator.Dispose(System.Boolean) M:AVFoundation.AVPlayerPlaybackCoordinatorDelegate_Extensions.GetIdentifier(AVFoundation.IAVPlayerPlaybackCoordinatorDelegate,AVFoundation.AVPlayerPlaybackCoordinator,AVFoundation.AVPlayerItem) M:AVFoundation.AVPlayerPlaybackCoordinatorDelegate_Extensions.GetInterstitialTimeRanges(AVFoundation.IAVPlayerPlaybackCoordinatorDelegate,AVFoundation.AVPlayerPlaybackCoordinator,AVFoundation.AVPlayerItem) M:AVFoundation.AVPlayerRateDidChangeEventArgs.#ctor(Foundation.NSNotification) +M:AVFoundation.AVPlayerVideoOutputConfiguration.Dispose(System.Boolean) M:AVFoundation.AVSampleBufferAudioRenderer.FlushAsync(CoreMedia.CMTime) M:AVFoundation.AVSampleBufferDisplayLayer_ProtectedContent.GetOutputObscuredDueToInsufficientExternalProtection(AVFoundation.AVSampleBufferDisplayLayer) M:AVFoundation.AVSampleBufferGenerator.NotifyOfDataReadyAsync(CoreMedia.CMSampleBuffer) +M:AVFoundation.AVSampleBufferGeneratorBatch.MakeDataReadyAsync M:AVFoundation.AVSampleBufferRenderSynchronizer.RemoveAsync(AVFoundation.IAVQueuedSampleBufferRendering,CoreMedia.CMTime) +M:AVFoundation.AVSampleBufferVideoRenderer.LoadVideoPerformanceMetricsAsync M:AVFoundation.AVSampleRateEventArgs.#ctor(System.Double) +M:AVFoundation.AVSpeechSynthesisMarker.#ctor(AVFoundation.AVSpeechSynthesisMarkerMark,Foundation.NSRange,System.UIntPtr) +M:AVFoundation.AVSpeechSynthesisProviderAudioUnit.CancelSpeechRequest +M:AVFoundation.AVSpeechSynthesisProviderAudioUnit.SynthesizeSpeechRequest(AVFoundation.AVSpeechSynthesisProviderRequest) +M:AVFoundation.AVSpeechSynthesisProviderRequest.#ctor(System.String,AVFoundation.AVSpeechSynthesisProviderVoice) +M:AVFoundation.AVSpeechSynthesisProviderVoice.#ctor(System.String,System.String,System.String[],System.String[]) +M:AVFoundation.AVSpeechSynthesisProviderVoice.UpdateSpeechVoices M:AVFoundation.AVSpeechSynthesisVoice.FromIdentifier(System.String) M:AVFoundation.AVSpeechSynthesisVoice.FromLanguage(System.String) M:AVFoundation.AVSpeechSynthesisVoice.GetSpeechVoices @@ -26423,6 +26654,7 @@ M:AVFoundation.AVSpeechSynthesizer.add_DidContinueSpeechUtterance(System.EventHa M:AVFoundation.AVSpeechSynthesizer.add_DidFinishSpeechUtterance(System.EventHandler{AVFoundation.AVSpeechSynthesizerUteranceEventArgs}) M:AVFoundation.AVSpeechSynthesizer.add_DidPauseSpeechUtterance(System.EventHandler{AVFoundation.AVSpeechSynthesizerUteranceEventArgs}) M:AVFoundation.AVSpeechSynthesizer.add_DidStartSpeechUtterance(System.EventHandler{AVFoundation.AVSpeechSynthesizerUteranceEventArgs}) +M:AVFoundation.AVSpeechSynthesizer.add_WillSpeakMarker(System.EventHandler{AVFoundation.AVSpeechSynthesizerWillSpeakMarkerEventArgs}) M:AVFoundation.AVSpeechSynthesizer.add_WillSpeakRangeOfSpeechString(System.EventHandler{AVFoundation.AVSpeechSynthesizerWillSpeakEventArgs}) M:AVFoundation.AVSpeechSynthesizer.ContinueSpeaking M:AVFoundation.AVSpeechSynthesizer.Dispose(System.Boolean) @@ -26432,26 +26664,33 @@ M:AVFoundation.AVSpeechSynthesizer.remove_DidContinueSpeechUtterance(System.Even M:AVFoundation.AVSpeechSynthesizer.remove_DidFinishSpeechUtterance(System.EventHandler{AVFoundation.AVSpeechSynthesizerUteranceEventArgs}) M:AVFoundation.AVSpeechSynthesizer.remove_DidPauseSpeechUtterance(System.EventHandler{AVFoundation.AVSpeechSynthesizerUteranceEventArgs}) M:AVFoundation.AVSpeechSynthesizer.remove_DidStartSpeechUtterance(System.EventHandler{AVFoundation.AVSpeechSynthesizerUteranceEventArgs}) +M:AVFoundation.AVSpeechSynthesizer.remove_WillSpeakMarker(System.EventHandler{AVFoundation.AVSpeechSynthesizerWillSpeakMarkerEventArgs}) M:AVFoundation.AVSpeechSynthesizer.remove_WillSpeakRangeOfSpeechString(System.EventHandler{AVFoundation.AVSpeechSynthesizerWillSpeakEventArgs}) +M:AVFoundation.AVSpeechSynthesizer.RequestPersonalVoiceAuthorization(AVFoundation.AVSpeechSynthesizerRequestPersonalVoiceAuthorizationCallback) +M:AVFoundation.AVSpeechSynthesizer.RequestPersonalVoiceAuthorizationAsync M:AVFoundation.AVSpeechSynthesizer.SpeakUtterance(AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizer.StopSpeaking(AVFoundation.AVSpeechBoundary) +M:AVFoundation.AVSpeechSynthesizer.WriteUtterance(AVFoundation.AVSpeechUtterance,AVFoundation.AVSpeechSynthesizerBufferCallback,AVFoundation.AVSpeechSynthesizerMarkerCallback) M:AVFoundation.AVSpeechSynthesizer.WriteUtterance(AVFoundation.AVSpeechUtterance,System.Action{AVFoundation.AVAudioBuffer}) M:AVFoundation.AVSpeechSynthesizerDelegate_Extensions.DidCancelSpeechUtterance(AVFoundation.IAVSpeechSynthesizerDelegate,AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate_Extensions.DidContinueSpeechUtterance(AVFoundation.IAVSpeechSynthesizerDelegate,AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate_Extensions.DidFinishSpeechUtterance(AVFoundation.IAVSpeechSynthesizerDelegate,AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate_Extensions.DidPauseSpeechUtterance(AVFoundation.IAVSpeechSynthesizerDelegate,AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate_Extensions.DidStartSpeechUtterance(AVFoundation.IAVSpeechSynthesizerDelegate,AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) +M:AVFoundation.AVSpeechSynthesizerDelegate_Extensions.WillSpeakMarker(AVFoundation.IAVSpeechSynthesizerDelegate,AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechSynthesisMarker,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate_Extensions.WillSpeakRangeOfSpeechString(AVFoundation.IAVSpeechSynthesizerDelegate,AVFoundation.AVSpeechSynthesizer,Foundation.NSRange,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate.DidCancelSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate.DidContinueSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate.DidFinishSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate.DidPauseSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate.DidStartSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) +M:AVFoundation.AVSpeechSynthesizerDelegate.WillSpeakMarker(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechSynthesisMarker,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerDelegate.WillSpeakRangeOfSpeechString(AVFoundation.AVSpeechSynthesizer,Foundation.NSRange,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerUteranceEventArgs.#ctor(AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechSynthesizerWillSpeakEventArgs.#ctor(Foundation.NSRange,AVFoundation.AVSpeechUtterance) +M:AVFoundation.AVSpeechSynthesizerWillSpeakMarkerEventArgs.#ctor(AVFoundation.AVSpeechSynthesisMarker,AVFoundation.AVSpeechUtterance) M:AVFoundation.AVSpeechUtterance.#ctor(Foundation.NSAttributedString) -M:AVFoundation.AVSpeechUtterance.#ctor(System.String) +M:AVFoundation.AVSpeechUtterance.FromSsmlRepresentation(System.String) M:AVFoundation.AVSpeechUtterance.FromString(Foundation.NSAttributedString) M:AVFoundation.AVSpeechUtterance.FromString(System.String) M:AVFoundation.AVStatusEventArgs.#ctor(System.Boolean) @@ -26477,6 +26716,9 @@ M:AVFoundation.AVVideoCompositing_Extensions.GetCanConformColorOfSourceFrames(AV M:AVFoundation.AVVideoCompositing_Extensions.GetSupportsHdrSourceFrames(AVFoundation.IAVVideoCompositing) M:AVFoundation.AVVideoCompositing_Extensions.GetSupportsWideColorSourceFrames(AVFoundation.IAVVideoCompositing) M:AVFoundation.AVVideoCompositing_Extensions.PrerollForRendering(AVFoundation.IAVVideoCompositing,AVFoundation.AVVideoCompositionRenderHint) +M:AVFoundation.AVVideoComposition.CreateAsync(AVFoundation.AVAsset,AVFoundation.AVVideoCompositionCreateApplier) +M:AVFoundation.AVVideoComposition.CreateAsync(AVFoundation.AVAsset) +M:AVFoundation.AVVideoComposition.DetermineValidityAsync(AVFoundation.AVAsset,CoreMedia.CMTimeRange,AVFoundation.IAVVideoCompositionValidationHandling) M:AVFoundation.AVVideoCompositionValidationHandling_Extensions.ShouldContinueValidatingAfterFindingEmptyTimeRange(AVFoundation.IAVVideoCompositionValidationHandling,AVFoundation.AVVideoComposition,CoreMedia.CMTimeRange) M:AVFoundation.AVVideoCompositionValidationHandling_Extensions.ShouldContinueValidatingAfterFindingInvalidTimeRangeInInstruction(AVFoundation.IAVVideoCompositionValidationHandling,AVFoundation.AVVideoComposition,AVFoundation.AVVideoCompositionInstruction) M:AVFoundation.AVVideoCompositionValidationHandling_Extensions.ShouldContinueValidatingAfterFindingInvalidTrackIDInInstruction(AVFoundation.IAVVideoCompositionValidationHandling,AVFoundation.AVVideoComposition,AVFoundation.AVVideoCompositionInstruction,AVFoundation.AVVideoCompositionLayerInstruction,AVFoundation.AVAsset) @@ -26494,6 +26736,7 @@ M:AVFoundation.IAVAssetDownloadDelegate.DidLoadTimeRange(Foundation.NSUrlSession M:AVFoundation.IAVAssetDownloadDelegate.DidResolveMediaSelection(Foundation.NSUrlSession,AVFoundation.AVAssetDownloadTask,AVFoundation.AVMediaSelection) M:AVFoundation.IAVAssetDownloadDelegate.WillDownloadToUrl(Foundation.NSUrlSession,AVFoundation.AVAggregateAssetDownloadTask,Foundation.NSUrl) M:AVFoundation.IAVAssetDownloadDelegate.WillDownloadVariants(Foundation.NSUrlSession,AVFoundation.AVAssetDownloadTask,AVFoundation.AVAssetVariant[]) +M:AVFoundation.IAVAssetDownloadDelegate.WilllDownloadToUrl(Foundation.NSUrlSession,AVFoundation.AVAssetDownloadTask,Foundation.NSUrl) M:AVFoundation.IAVAssetReaderCaptionValidationHandling.DidVendCaption(AVFoundation.AVAssetReaderOutputCaptionAdaptor,AVFoundation.AVCaption,System.String[]) M:AVFoundation.IAVAssetResourceLoaderDelegate.DidCancelAuthenticationChallenge(AVFoundation.AVAssetResourceLoader,Foundation.NSUrlAuthenticationChallenge) M:AVFoundation.IAVAssetResourceLoaderDelegate.DidCancelLoadingRequest(AVFoundation.AVAssetResourceLoader,AVFoundation.AVAssetResourceLoadingRequest) @@ -26534,6 +26777,7 @@ M:AVFoundation.IAVCaptureFileOutputRecordingDelegate.WillFinishRecording(AVFound M:AVFoundation.IAVCaptureMetadataOutputObjectsDelegate.DidOutputMetadataObjects(AVFoundation.AVCaptureMetadataOutput,AVFoundation.AVMetadataObject[],AVFoundation.AVCaptureConnection) M:AVFoundation.IAVCapturePhotoCaptureDelegate.DidCapturePhoto(AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCaptureResolvedPhotoSettings) M:AVFoundation.IAVCapturePhotoCaptureDelegate.DidFinishCapture(AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCaptureResolvedPhotoSettings,Foundation.NSError) +M:AVFoundation.IAVCapturePhotoCaptureDelegate.DidFinishCapturingDeferredPhotoProxy(AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCaptureDeferredPhotoProxy,Foundation.NSError) M:AVFoundation.IAVCapturePhotoCaptureDelegate.DidFinishProcessingLivePhotoMovie(AVFoundation.AVCapturePhotoOutput,Foundation.NSUrl,CoreMedia.CMTime,CoreMedia.CMTime,AVFoundation.AVCaptureResolvedPhotoSettings,Foundation.NSError) M:AVFoundation.IAVCapturePhotoCaptureDelegate.DidFinishProcessingPhoto(AVFoundation.AVCapturePhotoOutput,AVFoundation.AVCapturePhoto,Foundation.NSError) M:AVFoundation.IAVCapturePhotoCaptureDelegate.DidFinishProcessingPhoto(AVFoundation.AVCapturePhotoOutput,CoreMedia.CMSampleBuffer,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureResolvedPhotoSettings,AVFoundation.AVCaptureBracketedStillImageSettings,Foundation.NSError) @@ -26547,6 +26791,11 @@ M:AVFoundation.IAVCapturePhotoFileDataRepresentationCustomizer.GetReplacementEmb M:AVFoundation.IAVCapturePhotoFileDataRepresentationCustomizer.GetReplacementMetadata(AVFoundation.AVCapturePhoto) M:AVFoundation.IAVCapturePhotoFileDataRepresentationCustomizer.GetReplacementPortraitEffectsMatte(AVFoundation.AVCapturePhoto) M:AVFoundation.IAVCapturePhotoFileDataRepresentationCustomizer.GetReplacementSemanticSegmentationMatte(Foundation.NSString,AVFoundation.AVCapturePhoto) +M:AVFoundation.IAVCapturePhotoOutputReadinessCoordinatorDelegate.CaptureReadinessDidChange(AVFoundation.AVCapturePhotoOutputReadinessCoordinator,AVFoundation.AVCapturePhotoOutputCaptureReadiness) +M:AVFoundation.IAVCaptureSessionControlsDelegate.DidBecomeActive(AVFoundation.AVCaptureSession) +M:AVFoundation.IAVCaptureSessionControlsDelegate.DidBecomeInactive(AVFoundation.AVCaptureSession) +M:AVFoundation.IAVCaptureSessionControlsDelegate.WillEnterFullscreenAppearance(AVFoundation.AVCaptureSession) +M:AVFoundation.IAVCaptureSessionControlsDelegate.WillExitFullscreenAppearance(AVFoundation.AVCaptureSession) M:AVFoundation.IAVCaptureVideoDataOutputSampleBufferDelegate.DidDropSampleBuffer(AVFoundation.AVCaptureOutput,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureConnection) M:AVFoundation.IAVCaptureVideoDataOutputSampleBufferDelegate.DidOutputSampleBuffer(AVFoundation.AVCaptureOutput,CoreMedia.CMSampleBuffer,AVFoundation.AVCaptureConnection) M:AVFoundation.IAVContentKeyRecipient.DidProvideContentKey(AVFoundation.AVContentKeySession,AVFoundation.AVContentKey) @@ -26554,12 +26803,15 @@ M:AVFoundation.IAVContentKeySessionDelegate.DidChange(AVFoundation.AVContentKeyS M:AVFoundation.IAVContentKeySessionDelegate.DidFail(AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest,Foundation.NSError) M:AVFoundation.IAVContentKeySessionDelegate.DidGenerateExpiredSessionReport(AVFoundation.AVContentKeySession) M:AVFoundation.IAVContentKeySessionDelegate.DidProvideContentKeyRequest(AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest) +M:AVFoundation.IAVContentKeySessionDelegate.DidProvideContentKeyRequests(AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest[],Foundation.NSData) M:AVFoundation.IAVContentKeySessionDelegate.DidProvidePersistableContentKeyRequest(AVFoundation.AVContentKeySession,AVFoundation.AVPersistableContentKeyRequest) M:AVFoundation.IAVContentKeySessionDelegate.DidProvideRenewingContentKeyRequest(AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest) M:AVFoundation.IAVContentKeySessionDelegate.DidSucceed(AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest) M:AVFoundation.IAVContentKeySessionDelegate.DidUpdate(AVFoundation.AVContentKeySession,Foundation.NSData,Foundation.NSObject) +M:AVFoundation.IAVContentKeySessionDelegate.ExternalProtectionStatusDidChange(AVFoundation.AVContentKeySession,AVFoundation.AVContentKey) M:AVFoundation.IAVContentKeySessionDelegate.ShouldRetryContentKeyRequest(AVFoundation.AVContentKeySession,AVFoundation.AVContentKeyRequest,System.String) M:AVFoundation.IAVFragmentMinding.IsAssociatedWithFragmentMinder +M:AVFoundation.IAVMetricEventStreamSubscriber.DidReceiveEvent(AVFoundation.IAVMetricEventStreamPublisher,AVFoundation.AVMetricEvent) M:AVFoundation.IAVPlaybackCoordinatorPlaybackControlDelegate.DidIssueBufferingCommand(AVFoundation.AVDelegatingPlaybackCoordinator,AVFoundation.AVDelegatingPlaybackCoordinatorBufferingCommand,System.Action) M:AVFoundation.IAVPlaybackCoordinatorPlaybackControlDelegate.DidIssuePauseCommand(AVFoundation.AVDelegatingPlaybackCoordinator,AVFoundation.AVDelegatingPlaybackCoordinatorPauseCommand,System.Action) M:AVFoundation.IAVPlaybackCoordinatorPlaybackControlDelegate.DidIssuePlayCommand(AVFoundation.AVDelegatingPlaybackCoordinator,AVFoundation.AVDelegatingPlaybackCoordinatorPlayCommand,System.Action) @@ -26570,6 +26822,7 @@ M:AVFoundation.IAVPlayerItemMetadataOutputPushDelegate.DidOutputTimedMetadataGro M:AVFoundation.IAVPlayerItemOutputPullDelegate.OutputMediaDataWillChange(AVFoundation.AVPlayerItemOutput) M:AVFoundation.IAVPlayerItemOutputPullDelegate.OutputSequenceWasFlushed(AVFoundation.AVPlayerItemOutput) M:AVFoundation.IAVPlayerItemOutputPushDelegate.OutputSequenceWasFlushed(AVFoundation.AVPlayerItemOutput) +M:AVFoundation.IAVPlayerItemRenderedLegibleOutputPushDelegate.DidOutputRenderedCaptionImages(AVFoundation.AVPlayerItemRenderedLegibleOutput,AVFoundation.AVRenderedCaptionImage[],CoreMedia.CMTime) M:AVFoundation.IAVPlayerPlaybackCoordinatorDelegate.GetIdentifier(AVFoundation.AVPlayerPlaybackCoordinator,AVFoundation.AVPlayerItem) M:AVFoundation.IAVPlayerPlaybackCoordinatorDelegate.GetInterstitialTimeRanges(AVFoundation.AVPlayerPlaybackCoordinator,AVFoundation.AVPlayerItem) M:AVFoundation.IAVQueuedSampleBufferRendering.Enqueue(CoreMedia.CMSampleBuffer) @@ -26581,6 +26834,7 @@ M:AVFoundation.IAVSpeechSynthesizerDelegate.DidContinueSpeechUtterance(AVFoundat M:AVFoundation.IAVSpeechSynthesizerDelegate.DidFinishSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.IAVSpeechSynthesizerDelegate.DidPauseSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) M:AVFoundation.IAVSpeechSynthesizerDelegate.DidStartSpeechUtterance(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechUtterance) +M:AVFoundation.IAVSpeechSynthesizerDelegate.WillSpeakMarker(AVFoundation.AVSpeechSynthesizer,AVFoundation.AVSpeechSynthesisMarker,AVFoundation.AVSpeechUtterance) M:AVFoundation.IAVSpeechSynthesizerDelegate.WillSpeakRangeOfSpeechString(AVFoundation.AVSpeechSynthesizer,Foundation.NSRange,AVFoundation.AVSpeechUtterance) M:AVFoundation.IAVVideoCompositing.AnticipateRendering(AVFoundation.AVVideoCompositionRenderHint) M:AVFoundation.IAVVideoCompositing.CancelAllPendingVideoCompositionRequests @@ -26605,6 +26859,7 @@ M:AVKit.AVCaptureView.#ctor(CoreGraphics.CGRect) M:AVKit.AVCaptureView.Dispose(System.Boolean) M:AVKit.AVContentProposalViewController.#ctor(System.String,Foundation.NSBundle) M:AVKit.AVContentProposalViewController.Dispose(System.Boolean) +M:AVKit.AVContinuityDevicePickerViewController.Dispose(System.Boolean) M:AVKit.AVCustomRoutingControllerDelegate_Extensions.DidSelectItem(AVKit.IAVCustomRoutingControllerDelegate,AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingActionItem) M:AVKit.AVCustomRoutingControllerDelegate_Extensions.EventDidTimeOut(AVKit.IAVCustomRoutingControllerDelegate,AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingEvent) M:AVKit.AVCustomRoutingControllerDelegate.DidSelectItem(AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingActionItem) @@ -26673,6 +26928,10 @@ M:AVKit.AVRoutePickerView.Dispose(System.Boolean) M:AVKit.AVRoutePickerViewDelegate_Extensions.DidEndPresentingRoutes(AVKit.IAVRoutePickerViewDelegate,AVKit.AVRoutePickerView) M:AVKit.AVRoutePickerViewDelegate_Extensions.WillBeginPresentingRoutes(AVKit.IAVRoutePickerViewDelegate,AVKit.AVRoutePickerView) M:AVKit.IAVCaptureViewDelegate.StartRecording(AVKit.AVCaptureView,AVFoundation.AVCaptureFileOutput) +M:AVKit.IAVContinuityDevicePickerViewControllerDelegate.DidCancel(AVKit.AVContinuityDevicePickerViewController) +M:AVKit.IAVContinuityDevicePickerViewControllerDelegate.DidConnectDevice(AVKit.AVContinuityDevicePickerViewController,AVFoundation.AVContinuityDevice) +M:AVKit.IAVContinuityDevicePickerViewControllerDelegate.DidEndPresenting(AVKit.AVContinuityDevicePickerViewController) +M:AVKit.IAVContinuityDevicePickerViewControllerDelegate.WillBeginPresenting(AVKit.AVContinuityDevicePickerViewController) M:AVKit.IAVCustomRoutingControllerDelegate.DidSelectItem(AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingActionItem) M:AVKit.IAVCustomRoutingControllerDelegate.EventDidTimeOut(AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingEvent) M:AVKit.IAVCustomRoutingControllerDelegate.HandleEvent(AVRouting.AVCustomRoutingController,AVRouting.AVCustomRoutingEvent,AVKit.AVCustomRoutingControllerDelegateCompletionHandler) @@ -31185,7 +31444,7 @@ M:CoreMedia.CMSampleBuffer.CreateForImageBuffer(CoreVideo.CVImageBuffer,System.B M:CoreMedia.CMSampleBuffer.CreateReady(CoreMedia.CMBlockBuffer,CoreMedia.CMFormatDescription,System.Int32,CoreMedia.CMSampleTimingInfo[],System.UIntPtr[],CoreMedia.CMSampleBufferError@) M:CoreMedia.CMSampleBuffer.CreateReadyWithImageBuffer(CoreVideo.CVImageBuffer,CoreMedia.CMFormatDescription,CoreMedia.CMSampleTimingInfo@,CoreMedia.CMSampleBufferError@) M:CoreMedia.CMSampleBuffer.CreateReadyWithPacketDescriptions(CoreMedia.CMBlockBuffer,CoreMedia.CMFormatDescription,System.Int32,CoreMedia.CMTime,AudioToolbox.AudioStreamPacketDescription[],CoreMedia.CMSampleBufferError@) -M:CoreMedia.CMSampleBuffer.CreateWithNewTiming(CoreMedia.CMSampleBuffer,CoreMedia.CMSampleTimingInfo[],System.IntPtr@) +M:CoreMedia.CMSampleBuffer.CreateWithNewTiming(CoreMedia.CMSampleBuffer,CoreMedia.CMSampleTimingInfo[],System.Int32@) M:CoreMedia.CMSampleBuffer.CreateWithNewTiming(CoreMedia.CMSampleBuffer,CoreMedia.CMSampleTimingInfo[]) M:CoreMedia.CMSampleBuffer.CreateWithPacketDescriptions(CoreMedia.CMBlockBuffer,CoreMedia.CMFormatDescription,System.Int32,CoreMedia.CMTime,AudioToolbox.AudioStreamPacketDescription[],CoreMedia.CMSampleBufferError@) M:CoreMedia.CMSampleBuffer.Dispose(System.Boolean) @@ -31195,7 +31454,7 @@ M:CoreMedia.CMSampleBuffer.GetImageBuffer M:CoreMedia.CMSampleBuffer.GetSampleAttachments(System.Boolean) M:CoreMedia.CMSampleBuffer.GetSampleSize(System.IntPtr) M:CoreMedia.CMSampleBuffer.GetSampleTimingInfo -M:CoreMedia.CMSampleBuffer.GetSampleTimingInfo(System.IntPtr@) +M:CoreMedia.CMSampleBuffer.GetSampleTimingInfo(System.Int32@) M:CoreMedia.CMSampleBuffer.GetTypeID M:CoreMedia.CMSampleBuffer.GetVideoFormatDescription M:CoreMedia.CMSampleBuffer.Invalidate @@ -33095,15 +33354,11 @@ M:Foundation.NSArray`1.FromNSObjects(`0[]) M:Foundation.NSArray`1.FromNSObjects(System.Int32,`0[]) M:Foundation.NSArray`1.ToArray M:Foundation.NSAttributedString.#ctor(Foundation.NSData,Foundation.NSAttributedStringDocumentAttributes,Foundation.NSDictionary@) -M:Foundation.NSAttributedString.#ctor(Foundation.NSData,Foundation.NSAttributedStringDocumentAttributes,Foundation.NSError@) M:Foundation.NSAttributedString.#ctor(Foundation.NSData,Foundation.NSDictionary,Foundation.NSDictionary@) M:Foundation.NSAttributedString.#ctor(Foundation.NSData,Foundation.NSDictionary@) -M:Foundation.NSAttributedString.#ctor(Foundation.NSData,Foundation.NSError@) M:Foundation.NSAttributedString.#ctor(Foundation.NSData,Foundation.NSUrl,Foundation.NSDictionary@) M:Foundation.NSAttributedString.#ctor(Foundation.NSFileWrapper,Foundation.NSDictionary@) -M:Foundation.NSAttributedString.#ctor(Foundation.NSUrl,Foundation.NSAttributedStringDocumentAttributes,Foundation.NSError@) M:Foundation.NSAttributedString.#ctor(Foundation.NSUrl,Foundation.NSDictionary@) -M:Foundation.NSAttributedString.#ctor(Foundation.NSUrl,Foundation.NSError@) M:Foundation.NSAttributedString.#ctor(System.String,AppKit.NSFont,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor,AppKit.NSColor,Foundation.NSUnderlineStyle,Foundation.NSUnderlineStyle,AppKit.NSParagraphStyle,System.Single,AppKit.NSShadow,Foundation.NSUrl,System.Boolean,AppKit.NSTextAttachment,Foundation.NSLigatureType,System.Single,System.Single,System.Single,System.Single,AppKit.NSCursor,System.String,System.Int32,AppKit.NSGlyphInfo,Foundation.NSArray,System.Boolean,AppKit.NSTextLayoutOrientation,AppKit.NSTextAlternatives,AppKit.NSSpellingState) M:Foundation.NSAttributedString.#ctor(System.String,AppKit.NSStringAttributes) M:Foundation.NSAttributedString.#ctor(System.String,CoreText.CTStringAttributes) @@ -33713,9 +33968,6 @@ M:Foundation.NSObject.Bind(Foundation.NSString,Foundation.NSObject,System.String M:Foundation.NSObject.CommitEditing M:Foundation.NSObject.CommitEditing(Foundation.NSObject,ObjCRuntime.Selector,System.IntPtr) M:Foundation.NSObject.ConformsToProtocol(ObjCRuntime.NativeHandle) -M:Foundation.NSObject.DangerousAutorelease -M:Foundation.NSObject.DangerousRelease -M:Foundation.NSObject.DangerousRetain M:Foundation.NSObject.Dispose M:Foundation.NSObject.Dispose(System.Boolean) M:Foundation.NSObject.DoesNotRecognizeSelector(ObjCRuntime.Selector) @@ -41241,6 +41493,7 @@ M:NotificationCenter.NSExtensionContext_NCWidgetAdditions.SetWidgetLargestAvaila M:NotificationCenter.NSWidgetSearchForTermEventArgs.#ctor(System.String,System.UIntPtr) M:NotificationCenter.NSWidgetSearchResultSelectedEventArgs.#ctor(Foundation.NSObject) M:ObjCBindings.BindingTypeAttribute.#ctor +M:ObjCBindings.BindingTypeAttribute`1.#ctor M:ObjCBindings.ExportAttribute`1.#ctor M:ObjCRuntime.AdoptsAttribute.#ctor(System.String) M:ObjCRuntime.AssemblyRegistrationEventArgs.#ctor @@ -41323,8 +41576,6 @@ M:ObjCRuntime.LinkWithAttribute.#ctor M:ObjCRuntime.LinkWithAttribute.#ctor(System.String,ObjCRuntime.LinkTarget,System.String) M:ObjCRuntime.LinkWithAttribute.#ctor(System.String,ObjCRuntime.LinkTarget) M:ObjCRuntime.LinkWithAttribute.#ctor(System.String) -M:ObjCRuntime.MarshalManagedExceptionEventArgs.#ctor -M:ObjCRuntime.MarshalObjectiveCExceptionEventArgs.#ctor M:ObjCRuntime.MonoNativeFunctionWrapperAttribute.#ctor M:ObjCRuntime.MonoPInvokeCallbackAttribute.#ctor(System.Type) M:ObjCRuntime.NativeAttribute.#ctor @@ -51280,6 +51531,8 @@ P:AVFoundation.AVAssetExportPresetApple.M4VCellular P:AVFoundation.AVAssetExportPresetApple.M4ViPod P:AVFoundation.AVAssetExportPresetApple.M4VWiFi P:AVFoundation.AVAssetExportPresetApple.ProRes422Lpcm +P:AVFoundation.AVAssetExportSession.AVAssetExportPresetMvHevc1440x1440 +P:AVFoundation.AVAssetExportSession.AVAssetExportPresetMvHevc960x960 P:AVFoundation.AVAssetExportSession.Preset1280x720 P:AVFoundation.AVAssetExportSession.Preset1920x1080 P:AVFoundation.AVAssetExportSession.Preset3840x2160 @@ -51301,10 +51554,12 @@ P:AVFoundation.AVAssetExportSession.PresetPassthrough P:AVFoundation.AVAssetImageGenerator.ApertureModeCleanAperture P:AVFoundation.AVAssetImageGenerator.ApertureModeEncodedPixels P:AVFoundation.AVAssetImageGenerator.ApertureModeProductionAperture +P:AVFoundation.AVAssetImageGenerator.WeakDynamicRangePolicy P:AVFoundation.AVAssetReaderAudioMixOutput.Settings P:AVFoundation.AVAssetReaderOutputCaptionAdaptor.ValidationDelegate P:AVFoundation.AVAssetReaderVideoCompositionOutput.UncompressedVideoSettings P:AVFoundation.AVAssetResourceLoadingContentInformationRequest.ByteRangeAccessSupported +P:AVFoundation.AVAssetResourceLoadingContentInformationRequest.EntireLengthAvailableOnDemand P:AVFoundation.AVAssetResourceLoadingRequest.Finished P:AVFoundation.AVAssetResourceLoadingRequest.IsCancelled P:AVFoundation.AVAssetResourceLoadingRequest.StreamingContentKeyRequestRequiresPersistentKey @@ -51323,6 +51578,9 @@ P:AVFoundation.AVAssetTrackTrackAssociation.ForcedSubtitlesOnly P:AVFoundation.AVAssetTrackTrackAssociation.MetadataReferent P:AVFoundation.AVAssetTrackTrackAssociation.SelectionFollower P:AVFoundation.AVAssetTrackTrackAssociation.Timecode +P:AVFoundation.AVAssetVariantAudioRenditionSpecificAttributes.Binaural +P:AVFoundation.AVAssetVariantAudioRenditionSpecificAttributes.Downmix +P:AVFoundation.AVAssetVariantAudioRenditionSpecificAttributes.Immersive P:AVFoundation.AVAssetWriter.Delegate P:AVFoundation.AVAssetWriter.Inputs P:AVFoundation.AVAssetWriterInput.ReadyForMoreMediaData @@ -51334,7 +51592,9 @@ P:AVFoundation.AVAudio3DMixing.RenderingAlgorithm P:AVFoundation.AVAudio3DMixing.ReverbBlend P:AVFoundation.AVAudio3DMixing.SourceMode P:AVFoundation.AVAudioApplication.InputMuted +P:AVFoundation.AVAudioApplication.InputMuteStateChangeNotification P:AVFoundation.AVAudioApplication.MicrophoneInjectionPermission +P:AVFoundation.AVAudioApplication.MuteStateKey P:AVFoundation.AVAudioApplication.RecordPermission P:AVFoundation.AVAudioApplication.SharedInstance P:AVFoundation.AVAudioBuffer.AudioBufferList @@ -51426,6 +51686,7 @@ P:AVFoundation.AVAudioInputNode.SourceMode P:AVFoundation.AVAudioInputNode.VoiceProcessingAgcEnabled P:AVFoundation.AVAudioInputNode.VoiceProcessingBypassed P:AVFoundation.AVAudioInputNode.VoiceProcessingInputMuted +P:AVFoundation.AVAudioInputNode.VoiceProcessingOtherAudioDuckingConfiguration P:AVFoundation.AVAudioIONode.AudioUnit P:AVFoundation.AVAudioIONode.PresentationLatency P:AVFoundation.AVAudioIONode.VoiceProcessingEnabled @@ -51492,6 +51753,28 @@ P:AVFoundation.AVAudioSequencer.CurrentPositionInSeconds P:AVFoundation.AVAudioSequencer.Playing P:AVFoundation.AVAudioSequencer.TempoTrack P:AVFoundation.AVAudioSequencer.UserInfo +P:AVFoundation.AVAudioSequencerInfoDictionary.Album +P:AVFoundation.AVAudioSequencerInfoDictionary.ApproximateDurationInSeconds +P:AVFoundation.AVAudioSequencerInfoDictionary.Artist +P:AVFoundation.AVAudioSequencerInfoDictionary.ChannelLayout +P:AVFoundation.AVAudioSequencerInfoDictionary.Comments +P:AVFoundation.AVAudioSequencerInfoDictionary.Composer +P:AVFoundation.AVAudioSequencerInfoDictionary.Copyright +P:AVFoundation.AVAudioSequencerInfoDictionary.EncodingApplication +P:AVFoundation.AVAudioSequencerInfoDictionary.Genre +P:AVFoundation.AVAudioSequencerInfoDictionary.Isrc +P:AVFoundation.AVAudioSequencerInfoDictionary.KeySignature +P:AVFoundation.AVAudioSequencerInfoDictionary.Lyricist +P:AVFoundation.AVAudioSequencerInfoDictionary.NominalBitRate +P:AVFoundation.AVAudioSequencerInfoDictionary.RecordedDate +P:AVFoundation.AVAudioSequencerInfoDictionary.SourceBitDepth +P:AVFoundation.AVAudioSequencerInfoDictionary.SourceEncoder +P:AVFoundation.AVAudioSequencerInfoDictionary.SubTitle +P:AVFoundation.AVAudioSequencerInfoDictionary.Tempo +P:AVFoundation.AVAudioSequencerInfoDictionary.TimeSignature +P:AVFoundation.AVAudioSequencerInfoDictionary.Title +P:AVFoundation.AVAudioSequencerInfoDictionary.TrackNumber +P:AVFoundation.AVAudioSequencerInfoDictionary.Year P:AVFoundation.AVAudioSession.AllowHapticsAndSystemSoundsDuringRecording P:AVFoundation.AVAudioSession.AvailableCategories P:AVFoundation.AVAudioSession.AvailableInputs @@ -51540,6 +51823,7 @@ P:AVFoundation.AVAudioSession.PortBuiltInMic P:AVFoundation.AVAudioSession.PortBuiltInReceiver P:AVFoundation.AVAudioSession.PortBuiltInSpeaker P:AVFoundation.AVAudioSession.PortCarAudio +P:AVFoundation.AVAudioSession.PortContinuityMicrophone P:AVFoundation.AVAudioSession.PortDisplayPort P:AVFoundation.AVAudioSession.PortFireWire P:AVFoundation.AVAudioSession.PortHdmi @@ -51558,6 +51842,7 @@ P:AVFoundation.AVAudioSession.PreferredIOBufferDuration P:AVFoundation.AVAudioSession.PreferredMicrophoneInjectionMode P:AVFoundation.AVAudioSession.PreferredSampleRate P:AVFoundation.AVAudioSession.PrefersEchoCancelledInput +P:AVFoundation.AVAudioSession.PrefersInterruptionOnRouteDisconnect P:AVFoundation.AVAudioSession.PrefersNoInterruptionsFromSystemAlerts P:AVFoundation.AVAudioSession.PromptStyle P:AVFoundation.AVAudioSession.RecordPermission @@ -51707,6 +51992,11 @@ P:AVFoundation.AVAudioUnitType.MusicEffect P:AVFoundation.AVAudioUnitType.OfflineEffect P:AVFoundation.AVAudioUnitType.Output P:AVFoundation.AVAudioUnitType.Panner +P:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingConfiguration.DuckingLevel +P:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingConfiguration.EnableAdvancedDucking +P:AVFoundation.AVAUPresetEvent.Element +P:AVFoundation.AVAUPresetEvent.PresetDictionary +P:AVFoundation.AVAUPresetEvent.Scope P:AVFoundation.AVCaptionDimension.Units P:AVFoundation.AVCaptionSettings.MediaSubType P:AVFoundation.AVCaptionSettings.MediaType @@ -51727,6 +52017,7 @@ P:AVFoundation.AVCaptureConnection.SupportsVideoOrientation P:AVFoundation.AVCaptureConnection.SupportsVideoStabilization P:AVFoundation.AVCaptureConnection.VideoMirrored P:AVFoundation.AVCaptureConnection.VideoStabilizationEnabled +P:AVFoundation.AVCaptureControl.Enabled P:AVFoundation.AVCaptureDataOutputSynchronizer.Delegate P:AVFoundation.AVCaptureDepthDataOutput.Delegate P:AVFoundation.AVCaptureDepthDataOutput.FilteringEnabled @@ -51734,9 +52025,13 @@ P:AVFoundation.AVCaptureDevice.AdjustingExposure P:AVFoundation.AVCaptureDevice.AdjustingFocus P:AVFoundation.AVCaptureDevice.AdjustingWhiteBalance P:AVFoundation.AVCaptureDevice.AutoFocusRangeRestrictionSupported +P:AVFoundation.AVCaptureDevice.AutoVideoFrameRateEnabled +P:AVFoundation.AVCaptureDevice.BackgroundReplacementActive +P:AVFoundation.AVCaptureDevice.BackgroundReplacementEnabled P:AVFoundation.AVCaptureDevice.CenterStageActive P:AVFoundation.AVCaptureDevice.CenterStageEnabled P:AVFoundation.AVCaptureDevice.Connected +P:AVFoundation.AVCaptureDevice.ContinuityCamera P:AVFoundation.AVCaptureDevice.DeviceType P:AVFoundation.AVCaptureDevice.ExposureDurationCurrent P:AVFoundation.AVCaptureDevice.ExposurePointOfInterestSupported @@ -51763,6 +52058,8 @@ P:AVFoundation.AVCaptureDevice.PortraitEffectEnabled P:AVFoundation.AVCaptureDevice.RampingVideoZoom P:AVFoundation.AVCaptureDevice.SmoothAutoFocusEnabled P:AVFoundation.AVCaptureDevice.SmoothAutoFocusSupported +P:AVFoundation.AVCaptureDevice.StudioLightActive +P:AVFoundation.AVCaptureDevice.StudioLightEnabled P:AVFoundation.AVCaptureDevice.SubjectAreaChangeMonitoringEnabled P:AVFoundation.AVCaptureDevice.SubjectAreaDidChangeNotification P:AVFoundation.AVCaptureDevice.Suspended @@ -51773,6 +52070,8 @@ P:AVFoundation.AVCaptureDevice.VirtualDevice P:AVFoundation.AVCaptureDevice.WasConnectedNotification P:AVFoundation.AVCaptureDevice.WasDisconnectedNotification P:AVFoundation.AVCaptureDevice.WhiteBalanceGainsCurrent +P:AVFoundation.AVCaptureDeviceFormat.AutoVideoFrameRateSupported +P:AVFoundation.AVCaptureDeviceFormat.BackgroundReplacementSupported P:AVFoundation.AVCaptureDeviceFormat.CenterStageSupported P:AVFoundation.AVCaptureDeviceFormat.GlobalToneMappingSupported P:AVFoundation.AVCaptureDeviceFormat.HighestPhotoQualitySupported @@ -51781,8 +52080,12 @@ P:AVFoundation.AVCaptureDeviceFormat.IsVideoHdrSupported P:AVFoundation.AVCaptureDeviceFormat.MultiCamSupported P:AVFoundation.AVCaptureDeviceFormat.PortraitEffectsMatteStillImageDeliverySupported P:AVFoundation.AVCaptureDeviceFormat.PortraitEffectSupported +P:AVFoundation.AVCaptureDeviceFormat.SpatialVideoCaptureSupported +P:AVFoundation.AVCaptureDeviceFormat.StudioLightSupported P:AVFoundation.AVCaptureDeviceFormat.VideoBinned P:AVFoundation.AVCaptureDeviceFormat.VideoStabilizationSupported +P:AVFoundation.AVCaptureDeviceInput.WindNoiseRemovalEnabled +P:AVFoundation.AVCaptureDeviceInput.WindNoiseRemovalSupported P:AVFoundation.AVCaptureFileOutput.Recording P:AVFoundation.AVCaptureFileOutput.RecordingPaused P:AVFoundation.AVCaptureInput.PortFormatDescriptionDidChangeNotification @@ -51790,7 +52093,10 @@ P:AVFoundation.AVCaptureInputPort.Enabled P:AVFoundation.AVCaptureMetadataOutput.AvailableMetadataObjectTypes P:AVFoundation.AVCaptureMetadataOutput.MetadataObjectTypes P:AVFoundation.AVCaptureMovieFileOutput.PrimaryConstituentDeviceSwitchingBehaviorForRecordingEnabled +P:AVFoundation.AVCaptureMovieFileOutput.SpatialVideoCaptureEnabled +P:AVFoundation.AVCaptureMovieFileOutput.SpatialVideoCaptureSupported P:AVFoundation.AVCaptureMultiCamSession.MultiCamSupported +P:AVFoundation.AVCapturePhoto.ConstantColorFallbackPhoto P:AVFoundation.AVCapturePhoto.EmbeddedThumbnailPhotoFormat P:AVFoundation.AVCapturePhoto.Properties P:AVFoundation.AVCapturePhoto.RawPhoto @@ -51798,8 +52104,12 @@ P:AVFoundation.AVCapturePhoto.SourceDeviceType P:AVFoundation.AVCapturePhotoBracketSettings.IsLensStabilizationEnabled P:AVFoundation.AVCapturePhotoOutput.AppleProRawEnabled P:AVFoundation.AVCapturePhotoOutput.AppleProRawSupported +P:AVFoundation.AVCapturePhotoOutput.AutoDeferredPhotoDeliveryEnabled +P:AVFoundation.AVCapturePhotoOutput.AutoDeferredPhotoDeliverySupported P:AVFoundation.AVCapturePhotoOutput.AutoRedEyeReductionSupported P:AVFoundation.AVCapturePhotoOutput.CameraCalibrationDataDeliverySupported +P:AVFoundation.AVCapturePhotoOutput.ConstantColorEnabled +P:AVFoundation.AVCapturePhotoOutput.ConstantColorSupported P:AVFoundation.AVCapturePhotoOutput.ContentAwareDistortionCorrectionEnabled P:AVFoundation.AVCapturePhotoOutput.ContentAwareDistortionCorrectionSupported P:AVFoundation.AVCapturePhotoOutput.DepthDataDeliveryEnabled @@ -51807,6 +52117,8 @@ P:AVFoundation.AVCapturePhotoOutput.DepthDataDeliverySupported P:AVFoundation.AVCapturePhotoOutput.DualCameraDualPhotoDeliveryEnabled P:AVFoundation.AVCapturePhotoOutput.DualCameraDualPhotoDeliverySupported P:AVFoundation.AVCapturePhotoOutput.DualCameraFusionSupported +P:AVFoundation.AVCapturePhotoOutput.FastCapturePrioritizationEnabled +P:AVFoundation.AVCapturePhotoOutput.FastCapturePrioritizationSupported P:AVFoundation.AVCapturePhotoOutput.GetAvailablePhotoFileTypes P:AVFoundation.AVCapturePhotoOutput.GetAvailableRawPhotoFileTypes P:AVFoundation.AVCapturePhotoOutput.IsHighResolutionCaptureEnabled @@ -51818,15 +52130,23 @@ P:AVFoundation.AVCapturePhotoOutput.IsLivePhotoCaptureSuspended P:AVFoundation.AVCapturePhotoOutput.IsStillImageStabilizationSupported P:AVFoundation.AVCapturePhotoOutput.PortraitEffectsMatteDeliveryEnabled P:AVFoundation.AVCapturePhotoOutput.PortraitEffectsMatteDeliverySupported +P:AVFoundation.AVCapturePhotoOutput.ResponsiveCaptureEnabled +P:AVFoundation.AVCapturePhotoOutput.ResponsiveCaptureSupported +P:AVFoundation.AVCapturePhotoOutput.ShutterSoundSuppressionSupported P:AVFoundation.AVCapturePhotoOutput.VirtualDeviceConstituentPhotoDeliveryEnabled P:AVFoundation.AVCapturePhotoOutput.VirtualDeviceConstituentPhotoDeliverySupported P:AVFoundation.AVCapturePhotoOutput.VirtualDeviceFusionSupported +P:AVFoundation.AVCapturePhotoOutput.ZeroShutterLagEnabled +P:AVFoundation.AVCapturePhotoOutput.ZeroShutterLagSupported +P:AVFoundation.AVCapturePhotoOutputReadinessCoordinator.Delegate P:AVFoundation.AVCapturePhotoSettings.AutoContentAwareDistortionCorrectionEnabled P:AVFoundation.AVCapturePhotoSettings.AutoDualCameraFusionEnabled P:AVFoundation.AVCapturePhotoSettings.AutoRedEyeReductionEnabled P:AVFoundation.AVCapturePhotoSettings.AutoVirtualDeviceFusionEnabled P:AVFoundation.AVCapturePhotoSettings.AvailableEmbeddedThumbnailPhotoCodecTypes P:AVFoundation.AVCapturePhotoSettings.CameraCalibrationDataDeliveryEnabled +P:AVFoundation.AVCapturePhotoSettings.ConstantColorEnabled +P:AVFoundation.AVCapturePhotoSettings.ConstantColorFallbackPhotoDeliveryEnabled P:AVFoundation.AVCapturePhotoSettings.DepthDataDeliveryEnabled P:AVFoundation.AVCapturePhotoSettings.DepthDataFiltered P:AVFoundation.AVCapturePhotoSettings.DualCameraDualPhotoDeliveryEnabled @@ -51835,15 +52155,18 @@ P:AVFoundation.AVCapturePhotoSettings.IsAutoStillImageStabilizationEnabled P:AVFoundation.AVCapturePhotoSettings.IsHighResolutionPhotoEnabled P:AVFoundation.AVCapturePhotoSettings.PortraitEffectsMatteDeliveryEnabled P:AVFoundation.AVCapturePhotoSettings.RawEmbeddedThumbnailPhotoFormat +P:AVFoundation.AVCapturePhotoSettings.ShutterSoundSuppressionEnabled P:AVFoundation.AVCapturePhotoSettingsThumbnailFormat.Codec P:AVFoundation.AVCapturePhotoSettingsThumbnailFormat.Height P:AVFoundation.AVCapturePhotoSettingsThumbnailFormat.Width P:AVFoundation.AVCaptureResolvedPhotoSettings.ContentAwareDistortionCorrectionEnabled P:AVFoundation.AVCaptureResolvedPhotoSettings.DualCameraFusionEnabled +P:AVFoundation.AVCaptureResolvedPhotoSettings.FastCapturePrioritizationEnabled P:AVFoundation.AVCaptureResolvedPhotoSettings.IsFlashEnabled P:AVFoundation.AVCaptureResolvedPhotoSettings.IsStillImageStabilizationEnabled P:AVFoundation.AVCaptureResolvedPhotoSettings.RedEyeReductionEnabled P:AVFoundation.AVCaptureResolvedPhotoSettings.VirtualDeviceFusionEnabled +P:AVFoundation.AVCaptureSession.ControlsDelegate P:AVFoundation.AVCaptureSession.DidStartRunningNotification P:AVFoundation.AVCaptureSession.DidStopRunningNotification P:AVFoundation.AVCaptureSession.ErrorKey @@ -51908,6 +52231,7 @@ P:AVFoundation.AVContentKeySessionServerPlaybackContextOptions.ServerChallenge P:AVFoundation.AVContentProposal.AutomaticAcceptanceInterval P:AVFoundation.AVContentProposal.ContentTimeForTransition P:AVFoundation.AVContentProposal.PreviewImage +P:AVFoundation.AVContinuityDevice.Connected P:AVFoundation.AVCoordinatedPlaybackParticipant.ReadyToPlay P:AVFoundation.AVDelegatingPlaybackCoordinator.PlaybackControlDelegate P:AVFoundation.AVDepthData.AvailableDepthDataTypes @@ -51925,6 +52249,15 @@ P:AVFoundation.AVErrorKeys.Pid P:AVFoundation.AVErrorKeys.PresentationTimeStamp P:AVFoundation.AVErrorKeys.RecordingSuccessfullyFinished P:AVFoundation.AVErrorKeys.Time +P:AVFoundation.AVExtendedNoteOnEvent.DefaultInstrument +P:AVFoundation.AVExtendedNoteOnEvent.GroupId +P:AVFoundation.AVExtendedNoteOnEvent.InstrumentId +P:AVFoundation.AVExtendedNoteOnEvent.MidiNote +P:AVFoundation.AVExtendedNoteOnEvent.Velocity +P:AVFoundation.AVExtendedTempoEvent.Tempo +P:AVFoundation.AVExternalStorageDevice.Connected +P:AVFoundation.AVExternalStorageDevice.NotRecommendedForCaptureUse +P:AVFoundation.AVExternalStorageDeviceDiscoverySession.Supported P:AVFoundation.AVFragmentedMovie.ContainsMovieFragmentsDidChangeNotification P:AVFoundation.AVFragmentedMovie.DurationDidChangeNotification P:AVFoundation.AVFragmentedMovie.WasDefragmentedNotification @@ -52129,6 +52462,7 @@ P:AVFoundation.AVMetadata.KeySpaceiTunes P:AVFoundation.AVMetadata.KeySpaceQuickTimeMetadata P:AVFoundation.AVMetadata.KeySpaceQuickTimeUserData P:AVFoundation.AVMetadata.KKeySpaceISOUserData +P:AVFoundation.AVMetadata.QuickTimeMetadataFullFrameRatePlaybackIntent P:AVFoundation.AVMetadata.QuickTimeMetadataIsMontage P:AVFoundation.AVMetadata.QuickTimeMetadataKeyAccessibilityDescription P:AVFoundation.AVMetadata.QuickTimeMetadataKeyAlbum @@ -52151,6 +52485,7 @@ P:AVFoundation.AVMetadata.QuickTimeMetadataKeyDirectionMotion P:AVFoundation.AVMetadata.QuickTimeMetadataKeyDirector P:AVFoundation.AVMetadata.QuickTimeMetadataKeyDisplayName P:AVFoundation.AVMetadata.QuickTimeMetadataKeyEncodedBy +P:AVFoundation.AVMetadata.QuickTimeMetadataKeyFullFrameRatePlaybackIntent P:AVFoundation.AVMetadata.QuickTimeMetadataKeyGenre P:AVFoundation.AVMetadata.QuickTimeMetadataKeyInformation P:AVFoundation.AVMetadata.QuickTimeMetadataKeyIsMontage @@ -52496,8 +52831,15 @@ P:AVFoundation.AVMetadataIdentifiers.ThreeGP.UserDataTitle P:AVFoundation.AVMetadataIdentifiers.ThreeGP.UserDataUserRating P:AVFoundation.AVMetadataMachineReadableCodeObject.Corners P:AVFoundation.AVMetadataObject.Type +P:AVFoundation.AVMetricMediaResourceRequestEvent.ReadFromCache +P:AVFoundation.AVMidiChannelPressureEvent.Pressure +P:AVFoundation.AVMidiControlChangeEvent.MessageType +P:AVFoundation.AVMidiNoteEvent.Velocity P:AVFoundation.AVMidiPlayer.CurrentPosition P:AVFoundation.AVMidiPlayer.Playing +P:AVFoundation.AVMidiPolyPressureEvent.Pressure +P:AVFoundation.AVMidiProgramChangeEvent.ProgramNumber +P:AVFoundation.AVMidiSysexEvent.SizeInBytes P:AVFoundation.AVMovie.ReferenceRestrictionsKey P:AVFoundation.AVMovie.ShouldSupportAliasDataReferencesKey P:AVFoundation.AVMusicTrack.DestinationAudioUnit @@ -52511,6 +52853,8 @@ P:AVFoundation.AVMusicTrack.NumberOfLoops P:AVFoundation.AVMusicTrack.OffsetTime P:AVFoundation.AVMusicTrack.Soloed P:AVFoundation.AVMusicTrack.TimeResolution +P:AVFoundation.AVMusicTrack.UsesAutomatedParameters +P:AVFoundation.AVMusicUserEvent.SizeInBytes P:AVFoundation.AVMutableAssetDownloadStorageManagementPolicy.Priority P:AVFoundation.AVMutableCompositionTrack.Enabled P:AVFoundation.AVMutableMovie.Modified @@ -52526,6 +52870,9 @@ P:AVFoundation.AVOutputSettingsAssistant.Preset960x540 P:AVFoundation.AVOutputSettingsAssistant.PresetHevc1920x1080 P:AVFoundation.AVOutputSettingsAssistant.PresetHevc3840x2160 P:AVFoundation.AVOutputSettingsAssistant.UnCompressedVideoSettings +P:AVFoundation.AVParameterEvent.Element +P:AVFoundation.AVParameterEvent.ParameterId +P:AVFoundation.AVParameterEvent.Scope P:AVFoundation.AVPixelAspectRatioProperties.PixelAspectRatioHorizontalSpacing P:AVFoundation.AVPixelAspectRatioProperties.PixelAspectRatioVerticalSpacing P:AVFoundation.AVPlaybackCoordinator.OtherParticipantsDidChangeNotification @@ -52538,6 +52885,10 @@ P:AVFoundation.AVPlayer.ExternalPlaybackActive P:AVFoundation.AVPlayer.ExternalPlaybackVideoGravity P:AVFoundation.AVPlayer.Muted P:AVFoundation.AVPlayer.RateDidChangeNotification +P:AVFoundation.AVPlayerInterstitialEventMonitor.AssetListResponseStatusDidChangeErrorKey +P:AVFoundation.AVPlayerInterstitialEventMonitor.AssetListResponseStatusDidChangeEventKey +P:AVFoundation.AVPlayerInterstitialEventMonitor.AssetListResponseStatusDidChangeNotification +P:AVFoundation.AVPlayerInterstitialEventMonitor.AssetListResponseStatusDidChangeStatusKey P:AVFoundation.AVPlayerInterstitialEventMonitor.CurrentEventDidChangeNotification P:AVFoundation.AVPlayerInterstitialEventMonitor.EventsDidChangeNotification P:AVFoundation.AVPlayerItem.AudioSpatializationAllowed @@ -52561,10 +52912,13 @@ P:AVFoundation.AVPlayerItem.TranslatesPlayerInterstitialEvents P:AVFoundation.AVPlayerItem.VideoApertureMode P:AVFoundation.AVPlayerItem.WeakNowPlayingInfo P:AVFoundation.AVPlayerItemErrorEventArgs.Error +P:AVFoundation.AVPlayerItemIntegratedTimelineSnapshot.SnapshotsOutOfSyncNotification +P:AVFoundation.AVPlayerItemIntegratedTimelineSnapshot.SnapshotsOutOfSyncReasonKey P:AVFoundation.AVPlayerItemLegibleOutput.TextStylingResolutionDefault P:AVFoundation.AVPlayerItemLegibleOutput.TextStylingResolutionSourceAndRulesOnly P:AVFoundation.AVPlayerItemMetadataCollector.Delegate P:AVFoundation.AVPlayerItemMetadataOutput.Delegate +P:AVFoundation.AVPlayerItemRenderedLegibleOutput.Delegate P:AVFoundation.AVPlayerItemTimeJumpedEventArgs.OriginatingParticipant P:AVFoundation.AVPlayerItemTrack.Enabled P:AVFoundation.AVPlayerItemTrack.VideoFieldModeDeinterlaceFields @@ -52591,32 +52945,57 @@ P:AVFoundation.AVSampleBufferAudioRenderer.AudioRendererWasFlushedAutomaticallyN P:AVFoundation.AVSampleBufferAudioRenderer.ConfigurationDidChangeNotification P:AVFoundation.AVSampleBufferAudioRenderer.Muted P:AVFoundation.AVSampleBufferAudioRenderer.ReadyForMoreMediaData +P:AVFoundation.AVSampleBufferDisplayLayer.DisplayLayerReadyForDisplayDidChangeNotification P:AVFoundation.AVSampleBufferDisplayLayer.FailedToDecodeNotification P:AVFoundation.AVSampleBufferDisplayLayer.FailedToDecodeNotificationErrorKey P:AVFoundation.AVSampleBufferDisplayLayer.OutputObscuredDueToInsufficientExternalProtectionDidChangeNotification +P:AVFoundation.AVSampleBufferDisplayLayer.ReadyForDisplay P:AVFoundation.AVSampleBufferDisplayLayer.ReadyForMoreMediaData P:AVFoundation.AVSampleBufferDisplayLayer.RequiresFlushToResumeDecodingDidChangeNotification P:AVFoundation.AVSampleBufferRenderSynchronizer.RateDidChangeNotification +P:AVFoundation.AVSampleBufferVideoRenderer.AVSampleBufferVideoRendererDidFailToDecodeNotification +P:AVFoundation.AVSampleBufferVideoRenderer.AVSampleBufferVideoRendererDidFailToDecodeNotificationErrorKey +P:AVFoundation.AVSampleBufferVideoRenderer.ReadyForMoreMediaData +P:AVFoundation.AVSampleBufferVideoRenderer.RequiresFlushToResumeDecodingDidChangeNotification P:AVFoundation.AVSampleCursor.CurrentChunkInfo P:AVFoundation.AVSampleCursor.CurrentSampleDependencyInfo2 P:AVFoundation.AVSampleCursor.CurrentSampleSyncInfo P:AVFoundation.AVSampleCursorAudioDependencyInfo.IsIndependentlyDecodable P:AVFoundation.AVSampleRateEventArgs.SampleRate +P:AVFoundation.AVSpeechSynthesisMarker.BookmarkName +P:AVFoundation.AVSpeechSynthesisMarker.ByteSampleOffset +P:AVFoundation.AVSpeechSynthesisMarker.Mark +P:AVFoundation.AVSpeechSynthesisMarker.Phoneme +P:AVFoundation.AVSpeechSynthesisMarker.TextRange +P:AVFoundation.AVSpeechSynthesisProviderAudioUnit.SpeechSynthesisOutputMetadataBlock +P:AVFoundation.AVSpeechSynthesisProviderAudioUnit.SpeechVoices +P:AVFoundation.AVSpeechSynthesisProviderRequest.SsmlRepresentation +P:AVFoundation.AVSpeechSynthesisProviderRequest.Voice +P:AVFoundation.AVSpeechSynthesisProviderVoice.Gender +P:AVFoundation.AVSpeechSynthesisProviderVoice.PrimaryLanguages +P:AVFoundation.AVSpeechSynthesisProviderVoice.SupportedLanguages +P:AVFoundation.AVSpeechSynthesisProviderVoice.Version +P:AVFoundation.AVSpeechSynthesisProviderVoice.VoiceSize P:AVFoundation.AVSpeechSynthesisVoice.AudioFileSettings +P:AVFoundation.AVSpeechSynthesisVoice.AvailableVoicesDidChangeNotification P:AVFoundation.AVSpeechSynthesisVoice.CurrentLanguageCode P:AVFoundation.AVSpeechSynthesisVoice.Gender P:AVFoundation.AVSpeechSynthesisVoice.IdentifierAlex P:AVFoundation.AVSpeechSynthesisVoice.IpaNotationAttribute P:AVFoundation.AVSpeechSynthesisVoice.Language P:AVFoundation.AVSpeechSynthesisVoice.Quality +P:AVFoundation.AVSpeechSynthesisVoice.VoiceTraits P:AVFoundation.AVSpeechSynthesizer.Delegate P:AVFoundation.AVSpeechSynthesizer.MixToTelephonyUplink P:AVFoundation.AVSpeechSynthesizer.OutputChannels P:AVFoundation.AVSpeechSynthesizer.Paused +P:AVFoundation.AVSpeechSynthesizer.PersonalVoiceAuthorizationStatus P:AVFoundation.AVSpeechSynthesizer.Speaking P:AVFoundation.AVSpeechSynthesizerUteranceEventArgs.Utterance P:AVFoundation.AVSpeechSynthesizerWillSpeakEventArgs.CharacterRange P:AVFoundation.AVSpeechSynthesizerWillSpeakEventArgs.Utterance +P:AVFoundation.AVSpeechSynthesizerWillSpeakMarkerEventArgs.Marker +P:AVFoundation.AVSpeechSynthesizerWillSpeakMarkerEventArgs.Utterance P:AVFoundation.AVSpeechUtterance.AttributedSpeechString P:AVFoundation.AVSpeechUtterance.DefaultSpeechRate P:AVFoundation.AVSpeechUtterance.MaximumSpeechRate @@ -52635,7 +53014,10 @@ P:AVFoundation.AVUrlAsset.AllowsCellularAccessKey P:AVFoundation.AVUrlAsset.AllowsConstrainedNetworkAccessKey P:AVFoundation.AVUrlAsset.AllowsExpensiveNetworkAccessKey P:AVFoundation.AVUrlAsset.HttpCookiesKey +P:AVFoundation.AVUrlAsset.HttpUserAgentKey +P:AVFoundation.AVUrlAsset.OverrideMimeTypeKey P:AVFoundation.AVUrlAsset.PreferPreciseDurationAndTimingKey +P:AVFoundation.AVUrlAsset.PrimarySessionIdentifierKey P:AVFoundation.AVUrlAsset.ReferenceRestrictionsKey P:AVFoundation.AVUrlAsset.RequestAttributionKey P:AVFoundation.AVUrlAsset.ShouldSupportAliasDataReferencesKey @@ -52656,6 +53038,7 @@ P:AVFoundation.AVVideo.CodecH264 P:AVFoundation.AVVideo.CodecJPEG P:AVFoundation.AVVideo.CodecKey P:AVFoundation.AVVideo.CompressionPropertiesKey +P:AVFoundation.AVVideo.DecompressionPropertiesKey P:AVFoundation.AVVideo.EncoderSpecificationKey P:AVFoundation.AVVideo.ExpectedSourceFrameRateKey P:AVFoundation.AVVideo.H264EntropyModeCABAC @@ -52715,8 +53098,12 @@ P:AVFoundation.AVVideoSettingsCompressed.MaxKeyFrameIntervalDuration P:AVFoundation.AVVideoSettingsCompressed.ScalingMode P:AVFoundation.AVVideoSettingsCompressed.Width P:AVFoundation.AVVideoSettingsUncompressed.ScalingMode -P:AVFoundation.AVVideoTransferFunction.AVVideoTransferFunction_Itu_R_709_2 -P:AVFoundation.AVVideoTransferFunction.AVVideoTransferFunction_Smpte_240M_1995 +P:AVFoundation.AVVideoTransferFunction.Iec_sRgb +P:AVFoundation.AVVideoTransferFunction.Itu_R_2100_Hlg +P:AVFoundation.AVVideoTransferFunction.Itu_R_709_2 +P:AVFoundation.AVVideoTransferFunction.Linear +P:AVFoundation.AVVideoTransferFunction.Smpte_240M_1995 +P:AVFoundation.AVVideoTransferFunction.Smpte_St_2084_Pq P:AVFoundation.AVVideoYCbCrMatrix.Itu_R_2020 P:AVFoundation.AVVideoYCbCrMatrix.Itu_R_601_4 P:AVFoundation.AVVideoYCbCrMatrix.Itu_R_709_2 @@ -52743,6 +53130,8 @@ P:AVFoundation.RenderingModeChangeNotificationEventArgs.NewRenderingMode P:AVFoundation.SpatialPlaybackCapabilitiesChangedEventArgs.SpatialAudioEnabledKey P:AVKit.AVCaptureEventInteraction.Enabled P:AVKit.AVCaptureEventInteraction.View +P:AVKit.AVContinuityDevicePickerViewController.Delegate +P:AVKit.AVContinuityDevicePickerViewController.Supported P:AVKit.AVDisplayManager.DisplayCriteriaMatchingEnabled P:AVKit.AVDisplayManager.DisplayModeSwitchInProgress P:AVKit.AVDisplayManager.ModeSwitchEndNotification @@ -65679,10 +66068,6 @@ P:ObjCRuntime.LinkWithAttribute.LinkTarget P:ObjCRuntime.LinkWithAttribute.NeedsGccExceptionHandling P:ObjCRuntime.LinkWithAttribute.SmartLink P:ObjCRuntime.LinkWithAttribute.WeakFrameworks -P:ObjCRuntime.MarshalManagedExceptionEventArgs.Exception -P:ObjCRuntime.MarshalManagedExceptionEventArgs.ExceptionMode -P:ObjCRuntime.MarshalObjectiveCExceptionEventArgs.Exception -P:ObjCRuntime.MarshalObjectiveCExceptionEventArgs.ExceptionMode P:ObjCRuntime.MonoPInvokeCallbackAttribute.DelegateType P:ObjCRuntime.NativeAttribute.ConvertToManaged P:ObjCRuntime.NativeAttribute.ConvertToNative @@ -67967,11 +68352,19 @@ P:UIKit.UIAlertController.SpringLoaded P:UIKit.UIAlertView.Delegate P:UIKit.UIAlertView.ShouldEnableFirstOtherButton P:UIKit.UIAlertView.Visible +P:UIKit.UIApplication.AnnouncementDidFinishNotification +P:UIKit.UIApplication.AnnouncementNotification +P:UIKit.UIApplication.AssistiveTechnologyKey +P:UIKit.UIApplication.AssistiveTouchStatusDidChangeNotification P:UIKit.UIApplication.BackgroundFetchIntervalMinimum P:UIKit.UIApplication.BackgroundFetchIntervalNever P:UIKit.UIApplication.BackgroundRefreshStatusDidChangeNotification P:UIKit.UIApplication.BackgroundTaskInvalid +P:UIKit.UIApplication.BoldTextStatusDidChangeNotification +P:UIKit.UIApplication.ButtonShapesEnabledStatusDidChangeNotification +P:UIKit.UIApplication.ClosedCaptioningStatusDidChangeNotification P:UIKit.UIApplication.ContentSizeCategoryChangedNotification +P:UIKit.UIApplication.DarkerSystemColorsStatusDidChangeNotification P:UIKit.UIApplication.Delegate P:UIKit.UIApplication.DidBecomeActiveNotification P:UIKit.UIApplication.DidChangeStatusBarFrameNotification @@ -67979,7 +68372,13 @@ P:UIKit.UIApplication.DidChangeStatusBarOrientationNotification P:UIKit.UIApplication.DidEnterBackgroundNotification P:UIKit.UIApplication.DidFinishLaunchingNotification P:UIKit.UIApplication.DidReceiveMemoryWarningNotification +P:UIKit.UIApplication.ElementFocusedNotification +P:UIKit.UIApplication.FocusedElementKey +P:UIKit.UIApplication.GrayscaleStatusDidChangeNotification +P:UIKit.UIApplication.GuidedAccessStatusDidChangeNotification +P:UIKit.UIApplication.HearingDevicePairedEarDidChangeNotification P:UIKit.UIApplication.IdleTimerDisabled +P:UIKit.UIApplication.InvertColorsStatusDidChangeNotification P:UIKit.UIApplication.IsIgnoringInteractionEvents P:UIKit.UIApplication.IsRegisteredForRemoteNotifications P:UIKit.UIApplication.LaunchOptionsAnnotationKey @@ -67996,14 +68395,37 @@ P:UIKit.UIApplication.LaunchOptionsSourceApplicationKey P:UIKit.UIApplication.LaunchOptionsUrlKey P:UIKit.UIApplication.LaunchOptionsUserActivityDictionaryKey P:UIKit.UIApplication.LaunchOptionsUserActivityTypeKey +P:UIKit.UIApplication.LayoutChangedNotification P:UIKit.UIApplication.MinimumKeepAliveTimeout +P:UIKit.UIApplication.MonoAudioStatusDidChangeNotification P:UIKit.UIApplication.NetworkActivityIndicatorVisible +P:UIKit.UIApplication.NotificationSwitchControlIdentifier +P:UIKit.UIApplication.NotificationVoiceOverIdentifier +P:UIKit.UIApplication.OnOffSwitchLabelsDidChangeNotification P:UIKit.UIApplication.OpenNotificationSettingsUrl P:UIKit.UIApplication.OpenSettingsUrlString +P:UIKit.UIApplication.PageScrolledNotification +P:UIKit.UIApplication.PauseAssistiveTechnologyNotification +P:UIKit.UIApplication.PrefersCrossFadeTransitionsStatusDidChangeNotification P:UIKit.UIApplication.ProtectedDataAvailable P:UIKit.UIApplication.ProtectedDataDidBecomeAvailable P:UIKit.UIApplication.ProtectedDataWillBecomeUnavailable +P:UIKit.UIApplication.ReduceMotionStatusDidChangeNotification +P:UIKit.UIApplication.ReduceTransparencyStatusDidChangeNotification +P:UIKit.UIApplication.ResumeAssistiveTechnologyNotification +P:UIKit.UIApplication.ScreenChangedNotification +P:UIKit.UIApplication.ShakeToUndoDidChangeNotification +P:UIKit.UIApplication.ShouldDifferentiateWithoutColorDidChangeNotification P:UIKit.UIApplication.SignificantTimeChangeNotification +P:UIKit.UIApplication.SpeakScreenStatusDidChangeNotification +P:UIKit.UIApplication.SpeakSelectionStatusDidChangeNotification +P:UIKit.UIApplication.SpeechAttributeAnnouncementPriority +P:UIKit.UIApplication.SpeechAttributeIpaNotation +P:UIKit.UIApplication.SpeechAttributeLanguage +P:UIKit.UIApplication.SpeechAttributePitch +P:UIKit.UIApplication.SpeechAttributePunctuation +P:UIKit.UIApplication.SpeechAttributeQueueAnnouncement +P:UIKit.UIApplication.SpeechAttributeSpellOut P:UIKit.UIApplication.StateRestorationBundleVersionKey P:UIKit.UIApplication.StateRestorationSystemVersionKey P:UIKit.UIApplication.StateRestorationTimestampKey @@ -68011,9 +68433,17 @@ P:UIKit.UIApplication.StateRestorationUserInterfaceIdiomKey P:UIKit.UIApplication.StatusBarFrameUserInfoKey P:UIKit.UIApplication.StatusBarHidden P:UIKit.UIApplication.StatusBarOrientationUserInfoKey +P:UIKit.UIApplication.SwitchControlStatusDidChangeNotification +P:UIKit.UIApplication.TextAttributeContext +P:UIKit.UIApplication.TextAttributeCustom +P:UIKit.UIApplication.TextAttributeHeadingLevel P:UIKit.UIApplication.UIApplicationOpenDefaultApplicationsSettingsUrlString P:UIKit.UIApplication.UITrackingRunLoopMode +P:UIKit.UIApplication.UnfocusedElementKey P:UIKit.UIApplication.UserDidTakeScreenshotNotification +P:UIKit.UIApplication.VideoAutoplayStatusDidChangeNotification +P:UIKit.UIApplication.VoiceOverStatusChanged +P:UIKit.UIApplication.VoiceOverStatusDidChangeNotification P:UIKit.UIApplication.WillChangeStatusBarFrameNotification P:UIKit.UIApplication.WillChangeStatusBarOrientationNotification P:UIKit.UIApplication.WillEnterForegroundNotification @@ -70878,7 +71308,6 @@ T:AppTrackingTransparency.ATTrackingManager T:AppTrackingTransparency.ATTrackingManagerAuthorizationStatus T:ARKit.ARAltitudeSource T:ARKit.ARAppClipCodeUrlDecodingState -T:ARKit.ARBlendShapeLocationOptions T:ARKit.ARCoachingGoal T:ARKit.ARCoachingOverlayViewDelegate T:ARKit.ARCollaborationDataPriority @@ -71251,11 +71680,15 @@ T:AVFoundation.AVAssetExportSessionStatus T:AVFoundation.AVAssetImageGenerateAsynchronouslyForTimeCompletionHandler T:AVFoundation.AVAssetImageGeneratorCompletionHandler T:AVFoundation.AVAssetImageGeneratorCompletionHandler2 +T:AVFoundation.AVAssetImageGeneratorDynamicRangePolicy T:AVFoundation.AVAssetImageGeneratorResult +T:AVFoundation.AVAssetPlaybackAssistantLoadPlaybackConfigurationOptionsHandler +T:AVFoundation.AVAssetPlaybackConfigurationOption T:AVFoundation.AVAssetReaderStatus T:AVFoundation.AVAssetReferenceRestrictions T:AVFoundation.AVAssetResourceLoaderDelegate T:AVFoundation.AVAssetSegmentType +T:AVFoundation.AVAssetTrackGroupOutputHandling T:AVFoundation.AVAssetTrackTrackAssociation T:AVFoundation.AVAssetWriterDelegate T:AVFoundation.AVAssetWriterInputMediaDataLocation @@ -71299,6 +71732,7 @@ T:AVFoundation.AVAudioEnvironmentReverbParameters T:AVFoundation.AVAudioFile T:AVFoundation.AVAudioFormat T:AVFoundation.AVAudioInputNode +T:AVFoundation.AVAudioInputNodeMutedSpeechEventListener T:AVFoundation.AVAudioIONode T:AVFoundation.AVAudioIONodeInputBlock T:AVFoundation.AVAudioMixerNode @@ -71316,6 +71750,8 @@ T:AVFoundation.AVAudioQuality T:AVFoundation.AVAudioRoutingArbiter T:AVFoundation.AVAudioRoutingArbitrationCategory T:AVFoundation.AVAudioSequencer +T:AVFoundation.AVAudioSequencerInfoDictionary +T:AVFoundation.AVAudioSequencerUserCallback T:AVFoundation.AVAudioSession T:AVFoundation.AVAudioSessionActivationOptions T:AVFoundation.AVAudioSessionCategory @@ -71374,6 +71810,10 @@ T:AVFoundation.AVAudioUnitTimeEffect T:AVFoundation.AVAudioUnitTimePitch T:AVFoundation.AVAudioUnitType T:AVFoundation.AVAudioUnitVarispeed +T:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingConfiguration +T:AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingLevel +T:AVFoundation.AVAudioVoiceProcessingSpeechActivityEvent +T:AVFoundation.AVAUPresetEvent T:AVFoundation.AVAuthorizationMediaType T:AVFoundation.AVAuthorizationStatus T:AVFoundation.AVBeatRange @@ -71400,25 +71840,35 @@ T:AVFoundation.AVCaptureAutoFocusRangeRestriction T:AVFoundation.AVCaptureAutoFocusSystem T:AVFoundation.AVCaptureCenterStageControlMode T:AVFoundation.AVCaptureColorSpace +T:AVFoundation.AVCaptureDeskViewApplicationPresentHandler T:AVFoundation.AVCaptureDevicePosition T:AVFoundation.AVCaptureExposureMode T:AVFoundation.AVCaptureFileOutputDelegate T:AVFoundation.AVCaptureFlashMode T:AVFoundation.AVCaptureFocusMode +T:AVFoundation.AVCaptureIndexPickerCallback +T:AVFoundation.AVCaptureIndexPickerTitleTransform T:AVFoundation.AVCaptureLensStabilizationStatus T:AVFoundation.AVCaptureMicrophoneMode +T:AVFoundation.AVCaptureMultichannelAudioMode T:AVFoundation.AVCaptureOutputDataDroppedReason +T:AVFoundation.AVCapturePhotoOutputCaptureReadiness +T:AVFoundation.AVCapturePhotoOutputReadinessCoordinatorDelegate T:AVFoundation.AVCapturePhotoQualityPrioritization -T:AVFoundation.AVCapturePhotoSettingsThumbnailFormat T:AVFoundation.AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions T:AVFoundation.AVCapturePrimaryConstituentDeviceSwitchingBehavior T:AVFoundation.AVCaptureReactionType +T:AVFoundation.AVCaptureReactionType_Extensions T:AVFoundation.AVCaptureReactionTypeExtensions +T:AVFoundation.AVCaptureSessionControlsDelegate T:AVFoundation.AVCaptureSessionInterruptionReason T:AVFoundation.AVCaptureSessionRuntimeErrorEventArgs +T:AVFoundation.AVCaptureSliderCallback +T:AVFoundation.AVCaptureSystemExposureBiasSliderCallback T:AVFoundation.AVCaptureSystemPressureFactors T:AVFoundation.AVCaptureSystemPressureLevel T:AVFoundation.AVCaptureSystemUserInterface +T:AVFoundation.AVCaptureSystemZoomSliderCallback T:AVFoundation.AVCaptureTorchMode T:AVFoundation.AVCaptureVideoOrientation T:AVFoundation.AVCaptureVideoPreviewLayer.InitMode @@ -71454,6 +71904,10 @@ T:AVFoundation.AVEdgeWidths T:AVFoundation.AVError T:AVFoundation.AVErrorEventArgs T:AVFoundation.AVErrorKeys +T:AVFoundation.AVExtendedNoteOnEvent +T:AVFoundation.AVExtendedTempoEvent +T:AVFoundation.AVExternalContentProtectionStatus +T:AVFoundation.AVExternalStorageDeviceRequestAccessCallback T:AVFoundation.AVFileTypeProfile T:AVFoundation.AVFileTypes T:AVFoundation.AVFragmentedAsset_AVFragmentedAssetTrackInspection @@ -71475,39 +71929,67 @@ T:AVFoundation.AVMetadataIdentifiers.QuickTime T:AVFoundation.AVMetadataIdentifiers.QuickTimeMetadata T:AVFoundation.AVMetadataIdentifiers.ThreeGP T:AVFoundation.AVMetadataObjectType +T:AVFoundation.AVMidiChannelEvent +T:AVFoundation.AVMidiChannelPressureEvent +T:AVFoundation.AVMidiControlChangeEvent +T:AVFoundation.AVMidiControlChangeMessageType +T:AVFoundation.AVMidiMetaEvent +T:AVFoundation.AVMidiMetaEventType +T:AVFoundation.AVMidiNoteEvent +T:AVFoundation.AVMidiPitchBendEvent T:AVFoundation.AVMidiPlayer +T:AVFoundation.AVMidiPolyPressureEvent +T:AVFoundation.AVMidiProgramChangeEvent +T:AVFoundation.AVMidiSysexEvent T:AVFoundation.AVMovie_AVMovieMovieHeaderSupport T:AVFoundation.AVMovie_AVMovieTrackInspection T:AVFoundation.AVMovieWritingOptions +T:AVFoundation.AVMusicEvent +T:AVFoundation.AVMusicEventEnumerationBlock T:AVFoundation.AVMusicSequenceLoadOptions T:AVFoundation.AVMusicTrack T:AVFoundation.AVMusicTrackLoopCount +T:AVFoundation.AVMusicUserEvent T:AVFoundation.AVMutableComposition_AVMutableCompositionTrackInspection +T:AVFoundation.AVMutableCompositionInsertHandler T:AVFoundation.AVMutableMovie_AVMutableMovieMovieLevelEditing T:AVFoundation.AVMutableMovie_AVMutableMovieTrackInspection T:AVFoundation.AVMutableMovie_AVMutableMovieTrackLevelEditing T:AVFoundation.AVMutableMovieTrack_AVMutableMovieTrack_TrackLevelEditing T:AVFoundation.AVMutableMovieTrack_AVMutableMovieTrackTrackAssociations +T:AVFoundation.AVMutableVideoCompositionCreateApplier +T:AVFoundation.AVMutableVideoCompositionCreateCallback T:AVFoundation.AVOutputSettingsPreset +T:AVFoundation.AVParameterEvent T:AVFoundation.AVPixelAspectRatio T:AVFoundation.AVPixelAspectRatioProperties T:AVFoundation.AVPlaybackCoordinatorPlaybackControlDelegate T:AVFoundation.AVPlayerActionAtItemEnd T:AVFoundation.AVPlayerAudiovisualBackgroundPlaybackPolicy T:AVFoundation.AVPlayerHdrMode +T:AVFoundation.AVPlayerIntegratedTimelineSnapshotsOutOfSyncReason +T:AVFoundation.AVPlayerInterstitialEventAssetListResponseStatus +T:AVFoundation.AVPlayerInterstitialEventCue T:AVFoundation.AVPlayerInterstitialEventRestrictions +T:AVFoundation.AVPlayerInterstitialEventTimelineOccupancy T:AVFoundation.AVPlayerItem_AVPlaybackRestrictions T:AVFoundation.AVPlayerItem_AVPlayerInterstitialSupport T:AVFoundation.AVPlayerItem_AVPlayerItemProtectedContent T:AVFoundation.AVPlayerItemErrorEventArgs +T:AVFoundation.AVPlayerItemIntegratedTimelineAddBoundaryTimeObserverCallback +T:AVFoundation.AVPlayerItemIntegratedTimelineAddPeriodicTimeObserverCallback +T:AVFoundation.AVPlayerItemIntegratedTimelineSeekCallback T:AVFoundation.AVPlayerItemLegibleOutputPushDelegate T:AVFoundation.AVPlayerItemMetadataCollectorPushDelegate T:AVFoundation.AVPlayerItemMetadataOutputPushDelegate T:AVFoundation.AVPlayerItemOutputPullDelegate T:AVFoundation.AVPlayerItemOutputPushDelegate +T:AVFoundation.AVPlayerItemRenderedLegibleOutputPushDelegate +T:AVFoundation.AVPlayerItemSegmentType T:AVFoundation.AVPlayerItemStatus T:AVFoundation.AVPlayerItemTimeJumpedEventArgs T:AVFoundation.AVPlayerItemVideoOutputSettings +T:AVFoundation.AVPlayerLooperItemOrdering T:AVFoundation.AVPlayerLooperStatus T:AVFoundation.AVPlayerPlaybackCoordinatorDelegate T:AVFoundation.AVPlayerRateDidChangeEventArgs @@ -71518,8 +72000,10 @@ T:AVFoundation.AVPlayerViewControllerSkippingBehavior T:AVFoundation.AVPlayerWaitingReason T:AVFoundation.AVQueuedSampleBufferRenderingStatus T:AVFoundation.AVSampleBufferDisplayLayer_ProtectedContent +T:AVFoundation.AVSampleBufferGeneratorBatchMakeReadyCallback T:AVFoundation.AVSampleBufferRequestDirection T:AVFoundation.AVSampleBufferRequestMode +T:AVFoundation.AVSampleBufferVideoRendererLoadVideoPerformanceMetricsCallback T:AVFoundation.AVSampleCursorAudioDependencyInfo T:AVFoundation.AVSampleCursorChunkInfo T:AVFoundation.AVSampleCursorDependencyInfo @@ -71528,14 +72012,27 @@ T:AVFoundation.AVSampleCursorSyncInfo T:AVFoundation.AVSampleRateConverterAlgorithm T:AVFoundation.AVSampleRateEventArgs T:AVFoundation.AVSemanticSegmentationMatteType +T:AVFoundation.AVSpatialCaptureDiscomfortReason T:AVFoundation.AVSpeechBoundary +T:AVFoundation.AVSpeechSynthesisMarker +T:AVFoundation.AVSpeechSynthesisMarkerMark +T:AVFoundation.AVSpeechSynthesisPersonalVoiceAuthorizationStatus +T:AVFoundation.AVSpeechSynthesisProviderAudioUnit +T:AVFoundation.AVSpeechSynthesisProviderOutputBlock +T:AVFoundation.AVSpeechSynthesisProviderRequest +T:AVFoundation.AVSpeechSynthesisProviderVoice T:AVFoundation.AVSpeechSynthesisVoice T:AVFoundation.AVSpeechSynthesisVoiceGender T:AVFoundation.AVSpeechSynthesisVoiceQuality +T:AVFoundation.AVSpeechSynthesisVoiceTraits T:AVFoundation.AVSpeechSynthesizer +T:AVFoundation.AVSpeechSynthesizerBufferCallback T:AVFoundation.AVSpeechSynthesizerDelegate +T:AVFoundation.AVSpeechSynthesizerMarkerCallback +T:AVFoundation.AVSpeechSynthesizerRequestPersonalVoiceAuthorizationCallback T:AVFoundation.AVSpeechSynthesizerUteranceEventArgs T:AVFoundation.AVSpeechSynthesizerWillSpeakEventArgs +T:AVFoundation.AVSpeechSynthesizerWillSpeakMarkerEventArgs T:AVFoundation.AVSpeechUtterance T:AVFoundation.AVStatusEventArgs T:AVFoundation.AVStreamingKeyDelivery @@ -71550,6 +72047,10 @@ T:AVFoundation.AVVideoCodecSettings T:AVFoundation.AVVideoCodecType T:AVFoundation.AVVideoColorPrimaries T:AVFoundation.AVVideoCompositing +T:AVFoundation.AVVideoCompositionCreateApplier +T:AVFoundation.AVVideoCompositionCreateCallback +T:AVFoundation.AVVideoCompositionDetermineValidityCallback +T:AVFoundation.AVVideoCompositionPerFrameHdrDisplayMetadataPolicy T:AVFoundation.AVVideoCompositionValidationHandling T:AVFoundation.AVVideoH264EntropyMode T:AVFoundation.AVVideoPixelAspectRatioSettings @@ -71561,6 +72062,8 @@ T:AVFoundation.AVVideoSettingsCompressed T:AVFoundation.AVVideoSettingsUncompressed T:AVFoundation.AVVideoTransferFunction T:AVFoundation.AVVideoYCbCrMatrix +T:AVFoundation.CMTagCollectionVideoOutputPreset +T:AVFoundation.CMTagCollectionVideoOutputPreset_Extensions T:AVFoundation.IAVAssetReaderCaptionValidationHandling T:AVFoundation.IAVAssetResourceLoaderDelegate T:AVFoundation.IAVAssetWriterDelegate @@ -71571,15 +72074,21 @@ T:AVFoundation.IAVAudioPlayerDelegate T:AVFoundation.IAVAudioStereoMixing T:AVFoundation.IAVCaptureFileOutputDelegate T:AVFoundation.IAVCapturePhotoFileDataRepresentationCustomizer +T:AVFoundation.IAVCapturePhotoOutputReadinessCoordinatorDelegate +T:AVFoundation.IAVCaptureSessionControlsDelegate T:AVFoundation.IAVContentKeyRecipient T:AVFoundation.IAVContentKeySessionDelegate T:AVFoundation.IAVFragmentMinding +T:AVFoundation.IAVMetricEventStreamPublisher +T:AVFoundation.IAVMetricEventStreamSubscriber T:AVFoundation.IAVPlaybackCoordinatorPlaybackControlDelegate +T:AVFoundation.IAVPlayerItemIntegratedTimelineObserver T:AVFoundation.IAVPlayerItemLegibleOutputPushDelegate T:AVFoundation.IAVPlayerItemMetadataCollectorPushDelegate T:AVFoundation.IAVPlayerItemMetadataOutputPushDelegate T:AVFoundation.IAVPlayerItemOutputPullDelegate T:AVFoundation.IAVPlayerItemOutputPushDelegate +T:AVFoundation.IAVPlayerItemRenderedLegibleOutputPushDelegate T:AVFoundation.IAVPlayerPlaybackCoordinatorDelegate T:AVFoundation.IAVQueuedSampleBufferRendering T:AVFoundation.IAVSpeechSynthesizerDelegate @@ -71593,6 +72102,7 @@ T:AVKit.AVAudioSessionRouteSelection T:AVKit.AVCaptureEventPhase T:AVKit.AVCaptureViewControlsStyle T:AVKit.AVCaptureViewDelegate +T:AVKit.AVContinuityDevicePickerViewControllerDelegate T:AVKit.AVCustomRoutingControllerDelegate T:AVKit.AVCustomRoutingControllerDelegateCompletionHandler T:AVKit.AVKitError @@ -71606,6 +72116,7 @@ T:AVKit.AVRoutePickerViewButtonStyle T:AVKit.AVRoutePickerViewDelegate T:AVKit.AVVideoFrameAnalysisType T:AVKit.IAVCaptureViewDelegate +T:AVKit.IAVContinuityDevicePickerViewControllerDelegate T:AVKit.IAVCustomRoutingControllerDelegate T:AVKit.IAVPictureInPictureSampleBufferPlaybackDelegate T:AVKit.IAVPlayerViewControllerAnimationCoordinator @@ -71808,7 +72319,6 @@ T:CoreBluetooth.AdvertisementData T:CoreBluetooth.CBAncsAuthorizationUpdateEventArgs T:CoreBluetooth.CBATTRequestEventArgs T:CoreBluetooth.CBATTRequestsEventArgs -T:CoreBluetooth.CBCentralInitOptions T:CoreBluetooth.CBCentralManagerFeature T:CoreBluetooth.CBCharacteristicEventArgs T:CoreBluetooth.CBConnectionEvent @@ -71833,7 +72343,6 @@ T:CoreBluetooth.CBRssiEventArgs T:CoreBluetooth.CBServiceEventArgs T:CoreBluetooth.CBWillRestoreEventArgs T:CoreBluetooth.PeripheralConnectionOptions -T:CoreBluetooth.PeripheralScanningOptions T:CoreBluetooth.RestoredState T:CoreBluetooth.StartAdvertisingOptions T:CoreData.INSFetchedResultsControllerDelegate @@ -71933,6 +72442,7 @@ T:CoreFoundation.CFBundle T:CoreFoundation.CFBundle.Architecture T:CoreFoundation.CFBundle.PackageInfo T:CoreFoundation.CFBundle.PackageType +T:CoreFoundation.CFComparisonResult T:CoreFoundation.CFErrorDomain T:CoreFoundation.CFException T:CoreFoundation.CFExceptionDataKey @@ -72183,9 +72693,7 @@ T:CoreImage.CIFilterGenerator T:CoreImage.CIFilterMode T:CoreImage.CIGaborGradients T:CoreImage.CIGuidedFilter -T:CoreImage.CIImageInitializationOptions T:CoreImage.CIImageInitializationOptionsWithMetadata -T:CoreImage.CIImageProviderOptions T:CoreImage.CIImageRepresentationOptions T:CoreImage.CIKeystoneCorrection T:CoreImage.CIKeystoneCorrectionCombined @@ -72214,7 +72722,6 @@ T:CoreImage.CIPerspectiveRotate T:CoreImage.CIPlugIn T:CoreImage.CIRawDecoderVersion T:CoreImage.CIRawFilter -T:CoreImage.CIRawFilterOptions T:CoreImage.CIReductionFilter T:CoreImage.CIRenderDestination T:CoreImage.CIRenderDestinationAlphaMode @@ -72484,10 +72991,19 @@ T:CoreMedia.CMFormatDescription T:CoreMedia.CMFormatDescriptionProjectionKind T:CoreMedia.CMFormatDescriptionViewPackingKind T:CoreMedia.CMHevcTemporalLevelInfoSettings +T:CoreMedia.CMPackingType +T:CoreMedia.CMProjectionType T:CoreMedia.CMSampleBuffer T:CoreMedia.CMSampleBufferAttachmentKey -T:CoreMedia.CMSampleBufferAttachmentSettings T:CoreMedia.CMSampleTimingInfo +T:CoreMedia.CMStereoViewComponents +T:CoreMedia.CMStereoViewInterpretationOptions +T:CoreMedia.CMTagCategory +T:CoreMedia.CMTagCollectionError +T:CoreMedia.CMTagDataType +T:CoreMedia.CMTagError +T:CoreMedia.CMTaggedBufferGroupError +T:CoreMedia.CMTaggedBufferGroupFormatType T:CoreMedia.CMTextMarkupAttributes T:CoreMedia.CMTime T:CoreMedia.CMTime.Flags @@ -72599,7 +73115,6 @@ T:CoreML.MLModelCollectionEntry T:CoreML.MLModelCompilationLoadResult T:CoreML.MLModelCompilationResult T:CoreML.MLModelConfiguration -T:CoreML.MLModelMetadata T:CoreML.MLModelStructure T:CoreML.MLModelStructureNeuralNetwork T:CoreML.MLModelStructureNeuralNetworkLayer @@ -73648,7 +74163,6 @@ T:HealthKit.HKHeartbeatSeriesBuilderCompletionHandler T:HealthKit.HKHeartbeatSeriesQueryDataHandler T:HealthKit.HKHeartRateRecoveryTestType T:HealthKit.HKLiveWorkoutBuilderDelegate -T:HealthKit.HKMetadata T:HealthKit.HKObserverQueryDescriptorUpdateHandler T:HealthKit.HKPhq9AssessmentAnswer T:HealthKit.HKPhq9AssessmentRisk @@ -73780,7 +74294,6 @@ T:ImageIO.CGImageAuxiliaryDataInfo T:ImageIO.CGImageAuxiliaryDataType T:ImageIO.CGImageDecodeOptions T:ImageIO.CGImageDestination -T:ImageIO.CGImageDestinationOptions T:ImageIO.CGImageMetadata T:ImageIO.CGImageMetadataTag T:ImageIO.CGImageMetadataTagBlock @@ -74131,7 +74644,6 @@ T:MapKit.MKMapViewOverlay T:MapKit.MKOverlay T:MapKit.MKOverlayLevel T:MapKit.MKOverlayViewsEventArgs -T:MapKit.MKPlacemarkAddress T:MapKit.MKPointOfInterestCategory T:MapKit.MKPointOfInterestFilterType T:MapKit.MKRendererForOverlayDelegate @@ -74415,7 +74927,6 @@ T:MetalFX.IMTLFXTemporalScaler T:MetalFX.MTLFXSpatialScalerColorProcessingMode T:MetalKit.MTKTextureLoaderArrayCallback T:MetalKit.MTKTextureLoaderCubeLayout -T:MetalKit.MTKTextureLoaderOptions T:MetalKit.MTKTextureLoaderOrigin T:MetalPerformanceShaders.IMPSCnnBatchNormalizationDataSource T:MetalPerformanceShaders.IMPSCnnInstanceNormalizationDataSource @@ -75164,6 +75675,7 @@ T:NotificationCenter.NCWidgetSearchViewController T:NotificationCenter.NCWidgetSearchViewDelegate T:NotificationCenter.NSWidgetSearchForTermEventArgs T:NotificationCenter.NSWidgetSearchResultSelectedEventArgs +T:ObjCBindings.BindingTypeAttribute`1 T:ObjCBindings.ExportAttribute`1 T:ObjCRuntime.AdoptsAttribute T:ObjCRuntime.Arch @@ -75189,12 +75701,6 @@ T:ObjCRuntime.DlsymOption T:ObjCRuntime.INativeObject T:ObjCRuntime.LinkTarget T:ObjCRuntime.LinkWithAttribute -T:ObjCRuntime.MarshalManagedExceptionEventArgs -T:ObjCRuntime.MarshalManagedExceptionHandler -T:ObjCRuntime.MarshalManagedExceptionMode -T:ObjCRuntime.MarshalObjectiveCExceptionEventArgs -T:ObjCRuntime.MarshalObjectiveCExceptionHandler -T:ObjCRuntime.MarshalObjectiveCExceptionMode T:ObjCRuntime.MonoNativeFunctionWrapperAttribute T:ObjCRuntime.MonoPInvokeCallbackAttribute T:ObjCRuntime.NativeAttribute @@ -75484,7 +75990,6 @@ T:Photos.PHAccessLevel T:Photos.PHAssetPlaybackStyle T:Photos.PHImageManagerRequestImageDataHandler T:Photos.PHLivePhotoEditingError -T:Photos.PHLivePhotoEditingOption T:Photos.PHObjectType T:Photos.PHPersistentChangeFetchResultEnumerator T:Photos.PHPhotoLibrary_CloudIdentifiers @@ -75625,7 +76130,6 @@ T:SceneKit.SCNCameraProjectionDirection T:SceneKit.SCNColorMask T:SceneKit.SCNErrorCode T:SceneKit.SCNFillMode -T:SceneKit.SCNHitTestOptions T:SceneKit.SCNHitTestSearchMode T:SceneKit.SCNInteractionMode T:SceneKit.SCNJavaScript @@ -75637,12 +76141,7 @@ T:SceneKit.SCNNodeHandler T:SceneKit.SCNParticleProperty T:SceneKit.SCNPhysicsContactEventArgs T:SceneKit.SCNPhysicsShapeOptions -T:SceneKit.SCNPhysicsTest -T:SceneKit.SCNProgramSemanticOptions T:SceneKit.SCNPropertyControllers -T:SceneKit.SCNRenderingOptions -T:SceneKit.SCNSceneLoadingOptions -T:SceneKit.SCNShaderModifiers T:SceneKit.SCNTessellationSmoothingMode T:ScreenCaptureKit.ISCContentSharingPickerObserver T:ScreenCaptureKit.ISCRecordingOutputDelegate @@ -75818,7 +76317,6 @@ T:StoreKit.SKArcadeService T:StoreKit.SKArcadeServiceRegisterHandler T:StoreKit.SKArcadeServiceSubscriptionHandler T:StoreKit.SKCloudServiceSetupMessageIdentifier -T:StoreKit.SKCloudServiceSetupOptions T:StoreKit.SKOverlayDelegate T:StoreKit.SKOverlayPosition T:StoreKit.SKPaymentQueueDelegate @@ -76419,7 +76917,6 @@ T:UIKit.UIPageViewSpineLocationCallback T:UIKit.UIPasteboardChangeEventArgs T:UIKit.UIPasteboardDetectionPattern T:UIKit.UIPasteboardOptionKeys -T:UIKit.UIPasteboardOptions T:UIKit.UIPasteControlDisplayMode T:UIKit.UIPathEventArgs T:UIKit.UIPencilInteractionDelegate @@ -76690,7 +77187,6 @@ T:UserNotifications.UNErrorCode T:UserNotifications.UNMutableNotificationContent T:UserNotifications.UNNotification T:UserNotifications.UNNotificationActionIcon -T:UserNotifications.UNNotificationAttachmentOptions T:UserNotifications.UNNotificationAttributedMessageContext T:UserNotifications.UNNotificationContent T:UserNotifications.UNNotificationInterruptionLevel @@ -76704,7 +77200,6 @@ T:UserNotifications.UNTimeIntervalNotificationTrigger T:UserNotifications.UNUserNotificationCenter T:UserNotifications.UNUserNotificationCenterDelegate T:VideoSubscriberAccount.VSAccountApplicationProvider -T:VideoSubscriberAccount.VSAccountManagerAccessOptions T:VideoSubscriberAccount.VSAccountProviderAuthenticationScheme T:VideoSubscriberAccount.VSAccountProviderResponse T:VideoSubscriberAccount.VSAppleSubscription @@ -76719,30 +77214,23 @@ T:VideoSubscriberAccount.VSUserAccountQueryOptions T:VideoSubscriberAccount.VSUserAccountType T:VideoToolbox.HdrMetadataInsertionMode T:VideoToolbox.VTAlphaChannelMode -T:VideoToolbox.VTCompressionProperties T:VideoToolbox.VTCompressionSession T:VideoToolbox.VTCompressionSession.VTCompressionOutputCallback T:VideoToolbox.VTDataRateLimit T:VideoToolbox.VTDecoderExtensionProperties -T:VideoToolbox.VTDecompressionProperties -T:VideoToolbox.VTDecompressionResolutionOptions T:VideoToolbox.VTDecompressionSession T:VideoToolbox.VTDecompressionSession.VTDecompressionOutputCallback -T:VideoToolbox.VTEncodeFrameOptions T:VideoToolbox.VTExtensionPropertiesKey T:VideoToolbox.VTFrameSilo T:VideoToolbox.VTHdrPerFrameMetadataGenerationHdrFormatType T:VideoToolbox.VTHdrPerFrameMetadataGenerationOptions T:VideoToolbox.VTHdrPerFrameMetadataGenerationOptionsKey T:VideoToolbox.VTMultiPassStorage -T:VideoToolbox.VTMultiPassStorageCreationOptions T:VideoToolbox.VTPixelRotationProperties T:VideoToolbox.VTPixelRotationPropertyKeys T:VideoToolbox.VTPixelRotationSession -T:VideoToolbox.VTPixelTransferProperties T:VideoToolbox.VTPixelTransferSession T:VideoToolbox.VTProfessionalVideoWorkflow -T:VideoToolbox.VTPropertyOptions T:VideoToolbox.VTQPModulationLevel T:VideoToolbox.VTRawProcessingParameterKey T:VideoToolbox.VTRawProcessingParameterListElementKey @@ -76761,9 +77249,7 @@ T:VideoToolbox.VTSampleAttachments T:VideoToolbox.VTSession T:VideoToolbox.VTSupportedEncoderProperties T:VideoToolbox.VTUtilities -T:VideoToolbox.VTVideoDecoderSpecification T:VideoToolbox.VTVideoEncoder -T:VideoToolbox.VTVideoEncoderSpecification T:Vision.IVNRequestProgressProviding T:Vision.IVNRequestRevisionProviding T:Vision.VNAnimalBodyPoseObservationJointName @@ -76808,7 +77294,6 @@ T:Vision.VNHumanBodyPoseObservationJointName T:Vision.VNHumanBodyPoseObservationJointsGroupName T:Vision.VNHumanHandPoseObservationJointName T:Vision.VNHumanHandPoseObservationJointsGroupName -T:Vision.VNImageOptions T:Vision.VNPointsClassification T:Vision.VNRecognizeAnimalsRequestRevision T:Vision.VNRecognizedObjectObservationRequestRevision diff --git a/tests/cecil-tests/cecil-tests.csproj b/tests/cecil-tests/cecil-tests.csproj index eac1c64fe7d1..7acf4ca6fcbc 100644 --- a/tests/cecil-tests/cecil-tests.csproj +++ b/tests/cecil-tests/cecil-tests.csproj @@ -14,6 +14,7 @@ + diff --git a/tests/common/MonoTouch.Dialog/DialogViewController.cs b/tests/common/MonoTouch.Dialog/DialogViewController.cs new file mode 100644 index 000000000000..b876ac9bff3a --- /dev/null +++ b/tests/common/MonoTouch.Dialog/DialogViewController.cs @@ -0,0 +1,667 @@ +// +// DialogViewController.cs: drives MonoTouch.Dialog +// +// Author: +// Miguel de Icaza +// +// +using System; +using System.Collections.Generic; + +using Foundation; +using UIKit; +using CoreGraphics; +using ObjCRuntime; +using NSAction = global::System.Action; + +namespace MonoTouch.Dialog { + /// + /// The DialogViewController is the main entry point to use MonoTouch.Dialog, + /// it provides a simplified API to the UITableViewController. + /// + public class DialogViewController : UITableViewController { + public UITableViewStyle Style = UITableViewStyle.Grouped; + public event Action OnSelection; +#if !__TVOS__ + UISearchBar searchBar; +#endif + UITableView tableView; + RootElement root; + bool pushing; + bool dirty; + bool reloading; + + /// + /// The root element displayed by the DialogViewController, the value can be changed during runtime to update the contents. + /// + public RootElement Root { + get { + return root; + } + set { + if (root == value) + return; + if (root is not null) + root.Dispose (); + + root = value; + root.TableView = tableView; + ReloadData (); + } + } + + EventHandler refreshRequested; + /// + /// If you assign a handler to this event before the view is shown, the + /// DialogViewController will have support for pull-to-refresh UI. + /// + public event EventHandler RefreshRequested { + add { + if (tableView is not null) + throw new ArgumentException ("You should set the handler before the controller is shown"); + refreshRequested += value; + } + remove { + refreshRequested -= value; + } + } + + // If the value is true, we are enabled, used in the source for quick computation + bool enableSearch; + public bool EnableSearch { + get { + return enableSearch; + } + set { + if (enableSearch == value) + return; + + // After MonoTouch 3.0, we can allow for the search to be enabled/disable + if (tableView is not null) + throw new ArgumentException ("You should set EnableSearch before the controller is shown"); + enableSearch = value; + } + } + + // If set, we automatically scroll the content to avoid showing the search bar until + // the user manually pulls it down. + public bool AutoHideSearch { get; set; } + + public string SearchPlaceholder { get; set; } + + /// + /// Invoke this method to trigger a data refresh. + /// + /// + /// This will invoke the RerfeshRequested event handler, the code attached to it + /// should start the background operation to fetch the data and when it completes + /// it should call ReloadComplete to restore the control state. + /// + public void TriggerRefresh () + { + TriggerRefresh (false); + } + + void TriggerRefresh (bool showStatus) + { + if (refreshRequested is null) + return; + + if (reloading) + return; + + reloading = true; + refreshRequested (this, EventArgs.Empty); + + } + + /// + /// Invoke this method to signal that a reload has completed, this will update the UI accordingly. + /// + public void ReloadComplete () + { + if (!reloading) + return; + + reloading = false; + +#if !__TVOS__ + RefreshControl.EndRefreshing (); +#endif + } + + /// + /// Controls whether the DialogViewController should auto rotate + /// + public bool Autorotate { get; set; } + +#if !__TVOS__ + public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) + { + return Autorotate || toInterfaceOrientation == UIInterfaceOrientation.Portrait; + } + + public override void DidRotate (UIInterfaceOrientation fromInterfaceOrientation) + { + base.DidRotate (fromInterfaceOrientation); + + //Fixes the RefreshView's size if it is shown during rotation + ReloadData (); + } +#endif + + Section [] originalSections; + Element [] [] originalElements; + + /// + /// Allows caller to programatically activate the search bar and start the search process + /// + public void StartSearch () + { + if (originalSections is not null) + return; + +#if !__TVOS__ + searchBar.BecomeFirstResponder (); +#endif + originalSections = Root.Sections.ToArray (); + originalElements = new Element [originalSections.Length] []; + for (int i = 0; i < originalSections.Length; i++) + originalElements [i] = originalSections [i].Elements.ToArray (); + } + + /// + /// Allows the caller to programatically stop searching. + /// + public virtual void FinishSearch () + { + if (originalSections is null) + return; + + Root.Sections = new List
(originalSections); + originalSections = null; + originalElements = null; +#if !__TVOS__ + searchBar.ResignFirstResponder (); +#endif + ReloadData (); + } + + public delegate void SearchTextEventHandler (object sender, SearchChangedEventArgs args); + public event SearchTextEventHandler SearchTextChanged; + + public virtual void OnSearchTextChanged (string text) + { + if (SearchTextChanged is not null) + SearchTextChanged (this, new SearchChangedEventArgs (text)); + } + + public void PerformFilter (string text) + { + if (originalSections is null) + return; + + OnSearchTextChanged (text); + + var newSections = new List
(); + + for (int sidx = 0; sidx < originalSections.Length; sidx++) { + Section newSection = null; + var section = originalSections [sidx]; + Element [] elements = originalElements [sidx]; + + for (int eidx = 0; eidx < elements.Length; eidx++) { + if (elements [eidx].Matches (text)) { + if (newSection is null) { + newSection = new Section (section.Header, section.Footer) { + FooterView = section.FooterView, + HeaderView = section.HeaderView + }; + newSections.Add (newSection); + } + newSection.Add (elements [eidx]); + } + } + } + + Root.Sections = newSections; + + ReloadData (); + } + + public virtual void SearchButtonClicked (string text) + { + } + + class SearchDelegate : UISearchBarDelegate { + DialogViewController container; + + public SearchDelegate (DialogViewController container) + { + this.container = container; + } + + public override void OnEditingStarted (UISearchBar searchBar) + { +#if !__TVOS__ + searchBar.ShowsCancelButton = true; +#endif + container.StartSearch (); + } + + public override void OnEditingStopped (UISearchBar searchBar) + { +#if !__TVOS__ + searchBar.ShowsCancelButton = false; +#endif + container.FinishSearch (); + } + + public override void TextChanged (UISearchBar searchBar, string searchText) + { + container.PerformFilter (searchText ?? ""); + } + +#if !__TVOS__ + public override void CancelButtonClicked (UISearchBar searchBar) + { + searchBar.ShowsCancelButton = false; + container.searchBar.Text = ""; + container.FinishSearch (); + searchBar.ResignFirstResponder (); + } +#endif + + public override void SearchButtonClicked (UISearchBar searchBar) + { + container.SearchButtonClicked (searchBar.Text); + } + } + + public class Source : UITableViewSource { + const float yboundary = 65; + WeakReference container; + protected DialogViewController Container => container.TryGetTarget (out var result) ? result : null; + protected RootElement Root; + + public Source (DialogViewController container) + { + this.container = new WeakReference (container); + Root = container.root; + } + + public override void AccessoryButtonTapped (UITableView tableView, NSIndexPath indexPath) + { + var section = Root.Sections [(int) indexPath.Section]; + var element = (section.Elements [(int) indexPath.Row] as StyledStringElement); + if (element is not null) + element.AccessoryTap (); + } + + public override nint RowsInSection (UITableView tableview, nint section) + { + var s = Root.Sections [(int) section]; + var count = s.Elements.Count; + + return count; + } + + public override nint NumberOfSections (UITableView tableView) + { + return Root.Sections.Count; + } + + public override string TitleForHeader (UITableView tableView, nint section) + { + return Root.Sections [(int) section].Caption; + } + + public override string TitleForFooter (UITableView tableView, nint section) + { + return Root.Sections [(int) section].Footer; + } + + public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) + { + var section = Root.Sections [(int) indexPath.Section]; + var element = section.Elements [(int) indexPath.Row]; + + return element.GetCell (tableView); + } + + public override void WillDisplay (UITableView tableView, UITableViewCell cell, NSIndexPath indexPath) + { + if (Root.NeedColorUpdate) { + var section = Root.Sections [(int) indexPath.Section]; + var element = section.Elements [(int) indexPath.Row]; + var colorized = element as IColorizeBackground; + if (colorized is not null) + colorized.WillDisplay (tableView, cell, indexPath); + } + } + + public override void RowDeselected (UITableView tableView, NSIndexPath indexPath) + { + Container.Deselected (indexPath); + } + + public override void RowSelected (UITableView tableView, NSIndexPath indexPath) + { + var onSelection = Container.OnSelection; + if (onSelection is not null) + onSelection (indexPath); + Container.Selected (indexPath); + } + + public override UIView GetViewForHeader (UITableView tableView, nint sectionIdx) + { + var section = Root.Sections [(int) sectionIdx]; + return section.HeaderView; + } + + public override nfloat GetHeightForHeader (UITableView tableView, nint sectionIdx) + { + var section = Root.Sections [(int) sectionIdx]; + if (section.HeaderView is null) + return -1; + return section.HeaderView.Frame.Height; + } + + public override UIView GetViewForFooter (UITableView tableView, nint sectionIdx) + { + var section = Root.Sections [(int) sectionIdx]; + return section.FooterView; + } + + public override nfloat GetHeightForFooter (UITableView tableView, nint sectionIdx) + { + var section = Root.Sections [(int) sectionIdx]; + if (section.FooterView is null) + return -1; + return section.FooterView.Frame.Height; + } + + public override void Scrolled (UIScrollView scrollView) + { + + } + + public override void DraggingStarted (UIScrollView scrollView) + { + + } + + public override void DraggingEnded (UIScrollView scrollView, bool willDecelerate) + { + } + } + + // + // Performance trick, if we expose GetHeightForRow, the UITableView will + // probe *every* row for its size; Avoid this by creating a separate + // model that is used only when we have items that require resizing + // + public class SizingSource : Source { + public SizingSource (DialogViewController controller) : base (controller) { } + + public override nfloat GetHeightForRow (UITableView tableView, NSIndexPath indexPath) + { + var section = Root.Sections [(int) indexPath.Section]; + var element = section.Elements [(int) indexPath.Row]; + + var sizable = element as IElementSizing; + if (sizable is null) + return (nfloat) tableView.RowHeight; + return sizable.GetHeight (tableView, indexPath); + } + } + + /// + /// Activates a nested view controller from the DialogViewController. + /// If the view controller is hosted in a UINavigationController it + /// will push the result. Otherwise it will show it as a modal + /// dialog + /// + public void ActivateController (UIViewController controller) + { + dirty = true; + + var parent = ParentViewController; + var nav = parent as UINavigationController; + + // We can not push a nav controller into a nav controller + if (nav is not null && !(controller is UINavigationController)) + nav.PushViewController (controller, true); + else { +#if __TVOS__ + PresentViewController (controller, true, null); +#else + PresentModalViewController (controller, true); +#endif + } + } + + /// + /// Dismisses the view controller. It either pops or dismisses + /// based on the kind of container we are hosted in. + /// + public void DeactivateController (bool animated) + { + var parent = ParentViewController; + var nav = parent as UINavigationController; + if (nav is not null) + nav.PopViewController (animated); + else { +#if __TVOS__ + DismissViewController (animated, null); +#else + DismissModalViewController (animated); +#endif + } + } + + void SetupSearch () + { +#if __TVOS__ + // Can't create a UISearchBar in tvOS, you can only use one from a UISearchController, + // which require bigger changes, so just skip this for now. +#else + if (enableSearch) { + searchBar = new UISearchBar (new CGRect (0, 0, tableView.Bounds.Width, 44)) { + Delegate = new SearchDelegate (this) + }; + if (SearchPlaceholder is not null) + searchBar.Placeholder = this.SearchPlaceholder; + tableView.TableHeaderView = searchBar; + } else { + // Does not work with current Monotouch, will work with 3.0 + // tableView.TableHeaderView = null; + } +#endif + } + + public virtual void Deselected (NSIndexPath indexPath) + { + var section = root.Sections [(int) indexPath.Section]; + var element = section.Elements [(int) indexPath.Row]; + + element.Deselected (this, tableView, indexPath); + } + + public virtual void Selected (NSIndexPath indexPath) + { + var section = root.Sections [(int) indexPath.Section]; + var element = section.Elements [(int) indexPath.Row]; + + element.Selected (this, tableView, indexPath); + } + + public virtual UITableView MakeTableView (CGRect bounds, UITableViewStyle style) + { + return new UITableView (bounds, style); + } + + public override void LoadView () + { + tableView = MakeTableView (UIScreen.MainScreen.Bounds, Style); + tableView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin; + tableView.AutosizesSubviews = true; + + if (root is not null) + root.Prepare (); + + UpdateSource (); + View = tableView; + SetupSearch (); + ConfigureTableView (); + + if (root is null) + return; + root.TableView = tableView; + } + + void ConfigureTableView () + { +#if !__TVOS__ + if (refreshRequested is not null) { + RefreshControl = new UIRefreshControl (); + RefreshControl.AddTarget ((sender, args) => TriggerRefresh (), UIControlEvent.ValueChanged); + return; + } +#endif + } + + public event EventHandler ViewAppearing; + + public override void ViewWillAppear (bool animated) + { + base.ViewWillAppear (animated); + if (AutoHideSearch) { + if (enableSearch) { + if (TableView.ContentOffset.Y < 44) + TableView.ContentOffset = new CGPoint (0, 44); + } + } + if (root is null) + return; + + root.Prepare (); + +#if !__TVOS__ + NavigationItem.HidesBackButton = !pushing; +#endif + if (root.Caption is not null) + NavigationItem.Title = root.Caption; + if (dirty) { + tableView.ReloadData (); + dirty = false; + } + + if (ViewAppearing is not null) + ViewAppearing (this, EventArgs.Empty); + } + + public bool Pushing { + get { + return pushing; + } + set { + pushing = value; +#if !__TVOS__ + if (NavigationItem is not null) + NavigationItem.HidesBackButton = !pushing; +#endif + } + } + + public virtual Source CreateSizingSource (bool unevenRows) + { + return unevenRows ? new SizingSource (this) : new Source (this); + } + + Source TableSource; + + void UpdateSource () + { + if (root is null) + return; + + TableSource = CreateSizingSource (root.UnevenRows); + tableView.Source = TableSource; + } + + public void ReloadData () + { + if (root is null) + return; + + if (root.Caption is not null) + NavigationItem.Title = root.Caption; + + root.Prepare (); + if (tableView is not null) { + UpdateSource (); + tableView.ReloadData (); + } + dirty = false; + } + + public event EventHandler ViewDisappearing; + + [Obsolete ("Use the ViewDisappearing event instead")] + public event EventHandler ViewDissapearing { + add { + ViewDisappearing += value; + } + remove { + ViewDisappearing -= value; + } + } + + public override void ViewWillDisappear (bool animated) + { + base.ViewWillDisappear (animated); + if (ViewDisappearing is not null) + ViewDisappearing (this, EventArgs.Empty); + } + + public DialogViewController (RootElement root) : base (UITableViewStyle.Grouped) + { + this.root = root; + } + + public DialogViewController (UITableViewStyle style, RootElement root) : base (style) + { + Style = style; + this.root = root; + } + + /// + /// Creates a new DialogViewController from a RootElement and sets the push status + /// + /// + /// The containing the information to render. + /// + /// + /// A describing whether this is being pushed + /// (NavigationControllers) or not. If pushing is true, then the back button + /// will be shown, allowing the user to go back to the previous controller + /// + public DialogViewController (RootElement root, bool pushing) : base (UITableViewStyle.Grouped) + { + this.pushing = pushing; + this.root = root; + } + + public DialogViewController (UITableViewStyle style, RootElement root, bool pushing) : base (style) + { + Style = style; + this.pushing = pushing; + this.root = root; + } + public DialogViewController (IntPtr handle) : base (handle) + { + this.root = new RootElement (""); + } + } +} diff --git a/tests/common/MonoTouch.Dialog/Elements.cs b/tests/common/MonoTouch.Dialog/Elements.cs new file mode 100644 index 000000000000..6bd56b5b7897 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Elements.cs @@ -0,0 +1,3122 @@ +// +// Elements.cs: defines the various components of our view +// +// Author: +// Miguel de Icaza (miguel@gnome.org) +// +// Copyright 2010, Novell, Inc. +// +// Code licensed under the MIT X11 license +// +// TODO: StyledStringElement: merge with multi-line? +// TODO: StyledStringElement: add image scaling features? +// TODO: StyledStringElement: add sizing based on image size? +// TODO: Move image rendering to StyledImageElement, reason to do this: the image loader would only be imported in this case, linked out otherwise +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Drawing; + +using UIKit; +using CoreGraphics; +using Foundation; +using CoreAnimation; +using ObjCRuntime; +using MonoTouch.Dialog.Utilities; + +using NSAction = global::System.Action; + +namespace MonoTouch.Dialog { + /// + /// Base class for all elements in MonoTouch.Dialog + /// + public partial class Element : IDisposable { + /// + /// Handle to the container object. + /// + /// + /// For sections this points to a RootElement, for every + /// other object this points to a Section and it is null + /// for the root RootElement. + /// + public Element Parent; + + /// + /// The caption to display for this given element + /// + public string Caption; + + /// + /// Initializes the element with the given caption. + /// + /// + /// The caption. + /// + public Element (string caption) + { + this.Caption = caption; + } + + public void Dispose () + { + Dispose (true); + } + + protected virtual void Dispose (bool disposing) + { + } + + static NSString cellkey = new NSString ("xx"); + /// + /// Subclasses that override the GetCell method should override this method as well + /// + /// + /// This method should return the key passed to UITableView.DequeueReusableCell. + /// If your code overrides the GetCell method to change the cell, you must also + /// override this method and return a unique key for it. + /// + /// This works in most subclasses with a couple of exceptions: StringElement and + /// various derived classes do not use this setting as they need a wider range + /// of keys for different uses, so you need to look at the source code for those + /// if you are trying to override StringElement or StyledStringElement. + /// + protected virtual NSString CellKey { + get { + return cellkey; + } + } + + /// + /// Gets a UITableViewCell for this element. Can be overridden, but if you + /// customize the style or contents of the cell you must also override the CellKey + /// property in your derived class. + /// + public virtual UITableViewCell GetCell (UITableView tv) + { + return new UITableViewCell (UITableViewCellStyle.Default, CellKey); + } + + static protected void RemoveTag (UITableViewCell cell, int tag) + { + var viewToRemove = cell.ContentView.ViewWithTag (tag); + if (viewToRemove is not null) + viewToRemove.RemoveFromSuperview (); + } + + /// + /// Returns a summary of the value represented by this object, suitable + /// for rendering as the result of a RootElement with child objects. + /// + /// + /// The return value must be a short description of the value. + /// + public virtual string Summary () + { + return ""; + } + + /// + /// Invoked when the given element has been deslected by the user. + /// + /// + /// The where the deselection took place + /// + /// + /// The that contains the element. + /// + /// + /// The that contains the Section and Row for the element. + /// + public virtual void Deselected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + } + + /// + /// Invoked when the given element has been selected by the user. + /// + /// + /// The where the selection took place + /// + /// + /// The that contains the element. + /// + /// + /// The that contains the Section and Row for the element. + /// + public virtual void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + } + + /// + /// If the cell is attached will return the immediate RootElement + /// + public RootElement GetImmediateRootElement () + { + var section = Parent as Section; + if (section is null) + section = this as Section; + if (section is null) + return null; + return section.Parent as RootElement; + } + + /// + /// Returns the UITableView associated with this element, or null if this cell is not currently attached to a UITableView + /// + public UITableView GetContainerTableView () + { + var root = GetImmediateRootElement (); + if (root is null) + return null; + return root.TableView; + } + + /// + /// Returns the currently active UITableViewCell for this element, or null if the element is not currently visible + /// + public UITableViewCell GetActiveCell () + { + var tv = GetContainerTableView (); + if (tv is null) + return null; + var path = IndexPath; + if (path is null) + return null; + return tv.CellAt (path); + } + + /// + /// Returns the IndexPath of a given element. This is only valid for leaf elements, + /// it does not work for a toplevel RootElement or a Section of if the Element has + /// not been attached yet. + /// + public NSIndexPath IndexPath { + get { + var section = Parent as Section; + if (section is null) + return null; + var root = section.Parent as RootElement; + if (root is null) + return null; + + int row = 0; + foreach (var element in section.Elements) { + if (element == this) { + int nsect = 0; + foreach (var sect in root.Sections) { + if (section == sect) { + return NSIndexPath.FromRowSection (row, nsect); + } + nsect++; + } + } + row++; + } + return null; + } + } + + /// + /// Method invoked to determine if the cell matches the given text, never invoked with a null value or an empty string. + /// + public virtual bool Matches (string text) + { + if (Caption is null) + return false; + return Caption.IndexOf (text, StringComparison.CurrentCultureIgnoreCase) != -1; + } + } + + public abstract partial class BoolElement : Element { + bool val; + public virtual bool Value { + get { + return val; + } + set { + bool emit = val != value; + val = value; + if (emit && ValueChanged is not null) + ValueChanged (this, EventArgs.Empty); + } + } + public event EventHandler ValueChanged; + + public BoolElement (string caption, bool value) : base (caption) + { + val = value; + } + + public override string Summary () + { + return val ? "On".GetText () : "Off".GetText (); + } + } + + /// + /// Used to display switch on the screen. + /// + public partial class BooleanElement : BoolElement { + static NSString bkey = new NSString ("BooleanElement"); +#if !__TVOS__ + UISwitch sw; +#endif // !__TVOS__ + + public BooleanElement (string caption, bool value) : base (caption, value) + { } + + public BooleanElement (string caption, bool value, string key) : base (caption, value) + { } + + protected override NSString CellKey { + get { + return bkey; + } + } + public override UITableViewCell GetCell (UITableView tv) + { +#if __TVOS__ + var cell = ConfigCell (base.GetCell (tv)); +#else + if (sw is null) { + sw = new UISwitch () { + BackgroundColor = UIColor.Clear, + Tag = 1, + On = Value + }; + sw.AddTarget (delegate + { + Value = sw.On; + }, UIControlEvent.ValueChanged); + } else + sw.On = Value; + + var cell = tv.DequeueReusableCell (CellKey); + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey); + cell.SelectionStyle = UITableViewCellSelectionStyle.None; + } else + RemoveTag (cell, 1); + + cell.TextLabel.Text = Caption; + cell.AccessoryView = sw; +#endif // !__TVOS__ + return cell; + } + +#if __TVOS__ + UITableViewCell ConfigCell (UITableViewCell cell) + { + cell.Accessory = Value ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None; + cell.TextLabel.Text = Caption; + return cell; + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + Value = !Value; + var cell = tableView.CellAt (path); + ConfigCell (cell); + base.Selected (dvc, tableView, path); + } +#endif // !__TVOS__ + + protected override void Dispose (bool disposing) + { + if (disposing) { +#if !__TVOS__ + if (sw is not null) { + sw.Dispose (); + sw = null; + } +#endif // !__TVOS__ + } + } + + public override bool Value { + get { + return base.Value; + } + set { + base.Value = value; +#if __TVOS__ + // Not sure what to do here +#else + if (sw is not null) + sw.On = value; +#endif // !__TVOS__ + } + } + } + + /// + /// This class is used to render a string + a state in the form + /// of an image. + /// + /// + /// It is abstract to avoid making this element + /// keep two pointers for the state images, saving 8 bytes per + /// slot. The more derived class "BooleanImageElement" shows + /// one way to implement this by keeping two pointers, a better + /// implementation would return pointers to images that were + /// preloaded and are static. + /// + /// A subclass only needs to implement the GetImage method. + /// + public abstract partial class BaseBooleanImageElement : BoolElement { + static NSString key = new NSString ("BooleanImageElement"); + + public class TextWithImageCellView : UITableViewCell { + const int fontSize = 17; + static UIFont font = UIFont.BoldSystemFontOfSize (fontSize); + BaseBooleanImageElement parent; + UILabel label; + UIButton button; + const int ImageSpace = 32; + const int Padding = 8; + + public TextWithImageCellView (BaseBooleanImageElement parent_) : base (UITableViewCellStyle.Value1, parent_.CellKey) + { + parent = parent_; + label = new UILabel () { + TextAlignment = UITextAlignment.Left, + Text = parent.Caption, + Font = font, + BackgroundColor = UIColor.Clear + }; + button = UIButton.FromType (UIButtonType.Custom); + button.TouchDown += delegate + { + parent.Value = !parent.Value; + UpdateImage (); + if (parent.Tapped is not null) + parent.Tapped (); + }; + ContentView.Add (label); + ContentView.Add (button); + UpdateImage (); + } + + void UpdateImage () + { + button.SetImage (parent.GetImage (), UIControlState.Normal); + } + + public override void LayoutSubviews () + { + base.LayoutSubviews (); + var full = ContentView.Bounds; + var frame = full; + frame.Height = 22; + frame.X = Padding; + frame.Y = (full.Height - frame.Height) / 2; + frame.Width -= ImageSpace + Padding; + label.Frame = frame; + + button.Frame = new CGRect (full.Width - ImageSpace, -3, ImageSpace, 48); + } + + public void UpdateFrom (BaseBooleanImageElement newParent) + { + parent = newParent; + UpdateImage (); + label.Text = parent.Caption; + SetNeedsDisplay (); + } + } + + public BaseBooleanImageElement (string caption, bool value) + : base (caption, value) + { + } + + public event NSAction Tapped; + + protected abstract UIImage GetImage (); + + protected override NSString CellKey { + get { + return key; + } + } + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (CellKey) as TextWithImageCellView; + if (cell is null) + cell = new TextWithImageCellView (this); + else + cell.UpdateFrom (this); + return cell; + } + } + + public partial class BooleanImageElement : BaseBooleanImageElement { + UIImage onImage, offImage; + + public BooleanImageElement (string caption, bool value, UIImage onImage, UIImage offImage) : base (caption, value) + { + this.onImage = onImage; + this.offImage = offImage; + } + + protected override UIImage GetImage () + { + if (Value) + return onImage; + else + return offImage; + } + + protected override void Dispose (bool disposing) + { + base.Dispose (disposing); + onImage = offImage = null; + } + } + + /// + /// Used to display a slider on the screen. + /// + public partial class FloatElement : Element { + public bool ShowCaption; + public float Value; + public float MinValue, MaxValue; + static NSString skey = new NSString ("FloatElement"); + //UIImage Left, Right; +#if !__TVOS__ + // There is no UISlider in tvOS, so make this read-only for now. + UISlider slider; +#endif // !__TVOS__ + + public FloatElement (float value) : this (null, null, value) + { + } + + public FloatElement (UIImage left, UIImage right, float value) : base (null) + { + //Left = left; + //Right = right; + MinValue = 0; + MaxValue = 1; + Value = value; + } + + protected override NSString CellKey { + get { + return skey; + } + } + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (CellKey); + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey); + cell.SelectionStyle = UITableViewCellSelectionStyle.None; + } else + RemoveTag (cell, 1); + +#if __TVOS__ + if (Caption is not null && ShowCaption) + cell.TextLabel.Text = Caption; + + cell.DetailTextLabel.Text = string.Format ("[{0}...{2}]: {1}]", MinValue, Value, MaxValue); +#else + CGSize captionSize = new CGSize (0, 0); + if (Caption is not null && ShowCaption) { + cell.TextLabel.Text = Caption; + captionSize = Caption.StringSize (UIFont.FromName (cell.TextLabel.Font.Name, UIFont.LabelFontSize)); + captionSize.Width += 10; // Spacing + } + if (slider is null) { + slider = new UISlider (new CGRect (10f + captionSize.Width, UIDevice.CurrentDevice.CheckSystemVersion (7, 0) ? 18f : 12f, cell.ContentView.Bounds.Width - 20 - captionSize.Width, 7f)) { + BackgroundColor = UIColor.Clear, + MinValue = this.MinValue, + MaxValue = this.MaxValue, + Continuous = true, + Value = this.Value, + Tag = 1, + AutoresizingMask = UIViewAutoresizing.FlexibleWidth + }; + slider.ValueChanged += delegate + { + Value = slider.Value; + }; + } else { + slider.Value = Value; + } + + cell.ContentView.AddSubview (slider); +#endif // __TVOS__ + return cell; + } + + public override string Summary () + { + return Value.ToString (); + } + + protected override void Dispose (bool disposing) + { + if (disposing) { +#if !__TVOS__ + if (slider is not null) { + slider.Dispose (); + slider = null; + } +#endif // !__TVOS__ + } + } + } + + /// + /// Used to display a cell that will launch a web browser when selected. + /// + public partial class HtmlElement : Element { + NSUrl nsUrl; + static NSString hkey = new NSString ("HtmlElement"); +#if !__TVOS__ && !__MACCATALYST__ + // There is no UIWebView in tvOS, so we can't launch anything. + UIWebView web; +#endif // !__TVOS__ && !__MACCATALYST__ + + public HtmlElement (string caption, string url) : base (caption) + { + Url = url; + } + + public HtmlElement (string caption, NSUrl url) : base (caption) + { + nsUrl = url; + } + + protected override NSString CellKey { + get { + return hkey; + } + } + public string Url { + get { + return nsUrl.ToString (); + } + set { + nsUrl = new NSUrl (value); + } + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (CellKey); + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey); + cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; + } + cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; + + cell.TextLabel.Text = Caption; + return cell; + } + + static bool NetworkActivity { + set { +#if !__TVOS__ + UIApplication.SharedApplication.NetworkActivityIndicatorVisible = value; +#endif // !__TVOS__ + } + } + +#if !__TVOS__ && !__MACCATALYST__ + // We use this class to dispose the web control when it is not + // in use, as it could be a bit of a pig, and we do not want to + // wait for the GC to kick-in. + class WebViewController : UIViewController { +#pragma warning disable 414 + HtmlElement container; +#pragma warning restore 414 + + public WebViewController (HtmlElement container) : base () + { + this.container = container; + } + + public bool Autorotate { get; set; } + + public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) + { + return Autorotate; + } + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + int i = 0; + var vc = new WebViewController (this) { + Autorotate = dvc.Autorotate + }; + + web = new UIWebView (UIScreen.MainScreen.Bounds) { + BackgroundColor = UIColor.White, + ScalesPageToFit = true, + AutoresizingMask = UIViewAutoresizing.All + }; + web.LoadStarted += delegate + { + // this is called several times and only one UIActivityIndicatorView is needed + if (i++ == 0) { + var indicator = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.White); + vc.NavigationItem.RightBarButtonItem = new UIBarButtonItem (indicator); + indicator.StartAnimating (); + } + NetworkActivity = true; + }; + web.LoadFinished += delegate + { + if (--i == 0) { + // we stopped loading, remove indicator and dispose of UIWebView + vc.NavigationItem.RightBarButtonItem = null; + web.StopLoading (); + web.Dispose (); + } + NetworkActivity = false; + }; + web.LoadError += (webview, args) => { + NetworkActivity = false; + vc.NavigationItem.RightBarButtonItem = null; + if (web is not null) + web.LoadHtmlString ( + String.Format ("
{0}:
{1}
", + "An error occurred:".GetText (), args.Error.LocalizedDescription), null); + }; + vc.NavigationItem.Title = Caption; + + vc.View.AutosizesSubviews = true; + vc.View.AddSubview (web); + + dvc.ActivateController (vc); + web.LoadRequest (NSUrlRequest.FromUrl (nsUrl)); + } +#endif // !__TVOS__ && !__MACCATALYST__ + } + + /// + /// The string element can be used to render some text in a cell + /// that can optionally respond to tap events. + /// + public partial class StringElement : Element { + static NSString skey = new NSString ("StringElement"); + static NSString skeyvalue = new NSString ("StringElementValue"); + public UITextAlignment Alignment = UITextAlignment.Left; + public string Value; + + public StringElement (string caption) : base (caption) { } + + public StringElement (string caption, string value) : base (caption) + { + this.Value = value; + } + + public StringElement (string caption, NSAction tapped) : base (caption) + { + Tapped += tapped; + } + + public event NSAction Tapped; + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (Value is null ? skey : skeyvalue); + cell = null; + if (cell is null) { + cell = new UITableViewCell (Value is null ? UITableViewCellStyle.Default : UITableViewCellStyle.Value1, Value is null ? skey : skeyvalue); + cell.SelectionStyle = (Tapped is not null) ? UITableViewCellSelectionStyle.Blue : UITableViewCellSelectionStyle.None; + } + cell.Accessory = UITableViewCellAccessory.None; + cell.TextLabel.Text = Caption; + cell.TextLabel.TextAlignment = Alignment; + + // The check is needed because the cell might have been recycled. + if (cell.DetailTextLabel is not null) + cell.DetailTextLabel.Text = Value is null ? "" : Value; + + return cell; + } + + public override string Summary () + { + return Caption; + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath) + { + if (Tapped is not null) + Tapped (); + tableView.DeselectRow (indexPath, true); + } + + public override bool Matches (string text) + { + return (Value is not null ? Value.IndexOf (text, StringComparison.CurrentCultureIgnoreCase) != -1 : false) || base.Matches (text); + } + } + + /// + /// A version of the StringElement that can be styled with a number of formatting + /// options and can render images or background images either from UIImage parameters + /// or by downloading them from the net. + /// + public partial class StyledStringElement : StringElement, IImageUpdated, IColorizeBackground { + static NSString [] skey = { new NSString (".1"), new NSString (".2"), new NSString (".3"), new NSString (".4") }; + + public StyledStringElement (string caption) : base (caption) { } + public StyledStringElement (string caption, NSAction tapped) : base (caption, tapped) { } + public StyledStringElement (string caption, string value) : base (caption, value) + { + style = UITableViewCellStyle.Value1; + } + public StyledStringElement (string caption, string value, UITableViewCellStyle style) : base (caption, value) + { + this.style = style; + } + + protected UITableViewCellStyle style; + public event NSAction AccessoryTapped; + public UIFont Font; + public UIFont SubtitleFont; + public UIColor TextColor; + public UILineBreakMode LineBreakMode = UILineBreakMode.WordWrap; + public int Lines = 0; + public UITableViewCellAccessory Accessory = UITableViewCellAccessory.None; + + // To keep the size down for a StyleStringElement, we put all the image information + // on a separate structure, and create this on demand. + ExtraInfo extraInfo; + + class ExtraInfo { + public UIImage Image; // Maybe add BackgroundImage? + public UIColor BackgroundColor, DetailColor; + public Uri Uri, BackgroundUri; + } + + ExtraInfo OnImageInfo () + { + if (extraInfo is null) + extraInfo = new ExtraInfo (); + return extraInfo; + } + + // Uses the specified image (use this or ImageUri) + public UIImage Image { + get { + return extraInfo is null ? null : extraInfo.Image; + } + set { + OnImageInfo ().Image = value; + extraInfo.Uri = null; + } + } + + // Loads the image from the specified uri (use this or Image) + public Uri ImageUri { + get { + return extraInfo is null ? null : extraInfo.Uri; + } + set { + OnImageInfo ().Uri = value; + extraInfo.Image = null; + } + } + + // Background color for the cell (alternative: BackgroundUri) + public UIColor BackgroundColor { + get { + return extraInfo is null ? null : extraInfo.BackgroundColor; + } + set { + OnImageInfo ().BackgroundColor = value; + extraInfo.BackgroundUri = null; + } + } + + public UIColor DetailColor { + get { + return extraInfo is null ? null : extraInfo.DetailColor; + } + set { + OnImageInfo ().DetailColor = value; + } + } + + // Uri for a Background image (alternatiev: BackgroundColor) + public Uri BackgroundUri { + get { + return extraInfo is null ? null : extraInfo.BackgroundUri; + } + set { + OnImageInfo ().BackgroundUri = value; + extraInfo.BackgroundColor = null; + } + } + + protected virtual string GetKey (int style) + { + return skey [style]; + } + + public override UITableViewCell GetCell (UITableView tv) + { + var key = GetKey ((int) style); + var cell = tv.DequeueReusableCell (key); + if (cell is null) { + cell = new UITableViewCell (style, key); + cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; + } + PrepareCell (cell); + return cell; + } + + protected void PrepareCell (UITableViewCell cell) + { + cell.Accessory = Accessory; + var tl = cell.TextLabel; + tl.Text = Caption; + tl.TextAlignment = Alignment; + tl.TextColor = TextColor ?? UIColor.Black; + tl.Font = Font ?? UIFont.BoldSystemFontOfSize (17); + tl.LineBreakMode = LineBreakMode; + tl.Lines = Lines; + + // The check is needed because the cell might have been recycled. + if (cell.DetailTextLabel is not null) + cell.DetailTextLabel.Text = Value is null ? "" : Value; + + if (extraInfo is null) { + ClearBackground (cell); + } else { + var imgView = cell.ImageView; + UIImage img; + + if (imgView is not null) { + if (extraInfo.Uri is not null) + img = ImageLoader.DefaultRequestImage (extraInfo.Uri, this); + else if (extraInfo.Image is not null) + img = extraInfo.Image; + else + img = null; + imgView.Image = img; + } + + if (cell.DetailTextLabel is not null) + cell.DetailTextLabel.TextColor = extraInfo.DetailColor ?? UIColor.Gray; + } + + if (cell.DetailTextLabel is not null) { + cell.DetailTextLabel.Lines = Lines; + cell.DetailTextLabel.LineBreakMode = LineBreakMode; + cell.DetailTextLabel.Font = SubtitleFont ?? UIFont.SystemFontOfSize (14); + cell.DetailTextLabel.TextColor = (extraInfo is null || extraInfo.DetailColor is null) ? UIColor.Gray : extraInfo.DetailColor; + } + } + + void ClearBackground (UITableViewCell cell) + { + cell.BackgroundColor = UITableViewCell.Appearance.BackgroundColor; + cell.TextLabel.BackgroundColor = UIColor.Clear; + } + + void IColorizeBackground.WillDisplay (UITableView tableView, UITableViewCell cell, NSIndexPath indexPath) + { + if (extraInfo is null) { + ClearBackground (cell); + return; + } + + if (extraInfo.BackgroundColor is not null) { + cell.TextLabel.BackgroundColor = UIColor.Clear; + cell.BackgroundColor = extraInfo.BackgroundColor; + } else if (extraInfo.BackgroundUri is not null) { + var img = ImageLoader.DefaultRequestImage (extraInfo.BackgroundUri, this); + cell.TextLabel.BackgroundColor = UIColor.Clear; + cell.BackgroundColor = img is null ? UIColor.White : UIColor.FromPatternImage (img); + } else + ClearBackground (cell); + } + + void IImageUpdated.UpdatedImage (Uri uri) + { + if (uri is null || extraInfo is null) + return; + var root = GetImmediateRootElement (); + if (root is null || root.TableView is null) + return; + root.TableView.ReloadRows (new NSIndexPath [] { IndexPath }, UITableViewRowAnimation.None); + } + + internal void AccessoryTap () + { + NSAction tapped = AccessoryTapped; + if (tapped is not null) + tapped (); + } + } + +#if __TVOS__ + internal static class Helper { + + static public CGSize StringSize (this string self, UIFont font) + { + using (var str = (NSString) self) { + return str.GetSizeUsingAttributes (new UIStringAttributes () + { + Font = font, + }); + } + } + + static public CGSize StringSize (this string self, UIFont font, CGSize constrainedToSize, UILineBreakMode lineBreakMode) + { + using (var str = (NSString) self) { + return StringSize (str, font, constrainedToSize, lineBreakMode); + } + } + + static public CGSize StringSize (this NSString self, UIFont font, CGSize constrainedToSize, UILineBreakMode lineBreakMode) + { + return self.GetBoundingRect (constrainedToSize, NSStringDrawingOptions.UsesLineFragmentOrigin, new UIStringAttributes () + { + Font = font, + ParagraphStyle = new NSMutableParagraphStyle () + { + LineBreakMode = lineBreakMode, + }, + }, null).Size; + } + + static public CGSize StringSize (this NSString self, UIFont font, float forWidth, UILineBreakMode lineBreakMode) + { + return StringSize (self, font, new CGSize (forWidth, nfloat.MaxValue), lineBreakMode); + } + + static public void DrawString (this string self, CGRect rect, UIFont font) + { + using (var str = (NSString) self) { + NSStringDrawing.DrawString (str, rect, new UIStringAttributes () + { + Font = font, + }); + } + } + + static public void DrawString (this string self, CGPoint point, float width, UIFont font, UILineBreakMode lineBreakMode) + { + using (var str = (NSString) self) { + NSStringDrawing.DrawString (str, point, new UIStringAttributes () + { + Font = font, + ParagraphStyle = new NSMutableParagraphStyle () + { + LineBreakMode = lineBreakMode, + }, + }); + } + } + + static public void DrawString (this string self, CGRect rect, UIFont font, UILineBreakMode lineBreakMode, UITextAlignment alignment) + { + using (var str = (NSString) self) { + NSStringDrawing.DrawString (str, rect, new UIStringAttributes () + { + Font = font, + ParagraphStyle = new NSMutableParagraphStyle () + { + LineBreakMode = lineBreakMode, + Alignment = alignment, + }, + }); + } + } + } +#endif + + public partial class StyledMultilineElement : StyledStringElement, IElementSizing { + public StyledMultilineElement (string caption) : base (caption) { } + public StyledMultilineElement (string caption, string value) : base (caption, value) { } + public StyledMultilineElement (string caption, NSAction tapped) : base (caption, tapped) { } + public StyledMultilineElement (string caption, string value, UITableViewCellStyle style) : base (caption, value) + { + this.style = style; + } + + public virtual nfloat GetHeight (UITableView tableView, NSIndexPath indexPath) + { + float margin = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone ? 40f : 110f; + CGSize maxSize = new CGSize (tableView.Bounds.Width - margin, float.MaxValue); + + if (this.Accessory != UITableViewCellAccessory.None) + maxSize.Width -= 20; + + string c = Caption; + string v = Value; + // ensure the (multi-line) Value will be rendered inside the cell when no Caption is present + if (String.IsNullOrEmpty (c)) + c = " "; + + var captionFont = Font ?? UIFont.BoldSystemFontOfSize (17); + var height = c.StringSize (captionFont, maxSize, LineBreakMode).Height; + + if (!String.IsNullOrEmpty (v)) { + var subtitleFont = SubtitleFont ?? UIFont.SystemFontOfSize (14); + if (this.style == UITableViewCellStyle.Subtitle) { + height += v.StringSize (subtitleFont, maxSize, LineBreakMode).Height; + } else { + var vheight = v.StringSize (subtitleFont, maxSize, LineBreakMode).Height; + if (vheight > height) + height = vheight; + } + } + + return height + 10; + } + } + + public partial class ImageStringElement : StringElement { + static NSString skey = new NSString ("ImageStringElement"); + UIImage image; + public UITableViewCellAccessory Accessory { get; set; } + + public ImageStringElement (string caption, UIImage image) : base (caption) + { + this.image = image; + this.Accessory = UITableViewCellAccessory.None; + } + + public ImageStringElement (string caption, string value, UIImage image) : base (caption, value) + { + this.image = image; + this.Accessory = UITableViewCellAccessory.None; + } + + public ImageStringElement (string caption, NSAction tapped, UIImage image) : base (caption, tapped) + { + this.image = image; + this.Accessory = UITableViewCellAccessory.None; + } + + protected override NSString CellKey { + get { + return skey; + } + } + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (CellKey); + if (cell is null) { + cell = new UITableViewCell (Value is null ? UITableViewCellStyle.Default : UITableViewCellStyle.Subtitle, CellKey); + cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; + } + + cell.Accessory = Accessory; + cell.TextLabel.Text = Caption; + cell.TextLabel.TextAlignment = Alignment; + + cell.ImageView.Image = image; + + // The check is needed because the cell might have been recycled. + if (cell.DetailTextLabel is not null) + cell.DetailTextLabel.Text = Value is null ? "" : Value; + + return cell; + } + + } + + /// + /// This interface is implemented by Element classes that will have + /// different heights + /// + public interface IElementSizing { + nfloat GetHeight (UITableView tableView, NSIndexPath indexPath); + } + + /// + /// This interface is implemented by Elements that needs to update + /// their cells Background properties just before they are displayed + /// to the user. This is an iOS 3 requirement to properly render + /// a cell. + /// + public interface IColorizeBackground { + void WillDisplay (UITableView tableView, UITableViewCell cell, NSIndexPath indexPath); + } + + public partial class MultilineElement : StringElement, IElementSizing { + public MultilineElement (string caption) : base (caption) + { + } + + public MultilineElement (string caption, string value) : base (caption, value) + { + } + + public MultilineElement (string caption, NSAction tapped) : base (caption, tapped) + { + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = base.GetCell (tv); + var tl = cell.TextLabel; + tl.LineBreakMode = UILineBreakMode.WordWrap; + tl.Lines = 0; + + return cell; + } + + public virtual nfloat GetHeight (UITableView tableView, NSIndexPath indexPath) + { + float margin = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone ? 40f : 110f; + CGSize size = new CGSize (tableView.Bounds.Width - margin, float.MaxValue); + UIFont font = UIFont.BoldSystemFontOfSize (17); + string c = Caption; + // ensure the (single-line) Value will be rendered inside the cell + if (String.IsNullOrEmpty (c) && !String.IsNullOrEmpty (Value)) + c = " "; + return c.StringSize (font, size, UILineBreakMode.WordWrap).Height + 10; + } + } + + public partial class RadioElement : StringElement { + public string Group; + internal int RadioIdx; + + public RadioElement (string caption, string group) : base (caption) + { + Group = group; + } + + public RadioElement (string caption) : base (caption) + { + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = base.GetCell (tv); + var root = (RootElement) Parent.Parent; + + if (!(root.group is RadioGroup)) + throw new Exception ("The RootElement's Group is null or is not a RadioGroup"); + + bool selected = RadioIdx == ((RadioGroup) (root.group)).Selected; + cell.Accessory = selected ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None; + + return cell; + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath) + { + RootElement root = (RootElement) Parent.Parent; + if (RadioIdx != root.RadioSelected) { + UITableViewCell cell; + var selectedIndex = root.PathForRadio (root.RadioSelected); + if (selectedIndex is not null) { + cell = tableView.CellAt (selectedIndex); + if (cell is not null) + cell.Accessory = UITableViewCellAccessory.None; + } + cell = tableView.CellAt (indexPath); + if (cell is not null) + cell.Accessory = UITableViewCellAccessory.Checkmark; + root.RadioSelected = RadioIdx; + } + + base.Selected (dvc, tableView, indexPath); + } + } + + public partial class CheckboxElement : StringElement { + public new bool Value; + public string Group; + + public CheckboxElement (string caption) : base (caption) { } + public CheckboxElement (string caption, bool value) : base (caption) + { + Value = value; + } + + public CheckboxElement (string caption, bool value, string group) : this (caption, value) + { + Group = group; + } + + UITableViewCell ConfigCell (UITableViewCell cell) + { + cell.Accessory = Value ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None; + return cell; + } + + public override UITableViewCell GetCell (UITableView tv) + { + return ConfigCell (base.GetCell (tv)); + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + Value = !Value; + var cell = tableView.CellAt (path); + ConfigCell (cell); + base.Selected (dvc, tableView, path); + } + + } + + public partial class ImageElement : Element { + public UIImage Value; + static CGRect rect = new CGRect (0, 0, dimx, dimy); + static NSString ikey = new NSString ("ImageElement"); + UIImage scaled; + + // There's no UIImagePickerController in tvOS (and I couldn't find any suitable replacement either). +#if !__TVOS__ + UIPopoverController popover; + + // Apple leaks this one, so share across all. + static UIImagePickerController picker; +#endif // !__TVOS__ + + // Height for rows + const int dimx = 48; + const int dimy = 43; + + // radius for rounding + const int rad = 10; + + static UIImage MakeEmpty () + { + using (var cs = CGColorSpace.CreateDeviceRGB ()) { + using (var bit = new CGBitmapContext (IntPtr.Zero, dimx, dimy, 8, 0, cs, CGImageAlphaInfo.PremultipliedFirst)) { + bit.SetStrokeColor (1, 0, 0, 0.5f); + bit.FillRect (new CGRect (0, 0, dimx, dimy)); + + return UIImage.FromImage (bit.ToImage ()); + } + } + } + + UIImage Scale (UIImage source) + { + UIGraphics.BeginImageContext (new CGSize (dimx, dimy)); + var ctx = UIGraphics.GetCurrentContext (); + + var img = source.CGImage; + ctx.TranslateCTM (0, dimy); + if (img.Width > img.Height) + ctx.ScaleCTM (1, (nfloat) (-img.Width / dimy)); + else + ctx.ScaleCTM ((nfloat) img.Height / dimx, -1); + + ctx.DrawImage (rect, source.CGImage); + + var ret = UIGraphics.GetImageFromCurrentImageContext (); + UIGraphics.EndImageContext (); + return ret; + } + + public ImageElement (UIImage image) : base ("") + { + if (image is null) { + Value = MakeEmpty (); + scaled = Value; + } else { + Value = image; + scaled = Scale (Value); + } + } + + protected override NSString CellKey { + get { + return ikey; + } + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (CellKey); + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey); + } + + if (scaled is null) + return cell; + + Section psection = Parent as Section; + bool roundTop = psection.Elements [0] == this; + bool roundBottom = psection.Elements [psection.Elements.Count - 1] == this; + + using (var cs = CGColorSpace.CreateDeviceRGB ()) { + using (var bit = new CGBitmapContext (IntPtr.Zero, dimx, dimy, 8, 0, cs, CGImageAlphaInfo.PremultipliedFirst)) { + // Clipping path for the image, different on top, middle and bottom. + if (roundBottom) { + bit.AddArc (rad, rad, rad, (float) Math.PI, (float) (3 * Math.PI / 2), false); + } else { + bit.MoveTo (0, rad); + bit.AddLineToPoint (0, 0); + } + bit.AddLineToPoint (dimx, 0); + bit.AddLineToPoint (dimx, dimy); + + if (roundTop) { + bit.AddArc (rad, dimy - rad, rad, (float) (Math.PI / 2), (float) Math.PI, false); + bit.AddLineToPoint (0, rad); + } else { + bit.AddLineToPoint (0, dimy); + } + bit.Clip (); + bit.DrawImage (rect, scaled.CGImage); + + cell.ImageView.Image = UIImage.FromImage (bit.ToImage ()); + } + } + return cell; + } + + protected override void Dispose (bool disposing) + { + if (disposing) { + if (scaled is not null) { + scaled.Dispose (); + Value.Dispose (); + scaled = null; + Value = null; + } + } + base.Dispose (disposing); + } + +#if !__TVOS__ + class MyDelegate : UIImagePickerControllerDelegate { + ImageElement container; + UITableView table; + NSIndexPath path; + + public MyDelegate (ImageElement container, UITableView table, NSIndexPath path) + { + this.container = container; + this.table = table; + this.path = path; + } + +#if !NET + public override void FinishedPickingImage (UIImagePickerController picker, UIImage image, NSDictionary editingInfo) + { + container.Picked (image); + table.ReloadRows (new NSIndexPath [] { path }, UITableViewRowAnimation.None); + } +#else + public override void FinishedPickingMedia (UIImagePickerController picker, NSDictionary info) + { + var image = (UIImage) (info [UIImagePickerController.OriginalImage] ?? info [UIImagePickerController.EditedImage]); + container.Picked (image); + table.ReloadRows (new NSIndexPath [] { path }, UITableViewRowAnimation.None); + } +#endif + } + + void Picked (UIImage image) + { + Value = image; + scaled = Scale (image); + currentController.DismissModalViewController (true); + } + + UIViewController currentController; + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + if (picker is null) + picker = new UIImagePickerController (); + picker.Delegate = new MyDelegate (this, tableView, path); + + switch (UIDevice.CurrentDevice.UserInterfaceIdiom) { + case UIUserInterfaceIdiom.Pad: + CGRect useRect; + popover = new UIPopoverController (picker); + var cell = tableView.CellAt (path); + if (cell is null) + useRect = rect; + else + useRect = cell.Frame; + popover.PresentFromRect (useRect, dvc.View, UIPopoverArrowDirection.Any, true); + break; + + default: + case UIUserInterfaceIdiom.Phone: + dvc.ActivateController (picker); + break; + } + currentController = dvc; + } +#endif // !__TVOS__ + } + + /// + /// An element that can be used to enter text. + /// + /// + /// This element can be used to enter text both regular and password protected entries. + /// + /// The Text fields in a given section are aligned with each other. + /// + public partial class EntryElement : Element { + /// + /// The value of the EntryElement + /// + public string Value { + get { + if (entry is null) + return val; + var newValue = entry.Text; + if (newValue == val) + return val; + val = newValue; + + if (Changed is not null) + Changed (this, EventArgs.Empty); + return val; + } + set { + val = value; + if (entry is not null) + entry.Text = value; + } + } + protected string val; + + /// + /// The key used for reusable UITableViewCells. + /// + static NSString entryKey = new NSString ("EntryElement"); + protected virtual NSString EntryKey { + get { + return entryKey; + } + } + + /// + /// The type of keyboard used for input, you can change + /// this to use this for numeric input, email addressed, + /// urls, phones. + /// + public UIKeyboardType KeyboardType { + get { + return keyboardType; + } + set { + keyboardType = value; + if (entry is not null) + entry.KeyboardType = value; + } + } + + /// + /// The type of Return Key that is displayed on the + /// keyboard, you can change this to use this for + /// Done, Return, Save, etc. keys on the keyboard + /// + public UIReturnKeyType? ReturnKeyType { + get { + return returnKeyType; + } + set { + returnKeyType = value; + if (entry is not null && returnKeyType.HasValue) + entry.ReturnKeyType = returnKeyType.Value; + } + } + + /// + /// The default value for this property is false. If you set it to true, the keyboard disables the return key when the text entry area contains no text. As soon as the user enters any text, the return key is automatically enabled. + /// + public bool EnablesReturnKeyAutomatically { + get { + return enablesReturnKeyAutomatically; + } + set { + enablesReturnKeyAutomatically = value; + if (entry is not null) + entry.EnablesReturnKeyAutomatically = value; + } + } + + public UITextAutocapitalizationType AutocapitalizationType { + get { + return autocapitalizationType; + } + set { + autocapitalizationType = value; + if (entry is not null) + entry.AutocapitalizationType = value; + } + } + + public UITextAutocorrectionType AutocorrectionType { + get { + return autocorrectionType; + } + set { + autocorrectionType = value; + if (entry is not null) + this.autocorrectionType = value; + } + } + + public UITextFieldViewMode ClearButtonMode { + get { + return clearButtonMode; + } + set { + clearButtonMode = value; + if (entry is not null) + entry.ClearButtonMode = value; + } + } + + public UITextAlignment TextAlignment { + get { + return textalignment; + } + set { + textalignment = value; + if (entry is not null) { + entry.TextAlignment = textalignment; + } + } + } + + public bool AlignEntryWithAllSections { get; set; } + + public bool NotifyChangedOnKeyStroke { get; set; } + + UITextAlignment textalignment = UITextAlignment.Left; + UIKeyboardType keyboardType = UIKeyboardType.Default; + UIReturnKeyType? returnKeyType = null; + bool enablesReturnKeyAutomatically = false; + UITextAutocapitalizationType autocapitalizationType = UITextAutocapitalizationType.Sentences; + UITextAutocorrectionType autocorrectionType = UITextAutocorrectionType.Default; + UITextFieldViewMode clearButtonMode = UITextFieldViewMode.Never; + bool isPassword, becomeResponder; + UITextField entry; + string placeholder; + static UIFont font = UIFont.BoldSystemFontOfSize (17); + + public event EventHandler Changed; + public event Func ShouldReturn; + public EventHandler EntryStarted { get; set; } + public EventHandler EntryEnded { get; set; } + /// + /// Constructs an EntryElement with the given caption, placeholder and initial value. + /// + /// + /// The caption to use + /// + /// + /// Placeholder to display when no value is set. + /// + /// + /// Initial value. + /// + public EntryElement (string caption, string placeholder, string value) : base (caption) + { + Value = value; + this.placeholder = placeholder; + } + + /// + /// Constructs an EntryElement for password entry with the given caption, placeholder and initial value. + /// + /// + /// The caption to use. + /// + /// + /// Placeholder to display when no value is set. + /// + /// + /// Initial value. + /// + /// + /// True if this should be used to enter a password. + /// + public EntryElement (string caption, string placeholder, string value, bool isPassword) : base (caption) + { + Value = value; + this.isPassword = isPassword; + this.placeholder = placeholder; + } + + public override string Summary () + { + return Value; + } + + // + // Computes the X position for the entry by aligning all the entries in the Section + // + CGSize ComputeEntryPosition (UITableView tv, UITableViewCell cell) + { + nfloat maxWidth = -15; // If all EntryElements have a null Caption, align UITextField with the Caption offset of normal cells (at 10px). + nfloat maxHeight = font.LineHeight; + + // Determine if we should calculate accross all sections or just the current section. + var sections = AlignEntryWithAllSections ? (Parent.Parent as RootElement).Sections : (new [] { Parent as Section }).AsEnumerable (); + + foreach (Section s in sections) { + + foreach (var e in s.Elements) { + + var ee = e as EntryElement; + + if (ee is not null + && !String.IsNullOrEmpty (ee.Caption)) { + + var size = ee.Caption.StringSize (font); + + maxWidth = (nfloat) Math.Max (size.Width, maxWidth); + maxHeight = (nfloat) Math.Max (size.Height, maxHeight); + } + } + } + + return new CGSize (25 + (nfloat) Math.Min (maxWidth, 160), maxHeight); + } + + protected virtual UITextField CreateTextField (CGRect frame) + { + return new UITextField (frame) { + AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleLeftMargin, + Placeholder = placeholder ?? "", + SecureTextEntry = isPassword, + Text = Value ?? "", + Tag = 1, + TextAlignment = textalignment, + ClearButtonMode = ClearButtonMode + }; + } + + static readonly NSString passwordKey = new NSString ("EntryElement+Password"); + static readonly NSString cellkey = new NSString ("EntryElement"); + + protected override NSString CellKey { + get { + return isPassword ? passwordKey : cellkey; + } + } + + UITableViewCell cell; + public override UITableViewCell GetCell (UITableView tv) + { + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey); + cell.SelectionStyle = UITableViewCellSelectionStyle.None; + cell.TextLabel.Font = font; + + } + cell.TextLabel.Text = Caption; + + var offset = (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) ? 20 : 90; + cell.Frame = new CGRect (cell.Frame.X, cell.Frame.Y, tv.Frame.Width - offset, cell.Frame.Height); + CGSize size = ComputeEntryPosition (tv, cell); + nfloat yOffset = (cell.ContentView.Bounds.Height - size.Height) / 2 - 1; + nfloat width = cell.ContentView.Bounds.Width - size.Width; + if (textalignment == UITextAlignment.Right) { + // Add padding if right aligned + width -= 10; + } +#if __TVOS__ + var entryFrame = new CGRect (size.Width, yOffset, width, size.Height + 20 /* FIXME: figure out something better than adding a magic number */); +#else + var entryFrame = new CGRect (size.Width, yOffset, width, size.Height); +#endif + + if (entry is null) { + entry = CreateTextField (entryFrame); + entry.EditingChanged += delegate + { + if (NotifyChangedOnKeyStroke) { + FetchValue (); + } + }; + entry.ValueChanged += delegate + { + FetchValue (); + }; + entry.Ended += delegate + { + FetchValue (); + if (EntryEnded is not null) { + EntryEnded (this, null); + } + }; + entry.ShouldReturn += delegate + { + + if (ShouldReturn is not null) + return ShouldReturn (); + + RootElement root = GetImmediateRootElement (); + EntryElement focus = null; + + if (root is null) + return true; + + foreach (var s in root.Sections) { + foreach (var e in s.Elements) { + if (e == this) { + focus = this; + } else if (focus is not null && e is EntryElement) { + focus = e as EntryElement; + break; + } + } + + if (focus is not null && focus != this) + break; + } + + if (focus != this) + focus.BecomeFirstResponder (true); + else + focus.ResignFirstResponder (true); + + return true; + }; + entry.Started += delegate + { + EntryElement self = null; + + if (EntryStarted is not null) { + EntryStarted (this, null); + } + + if (!returnKeyType.HasValue) { + var returnType = UIReturnKeyType.Default; + + foreach (var e in (Parent as Section).Elements) { + if (e == this) + self = this; + else if (self is not null && e is EntryElement) + returnType = UIReturnKeyType.Next; + } + entry.ReturnKeyType = returnType; + } else + entry.ReturnKeyType = returnKeyType.Value; + + tv.ScrollToRow (IndexPath, UITableViewScrollPosition.Middle, true); + }; + cell.ContentView.AddSubview (entry); + } + + if (becomeResponder) { + entry.BecomeFirstResponder (); + becomeResponder = false; + } + entry.KeyboardType = KeyboardType; + entry.EnablesReturnKeyAutomatically = EnablesReturnKeyAutomatically; + entry.AutocapitalizationType = AutocapitalizationType; + entry.AutocorrectionType = AutocorrectionType; + + return cell; + } + + /// + /// Copies the value from the UITextField in the EntryElement to the + // Value property and raises the Changed event if necessary. + /// + public void FetchValue () + { + if (entry is null) + return; + + var newValue = entry.Text; + if (newValue == Value) + return; + + Value = newValue; + + if (Changed is not null) + Changed (this, EventArgs.Empty); + } + + protected override void Dispose (bool disposing) + { + if (disposing) { + if (entry is not null) { + entry.Dispose (); + entry = null; + } + } + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath) + { + BecomeFirstResponder (true); + tableView.DeselectRow (indexPath, true); + } + + public override bool Matches (string text) + { + return (Value is not null ? Value.IndexOf (text, StringComparison.CurrentCultureIgnoreCase) != -1 : false) || base.Matches (text); + } + + /// + /// Makes this cell the first responder (get the focus) + /// + /// + /// Whether scrolling to the location of this cell should be animated + /// + public virtual void BecomeFirstResponder (bool animated) + { + becomeResponder = true; + var tv = GetContainerTableView (); + if (tv is null) + return; + tv.ScrollToRow (IndexPath, UITableViewScrollPosition.Middle, animated); + if (entry is not null) { + entry.BecomeFirstResponder (); + becomeResponder = false; + } + } + + public virtual void ResignFirstResponder (bool animated) + { + becomeResponder = false; + var tv = GetContainerTableView (); + if (tv is null) + return; + tv.ScrollToRow (IndexPath, UITableViewScrollPosition.Middle, animated); + if (entry is not null) + entry.ResignFirstResponder (); + } + } + + public partial class DateTimeElement : StringElement { + public DateTime DateValue; + // There's no UIDatePicker for tvOS, so this is a read-only element for now +#if !__TVOS__ + public UIDatePicker datePicker; +#endif + public int MinuteInterval = 1; +#pragma warning disable 67 // The event 'X' is never used + public event Action DateSelected; +#pragma warning restore 67 + public UIColor BackgroundColor = (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) ? UIColor.White : UIColor.Black; + + protected internal NSDateFormatter fmt = new NSDateFormatter () { + DateStyle = NSDateFormatterStyle.Short + }; + + public DateTimeElement (string caption, DateTime date) : base (caption) + { + DateValue = date; + Value = FormatDate (date); + } + + public override UITableViewCell GetCell (UITableView tv) + { + Value = FormatDate (DateValue); + var cell = base.GetCell (tv); + cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; + cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; + return cell; + } + + protected override void Dispose (bool disposing) + { + base.Dispose (disposing); + if (disposing) { + if (fmt is not null) { + fmt.Dispose (); + fmt = null; + } +#if !__TVOS__ + if (datePicker is not null) { + datePicker.Dispose (); + datePicker = null; + } +#endif // !__TVOS__ + } + } + + protected DateTime GetDateWithKind (DateTime dt) + { + if (dt.Kind == DateTimeKind.Unspecified) + return DateTime.SpecifyKind (dt, DateTimeKind.Local); + + return dt; + } + + public virtual string FormatDate (DateTime dt) + { + dt = GetDateWithKind (dt); + return fmt.ToString ((NSDate) dt) + " " + dt.ToLocalTime ().ToShortTimeString (); + } + +#if !__TVOS__ + public virtual UIDatePicker CreatePicker () + { + var picker = new UIDatePicker (CGRect.Empty) { + AutoresizingMask = UIViewAutoresizing.FlexibleMargins, + Mode = UIDatePickerMode.DateAndTime, + Date = (NSDate) GetDateWithKind (DateValue), + MinuteInterval = MinuteInterval + }; + return picker; + } + + class MyViewController : UIViewController { + DateTimeElement container; + + public MyViewController (DateTimeElement container) + { + this.container = container; + } + + public override void ViewWillDisappear (bool animated) + { + base.ViewWillDisappear (animated); + container.DateValue = (DateTime) container.datePicker.Date; + if (container.DateSelected is not null) + container.DateSelected (container); + } + + public override void DidRotate (UIInterfaceOrientation fromInterfaceOrientation) + { + base.DidRotate (fromInterfaceOrientation); + container.datePicker.Center = this.View.Center; + } + + public bool Autorotate { get; set; } + + public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) + { + return Autorotate; + } + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + var vc = new MyViewController (this) { + Autorotate = dvc.Autorotate + }; + datePicker = CreatePicker (); + + vc.View.BackgroundColor = BackgroundColor; + vc.View.AddSubview (datePicker); + dvc.ActivateController (vc); + + datePicker.Center = vc.View.Center; + } +#endif // !__TVOS__ + } + + public partial class DateElement : DateTimeElement { + public DateElement (string caption, DateTime date) : base (caption, date) + { + fmt.DateStyle = NSDateFormatterStyle.Medium; + } + + public override string FormatDate (DateTime dt) + { + return fmt.ToString ((NSDate) GetDateWithKind (dt)); + } + +#if !__TVOS__ + public override UIDatePicker CreatePicker () + { + var picker = base.CreatePicker (); + picker.Mode = UIDatePickerMode.Date; + return picker; + } +#endif // !__TVOS__ + } + + public partial class TimeElement : DateTimeElement { + public TimeElement (string caption, DateTime date) : base (caption, date) + { + } + + public override string FormatDate (DateTime dt) + { + return GetDateWithKind (dt).ToLocalTime ().ToShortTimeString (); + } + +#if !__TVOS__ + public override UIDatePicker CreatePicker () + { + var picker = base.CreatePicker (); + picker.Mode = UIDatePickerMode.Time; + picker.MinuteInterval = MinuteInterval; + return picker; + } +#endif // !__TVOS__ + } + + /// + /// This element can be used to insert an arbitrary UIView + /// + /// + /// There is no cell reuse here as we have a 1:1 mapping + /// in this case from the UIViewElement to the cell that + /// holds our view. + /// + public partial class UIViewElement : Element, IElementSizing { + static int count; + public UIView ContainerView; + NSString key; + protected UIView View; + public CellFlags Flags; + UIEdgeInsets insets; + + public UIEdgeInsets Insets { + get { + return insets; + } + set { + var viewFrame = View.Frame; + var dx = value.Left - insets.Left; + var dy = value.Top - insets.Top; + var ow = insets.Left + insets.Right; + var oh = insets.Top + insets.Bottom; + var w = value.Left + value.Right; + var h = value.Top + value.Bottom; + + ContainerView.Frame = new CGRect (0, 0, ContainerView.Frame.Width + w - ow, ContainerView.Frame.Height + h - oh); + viewFrame.X += dx; + viewFrame.Y += dy; + View.Frame = viewFrame; + + insets = value; + + // Height changed, notify UITableView + if (dy != 0 || h != oh) + GetContainerTableView ().ReloadData (); + + } + } + + [Flags] + public enum CellFlags { + Transparent = 1, + DisableSelection = 2 + } + + + /// + /// Constructor + /// + /// + /// The caption, only used for RootElements that might want to summarize results + /// + /// + /// The view to display + /// + /// + /// If this is set, then the view is responsible for painting the entire area, + /// otherwise the default cell paint code will be used. + /// + public UIViewElement (string caption, UIView view, bool transparent, UIEdgeInsets insets) : base (caption) + { + this.insets = insets; + var oframe = view.Frame; + var frame = oframe; + frame.Width += insets.Left + insets.Right; + frame.Height += insets.Top + insets.Bottom; + + ContainerView = new UIView (frame); + if ((Flags & CellFlags.Transparent) != 0) + ContainerView.BackgroundColor = UIColor.Clear; + + if (insets.Left != 0 || insets.Top != 0) + view.Frame = new CGRect (insets.Left + frame.X, insets.Top + frame.Y, frame.Width, frame.Height); + + ContainerView.AddSubview (view); + this.View = view; + this.Flags = transparent ? CellFlags.Transparent : 0; + key = new NSString ("UIViewElement" + count++); + } + + public UIViewElement (string caption, UIView view, bool transparent) : this (caption, view, transparent, UIEdgeInsets.Zero) + { + } + + protected override NSString CellKey { + get { + return key; + } + } + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (CellKey); + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey); + if ((Flags & CellFlags.Transparent) != 0) { + cell.BackgroundColor = UIColor.Clear; + + // + // This trick is necessary to keep the background clear, otherwise + // it gets painted as black + // + cell.BackgroundView = new UIView (CGRect.Empty) { + BackgroundColor = UIColor.Clear + }; + } + if ((Flags & CellFlags.DisableSelection) != 0) + cell.SelectionStyle = UITableViewCellSelectionStyle.None; + + if (Caption is not null) + cell.TextLabel.Text = Caption; + cell.ContentView.AddSubview (ContainerView); + } + return cell; + } + + public nfloat GetHeight (UITableView tableView, NSIndexPath indexPath) + { + return ContainerView.Bounds.Height + 1; + } + + protected override void Dispose (bool disposing) + { + base.Dispose (disposing); + if (disposing) { + if (View is not null) { + View.Dispose (); + View = null; + } + } + } + } + + /// + /// Sections contain individual Element instances that are rendered by MonoTouch.Dialog + /// + /// + /// Sections are used to group elements in the screen and they are the + /// only valid direct child of the RootElement. Sections can contain + /// any of the standard elements, including new RootElements. + /// + /// RootElements embedded in a section are used to navigate to a new + /// deeper level. + /// + /// You can assign a header and a footer either as strings (Header and Footer) + /// properties, or as UIViews to be shown (HeaderView and FooterView). Internally + /// this uses the same storage, so you can only show one or the other. + /// + public class Section : Element, IEnumerable { + object header, footer; + public List Elements = new List (); + + // X corresponds to the alignment, Y to the height of the password + public CGSize EntryAlignment; + + /// + /// Constructs a Section without header or footers. + /// + public Section () : base (null) { } + + /// + /// Constructs a Section with the specified header + /// + /// + /// The header to display + /// + public Section (string caption) : base (caption) + { + } + + /// + /// Constructs a Section with a header and a footer + /// + /// + /// The caption to display (or null to not display a caption) + /// + /// + /// The footer to display. + /// + public Section (string caption, string footer) : base (caption) + { + Footer = footer; + } + + public Section (UIView header) : base (null) + { + HeaderView = header; + } + + public Section (UIView header, UIView footer) : base (null) + { + HeaderView = header; + FooterView = footer; + } + + /// + /// The section header, as a string + /// + public string Header { + get { + return header as string; + } + set { + header = value; + } + } + + /// + /// The section footer, as a string. + /// + public string Footer { + get { + return footer as string; + } + + set { + footer = value; + } + } + + /// + /// The section's header view. + /// + public UIView HeaderView { + get { + return header as UIView; + } + set { + header = value; + } + } + + /// + /// The section's footer view. + /// + public UIView FooterView { + get { + return footer as UIView; + } + set { + footer = value; + } + } + + /// + /// Adds a new child Element to the Section + /// + /// + /// An element to add to the section. + /// + public void Add (Element element) + { + if (element is null) + return; + + Elements.Add (element); + element.Parent = this; + + if (Parent is not null) + InsertVisual (Elements.Count - 1, UITableViewRowAnimation.None, 1); + } + + /// + /// Adds a new child RootElement to the Section. This only exists to fix a compiler breakage when the mono 3.0 mcs is used. + /// + /// + /// An element to add to the section. + /// + public void Add (RootElement element) + { + Add ((Element) element); + } + + /// + /// Add version that can be used with LINQ + /// + /// + /// An enumerable list that can be produced by something like: + /// from x in ... select (Element) new MyElement (...) + /// + public int AddAll (IEnumerable elements) + { + int count = 0; + foreach (var e in elements) { + Add (e); + count++; + } + return count; + } + + /// + /// This method is being obsoleted, use AddAll to add an IEnumerable instead. + /// + [Obsolete ("Please use AddAll since this version will not work in future versions of MonoTouch when we introduce 4.0 covariance")] + public int Add (IEnumerable elements) + { + return AddAll (elements); + } + + /// + /// Use to add a UIView to a section, it makes the section opaque, to + /// get a transparent one, you must manually call UIViewElement + public void Add (UIView view) + { + if (view is null) + return; + Add (new UIViewElement (null, view, false)); + } + + /// + /// Adds the UIViews to the section. + /// + /// + /// An enumarable list that can be produced by something like: + /// from x in ... select (UIView) new UIFoo (); + /// + public void Add (IEnumerable views) + { + foreach (var v in views) + Add (v); + } + + /// + /// Inserts a series of elements into the Section using the specified animation + /// + /// + /// The index where the elements are inserted + /// + /// + /// The animation to use + /// + /// + /// A series of elements. + /// + public void Insert (int idx, UITableViewRowAnimation anim, params Element [] newElements) + { + if (newElements is null) + return; + + int pos = idx; + foreach (var e in newElements) { + Elements.Insert (pos++, e); + e.Parent = this; + } + var root = Parent as RootElement; + if (Parent is not null && root.TableView is not null) { + if (anim == UITableViewRowAnimation.None) + root.TableView.ReloadData (); + else + InsertVisual (idx, anim, newElements.Length); + } + } + + public int Insert (int idx, UITableViewRowAnimation anim, IEnumerable newElements) + { + if (newElements is null) + return 0; + + int pos = idx; + int count = 0; + foreach (var e in newElements) { + Elements.Insert (pos++, e); + e.Parent = this; + count++; + } + var root = Parent as RootElement; + if (root is not null && root.TableView is not null) { + if (anim == UITableViewRowAnimation.None) + root.TableView.ReloadData (); + else + InsertVisual (idx, anim, pos - idx); + } + return count; + } + + /// + /// Inserts a single RootElement into the Section using the specified animation + /// + /// + /// The index where the elements are inserted + /// + /// + /// The animation to use + /// + /// + /// A series of elements. + /// + public void Insert (int idx, UITableViewRowAnimation anim, RootElement newElement) + { + Insert (idx, anim, (Element) newElement); + } + + void InsertVisual (int idx, UITableViewRowAnimation anim, int count) + { + var root = Parent as RootElement; + + if (root is null || root.TableView is null) + return; + + int sidx = root.IndexOf (this); + var paths = new NSIndexPath [count]; + for (int i = 0; i < count; i++) + paths [i] = NSIndexPath.FromRowSection (idx + i, sidx); + + root.TableView.InsertRows (paths, anim); + } + + public void Insert (int index, params Element [] newElements) + { + Insert (index, UITableViewRowAnimation.None, newElements); + } + + public void Remove (Element e) + { + if (e is null) + return; + for (int i = Elements.Count; i > 0;) { + i--; + if (Elements [i] == e) { + RemoveRange (i, 1); + return; + } + } + } + + public void Remove (int idx) + { + RemoveRange (idx, 1); + } + + /// + /// Removes a range of elements from the Section + /// + /// + /// Starting position + /// + /// + /// Number of elements to remove from the section + /// + public void RemoveRange (int start, int count) + { + RemoveRange (start, count, UITableViewRowAnimation.Fade); + } + + /// + /// Remove a range of elements from the section with the given animation + /// + /// + /// Starting position + /// + /// + /// Number of elements to remove form the section + /// + /// + /// The animation to use while removing the elements + /// + public void RemoveRange (int start, int count, UITableViewRowAnimation anim) + { + if (start < 0 || start >= Elements.Count) + return; + if (count == 0) + return; + + var root = Parent as RootElement; + + if (start + count > Elements.Count) + count = Elements.Count - start; + + Elements.RemoveRange (start, count); + + if (root is null || root.TableView is null) + return; + + int sidx = root.IndexOf (this); + var paths = new NSIndexPath [count]; + for (int i = 0; i < count; i++) + paths [i] = NSIndexPath.FromRowSection (start + i, sidx); + root.TableView.DeleteRows (paths, anim); + } + + /// + /// Enumerator to get all the elements in the Section. + /// + /// + /// A + /// + public IEnumerator GetEnumerator () + { + foreach (var e in Elements) + yield return e; + } + + public int Count { + get { + return Elements.Count; + } + } + + public Element this [int idx] { + get { + return Elements [idx]; + } + } + + public void Clear () + { + if (Elements is not null) { + foreach (var e in Elements) + e.Dispose (); + } + Elements = new List (); + + var root = Parent as RootElement; + if (root is not null && root.TableView is not null) + root.TableView.ReloadData (); + } + + protected override void Dispose (bool disposing) + { + if (disposing) { + Parent = null; + Clear (); + Elements = null; + } + base.Dispose (disposing); + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = new UITableViewCell (UITableViewCellStyle.Default, ""); + cell.TextLabel.Text = "Section was used for Element"; + + return cell; + } + } + + /// + /// Used by root elements to fetch information when they need to + /// render a summary (Checkbox count or selected radio group). + /// + public class Group { + public string Key; + public Group (string key) + { + Key = key; + } + } + /// + /// Captures the information about mutually exclusive elements in a RootElement + /// + public class RadioGroup : Group { + int selected; + public virtual int Selected { + get { return selected; } + set { selected = value; } + } + + public RadioGroup (string key, int selected) : base (key) + { + this.selected = selected; + } + + public RadioGroup (int selected) : base (null) + { + this.selected = selected; + } + } + + /// + /// RootElements are responsible for showing a full configuration page. + /// + /// + /// At least one RootElement is required to start the MonoTouch.Dialogs + /// process. + /// + /// RootElements can also be used inside Sections to trigger + /// loading a new nested configuration page. When used in this mode + /// the caption provided is used while rendered inside a section and + /// is also used as the Title for the subpage. + /// + /// If a RootElement is initialized with a section/element value then + /// this value is used to locate a child Element that will provide + /// a summary of the configuration which is rendered on the right-side + /// of the display. + /// + /// RootElements are also used to coordinate radio elements. The + /// RadioElement members can span multiple Sections (for example to + /// implement something similar to the ring tone selector and separate + /// custom ring tones from system ringtones). + /// + /// Sections are added by calling the Add method which supports the + /// C# 4.0 syntax to initialize a RootElement in one pass. + /// + public partial class RootElement : Element, IEnumerable, IEnumerable
{ + static NSString rkey1 = new NSString ("RootElement1"); + static NSString rkey2 = new NSString ("RootElement2"); + int summarySection, summaryElement; + internal Group group; + public bool UnevenRows; + public Func createOnSelected; + public UITableView TableView; + + // This is used to indicate that we need the DVC to dispatch calls to + // WillDisplayCell so we can prepare the color of the cell before + // display + public bool NeedColorUpdate; + + /// + /// Initializes a RootSection with a caption + /// + /// + /// The caption to render. + /// + public RootElement (string caption) : base (caption) + { + summarySection = -1; + Sections = new List
(); + } + + /// + /// Initializes a RootSection with a caption and a callback that will + /// create the nested UIViewController that is activated when the user + /// taps on the element. + /// + /// + /// The caption to render. + /// + public RootElement (string caption, Func createOnSelected) : base (caption) + { + summarySection = -1; + this.createOnSelected = createOnSelected; + Sections = new List
(); + } + + /// + /// Initializes a RootElement with a caption with a summary fetched from the specified section and leement + /// + /// + /// The caption to render cref="System.String"/> + /// + /// + /// The section that contains the element with the summary. + /// + /// + /// The element index inside the section that contains the summary for this RootSection. + /// + public RootElement (string caption, int section, int element) : base (caption) + { + summarySection = section; + summaryElement = element; + } + + /// + /// Initializes a RootElement that renders the summary based on the radio settings of the contained elements. + /// + /// + /// The caption to ender + /// + /// + /// The group that contains the checkbox or radio information. This is used to display + /// the summary information when a RootElement is rendered inside a section. + /// + public RootElement (string caption, Group group) : base (caption) + { + this.group = group; + } + + internal List
Sections = new List
(); + + internal NSIndexPath PathForRadio (int idx) + { + RadioGroup radio = group as RadioGroup; + if (radio is null) + return null; + + uint current = 0, section = 0; + foreach (Section s in Sections) { + uint row = 0; + + foreach (Element e in s.Elements) { + if (!(e is RadioElement)) + continue; + + if (current == idx) { + return NSIndexPath.Create (section, row); + } + row++; + current++; + } + section++; + } + return null; + } + + public int Count { + get { + return Sections.Count; + } + } + + public Section this [int idx] { + get { + return Sections [idx]; + } + } + + internal int IndexOf (Section target) + { + int idx = 0; + foreach (Section s in Sections) { + if (s == target) + return idx; + idx++; + } + return -1; + } + + public void Prepare () + { + int current = 0; + foreach (Section s in Sections) { + foreach (Element e in s.Elements) { + var re = e as RadioElement; + if (re is not null) + re.RadioIdx = current++; + if (UnevenRows == false && e is IElementSizing) + UnevenRows = true; + if (NeedColorUpdate == false && e is IColorizeBackground) + NeedColorUpdate = true; + } + } + } + + /// + /// Adds a new section to this RootElement + /// + /// + /// The section to add, if the root is visible, the section is inserted with no animation + /// + public void Add (Section section) + { + if (section is null) + return; + + Sections.Add (section); + section.Parent = this; + if (TableView is null) + return; + + TableView.InsertSections (MakeIndexSet (Sections.Count - 1, 1), UITableViewRowAnimation.None); + } + + // + // This makes things LINQ friendly; You can now create RootElements + // with an embedded LINQ expression, like this: + // new RootElement ("Title") { + // from x in names + // select new Section (x) { new StringElement ("Sample") } + // + public void Add (IEnumerable
sections) + { + foreach (var s in sections) + Add (s); + } + + NSIndexSet MakeIndexSet (int start, int count) + { + NSRange range; + range.Location = start; + range.Length = count; + return NSIndexSet.FromNSRange (range); + } + + /// + /// Inserts a new section into the RootElement + /// + /// + /// The index where the section is added + /// + /// + /// The type. + /// + /// + /// A list of sections to insert + /// + /// + /// This inserts the specified list of sections (a params argument) into the + /// root using the specified animation. + /// + public void Insert (int idx, UITableViewRowAnimation anim, params Section [] newSections) + { + if (idx < 0 || idx > Sections.Count) + return; + if (newSections is null) + return; + + if (TableView is not null) + TableView.BeginUpdates (); + + int pos = idx; + foreach (var s in newSections) { + s.Parent = this; + Sections.Insert (pos++, s); + } + + if (TableView is null) + return; + + TableView.InsertSections (MakeIndexSet (idx, newSections.Length), anim); + TableView.EndUpdates (); + } + + /// + /// Inserts a new section into the RootElement + /// + /// + /// The index where the section is added + /// + /// + /// A list of sections to insert + /// + /// + /// This inserts the specified list of sections (a params argument) into the + /// root using the Fade animation. + /// + public void Insert (int idx, Section section) + { + Insert (idx, UITableViewRowAnimation.None, section); + } + + /// + /// Removes a section at a specified location + /// + public void RemoveAt (int idx) + { + RemoveAt (idx, UITableViewRowAnimation.Fade); + } + + /// + /// Removes a section at a specified location using the specified animation + /// + /// + /// A + /// + /// + /// A + /// + public void RemoveAt (int idx, UITableViewRowAnimation anim) + { + if (idx < 0 || idx >= Sections.Count) + return; + + Sections.RemoveAt (idx); + + if (TableView is null) + return; + + TableView.DeleteSections (NSIndexSet.FromIndex (idx), anim); + } + + public void Remove (Section s) + { + if (s is null) + return; + int idx = Sections.IndexOf (s); + if (idx == -1) + return; + RemoveAt (idx, UITableViewRowAnimation.Fade); + } + + public void Remove (Section s, UITableViewRowAnimation anim) + { + if (s is null) + return; + int idx = Sections.IndexOf (s); + if (idx == -1) + return; + RemoveAt (idx, anim); + } + + public void Clear () + { + foreach (var s in Sections) + s.Dispose (); + Sections = new List
(); + if (TableView is not null) + TableView.ReloadData (); + } + + protected override void Dispose (bool disposing) + { + if (disposing) { + if (Sections is null) + return; + + TableView = null; + Clear (); + Sections = null; + } + } + + /// + /// Enumerator that returns all the sections in the RootElement. + /// + /// + /// A + /// + IEnumerator IEnumerable.GetEnumerator () + { + foreach (var s in Sections) + yield return s; + } + + IEnumerator
IEnumerable
.GetEnumerator () + { + foreach (var s in Sections) + yield return s; + } + + /// + /// The currently selected Radio item in the whole Root. + /// + public int RadioSelected { + get { + var radio = group as RadioGroup; + if (radio is not null) + return radio.Selected; + return -1; + } + set { + var radio = group as RadioGroup; + if (radio is not null) + radio.Selected = value; + } + } + + public override UITableViewCell GetCell (UITableView tv) + { + NSString key = summarySection == -1 ? rkey1 : rkey2; + var cell = tv.DequeueReusableCell (key); + if (cell is null) { + var style = summarySection == -1 ? UITableViewCellStyle.Default : UITableViewCellStyle.Value1; + + cell = new UITableViewCell (style, key); + cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; + } + + cell.TextLabel.Text = Caption; + var radio = group as RadioGroup; + if (radio is not null) { + int selected = radio.Selected; + int current = 0; + + foreach (var s in Sections) { + foreach (var e in s.Elements) { + if (!(e is RadioElement)) + continue; + + if (current == selected) { + cell.DetailTextLabel.Text = e.Summary (); + goto le; + } + current++; + } + } + } else if (group is not null) { + int count = 0; + + foreach (var s in Sections) { + foreach (var e in s.Elements) { + var ce = e as CheckboxElement; + if (ce is not null) { + if (ce.Value) + count++; + continue; + } + var be = e as BoolElement; + if (be is not null) { + if (be.Value) + count++; + continue; + } + } + } + cell.DetailTextLabel.Text = count.ToString (); + } else if (summarySection != -1 && summarySection < Sections.Count) { + var s = Sections [summarySection]; + if (summaryElement < s.Elements.Count && cell.DetailTextLabel is not null) + cell.DetailTextLabel.Text = s.Elements [summaryElement].Summary (); + } + le: + cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; + + return cell; + } + + /// + /// This method does nothing by default, but gives a chance to subclasses to + /// customize the UIViewController before it is presented + /// + protected virtual void PrepareDialogViewController (UIViewController dvc) + { + } + + /// + /// Creates the UIViewController that will be pushed by this RootElement + /// + protected virtual UIViewController MakeViewController () + { + if (createOnSelected is not null) + return createOnSelected (this); + + return new DialogViewController (this, true) { + Autorotate = true + }; + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + tableView.DeselectRow (path, false); + var newDvc = MakeViewController (); + PrepareDialogViewController (newDvc); + dvc.ActivateController (newDvc); + } + + public void Reload (Section section, UITableViewRowAnimation animation) + { + if (section is null) + throw new ArgumentNullException ("section"); + if (section.Parent is null || section.Parent != this) + throw new ArgumentException ("Section is not attached to this root"); + + int idx = 0; + foreach (var sect in Sections) { + if (sect == section) { + TableView.ReloadSections (new NSIndexSet ((uint) idx), animation); + return; + } + idx++; + } + } + + public void Reload (Element element, UITableViewRowAnimation animation) + { + if (element is null) + throw new ArgumentNullException ("element"); + var section = element.Parent as Section; + if (section is null) + throw new ArgumentException ("Element is not attached to this root"); + var root = section.Parent as RootElement; + if (root is null) + throw new ArgumentException ("Element is not attached to this root"); + var path = element.IndexPath; + if (path is null) + return; + TableView.ReloadRows (new NSIndexPath [] { path }, animation); + } + + } +} diff --git a/tests/common/MonoTouch.Dialog/Elements/ActivityElement.cs b/tests/common/MonoTouch.Dialog/Elements/ActivityElement.cs new file mode 100644 index 000000000000..f9cfd0133a16 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Elements/ActivityElement.cs @@ -0,0 +1,67 @@ +using System; +using System.Drawing; + +using UIKit; +using CoreGraphics; +using Foundation; + +namespace MonoTouch.Dialog { + public class ActivityElement : Element { + public ActivityElement () : base ("") + { + } + + UIActivityIndicatorView indicator; + + public bool Animating { + get { + return indicator.IsAnimating; + } + set { + if (value) + indicator.StartAnimating (); + else + indicator.StopAnimating (); + } + } + + static NSString ikey = new NSString ("ActivityElement"); + + protected override NSString CellKey { + get { + return ikey; + } + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (CellKey); + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey); + } + + indicator = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.Gray); + var sbounds = tv.Frame; + var vbounds = indicator.Bounds; + + indicator.Frame = new CGRect ((sbounds.Width - vbounds.Width) / 2, 12, vbounds.Width, vbounds.Height); + indicator.StartAnimating (); + + cell.Add (indicator); + + return cell; + } + + protected override void Dispose (bool disposing) + { + if (disposing) { + if (indicator is not null) { + indicator.Dispose (); + indicator = null; + } + } + base.Dispose (disposing); + } + } +} + diff --git a/tests/common/MonoTouch.Dialog/Elements/ElementBadge.cs b/tests/common/MonoTouch.Dialog/Elements/ElementBadge.cs new file mode 100644 index 000000000000..acf1a26976b4 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Elements/ElementBadge.cs @@ -0,0 +1,156 @@ +// +// ElementBadge.cs: defines the Badge Element. +// +// Author: +// Miguel de Icaza (miguel@gnome.org) +// +// Copyright 2010, Novell, Inc. +// +// Code licensed under the MIT X11 license +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.Drawing; + +using UIKit; +using CoreGraphics; +using Foundation; +using ObjCRuntime; + +using NSAction = global::System.Action; + +namespace MonoTouch.Dialog { + /// + /// This element can be used to show an image with some text + /// + /// + /// The font can be configured after the element has been created + /// by assignign to the Font property; If you want to render + /// multiple lines of text, set the MultiLine property to true. + /// + /// If no font is specified, it will default to Helvetica 17. + /// + /// A static method MakeCalendarBadge is provided that can + /// render a calendar badge like the iPhone OS. It will compose + /// the text on top of the image which is expected to be 57x57 + /// + public partial class BadgeElement : Element, IElementSizing { + static NSString ckey = new NSString ("badgeKey"); + public event NSAction Tapped; + public UILineBreakMode LineBreakMode = UILineBreakMode.TailTruncation; + public UIViewContentMode ContentMode = UIViewContentMode.Left; + public int Lines = 1; + public UITableViewCellAccessory Accessory = UITableViewCellAccessory.None; + UIImage image; + UIFont font; + + public BadgeElement (UIImage badgeImage, string cellText) + : this (badgeImage, cellText, null) + { + } + + public BadgeElement (UIImage badgeImage, string cellText, NSAction tapped) : base (cellText) + { + if (badgeImage is null) + throw new ArgumentNullException ("badgeImage"); + + image = badgeImage; + if (tapped is not null) + Tapped += tapped; + } + + public UIFont Font { + get { + if (font is null) + font = UIFont.FromName ("Helvetica", 17f); + return font; + } + set { + if (font is not null) + font.Dispose (); + font = value; + } + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (ckey); + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, ckey) { + SelectionStyle = UITableViewCellSelectionStyle.Blue + }; + } + cell.Accessory = Accessory; + var tl = cell.TextLabel; + tl.Text = Caption; + tl.Font = Font; + tl.LineBreakMode = LineBreakMode; + tl.Lines = Lines; + tl.ContentMode = ContentMode; + + cell.ImageView.Image = image; + + return cell; + } + + protected override void Dispose (bool disposing) + { + base.Dispose (disposing); + } + + public nfloat GetHeight (UITableView tableView, NSIndexPath indexPath) + { + CGSize size = new CGSize (tableView.Bounds.Width - 40, nfloat.MaxValue); + nfloat height = Caption.StringSize (Font, size, LineBreakMode).Height + 10; + + // Image is 57 pixels tall, add some padding + return (nfloat) Math.Max (height, 63); + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + if (Tapped is not null) + Tapped (); + tableView.DeselectRow (path, true); + } + + public static UIImage MakeCalendarBadge (UIImage template, string smallText, string bigText) + { + using (var cs = CGColorSpace.CreateDeviceRGB ()) { + using (var context = new CGBitmapContext (IntPtr.Zero, 57, 57, 8, 57 * 4, cs, CGImageAlphaInfo.PremultipliedLast)) { + //context.ScaleCTM (0.5f, -1); + context.TranslateCTM (0, 0); + context.DrawImage (new CGRect (0, 0, 57, 57), template.CGImage); + context.SetFillColor (1, 1, 1, 1); + + context.SelectFont ("Helvetica", 10f, CGTextEncoding.MacRoman); + + // Pretty lame way of measuring strings, as documented: + var start = context.TextPosition.X; + context.SetTextDrawingMode (CGTextDrawingMode.Invisible); + context.ShowText (smallText); + var width = context.TextPosition.X - start; + + context.SetTextDrawingMode (CGTextDrawingMode.Fill); + context.ShowTextAtPoint ((57 - width) / 2, 46, smallText); + + // The big string + context.SelectFont ("Helvetica-Bold", 32, CGTextEncoding.MacRoman); + start = context.TextPosition.X; + context.SetTextDrawingMode (CGTextDrawingMode.Invisible); + context.ShowText (bigText); + width = context.TextPosition.X - start; + + context.SetFillColor (0, 0, 0, 1); + context.SetTextDrawingMode (CGTextDrawingMode.Fill); + context.ShowTextAtPoint ((57 - width) / 2, 9, bigText); + + context.StrokePath (); + + return UIImage.FromImage (context.ToImage ()); + } + } + } + } +} diff --git a/tests/common/MonoTouch.Dialog/Elements/Json.cs b/tests/common/MonoTouch.Dialog/Elements/Json.cs new file mode 100644 index 000000000000..f41fa6bd392f --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Elements/Json.cs @@ -0,0 +1,856 @@ +// +// Json.cs: MonoTouch.Dialog support for creating UIs from Json description files +// +// Author: +// Miguel de Icaza +// +// See the JSON.md file for documentation +// +// TODO: Json to load entire view controllers +// + +#if !NET // This code needs to be migrated to use System.Text.Json in .NET +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Json; +using System.Net; +using System.Reflection; + +using Foundation; +using UIKit; +using CoreGraphics; + +using NSAction = global::System.Action; + +namespace MonoTouch.Dialog { + + public class JsonElement : RootElement { + JsonElement jsonParent; + Dictionary map; + const int CSIZE = 16; + const int SPINNER_TAG = 1000; + public string Url; + bool loading; + + public static DateTimeKind DateKind { get; set; } = DateTimeKind.Unspecified; + + UIActivityIndicatorView StartSpinner (UITableViewCell cell) + { + var cvb = cell.ContentView.Bounds; + + var spinner = new UIActivityIndicatorView (new CGRect (cvb.Width - CSIZE / 2, (cvb.Height - CSIZE) / 2, CSIZE, CSIZE)) { + Tag = SPINNER_TAG, + ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray, + }; + cell.ContentView.AddSubview (spinner); + spinner.StartAnimating (); + cell.Accessory = UITableViewCellAccessory.None; + + return spinner; + } + + void RemoveSpinner (UITableViewCell cell, UIActivityIndicatorView spinner) + { + spinner.StopAnimating (); + spinner.RemoveFromSuperview (); + cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = base.GetCell (tv); + if (Url is null) + return cell; + + var spinner = cell.ViewWithTag (SPINNER_TAG) as UIActivityIndicatorView; + if (loading) { + if (spinner is null) + StartSpinner (cell); + else + if (spinner is not null) + RemoveSpinner (cell, spinner); + } + return cell; + } + +#if __UNIFIED__ + class ConnectionDelegate : NSUrlConnectionDataDelegate { +#else + class ConnectionDelegate : NSUrlConnectionDelegate { +#endif + Action callback; + NSMutableData buffer; + + public ConnectionDelegate (Action callback) + { + this.callback = callback; + buffer = new NSMutableData (); + } + + public override void ReceivedResponse (NSUrlConnection connection, NSUrlResponse response) + { + buffer.Length = 0; + } + + public override void FailedWithError (NSUrlConnection connection, NSError error) + { + callback (null, error); + } + + public override void ReceivedData (NSUrlConnection connection, NSData data) + { + buffer.AppendData (data); + } + + public override void FinishedLoading (NSUrlConnection connection) + { + callback (buffer.AsStream (), null); + } + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + if (Url is null) { + base.Selected (dvc, tableView, path); + return; + } + + tableView.DeselectRow (path, false); + if (loading) + return; + var cell = GetActiveCell (); + var spinner = StartSpinner (cell); + loading = true; + + var request = new NSUrlRequest (new NSUrl (Url), NSUrlRequestCachePolicy.UseProtocolCachePolicy, 60); + /*var connection = */ + new NSUrlConnection (request, new ConnectionDelegate ((data, error) => { + loading = false; + spinner.StopAnimating (); + spinner.RemoveFromSuperview (); + if (error is null) { + try { + var obj = JsonValue.Load (new StreamReader (data)) as JsonObject; + if (obj is not null) { + var root = JsonElement.FromJson (obj); + var newDvc = new DialogViewController (root, true) { + Autorotate = true + }; + PrepareDialogViewController (newDvc); + dvc.ActivateController (newDvc); + return; + } + } catch (Exception ee) { + Console.WriteLine (ee); + } + } + var alertController = UIAlertController.Create ("Error", "Unable to download data", UIAlertControllerStyle.Alert); + alertController.AddAction (UIAlertAction.Create ("Ok", UIAlertActionStyle.Default, (obj) => { })); + UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController (alertController, true, () => { }); + })); + } + + public JsonElement (string caption, string url) : base (caption) + { + Url = url; + } + + public JsonElement (string caption, int section, int element, string url) : base (caption, section, element) + { + Url = url; + } + + public JsonElement (string caption, Group group, string url) : base (caption, group) + { + Url = url; + } + + public static JsonElement FromFile (string file, object arg) + { + using (var reader = File.OpenRead (file)) + return FromJson (JsonObject.Load (reader) as JsonObject, arg); + } + + public static JsonElement FromFile (string file) + { + return FromFile (file, null); + } + + public static JsonElement FromJson (JsonObject json) + { + return FromJson (null, json, null); + } + + public static JsonElement FromJson (JsonObject json, object data) + { + return FromJson (null, json, data); + } + + public static JsonElement FromJson (JsonElement parent, JsonObject json, object data) + { + if (json is null) + return null; + + var title = GetString (json, "title") ?? ""; + + var group = GetString (json, "group"); + var url = GetString (json, "url"); + var radioSelected = GetString (json, "radioselected"); + JsonElement root; + if (group is null) { + if (radioSelected is null) + root = new JsonElement (title, url); + else + root = new JsonElement (title, new RadioGroup (int.Parse (radioSelected)), url); + } else { + if (radioSelected is null) + root = new JsonElement (title, new Group (group), url); + else { + // It does not seem that we group elements together, notice when I add + // the return, and then change my mind, I have to undo *twice* instead of once. + + root = new JsonElement (title, new RadioGroup (group, int.Parse (radioSelected)), url); + } + } + root.jsonParent = parent; + root.LoadSections (GetArray (json, "sections"), data); + return root; + } + + void AddMapping (string id, Element element) + { + if (jsonParent is not null) { + jsonParent.AddMapping (id, element); + return; + } + if (map is null) + map = new Dictionary (); + map.Add (id, element); + } + + // + // Retrieves the element name "key" + // + public Element this [string key] { + get { + if (jsonParent is not null) + return jsonParent [key]; + if (map is null) + return null; + Element res; + if (map.TryGetValue (key, out res)) + return res; + return null; + } + } + + static void Error (string msg) + { + Console.WriteLine (msg); + } + + static void Error (string fmt, params object [] args) + { + Error (String.Format (fmt, args)); + } + + static string GetString (JsonValue obj, string key) + { + if (obj.ContainsKey (key)) + if (obj [key].JsonType == JsonType.String) + return (string) obj [key]; + return null; + } + + static JsonArray GetArray (JsonObject obj, string key) + { + if (obj.ContainsKey (key)) + if (obj [key].JsonType == JsonType.Array) + return (JsonArray) obj [key]; + return null; + } + + static bool GetBoolean (JsonObject obj, string key) + { + try { + return (bool) obj [key]; + } catch { + return false; + } + } + + void LoadSections (JsonArray array, object data) + { + if (array is null) + return; + int n = array.Count; + for (int i = 0; i < n; i++) { + var jsonSection = array [i]; + var header = GetString (jsonSection, "header"); + var footer = GetString (jsonSection, "footer"); + var id = GetString (jsonSection, "id"); + + var section = new Section (header, footer); + if (jsonSection.ContainsKey ("elements")) + LoadSectionElements (section, jsonSection ["elements"] as JsonArray, data); + Add (section); + if (id is not null) + AddMapping (id, section); + } + } + + static string bundlePath; + + static string ExpandPath (string path) + { + if (path is not null && path.Length > 1 && path [0] == '~' && path [1] == '/') { + if (bundlePath is null) + bundlePath = NSBundle.MainBundle.BundlePath; + + return Path.Combine (bundlePath, path.Substring (2)); + } + return path; + } + + static Element LoadBoolean (JsonObject json) + { + var caption = GetString (json, "caption"); + bool bvalue = GetBoolean (json, "value"); + var group = GetString (json, "group"); + var onImagePath = ExpandPath (GetString (json, "on")); + var offImagePath = ExpandPath (GetString (json, "off")); + + if (onImagePath is not null && offImagePath is not null) { + var onImage = UIImage.FromFile (onImagePath); + var offImage = UIImage.FromFile (offImagePath); + + return new BooleanImageElement (caption, bvalue, onImage, offImage); + } else + return new BooleanElement (caption, bvalue, group); + } + + static UIKeyboardType ToKeyboardType (string kbdType) + { + switch (kbdType) { + case "numbers": return UIKeyboardType.NumberPad; + case "default": return UIKeyboardType.Default; + case "ascii": return UIKeyboardType.ASCIICapable; + case "numbers-and-punctuation": return UIKeyboardType.NumbersAndPunctuation; + case "decimal": return UIKeyboardType.DecimalPad; + case "email": return UIKeyboardType.EmailAddress; + case "name": return UIKeyboardType.NamePhonePad; + case "twitter": return UIKeyboardType.Twitter; + case "url": return UIKeyboardType.Url; + default: + Console.WriteLine ("Unknown keyboard type: {0}, valid values are numbers, default, ascii, numbers-and-punctuation, decimal, email, name, twitter and url", kbdType); + break; + } + return UIKeyboardType.Default; + } + + static UIReturnKeyType ToReturnKeyType (string returnKeyType) + { + switch (returnKeyType) { + case "default": return UIReturnKeyType.Default; + case "done": return UIReturnKeyType.Done; + case "emergencycall": return UIReturnKeyType.EmergencyCall; + case "go": return UIReturnKeyType.Go; + case "google": return UIReturnKeyType.Google; + case "join": return UIReturnKeyType.Join; + case "next": return UIReturnKeyType.Next; + case "route": return UIReturnKeyType.Route; + case "search": return UIReturnKeyType.Search; + case "send": return UIReturnKeyType.Send; + case "yahoo": return UIReturnKeyType.Yahoo; + default: + Console.WriteLine ("Unknown return key type `{0}', valid values are default, done, emergencycall, go, google, join, next, route, search, send and yahoo"); + break; + } + return UIReturnKeyType.Default; + } + + static UITextAutocapitalizationType ToAutocapitalization (string auto) + { + switch (auto) { + case "sentences": return UITextAutocapitalizationType.Sentences; + case "none": return UITextAutocapitalizationType.None; + case "words": return UITextAutocapitalizationType.Words; + case "all": return UITextAutocapitalizationType.AllCharacters; + default: + Console.WriteLine ("Unknown autocapitalization value: `{0}', allowed values are sentences, none, words and all"); + break; + } + return UITextAutocapitalizationType.Sentences; + } + + static UITextAutocorrectionType ToAutocorrect (JsonValue value) + { + if (value.JsonType == JsonType.Boolean) + return ((bool) value) ? UITextAutocorrectionType.Yes : UITextAutocorrectionType.No; + if (value.JsonType == JsonType.String) { + var s = ((string) value); + if (s == "yes") + return UITextAutocorrectionType.Yes; + return UITextAutocorrectionType.No; + } + return UITextAutocorrectionType.Default; + } + + static Element LoadEntry (JsonObject json, bool isPassword) + { + var caption = GetString (json, "caption"); + var value = GetString (json, "value"); + var placeholder = GetString (json, "placeholder"); + + var element = new EntryElement (caption, placeholder, value, isPassword); + + if (json.ContainsKey ("keyboard")) + element.KeyboardType = ToKeyboardType (GetString (json, "keyboard")); + if (json.ContainsKey ("return-key")) + element.ReturnKeyType = ToReturnKeyType (GetString (json, "return-key")); + if (json.ContainsKey ("capitalization")) + element.AutocapitalizationType = ToAutocapitalization (GetString (json, "capitalization")); + if (json.ContainsKey ("autocorrect")) + element.AutocorrectionType = ToAutocorrect (json ["autocorrect"]); + + return element; + } + + static UITableViewCellAccessory ToAccessory (string accesory) + { + switch (accesory) { + case "checkmark": return UITableViewCellAccessory.Checkmark; + case "detail-disclosure": return UITableViewCellAccessory.DetailDisclosureButton; + case "disclosure-indicator": return UITableViewCellAccessory.DisclosureIndicator; + } + return UITableViewCellAccessory.None; + } + + static int FromHex (char c) + { + if (c >= '0' && c <= '9') + return c - '0'; + if (c >= 'a' && c <= 'f') + return c - 'a' + 10; + if (c >= 'A' && c <= 'F') + return c - 'A' + 10; + Console.WriteLine ("Unexpected `{0}' in hex value for color", c); + return 0; + } + + static void ColorError (string text) + { + Console.WriteLine ("Unknown color specification {0}, expecting #rgb, #rgba, #rrggbb or #rrggbbaa formats", text); + } + + static UIColor ParseColor (string text) + { + int tl = text.Length; + + if (tl > 1 && text [0] == '#') { + int r, g, b, a; + + if (tl == 4 || tl == 5) { + r = FromHex (text [1]); + g = FromHex (text [2]); + b = FromHex (text [3]); + a = tl == 5 ? FromHex (text [4]) : 15; + + r = r << 4 | r; + g = g << 4 | g; + b = b << 4 | b; + a = a << 4 | a; + } else if (tl == 7 || tl == 9) { + r = FromHex (text [1]) << 4 | FromHex (text [2]); + g = FromHex (text [3]) << 4 | FromHex (text [4]); + b = FromHex (text [5]) << 4 | FromHex (text [6]); + a = tl == 9 ? FromHex (text [7]) << 4 | FromHex (text [8]) : 255; + } else { + ColorError (text); + return UIColor.Black; + } + return UIColor.FromRGBA (r, g, b, a); + } + ColorError (text); + return UIColor.Black; + } + + static UILineBreakMode ToLinebreakMode (string mode) + { + switch (mode) { + case "character-wrap": return UILineBreakMode.CharacterWrap; + case "clip": return UILineBreakMode.Clip; + case "head-truncation": return UILineBreakMode.HeadTruncation; + case "middle-truncation": return UILineBreakMode.MiddleTruncation; + case "tail-truncation": return UILineBreakMode.TailTruncation; + case "word-wrap": return UILineBreakMode.WordWrap; + default: + Console.WriteLine ("Unexpeted linebreak mode `{0}', valid values include: character-wrap, clip, head-truncation, middle-truncation, tail-truncation and word-wrap", mode); + return UILineBreakMode.Clip; + } + } + + // Parses a font in the format: + // Name[-SIZE] + // if -SIZE is omitted, then the value is SystemFontSize + // + static UIFont ToFont (string kvalue) + { + int q = kvalue.LastIndexOf ("-"); + string fname = kvalue; + nfloat fsize = 0; + + if (q != -1) { + nfloat.TryParse (kvalue.Substring (q + 1), out fsize); + fname = kvalue.Substring (0, q); + } + if (fsize <= 0) { +#if __TVOS__ + fsize = UIFont.SystemFontOfSize (12).PointSize; +#else + fsize = UIFont.SystemFontSize; +#endif // __TVOS__ + } + + var f = UIFont.FromName (fname, fsize); + if (f is null) + return UIFont.SystemFontOfSize (12); + return f; + } + + static UITableViewCellStyle ToCellStyle (string style) + { + switch (style) { + case "default": return UITableViewCellStyle.Default; + case "subtitle": return UITableViewCellStyle.Subtitle; + case "value1": return UITableViewCellStyle.Value1; + case "value2": return UITableViewCellStyle.Value2; + default: + Console.WriteLine ("unknown cell style `{0}', valid values are default, subtitle, value1 and value2", style); + break; + } + return UITableViewCellStyle.Default; + } + + static UITextAlignment ToAlignment (string align) + { + switch (align) { + case "center": return UITextAlignment.Center; + case "left": return UITextAlignment.Left; + case "right": return UITextAlignment.Right; + default: + Console.WriteLine ("Unknown alignment `{0}'. valid values are left, center, right", align); + return UITextAlignment.Left; + } + } + + // + // Creates one of the various StringElement classes, based on the + // properties set. It tries to load the most memory efficient one + // StringElement, if not, it fallsback to MultilineStringElement or + // StyledStringElement + // + static Element LoadString (JsonObject json, object data) + { + string value = null; + string caption = value; + string background = null; + NSAction ontap = null; + NSAction onaccessorytap = null; + int? lines = null; + UITableViewCellAccessory? accessory = null; + UILineBreakMode? linebreakmode = null; + UITextAlignment? alignment = null; + UIColor textcolor = null, detailcolor = null; + UIFont font = null; + UIFont detailfont = null; + UITableViewCellStyle style = UITableViewCellStyle.Value1; + + foreach (var kv in json) { + string kvalue = (string) kv.Value; + switch (kv.Key) { + case "caption": + caption = kvalue; + break; + case "value": + value = kvalue; + break; + case "background": + background = kvalue; + break; + case "style": + style = ToCellStyle (kvalue); + break; + case "ontap": + case "onaccessorytap": + string sontap = kvalue; + int p = sontap.LastIndexOf ('.'); + if (p == -1) + break; + NSAction d = delegate + { + string cname = sontap.Substring (0, p); + string mname = sontap.Substring (p + 1); + foreach (var a in AppDomain.CurrentDomain.GetAssemblies ()) { + Type type = a.GetType (cname); + + if (type is not null) { + var mi = type.GetMethod (mname, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); + if (mi is not null) + mi.Invoke (null, new object [] { data }); + break; + } + } + }; + if (kv.Key == "ontap") + ontap = d; + else + onaccessorytap = d; + break; + case "lines": + int res; + if (int.TryParse (kvalue, out res)) + lines = res; + break; + case "accessory": + accessory = ToAccessory (kvalue); + break; + case "textcolor": + textcolor = ParseColor (kvalue); + break; + case "linebreak": + linebreakmode = ToLinebreakMode (kvalue); + break; + case "font": + font = ToFont (kvalue); + break; + case "subtitle": + value = kvalue; + style = UITableViewCellStyle.Subtitle; + break; + case "detailfont": + detailfont = ToFont (kvalue); + break; + case "alignment": + alignment = ToAlignment (kvalue); + break; + case "detailcolor": + detailcolor = ParseColor (kvalue); + break; + case "type": + break; + default: + Console.WriteLine ("Unknown attribute: '{0}'", kv.Key); + break; + } + } + if (caption is null) + caption = ""; + if (font is not null || style != UITableViewCellStyle.Value1 || detailfont is not null || linebreakmode.HasValue || textcolor is not null || accessory.HasValue || onaccessorytap is not null || background is not null || detailcolor is not null) { + StyledStringElement styled; + + if (lines.HasValue) { + styled = new StyledMultilineElement (caption, value, style); + styled.Lines = lines.Value; + } else { + styled = new StyledStringElement (caption, value, style); + } + if (ontap is not null) + styled.Tapped += ontap; + if (onaccessorytap is not null) + styled.AccessoryTapped += onaccessorytap; + if (font is not null) + styled.Font = font; + if (detailfont is not null) + styled.SubtitleFont = detailfont; + if (detailcolor is not null) + styled.DetailColor = detailcolor; + if (textcolor is not null) + styled.TextColor = textcolor; + if (accessory.HasValue) + styled.Accessory = accessory.Value; + if (linebreakmode.HasValue) + styled.LineBreakMode = linebreakmode.Value; + if (background is not null) { + if (background.Length > 1 && background [0] == '#') + styled.BackgroundColor = ParseColor (background); + else + styled.BackgroundUri = new Uri (background); + } + if (alignment.HasValue) + styled.Alignment = alignment.Value; + return styled; + } else { + StringElement se; + if (lines == 0) + se = new MultilineElement (caption, value); + else + se = new StringElement (caption, value); + if (alignment.HasValue) + se.Alignment = alignment.Value; + if (ontap is not null) + se.Tapped += ontap; + return se; + } + } + + static Element LoadRadio (JsonObject json, object data) + { + var caption = GetString (json, "caption"); + var group = GetString (json, "group"); + + if (group is not null) + return new RadioElement (caption, group); + else + return new RadioElement (caption); + } + + static Element LoadCheckbox (JsonObject json, object data) + { + var caption = GetString (json, "caption"); + var group = GetString (json, "group"); + var value = GetBoolean (json, "value"); + + return new CheckboxElement (caption, value, group); + } + + static DateTime GetDateWithKind (DateTime dt, DateTimeKind parsedKind) + { + // First we check if the given date has a specified Kind, we just return the same date if found. + if (dt.Kind != DateTimeKind.Unspecified) + return dt; + + // If not found then we check if we were able to parse a DateTimeKind from the parsedKind param + else if (parsedKind != DateTimeKind.Unspecified) + return DateTime.SpecifyKind (dt, parsedKind); + + // If no DateTimeKind from the parsedKind param was found then we check our global property from JsonElement.DateKind + else if (JsonElement.DateKind != DateTimeKind.Unspecified) + return DateTime.SpecifyKind (dt, JsonElement.DateKind); + + // If none of the above is found then we just defaut to local + else + return DateTime.SpecifyKind (dt, DateTimeKind.Local); + } + + static Element LoadDateTime (JsonObject json, string type) + { + var caption = GetString (json, "caption"); + var date = GetString (json, "value"); + var kind = GetString (json, "kind"); + DateTime datetime; + DateTimeKind dateKind; + + if (!DateTime.TryParse (date, out datetime)) + return null; + + if (kind is not null) { + switch (kind.ToLowerInvariant ()) { + case "local": + dateKind = DateTimeKind.Local; + break; + case "utc": + dateKind = DateTimeKind.Utc; + break; + default: + dateKind = DateTimeKind.Unspecified; + break; + } + } else + dateKind = DateTimeKind.Unspecified; + + datetime = GetDateWithKind (datetime, dateKind); + + switch (type) { + case "date": + return new DateElement (caption, datetime); + case "time": + return new TimeElement (caption, datetime); + case "datetime": + return new DateTimeElement (caption, datetime); + default: + return null; + } + } + + static Element LoadHtmlElement (JsonObject json) + { + var caption = GetString (json, "caption"); + var url = GetString (json, "url"); + + return new HtmlElement (caption, url); + } + + void LoadSectionElements (Section section, JsonArray array, object data) + { + if (array is null) + return; + + for (int i = 0; i < array.Count; i++) { + Element element = null; + + try { + var json = array [i] as JsonObject; + if (json is null) + continue; + + var type = GetString (json, "type"); + switch (type) { + case "bool": + case "boolean": + element = LoadBoolean (json); + break; + + case "entry": + case "password": + element = LoadEntry (json, type == "password"); + break; + + case "string": + element = LoadString (json, data); + break; + + case "root": + element = FromJson (this, json, data); + break; + + case "radio": + element = LoadRadio (json, data); + break; + + case "checkbox": + element = LoadCheckbox (json, data); + break; + + case "datetime": + case "date": + case "time": + element = LoadDateTime (json, type); + break; + + case "html": + element = LoadHtmlElement (json); + break; + + default: + Error ("json element at {0} contain an unknown type `{1}', json {2}", i, type, json); + break; + } + + if (element is not null) { + var id = GetString (json, "id"); + if (id is not null) + AddMapping (id, element); + } + } catch (Exception e) { + Console.WriteLine ("Error processing Json {0}, exception {1}", array, e); + } + if (element is not null) + section.Add (element); + } + } + } +} +#endif // !NET diff --git a/tests/common/MonoTouch.Dialog/Elements/MessageElement.cs b/tests/common/MonoTouch.Dialog/Elements/MessageElement.cs new file mode 100644 index 000000000000..c17e9f242818 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Elements/MessageElement.cs @@ -0,0 +1,192 @@ +using System; +using System.Drawing; + +using UIKit; +using Foundation; +using CoreGraphics; +using ObjCRuntime; + +namespace MonoTouch.Dialog { + + public partial class MessageSummaryView : UIView { + static UIFont SenderFont = UIFont.BoldSystemFontOfSize (19); + static UIFont SubjectFont = UIFont.SystemFontOfSize (14); + static UIFont TextFont = UIFont.SystemFontOfSize (13); + static UIFont CountFont = UIFont.BoldSystemFontOfSize (13); + public string Sender { get; private set; } + public string Body { get; private set; } + public string Subject { get; private set; } + public DateTime Date { get; private set; } + public bool NewFlag { get; private set; } + public int MessageCount { get; private set; } + + static CGGradient gradient; + + static MessageSummaryView () + { + using (var colorspace = CGColorSpace.CreateDeviceRGB ()) { + gradient = new CGGradient (colorspace, new nfloat [] { /* first */ .52f, .69f, .96f, 1, /* second */ .12f, .31f, .67f, 1 }, null); //new float [] { 0, 1 }); + } + } + + public MessageSummaryView () + { + BackgroundColor = UIColor.White; + } + + public void Update (string sender, string body, string subject, DateTime date, bool newFlag, int messageCount) + { + Sender = sender; + Body = body; + Subject = subject; + Date = date; + NewFlag = newFlag; + MessageCount = messageCount; + SetNeedsDisplay (); + } + + public override void Draw (CGRect rect) + { + const int padright = 21; + var ctx = UIGraphics.GetCurrentContext (); + nfloat boxWidth; + CGSize ssize; + + if (MessageCount > 0) { + var ms = MessageCount.ToString (); + ssize = ms.StringSize (CountFont); + boxWidth = (nfloat) Math.Min (22 + ssize.Width, 18); + var crect = new CGRect (Bounds.Width - 20 - boxWidth, 32, boxWidth, 16); + + UIColor.Gray.SetFill (); + GraphicsUtil.FillRoundedRect (ctx, crect, 3); + UIColor.White.SetColor (); + crect.X += 5; + ms.DrawString (crect, CountFont); + + boxWidth += padright; + } else + boxWidth = 0; + + UIColor.FromRGB (36, 112, 216).SetColor (); + var diff = DateTime.Now - Date; + var now = DateTime.Now; + string label; + if (now.Day == Date.Day && now.Month == Date.Month && now.Year == Date.Year) + label = Date.ToShortTimeString (); + else if (diff <= TimeSpan.FromHours (24)) + label = "Yesterday".GetText (); + else if (diff < TimeSpan.FromDays (6)) + label = Date.ToString ("dddd"); + else + label = Date.ToShortDateString (); + ssize = label.StringSize (SubjectFont); + nfloat dateSize = ssize.Width + padright + 5; + label.DrawString (new CGRect (Bounds.Width - dateSize, 6, dateSize, 14), SubjectFont, UILineBreakMode.Clip, UITextAlignment.Left); + + const int offset = 33; + nfloat bw = Bounds.Width - offset; + + UIColor.Black.SetColor (); + Sender.DrawString (new CGPoint (offset, 2), (float) (bw - dateSize), SenderFont, UILineBreakMode.TailTruncation); + Subject.DrawString (new CGPoint (offset, 23), (float) (bw - offset - boxWidth), SubjectFont, UILineBreakMode.TailTruncation); + + //UIColor.Black.SetFill (); + //ctx.FillRect (new CGRect (offset, 40, bw-boxWidth, 34)); + UIColor.Gray.SetColor (); + Body.DrawString (new CGRect (offset, 40, bw - boxWidth, 34), TextFont, UILineBreakMode.TailTruncation, UITextAlignment.Left); + + if (NewFlag) { + ctx.SaveState (); + ctx.AddEllipseInRect (new CGRect (10, 32, 12, 12)); + ctx.Clip (); + ctx.DrawLinearGradient (gradient, new CGPoint (10, 32), new CGPoint (22, 44), CGGradientDrawingOptions.DrawsAfterEndLocation); + ctx.RestoreState (); + } + +#if WANT_SHADOWS + ctx.SaveState (); + UIColor.FromRGB (78, 122, 198).SetStroke (); + ctx.SetShadow (new CGSize (1, 1), 3); + ctx.StrokeEllipseInRect (new CGRect (10, 32, 12, 12)); + ctx.RestoreState (); +#endif + } + } + + public class MessageElement : Element, IElementSizing { + static NSString mKey = new NSString ("MessageElement"); + + public string Sender, Body, Subject; + public DateTime Date; + public bool NewFlag; + public int MessageCount; + + class MessageCell : UITableViewCell { + MessageSummaryView view; + + public MessageCell () : base (UITableViewCellStyle.Default, mKey) + { + view = new MessageSummaryView (); + ContentView.Add (view); + Accessory = UITableViewCellAccessory.DisclosureIndicator; + } + + public void Update (MessageElement me) + { + view.Update (me.Sender, me.Body, me.Subject, me.Date, me.NewFlag, me.MessageCount); + } + + public override void LayoutSubviews () + { + base.LayoutSubviews (); + view.Frame = ContentView.Bounds; + view.SetNeedsDisplay (); + } + } + + public MessageElement () : base ("") + { + } + + public MessageElement (Action tapped) : base ("") + { + Tapped += tapped; + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (mKey) as MessageCell; + if (cell is null) + cell = new MessageCell (); + cell.Update (this); + return cell; + } + + public nfloat GetHeight (UITableView tableView, NSIndexPath indexPath) + { + return 78; + } + + public event Action Tapped; + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + if (Tapped is not null) + Tapped (dvc, tableView, path); + } + + public override bool Matches (string text) + { + if (Sender is not null && Sender.IndexOf (text, StringComparison.CurrentCultureIgnoreCase) != -1) + return true; + if (Body is not null && Body.IndexOf (text, StringComparison.CurrentCultureIgnoreCase) != -1) + return true; + if (Subject is not null && Subject.IndexOf (text, StringComparison.CurrentCultureIgnoreCase) != -1) + return true; + + return false; + } + } +} + diff --git a/tests/common/MonoTouch.Dialog/Elements/OwnerDrawnElement.cs b/tests/common/MonoTouch.Dialog/Elements/OwnerDrawnElement.cs new file mode 100644 index 000000000000..fdbdb37726ac --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Elements/OwnerDrawnElement.cs @@ -0,0 +1,117 @@ +using System; +using System.Drawing; + +using UIKit; +using CoreFoundation; +using CoreGraphics; +using Foundation; +using ObjCRuntime; + +namespace MonoTouch.Dialog { + public abstract partial class OwnerDrawnElement : Element, IElementSizing { + public string CellReuseIdentifier { + get; set; + } + + public UITableViewCellStyle Style { + get; set; + } + + public OwnerDrawnElement (UITableViewCellStyle style, string cellIdentifier) : base (null) + { + this.CellReuseIdentifier = cellIdentifier; + this.Style = style; + } + + public nfloat GetHeight (UITableView tableView, NSIndexPath indexPath) + { + return Height (tableView.Bounds); + } + + public override UITableViewCell GetCell (UITableView tv) + { + OwnerDrawnCell cell = tv.DequeueReusableCell (this.CellReuseIdentifier) as OwnerDrawnCell; + + if (cell is null) { + cell = new OwnerDrawnCell (this, this.Style, this.CellReuseIdentifier); + } else { + cell.Element = this; + } + + cell.Update (); + return cell; + } + + public abstract void Draw (CGRect bounds, CGContext context, UIView view); + + public abstract nfloat Height (CGRect bounds); + + class OwnerDrawnCell : UITableViewCell { + OwnerDrawnCellView view; + + public OwnerDrawnCell (OwnerDrawnElement element, UITableViewCellStyle style, string cellReuseIdentifier) : base (style, cellReuseIdentifier) + { + Element = element; + } + + public OwnerDrawnElement Element { + get { + return view.Element; + } + set { + if (view is null) { + view = new OwnerDrawnCellView (value); + ContentView.Add (view); + } else { + view.Element = value; + } + } + } + + + + public void Update () + { + SetNeedsDisplay (); + view.SetNeedsDisplay (); + } + + public override void LayoutSubviews () + { + base.LayoutSubviews (); + + view.Frame = ContentView.Bounds; + } + } + + class OwnerDrawnCellView : UIView { + OwnerDrawnElement element; + + public OwnerDrawnCellView (OwnerDrawnElement element) + { + this.element = element; + } + + + public OwnerDrawnElement Element { + get { return element; } + set { + element = value; + } + } + + public void Update () + { + SetNeedsDisplay (); + + } + + public override void Draw (CGRect rect) + { + CGContext context = UIGraphics.GetCurrentContext (); + element.Draw (rect, context, this); + } + } + } +} + diff --git a/tests/common/MonoTouch.Dialog/LICENSE b/tests/common/MonoTouch.Dialog/LICENSE new file mode 100644 index 000000000000..3d72420ee9c5 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/LICENSE @@ -0,0 +1,24 @@ +*** +*** The following license applies only to the files in the directory it resides and any files in subfolders of the directory +*** + +Copyright (C) 2010-2013 Miguel de Icaza + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.MacCatalyst.csproj b/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.MacCatalyst.csproj new file mode 100644 index 000000000000..e853d241adfc --- /dev/null +++ b/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.MacCatalyst.csproj @@ -0,0 +1,11 @@ + + + + net$(BundledNETCoreAppTargetFrameworkVersion)-maccatalyst + + + + + + + diff --git a/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.iOS.csproj b/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.iOS.csproj new file mode 100644 index 000000000000..79d4ead5d26e --- /dev/null +++ b/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.iOS.csproj @@ -0,0 +1,11 @@ + + + + net$(BundledNETCoreAppTargetFrameworkVersion)-ios + + + + + + + diff --git a/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.tvOS.csproj b/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.tvOS.csproj new file mode 100644 index 000000000000..3454421eef33 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.tvOS.csproj @@ -0,0 +1,11 @@ + + + + net$(BundledNETCoreAppTargetFrameworkVersion)-tvos + + + + + + + diff --git a/tests/common/MonoTouch.Dialog/OldElements/LoadMoreElement.cs b/tests/common/MonoTouch.Dialog/OldElements/LoadMoreElement.cs new file mode 100644 index 000000000000..59730f5cb7ec --- /dev/null +++ b/tests/common/MonoTouch.Dialog/OldElements/LoadMoreElement.cs @@ -0,0 +1,162 @@ +// +// This cell does not perform cell recycling, do not use as +// sample code for new elements. +// +using System; +using System.Drawing; +using System.Threading; + +using CoreFoundation; +using Foundation; +using UIKit; +using CoreGraphics; +using ObjCRuntime; + +namespace MonoTouch.Dialog { + public partial class LoadMoreElement : Element, IElementSizing { + static NSString key = new NSString ("LoadMoreElement"); + public string NormalCaption { get; set; } + public string LoadingCaption { get; set; } + public UIColor TextColor { get; set; } + public UIColor BackgroundColor { get; set; } + public event Action Tapped = null; + public UIFont Font; + public float? Height; + UITextAlignment alignment = UITextAlignment.Center; + bool animating; + + public LoadMoreElement () : base ("") + { + } + + public LoadMoreElement (string normalCaption, string loadingCaption, Action tapped) : this (normalCaption, loadingCaption, tapped, UIFont.BoldSystemFontOfSize (16), UIColor.Black) + { + } + + public LoadMoreElement (string normalCaption, string loadingCaption, Action tapped, UIFont font, UIColor textColor) : base ("") + { + NormalCaption = normalCaption; + LoadingCaption = loadingCaption; + Tapped += tapped; + Font = font; + TextColor = textColor; + } + + public override UITableViewCell GetCell (UITableView tv) + { + var cell = tv.DequeueReusableCell (key); + UIActivityIndicatorView activityIndicator; + UILabel caption; + + if (cell is null) { + cell = new UITableViewCell (UITableViewCellStyle.Default, key); + + activityIndicator = new UIActivityIndicatorView () { + ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray, + Tag = 1 + }; + caption = new UILabel () { + AdjustsFontSizeToFitWidth = false, + AutoresizingMask = UIViewAutoresizing.FlexibleWidth, + Tag = 2 + }; + cell.ContentView.AddSubview (caption); + cell.ContentView.AddSubview (activityIndicator); + } else { + activityIndicator = cell.ContentView.ViewWithTag (1) as UIActivityIndicatorView; + caption = cell.ContentView.ViewWithTag (2) as UILabel; + } + if (Animating) { + caption.Text = LoadingCaption; + activityIndicator.Hidden = false; + activityIndicator.StartAnimating (); + } else { + caption.Text = NormalCaption; + activityIndicator.Hidden = true; + activityIndicator.StopAnimating (); + } + if (BackgroundColor is not null) { + cell.ContentView.BackgroundColor = BackgroundColor ?? UIColor.Clear; + } else { + cell.ContentView.BackgroundColor = null; + } + caption.BackgroundColor = UIColor.Clear; + caption.TextColor = TextColor ?? UIColor.Black; + caption.Font = Font ?? UIFont.BoldSystemFontOfSize (16); + caption.TextAlignment = Alignment; + Layout (cell, activityIndicator, caption); + return cell; + } + + public bool Animating { + get { + return animating; + } + set { + if (animating == value) + return; + animating = value; + var cell = GetActiveCell (); + if (cell is null) + return; + var activityIndicator = cell.ContentView.ViewWithTag (1) as UIActivityIndicatorView; + var caption = cell.ContentView.ViewWithTag (2) as UILabel; + if (value) { + caption.Text = LoadingCaption; + activityIndicator.Hidden = false; + activityIndicator.StartAnimating (); + } else { + activityIndicator.StopAnimating (); + activityIndicator.Hidden = true; + caption.Text = NormalCaption; + } + Layout (cell, activityIndicator, caption); + } + } + + public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path) + { + tableView.DeselectRow (path, true); + + if (Animating) + return; + + if (Tapped is not null) { + Animating = true; + Tapped (this); + } + } + + CGSize GetTextSize (string text) + { + return new NSString (text).StringSize (Font, (float) UIScreen.MainScreen.Bounds.Width, UILineBreakMode.TailTruncation); + } + + const int pad = 10; + const int isize = 20; + + public nfloat GetHeight (UITableView tableView, NSIndexPath indexPath) + { + return Height ?? GetTextSize (Animating ? LoadingCaption : NormalCaption).Height + 2 * pad; + } + + void Layout (UITableViewCell cell, UIActivityIndicatorView activityIndicator, UILabel caption) + { + var sbounds = cell.ContentView.Bounds; + + var size = GetTextSize (Animating ? LoadingCaption : NormalCaption); + + if (!activityIndicator.Hidden) + activityIndicator.Frame = new CGRect ((sbounds.Width - size.Width) / 2 - isize * 2, pad, isize, isize); + + caption.Frame = new CGRect (10, pad, sbounds.Width - 20, size.Height); + } + + public UITextAlignment Alignment { + get { return alignment; } + set { alignment = value; } + } + public UITableViewCellAccessory Accessory { get; set; } + } +} + diff --git a/tests/common/MonoTouch.Dialog/Reflect.cs b/tests/common/MonoTouch.Dialog/Reflect.cs new file mode 100644 index 000000000000..cd1c335a2a3d --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Reflect.cs @@ -0,0 +1,471 @@ +// +// Reflect.cs: Creates Element classes from an instance +// +// Author: +// Miguel de Icaza (miguel@gnome.org) +// +// Copyright 2010, Novell, Inc. +// +// Code licensed under the MIT X11 license +// + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using System.Drawing; + +using UIKit; +using Foundation; + +using NSAction = global::System.Action; + +namespace MonoTouch.Dialog { + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class EntryAttribute : Attribute { + public EntryAttribute () : this (null) { } + + public EntryAttribute (string placeholder) + { + Placeholder = placeholder; + } + + public string Placeholder; + public UIKeyboardType KeyboardType; + public UITextAutocorrectionType AutocorrectionType; + public UITextAutocapitalizationType AutocapitalizationType; + public UITextFieldViewMode ClearButtonMode; + } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class DateAttribute : Attribute { } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class TimeAttribute : Attribute { } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class CheckboxAttribute : Attribute { } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class MultilineAttribute : Attribute { } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class HtmlAttribute : Attribute { } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class SkipAttribute : Attribute { } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class PasswordAttribute : EntryAttribute { + public PasswordAttribute (string placeholder) : base (placeholder) { } + } + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class AlignmentAttribute : Attribute { + public AlignmentAttribute (UITextAlignment alignment) + { + Alignment = alignment; + } + public UITextAlignment Alignment; + } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class RadioSelectionAttribute : Attribute { + public string Target; + public RadioSelectionAttribute (string target) + { + Target = target; + } + } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class OnTapAttribute : Attribute { + public OnTapAttribute (string method) + { + Method = method; + } + public string Method; + } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class CaptionAttribute : Attribute { + public CaptionAttribute (string caption) + { + Caption = caption; + } + public string Caption; + } + + [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] + public class SectionAttribute : Attribute { + public SectionAttribute () { } + + public SectionAttribute (string caption) + { + Caption = caption; + } + + public SectionAttribute (string caption, string footer) + { + Caption = caption; + Footer = footer; + } + public string Caption, Footer; + } + + public class RangeAttribute : Attribute { + public RangeAttribute (float low, float high) + { + Low = low; + High = high; + } + public float Low, High; + public bool ShowCaption; + } + + public class BindingContext : IDisposable { + public RootElement Root; + Dictionary mappings; + Dictionary handlerMappings; + + class MemberAndInstance { + public MemberAndInstance (MemberInfo mi, object o) + { + Member = mi; + Obj = o; + } + public MemberInfo Member; + public object Obj; + } + + static object GetValue (MemberInfo mi, object o) + { + var fi = mi as FieldInfo; + if (fi is not null) + return fi.GetValue (o); + var pi = mi as PropertyInfo; + + var getMethod = pi.GetGetMethod (); + return getMethod.Invoke (o, new object [0]); + } + + static void SetValue (MemberInfo mi, object o, object val) + { + var fi = mi as FieldInfo; + if (fi is not null) { + fi.SetValue (o, val); + return; + } + var pi = mi as PropertyInfo; + var setMethod = pi.GetSetMethod (); + setMethod.Invoke (o, new object [] { val }); + } + + static string MakeCaption (string name) + { + var sb = new StringBuilder (name.Length); + bool nextUp = true; + + foreach (char c in name) { + if (nextUp) { + sb.Append (Char.ToUpper (c)); + nextUp = false; + } else { + if (c == '_') { + sb.Append (' '); + continue; + } + if (Char.IsUpper (c)) + sb.Append (' '); + sb.Append (c); + } + } + return sb.ToString (); + } + + // Returns the type for fields and properties and null for everything else + static Type GetTypeForMember (MemberInfo mi) + { + if (mi is FieldInfo) + return ((FieldInfo) mi).FieldType; + else if (mi is PropertyInfo) + return ((PropertyInfo) mi).PropertyType; + return null; + } + + public BindingContext (object callbacks, object o, string title) + { + if (o is null) + throw new ArgumentNullException ("o"); + + mappings = new Dictionary (); + handlerMappings = new Dictionary (); + + Root = new RootElement (title); + Populate (callbacks, o, Root); + } + + void Populate (object callbacks, object o, RootElement root) + { + MemberInfo last_radio_index = null; + var members = o.GetType ().GetMembers (BindingFlags.DeclaredOnly | BindingFlags.Public | + BindingFlags.NonPublic | BindingFlags.Instance); + + Section section = null; + + foreach (var mi in members) { + Type mType = GetTypeForMember (mi); + + if (mType is null) + continue; + + string caption = null; + object [] attrs = mi.GetCustomAttributes (false); + bool skip = false; + foreach (var attr in attrs) { + if (attr is SkipAttribute || attr is System.Runtime.CompilerServices.CompilerGeneratedAttribute) + skip = true; + else if (attr is CaptionAttribute) + caption = ((CaptionAttribute) attr).Caption; + else if (attr is SectionAttribute) { + if (section is not null) + root.Add (section); + var sa = attr as SectionAttribute; + section = new Section (sa.Caption, sa.Footer); + } + } + if (skip) + continue; + + if (caption is null) + caption = MakeCaption (mi.Name); + + if (section is null) + section = new Section (); + + Element element = null; + if (mType == typeof (string)) { + PasswordAttribute pa = null; + AlignmentAttribute align = null; + EntryAttribute ea = null; + object html = null; + NSAction invoke = null; + bool multi = false; + + foreach (object attr in attrs) { + if (attr is PasswordAttribute) + pa = attr as PasswordAttribute; + else if (attr is EntryAttribute) + ea = attr as EntryAttribute; + else if (attr is MultilineAttribute) + multi = true; + else if (attr is HtmlAttribute) + html = attr; + else if (attr is AlignmentAttribute) + align = attr as AlignmentAttribute; + + if (attr is OnTapAttribute) { + string mname = ((OnTapAttribute) attr).Method; + + if (callbacks is null) { + throw new Exception ("Your class contains [OnTap] attributes, but you passed a null object for `context' in the constructor"); + } + + var method = callbacks.GetType ().GetMethod (mname); + if (method is null) + throw new Exception ("Did not find method " + mname); + invoke = delegate + { + method.Invoke (method.IsStatic ? null : callbacks, new object [0]); + }; + } + } + + string value = (string) GetValue (mi, o); + if (pa is not null) + element = new EntryElement (caption, pa.Placeholder, value, true); + else if (ea is not null) + element = new EntryElement (caption, ea.Placeholder, value) { KeyboardType = ea.KeyboardType, AutocapitalizationType = ea.AutocapitalizationType, AutocorrectionType = ea.AutocorrectionType, ClearButtonMode = ea.ClearButtonMode }; + else if (multi) + element = new MultilineElement (caption, value); + else if (html is not null) + element = new HtmlElement (caption, value); + else { + var selement = new StringElement (caption, value); + element = selement; + + if (align is not null) + selement.Alignment = align.Alignment; + } + + if (invoke is not null) { + var strElement = (StringElement) element; + strElement.Tapped += invoke; + handlerMappings.Add (strElement, invoke); + } + } else if (mType == typeof (float)) { + var floatElement = new FloatElement (null, null, (float) GetValue (mi, o)); + floatElement.Caption = caption; + element = floatElement; + + foreach (object attr in attrs) { + if (attr is RangeAttribute) { + var ra = attr as RangeAttribute; + floatElement.MinValue = ra.Low; + floatElement.MaxValue = ra.High; + floatElement.ShowCaption = ra.ShowCaption; + } + } + } else if (mType == typeof (bool)) { + bool checkbox = false; + foreach (object attr in attrs) { + if (attr is CheckboxAttribute) + checkbox = true; + } + + if (checkbox) + element = new CheckboxElement (caption, (bool) GetValue (mi, o)); + else + element = new BooleanElement (caption, (bool) GetValue (mi, o)); + } else if (mType == typeof (DateTime)) { + var dateTime = (DateTime) GetValue (mi, o); + bool asDate = false, asTime = false; + + foreach (object attr in attrs) { + if (attr is DateAttribute) + asDate = true; + else if (attr is TimeAttribute) + asTime = true; + } + + if (asDate) + element = new DateElement (caption, dateTime); + else if (asTime) + element = new TimeElement (caption, dateTime); + else + element = new DateTimeElement (caption, dateTime); + } else if (mType.IsEnum) { + var csection = new Section (); + ulong evalue = Convert.ToUInt64 (GetValue (mi, o), null); + int idx = 0; + int selected = 0; + + foreach (var fi in mType.GetFields (BindingFlags.Public | BindingFlags.Static)) { + ulong v = Convert.ToUInt64 (GetValue (fi, null)); + + if (v == evalue) + selected = idx; + + CaptionAttribute ca = Attribute.GetCustomAttribute (fi, typeof (CaptionAttribute)) as CaptionAttribute; + csection.Add (new RadioElement (ca is not null ? ca.Caption : MakeCaption (fi.Name))); + idx++; + } + + element = new RootElement (caption, new RadioGroup (null, selected)) { csection }; + } else if (mType == typeof (UIImage)) { + element = new ImageElement ((UIImage) GetValue (mi, o)); + } else if (typeof (System.Collections.IEnumerable).IsAssignableFrom (mType)) { + var csection = new Section (); + int count = 0; + + if (last_radio_index is null) + throw new Exception ("IEnumerable found, but no previous int found"); + foreach (var e in (IEnumerable) GetValue (mi, o)) { + csection.Add (new RadioElement (e.ToString ())); + count++; + } + int selected = (int) GetValue (last_radio_index, o); + if (selected >= count || selected < 0) + selected = 0; + element = new RootElement (caption, new MemberRadioGroup (null, selected, last_radio_index)) { csection }; + last_radio_index = null; + } else if (typeof (int) == mType) { + foreach (object attr in attrs) { + if (attr is RadioSelectionAttribute) { + last_radio_index = mi; + break; + } + } + } else { + var nested = GetValue (mi, o); + if (nested is not null) { + var newRoot = new RootElement (caption); + Populate (callbacks, nested, newRoot); + element = newRoot; + } + } + + if (element is null) + continue; + section.Add (element); + mappings [element] = new MemberAndInstance (mi, o); + } + root.Add (section); + } + + class MemberRadioGroup : RadioGroup { + public MemberInfo mi; + + public MemberRadioGroup (string key, int selected, MemberInfo mi) : base (key, selected) + { + this.mi = mi; + } + } + + public void Dispose () + { + Dispose (true); + } + + protected virtual void Dispose (bool disposing) + { + if (disposing) { + // Dispose any [OnTap] handler associated to its element + foreach (var strElement in handlerMappings) + strElement.Key.Tapped -= strElement.Value; + handlerMappings = null; + + foreach (var element in mappings.Keys) { + element.Dispose (); + } + mappings = null; + } + } + + public void Fetch () + { + foreach (var dk in mappings) { + Element element = dk.Key; + MemberInfo mi = dk.Value.Member; + object obj = dk.Value.Obj; + + if (element is DateTimeElement) + SetValue (mi, obj, ((DateTimeElement) element).DateValue); + else if (element is FloatElement) + SetValue (mi, obj, ((FloatElement) element).Value); + else if (element is BooleanElement) + SetValue (mi, obj, ((BooleanElement) element).Value); + else if (element is CheckboxElement) + SetValue (mi, obj, ((CheckboxElement) element).Value); + else if (element is EntryElement) { + var entry = (EntryElement) element; + entry.FetchValue (); + SetValue (mi, obj, entry.Value); + } else if (element is ImageElement) + SetValue (mi, obj, ((ImageElement) element).Value); + else if (element is RootElement) { + var re = element as RootElement; + if (re.group as MemberRadioGroup is not null) { + var group = re.group as MemberRadioGroup; + SetValue (group.mi, obj, re.RadioSelected); + } else if (re.group as RadioGroup is not null) { + var mType = GetTypeForMember (mi); + var fi = mType.GetFields (BindingFlags.Public | BindingFlags.Static) [re.RadioSelected]; + + SetValue (mi, obj, fi.GetValue (null)); + } + } + } + } + } +} diff --git a/tests/common/MonoTouch.Dialog/Utilities/Controls.cs b/tests/common/MonoTouch.Dialog/Utilities/Controls.cs new file mode 100644 index 000000000000..452af0ce9045 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Utilities/Controls.cs @@ -0,0 +1,50 @@ +using System; +using System.Drawing; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; + +using UIKit; +using CoreGraphics; +using Foundation; +using CoreAnimation; + +using MonoTouch.Dialog.Utilities; + +namespace MonoTouch.Dialog { + public enum RefreshViewStatus { + ReleaseToReload, + PullToReload, + Loading + } + + // This cute method will be added to UIImage.FromResource, but for old installs + // make a copy here + internal static class Util { + public static UIImage FromResource (Assembly assembly, string name) + { + if (name is null) + throw new ArgumentNullException ("name"); + assembly = Assembly.GetCallingAssembly (); + var stream = assembly.GetManifestResourceStream (name); + if (stream is null) + return null; + + try { + using (var data = NSData.FromStream (stream)) + return UIImage.LoadFromData (data); + } finally { + stream.Dispose (); + } + } + + } + + public class SearchChangedEventArgs : EventArgs { + public SearchChangedEventArgs (string text) + { + Text = text; + } + public string Text { get; set; } + } +} diff --git a/tests/common/MonoTouch.Dialog/Utilities/GlassButton.cs b/tests/common/MonoTouch.Dialog/Utilities/GlassButton.cs new file mode 100644 index 000000000000..47a280ef2de6 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Utilities/GlassButton.cs @@ -0,0 +1,131 @@ +using System; +using System.Drawing; + +using UIKit; +using CoreGraphics; +using Foundation; +using CoreAnimation; +using ObjCRuntime; + +namespace MonoTouch.Dialog { + + /// + /// GlassButton is a glossy/glass button. User code can use either + /// targets or can subscribe to the Tapped event. Colors are customized + /// by asssigning to the NormalColor, HighlightedColor and DisabledColor + /// properties + /// + public class GlassButton : UIButton { + bool pressed; + + public UIColor NormalColor, HighlightedColor, DisabledColor; + + /// + /// Invoked when the user touches + /// + public event Action Tapped; + + /// + /// Creates a new instance of the GlassButton using the specified dimensions + /// + public GlassButton (CGRect frame) : base (frame) + { + NormalColor = new UIColor (0.55f, 0.04f, 0.02f, 1); + HighlightedColor = UIColor.Black; + DisabledColor = UIColor.Gray; + } + + /// + /// Whether the button is rendered enabled or not. + /// + public override bool Enabled { + get { + return base.Enabled; + } + set { + base.Enabled = value; + SetNeedsDisplay (); + } + } + + public override bool BeginTracking (UITouch uitouch, UIEvent uievent) + { + SetNeedsDisplay (); + pressed = true; + return base.BeginTracking (uitouch, uievent); + } + + public override void EndTracking (UITouch uitouch, UIEvent uievent) + { + if (pressed && Enabled) { + if (Tapped is not null) + Tapped (this); + } + pressed = false; + SetNeedsDisplay (); + base.EndTracking (uitouch, uievent); + } + + public override bool ContinueTracking (UITouch uitouch, UIEvent uievent) + { + var touch = uievent.AllTouches.AnyObject as UITouch; + if (Bounds.Contains (touch.LocationInView (this))) + pressed = true; + else + pressed = false; + return base.ContinueTracking (uitouch, uievent); + } + + public override void Draw (CGRect rect) + { + var context = UIGraphics.GetCurrentContext (); + var bounds = Bounds; + + UIColor background = Enabled ? pressed ? HighlightedColor : NormalColor : DisabledColor; + float alpha = 1; + + CGPath container; + container = GraphicsUtil.MakeRoundedRectPath (bounds, 14); + context.AddPath (container); + context.Clip (); + + using (var cs = CGColorSpace.CreateDeviceRGB ()) { + var topCenter = new CGPoint (bounds.GetMidX (), 0); + var midCenter = new CGPoint (bounds.GetMidX (), bounds.GetMidY ()); + var bottomCenter = new CGPoint (bounds.GetMidX (), bounds.GetMaxY ()); + + using (var gradient = new CGGradient (cs, new nfloat [] { 0.23f, 0.23f, 0.23f, alpha, 0.47f, 0.47f, 0.47f, alpha }, new nfloat [] { 0, 1 })) { + context.DrawLinearGradient (gradient, topCenter, bottomCenter, 0); + } + + container = GraphicsUtil.MakeRoundedRectPath (bounds.Inset (1, 1), 13); + context.AddPath (container); + context.Clip (); + using (var gradient = new CGGradient (cs, new nfloat [] { 0.05f, 0.05f, 0.05f, alpha, 0.15f, 0.15f, 0.15f, alpha }, new nfloat [] { 0, 1 })) { + context.DrawLinearGradient (gradient, topCenter, bottomCenter, 0); + } + + var nb = bounds.Inset (4, 4); + container = GraphicsUtil.MakeRoundedRectPath (nb, 10); + context.AddPath (container); + context.Clip (); + + background.SetFill (); + context.FillRect (nb); + + using (var gradient = new CGGradient (cs, new nfloat [] { 1, 1, 1, .35f, 1, 1, 1, 0.06f }, new nfloat [] { 0, 1 })) { + context.DrawLinearGradient (gradient, topCenter, midCenter, 0); + } + context.SetLineWidth (2); + context.AddPath (container); + context.ReplacePathWithStrokedPath (); + context.Clip (); + + using (var gradient = new CGGradient (cs, new nfloat [] { 1, 1, 1, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f }, new nfloat [] { 0, 1 })) { + context.DrawLinearGradient (gradient, topCenter, bottomCenter, 0); + } + } + } + } +} + diff --git a/tests/common/MonoTouch.Dialog/Utilities/Graphics.cs b/tests/common/MonoTouch.Dialog/Utilities/Graphics.cs new file mode 100644 index 000000000000..a2d81835ac0b --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Utilities/Graphics.cs @@ -0,0 +1,64 @@ +using System; + +using CoreGraphics; +using ObjCRuntime; + +namespace MonoTouch.Dialog { + public static class GraphicsUtil { + + /// + /// Creates a path for a rectangle with rounded corners + /// + /// + /// The rectangle bounds + /// + /// + /// The size of the rounded corners + /// + /// + /// A that can be used to stroke the rounded rectangle + /// + public static CGPath MakeRoundedRectPath (CGRect rect, nfloat radius) + { + nfloat minx = rect.Left; + nfloat midx = rect.Left + (rect.Width) / 2; + nfloat maxx = rect.Right; + nfloat miny = rect.Top; + nfloat midy = rect.Y + rect.Size.Height / 2; + nfloat maxy = rect.Bottom; + + var path = new CGPath (); + path.MoveToPoint (minx, midy); + path.AddArcToPoint (minx, miny, midx, miny, radius); + path.AddArcToPoint (maxx, miny, maxx, midy, radius); + path.AddArcToPoint (maxx, maxy, midx, maxy, radius); + path.AddArcToPoint (minx, maxy, minx, midy, radius); + path.CloseSubpath (); + + return path; + } + + public static void FillRoundedRect (CGContext ctx, CGRect rect, nfloat radius) + { + var p = GraphicsUtil.MakeRoundedRectPath (rect, radius); + ctx.AddPath (p); + ctx.FillPath (); + } + + public static CGPath MakeRoundedPath (float size, float radius) + { + float hsize = size / 2; + + var path = new CGPath (); + path.MoveToPoint (size, hsize); + path.AddArcToPoint (size, size, hsize, size, radius); + path.AddArcToPoint (0, size, 0, hsize, radius); + path.AddArcToPoint (0, 0, hsize, 0, radius); + path.AddArcToPoint (size, 0, size, hsize, radius); + path.CloseSubpath (); + + return path; + } + } +} + diff --git a/tests/common/MonoTouch.Dialog/Utilities/ImageLoader.cs b/tests/common/MonoTouch.Dialog/Utilities/ImageLoader.cs new file mode 100644 index 000000000000..55c4a2511ea1 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Utilities/ImageLoader.cs @@ -0,0 +1,352 @@ +// Copyright 2010-2011 Miguel de Icaza +// +// Based on the TweetStation specific ImageStore +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Security.Cryptography; + +using Foundation; +using UIKit; +using CoreGraphics; + +using MonoTouch.Dialog.Utilities; + +namespace MonoTouch.Dialog.Utilities { + /// + /// This interface needs to be implemented to be notified when an image + /// has been downloaded. The notification will happen on the UI thread. + /// Upon notification, the code should call RequestImage again, this time + /// the image will be loaded from the on-disk cache or the in-memory cache. + /// + public interface IImageUpdated { + void UpdatedImage (Uri uri); + } + + /// + /// Network image loader, with local file system cache and in-memory cache + /// + /// + /// By default, using the static public methods will use an in-memory cache + /// for 50 images and 4 megs total. The behavior of the static methods + /// can be modified by setting the public DefaultLoader property to a value + /// that the user configured. + /// + /// The instance methods can be used to create different imageloader with + /// different properties. + /// + /// Keep in mind that the phone does not have a lot of memory, and using + /// the cache with the unlimited value (0) even with a number of items in + /// the cache can consume memory very quickly. + /// + /// Use the Purge method to release all the memory kept in the caches on + /// low memory conditions, or when the application is sent to the background. + /// + + public class ImageLoader { + public readonly static string BaseDir = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), ".."); + const int MaxRequests = 6; + static string PicDir; + + // Cache of recently used images + LRUCache cache; + + // A list of requests that have been issues, with a list of objects to notify. + static Dictionary> pendingRequests; + + // A list of updates that have completed, we must notify the main thread about them. + static HashSet queuedUpdates; + + // A queue used to avoid flooding the network stack with HTTP requests + static Stack requestQueue; + + static NSString nsDispatcher = new NSString ("x"); + + static MD5 checksum = MD5.Create (); + + /// + /// This contains the default loader which is configured to be 50 images + /// up to 4 megs of memory. Assigning to this property a new value will + /// change the behavior. This property is lazyly computed, the first time + /// an image is requested. + /// + public static ImageLoader DefaultLoader; + + static ImageLoader () + { + PicDir = Path.Combine (BaseDir, "Library/Caches/Pictures.MonoTouch.Dialog/"); + + if (!Directory.Exists (PicDir)) + Directory.CreateDirectory (PicDir); + + pendingRequests = new Dictionary> (); + queuedUpdates = new HashSet (); + requestQueue = new Stack (); + } + + /// + /// Creates a new instance of the image loader + /// + /// + /// The maximum number of entries in the LRU cache + /// + /// + /// The maximum number of bytes to consume by the image loader cache. + /// + public ImageLoader (int cacheSize, int memoryLimit) + { + cache = new LRUCache (cacheSize, memoryLimit, sizer); + } + + static int sizer (UIImage img) + { + var cg = img.CGImage; + return (int) (cg.BytesPerRow * cg.Height); + } + + /// + /// Purges the contents of the DefaultLoader + /// + public static void Purge () + { + if (DefaultLoader is not null) + DefaultLoader.PurgeCache (); + } + + /// + /// Purges the cache of this instance of the ImageLoader, releasing + /// all the memory used by the images in the caches. + /// + public void PurgeCache () + { + lock (cache) + cache.Purge (); + } + + static int hex (int v) + { + if (v < 10) + return '0' + v; + return 'a' + v - 10; + } + + static string md5 (string input) + { + var bytes = checksum.ComputeHash (Encoding.UTF8.GetBytes (input)); + var ret = new char [32]; + for (int i = 0; i < 16; i++) { + ret [i * 2] = (char) hex (bytes [i] >> 4); + ret [i * 2 + 1] = (char) hex (bytes [i] & 0xf); + } + return new string (ret); + } + + /// + /// Requests an image to be loaded using the default image loader + /// + /// + /// The URI for the image to load + /// + /// + /// A class implementing the IImageUpdated interface that will be invoked when the image has been loaded + /// + /// + /// If the image has already been downloaded, or is in the cache, this will return the image as a UIImage. + /// + public static UIImage DefaultRequestImage (Uri uri, IImageUpdated notify) + { + if (DefaultLoader is null) + DefaultLoader = new ImageLoader (50, 4 * 1024 * 1024); + return DefaultLoader.RequestImage (uri, notify); + } + + /// + /// Requests an image to be loaded from the network + /// + /// + /// The URI for the image to load + /// + /// + /// A class implementing the IImageUpdated interface that will be invoked when the image has been loaded + /// + /// + /// If the image has already been downloaded, or is in the cache, this will return the image as a UIImage. + /// + public UIImage RequestImage (Uri uri, IImageUpdated notify) + { + UIImage ret; + + lock (cache) { + ret = cache [uri]; + if (ret is not null) + return ret; + } + + lock (requestQueue) { + if (pendingRequests.ContainsKey (uri)) { + if (!pendingRequests [uri].Contains (notify)) + pendingRequests [uri].Add (notify); + return null; + } + } + + string picfile = uri.IsFile ? uri.LocalPath : PicDir + md5 (uri.AbsoluteUri); + if (File.Exists (picfile)) { + ret = UIImage.FromFile (picfile); + if (ret is not null) { + lock (cache) + cache [uri] = ret; + return ret; + } + } + if (uri.IsFile) + return null; + QueueRequest (uri, notify); + return null; + } + + static void QueueRequest (Uri uri, IImageUpdated notify) + { + if (notify is null) + throw new ArgumentNullException ("notify"); + + lock (requestQueue) { + if (pendingRequests.ContainsKey (uri)) { + //Util.Log ("pendingRequest: added new listener for {0}", id); + pendingRequests [uri].Add (notify); + return; + } + var slot = new List (4); + slot.Add (notify); + pendingRequests [uri] = slot; + + if (picDownloaders >= MaxRequests) + requestQueue.Push (uri); + else { + ThreadPool.QueueUserWorkItem (delegate + { + try { + StartPicDownload (uri); + } catch (Exception e) { + Console.WriteLine (e); + } + }); + } + } + } + + static bool Download (Uri uri) + { + try { + NSUrlResponse response; + NSError error; + + var target = PicDir + md5 (uri.AbsoluteUri); + var req = new NSUrlRequest (new NSUrl (uri.AbsoluteUri.ToString ()), NSUrlRequestCachePolicy.UseProtocolCachePolicy, 120); + var data = NSUrlConnection.SendSynchronousRequest (req, out response, out error); + return data.Save (target, true, out error); + } catch (Exception e) { + Console.WriteLine ("Problem with {0} {1}", uri, e); + return false; + } + } + + static long picDownloaders; + + static void StartPicDownload (Uri uri) + { + Interlocked.Increment (ref picDownloaders); + try { + _StartPicDownload (uri); + } catch (Exception e) { + Console.Error.WriteLine ("CRITICAL: should have never happened {0}", e); + } + //Util.Log ("Leaving StartPicDownload {0}", picDownloaders); + Interlocked.Decrement (ref picDownloaders); + } + + static void _StartPicDownload (Uri uri) + { + do { + bool downloaded = false; + + //System.Threading.Thread.Sleep (5000); + downloaded = Download (uri); + //if (!downloaded) + // Console.WriteLine ("Error fetching picture for {0} to {1}", uri, target); + + // Cluster all updates together + bool doInvoke = false; + + lock (requestQueue) { + if (downloaded) { + queuedUpdates.Add (uri); + + // If this is the first queued update, must notify + if (queuedUpdates.Count == 1) + doInvoke = true; + } else + pendingRequests.Remove (uri); + + // Try to get more jobs. + if (requestQueue.Count > 0) { + uri = requestQueue.Pop (); + if (uri is null) { + Console.Error.WriteLine ("Dropping request {0} because url is null", uri); + pendingRequests.Remove (uri); + uri = null; + } + } else { + //Util.Log ("Leaving because requestQueue.Count = {0} NOTE: {1}", requestQueue.Count, pendingRequests.Count); + uri = null; + } + } + if (doInvoke) + nsDispatcher.BeginInvokeOnMainThread (NotifyImageListeners); + + } while (uri is not null); + } + + // Runs on the main thread + static void NotifyImageListeners () + { + lock (requestQueue) { + foreach (var quri in queuedUpdates) { + var list = pendingRequests [quri]; + pendingRequests.Remove (quri); + foreach (var pr in list) { + try { + pr.UpdatedImage (quri); + } catch (Exception e) { + Console.WriteLine (e); + } + } + } + queuedUpdates.Clear (); + } + } + } +} diff --git a/tests/common/MonoTouch.Dialog/Utilities/LRUCache.cs b/tests/common/MonoTouch.Dialog/Utilities/LRUCache.cs new file mode 100644 index 000000000000..cdfcf360a04e --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Utilities/LRUCache.cs @@ -0,0 +1,140 @@ +// +// A simple LRU cache used for tracking the images +// +// Authors: +// Miguel de Icaza (miguel@gnome.org) +// +// Copyright 2010 Miguel de Icaza +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +using System; +using System.Collections.Generic; + +namespace MonoTouch.Dialog.Utilities { + + public class LRUCache where TValue : class, IDisposable { + Dictionary> dict; + Dictionary, TKey> revdict; + LinkedList list; + int entryLimit, sizeLimit, currentSize; + Func slotSizeFunc; + + public LRUCache (int entryLimit) : this (entryLimit, 0, null) + { + } + + public LRUCache (int entryLimit, int sizeLimit, Func slotSizer) + { + list = new LinkedList (); + dict = new Dictionary> (); + revdict = new Dictionary, TKey> (); + + if (sizeLimit != 0 && slotSizer is null) + throw new ArgumentNullException ("If sizeLimit is set, the slotSizer must be provided"); + + this.entryLimit = entryLimit; + this.sizeLimit = sizeLimit; + this.slotSizeFunc = slotSizer; + } + + void Evict () + { + var last = list.Last; + var key = revdict [last]; + + if (sizeLimit > 0) { + int size = slotSizeFunc (last.Value); + currentSize -= size; + } + + dict.Remove (key); + revdict.Remove (last); + list.RemoveLast (); + last.Value.Dispose (); + } + + public void Purge () + { + foreach (var element in list) + element.Dispose (); + + dict.Clear (); + revdict.Clear (); + list.Clear (); + currentSize = 0; + } + + public TValue this [TKey key] { + get { + LinkedListNode node; + + if (dict.TryGetValue (key, out node)) { + list.Remove (node); + list.AddFirst (node); + + return node.Value; + } + return null; + } + + set { + LinkedListNode node; + int size = sizeLimit > 0 ? slotSizeFunc (value) : 0; + + if (dict.TryGetValue (key, out node)) { + if (sizeLimit > 0 && node.Value is not null) { + int repSize = slotSizeFunc (node.Value); + currentSize -= repSize; + currentSize += size; + } + + // If we already have a key, move it to the front + list.Remove (node); + list.AddFirst (node); + + // Remove the old value + if (node.Value is not null) + node.Value.Dispose (); + node.Value = value; + while (sizeLimit > 0 && currentSize > sizeLimit && list.Count > 1) + Evict (); + return; + } + if (sizeLimit > 0) { + while (sizeLimit > 0 && currentSize + size > sizeLimit && list.Count > 0) + Evict (); + } + if (dict.Count >= entryLimit) + Evict (); + // Adding new node + node = new LinkedListNode (value); + list.AddFirst (node); + dict [key] = node; + revdict [node] = key; + currentSize += size; + } + } + + public override string ToString () + { + return "LRUCache dict={0} revdict={1} list={2}"; + } + } +} diff --git a/tests/common/MonoTouch.Dialog/Utilities/LocalizationExtensions.cs b/tests/common/MonoTouch.Dialog/Utilities/LocalizationExtensions.cs new file mode 100644 index 000000000000..4ed685a99857 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/Utilities/LocalizationExtensions.cs @@ -0,0 +1,37 @@ +// Copyright 2010-2011 Miguel de Icaza +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +using System; + +using Foundation; + +namespace MonoTouch.Dialog { + internal static class LocalizationExtensions { + /// + /// Gets the localized text for the specified string. + /// + public static string GetText (this string text) + { + if (String.IsNullOrEmpty (text)) + return text; + return NSBundle.MainBundle.GetLocalizedString (text, String.Empty, String.Empty); + } + } +} diff --git a/tests/common/MonoTouch.Dialog/shared.csproj b/tests/common/MonoTouch.Dialog/shared.csproj new file mode 100644 index 000000000000..57d76949c7d6 --- /dev/null +++ b/tests/common/MonoTouch.Dialog/shared.csproj @@ -0,0 +1,20 @@ + + + + Library + MonoTouch.Dialog + MonoTouch.Dialog + Resources + + + $(NoWarn);CA1416 + + + $(NoWarn);CA1422 + + + + + + + diff --git a/tests/common/TestRuntime.cs b/tests/common/TestRuntime.cs index 44eefc16c13b..9d578bc516c4 100644 --- a/tests/common/TestRuntime.cs +++ b/tests/common/TestRuntime.cs @@ -12,6 +12,7 @@ using System.Runtime.InteropServices; using System.Reflection; using System.Reflection.Emit; +using System.Runtime.CompilerServices; using System.Runtime.Versioning; using AVFoundation; @@ -231,6 +232,15 @@ public static bool CheckExecutingWithInterpreter () } #endif + public static void AssertNotInterpreter (string message = "This test does not run when using the interpreter") + { + if (IsCoreCLR) + return; + + if (RuntimeFeature.IsDynamicCodeSupported) + NUnit.Framework.Assert.Ignore (message); + } + public static void AssertXcodeVersion (int major, int minor, int build = 0) { if (CheckXcodeVersion (major, minor, build)) @@ -1479,21 +1489,43 @@ public static void RequestMicrophonePermission (bool assert_granted = false) if (!CheckXcodeVersion (6, 0)) return; // The API to check/request permission isn't available in earlier versions, the dialog will just pop up. - if (AVAudioSession.SharedInstance ().RecordPermission == AVAudioSessionRecordPermission.Undetermined) { + if (!CheckXcodeVersion (15, 0)) { +#pragma warning disable CA1422 // warning CA1422: This call site is reachable on: 'iOS' 12.2 and later, 'maccatalyst' 12.2 and later. 'AVAudioSession.RecordPermission' is obsoleted on: 'ios' 17.0 and later (Please use 'AVAudioApplication.RecordPermission' instead.), 'maccatalyst' 17.0 and later (Please use 'AVAudioApplication.RecordPermission' instead.). + if (AVAudioSession.SharedInstance ().RecordPermission == AVAudioSessionRecordPermission.Undetermined) { + if (IgnoreTestThatRequiresSystemPermissions ()) + NUnit.Framework.Assert.Ignore ("This test would show a dialog to ask for permission to access the microphone."); + + AVAudioSession.SharedInstance ().RequestRecordPermission ((bool granted) => { + Console.WriteLine ("Microphone permission {0}", granted ? "granted" : "denied"); + }); + } + + switch (AVAudioSession.SharedInstance ().RecordPermission) { // iOS 8+ + case AVAudioSessionRecordPermission.Denied: + if (assert_granted) + NUnit.Framework.Assert.Fail ("This test requires permission to access the microphone."); + break; + } +#pragma warning restore CA1422 + return; + } + + if (AVAudioApplication.SharedInstance.RecordPermission == AVAudioApplicationRecordPermission.Undetermined) { if (IgnoreTestThatRequiresSystemPermissions ()) NUnit.Framework.Assert.Ignore ("This test would show a dialog to ask for permission to access the microphone."); - AVAudioSession.SharedInstance ().RequestRecordPermission ((bool granted) => { + AVAudioApplication.RequestRecordPermission ((bool granted) => { Console.WriteLine ("Microphone permission {0}", granted ? "granted" : "denied"); }); } - switch (AVAudioSession.SharedInstance ().RecordPermission) { // iOS 8+ - case AVAudioSessionRecordPermission.Denied: + switch (AVAudioApplication.SharedInstance.RecordPermission) { + case AVAudioApplicationRecordPermission.Denied: if (assert_granted) NUnit.Framework.Assert.Fail ("This test requires permission to access the microphone."); break; } + #endif // !MONOMAC && !__TVOS__ } #endif // !__WATCHOS__ @@ -1870,6 +1902,18 @@ public static void AssertNoNonNUnitException (Exception ex, string message) break; } } + + // this only applies to macOS, we can't determine it for other platforms. + public static void IgnoreIfLockedScreen () + { +#if __MACOS__ + var props = global::CoreGraphics.CGSession.GetProperties (); + var value = props?.Dictionary [(NSString) "CGSSessionScreenIsLocked"]; // This key isn't documented, so no binding for it. + var isLocked = (value as NSNumber)?.BoolValue; + if (isLocked == true) + Assert.Ignore ("The screen is locked."); +#endif + } } #if NET diff --git a/tests/common/Touch.Unit/README.md b/tests/common/Touch.Unit/README.md new file mode 100644 index 000000000000..baa9c993daba --- /dev/null +++ b/tests/common/Touch.Unit/README.md @@ -0,0 +1,36 @@ +# Touch.Unit + + _because I like my code public and my mistakes private_ + +## History + +[I searched, but I did not find.](http://stackoverflow.com/q/7065071/220643) [So I made](http://spouliot.wordpress.com/2011/09/28/unit-testing-and-monotouch/) [and shared.](https://github.com/spouliot/Touch.Unit) + +## How To + +1. Clone all the required code from github.com + + ```shell + $ git clone git://github.com/spouliot/NUnitLite.git + ... + $ git clone git://github.com/spouliot/Touch.Unit.git + ... + ``` + +note: make sure to pull from all of them to get the latest fixes + +2. Launch Xamarin Studio (4.0 or later) + +3. Open the "Touch.Unit.sln" solution + +4. Run / Debug / Add Tests / Enjoy + +## Documentation + +* [NUnitLite](http://www.nunitlite.org/) web site + +## Todo List + +* Track changes in [iOS](http://developer.apple.com/devcenter/ios/index.action), [Xamarin.iOS](http://ios.xamarin.com), [NUnitLite](http://www.nunitlite.org/index.php?p=roadmap) and [MonoTouch.Dialog](https://github.com/migueldeicaza/MonoTouch.Dialog) + +* otherwise KISS - want something more, fork it :-) diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/ExcludedCategoryFilter.cs b/tests/common/Touch.Unit/Touch.Client/Runner/ExcludedCategoryFilter.cs new file mode 100644 index 000000000000..b5c599305b35 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/ExcludedCategoryFilter.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; + +using NUnit.Framework.Internal; +using NUnit.Framework.Interfaces; + +namespace MonoTouch.NUnit.UI { + class ExcludeCategoryFilter : TestFilter { + public HashSet ExcludedCategories { get; private set; } + + public ExcludeCategoryFilter (IEnumerable categories) + { + ExcludedCategories = new HashSet (categories); + } + + public override TNode AddToXml (TNode parentNode, bool recursive) + { + throw new NotImplementedException (); + } + + public override bool Match (ITest test) + { + var categories = test.Properties ["Category"]; + if (categories is not null) { + foreach (string cat in categories) { + if (ExcludedCategories.Contains (cat)) + return false; + } + } + + if (test.Parent is not null) + return Match (test.Parent); + + return true; + } + + public override bool Pass (ITest test) + { + return Match (test); + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/HttpTextWriter.cs b/tests/common/Touch.Unit/Touch.Client/Runner/HttpTextWriter.cs new file mode 100644 index 000000000000..9365244f70b5 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/HttpTextWriter.cs @@ -0,0 +1,120 @@ +// HttpTextWriter.cs: Class to report test results using http requests +// +// Authors: +// Rolf Bjarne Kvinge +// +// Copyright 2016 Xamarin Inc. +// + +using System; +using System.IO; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +using Foundation; + +namespace MonoTouch.NUnit { + class HttpTextWriter : TextWriter { + public string HostName; + public int Port; + + TaskCompletionSource finished = new TaskCompletionSource (); + TaskCompletionSource closed = new TaskCompletionSource (); + StringBuilder log = new StringBuilder (); + + public Task FinishedTask { + get { + return finished.Task; + } + } + + public override Encoding Encoding { + get { + return Encoding.UTF8; + } + } + + public override void Close () + { + var valueWasSet = closed.TrySetResult (true); + if (valueWasSet) { + Task.Run (async () => { + await finished.Task; + base.Close (); + }); + } + } + + + Task SendData (NSUrl url, string uploadData) + { + var tcs = new TaskCompletionSource (); + var request = new NSMutableUrlRequest (url); + request.HttpMethod = "POST"; + var rv = NSUrlSession.SharedSession.CreateUploadTask (request, NSData.FromString (uploadData), (NSData data, NSUrlResponse response, NSError error) => { + if (error is not null) { + Console.WriteLine ("Failed to send data to {0}: {1}", url.AbsoluteString, error); + tcs.SetResult (false); + } else { + //Console.WriteLine ("Succeeded sending data to {0}", url.AbsoluteString); + tcs.SetResult (true); + } + }); + rv.Resume (); + return tcs.Task; + } + + async Task SendData (string action, string uploadData) + { + var url = NSUrl.FromString ("http://" + HostName + ":" + Port + "/" + action); + + int attempts_left = 10; + while (!await SendData (url, uploadData)) { + if (--attempts_left == 0) { + Console.WriteLine ("Not resending data anymore."); + throw new Exception ("Failed to send data."); + } + Console.WriteLine ("Resending data: {0} Length: {1} to: {2} Attempts left: {3}", action, uploadData.Length, url.AbsoluteString, attempts_left); + }; + } + + async void SendThread () + { + try { + await SendData ("Start", ""); + await closed.Task; + await SendData ("Finish", log.ToString ()); + } catch (Exception ex) { + Console.WriteLine ("HttpTextWriter failed: {0}", ex); + } finally { + finished.SetResult (true); + } + } + + public void Open () + { + new Thread (SendThread) { + IsBackground = true, + }.Start (); + } + + public override void Write (char value) + { + Console.Out.Write (value); + log.Append (value); + } + + public override void Write (char [] buffer) + { + Console.Out.Write (buffer); + log.Append (buffer); + } + + public override void WriteLine (string value) + { + Console.Out.WriteLine (value); + log.AppendLine (value); + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/MacRunner.cs b/tests/common/Touch.Unit/Touch.Client/Runner/MacRunner.cs new file mode 100644 index 000000000000..4f1eaf0e0443 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/MacRunner.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading.Tasks; + +using AppKit; +using Foundation; +using CoreGraphics; + +namespace MonoTouch.NUnit.UI { + public class MacRunner : BaseTouchRunner { + // The exitProcess callback must not return. The boolean parameter specifies whether the test run succeeded or not. + public static async Task MainAsync (IList arguments, bool requiresNSApplicationRun, Action exitProcess, params Assembly [] assemblies) + { + var success = false; + + NSApplication.Init (); + + var options = new TouchOptions (arguments); + TouchOptions.Current = options; + + if (requiresNSApplicationRun) { + var app = NSApplication.SharedApplication; + // This window will let us stop the NSApplication's run loop after the test run + app.InvokeOnMainThread (async () => { + var rect = new CGRect (0, 0, 200, 50); + var window = new NSWindow (rect, NSWindowStyle.Titled | NSWindowStyle.Closable | NSWindowStyle.Miniaturizable | NSWindowStyle.Resizable, NSBackingStore.Buffered, false); + window.Title = "Running tests..."; + window.MakeKeyAndOrderFront (app); + + // run the tests + success = await RunTestsAsync (options, assemblies); + + app.BeginInvokeOnMainThread (() => { + // First try to stop the app nicely. This only works if the app is showing a window. + app.Stop (app); + // Stopping the run loop only works if something else is processed by the run loop, so add an event. + app.PostEvent (NSEvent.OtherEvent (NSEventType.ApplicationDefined, CGPoint.Empty, (NSEventModifierMask) 0, 0, 0, null, 0, 0, 0), true); + // And try something else too in case the application-defined event doesn't work. + app.AbortModal (); + }); + + // However, let's create a fallback and forcefully exit the app if being nice didn't work. + var timeout = 3; + var timer = NSTimer.CreateScheduledTimer (timeout, (v) => { + Console.WriteLine ($"The app didn't exit its run loop within {timeout} seconds, will now forcefully exit."); + exitProcess (success ? 0 : 1); + }); + }); + app.Run (); + } else { + success = await RunTestsAsync (options, assemblies); + } + + return success ? 0 : 1; + } + + static async Task RunTestsAsync (TouchOptions options, Assembly [] assemblies) + { + var runner = new MacRunner (); + if (assemblies is null || assemblies.Length == 0) + assemblies = AppDomain.CurrentDomain.GetAssemblies (); + + foreach (var asm in assemblies) + runner.Load (asm); + + await runner.RunAsync (); + + return !runner.Result.IsFailure (); + } + + protected override void WriteDeviceInformation (TextWriter writer) + { + var piinfo = NSProcessInfo.ProcessInfo; + writer.WriteLine ("[macOS: {0}]", piinfo.OperatingSystemVersionString); + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/NUnitOutputTextWriter.cs b/tests/common/Touch.Unit/Touch.Client/Runner/NUnitOutputTextWriter.cs new file mode 100644 index 000000000000..78da78b69896 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/NUnitOutputTextWriter.cs @@ -0,0 +1,129 @@ +// NUnitOutputTextWriter.cs +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2013 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.IO; +using System.Text; + +#if NUNITLITE_NUGET +using NUnitLite; +#else +using NUnitLite.Runner; +#endif +using MonoTouch.NUnit.UI; + +namespace MonoTouch.NUnit { + + public class NUnitOutputTextWriter : TextWriter { + + bool real_time_reporting; + StringBuilder extra_data = new StringBuilder (); + XmlMode mode; + + public NUnitOutputTextWriter (BaseTouchRunner runner, TextWriter baseWriter, OutputWriter xmlWriter) + : this (runner, baseWriter, xmlWriter, XmlMode.Default) + { + } + + public NUnitOutputTextWriter (BaseTouchRunner runner, TextWriter baseWriter, OutputWriter xmlWriter, XmlMode xmlMode) + { + Runner = runner; + BaseWriter = baseWriter ?? Console.Out; + XmlOutputWriter = xmlWriter; + // do not send real-time test results on the writer sif XML reports are enabled + real_time_reporting = (xmlWriter is null); + mode = xmlMode; + } + + public override Encoding Encoding { + get { return Encoding.UTF8; } + } + + public TextWriter BaseWriter { get; private set; } + + public BaseTouchRunner Runner { get; private set; } + + public OutputWriter XmlOutputWriter { get; private set; } + + public override void Write (char value) + { + if (real_time_reporting) + BaseWriter.Write (value); + else + extra_data.Append (value); + } + + public override void Write (string value) + { + if (real_time_reporting) + BaseWriter.Write (value); + else + extra_data.Append (value); + } + + public override void Close () + { + if (XmlOutputWriter is not null) { + // now we want the XML report to write + real_time_reporting = true; + // write to a temporary string, because NUnit2XmlOutputWriter.WriteResultFile closes the stream, + // and we need to write more things to it. + var wrapped = mode == XmlMode.Wrapped; + + if (!wrapped) { + XmlOutputWriter.WriteResultFile (Runner.Result, BaseWriter); + if (extra_data.Length > 0) { + BaseWriter.Write (""); + } + } else { + BaseWriter.WriteLine (""); + BaseWriter.WriteLine (""); + + using (var textWriter = new StringWriter ()) { + XmlOutputWriter.WriteResultFile (Runner.Result, textWriter); + var str = textWriter.ToString (); + // Remove any xml declarations, since we're embedding this inside a different xml document. + if (str.StartsWith ("'); + if (closing > 0) + str = str.Substring (closing + 1); + } + BaseWriter.WriteLine (str); + } + BaseWriter.WriteLine (""); + if (extra_data.Length > 0) { + BaseWriter.Write (""); + BaseWriter.WriteLine (""); + } + BaseWriter.WriteLine (""); + } + BaseWriter.WriteLine (""); + BaseWriter.Close (); + real_time_reporting = false; + } + base.Close (); + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TcpTextWriter.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TcpTextWriter.cs new file mode 100644 index 000000000000..1109b6bd9563 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TcpTextWriter.cs @@ -0,0 +1,122 @@ +// this is an adaptation of NUnitLite's TcpWriter.cs with an additional +// overrides and with network-activity UI enhancement + +using System; +using System.IO; +using System.Net; +using System.Net.Sockets; +using System.Text; + +#if __IOS__ +using UIKit; +#endif + +namespace MonoTouch.NUnit { + + public class TcpTextWriter : TextWriter { + + private TcpClient client; + TcpListener server; + private StreamWriter writer; + + public TcpTextWriter (string hostName, int port, bool isTunnel = false) + { + if (hostName is null) + throw new ArgumentNullException ("hostName"); + if ((port < 0) || (port > UInt16.MaxValue)) + throw new ArgumentException ("port"); + if (!isTunnel) + HostName = hostName; + + Port = port; + +#if __IOS__ + UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; +#endif + + try { + if (isTunnel) { + server = new TcpListener (IPAddress.Any, Port); + server.Server.ReceiveTimeout = 5000; // timeout after 5s + server.Start (); + client = server.AcceptTcpClient (); + // block until we have the ping from the client side + int i; + byte [] buffer = new byte [16 * 1024]; + var stream = client.GetStream (); + while ((i = stream.Read (buffer, 0, buffer.Length)) != 0) { + var message = Encoding.UTF8.GetString (buffer); + if (message.Contains ("ping")) + break; + } + } else { + client = new TcpClient (HostName, port); + } + writer = new StreamWriter (client.GetStream ()); + } catch { +#if __IOS__ + UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; +#endif + throw; + } + } + + public string HostName { get; private set; } + + public int Port { get; private set; } + + // we override everything that StreamWriter overrides from TextWriter + + public override System.Text.Encoding Encoding { + // hardcoded to UTF8 so make it easier on the server side + get { return System.Text.Encoding.UTF8; } + } + + public override void Close () + { +#if __IOS__ + UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; +#endif + writer.Close (); + } + + protected override void Dispose (bool disposing) + { + writer.Dispose (); + } + + public override void Flush () + { + writer.Flush (); + } + + // minimum to override - see http://msdn.microsoft.com/en-us/library/system.io.textwriter.aspx + public override void Write (char value) + { + writer.Write (value); + } + + public override void Write (char [] buffer) + { + writer.Write (buffer); + } + + public override void Write (char [] buffer, int index, int count) + { + writer.Write (buffer, index, count); + } + + public override void Write (string value) + { + writer.Write (value); + } + + // special extra override to ensure we flush data regularly + + public override void WriteLine () + { + writer.WriteLine (); + writer.Flush (); + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TestCaseElement.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TestCaseElement.cs new file mode 100644 index 000000000000..dc0c5ccbb0e0 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TestCaseElement.cs @@ -0,0 +1,117 @@ +// TestCaseElement.cs: MonoTouch.Dialog element for TestCase +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2011-2013 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Reflection; + +using UIKit; + +using MonoTouch.Dialog; + +using NUnit.Framework; +using NUnit.Framework.Internal; +#if NUNITLITE_NUGET +using NUnit.Framework.Interfaces; +#else +using NUnit.Framework.Api; +#endif + +namespace MonoTouch.NUnit.UI { + + class TestCaseElement : TestElement { + bool tapped; + + public TestCaseElement (TestMethod testCase, TouchRunner runner) + : base (testCase, runner) + { + Caption = testCase.Name; + Value = "NotExecuted"; + this.Tapped += delegate + { + if (!Runner.OpenWriter (Test.FullName)) + return; + +#if NUNITLITE_NUGET + Run (); +#else + var suite = (testCase.Parent as TestSuite); + var context = TestExecutionContext.CurrentContext; + context.TestObject = Reflect.Construct (testCase.Method.ReflectedType, null); + + suite.GetOneTimeSetUpCommand ().Execute (context); + Run (); + suite.GetOneTimeTearDownCommand ().Execute (context); +#endif + + Runner.CloseWriter (); + tapped = true; + }; + } + + public TestMethod TestCase { + get { return Test as TestMethod; } + } + + public void Run () + { + Runner.Run (TestCase); + } + + public override void TestFinished () + { + if (Result.IsIgnored ()) { + Value = Result.GetMessage (); + DetailColor = Orange; + } else if (Result.IsSuccess () || Result.IsInconclusive ()) { + int counter = Result.AssertCount; + Value = String.Format ("{0} {1} ms for {2} assertion{3}", + Result.IsInconclusive () ? "Inconclusive." : "Success!", + Result.GetDuration ().TotalMilliseconds, counter, + counter == 1 ? String.Empty : "s"); + DetailColor = DarkGreen; + } else if (Result.IsFailure ()) { + Value = Result.GetMessage (); + DetailColor = Red; + } else { + // Assert.Ignore falls into this + Value = Result.GetMessage (); + } + + if (tapped) { + // display more details on (any) failure (but not when ignored) + if ((TestCase.RunState == RunState.Runnable) && !Result.IsSuccess ()) { + var root = new RootElement ("Results") { + new Section () { + new TestResultElement (Result) + } + }; + var dvc = new DialogViewController (root, true) { Autorotate = true }; + Runner.NavigationController.PushViewController (dvc, true); + } + // we still need to update our current element + if (GetContainerTableView () is not null) { + var root = GetImmediateRootElement (); + root.Reload (this, UITableViewRowAnimation.Fade); + } + tapped = false; + } + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TestElement.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TestElement.cs new file mode 100644 index 000000000000..ac0453d8f629 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TestElement.cs @@ -0,0 +1,91 @@ +// TestElement.cs: MonoTouch.Dialog element for ITest, i.e. TestSuite and TestCase +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2011-2012 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +using UIKit; + +using MonoTouch.Dialog; + +using NUnit.Framework.Internal; +#if NUNITLITE_NUGET +using NUnit.Framework.Interfaces; +#else +using NUnit.Framework.Api; +#endif + +namespace MonoTouch.NUnit.UI { + + abstract class TestElement : StyledMultilineElement { + +#if NET + static internal UIColor DarkGreen = UIDevice.CurrentDevice.CheckSystemVersion (13, 0) ? UIColor.SystemGreen : UIColor.FromRGB (0x00, 0x77, 0x00); + static internal UIColor Orange = UIDevice.CurrentDevice.CheckSystemVersion (13, 0) ? UIColor.SystemOrange : UIColor.Orange; + static internal UIColor Red = UIDevice.CurrentDevice.CheckSystemVersion (13, 0) ? UIColor.SystemRed : UIColor.Red; +#else +#pragma warning disable CS0618 + static internal UIColor DarkGreen = UIDevice.CurrentDevice.CheckSystemVersion (13, 0) ? UIColor.SystemGreenColor : UIColor.FromRGB (0x00, 0x77, 0x00); + static internal UIColor Orange = UIDevice.CurrentDevice.CheckSystemVersion (13, 0) ? UIColor.SystemOrangeColor : UIColor.Orange; + static internal UIColor Red = UIDevice.CurrentDevice.CheckSystemVersion (13, 0) ? UIColor.SystemRedColor : UIColor.Red; +#pragma warning restore CS0618 +#endif + + private TestResult result; + + public TestElement (ITest test, TouchRunner runner) + : base ("?", "?", UITableViewCellStyle.Subtitle) + { + if (test is null) + throw new ArgumentNullException ("test"); + if (runner is null) + throw new ArgumentNullException ("runner"); + + if (UIDevice.CurrentDevice.CheckSystemVersion (13, 0)) { +#if NET + TextColor = UIColor.Label; +#else +#pragma warning disable CS0618 + TextColor = UIColor.LabelColor; +#pragma warning restore CS0618 +#endif + } + Test = test; + Runner = runner; + } + + protected TouchRunner Runner { get; private set; } + + public TestResult Result { + get { return result ?? new TestCaseResult (Test as TestMethod); } + set { result = value; } + } + + protected ITest Test { get; private set; } + + public void TestFinished (TestResult result) + { + Result = result; + + TestFinished (); + } + + abstract public void TestFinished (); + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TestResultElement.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TestResultElement.cs new file mode 100644 index 000000000000..880741dcc9a2 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TestResultElement.cs @@ -0,0 +1,39 @@ +// TestResultElement.cs: MonoTouch.Dialog element for TestResult +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2011-2012 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +using UIKit; + +using MonoTouch.Dialog; + +using NUnit.Framework; +using NUnit.Framework.Internal; + +namespace MonoTouch.NUnit.UI { + + class TestResultElement : StyledMultilineElement { + + public TestResultElement (TestResult result) : + base (result.Message ?? "Unknown error", result.StackTrace, UITableViewCellStyle.Subtitle) + { + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TestRocks.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TestRocks.cs new file mode 100644 index 000000000000..c9276bbed576 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TestRocks.cs @@ -0,0 +1,86 @@ +// TestRocks.cs: Helpers +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2011-2012 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.IO; + +using NUnit.Framework; +using NUnit.Framework.Internal; +#if NUNITLITE_NUGET +using NUnitLite; +using NUnit.Framework.Interfaces; +#else +using NUnit.Framework.Api; +#endif + +namespace MonoTouch.NUnit { + + static class TestRock { + + const string NUnitFrameworkExceptionPrefix = "NUnit.Framework."; + + static public bool IsIgnored (this TestResult result) + { + return (result.ResultState.Status == TestStatus.Skipped); + } + + static public bool IsSuccess (this TestResult result) + { + return (result.ResultState.Status == TestStatus.Passed); + } + + static public bool IsFailure (this TestResult result) + { + return (result.ResultState.Status == TestStatus.Failed); + } + + static public bool IsInconclusive (this TestResult result) + { + return (result.ResultState.Status == TestStatus.Inconclusive); + } + + // remove the nunit exception message from the "real" message + static public string GetMessage (this TestResult result) + { + string m = result.Message; + if (m is null) + return "Unknown error"; + if (!m.StartsWith (NUnitFrameworkExceptionPrefix)) + return m; + return m.Substring (m.IndexOf (" : ") + 3); + } + + static public TimeSpan GetDuration (this TestResult result) + { +#if NUNITLITE_NUGET + return TimeSpan.FromSeconds (result.Duration); +#else + return result.Duration; +#endif + } + +#if NUNITLITE_NUGET + static public void WriteResultFile (this NUnitLite.OutputWriter @this, ITestResult result, TextWriter writer) + { + @this.WriteResultFile (result, writer, null, TestFilter.Empty); + } +#endif + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TestSuiteElement.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TestSuiteElement.cs new file mode 100644 index 000000000000..944b16c7be62 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TestSuiteElement.cs @@ -0,0 +1,98 @@ +// TestSuiteElement.cs: MonoTouch.Dialog element for TestSuite +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2011-2013 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Text; + +using UIKit; + +using MonoTouch.Dialog; + +using NUnit.Framework.Internal; + +namespace MonoTouch.NUnit.UI { + + class TestSuiteElement : TestElement { + + public TestSuiteElement (TestSuite test, TouchRunner runner) + : base (test, runner) + { + Caption = Suite.Name; + int count = Suite.TestCaseCount; + if (count > 0) { + Accessory = UITableViewCellAccessory.DisclosureIndicator; + DetailColor = DarkGreen; + Value = String.Format ("{0} test case{1}, {2}", count, count == 1 ? String.Empty : "s", Suite.RunState); + Tapped += delegate + { + runner.Show (Suite); + }; + } else { + DetailColor = Orange; + var skip = test.Properties ["_SKIPREASON"]; + if (skip.Count > 0) + Value = skip [0].ToString (); + else + Value = "No test was found inside this suite"; + } + } + + public TestSuite Suite { + get { return Test as TestSuite; } + } + + public void Run () + { + Runner.Run (Suite); + } + + public override void TestFinished () + { + int positive = Result.PassCount + Result.InconclusiveCount; + int failure = Result.FailCount; + int skipped = Result.SkipCount; + + StringBuilder sb = new StringBuilder (); + if (failure == 0) { + DetailColor = DarkGreen; + sb.Append ("Success! ").Append (Result.GetDuration ().TotalMilliseconds).Append (" ms for ").Append (positive).Append (" test"); + if (positive > 1) + sb.Append ('s'); + } else { + DetailColor = Red; + if (positive > 0) + sb.Append (positive).Append (" success"); + if (sb.Length > 0) + sb.Append (", "); + sb.Append (failure).Append (" failure"); + if (failure > 1) + sb.Append ('s'); + if (skipped > 0) + sb.Append (", ").Append (skipped).Append (" ignored"); + } + Value = sb.ToString (); + + if (GetContainerTableView () is not null) { + var root = GetImmediateRootElement (); + root.Reload (this, UITableViewRowAnimation.Fade); + } + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TouchOptions.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TouchOptions.cs new file mode 100644 index 000000000000..9892ce878331 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TouchOptions.cs @@ -0,0 +1,222 @@ +// TouchOptions.cs: MonoTouch.Dialog-based options +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2011-2012 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; + +using Foundation; +#if !__MACOS__ +using UIKit; +#endif + +#if !__WATCHOS__ && !__MACOS__ +using MonoTouch.Dialog; +#endif + +using Mono.Options; + +namespace MonoTouch.NUnit.UI { + + public enum XmlMode { + Default = 0, + Wrapped = 1, + } + + public enum XmlVersion { + NUnitV2 = 0, + NUnitV3 = 1, + } + +#if !NET + [CLSCompliant (false)] +#endif + public class TouchOptions { + + static TouchOptions current; + static public TouchOptions Current { + get { + if (current is null) + current = new TouchOptions (); + return current; + } + set { + current = value; + } + } + + public TouchOptions (IList arguments) + { + var defaults = NSUserDefaults.StandardUserDefaults; + TerminateAfterExecution = defaults.BoolForKey ("execution.autoexit"); + AutoStart = defaults.BoolForKey ("execution.autostart"); + EnableNetwork = defaults.BoolForKey ("network.enabled"); + EnableXml = defaults.BoolForKey ("xml.enabled"); + HostName = defaults.StringForKey ("network.host.name"); + HostPort = (int) defaults.IntForKey ("network.host.port"); + UseTcpTunnel = defaults.BoolForKey ("execution.usetcptunnel"); + Transport = defaults.StringForKey ("network.transport"); + SortNames = defaults.BoolForKey ("display.sort"); + LogFile = defaults.StringForKey ("log.file"); + TestName = defaults.StringForKey ("test.name"); + + bool b; + if (bool.TryParse (Environment.GetEnvironmentVariable ("NUNIT_AUTOEXIT"), out b)) + TerminateAfterExecution = b; + if (bool.TryParse (Environment.GetEnvironmentVariable ("NUNIT_AUTOSTART"), out b)) + AutoStart = b; + if (bool.TryParse (Environment.GetEnvironmentVariable ("NUNIT_ENABLE_NETWORK"), out b)) + EnableNetwork = b; + if (!string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("NUNIT_HOSTNAME"))) + HostName = Environment.GetEnvironmentVariable ("NUNIT_HOSTNAME"); + if (bool.TryParse (Environment.GetEnvironmentVariable ("USE_TCP_TUNNEL"), out b)) + UseTcpTunnel = b; + int i; + if (int.TryParse (Environment.GetEnvironmentVariable ("NUNIT_HOSTPORT"), out i)) + HostPort = i; + if (bool.TryParse (Environment.GetEnvironmentVariable ("NUNIT_SORTNAMES"), out b)) + SortNames = b; + if (!string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("NUNIT_TRANSPORT"))) + Transport = Environment.GetEnvironmentVariable ("NUNIT_TRANSPORT"); + if (bool.TryParse (Environment.GetEnvironmentVariable ("NUNIT_ENABLE_XML_OUTPUT"), out b)) + EnableXml = b; + var xml_mode = Environment.GetEnvironmentVariable ("NUNIT_ENABLE_XML_MODE"); + if (!string.IsNullOrEmpty (xml_mode)) + XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), xml_mode, true); + var xml_version = Environment.GetEnvironmentVariable ("NUNIT_XML_VERSION"); + if (!string.IsNullOrEmpty (xml_version)) + XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), xml_version, true); + if (!string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("NUNIT_LOG_FILE"))) + LogFile = Environment.GetEnvironmentVariable ("NUNIT_LOG_FILE"); + TestName = Environment.GetEnvironmentVariable ("NUNIT_TEST_NAME"); + + var os = new OptionSet () { + { "autoexit", "If the app should exit once the test run has completed.", v => TerminateAfterExecution = true }, + { "autostart", "If the app should automatically start running the tests.", v => AutoStart = true }, + { "hostname=", "Comma-separated list of host names or IP address to (try to) connect to", v => HostName = v }, + { "hostport=", "HTTP/TCP port to connect to.", v => HostPort = int.Parse (v) }, + { "use-tcp-tunnel", "Use a TCP tunnel to connect to the host.", v => UseTcpTunnel = true }, + { "enablenetwork", "Enable the network reporter.", v => EnableNetwork = true }, + { "transport=", "Select transport method. Either TCP (default), HTTP or FILE.", v => Transport = v }, + { "enablexml:", "Enable the xml reported.", v => EnableXml = string.IsNullOrEmpty (v) ? true : bool.Parse (v) }, + { "xmlmode=", "The xml mode.", v => XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), v, true) }, + { "xmlversion=", "The xml version.", v => XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), v, true) }, + { "logfile=", "A path where output will be saved.", v => LogFile = v }, + { "test=", "A test to run. Only applicable if autostart is true.", v => TestName = v }, + }; + + try { + os.Parse (arguments); + } catch (OptionException oe) { + Console.WriteLine ("{0} for options '{1}'", oe.Message, oe.OptionName); + } + } + + public TouchOptions () + : this (Environment.GetCommandLineArgs ()) + { + } + + private bool EnableNetwork { get; set; } + + public XmlMode XmlMode { get; set; } + + public XmlVersion XmlVersion { get; set; } = XmlVersion.NUnitV2; + + public bool EnableXml { get; set; } + + public string HostName { get; private set; } + + public int HostPort { get; private set; } + + public bool UseTcpTunnel { get; set; } = true; + + public bool AutoStart { get; set; } + + public bool TerminateAfterExecution { get; set; } + + public string Transport { get; set; } = "TCP"; + + public string LogFile { get; set; } + + public bool ShowUseNetworkLogger { + get { return (EnableNetwork && !String.IsNullOrWhiteSpace (HostName) && (HostPort > 0)) || Transport == "FILE"; } + } + + public bool SortNames { get; set; } + + public string TestName { get; set; } + +#if !__WATCHOS__ && !__MACOS__ + public UIViewController GetViewController () + { +#if TVOS + var network = new StringElement (string.Format ("Enabled: {0}", EnableNetwork)); +#else + var network = new BooleanElement ("Enable", EnableNetwork); +#endif + var host = new EntryElement ("Host Name", "name", HostName); + host.KeyboardType = UIKeyboardType.ASCIICapable; + + var port = new EntryElement ("Port", "name", HostPort.ToString ()); + port.KeyboardType = UIKeyboardType.NumberPad; + + var useTunnel = new BooleanElement ("Use TCP Tunnel", UseTcpTunnel); + +#if TVOS + var sort = new StringElement (string.Format ("Sort Names: ", SortNames)); +#else + var sort = new BooleanElement ("Sort Names", SortNames); +#endif + + var root = new RootElement ("Options") { + new Section ("Remote Server") { network, host, port, useTunnel }, + new Section ("Display") { sort } + }; + + var dv = new DialogViewController (root, true) { Autorotate = true }; + dv.ViewDisappearing += delegate + { +#if !TVOS + EnableNetwork = network.Value; +#endif + HostName = host.Value; + ushort p; + if (UInt16.TryParse (port.Value, out p)) + HostPort = p; + else + HostPort = -1; + UseTcpTunnel = useTunnel.Value; +#if !TVOS + SortNames = sort.Value; +#endif + + var defaults = NSUserDefaults.StandardUserDefaults; + defaults.SetBool (EnableNetwork, "network.enabled"); + defaults.SetString (HostName ?? String.Empty, "network.host.name"); + defaults.SetInt (HostPort, "network.host.port"); + defaults.SetBool (SortNames, "display.sort"); + defaults.SetBool (UseTcpTunnel, "execution.usetcptunnel"); + }; + + return dv; + } +#endif // !__WATCHOS__ + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TouchRunner.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TouchRunner.cs new file mode 100644 index 000000000000..be6d6803de4e --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TouchRunner.cs @@ -0,0 +1,1018 @@ +// TouchRunner.cs: MonoTouch.Dialog-based driver to run unit tests +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2011-2013 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Diagnostics; +using System.IO; +using System.Collections; +using System.Collections.Generic; +using System.Net.Sockets; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +using CoreFoundation; +using Foundation; +using ObjCRuntime; +#if !__MACOS__ +using UIKit; +#endif +using Constants = global::ObjCRuntime.Constants; + +#if !__WATCHOS__ && !__MACOS__ +using MonoTouch.Dialog; +#endif + +using NUnit.Framework.Api; +using NUnit.Framework.Internal; +using NUnit.Framework.Internal.Commands; +#if NUNITLITE_NUGET +using NUnitLite; +using NUnit.Framework.Interfaces; +using NUnit.Framework.Internal.Execution; +#else +using NUnitLite.Runner; +using NUnit.Framework.Internal.WorkItems; +#endif + +#if NUNITLITE_NUGET +using SettingsDictionary = System.Collections.Generic.IDictionary; +#else +using SettingsDictionary = System.Collections.IDictionary; +#endif + +#if NET +[assembly: SupportedOSPlatform ("ios10.0")] +[assembly: SupportedOSPlatform ("tvos10.0")] +[assembly: SupportedOSPlatform ("macos10.14")] +[assembly: SupportedOSPlatform ("maccatalyst13.0")] +#endif + +namespace MonoTouch.NUnit.UI { + public abstract class BaseTouchRunner : ITestListener { + TestSuite suite = new TestSuite ("TestSuite"); + ITestFilter filter = TestFilter.Empty; + bool connection_failure; + + public int PassedCount { get; private set; } + public int FailedCount { get; private set; } + public int IgnoredCount { get; private set; } + public int InconclusiveCount { get; private set; } + public int TestCount { + get { + return suite.TestCaseCount; + } + } + public TestSuite Suite { get { return suite; } } + + public bool AutoStart { + get { return TouchOptions.Current.AutoStart; } + set { TouchOptions.Current.AutoStart = value; } + } + + public ITestFilter Filter { + get { return filter; } + set { filter = value; } + } + + public HashSet ExcludedCategories { get; set; } + + public bool TerminateAfterExecution { + get { return TouchOptions.Current.TerminateAfterExecution && !connection_failure; } + set { TouchOptions.Current.TerminateAfterExecution = value; } + } + + List assemblies = new List (); + List fixtures; + + public void Add (Assembly assembly) + { + if (assembly is null) + throw new ArgumentNullException ("assembly"); + + assemblies.Add (assembly); + } + + public void Add (Assembly assembly, IList fixtures) + { + Add (assembly); + if (fixtures is not null) { + if (this.fixtures is null) { + this.fixtures = new List (fixtures); + } else { + this.fixtures.AddRange (fixtures); + } + } + } + + protected void FlushConsole () + { + Console.Out.Flush (); + Console.Error.Flush (); + } + + [DllImport ("libc")] + static extern void exit (int code); + protected virtual void TerminateWithSuccess () + { + // For WatchOS we're terminating the extension, not the watchos app itself. + Console.WriteLine ("Exiting test run with success"); + FlushConsole (); + exit (0); + } + + protected virtual void TerminateWithExitCode (int exitCode) + { + FlushConsole (); + if (exitCode == 0) { + TerminateWithSuccess (); + } else { + Console.WriteLine ($"Exiting test run with code {exitCode}"); + exit (exitCode); + } + } + + protected virtual void ExecuteOnMainThread (Action action) + { + var obj = new NSObject (); + obj.BeginInvokeOnMainThread (() => { + action (); + obj.Dispose (); + }); + } + + public void LoadSync () + { + foreach (Assembly assembly in assemblies) + Load (assembly); + assemblies.Clear (); + } + + public void SelectLastTestSuite () + { + var lastSuite = NSUserDefaults.StandardUserDefaults.StringForKey ("CurrentTest"); + + if (string.IsNullOrEmpty (lastSuite)) + return; + + var hierarchy = new List (); + var test = Find (suite, lastSuite, hierarchy); + if (hierarchy.Count < 2) + return; + // Remove the last one, that's the main test suite + hierarchy.RemoveAt (hierarchy.Count - 1); + for (var i = hierarchy.Count - 1; i >= 0; i--) { + if (hierarchy [i] is TestSuite ts) { + Show (ts); + } else { + break; + } + } + } + + ITest Find (ITest parent, string fullname, List hierarchy) + { + if (parent.FullName == fullname) { + hierarchy.Add (parent); + return parent; + } + + foreach (var test in parent.Tests) { + var rv = Find (test, fullname, hierarchy); + if (rv is not null) { + hierarchy.Add (parent); + return test; + } + } + + return null; + } + +#if !__MACCATALYST__ + [Conditional ("IGNORED")] +#endif + internal static void TraceLine (string message) + { + Console.WriteLine (message); + } + + public void AutoRun () + { + TraceLine ("AutoRun ()"); + if (!AutoStart) { + SelectLastTestSuite (); + return; + } + + TraceLine ("AutoRun (): queuing test run on main thread"); + ExecuteOnMainThread (() => { + TraceLine ("AutoRun (): running tests on main thread"); + Run (); + TraceLine ("AutoRun (): completed test run on main thread"); + + var status = FailedCount == 0 ? 0 : 1; + // optionally end the process, e.g. click "Touch.Unit" -> log tests results, return to springboard... + // http://stackoverflow.com/questions/1978695/uiapplication-sharedapplication-terminatewithsuccess-is-not-there + if (TerminateAfterExecution) { + if (WriterFinishedTask is not null) { + Task.Run (async () => { + await WriterFinishedTask; + TerminateWithExitCode (status); + }); + } else { + TerminateWithExitCode (status); + } + } + }); + } + + public Task RunAsync () + { + Run (); + return Task.CompletedTask; + } + + bool running; + public void Run () + { + if (running) { + Console.WriteLine ("Not running because another test run is already in progress."); + return; + } + + running = true; + if (!OpenWriter ("Run Everything")) { + running = false; + return; + } + + try { + Run (suite); + } finally { + CloseWriter (); + running = false; + } + } + + #region writer + + public TestResult Result { get; set; } + + public TextWriter Writer { get; set; } + + Task WriterFinishedTask { get; set; } + + static string SelectHostName (string [] names, int port) + { + if (names.Length == 0) + return null; + + if (names.Length == 1) + return names [0]; + + object lock_obj = new object (); + string result = null; + int failures = 0; + + using (var evt = new ManualResetEvent (false)) { + for (int i = names.Length - 1; i >= 0; i--) { + var name = names [i]; + ThreadPool.QueueUserWorkItem ((v) => { + try { + var client = new TcpClient (name, port); + using (var writer = new StreamWriter (client.GetStream ())) { + writer.WriteLine ("ping"); + } + lock (lock_obj) { + if (result is null) + result = name; + } + evt.Set (); + } catch (Exception e) { + lock (lock_obj) { + Console.WriteLine ("TCP connection failed when selecting 'hostname': {0} and 'port': {1}. {2}", name, port, e); + failures++; + if (failures == names.Length) + evt.Set (); + } + } + }); + } + + // Wait for 1 success or all failures + evt.WaitOne (); + } + + return result; + } + + public bool OpenWriter (string message) + { + TouchOptions options = TouchOptions.Current; + DateTime now = DateTime.Now; + // let the application provide it's own TextWriter to ease automation with AutoStart property + if (Writer is null) { + var writers = new List (); + if (options.ShowUseNetworkLogger) { + try { + string hostname = null; + WriterFinishedTask = null; + TextWriter defaultWriter = null; + switch (options.Transport) { + case "FILE": + Console.WriteLine ("[{0}] Sending '{1}' results to the file {2}", now, message, options.LogFile); + defaultWriter = new StreamWriter (options.LogFile, true, System.Text.Encoding.UTF8) { + AutoFlush = true, + }; + break; + case "HTTP": + var hostnames = options.HostName.Split (','); + hostname = hostnames [0]; + if (hostnames.Length > 1) + Console.WriteLine ("[{0}] Found multiple host names ({1}); will only try sending to the first ({2})", now, options.HostName, hostname); + Console.WriteLine ("[{0}] Sending '{1}' results to {2}:{3}", now, message, hostname, options.HostPort); + var w = new HttpTextWriter () { + HostName = hostname, + Port = options.HostPort, + }; + w.Open (); + defaultWriter = w; + WriterFinishedTask = w.FinishedTask; + break; + default: + Console.WriteLine ("Unknown transport '{0}': switching to default (TCP)", options.Transport); + goto case "TCP"; + case "TCP": + if (!options.UseTcpTunnel) + hostname = SelectHostName (options.HostName.Split (','), options.HostPort); + else + hostname = "localhost"; + if (string.IsNullOrEmpty (hostname)) { + Console.WriteLine ("Couldn't establish a TCP connection with any of the hostnames: {0}", options.HostName); + break; + } + if (!options.UseTcpTunnel) + Console.WriteLine ("[{0}] Sending '{1}' results to {2}:{3}", now, message, hostname, options.HostPort); + else + Console.WriteLine ("[{0}] Sending '{1}' results to {2} over a tcp tunnel", now, message, options.HostPort); + defaultWriter = new TcpTextWriter (hostname, options.HostPort, options.UseTcpTunnel); + break; + } + if (options.EnableXml) { + OutputWriter formatter; + switch (options.XmlVersion) { + case XmlVersion.NUnitV3: +#if NUNITLITE_NUGET + formatter = new NUnit3XmlOutputWriter (); +#else + formatter = new NUnit3XmlOutputWriter (DateTime.UtcNow); +#endif + break; + default: +#if NUNITLITE_NUGET + formatter = new NUnit2XmlOutputWriter (); +#else + formatter = new NUnit2XmlOutputWriter (DateTime.UtcNow); +#endif + break; + } + writers.Add (new NUnitOutputTextWriter ( + this, defaultWriter, formatter, options.XmlMode)); + } else if (defaultWriter is not null) { + writers.Add (defaultWriter); + } + } catch (Exception ex) { + connection_failure = true; + if (!ShowConnectionErrorAlert (options.HostName, options.HostPort, ex)) + return false; + + Console.WriteLine ("Network error: Cannot connect to {0}:{1}: {2}. Continuing on console.", options.HostName, options.HostPort, ex); + } + } + writers.Add (Console.Out); + Writer = new MultiplexedTextWriter (writers); + } + + if (Writer is null) + Writer = Console.Out; + + Writer.WriteLine ("[Runner executing:\t{0}]", message); + Writer.WriteLine ("[MonoTouch Version:\t{0}]", Constants.Version); + Writer.WriteLine ("[Assembly:\t{0}.dll ({1} bits)]", typeof (NSObject).Assembly.GetName ().Name, IntPtr.Size * 8); + Writer.WriteLine ("[GC:\t{0}]", GC.MaxGeneration == 0 ? "Boehm" : "sgen"); + WriteDeviceInformation (Writer); + Writer.WriteLine ("[Device Locale:\t{0}]", NSLocale.CurrentLocale.Identifier); + Writer.WriteLine ("[Device Date/Time:\t{0}]", now); // to match earlier C.WL output + + Writer.WriteLine ("[Bundle:\t{0}]", NSBundle.MainBundle.BundleIdentifier); + // FIXME: add data about how the app was compiled (e.g. ARMvX, LLVM, GC and Linker options) + PassedCount = 0; + IgnoredCount = 0; + FailedCount = 0; + InconclusiveCount = 0; + return true; + } + + // returns true if test run should still start + bool ShowConnectionErrorAlert (string hostname, int port, Exception ex) + { +#if __TVOS__ || __WATCHOS__ || __MACOS__ + return true; +#else + // Don't show any alerts if we're running automated. + if (AutoStart) + return true; + + // UIAlert is not available for extensions. + if (NSBundle.MainBundle.BundlePath.EndsWith (".appex", StringComparison.Ordinal)) + return true; + + Console.WriteLine ("Network error: Cannot connect to {0}:{1}: {2}.", hostname, port, ex); + UIAlertView alert = new UIAlertView ("Network Error", + String.Format ("Cannot connect to {0}:{1}: {2}. Continue on console ?", hostname, port, ex.Message), + (IUIAlertViewDelegate) null, "Cancel", "Continue"); + int button = -1; + alert.Clicked += delegate (object sender, UIButtonEventArgs e) + { + button = (int) e.ButtonIndex; + }; + alert.Show (); + while (button == -1) + NSRunLoop.Current.RunUntil (NSDate.FromTimeIntervalSinceNow (0.5)); + Console.WriteLine (button); + Console.WriteLine ("[Host unreachable: {0}]", button == 0 ? "Execution cancelled" : "Switching to console output"); + return button != 0; +#endif + } + + protected abstract void WriteDeviceInformation (TextWriter writer); + + public virtual void Show (TestSuite suite) + { + } + + public void CloseWriter () + { + int total = PassedCount + InconclusiveCount + FailedCount; // ignored are *not* run + Writer.WriteLine ("Tests run: {0} Passed: {1} Inconclusive: {2} Failed: {3} Ignored: {4}", total, PassedCount, InconclusiveCount, FailedCount, IgnoredCount); + + // In some cases, the close is not correctly implemented and we might get a InvalidOperationException, we try to close and then null the obj for it to be + // GC. + try { + Writer.Close (); + } finally { + Writer = null; + } + } + + #endregion + + public void TestStarted (ITest test) + { + if (test is TestSuite) { + Writer.WriteLine (); +#if NUNITLITE_NUGET + Writer.WriteLine (test.FullName); +#else + Writer.WriteLine (test.Name); +#endif + } + } + + public virtual void TestFinished (ITestResult r) + { + TestResult result = r as TestResult; + + if (result.Test is TestSuite) { + if (!result.IsFailure () && !result.IsSuccess () && !result.IsInconclusive () && !result.IsIgnored ()) + Writer.WriteLine ("\t[INFO] {0}", result.Message); + var skip = result.Test.Properties ["_SKIPREASON"]; + if (skip.Count > 0) + Writer.WriteLine ("\t[SKIPREASON] {0}", skip [0]); + +#if NUNITLITE_NUGET + string name = result.Test.FullName; +#else + string name = result.Test.Name; +#endif + if (!String.IsNullOrEmpty (name)) + Writer.WriteLine ("{0} : {1} ms", name, result.GetDuration ().TotalMilliseconds); + } else { + if (result.IsSuccess ()) { + Writer.Write ("\t[PASS] "); + PassedCount++; + } else if (result.IsIgnored ()) { + Writer.Write ("\t[IGNORED] "); + IgnoredCount++; + } else if (result.IsFailure ()) { + Writer.Write ("\t[FAIL] "); + FailedCount++; + } else if (result.IsInconclusive ()) { + Writer.Write ("\t[INCONCLUSIVE] "); + InconclusiveCount++; + } else { + Writer.Write ("\t[INFO] "); + } +#if NUNITLITE_NUGET + Writer.Write (result.Test.Name); +#else + Writer.Write (result.Test.FixtureType.Name); + Writer.Write ("."); + Writer.Write (result.Test.Name); +#endif + + string message = result.Message; + if (!String.IsNullOrEmpty (message)) { + Writer.Write (" : {0}", message.Replace ("\r\n", "\\r\\n")); + } + Writer.WriteLine (); +#if NUNITLITE_NUGET + if (!string.IsNullOrEmpty (result.Output)) + Writer.WriteLine (result.Output); +#endif + + string stacktrace = result.StackTrace; + if (!String.IsNullOrEmpty (result.StackTrace)) { + string [] lines = stacktrace.Split (new char [] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + foreach (string line in lines) + Writer.WriteLine ("\t\t{0}", line); + } + } + } + + Dictionary default_settings = new Dictionary () { +#if NUNITLITE_NUGET + { "RunOnMainThread", true }, +#endif + }; + + SettingsDictionary CreateSettings (SettingsDictionary settings) + { + if (fixtures is null && (settings is null || settings.Count == 0)) + return default_settings; + + var dict = new Dictionary (default_settings); + + if (settings is not null) { + foreach (var key in settings.Keys) + dict [key?.ToString ()] = settings [key]; + } + + if (fixtures is not null) + dict ["LOAD"] = fixtures; + + return dict; + } + +#if NUNITLITE_NUGET + // we need one runner per test assembly + DefaultTestAssemblyBuilder builder = new DefaultTestAssemblyBuilder (); + List runners = new List (); + + public bool Load (string assemblyName, IDictionary settings = null) + { + var runner = new NUnitTestAssemblyRunner (builder); + runners.Add (runner); + return AddSuite ((TestSuite) runner.Load (assemblyName, CreateSettings (settings))); + } + + public bool Load (Assembly assembly, IDictionary settings = null) + { + return Load (assembly.GetName ().Name, settings); + } +#else + NUnitLiteTestAssemblyBuilder builder = new NUnitLiteTestAssemblyBuilder (); + + public bool Load (string assemblyName, SettingsDictionary settings = null) + { + return AddSuite (builder.Build (assemblyName, CreateSettings (settings))); + } + + public bool Load (Assembly assembly, SettingsDictionary settings = null) + { + return AddSuite (builder.Build (assembly, CreateSettings (settings))); + } +#endif + + bool AddSuite (TestSuite ts) + { + if (ts is null) + return false; + suite.Add (ts); + return true; + } + + public void Run (Test test) + { + PassedCount = 0; + IgnoredCount = 0; + FailedCount = 0; + InconclusiveCount = 0; + + Result = null; + +#if NUNITLITE_NUGET + var filter = new MatchTestFilter { MatchTest = test }; + if (this.filter is not null) + filter.AndFilters.Add ((TestFilter) this.filter); + if (ExcludedCategories is not null) + filter.AndFilters.Add (new ExcludeCategoryFilter (ExcludedCategories)); + if (!string.IsNullOrEmpty (TouchOptions.Current.TestName)) + filter.AndFilters.Add (TestFilter.FromXml ($"{TouchOptions.Current.TestName.Replace ("&", "&").Replace ("<", "<")}")); + foreach (var runner in runners) + runner.Run (this, filter); + + // The TestResult we get back from the runner is for the top-most test suite, + // which isn't necessarily the test that we ran. So look for the TestResult + // for the test we ran. + ITestResult find_result (ITestResult tr) + { + if (tr.Test == test) + return tr; + foreach (var child in tr.Children) { + var r = find_result (child); + if (r is not null) + return r; + } + return null; + } + + var tsr = new TestSuiteResult (suite); + foreach (var runner in runners) { + var rv = (TestResult) (find_result (runner.Result) ?? runner.Result); + if (rv is not null) + tsr.AddResult (rv); + } + Result = tsr; +#else + TestExecutionContext current = TestExecutionContext.CurrentContext; + current.WorkDirectory = Environment.CurrentDirectory; + current.Listener = this; + WorkItem wi = test.CreateWorkItem (filter, new FinallyDelegate ()); + wi.Execute (current); + Result = wi.Result; +#endif + } + + public ITest LoadedTest { + get { + return suite; + } + } + + public void NotifySelectedTest (ITest test) + { + NSUserDefaults.StandardUserDefaults.SetString (test.FullName, "CurrentTest"); + } + + public void TestOutput (TestOutput testOutput) + { + } + +#if NUNITLITE_NUGET + public void SendMessage (TestMessage message) + { + Writer.WriteLine (message.ToString ()); + } +#endif + } + +#if __WATCHOS__ + public class WatchOSRunner : BaseTouchRunner { + protected override void WriteDeviceInformation (TextWriter writer) + { + var device = WatchKit.WKInterfaceDevice.CurrentDevice; + writer.WriteLine ("[{0}:\t{1} v{2}]", device.Model, device.SystemName, device.SystemVersion); + writer.WriteLine ("[Device Name:\t{0}]", device.Name); + } + } +#endif + +#if !__WATCHOS__ && !__MACOS__ + public class ConsoleRunner : BaseTouchRunner { + protected override void WriteDeviceInformation (TextWriter writer) + { + UIDevice device = UIDevice.CurrentDevice; + writer.WriteLine ("[{0}:\t{1} v{2}]", device.Model, device.SystemName, device.SystemVersion); + writer.WriteLine ("[Device Name:\t{0}]", device.Name); + } + } + +#if !NET + [CLSCompliant (false)] +#endif + public class TouchRunner : BaseTouchRunner { + + UIWindow window; + + public TouchRunner (UIWindow window) + { + if (window is null) + throw new ArgumentNullException ("window"); + + this.window = window; + } + + public UINavigationController NavigationController { + get { return (UINavigationController) window.RootViewController; } + } + + protected override void TerminateWithSuccess () + { + Console.WriteLine ($"Exiting test run with success"); + FlushConsole (); + Selector selector = new Selector ("terminateWithSuccess"); + UIApplication.SharedApplication.PerformSelector (selector, UIApplication.SharedApplication, 0); + } + + public UIViewController GetViewController () + { + var menu = new RootElement ("Test Runner"); + + Section main = new Section ("Loading test suites..."); + menu.Add (main); + + Section options = new Section () { + new StyledStringElement ("Options", Options) { Accessory = UITableViewCellAccessory.DisclosureIndicator }, + new StyledStringElement ("Credits", Credits) { Accessory = UITableViewCellAccessory.DisclosureIndicator } + }; + menu.Add (options); + + // large unit tests applications can take more time to initialize + // than what the iOS watchdog will allow them on devices, so loading + // must be done async. + + // ensure that the dialog's view has been loaded so we can call Reload later + var dialog = new DialogViewController (menu) { Autorotate = true }; + var dialogView = dialog.View; + + TraceLine ("Queuing test loading on background thread"); + ThreadPool.QueueUserWorkItem ((v) => { + TraceLine ("Loading tests on background thread"); + LoadSync (); + TraceLine ("Loaded tests on background thread, queuing UI update on main thead"); + + ExecuteOnMainThread (() => { + TraceLine ("Updating UI on main thead"); + foreach (TestSuite ts in Suite.Tests) { + main.Add (Setup (ts)); + } + + main.Caption = null; + menu.Reload (main, UITableViewRowAnimation.Fade); + + options.Insert (0, new StringElement ("Run Everything", Run)); + menu.Reload (options, UITableViewRowAnimation.Fade); + + AutoRun (); + }); + }); + + return dialog; + } + + void Options () + { + NavigationController.PushViewController (TouchOptions.Current.GetViewController (), true); + } + + void Credits () + { + var title = new MultilineElement ("Touch.Unit Runner\nCopyright 2011-2012 Xamarin Inc.\nAll rights reserved."); + title.Alignment = UITextAlignment.Center; + + var root = new RootElement ("Credits") { + new Section () { title }, + new Section () { +#if TVOS + new StringElement ("About Xamarin: https://www.xamarin.com"), + new StringElement ("About MonoTouch: https://ios.xamarin.com"), + new StringElement ("About MonoTouch.Dialog: https://github.com/migueldeicaza/MonoTouch.Dialog"), + new StringElement ("About NUnitLite: http://www.nunitlite.org"), + new StringElement ("About Font Awesome: https://fortawesome.github.com/Font-Awesome") +#else + new HtmlElement ("About Xamarin", "https://www.xamarin.com"), + new HtmlElement ("About MonoTouch", "https://ios.xamarin.com"), + new HtmlElement ("About MonoTouch.Dialog", "https://github.com/migueldeicaza/MonoTouch.Dialog"), + new HtmlElement ("About NUnitLite", "http://www.nunitlite.org"), + new HtmlElement ("About Font Awesome", "https://fortawesome.github.com/Font-Awesome") +#endif + } + }; + + var dv = new DialogViewController (root, true) { Autorotate = true }; + NavigationController.PushViewController (dv, true); + } + + Dictionary suites_dvc = new Dictionary (); + Dictionary suite_elements = new Dictionary (); + Dictionary case_elements = new Dictionary (); + + public override void Show (TestSuite suite) + { + NavigationController.PushViewController (suites_dvc [suite], true); + } + + TestSuiteElement Setup (TestSuite suite) + { + TestSuiteElement tse = new TestSuiteElement (suite, this); + suite_elements.Add (suite, tse); + + var root = new RootElement ("Tests"); + + Section section = new Section (suite.Name); + foreach (ITest test in suite.Tests) { + TestSuite ts = (test as TestSuite); + if (ts is not null) { + section.Add (Setup (ts)); + } else { + TestMethod tc = (test as TestMethod); + if (tc is not null) { + section.Add (Setup (tc)); + } else { + throw new NotImplementedException (test.GetType ().ToString ()); + } + } + } + + root.Add (section); + + Section options = new Section () { + new StringElement ("Run all", delegate () { + if (OpenWriter (suite.Name)) { + Run (suite); + CloseWriter (); + suites_dvc [suite].Filter (); + } + }) + }; + root.Add (options); + + var tvc = new TouchViewController (root); + tvc.ViewAppearing += (object sender, EventArgs ea) => { + NotifySelectedTest (suite); + }; + suites_dvc.Add (suite, tvc); + return tse; + } + + TestCaseElement Setup (TestMethod test) + { + TestCaseElement tce = new TestCaseElement (test, this); + case_elements.Add (test, tce); + return tce; + } + + public override void TestFinished (ITestResult r) + { + base.TestFinished (r); + + ExecuteOnMainThread (() => { + TestResult result = r as TestResult; + TestSuite ts = result.Test as TestSuite; + if (ts is not null) { + TestSuiteElement tse; + if (suite_elements.TryGetValue (ts, out tse)) + tse.TestFinished (result); + } else { + TestMethod tc = result.Test as TestMethod; + if (tc is not null) + case_elements [tc].TestFinished (result); + } + }); + } + + protected override void WriteDeviceInformation (TextWriter writer) + { + UIDevice device = UIDevice.CurrentDevice; + writer.WriteLine ("[{0}:\t{1} v{2}]", device.Model, device.SystemName, device.SystemVersion); + writer.WriteLine ("[Device Name:\t{0}]", device.Name); + writer.WriteLine ("[Device UDID:\t{0}]", UniqueIdentifier); + } + + [System.Runtime.InteropServices.DllImport ("/usr/lib/libobjc.dylib")] + static extern IntPtr objc_msgSend (IntPtr receiver, IntPtr selector); + + // Apple blacklisted `uniqueIdentifier` (for the appstore) but it's still + // something useful to have inside the test logs + static string UniqueIdentifier { + get { + IntPtr handle = UIDevice.CurrentDevice.Handle; + if (UIDevice.CurrentDevice.RespondsToSelector (new Selector ("uniqueIdentifier"))) + return CFString.FromHandle (objc_msgSend (handle, Selector.GetHandle ("uniqueIdentifier"))); + return "unknown"; + } + } + + protected override void ExecuteOnMainThread (Action action) + { + window.BeginInvokeOnMainThread (() => action ()); + } + } +#endif + + // A filter that matches a specific test + class MatchTestFilter : TestFilter { + public ITest MatchTest; + public List AndFilters = new List (); + +#if NUNITLITE_NUGET + public override TNode AddToXml (TNode parentNode, bool recursive) + { + throw new NotImplementedException (); + } +#endif + + public override bool Match (ITest test) + { + if (AndFilters is not null) { + // If any of the And filters returns false, then return false too. + if (AndFilters.Any ((v) => !v.Match (test))) + return false; + } + + return IsMatch (test, MatchTest); + } + + static bool IsMatch (ITest test, ITest match) + { + if (test == match) + return true; + + if (match.HasChildren) { + foreach (var child in match.Tests) { + if (IsMatch (test, child)) + return true; + } + } + + return false; + + } + } + + class MultiplexedTextWriter : TextWriter { + List writers = new List (); + + public MultiplexedTextWriter (IEnumerable writers) + { + this.writers.AddRange (writers); + } + + public void Add (TextWriter writer) + { + writers.Add (writer); + } + + public override Encoding Encoding { + get { + return Encoding.UTF8; + } + } + + public override void Close () + { + foreach (var writer in writers) + writer.Close (); + } + + public override void Write (char value) + { + foreach (var writer in writers) + writer.Write (value); + } + + public override void Write (char [] buffer) + { + foreach (var writer in writers) + writer.Write (buffer); + } + + public override void WriteLine (string value) + { + foreach (var writer in writers) + writer.WriteLine (value); + } + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/Runner/TouchViewController.cs b/tests/common/Touch.Unit/Touch.Client/Runner/TouchViewController.cs new file mode 100644 index 000000000000..520daa2405dc --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/Runner/TouchViewController.cs @@ -0,0 +1,565 @@ +// TouchViewController.cs +// +// Authors: +// Sebastien Pouliot +// +// Copyright 2012 Xamarin Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections.Generic; +using System.Drawing; + +using CoreGraphics; +using Foundation; +using UIKit; + +using MonoTouch.Dialog; + +namespace MonoTouch.NUnit.UI { + +#if !NET + [CLSCompliant (false)] +#endif + public partial class TouchViewController : DialogViewController { + + public TouchViewController (RootElement root) : base (root, true) + { + Autorotate = true; + AutoHideSearch = true; + EnableSearch = true; + + if (UIDevice.CurrentDevice.CheckSystemVersion (5, 0)) { + NavigationItem.RightBarButtonItems = new UIBarButtonItem [] { + new UIBarButtonItem (ArrowDown, UIBarButtonItemStyle.Plain, ChangeSort), + new UIBarButtonItem (Asterisk, UIBarButtonItemStyle.Plain, ChangeFilter) + }; + } + + Section testcases = root [0]; + OriginalCaption = testcases.Caption; + Unfiltered = new List (); + foreach (Element e in testcases) + Unfiltered.Add (e); + + CurrentFilter = ResultFilter.All; + Filter (); + CurrentSortOrder = SortOrder.None; + if (TouchOptions.Current.SortNames) + ChangeSort (this, EventArgs.Empty); + } + + // Filter + + UIBarButtonItem FilterButton { + get { + return NavigationItem.RightBarButtonItems [1]; + } + } + + enum ResultFilter { + All, + Failed, + Ignored, + Success, + } + + string OriginalCaption { get; set; } + List Unfiltered { get; set; } + + ResultFilter CurrentFilter { get; set; } + + void ChangeFilter (object sender, EventArgs e) + { + switch (CurrentFilter) { + case ResultFilter.All: + CurrentFilter = ResultFilter.Failed; + FilterButton.Image = RemoveSign; + break; + case ResultFilter.Failed: + CurrentFilter = ResultFilter.Ignored; + FilterButton.Image = QuestionSign; + break; + case ResultFilter.Ignored: + CurrentFilter = ResultFilter.Success; + FilterButton.Image = OkSign; + break; + case ResultFilter.Success: + CurrentFilter = ResultFilter.All; + FilterButton.Image = Asterisk; + break; + } + Filter (); + } + + public void Filter () + { + Section filtered = new Section (); + foreach (TestElement te in Unfiltered) { + bool add_element = false; + switch (CurrentFilter) { + case ResultFilter.All: + add_element = true; + break; + case ResultFilter.Failed: + add_element = te.Result.IsFailure (); + break; + case ResultFilter.Ignored: + add_element = te.Result.IsIgnored (); + break; + case ResultFilter.Success: + add_element = te.Result.IsSuccess () || te.Result.IsInconclusive (); + break; + } + + if (add_element) + filtered.Add (te); + } + Root.RemoveAt (0); + if (CurrentFilter == ResultFilter.All) { + filtered.Caption = String.Format ("{0} ({1})", OriginalCaption, Unfiltered.Count); + } else { + filtered.Caption = String.Format ("{0} ({1} : {2}/{3})", OriginalCaption, CurrentFilter, filtered.Count, Unfiltered.Count); + } + Root.Insert (0, filtered); + ReloadData (); + } + + // Sort + + UIBarButtonItem SortButton { + get { + return NavigationItem.RightBarButtonItems [0]; + } + } + + enum SortOrder { + None, + Ascending, + Descending + } + + SortOrder CurrentSortOrder { get; set; } + + static ElementComparer Ascending = new ElementComparer (SortOrder.Ascending); + static ElementComparer Descending = new ElementComparer (SortOrder.Descending); + + void ChangeSort (object sender, EventArgs e) + { + List list = Root [0].Elements; + switch (CurrentSortOrder) { + case SortOrder.Ascending: + SortButton.Image = ArrowUp; + CurrentSortOrder = SortOrder.Descending; + list.Sort (Descending); + break; + default: + SortButton.Image = ArrowDown; + CurrentSortOrder = SortOrder.Ascending; + list.Sort (Ascending); + break; + } + ReloadData (); + } + + class ElementComparer : IComparer { + int order; + + public ElementComparer (SortOrder sortOrder) + { + order = sortOrder == SortOrder.Descending ? -1 : 1; + } + + public int Compare (Element x, Element y) + { + return order * x.Caption.CompareTo (y.Caption); + } + } + + // UI + + static UIImage arrow_up; + static UIImage arrow_down; + static UIImage ok_sign; + static UIImage remove_sign; + static UIImage question_sign; + static UIImage asterisk; + + static UIImage ArrowUp { + get { + if (arrow_up is null) + arrow_up = GetAwesomeIcon (icon_arrow_up); + return arrow_up; + } + } + + static UIImage ArrowDown { + get { + if (arrow_down is null) + arrow_down = GetAwesomeIcon (icon_arrow_down); + return arrow_down; + } + } + + static UIImage OkSign { + get { + if (ok_sign is null) + ok_sign = GetAwesomeIcon (icon_ok_sign); + return ok_sign; + } + } + + static UIImage RemoveSign { + get { + if (remove_sign is null) + remove_sign = GetAwesomeIcon (icon_remove_sign); + return remove_sign; + } + } + + static UIImage QuestionSign { + get { + if (question_sign is null) + question_sign = GetAwesomeIcon (icon_question_sign); + return question_sign; + } + } + + + static UIImage Asterisk { + get { + if (asterisk is null) + asterisk = GetAwesomeIcon (icon_asterisk); + return asterisk; + } + } + + static UIImage GetAwesomeIcon (Action render) + { + // 20x20 normal, 40x40 retina + // https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html + // http://tirania.org/blog/archive/2010/Jul-20-2.html + float size = 20f; + UIGraphics.BeginImageContextWithOptions (new CGSize (size, size), false, 0); + using (var c = UIGraphics.GetCurrentContext ()) { + c.SetFillColor (1.0f, 1.0f, 1.0f, 1.0f); + c.SetStrokeColor (1.0f, 1.0f, 1.0f, 1.0f); + c.TranslateCTM (3f, size - 3f); + c.ScaleCTM (size / 1000, -size / 1000); + render (c); + } + UIImage img = UIGraphics.GetImageFromCurrentImageContext (); + UIGraphics.EndImageContext (); + return img; + } + + #region generated code + + static void icon_arrow_up (CGContext c) + { + c.MoveTo (-0.5f, 375f); + c.AddQuadCurveToPoint (-1f, 394f, 13f, 408f); + c.AddLineToPoint (342f, 736f); + c.AddQuadCurveToPoint (356f, 750f, 375f, 750f); + c.AddQuadCurveToPoint (394f, 750f, 408f, 736f); + c.AddLineToPoint (736f, 408f); + c.AddQuadCurveToPoint (750f, 394f, 750f, 375f); + c.AddQuadCurveToPoint (750f, 356f, 736f, 342f); + c.AddLineToPoint (687f, 293f); + c.AddQuadCurveToPoint (673f, 279f, 654.5f, 279f); + c.AddQuadCurveToPoint (636f, 279f, 622f, 293f); + c.AddLineToPoint (456f, 458f); + c.AddLineToPoint (456f, 46f); + c.AddQuadCurveToPoint (456f, 27f, 442.5f, 13.5f); + c.AddQuadCurveToPoint (429f, 0f, 410f, 0f); + c.AddLineToPoint (340f, 0f); + c.AddQuadCurveToPoint (320f, 0f, 307f, 13.5f); + c.AddQuadCurveToPoint (294f, 27f, 294f, 46f); + c.AddLineToPoint (294f, 458f); + c.AddLineToPoint (129f, 293f); + c.AddQuadCurveToPoint (115f, 279f, 96f, 279f); + c.AddQuadCurveToPoint (77f, 279f, 63f, 293f); + c.AddLineToPoint (14f, 342f); + c.AddQuadCurveToPoint (0f, 356f, -0.5f, 375f); + c.ClosePath (); + c.MoveTo (-0.5f, 375f); + c.FillPath (); + c.StrokePath (); + } + + static void icon_arrow_down (CGContext c) + { + c.MoveTo (0f, 374f); + c.AddQuadCurveToPoint (0f, 393f, 14f, 407f); + c.AddLineToPoint (63f, 456f); + c.AddQuadCurveToPoint (77f, 470f, 96f, 470f); + c.AddQuadCurveToPoint (115f, 470f, 129f, 456f); + c.AddLineToPoint (294f, 291f); + c.AddLineToPoint (294f, 703f); + c.AddQuadCurveToPoint (294f, 722f, 307.5f, 735.5f); + c.AddQuadCurveToPoint (321f, 749f, 340f, 749f); + c.AddLineToPoint (410f, 749f); + c.AddQuadCurveToPoint (430f, 749f, 443f, 735.5f); + c.AddQuadCurveToPoint (456f, 722f, 456f, 703f); + c.AddLineToPoint (456f, 291f); + c.AddLineToPoint (622f, 456f); + c.AddQuadCurveToPoint (636f, 470f, 654.5f, 470f); + c.AddQuadCurveToPoint (673f, 470f, 687f, 456f); + c.AddLineToPoint (737f, 407f); + c.AddQuadCurveToPoint (751f, 393f, 751f, 374f); + c.AddQuadCurveToPoint (751f, 355f, 737f, 341f); + c.AddLineToPoint (408f, 13f); + c.AddQuadCurveToPoint (394f, -1f, 375f, -1f); + c.AddQuadCurveToPoint (356f, -1f, 342f, 13f); + c.AddLineToPoint (14f, 341f); + c.AddQuadCurveToPoint (0f, 355f, 0f, 374f); + c.ClosePath (); + c.MoveTo (0f, 374f); + c.FillPath (); + c.StrokePath (); + } + + static void icon_remove_sign (CGContext c) + { + c.MoveTo (0f, 376f); + c.AddQuadCurveToPoint (0f, 448f, 27.5f, 517f); + c.AddQuadCurveToPoint (55f, 586f, 110f, 641f); + c.AddQuadCurveToPoint (165f, 696f, 234f, 723f); + c.AddQuadCurveToPoint (303f, 750f, 375f, 750f); + c.AddQuadCurveToPoint (447f, 750f, 516f, 723f); + c.AddQuadCurveToPoint (585f, 696f, 640f, 641f); + c.AddQuadCurveToPoint (695f, 586f, 722.5f, 517f); + c.AddQuadCurveToPoint (750f, 448f, 750f, 376f); + c.AddQuadCurveToPoint (750f, 304f, 722.5f, 235f); + c.AddQuadCurveToPoint (695f, 166f, 640f, 111f); + c.AddQuadCurveToPoint (585f, 56f, 516f, 28.5f); + c.AddQuadCurveToPoint (447f, 1f, 375f, 1f); + c.AddQuadCurveToPoint (303f, 1f, 234f, 28.5f); + c.AddQuadCurveToPoint (165f, 56f, 110f, 111f); + c.AddQuadCurveToPoint (55f, 166f, 27.5f, 235f); + c.AddQuadCurveToPoint (0f, 304f, 0f, 376f); + c.ClosePath (); + c.MoveTo (0f, 376f); + c.MoveTo (185f, 240f); + c.AddLineToPoint (240f, 186f); + c.AddQuadCurveToPoint (245f, 181f, 251f, 181f); + c.AddQuadCurveToPoint (257f, 181f, 262f, 186f); + c.AddLineToPoint (376f, 300f); + c.AddLineToPoint (479f, 196f); + c.AddQuadCurveToPoint (484f, 191f, 490f, 191f); + c.AddQuadCurveToPoint (496f, 191f, 501f, 196f); + c.AddLineToPoint (554f, 249f); + c.AddQuadCurveToPoint (565f, 260f, 554f, 271f); + c.AddLineToPoint (450f, 374f); + c.AddLineToPoint (565f, 489f); + c.AddQuadCurveToPoint (576f, 500f, 565f, 511f); + c.AddLineToPoint (510f, 566f); + c.AddQuadCurveToPoint (499f, 577f, 488f, 566f); + c.AddLineToPoint (374f, 451f); + c.AddLineToPoint (270f, 555f); + c.AddQuadCurveToPoint (259f, 566f, 248f, 555f); + c.AddLineToPoint (196f, 502f); + c.AddQuadCurveToPoint (191f, 497f, 191f, 491f); + c.AddQuadCurveToPoint (191f, 485f, 196f, 480f); + c.AddLineToPoint (299f, 377f); + c.AddLineToPoint (185f, 262f); + c.AddQuadCurveToPoint (175f, 252f, 185f, 240f); + c.ClosePath (); + c.MoveTo (185f, 240f); + c.FillPath (); + c.StrokePath (); + } + + static void icon_ok_sign (CGContext c) + { + c.MoveTo (0f, 375f); + c.AddQuadCurveToPoint (0f, 453f, 29.5f, 521f); + c.AddQuadCurveToPoint (59f, 589f, 110f, 640f); + c.AddQuadCurveToPoint (161f, 691f, 229f, 720.5f); + c.AddQuadCurveToPoint (297f, 750f, 375f, 750f); + c.AddQuadCurveToPoint (453f, 750f, 521f, 720.5f); + c.AddQuadCurveToPoint (589f, 691f, 640f, 640f); + c.AddQuadCurveToPoint (691f, 589f, 720.5f, 521f); + c.AddQuadCurveToPoint (750f, 453f, 750f, 375f); + c.AddQuadCurveToPoint (750f, 297f, 720.5f, 229f); + c.AddQuadCurveToPoint (691f, 161f, 640f, 110f); + c.AddQuadCurveToPoint (589f, 59f, 521f, 29.5f); + c.AddQuadCurveToPoint (453f, 0f, 375f, 0f); + c.AddQuadCurveToPoint (297f, 0f, 229f, 29.5f); + c.AddQuadCurveToPoint (161f, 59f, 110f, 110f); + c.AddQuadCurveToPoint (59f, 161f, 29.5f, 229f); + c.AddQuadCurveToPoint (0f, 297f, 0f, 375f); + c.ClosePath (); + c.MoveTo (0f, 375f); + c.MoveTo (112f, 351.5f); + c.AddQuadCurveToPoint (112f, 342f, 119f, 335f); + c.AddLineToPoint (269f, 185f); + c.AddQuadCurveToPoint (276f, 179f, 287f, 174f); + c.AddQuadCurveToPoint (298f, 169f, 308f, 169f); + c.AddLineToPoint (333f, 169f); + c.AddQuadCurveToPoint (343f, 169f, 354f, 174f); + c.AddQuadCurveToPoint (365f, 179f, 372f, 185f); + c.AddLineToPoint (631f, 444f); + c.AddQuadCurveToPoint (638f, 451f, 638f, 460.5f); + c.AddQuadCurveToPoint (638f, 470f, 631f, 476f); + c.AddLineToPoint (581f, 526f); + c.AddQuadCurveToPoint (575f, 533f, 565.5f, 533f); + c.AddQuadCurveToPoint (556f, 533f, 549f, 526f); + c.AddLineToPoint (337f, 313f); + c.AddQuadCurveToPoint (330f, 306f, 320.5f, 306f); + c.AddQuadCurveToPoint (311f, 306f, 305f, 313f); + c.AddLineToPoint (201f, 417f); + c.AddQuadCurveToPoint (194f, 424f, 184.5f, 424f); + c.AddQuadCurveToPoint (175f, 424f, 169f, 417f); + c.AddLineToPoint (119f, 368f); + c.AddQuadCurveToPoint (112f, 361f, 112f, 351.5f); + c.ClosePath (); + c.MoveTo (112f, 351.5f); + c.FillPath (); + c.StrokePath (); + } + + static void icon_question_sign (CGContext c) + { + c.MoveTo (0f, 375f); + c.AddQuadCurveToPoint (0f, 453f, 29.5f, 521f); + c.AddQuadCurveToPoint (59f, 589f, 110f, 640f); + c.AddQuadCurveToPoint (161f, 691f, 229f, 720.5f); + c.AddQuadCurveToPoint (297f, 750f, 375f, 750f); + c.AddQuadCurveToPoint (453f, 750f, 521f, 720.5f); + c.AddQuadCurveToPoint (589f, 691f, 640f, 640f); + c.AddQuadCurveToPoint (691f, 589f, 720.5f, 521f); + c.AddQuadCurveToPoint (750f, 453f, 750f, 375f); + c.AddQuadCurveToPoint (750f, 297f, 720.5f, 229f); + c.AddQuadCurveToPoint (691f, 161f, 640f, 110f); + c.AddQuadCurveToPoint (589f, 59f, 521f, 29.5f); + c.AddQuadCurveToPoint (453f, 0f, 375f, 0f); + c.AddQuadCurveToPoint (297f, 0f, 229f, 29.5f); + c.AddQuadCurveToPoint (161f, 59f, 110f, 110f); + c.AddQuadCurveToPoint (59f, 161f, 29.5f, 229f); + c.AddQuadCurveToPoint (0f, 297f, 0f, 375f); + c.ClosePath (); + c.MoveTo (0f, 375f); + c.MoveTo (250f, 531f); + c.AddLineToPoint (294f, 476f); + c.AddQuadCurveToPoint (300f, 472f, 304f, 471f); + c.AddQuadCurveToPoint (310f, 471f, 314f, 475f); + c.AddQuadCurveToPoint (322f, 481f, 332f, 486f); + c.AddQuadCurveToPoint (340f, 490f, 350.5f, 493.5f); + c.AddQuadCurveToPoint (361f, 497f, 372f, 497f); + c.AddQuadCurveToPoint (392f, 497f, 405f, 486.5f); + c.AddQuadCurveToPoint (418f, 476f, 418f, 460f); + c.AddQuadCurveToPoint (418f, 443f, 406.5f, 429.5f); + c.AddQuadCurveToPoint (395f, 416f, 378f, 401f); + c.AddQuadCurveToPoint (367f, 392f, 356f, 381.5f); + c.AddQuadCurveToPoint (345f, 371f, 336f, 357.5f); + c.AddQuadCurveToPoint (327f, 344f, 321f, 327.5f); + c.AddQuadCurveToPoint (315f, 311f, 315f, 290f); + c.AddLineToPoint (315f, 260f); + c.AddQuadCurveToPoint (315f, 255f, 319.5f, 250.5f); + c.AddQuadCurveToPoint (324f, 246f, 329f, 246f); + c.AddLineToPoint (406f, 246f); + c.AddQuadCurveToPoint (412f, 246f, 416f, 250.5f); + c.AddQuadCurveToPoint (420f, 255f, 420f, 260f); + c.AddLineToPoint (420f, 285f); + c.AddQuadCurveToPoint (420f, 303f, 432f, 316f); + c.AddQuadCurveToPoint (444f, 329f, 461f, 344f); + c.AddQuadCurveToPoint (473f, 354f, 485f, 365.5f); + c.AddQuadCurveToPoint (497f, 377f, 506.5f, 392f); + c.AddQuadCurveToPoint (516f, 407f, 522.5f, 425f); + c.AddQuadCurveToPoint (529f, 443f, 529f, 467f); + c.AddQuadCurveToPoint (529f, 499f, 516f, 524f); + c.AddQuadCurveToPoint (503f, 549f, 481.5f, 565.5f); + c.AddQuadCurveToPoint (460f, 582f, 433f, 590.5f); + c.AddQuadCurveToPoint (406f, 599f, 379f, 599f); + c.AddQuadCurveToPoint (349f, 599f, 325.5f, 591.5f); + c.AddQuadCurveToPoint (302f, 584f, 285.5f, 575f); + c.AddQuadCurveToPoint (269f, 566f, 260.5f, 558f); + c.AddQuadCurveToPoint (252f, 550f, 251f, 549f); + c.AddQuadCurveToPoint (242f, 540f, 250f, 531f); + c.ClosePath (); + c.MoveTo (250f, 531f); + c.MoveTo (315f, 132f); + c.AddQuadCurveToPoint (315f, 127f, 319.5f, 122.5f); + c.AddQuadCurveToPoint (324f, 118f, 329f, 118f); + c.AddLineToPoint (406f, 118f); + c.AddQuadCurveToPoint (412f, 118f, 416f, 122.5f); + c.AddQuadCurveToPoint (420f, 127f, 420f, 132f); + c.AddLineToPoint (420f, 206f); + c.AddQuadCurveToPoint (420f, 220f, 406f, 220f); + c.AddLineToPoint (329f, 220f); + c.AddQuadCurveToPoint (324f, 220f, 319.5f, 216f); + c.AddQuadCurveToPoint (315f, 212f, 315f, 206f); + c.AddLineToPoint (315f, 132f); + c.ClosePath (); + c.MoveTo (315f, 132f); + c.FillPath (); + c.StrokePath (); + } + + static void icon_asterisk (CGContext c) + { + c.MoveTo (1f, 497f); + c.AddQuadCurveToPoint (-4f, 515f, 6f, 532f); + c.AddLineToPoint (41f, 593f); + c.AddQuadCurveToPoint (51f, 610f, 69.5f, 614.5f); + c.AddQuadCurveToPoint (88f, 619f, 105f, 610f); + c.AddLineToPoint (267f, 516f); + c.AddLineToPoint (267f, 703f); + c.AddQuadCurveToPoint (267f, 723f, 280.5f, 736.5f); + c.AddQuadCurveToPoint (294f, 750f, 314f, 750f); + c.AddLineToPoint (383f, 750f); + c.AddQuadCurveToPoint (403f, 750f, 416.5f, 736.5f); + c.AddQuadCurveToPoint (430f, 723f, 430f, 704f); + c.AddLineToPoint (430f, 516f); + c.AddLineToPoint (592f, 610f); + c.AddQuadCurveToPoint (609f, 619f, 627.5f, 614.5f); + c.AddQuadCurveToPoint (646f, 610f, 656f, 593f); + c.AddLineToPoint (690f, 532f); + c.AddQuadCurveToPoint (700f, 515f, 695.5f, 497f); + c.AddQuadCurveToPoint (691f, 479f, 674f, 469f); + c.AddLineToPoint (511f, 375f); + c.AddLineToPoint (674f, 281f); + c.AddQuadCurveToPoint (691f, 271f, 695.5f, 253f); + c.AddQuadCurveToPoint (700f, 235f, 691f, 218f); + c.AddLineToPoint (656f, 157f); + c.AddQuadCurveToPoint (646f, 140f, 627.5f, 135.5f); + c.AddQuadCurveToPoint (609f, 131f, 592f, 140f); + c.AddLineToPoint (430f, 234f); + c.AddLineToPoint (430f, 47f); + c.AddQuadCurveToPoint (430f, 27f, 416.5f, 13.5f); + c.AddQuadCurveToPoint (403f, 0f, 383f, 0f); + c.AddLineToPoint (314f, 0f); + c.AddQuadCurveToPoint (294f, 0f, 280.5f, 13.5f); + c.AddQuadCurveToPoint (267f, 27f, 267f, 46f); + c.AddLineToPoint (267f, 234f); + c.AddLineToPoint (105f, 140f); + c.AddQuadCurveToPoint (88f, 130f, 69.5f, 135f); + c.AddQuadCurveToPoint (51f, 140f, 41f, 157f); + c.AddLineToPoint (6f, 218f); + c.AddQuadCurveToPoint (-3f, 235f, 1.5f, 253f); + c.AddQuadCurveToPoint (6f, 271f, 23f, 281f); + c.AddLineToPoint (186f, 375f); + c.AddLineToPoint (23f, 469f); + c.AddQuadCurveToPoint (6f, 479f, 1f, 497f); + c.ClosePath (); + c.MoveTo (1f, 497f); + c.FillPath (); + c.StrokePath (); + } + + #endregion + } +} diff --git a/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.MacCatalyst.csproj b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.MacCatalyst.csproj new file mode 100644 index 000000000000..f523ac0b7ea4 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.MacCatalyst.csproj @@ -0,0 +1,10 @@ + + + + net$(BundledNETCoreAppTargetFrameworkVersion)-maccatalyst + + + + + + diff --git a/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.iOS.csproj b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.iOS.csproj new file mode 100644 index 000000000000..ee9e9bf9a47a --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.iOS.csproj @@ -0,0 +1,10 @@ + + + + net$(BundledNETCoreAppTargetFrameworkVersion)-ios + + + + + + diff --git a/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.macOS.csproj b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.macOS.csproj new file mode 100644 index 000000000000..bb5bbe89bd85 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.macOS.csproj @@ -0,0 +1,11 @@ + + + + net$(BundledNETCoreAppTargetFrameworkVersion)-macos + + + + + + + diff --git a/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.tvOS.csproj b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.tvOS.csproj new file mode 100644 index 000000000000..137d91e326af --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.tvOS.csproj @@ -0,0 +1,10 @@ + + + + net$(BundledNETCoreAppTargetFrameworkVersion)-tvos + + + + + + diff --git a/tests/common/Touch.Unit/Touch.Client/dotnet/shared.csproj b/tests/common/Touch.Unit/Touch.Client/dotnet/shared.csproj new file mode 100644 index 000000000000..c473f7ddd166 --- /dev/null +++ b/tests/common/Touch.Unit/Touch.Client/dotnet/shared.csproj @@ -0,0 +1,68 @@ + + + NUNITLITE_NUGET + latest + Touch.Client + + + $(NoWarn);CA1416 + + $(NoWarn);CA1422 + + + + ExcludedCategoryFilter.cs + + + HttpTextWriter.cs + + + NUnitOutputTextWriter.cs + + + TcpTextWriter.cs + + + TestRocks.cs + + + TouchOptions.cs + + + TouchRunner.cs + + + + + MacRunner.cs + + + + + TestCaseElement.cs + + + TestElement.cs + + + TestResultElement.cs + + + TestSuiteElement.cs + + + TouchViewController.cs + + + + + 3.12.0 + + + 3.6.0 + + + 6.12.0.148 + + + diff --git a/tests/common/shared-dotnet.csproj b/tests/common/shared-dotnet.csproj index 04218f017312..107056c856a2 100644 --- a/tests/common/shared-dotnet.csproj +++ b/tests/common/shared-dotnet.csproj @@ -93,11 +93,12 @@ - + + diff --git a/tests/common/shared-dotnet.mk b/tests/common/shared-dotnet.mk index 91caa4161ad0..14fd5693eccd 100644 --- a/tests/common/shared-dotnet.mk +++ b/tests/common/shared-dotnet.mk @@ -31,11 +31,16 @@ include $(TOP)/mk/colors.mk # ⚠️ This target may hang for reasons I haven't been able to figure ⚠️ # ⚠️ out yet, in which case just cancel (Ctrl-C) and try again ⚠️ # +# ➡️ list-variations +# +# Lists all the test variations for the current test project. +# # Options: # # ➡️ UNIVERSAL=1: build a universal app instead of whatever the default is. # ➡️ RUNTIMEIDENTIFIERS=...: list the runtime identifiers to build for. # ➡️ CONFIG=configuration: the configuration to use (defaults to Debug) +# ➡️ TEST_VARIATION=variation: the test variation to use. Run 'make list-variations' to get a list of all the valid test variations. # # Example to run monotouch-test on Mac Catalyst: # @@ -118,6 +123,9 @@ PATH_RID=$(RID)/ export RUNTIMEIDENTIFIER=$(RID) endif +ifneq ($(TEST_VARIATION),) +TEST_VARIATION_ARGUMENT=/p:TestVariation=$(TEST_VARIATION) +endif ifeq ($(PLATFORM),iOS) EXECUTABLE="$(abspath .)/bin/$(CONFIG)/$(TEST_TFM)-ios/$(PATH_RID)$(TESTNAME).app/$(TESTNAME)" @@ -153,10 +161,10 @@ reload-and-run: $(Q) $(MAKE) run build: prepare - $(Q) $(DOTNET) build "/bl:$(abspath $@-$(BINLOG_TIMESTAMP).binlog)" *.?sproj $(DOTNET_BUILD_VERBOSITY) $(BUILD_ARGUMENTS) $(CONFIG_ARGUMENT) $(UNIVERSAL_ARGUMENT) $(NATIVEAOT_ARGUMENTS) + $(Q) $(DOTNET) build "/bl:$(abspath $@-$(BINLOG_TIMESTAMP).binlog)" *.?sproj $(DOTNET_BUILD_VERBOSITY) $(BUILD_ARGUMENTS) $(CONFIG_ARGUMENT) $(UNIVERSAL_ARGUMENT) $(NATIVEAOT_ARGUMENTS) $(TEST_VARIATION_ARGUMENT) run: prepare - $(Q) $(DOTNET) build "/bl:$(abspath $@-$(BINLOG_TIMESTAMP).binlog)" *.?sproj $(DOTNET_BUILD_VERBOSITY) $(BUILD_ARGUMENTS) $(CONFIG_ARGUMENT) $(UNIVERSAL_ARGUMENT) $(NATIVEAOT_ARGUMENTS) -t:Run + $(Q) $(DOTNET) build "/bl:$(abspath $@-$(BINLOG_TIMESTAMP).binlog)" *.?sproj $(DOTNET_BUILD_VERBOSITY) $(BUILD_ARGUMENTS) $(CONFIG_ARGUMENT) $(UNIVERSAL_ARGUMENT) $(NATIVEAOT_ARGUMENTS) $(TEST_VARIATION_ARGUMENT) -t:Run run-bare: $(Q) $(EXECUTABLE) --autostart --autoexit $(RUN_ARGUMENTS) @@ -186,5 +194,13 @@ diag: prepare select binlog in $(BINLOGS); do $(DOTNET) build /v:diag $$binlog; break; done \ fi +list-variations listvariations show-variations showvariations variations: + $(Q) if ! command -v jq > /dev/null; then echo "$(shell tput setaf 9)jq isn't installed. Install by doing 'brew install jq'$(shell tput sgr0)"; exit 1; fi + $(Q) echo "Test variations for $(shell tput setaf 6)$(TESTNAME)$(shell tput sgr0):" + $(Q) echo "" + $(Q) $(DOTNET) build -getItem:TestVariations | jq '.Items.TestVariations[] | "\(.Identity): \(.Description)"' | sed -e 's/^"/ /' -e 's/"$$//' + $(Q) echo "" + $(Q) echo "Build and run a specific variation by doing $(shell tput setaf 6)make build TEST_VARIATION=variation$(shell tput sgr0)" + clean: rm -Rf bin obj *.binlog diff --git a/tests/common/test-variations.csproj b/tests/common/test-variations.csproj new file mode 100644 index 000000000000..0e83fdc193fb --- /dev/null +++ b/tests/common/test-variations.csproj @@ -0,0 +1,28 @@ + + + + + + + + + + + true + + + + true + + + + false + + + + + <_FilteredTestVariations Include="@(TestVariations)" Condition="'%(Identity)' == '$(TestVariation)'" /> + + + + diff --git a/tests/dotnet/BundleStructure/shared.csproj b/tests/dotnet/BundleStructure/shared.csproj index d36fd4d6ccf6..5fc64ce2ecd4 100644 --- a/tests/dotnet/BundleStructure/shared.csproj +++ b/tests/dotnet/BundleStructure/shared.csproj @@ -12,6 +12,9 @@ $(MSBuildThisFileDirectory)/../.. false + + + warn diff --git a/tests/dotnet/UnitTests/BundleStructureTest.cs b/tests/dotnet/UnitTests/BundleStructureTest.cs index 6006c77be660..41a9bac0d51c 100644 --- a/tests/dotnet/UnitTests/BundleStructureTest.cs +++ b/tests/dotnet/UnitTests/BundleStructureTest.cs @@ -304,6 +304,7 @@ internal static void CheckAppBundleContents (ApplePlatform platform, IEnumerable AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "MonoTouch.Dialog", runtimeIdentifiers, forceSingleRid: (platform == ApplePlatform.MacCatalyst && !isReleaseBuild), includeDebugFiles: includeDebugFiles); expectedFiles.Add (Path.Combine (assemblyDirectory, "nunit.framework.dll")); expectedFiles.Add (Path.Combine (assemblyDirectory, "nunitlite.dll")); + expectedFiles.Add (Path.Combine (assemblyDirectory, "Mono.Options.dll")); bool forceSingleRidTouchClient = (platform == ApplePlatform.MacCatalyst && !isReleaseBuild) || platform == ApplePlatform.MacOSX; AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "Touch.Client", runtimeIdentifiers, forceSingleRidTouchClient, includeDebugFiles: includeDebugFiles); bool forceSinglePlatformAssembly = platform == ApplePlatform.MacOSX; diff --git a/tests/dotnet/UnitTests/DotNetUnitTests.csproj b/tests/dotnet/UnitTests/DotNetUnitTests.csproj index e56cc641adaa..a8c415fc8f63 100644 --- a/tests/dotnet/UnitTests/DotNetUnitTests.csproj +++ b/tests/dotnet/UnitTests/DotNetUnitTests.csproj @@ -14,6 +14,7 @@ + diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index f90983bae8fd..b4fe0f7805bb 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -789,44 +789,68 @@ public void AppWithResources (ApplePlatform platform, string runtimeIdentifiers) } [Category ("Windows")] - [TestCase (ApplePlatform.iOS)] - public void LibraryWithResourcesOnWindows (ApplePlatform platform) + [TestCase (ApplePlatform.iOS, true)] + [TestCase (ApplePlatform.iOS, false)] + [TestCase (ApplePlatform.iOS, null)] + public void LibraryWithResourcesOnWindows (ApplePlatform platform, bool? bundleOriginalResources) { Configuration.IgnoreIfNotOnWindows (); - LibraryWithResources (platform, anyLibraryResources: false); + // This should all execute locally on Windows when BundleOriginalResources=true + LibraryWithResources (platform, anyLibraryResources: bundleOriginalResources == true, bundleOriginalResources: bundleOriginalResources); } + [Category ("RemoteWindows")] - [TestCase (ApplePlatform.iOS)] - public void LibraryWithResourcesOnRemoteWindows (ApplePlatform platform) + [TestCase (ApplePlatform.iOS, true)] + [TestCase (ApplePlatform.iOS, false)] + public void LibraryWithResourcesOnRemoteWindows (ApplePlatform platform, bool? bundleOriginalResources) { Configuration.IgnoreIfNotOnWindows (); - LibraryWithResources (platform); + // This should all execute locally on Windows when BundleOriginalResources=true, but either should work + LibraryWithResources (platform, bundleOriginalResources); } - [TestCase (ApplePlatform.iOS)] - [TestCase (ApplePlatform.TVOS)] - [TestCase (ApplePlatform.MacCatalyst)] - [TestCase (ApplePlatform.MacOSX)] - public void LibraryWithResources (ApplePlatform platform, bool anyLibraryResources = true) + [TestCase (ApplePlatform.iOS, true)] + [TestCase (ApplePlatform.iOS, false)] + [TestCase (ApplePlatform.iOS, null)] + [TestCase (ApplePlatform.TVOS, true)] + [TestCase (ApplePlatform.TVOS, false)] + [TestCase (ApplePlatform.TVOS, null)] + [TestCase (ApplePlatform.MacCatalyst, true)] + [TestCase (ApplePlatform.MacCatalyst, false)] + [TestCase (ApplePlatform.MacCatalyst, null)] + [TestCase (ApplePlatform.MacOSX, true)] + [TestCase (ApplePlatform.MacOSX, false)] + [TestCase (ApplePlatform.MacOSX, null)] + public void LibraryWithResources (ApplePlatform platform, bool? bundleOriginalResources, bool anyLibraryResources = true) { var project = "LibraryWithResources"; Configuration.IgnoreIfIgnoredPlatform (platform); + var actualBundleOriginalResources = bundleOriginalResources ?? Version.Parse (Configuration.DotNetTfm.Replace ("net", "")).Major >= 10; var project_path = GetProjectPath (project, platform: platform); Clean (project_path); var properties = GetDefaultProperties (); + if (bundleOriginalResources.HasValue) + properties ["BundleOriginalResources"] = bundleOriginalResources.Value ? "true" : "false"; + var rv = DotNet.AssertBuild (project_path, properties); var allTargets = BinLog.GetAllTargets (rv.BinLogPath).Where (v => !v.Skipped).Select (v => v.TargetName); // https://github.com/xamarin/xamarin-macios/issues/15031 - Assert.That (allTargets, Does.Contain ("_CompileAppManifest"), "Did execute '_CompileAppManifest'"); - Assert.That (allTargets, Does.Contain ("_DetectSdkLocations"), "Did execute '_DetectSdkLocations'"); - if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform (System.Runtime.InteropServices.OSPlatform.Windows)) - Assert.That (allTargets, Does.Contain ("_SayHello"), "Did execute '_SayHello'"); + if (actualBundleOriginalResources) { + Assert.That (allTargets, Does.Not.Contain ("_CompileAppManifest"), "Didn't execute '_CompileAppManifest'"); + Assert.That (allTargets, Does.Not.Contain ("_DetectSdkLocations"), "Didn't execute '_DetectSdkLocations'"); + Assert.That (allTargets, Does.Not.Contain ("_SayHello"), "Didn't execute '_SayHello'"); + } else { + Assert.That (allTargets, Does.Contain ("_CompileAppManifest"), "Did execute '_CompileAppManifest'"); + Assert.That (allTargets, Does.Contain ("_DetectSdkLocations"), "Did execute '_DetectSdkLocations'"); + if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform (System.Runtime.InteropServices.OSPlatform.Windows)) + Assert.That (allTargets, Does.Contain ("_SayHello"), "Did execute '_SayHello'"); + } var lines = BinLog.PrintToLines (rv.BinLogPath); // Find the resulting binding assembly from the build log @@ -844,88 +868,127 @@ public void LibraryWithResources (ApplePlatform platform, bool anyLibraryResourc if (anyLibraryResources) { var platformPrefix = (platform == ApplePlatform.MacOSX) ? "xammac" : "monotouch"; - var expectedList = new List (); - expectedList.Add ($"__{platformPrefix}_content_A.ttc"); - expectedList.Add ($"__{platformPrefix}_content_Archer__Attack.atlasc_sArcher__Attack.plist"); - expectedList.Add ($"__{platformPrefix}_content_art.scnassets_sscene.scn"); - expectedList.Add ($"__{platformPrefix}_content_art.scnassets_stexture.png"); - expectedList.Add ($"__{platformPrefix}_content_Assets.car"); - expectedList.Add ($"__{platformPrefix}_content_B.otf"); - expectedList.Add ($"__{platformPrefix}_content_C.ttf"); - expectedList.Add ($"__{platformPrefix}_content_DirWithResources_slinkedArt.scnassets_sscene.scn"); - expectedList.Add ($"__{platformPrefix}_content_DirWithResources_slinkedArt.scnassets_stexture.png"); - expectedList.Add ($"__{platformPrefix}_content_scene.dae"); - switch (platform) { - case ApplePlatform.iOS: - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sBYZ-38-t0r-view-8bC-Xf-vdC.nib"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sUIViewController-BYZ-38-t0r.nib"); - break; - case ApplePlatform.TVOS: - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sBYZ-38-t0r-view-8bC-Xf-vdC.nib"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sUIViewController-BYZ-38-t0r.nib"); - break; - case ApplePlatform.MacCatalyst: - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_s1-view-2.nib"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sUIViewController-1.nib"); - break; - case ApplePlatform.MacOSX: - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sMainMenu.nib"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sNSWindowController-B8D-0N-5wS.nib"); - expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sXfG-lQ-9wD-view-m2S-Jp-Qdl.nib"); - break; + if (actualBundleOriginalResources) { + expectedResources = new string [] { + $"__{platformPrefix}_content_A.ttc", + $"__{platformPrefix}_content_B.otf", + $"__{platformPrefix}_content_C.ttf", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0001.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0002.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0003.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0004.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0005.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0006.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0007.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0008.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0009.png", + $"__{platformPrefix}_item_AtlasTexture_Archer__Attack.atlas_sarcher__attack__0010.png", + $"__{platformPrefix}_item_BundleResource_A.ttc", + $"__{platformPrefix}_item_BundleResource_B.otf", + $"__{platformPrefix}_item_BundleResource_C.ttf", + $"__{platformPrefix}_item_Collada_scene.dae", + $"__{platformPrefix}_item_CoreMLModel_SqueezeNet.mlmodel", + $"__{platformPrefix}_item_ImageAsset_Images.xcassets_sContents.json", + $"__{platformPrefix}_item_ImageAsset_Images.xcassets_sImage.imageset_sContents.json", + $"__{platformPrefix}_item_ImageAsset_Images.xcassets_sImage.imageset_sIcon16.png", + $"__{platformPrefix}_item_ImageAsset_Images.xcassets_sImage.imageset_sIcon32.png", + $"__{platformPrefix}_item_ImageAsset_Images.xcassets_sImage.imageset_sIcon64.png", + $"__{platformPrefix}_item_InterfaceDefinition_Main.storyboard", + $"__{platformPrefix}_item_PartialAppManifest_shared.plist", + $"__{platformPrefix}_item_SceneKitAsset_art.scnassets_sscene.scn", + $"__{platformPrefix}_item_SceneKitAsset_art.scnassets_stexture.png", + $"__{platformPrefix}_item_SceneKitAsset_DirWithResources_slinkedArt.scnassets_sscene.scn", + $"__{platformPrefix}_item_SceneKitAsset_DirWithResources_slinkedArt.scnassets_stexture.png", + }; + } else { + var expectedList = new List (); + expectedList.Add ($"__{platformPrefix}_content_A.ttc"); + expectedList.Add ($"__{platformPrefix}_content_Archer__Attack.atlasc_sArcher__Attack.plist"); + expectedList.Add ($"__{platformPrefix}_content_art.scnassets_sscene.scn"); + expectedList.Add ($"__{platformPrefix}_content_art.scnassets_stexture.png"); + expectedList.Add ($"__{platformPrefix}_content_Assets.car"); + expectedList.Add ($"__{platformPrefix}_content_B.otf"); + expectedList.Add ($"__{platformPrefix}_content_C.ttf"); + expectedList.Add ($"__{platformPrefix}_content_DirWithResources_slinkedArt.scnassets_sscene.scn"); + expectedList.Add ($"__{platformPrefix}_content_DirWithResources_slinkedArt.scnassets_stexture.png"); + expectedList.Add ($"__{platformPrefix}_content_scene.dae"); + switch (platform) { + case ApplePlatform.iOS: + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sBYZ-38-t0r-view-8bC-Xf-vdC.nib"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sUIViewController-BYZ-38-t0r.nib"); + break; + case ApplePlatform.TVOS: + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sBYZ-38-t0r-view-8bC-Xf-vdC.nib"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sUIViewController-BYZ-38-t0r.nib"); + break; + case ApplePlatform.MacCatalyst: + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_s1-view-2.nib"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sUIViewController-1.nib"); + break; + case ApplePlatform.MacOSX: + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sInfo.plist"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sMainMenu.nib"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sNSWindowController-B8D-0N-5wS.nib"); + expectedList.Add ($"__{platformPrefix}_content_Main.storyboardc_sXfG-lQ-9wD-view-m2S-Jp-Qdl.nib"); + break; + } + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_sanalytics_scoremldata.bin"); + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_scoremldata.bin"); + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smetadata.json"); + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel.espresso.net"); + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel.espresso.shape"); + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel.espresso.weights"); + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel_scoremldata.bin"); + expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_sneural__network__optionals_scoremldata.bin"); + expectedResources = expectedList.ToArray (); } - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_sanalytics_scoremldata.bin"); - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_scoremldata.bin"); - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smetadata.json"); - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel.espresso.net"); - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel.espresso.shape"); - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel.espresso.weights"); - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_smodel_scoremldata.bin"); - expectedList.Add ($"__{platformPrefix}_content_SqueezeNet.mlmodelc_sneural__network__optionals_scoremldata.bin"); - expectedResources = expectedList.ToArray (); } else { expectedResources = new string [0]; } CollectionAssert.AreEquivalent (expectedResources, actualResources, "Resources"); } - [TestCase (ApplePlatform.iOS, "ios-arm64")] - [TestCase (ApplePlatform.TVOS, "tvossimulator-arm64")] - [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64")] - [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64")] - [TestCase (ApplePlatform.MacOSX, "osx-x64")] - [TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64")] - public void AppWithLibraryWithResourcesReference (ApplePlatform platform, string runtimeIdentifiers) + [TestCase (ApplePlatform.iOS, "ios-arm64", false)] + [TestCase (ApplePlatform.iOS, "ios-arm64", true)] + [TestCase (ApplePlatform.TVOS, "tvossimulator-arm64", false)] + [TestCase (ApplePlatform.TVOS, "tvossimulator-arm64", true)] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64", false)] + [TestCase (ApplePlatform.MacCatalyst, "maccatalyst-arm64;maccatalyst-x64", true)] + [TestCase (ApplePlatform.MacOSX, "osx-x64", true)] + [TestCase (ApplePlatform.MacOSX, "osx-arm64;osx-x64", false)] + public void AppWithLibraryWithResourcesReference (ApplePlatform platform, string runtimeIdentifiers, bool bundleOriginalResources) { - AppWithLibraryWithResourcesReferenceImpl (platform, runtimeIdentifiers, false, false); + AppWithLibraryWithResourcesReferenceImpl (platform, runtimeIdentifiers, bundleOriginalResources, false, false); } + [Category ("RemoteWindows")] - [TestCase (ApplePlatform.iOS, "ios-arm64")] - public void AppWithLibraryWithResourcesReferenceOnRemoteWindows (ApplePlatform platform, string runtimeIdentifiers) + [TestCase (ApplePlatform.iOS, "ios-arm64", false)] + [TestCase (ApplePlatform.iOS, "ios-arm64", true)] + public void AppWithLibraryWithResourcesReferenceOnRemoteWindows (ApplePlatform platform, string runtimeIdentifiers, bool bundleOriginalResources) { Configuration.IgnoreIfNotOnWindows (); - AppWithLibraryWithResourcesReferenceImpl (platform, runtimeIdentifiers, true, false); + AppWithLibraryWithResourcesReferenceImpl (platform, runtimeIdentifiers, bundleOriginalResources, true, false); } [Category ("Windows")] - [TestCase (ApplePlatform.iOS, "ios-arm64")] - public void AppWithLibraryWithResourcesReferenceWithHotRestart (ApplePlatform platform, string runtimeIdentifiers) + [TestCase (ApplePlatform.iOS, "ios-arm64", false)] + [TestCase (ApplePlatform.iOS, "ios-arm64", true)] + public void AppWithLibraryWithResourcesReferenceWithHotRestart (ApplePlatform platform, string runtimeIdentifiers, bool bundleOriginalResources) { Configuration.IgnoreIfNotOnWindows (); - AppWithLibraryWithResourcesReferenceImpl (platform, runtimeIdentifiers, false, isUsingHotRestart: true); + AppWithLibraryWithResourcesReferenceImpl (platform, runtimeIdentifiers, bundleOriginalResources, false, isUsingHotRestart: true); } - void AppWithLibraryWithResourcesReferenceImpl (ApplePlatform platform, string runtimeIdentifiers, bool remoteWindows, bool isUsingHotRestart) + void AppWithLibraryWithResourcesReferenceImpl (ApplePlatform platform, string runtimeIdentifiers, bool bundleOriginalResources, bool remoteWindows, bool isUsingHotRestart) { var project = "AppWithLibraryWithResourcesReference"; - var config = "Debug"; + var config = bundleOriginalResources ? "DebugOriginal" : "DebugCompiled"; Configuration.IgnoreIfIgnoredPlatform (platform); Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers); @@ -946,6 +1009,7 @@ void AppWithLibraryWithResourcesReferenceImpl (ApplePlatform platform, string ru var properties = GetDefaultProperties (runtimeIdentifiers, extraProperties); properties ["Configuration"] = config; + properties ["BundleOriginalResources"] = bundleOriginalResources ? "true" : "false"; if (remoteWindows) { // Copy the app bundle to Windows so that we can inspect the results. properties ["CopyAppBundleToWindows"] = "true"; @@ -1005,6 +1069,12 @@ void AppWithLibraryWithResourcesReferenceImpl (ApplePlatform platform, string ru AssertExistsOrUsingHotRestart (Path.Combine (mlModel, "model", "coremldata.bin"), "CoreMLModel/model/coremldata.bin"); AssertExistsOrUsingHotRestart (Path.Combine (mlModel, "neural_network_optionals"), "CoreMLModel/neural_network_optionals"); AssertExistsOrUsingHotRestart (Path.Combine (mlModel, "neural_network_optionals", "coremldata.bin"), "CoreMLModel/neural_network_optionals/coremldata.bin"); + + if (bundleOriginalResources) { + var infoPlist = appBundleInfo.GetFile (GetInfoPListPath (platform, "")); + var appManifest = PDictionary.FromByteArray (infoPlist, out var _)!; + Assert.AreEqual ("Here I am", appManifest.GetString ("LibraryWithResources").Value, "Partial plist entry"); + } }); void AssertExistsOrUsingHotRestart (string path, string message) @@ -2773,6 +2843,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth", "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData", "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation", + "/System/Library/Frameworks/CoreHaptics.framework/Versions/A/CoreHaptics", "/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage", "/System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation", "/System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia", @@ -3176,6 +3247,8 @@ public void InvalidSupportedOSPlatformVersion (ApplePlatform platform, string ru Clean (project_path); var properties = GetDefaultProperties (runtimeIdentifiers); properties ["SupportedOSPlatformVersion"] = version; + properties ["ExcludeTouchUnitReference"] = "true"; + properties ["ExcludeNUnitLiteReference"] = "true"; var rv = DotNet.AssertBuildFailure (project_path, properties); var errors = BinLog.GetBuildLogErrors (rv.BinLogPath).ToArray (); AssertErrorMessages (errors, $"The SupportedOSPlatformVersion value '{version}' in the project file is lower than the minimum value '{minVersion}'."); diff --git a/tests/dotnet/UnitTests/TemplateTest.cs b/tests/dotnet/UnitTests/TemplateTest.cs index 5785b0f4f757..36087b942ecd 100644 --- a/tests/dotnet/UnitTests/TemplateTest.cs +++ b/tests/dotnet/UnitTests/TemplateTest.cs @@ -102,6 +102,8 @@ public enum TemplateType { new TemplateInfo (ApplePlatform.iOS, "ioslib", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.iOS, "ioslib", TemplateLanguage.VisualBasic), new TemplateInfo (ApplePlatform.iOS, "iosbinding", TemplateLanguage.CSharp), + new TemplateInfo (ApplePlatform.iOS, "ios-notification-content-extension", TemplateLanguage.CSharp), + new TemplateInfo (ApplePlatform.iOS, "ios-notification-service-extension", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.TVOS, "tvos", TemplateLanguage.CSharp), new TemplateInfo (ApplePlatform.TVOS, "tvos", TemplateLanguage.VisualBasic), diff --git a/tests/dotnet/UnitTests/TestBaseClass.cs b/tests/dotnet/UnitTests/TestBaseClass.cs index 7c4504fd7d15..c0ca81a36edf 100644 --- a/tests/dotnet/UnitTests/TestBaseClass.cs +++ b/tests/dotnet/UnitTests/TestBaseClass.cs @@ -382,9 +382,20 @@ protected string ExecuteWithMagicWordAndAssert (string executable, Dictionary? environment = null) @@ -403,7 +414,7 @@ protected Execution Execute (string executable, out StringBuilder output, out st } output = new StringBuilder (); - return Execution.RunWithStringBuildersAsync (executable, Array.Empty (), environment: env, standardOutput: output, standardError: output, timeout: TimeSpan.FromSeconds (15)).Result; + return Execution.RunWithStringBuildersAsync (executable, Array.Empty (), environment: env, standardOutput: output, standardError: output, timeout: TimeSpan.FromSeconds (30)).Result; } public static StringBuilder AssertExecute (string executable, params string [] arguments) diff --git a/tests/dotnet/UnitTests/WindowsTest.cs b/tests/dotnet/UnitTests/WindowsTest.cs index 1ce22d1b82e1..940718382167 100644 --- a/tests/dotnet/UnitTests/WindowsTest.cs +++ b/tests/dotnet/UnitTests/WindowsTest.cs @@ -361,6 +361,26 @@ public void RemoteTest (ApplePlatform platform, string runtimeIdentifiers) Assert.AreEqual ("3.14", infoPlist.GetString ("CFBundleVersion").Value, "CFBundleVersion"); Assert.AreEqual ("3.14", infoPlist.GetString ("CFBundleShortVersionString").Value, "CFBundleShortVersionString"); } + + [Test] + [Category ("Windows")] + [TestCase ("NativeFileReferencesApp", ApplePlatform.iOS, "ios-arm64")] + public void StaticLibrariesWithHotRestart (string project, ApplePlatform platform, string runtimeIdentifier) + { + Configuration.IgnoreIfIgnoredPlatform (platform); + Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifier); + Configuration.IgnoreIfNotOnWindows (); + + var project_path = GetProjectPath (project, runtimeIdentifiers: runtimeIdentifier, platform: platform, out var _); + Clean (project_path); + var properties = GetDefaultProperties (runtimeIdentifier, GetHotRestartProperties ()); + var rv = DotNet.AssertBuildFailure (project_path, properties); + var errors = BinLog.GetBuildLogErrors (rv.BinLogPath).ToList (); + AssertErrorMessages (errors, + $@"The library ..\..\..\test-libraries\.libs\iossimulator\libtest.a is a static library, and static libraries are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error.", + $@"The library ..\..\..\test-libraries\.libs\iossimulator\libtest2.a is a static library, and static libraries are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error." + ); + } } public class AppBundleInfo { diff --git a/tests/fsharp/fsharp.fsproj b/tests/fsharp/fsharp.fsproj index a0e7a4b9ac71..b07ac11bb06b 100644 --- a/tests/fsharp/fsharp.fsproj +++ b/tests/fsharp/fsharp.fsproj @@ -89,7 +89,7 @@ - + {F611ED96-54B5-4975-99BB-12F50AF95936} Touch.Client-iOS diff --git a/tests/generator/ExpectedXmlDocs.MacCatalyst.xml b/tests/generator/ExpectedXmlDocs.MacCatalyst.xml index f68dbf3939d5..62aadeacf64d 100644 --- a/tests/generator/ExpectedXmlDocs.MacCatalyst.xml +++ b/tests/generator/ExpectedXmlDocs.MacCatalyst.xml @@ -155,6 +155,9 @@ + + Summary for DocumentedNotification + Notifications posted by the class. @@ -201,6 +204,12 @@ + + Summary for OptionKeys. + + + Summary for Option1Key. + Summary for P1 @@ -226,6 +235,26 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -247,6 +276,16 @@ Summary for P1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -356,6 +395,16 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for PA1.PProperty @@ -455,5 +504,14 @@ Summary for TG1.TGProperty + + Summary for OptionsA. + + + Summary for Option1. + + + Summary for Option1. + \ No newline at end of file diff --git a/tests/generator/ExpectedXmlDocs.iOS.xml b/tests/generator/ExpectedXmlDocs.iOS.xml index 12f1913997c6..6ebfa519c4e1 100644 --- a/tests/generator/ExpectedXmlDocs.iOS.xml +++ b/tests/generator/ExpectedXmlDocs.iOS.xml @@ -155,6 +155,9 @@ + + Summary for DocumentedNotification + Notifications posted by the class. @@ -201,6 +204,12 @@ + + Summary for OptionKeys. + + + Summary for Option1Key. + Summary for P1 @@ -226,6 +235,26 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -247,6 +276,16 @@ Summary for P1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -356,6 +395,16 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for PA1.PProperty @@ -671,5 +720,14 @@ For more information, see the documentation for the class. + + Summary for OptionsA. + + + Summary for Option1. + + + Summary for Option1. + \ No newline at end of file diff --git a/tests/generator/ExpectedXmlDocs.macOS.xml b/tests/generator/ExpectedXmlDocs.macOS.xml index f68dbf3939d5..62aadeacf64d 100644 --- a/tests/generator/ExpectedXmlDocs.macOS.xml +++ b/tests/generator/ExpectedXmlDocs.macOS.xml @@ -155,6 +155,9 @@ + + Summary for DocumentedNotification + Notifications posted by the class. @@ -201,6 +204,12 @@ + + Summary for OptionKeys. + + + Summary for Option1Key. + Summary for P1 @@ -226,6 +235,26 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -247,6 +276,16 @@ Summary for P1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -356,6 +395,16 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for PA1.PProperty @@ -455,5 +504,14 @@ Summary for TG1.TGProperty + + Summary for OptionsA. + + + Summary for Option1. + + + Summary for Option1. + \ No newline at end of file diff --git a/tests/generator/ExpectedXmlDocs.tvOS.xml b/tests/generator/ExpectedXmlDocs.tvOS.xml index f68dbf3939d5..62aadeacf64d 100644 --- a/tests/generator/ExpectedXmlDocs.tvOS.xml +++ b/tests/generator/ExpectedXmlDocs.tvOS.xml @@ -155,6 +155,9 @@ + + Summary for DocumentedNotification + Notifications posted by the class. @@ -201,6 +204,12 @@ + + Summary for OptionKeys. + + + Summary for Option1Key. + Summary for P1 @@ -226,6 +235,26 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -247,6 +276,16 @@ Summary for P1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for P1.PProperty @@ -356,6 +395,16 @@ Summary for PA1.PMethod + + + Summary for P1.PMethodWithArgs + Docs for arg0. + + + + Summary for P1.PMethodWithArgs + + Summary for PA1.PProperty @@ -455,5 +504,14 @@ Summary for TG1.TGProperty + + Summary for OptionsA. + + + Summary for Option1. + + + Summary for Option1. + \ No newline at end of file diff --git a/tests/generator/tests/xmldocs.cs b/tests/generator/tests/xmldocs.cs index d515925ffbc1..f29d193da052 100644 --- a/tests/generator/tests/xmldocs.cs +++ b/tests/generator/tests/xmldocs.cs @@ -76,6 +76,20 @@ interface P1 { [Abstract] [Export ("propertyRequired")] int PAProperty { get; set; } + + /// + /// Summary for P1.PMethodWithArgs + /// + /// Docs for arg0. + [Export ("method:")] + int PMethodWithArgs (int arg0); + + /// + /// Summary for P1.PMethodWithArgs + /// + // No tag here + [Export ("methodWithUndocumentedArgs:")] + int PMethodWithUndocumentedArgs (int arg0); } /// @@ -158,4 +172,28 @@ enum E4 { /// Bit3 = 4, } + + /// Summary for OptionKeys. + [Static] + interface OptionKeys { + /// Summary for Option1Key. + [Field ("Option1Key", "TheLibrary")] + NSString Option1 { get; } + } + + /// Summary for OptionsA. + [StrongDictionary ("OptionKeys")] + interface OptionsA { + /// Summary for Option1. + [Export ("Option1")] + string Option1 { get; set; } + } + + // no summary here + [StrongDictionary ("OptionKeys")] + interface OptionsB { + /// Summary for Option1. + [Export ("Option1")] + string Option1 { get; set; } + } } diff --git a/tests/interdependent-binding-projects/dotnet/shared.csproj b/tests/interdependent-binding-projects/dotnet/shared.csproj index c86892fa90dc..5e4008911365 100644 --- a/tests/interdependent-binding-projects/dotnet/shared.csproj +++ b/tests/interdependent-binding-projects/dotnet/shared.csproj @@ -17,6 +17,20 @@ true $(DefineConstants);DEBUG + + + $(NoWarn);CS0436 + + + $(NoWarn);CS8002 + + + true + Nullable diff --git a/tests/interdependent-binding-projects/interdependent-binding-projects.csproj b/tests/interdependent-binding-projects/interdependent-binding-projects.csproj index ff9b63c47b9a..6ebf0dac7d4b 100644 --- a/tests/interdependent-binding-projects/interdependent-binding-projects.csproj +++ b/tests/interdependent-binding-projects/interdependent-binding-projects.csproj @@ -80,7 +80,7 @@ - + {F611ED96-54B5-4975-99BB-12F50AF95936} Touch.Client-iOS diff --git a/tests/introspection/ApiCMAttachmentTest.cs b/tests/introspection/ApiCMAttachmentTest.cs index 59c92ba185ee..742b9e059789 100644 --- a/tests/introspection/ApiCMAttachmentTest.cs +++ b/tests/introspection/ApiCMAttachmentTest.cs @@ -461,6 +461,10 @@ protected INativeObject GetINativeInstance (Type t) return CMClock.HostTimeClock; case "CMTimebase": return new CMTimebase (CMClock.HostTimeClock); + case "CMTagCollection": + return CMTagCollection.Create (); + case "CMTaggedBufferGroup": + return CMTaggedBufferGroup.Create (new CMTagCollection [0], new CMSampleBuffer [0], out var _); case "CVPixelBufferPool": return new CVPixelBufferPool ( new CVPixelBufferPoolSettings (), diff --git a/tests/introspection/ApiCtorInitTest.cs b/tests/introspection/ApiCtorInitTest.cs index 83b372d148f6..57cf419ad831 100644 --- a/tests/introspection/ApiCtorInitTest.cs +++ b/tests/introspection/ApiCtorInitTest.cs @@ -156,13 +156,6 @@ protected virtual bool Skip (Type type) switch (type.Namespace) { case "SafetyKit": return true; // SafetyKit requires a custom entitlement, and will throw exceptions if it's not present. -#if __IOS__ - case "WatchKit": - return true; // WatchKit has been removed from iOS. -#elif MONOMAC - case "QTKit": - return true; // QTKit has been removed from macos. -#endif } // skip types that we renamed / rewrite since they won't behave correctly (by design) @@ -548,6 +541,12 @@ protected virtual bool Match (ConstructorInfo ctor, Type type) if (cstr == "Void .ctor(Vision.VNRequestCompletionHandler)") return true; break; + case "AVSpeechSynthesisProviderAudioUnit": + if (cstr == "Void .ctor(AudioUnit.AudioComponentDescription, AudioUnit.AudioComponentInstantiationOptions, Foundation.NSError ByRef)") { + // This constructor is exposed using a factory method. + return true; + } + break; } var ep = ctor.GetParameters (); diff --git a/tests/introspection/ApiProtocolTest.cs b/tests/introspection/ApiProtocolTest.cs index 4000d78e226f..df21861b1697 100644 --- a/tests/introspection/ApiProtocolTest.cs +++ b/tests/introspection/ApiProtocolTest.cs @@ -210,6 +210,11 @@ protected virtual bool Skip (Type type, string protocolName) case "ASAuthorizationPublicKeyCredentialLargeBlobAssertionInput": case "ASAuthorizationPublicKeyCredentialLargeBlobAssertionOutput": case "ASAuthorizationPublicKeyCredentialLargeBlobRegistrationInput": + case "SCContentFilter": + case "SCDisplay": + case "SCRunningApplication": + case "SCWindow": + case "SCStreamConfiguration": return true; } break; @@ -426,6 +431,11 @@ protected virtual bool Skip (Type type, string protocolName) case "UIHoverGestureRecognizer": // Xcode 16.2 Conformance not in headers case "SCSensitivityAnalysis": + case "SCContentFilter": + case "SCDisplay": + case "SCRunningApplication": + case "SCWindow": + case "SCStreamConfiguration": return true; } break; @@ -645,6 +655,11 @@ protected virtual bool Skip (Type type, string protocolName) return true; // Xcode 16.2 Conformance not in headers case "SCSensitivityAnalysis": + case "SCContentFilter": + case "SCDisplay": + case "SCRunningApplication": + case "SCWindow": + case "SCStreamConfiguration": return true; } break; @@ -729,10 +744,6 @@ protected virtual bool Skip (Type type, string protocolName) return true; break; #endif - case "NSExtensionRequestHandling": - if (type.Name == "HMChipServiceRequestHandler") // Apple removed this class - return true; - break; case "QLPreviewItem": if (type.Name == "NSUrl") return true; diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs index 377d5478be57..ae69391e6950 100644 --- a/tests/introspection/ApiSelectorTest.cs +++ b/tests/introspection/ApiSelectorTest.cs @@ -78,6 +78,15 @@ protected virtual bool Skip (Type type, string selectorName) return true; } break; + case "AVPlayerInterstitialEvent": + switch (selectorName) { + case "copyWithZone:": + // AVPlayerInterstitialEvent started conforming to NSCopying in Xcode 14 + if (!TestRuntime.CheckXcodeVersion (14, 0)) + return true; + break; + } + break; case "MKCircle": case "MKPolygon": case "MKPolyline": diff --git a/tests/introspection/ApiTypoTest.cs b/tests/introspection/ApiTypoTest.cs index 4d2553a61e7b..620c1d777f6a 100644 --- a/tests/introspection/ApiTypoTest.cs +++ b/tests/introspection/ApiTypoTest.cs @@ -143,7 +143,6 @@ public virtual bool Skip (MemberInfo methodName, string typo) "Cda", // acronym: Clinical Document Architecture "Cdrom", "Celu", // Continuously Differentiable Exponential Linear Unit (ML) - "Chip", // framework name "Cfa", // acronym: Color Filter Array "Celp", // MPEG4ObjectID "Characterteristic", @@ -1044,11 +1043,6 @@ public void ConstantsCheck () case "NewsstandKitLibrary": // Removed from iOS, but we have to keep the constant around for binary compatibility. break; #endif - case "ChipLibrary": // Chip is removed entirely beginning Xcode 14 - if (!TestRuntime.CheckXcodeVersion (14, 0)) - if (TestRuntime.IsDevice) - Assert.True (CheckLibrary (s), fi.Name); - break; #if !__MACOS__ case "CinematicLibrary": case "ThreadNetworkLibrary": diff --git a/tests/introspection/ApiWeakPropertyTest.cs b/tests/introspection/ApiWeakPropertyTest.cs index b35cc9ff3484..98ac102758b7 100644 --- a/tests/introspection/ApiWeakPropertyTest.cs +++ b/tests/introspection/ApiWeakPropertyTest.cs @@ -52,7 +52,20 @@ protected virtual bool Skip (PropertyInfo property) // this is from a strongly typed dictionary, and "Weak" here means nullable (bool) as opposed to a plain bool - and this is fixed in XAMCORE_5_0 so that the Enabled property is nullable and thus we won't need the WeakEnabled version anymore. return property.DeclaringType.Name == "CTFontDescriptorAttributes"; #endif + case "WeakDynamicRangePolicy": + switch (property.DeclaringType.Name) { + case "AVAssetImageGenerator": + // This is a weakly typed version of a NSString enum property, so not overridable [Export] (the property is [Sealed]) + return true; + } + return false; } + + switch (property.DeclaringType.Name) { + case "CHHapticPatternDefinition": + return property.Name == "WeakParameterCurve" || property.Name == "WeakParameterCurveControlPoints"; + } + return false; } diff --git a/tests/introspection/MacApiCtorInitTest.cs b/tests/introspection/MacApiCtorInitTest.cs index 98cdb0fde6ac..228dfb1fb6cc 100644 --- a/tests/introspection/MacApiCtorInitTest.cs +++ b/tests/introspection/MacApiCtorInitTest.cs @@ -201,10 +201,6 @@ the permission system (TCC) fails and the process ends up crashing if (!Mac.CheckSystemVersion (10, 12) || IntPtr.Size != 8) return true; break; - case "QTKit": - if (Mac.CheckSystemVersion (10, 15)) // QTKit is gone in 10.15 - return true; - break; case "ModelIO": // Looks like it is broken in macOS 11.0 beta 9 and fixed in 11.1 beta 2 if (!Mac.CheckSystemVersion (11, 1) && Mac.CheckSystemVersion (11, 0)) // Causes error on test: turning unknown type for VtValue with unregistered C++ type bool return true; diff --git a/tests/introspection/MacApiFieldTest.cs b/tests/introspection/MacApiFieldTest.cs index b39405b1e4d2..5ad86e4ddc38 100644 --- a/tests/introspection/MacApiFieldTest.cs +++ b/tests/introspection/MacApiFieldTest.cs @@ -52,9 +52,6 @@ protected override bool Skip (Type type) if (!Mac.CheckSystemVersion (10, 12) || IntPtr.Size != 8) return true; break; - case "MonoMac.QTKit": // QTKit has been removed from macOS - case "QTKit": - return true; } return false; } diff --git a/tests/introspection/MacApiSelectorTest.cs b/tests/introspection/MacApiSelectorTest.cs index 779550959ba9..ec8c0038db71 100644 --- a/tests/introspection/MacApiSelectorTest.cs +++ b/tests/introspection/MacApiSelectorTest.cs @@ -112,11 +112,6 @@ protected override bool Skip (Type type) case "MonoMac.Growl": case "Growl": return true; - case "QTKit": - // QTKit is gone in 10.15. - if (Mac.CheckSystemVersion (10, 15)) - return true; - break; } return base.Skip (type); @@ -197,36 +192,6 @@ protected override bool Skip (Type type, string selectorName) return true; } break; - case "startup:": // tested on mac os x with a swift project, selector does respond - switch (type.Name) { - case "ChipDeviceController": - return true; - } - break; - case "readAttributeFabricIdWithResponseHandler:": // tested on mac os x with a swift project, selector does respond - switch (type.Name) { - case "ChipGeneralCommissioning": - return true; - } - break; - case "removeAllFabrics:": // tested on mac os x with a swift project, selector does respond - switch (type.Name) { - case "ChipOperationalCredentials": - return true; - } - break; - case "removeFabric:nodeId:vendorId:responseHandler:": // tested on mac os x with a swift project, selector does respond - switch (type.Name) { - case "ChipOperationalCredentials": - return true; - } - break; - case "setFabric:responseHandler:": // tested on mac os x with a swift project, selector does respond - switch (type.Name) { - case "ChipOperationalCredentials": - return true; - } - break; case "loadedTimeRanges": switch (type.Name) { case "AVAssetDownloadTask": diff --git a/tests/introspection/MacApiWeakPropertyTest.cs b/tests/introspection/MacApiWeakPropertyTest.cs index d80b69139267..b801ab6fac0a 100644 --- a/tests/introspection/MacApiWeakPropertyTest.cs +++ b/tests/introspection/MacApiWeakPropertyTest.cs @@ -21,12 +21,6 @@ protected override bool Skip (Type type) return true; } - switch (type.Namespace) { - case "MonoMac.QTKit": // QTKit has been removed from macOS - case "QTKit": - return true; - } - return base.Skip (type); } } diff --git a/tests/introspection/iOSApiFieldTest.cs b/tests/introspection/iOSApiFieldTest.cs index b1af77dc39c0..eadc207576ad 100644 --- a/tests/introspection/iOSApiFieldTest.cs +++ b/tests/introspection/iOSApiFieldTest.cs @@ -68,10 +68,6 @@ protected override bool Skip (PropertyInfo p) case "IOSurface": // Available in the simulator starting with iOS 11 return TestRuntime.IsSimulatorOrDesktop && !TestRuntime.CheckXcodeVersion (9, 0); - case "iAd": - // largely removed in xcode 13, including ADClient.ErrorDomain - // since using this code leads to rejections it's totally removed (so no version check) - return true; case "NewsstandKit": // largely removed in xcode 15 return true; diff --git a/tests/introspection/iOSApiProtocolTest.cs b/tests/introspection/iOSApiProtocolTest.cs index a9144e8d35ed..247bbe7e3906 100644 --- a/tests/introspection/iOSApiProtocolTest.cs +++ b/tests/introspection/iOSApiProtocolTest.cs @@ -32,7 +32,6 @@ public iOSApiProtocolTest () protected override bool Skip (Type type) { switch (type.Namespace) { - case "Chip": case "MetalKit": case "MonoTouch.MetalKit": case "MetalPerformanceShaders": diff --git a/tests/introspection/iOSApiSelectorTest.cs b/tests/introspection/iOSApiSelectorTest.cs index 15f7cdaf1cd8..7a62e91116c3 100644 --- a/tests/introspection/iOSApiSelectorTest.cs +++ b/tests/introspection/iOSApiSelectorTest.cs @@ -51,7 +51,6 @@ protected override bool Skip (Type type) if (TestRuntime.IsSimulatorOrDesktop && !TestRuntime.CheckXcodeVersion (7, 0)) return true; break; - case "Chip": case "MetalFX": case "MetalKit": case "MonoTouch.MetalKit": @@ -137,6 +136,17 @@ protected override bool CheckResponse (bool value, Type actualType, MethodBase m var declaredType = method.DeclaringType; switch (declaredType.Name) { +#if __MACCATALYST__ + case "AVPictureInPictureControllerContentSource": + switch (name) { + case "activeVideoCallSourceView": + case "activeVideoCallContentViewController": + case "initWithActiveVideoCallSourceView:contentViewController:": + // Headers and docs say these selectors are available in Mac Catalyst 15+, but introspection can only bind them in Mac Catalyst 16+. + return TestRuntime.CheckXcodeVersion (13, 0); + } + break; +#endif case "AVUrlAsset": switch (name) { // fails because it is in-lined via protocol AVContentKeyRecipient diff --git a/tests/introspection/iOSApiWeakPropertyTest.cs b/tests/introspection/iOSApiWeakPropertyTest.cs index 20de3b39454b..5386dbcaf2f3 100644 --- a/tests/introspection/iOSApiWeakPropertyTest.cs +++ b/tests/introspection/iOSApiWeakPropertyTest.cs @@ -44,8 +44,6 @@ protected override bool Skip (PropertyInfo property) // NSString manually bound as smart enum CLSContextTopic case "CLSContext": return property.Name == "WeakTopic"; - case "CHHapticPatternDefinition": - return property.Name == "WeakParameterCurve" || property.Name == "WeakParameterCurveControlPoints"; } return base.Skip (property); } diff --git a/tests/linker/CommonDontLinkTest.cs b/tests/linker/CommonDontLinkTest.cs deleted file mode 100644 index c4f7c16f18a9..000000000000 --- a/tests/linker/CommonDontLinkTest.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections; -using System.Reflection; - -using NUnit.Framework; - -using Foundation; - -namespace DontLink { - - [TestFixture] - public class CommonDontLinkTest { - -#if NET - [Ignore ("This test accesses internal implementation details for TypeConverters, which has changed in .NET.")] -#endif - [Test] - public void TypeDescriptorCanary () - { - // this will fail is ReflectTypeDescriptionProvider.cs is modified - var rtdp = typeof (System.ComponentModel.BooleanConverter).Assembly.GetType ("System.ComponentModel.ReflectTypeDescriptionProvider"); - Assert.NotNull (rtdp, "type"); - var p = rtdp.GetProperty ("IntrinsicTypeConverters", BindingFlags.Static | BindingFlags.NonPublic); - Assert.NotNull (p, "property"); - var ht = (Hashtable) p.GetGetMethod (true).Invoke (null, null); - Assert.NotNull (ht, "Hashtable"); - - Assert.That (ht.Count, Is.EqualTo (26), "Count"); - - foreach (var item in ht.Values) { - var name = item.ToString (); - switch (name) { - case "System.ComponentModel.DateTimeOffsetConverter": - case "System.ComponentModel.DecimalConverter": - case "System.ComponentModel.StringConverter": - case "System.ComponentModel.SByteConverter": - case "System.ComponentModel.CollectionConverter": - case "System.ComponentModel.ReferenceConverter": - case "System.ComponentModel.TypeConverter": - case "System.ComponentModel.DateTimeConverter": - case "System.ComponentModel.UInt64Converter": - case "System.ComponentModel.ArrayConverter": - case "System.ComponentModel.NullableConverter": - case "System.ComponentModel.Int16Converter": - case "System.ComponentModel.CultureInfoConverter": - case "System.ComponentModel.SingleConverter": - case "System.ComponentModel.UInt16Converter": - case "System.ComponentModel.GuidConverter": - case "System.ComponentModel.DoubleConverter": - case "System.ComponentModel.Int32Converter": - case "System.ComponentModel.TimeSpanConverter": - case "System.ComponentModel.CharConverter": - case "System.ComponentModel.Int64Converter": - case "System.ComponentModel.BooleanConverter": - case "System.ComponentModel.UInt32Converter": - case "System.ComponentModel.ByteConverter": - case "System.ComponentModel.EnumConverter": - break; - default: - Assert.Fail ($"Unknown type descriptor {name}"); - break; - } - } - } - } -} diff --git a/tests/linker/ios/dont link/dont link.csproj b/tests/linker/ios/dont link/dont link.csproj index 34ce3ee3325b..c19aed477b05 100644 --- a/tests/linker/ios/dont link/dont link.csproj +++ b/tests/linker/ios/dont link/dont link.csproj @@ -75,7 +75,7 @@ - + {F611ED96-54B5-4975-99BB-12F50AF95936} Touch.Client-iOS @@ -92,9 +92,6 @@ - - CommonDontLinkTest.cs - diff --git a/tests/linker/ios/dont link/dotnet/shared.csproj b/tests/linker/ios/dont link/dotnet/shared.csproj index 0ead84887ca7..2f55d33c2400 100644 --- a/tests/linker/ios/dont link/dotnet/shared.csproj +++ b/tests/linker/ios/dont link/dotnet/shared.csproj @@ -9,6 +9,13 @@ $(MtouchLink) $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..')) $(RootTestsDirectory)\linker\ios\dont link + + + $(NoWarn);IL2057 + + + true + Nullable @@ -43,9 +50,6 @@ - - CommonDontLinkTest.cs - diff --git a/tests/linker/ios/link all/ClassLayoutTest.cs b/tests/linker/ios/link all/ClassLayoutTest.cs index 18e8fbf9f6cc..3f5d9dc8ef01 100644 --- a/tests/linker/ios/link all/ClassLayoutTest.cs +++ b/tests/linker/ios/link all/ClassLayoutTest.cs @@ -15,7 +15,9 @@ namespace LinkAll.Layout { class DefaultClass { +#pragma warning disable CS0649 // Field 'DefaultClass.never_used' is never assigned to, and will always have its default value 0 public int never_used; // the linker will remove this +#pragma warning restore CS0649 public int used; } diff --git a/tests/linker/ios/link all/LinkAllTest.cs b/tests/linker/ios/link all/LinkAllTest.cs index f5fd3587c2a0..51c6353333c7 100644 --- a/tests/linker/ios/link all/LinkAllTest.cs +++ b/tests/linker/ios/link all/LinkAllTest.cs @@ -279,8 +279,10 @@ public void DetectPlatform () [Test] #if NET +#pragma warning disable CA1418 // The platform '*' is not a known platform name [SupportedOSPlatform ("none")] [UnsupportedOSPlatform ("none)")] +#pragma warning restore CA1418 #else [Introduced (PlatformName.None)] [Deprecated (PlatformName.None)] @@ -365,7 +367,9 @@ public void Assembly_ReflectionOnlyLoadFrom () string filename = FindAssemblyPath (); #if NET // new behavior across all platforms, see https://github.com/dotnet/runtime/issues/50529 +#pragma warning disable SYSLIB0018 // 'Assembly.ReflectionOnlyLoadFrom(string)' is obsolete: 'ReflectionOnly loading is not supported and throws PlatformNotSupportedException.' Assert.Throws (() => Assembly.ReflectionOnlyLoadFrom (filename)); +#pragma warning restore SYSLIB0018 #else Assert.NotNull (Assembly.ReflectionOnlyLoadFrom (filename), "1"); #endif diff --git a/tests/linker/ios/link all/StructLayoutTest.cs b/tests/linker/ios/link all/StructLayoutTest.cs index 2fcd8edfd4e5..aa4cb254e915 100644 --- a/tests/linker/ios/link all/StructLayoutTest.cs +++ b/tests/linker/ios/link all/StructLayoutTest.cs @@ -15,7 +15,9 @@ namespace LinkAll.Layout { struct DefaultStruct { +#pragma warning disable CS0649 // Field 'DefaultStruct.never_used' is never assigned to, and will always have its default value 0 public int never_used; +#pragma warning restore CS0649 public int used; } diff --git a/tests/linker/ios/link all/dotnet/shared.csproj b/tests/linker/ios/link all/dotnet/shared.csproj index 89665e8a481e..8a757585fae9 100644 --- a/tests/linker/ios/link all/dotnet/shared.csproj +++ b/tests/linker/ios/link all/dotnet/shared.csproj @@ -13,6 +13,16 @@ $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..')) $(RootTestsDirectory)\linker\ios\link all true + + + $(NoWarn);IL2121;IL2026;IL2045;IL2057;IL2059;IL2070;IL2075;IL2080;IL2096 + + + $(NoWarn);CA1422 + + + true + Nullable diff --git a/tests/linker/ios/link all/link all.csproj b/tests/linker/ios/link all/link all.csproj index b20be15e6cf9..acb9d3e9291c 100644 --- a/tests/linker/ios/link all/link all.csproj +++ b/tests/linker/ios/link all/link all.csproj @@ -89,7 +89,7 @@ - + {F611ED96-54B5-4975-99BB-12F50AF95936} Touch.Client-iOS diff --git a/tests/linker/ios/link sdk/AsyncTest.cs b/tests/linker/ios/link sdk/AsyncTest.cs index 9072ebc5b05a..8ae3155d9d4f 100644 --- a/tests/linker/ios/link sdk/AsyncTest.cs +++ b/tests/linker/ios/link sdk/AsyncTest.cs @@ -25,13 +25,13 @@ public void Bug12221 () #endif try { LoadCategories ().GetAwaiter ().GetResult (); - } catch (TaskCanceledException tce) { + } catch (TaskCanceledException) { TestRuntime.IgnoreInCI ("Ignore any download timeouts"); throw; } catch (HttpRequestException hre) { TestRuntime.IgnoreInCIIfForbidden (hre); // Ignore any 403 errors. throw; - } catch (IOException ie) { + } catch (IOException) { /* * LinkSdk.AsyncTests * [FAIL] Bug12221 : System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception. diff --git a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs index 1eea18f3a7b7..e0fd32564025 100644 --- a/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs +++ b/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs @@ -745,7 +745,9 @@ public void LockRecursionException_5311 () } class AddedInSilverlight5 : INotifyPropertyChanging { +#pragma warning disable CS0067 // The event 'LinkSdkRegressionTest.AddedInSilverlight5.PropertyChanging' is never used public event PropertyChangingEventHandler PropertyChanging; +#pragma warning restore CS0067 } [Test] @@ -1053,7 +1055,7 @@ void SpecialFolderImpl () bool tvos = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.TV; if (tvos) docs = Path.Combine (libs, "Caches", "Documents"); -#else +#elif !__MACOS__ bool tvos = false; #endif diff --git a/tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml b/tests/linker/ios/link sdk/dotnet/MacCatalyst/extra-linker-defs.xml similarity index 66% rename from tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml rename to tests/linker/ios/link sdk/dotnet/MacCatalyst/extra-linker-defs.xml index d8a736420e25..d500a924c710 100644 --- a/tests/linker/ios/link sdk/dotnet/extra-linker-defs.xml +++ b/tests/linker/ios/link sdk/dotnet/MacCatalyst/extra-linker-defs.xml @@ -8,12 +8,6 @@ - - - - - - diff --git a/tests/linker/ios/link sdk/dotnet/iOS/extra-linker-defs.xml b/tests/linker/ios/link sdk/dotnet/iOS/extra-linker-defs.xml new file mode 100644 index 000000000000..87ed6d9ca126 --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/iOS/extra-linker-defs.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/linker/ios/link sdk/dotnet/macOS/extra-linker-defs.xml b/tests/linker/ios/link sdk/dotnet/macOS/extra-linker-defs.xml new file mode 100644 index 000000000000..08c066aec266 --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/macOS/extra-linker-defs.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tests/linker/ios/link sdk/dotnet/shared.csproj b/tests/linker/ios/link sdk/dotnet/shared.csproj index 519a5b19ff9b..681915114616 100644 --- a/tests/linker/ios/link sdk/dotnet/shared.csproj +++ b/tests/linker/ios/link sdk/dotnet/shared.csproj @@ -12,6 +12,20 @@ $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..\..')) $(RootTestsDirectory)\linker\ios\link sdk false + + + + $(NoWarn);SYSLIB0014 + + + $(NoWarn);CA1422 + + + $(NoWarn);IL2026;IL2032;IL2057;IL2070;IL2075;IL2080;IL2111 + + + true + Nullable @@ -27,7 +41,7 @@ - + diff --git a/tests/linker/ios/link sdk/dotnet/tvOS/extra-linker-defs.xml b/tests/linker/ios/link sdk/dotnet/tvOS/extra-linker-defs.xml new file mode 100644 index 000000000000..8b66f83dacdb --- /dev/null +++ b/tests/linker/ios/link sdk/dotnet/tvOS/extra-linker-defs.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/linker/ios/link sdk/link sdk.csproj b/tests/linker/ios/link sdk/link sdk.csproj index 28ba17630267..79e6ccb7f240 100644 --- a/tests/linker/ios/link sdk/link sdk.csproj +++ b/tests/linker/ios/link sdk/link sdk.csproj @@ -91,7 +91,7 @@ - + {F611ED96-54B5-4975-99BB-12F50AF95936} Touch.Client-iOS diff --git a/tests/linker/ios/trimmode copy/dotnet/shared.csproj b/tests/linker/ios/trimmode copy/dotnet/shared.csproj index 2868c0d2a8a7..c421d6915905 100644 --- a/tests/linker/ios/trimmode copy/dotnet/shared.csproj +++ b/tests/linker/ios/trimmode copy/dotnet/shared.csproj @@ -10,6 +10,13 @@ <_TrimmerDefaultAction>copy $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..\..\..\..\..')) $(RootTestsDirectory)\linker\ios\dont link + + + $(NoWarn);IL2057 + + + true + Nullable @@ -35,9 +42,6 @@ - - CommonDontLinkTest.cs - TestRuntime.cs diff --git a/tests/linker/ios/trimmode link/dotnet/shared.csproj b/tests/linker/ios/trimmode link/dotnet/shared.csproj index 00177a39bb56..6f7112e824eb 100644 --- a/tests/linker/ios/trimmode link/dotnet/shared.csproj +++ b/tests/linker/ios/trimmode link/dotnet/shared.csproj @@ -12,6 +12,27 @@ $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..\..\..\..\..')) $(RootTestsDirectory)\linker\ios\link sdk false + + + + $(NoWarn);SYSLIB0014 + + + $(NoWarn);CA1422 + + + $(NoWarn);CS0436 + + + $(NoWarn);IL2026;IL2032;IL2057;IL2070;IL2075;IL2080;IL2111 + + + true + Nullable @@ -27,7 +48,7 @@ - + @@ -59,9 +80,6 @@ - - TestRuntime.cs - ILReader.cs diff --git a/tests/monotouch-test/AVFoundation/AVAudioSinkNodeTest.cs b/tests/monotouch-test/AVFoundation/AVAudioSinkNodeTest.cs index 38d14e17aa05..6aa8606fb992 100644 --- a/tests/monotouch-test/AVFoundation/AVAudioSinkNodeTest.cs +++ b/tests/monotouch-test/AVFoundation/AVAudioSinkNodeTest.cs @@ -9,6 +9,8 @@ using AVFoundation; using Foundation; +using Xamarin.Tests; + namespace MonoTouchFixtures.AVFoundation { [TestFixture] [Preserve (AllMembers = true)] @@ -61,7 +63,7 @@ public void SinkNodeCallback2 () void SinkNodeCallbackTest (ManualResetEvent callbackEvent, Func createSinkNode) { TestRuntime.AssertNotVirtualMachine (); - TestRuntime.AssertNotSimulator (); // broke in Xcode 16.2 beta 2 https://github.com/xamarin/maccore/issues/2956 + TestRuntime.IgnoreIfLockedScreen (); #if __MACOS__ var defaultCaptureDevice = AVCaptureDevice.GetDefaultDevice (AVMediaTypes.Audio); diff --git a/tests/monotouch-test/AVFoundation/AVAudioSourceNodeTest.cs b/tests/monotouch-test/AVFoundation/AVAudioSourceNodeTest.cs index 3ce23e113b4a..ad200ed45fe4 100644 --- a/tests/monotouch-test/AVFoundation/AVAudioSourceNodeTest.cs +++ b/tests/monotouch-test/AVFoundation/AVAudioSourceNodeTest.cs @@ -68,7 +68,6 @@ public void SourceNodeCallback2 () void SourceNodeCallbackTest (TaskCompletionSource callbackEvent, Func createSourceNode) { TestRuntime.AssertNotVirtualMachine (); - TestRuntime.AssertNotSimulator (); // broke in Xcode 16.2 beta 2 https://github.com/xamarin/maccore/issues/2956 #if __MACOS__ var defaultCaptureDevice = AVCaptureDevice.GetDefaultDevice (AVMediaTypes.Audio); diff --git a/tests/monotouch-test/AVFoundation/AVAudioVoiceProcessingOtherAudioDuckingConfigurationTest.cs b/tests/monotouch-test/AVFoundation/AVAudioVoiceProcessingOtherAudioDuckingConfigurationTest.cs new file mode 100644 index 000000000000..ba4bbf57c9c5 --- /dev/null +++ b/tests/monotouch-test/AVFoundation/AVAudioVoiceProcessingOtherAudioDuckingConfigurationTest.cs @@ -0,0 +1,52 @@ +// +// Unit tests for AVAudioVoiceProcessingOtherAudioDuckingConfiguration +// + +#if !__TVOS__ + +using System; + +using AVFoundation; +using Foundation; + +using NUnit.Framework; + +#nullable enable + +namespace MonoTouchFixtures.AVFoundation { + + [TestFixture] + [Preserve (AllMembers = true)] + public class AVAudioVoiceProcessingOtherAudioDuckingConfigurationTest { + + [Test] + public void Properties () + { + var s = new AVAudioVoiceProcessingOtherAudioDuckingConfiguration (); + Assert.IsFalse (s.EnableAdvancedDucking, "EnableAdvancedDucking"); + Assert.AreEqual ((AVAudioVoiceProcessingOtherAudioDuckingLevel) 0, s.DuckingLevel, "DuckingLevel"); + + s.EnableAdvancedDucking = true; + Assert.IsTrue (s.EnableAdvancedDucking, "EnableAdvancedDucking 2"); + Assert.AreEqual ((AVAudioVoiceProcessingOtherAudioDuckingLevel) 0, s.DuckingLevel, "DuckingLevel 2"); + + s.EnableAdvancedDucking = false; + Assert.IsFalse (s.EnableAdvancedDucking, "EnableAdvancedDucking 3"); + Assert.AreEqual ((AVAudioVoiceProcessingOtherAudioDuckingLevel) 0, s.DuckingLevel, "DuckingLevel 3"); + + s.DuckingLevel = AVAudioVoiceProcessingOtherAudioDuckingLevel.Min; + Assert.IsFalse (s.EnableAdvancedDucking, "EnableAdvancedDucking 4"); + Assert.AreEqual (AVAudioVoiceProcessingOtherAudioDuckingLevel.Min, s.DuckingLevel, "DuckingLevel 4"); + + s.DuckingLevel = (AVAudioVoiceProcessingOtherAudioDuckingLevel) 314; + Assert.IsFalse (s.EnableAdvancedDucking, "EnableAdvancedDucking 5"); + Assert.AreEqual ((AVAudioVoiceProcessingOtherAudioDuckingLevel) 314, s.DuckingLevel, "DuckingLevel 5"); + + s.DuckingLevel = AVAudioVoiceProcessingOtherAudioDuckingLevel.Default; + Assert.IsFalse (s.EnableAdvancedDucking, "EnableAdvancedDucking 6"); + Assert.AreEqual (AVAudioVoiceProcessingOtherAudioDuckingLevel.Default, s.DuckingLevel, "DuckingLevel 6"); + } + } +} + +#endif // !__TVOS__ diff --git a/tests/monotouch-test/AVFoundation/AVCaptureReactionTypeTest.cs b/tests/monotouch-test/AVFoundation/AVCaptureReactionTypeTest.cs new file mode 100644 index 000000000000..451f58c27cdf --- /dev/null +++ b/tests/monotouch-test/AVFoundation/AVCaptureReactionTypeTest.cs @@ -0,0 +1,25 @@ +// +// Unit tests for AVCaptureReactionType + +using System; + +using AVFoundation; +using Foundation; + +using NUnit.Framework; + +#nullable enable + +namespace MonoTouchFixtures.AVFoundation { + + [TestFixture] + [Preserve (AllMembers = true)] + public class AVCaptureReactionTypeTest { + [Test] + public void GetSystemImage () + { + TestRuntime.AssertXcodeVersion (15, 0); + Assert.IsNotNull (AVCaptureReactionType.ThumbsUp.GetSystemImage (), "GetSystemImage"); + } + } +} diff --git a/tests/monotouch-test/AVFoundation/AVSpeechSynthesisMarkerTest.cs b/tests/monotouch-test/AVFoundation/AVSpeechSynthesisMarkerTest.cs new file mode 100644 index 000000000000..0c247c4fe3c1 --- /dev/null +++ b/tests/monotouch-test/AVFoundation/AVSpeechSynthesisMarkerTest.cs @@ -0,0 +1,80 @@ +// +// Unit tests for AVSpeechSynthesisMarker + +using System; + +using AVFoundation; +using Foundation; + +using NUnit.Framework; + +#nullable enable + +namespace MonoTouchFixtures.AVFoundation { + + [TestFixture] + [Preserve (AllMembers = true)] + public class AVSpeechSynthesisMarkerTest { + [Test] + public void NSRangeCtor () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var range = new NSRange (1, 2); + nint byteOffset = 314; + Assert.Multiple (() => { + { + using var marker = new AVSpeechSynthesisMarker (range, byteOffset, AVSpeechSynthesisMarkerRangeOption.Word); + Assert.AreEqual (range, marker.TextRange, "TextRange W"); + Assert.AreEqual (byteOffset, (nint) marker.ByteSampleOffset, "ByteSampleOffset W"); + Assert.AreEqual (AVSpeechSynthesisMarkerMark.Word, marker.Mark, "AVSpeechSynthesisMarkerMark W"); + Assert.IsNull (marker.BookmarkName, "BookmarkName W"); + Assert.IsNull (marker.Phoneme, "Phoneme W"); + } + { + using var marker = new AVSpeechSynthesisMarker (range, byteOffset, AVSpeechSynthesisMarkerRangeOption.Sentence); + Assert.AreEqual (range, marker.TextRange, "TextRange S"); + Assert.AreEqual (byteOffset, (nint) marker.ByteSampleOffset, "ByteSampleOffset S"); + Assert.AreEqual (AVSpeechSynthesisMarkerMark.Sentence, marker.Mark, "AVSpeechSynthesisMarkerMark S"); + Assert.IsNull (marker.BookmarkName, "BookmarkName S"); + Assert.IsNull (marker.Phoneme, "Phoneme S"); + } + { + using var marker = new AVSpeechSynthesisMarker (range, byteOffset, AVSpeechSynthesisMarkerRangeOption.Paragraph); + Assert.AreEqual (range, marker.TextRange, "TextRange P"); + Assert.AreEqual (byteOffset, (nint) marker.ByteSampleOffset, "ByteSampleOffset P"); + Assert.AreEqual (AVSpeechSynthesisMarkerMark.Paragraph, marker.Mark, "AVSpeechSynthesisMarkerMark P"); + Assert.IsNull (marker.BookmarkName, "BookmarkName P"); + Assert.IsNull (marker.Phoneme, "Phoneme P"); + } + }); + } + + [Test] + public void StringCtor () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var range = new NSRange (0, 0); + var value = "hello world"; + nint byteOffset = 314; + Assert.Multiple (() => { + { + using var marker = new AVSpeechSynthesisMarker (value, byteOffset, AVSpeechSynthesisMarkerStringOption.Phoneme); + Assert.AreEqual (range, marker.TextRange, "TextRange P"); + Assert.AreEqual (byteOffset, (nint) marker.ByteSampleOffset, "ByteSampleOffset P"); + Assert.AreEqual (AVSpeechSynthesisMarkerMark.Phoneme, marker.Mark, "AVSpeechSynthesisMarkerMark P"); + Assert.IsNull (marker.BookmarkName, "BookmarkName P"); + Assert.AreEqual (value, marker.Phoneme, "Phoneme P"); + } + { + using var marker = new AVSpeechSynthesisMarker (value, byteOffset, AVSpeechSynthesisMarkerStringOption.Bookmark); + Assert.AreEqual (range, marker.TextRange, "TextRange B"); + Assert.AreEqual (byteOffset, (nint) marker.ByteSampleOffset, "ByteSampleOffset B"); + Assert.AreEqual (AVSpeechSynthesisMarkerMark.Bookmark, marker.Mark, "AVSpeechSynthesisMarkerMark B"); + Assert.IsNull (marker.Phoneme, "Phoneme B"); + } + }); + } + } +} diff --git a/tests/monotouch-test/AVFoundation/AVSpeechUtteranceTest.cs b/tests/monotouch-test/AVFoundation/AVSpeechUtteranceTest.cs new file mode 100644 index 000000000000..16130eda0a97 --- /dev/null +++ b/tests/monotouch-test/AVFoundation/AVSpeechUtteranceTest.cs @@ -0,0 +1,42 @@ +// +// Unit tests for AVSpeechUtterance + +using System; + +using AVFoundation; +using Foundation; + +using NUnit.Framework; + +#nullable enable + +namespace MonoTouchFixtures.AVFoundation { + + [TestFixture] + [Preserve (AllMembers = true)] + public class AVSpeechUtteranceTest { + [Test] + public void StringCtor () + { + using var utterance = new AVSpeechUtterance ("hello world"); + Assert.AreEqual (utterance.SpeechString, "hello world", "SpeechString"); + } + + [Test] + public void StringOptionCtor_PlainText () + { + using var utterance = new AVSpeechUtterance ("hello world", AVSpeechUtteranceInitializationOption.PlainText); + Assert.AreEqual (utterance.SpeechString, "hello world", "SpeechString"); + } + + [Test] + public void StringOptionCtor_Ssml () + { + TestRuntime.AssertXcodeVersion (14, 0); + + var ssml = $"""Hello World"""; + using var utterance = new AVSpeechUtterance (ssml, AVSpeechUtteranceInitializationOption.SsmlRepresentation); + Assert.AreEqual (utterance.SpeechString, "Hello World", "SpeechString"); + } + } +} diff --git a/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs b/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs index e37cfd1c8f7a..cb9d07ea57e1 100644 --- a/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs +++ b/tests/monotouch-test/AVFoundation/AudioPlayerTest.cs @@ -7,14 +7,14 @@ // Copyright 2013 Xamarin Inc. All rights reserved. // -#if !__WATCHOS__ - using System.IO; using Foundation; using AVFoundation; using NUnit.Framework; using System; +#nullable enable + namespace MonoTouchFixtures.AVFoundation { [TestFixture] @@ -44,6 +44,40 @@ public void FromUrlWithInvalidUrl () }); } + [Test] + public void FromUrlWithHint () + { + var file = Path.Combine (NSBundle.MainBundle.ResourcePath, "Hand.wav"); + Assert.True (File.Exists (file), file); + using var url = new NSUrl (file, false); + { + using var ap = AVAudioPlayer.FromUrl (url, AVFileTypes.Wave, out var error); + Assert.NotNull (ap, "AVAudioPlayer"); + Assert.Null (error, "NSError"); + } + { + using var ap = AVAudioPlayer.FromUrl (url, AVFileTypes.Wave.GetConstant (), out var error); + Assert.NotNull (ap, "AVAudioPlayer 2"); + Assert.Null (error, "NSError 2"); + } + } + + [Test] + public void FromInvalidUrlWithHint () + { + using var url = new NSUrl ("sdf", false); + { + using var ap = AVAudioPlayer.FromUrl (url, AVFileTypes.Wave, out var error); + Assert.Null (ap, "AVAudioPlayer"); + Assert.NotNull (error, "NSError"); + } + { + using var ap = AVAudioPlayer.FromUrl (url, AVFileTypes.Wave.GetConstant (), out var error); + Assert.Null (ap, "AVAudioPlayer 2"); + Assert.NotNull (error, "NSError 2"); + } + } + [Test] public void FromData () { @@ -54,6 +88,22 @@ public void FromData () } } + [Test] + public void FromDataWithHint () + { + using var data = NSData.FromFile (NSBundle.MainBundle.PathForResource ("Hand", "wav")); + { + using var player = AVAudioPlayer.FromData (data, AVFileTypes.Wave, out var error); + Assert.NotNull (player, "AVAudioPlayer"); + Assert.Null (error, "NSError"); + } + { + using var player = AVAudioPlayer.FromData (data, AVFileTypes.Wave.GetConstant (), out var error); + Assert.NotNull (player, "AVAudioPlayer 2"); + Assert.Null (error, "NSError 2"); + } + } + [Test] public void FromDataWithNullData () { @@ -66,5 +116,3 @@ public void FromDataWithNullData () } } } - -#endif // !__WATCHOS__ diff --git a/tests/monotouch-test/AVFoundation/CMTagCollectionVideoOutputPresetTest.cs b/tests/monotouch-test/AVFoundation/CMTagCollectionVideoOutputPresetTest.cs new file mode 100644 index 000000000000..19a8efc5d66b --- /dev/null +++ b/tests/monotouch-test/AVFoundation/CMTagCollectionVideoOutputPresetTest.cs @@ -0,0 +1,28 @@ +// +// Unit tests for CMTagCollectionVideoOutputPreset + +using System; + +using AVFoundation; +using CoreMedia; +using Foundation; + +using NUnit.Framework; + +#nullable enable + +namespace MonoTouchFixtures.AVFoundation { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CMTagCollectionVideoOutputPresetTest { + [Test] + public void Create () + { + TestRuntime.AssertXcodeVersion (16, 0); + using var tagCollection = CMTagCollectionVideoOutputPreset.Monoscopic.Create (out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.IsNotNull (tagCollection, "TagCollection"); + } + } +} diff --git a/tests/monotouch-test/AVFoundation/FourCCTest.cs b/tests/monotouch-test/AVFoundation/FourCCTest.cs index 75245c710ac1..3a91a42da210 100644 --- a/tests/monotouch-test/AVFoundation/FourCCTest.cs +++ b/tests/monotouch-test/AVFoundation/FourCCTest.cs @@ -1,3 +1,4 @@ +using System; using Foundation; using AVFoundation; using NUnit.Framework; @@ -6,7 +7,7 @@ namespace MonoTouchFixtures.AVFoundation { [TestFixture] [Preserve (AllMembers = true)] public class AVFoundationEnumTest { - string FourCC (int value) + public static string FourCC (int value) { return new string (new char [] { (char) (byte) (value >> 24), @@ -15,6 +16,25 @@ string FourCC (int value) (char) (byte) value }); } + public static string FourCC (uint value) + { + return new string (new char [] { + (char) (byte) (value >> 24), + (char) (byte) (value >> 16), + (char) (byte) (value >> 8), + (char) (byte) value }); + } + + public static uint FourCC (string value) + { + if (value.Length != 4) + throw new ArgumentOutOfRangeException (); + return (((uint) value [0]) << 24) + + (((uint) value [1]) << 16) + + (((uint) value [2]) << 8) + + (((uint) value [3]) << 0); + } + [Test] public void PromptStyle () { diff --git a/tests/monotouch-test/AVKit/PlayerViewControllerTest.cs b/tests/monotouch-test/AVKit/PlayerViewControllerTest.cs deleted file mode 100644 index 9c29188c60fa..000000000000 --- a/tests/monotouch-test/AVKit/PlayerViewControllerTest.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -// Unit tests for AVPlayerViewController -// -// Authors: -// Sebastien Pouliot -// -// Copyright 2014 Xamarin Inc. All rights reserved. -// - -#if HAS_IAD - -using System; -using AVKit; -using Foundation; -using UIKit; -using iAd; -using ObjCRuntime; -using NUnit.Framework; -using Xamarin.Utils; - -namespace MonoTouchFixtures.AVKit { - - [TestFixture] - [Preserve (AllMembers = true)] - public class PlayerViewControllerTest { - - [Test] - public void PreparePrerollAds_New () - { - TestRuntime.AssertSystemVersion (ApplePlatform.iOS, 8, 0, throwIfOtherPlatform: false); - - AVPlayerViewController.PrepareForPrerollAds (); - } - } -} - -#endif // HAS_IAD diff --git a/tests/monotouch-test/AudioToolbox/AudioUnitTest.cs b/tests/monotouch-test/AudioToolbox/AudioUnitTest.cs index ce0f6260ea86..3f46778335d9 100644 --- a/tests/monotouch-test/AudioToolbox/AudioUnitTest.cs +++ b/tests/monotouch-test/AudioToolbox/AudioUnitTest.cs @@ -28,6 +28,8 @@ public class AudioUnitTest { [Test] public void Callbacks () { + TestRuntime.IgnoreIfLockedScreen (); + var audioComponent = AudioComponent.FindComponent (AudioTypeOutput.VoiceProcessingIO); using var audioUnit = new global::AudioUnit.AudioUnit (audioComponent); diff --git a/tests/monotouch-test/AudioUnit/AUGraphTestMac.cs b/tests/monotouch-test/AudioUnit/AUGraphTestMac.cs index b5b94d8af240..5f52bf8de173 100644 --- a/tests/monotouch-test/AudioUnit/AUGraphTestMac.cs +++ b/tests/monotouch-test/AudioUnit/AUGraphTestMac.cs @@ -61,6 +61,7 @@ void SetupAUGraph () public void DoTest () { TestRuntime.AssertNotVirtualMachine (); + TestRuntime.IgnoreIfLockedScreen (); SetupAUGraph (); diff --git a/tests/monotouch-test/AudioUnit/AVSpeechSynthesisProviderAudioUnitTest.cs b/tests/monotouch-test/AudioUnit/AVSpeechSynthesisProviderAudioUnitTest.cs new file mode 100644 index 000000000000..b95d47b49448 --- /dev/null +++ b/tests/monotouch-test/AudioUnit/AVSpeechSynthesisProviderAudioUnitTest.cs @@ -0,0 +1,33 @@ +// +// Unit tests for AVSpeechSynthesisProviderAudioUnit +// + +using System; +using System.Runtime.InteropServices; + +using NUnit.Framework; + +using AudioUnit; +using AVFoundation; +using Foundation; +using ObjCRuntime; + +namespace MonoTouchFixtures.AudioUnit { + [TestFixture] + [Preserve (AllMembers = true)] + public class AVSpeechSynthesisProviderAudioUnitTest { + [Test] + public void Create () + { + + var cd = new AudioComponentDescription () { + ComponentType = AudioComponentType.Output, + ComponentSubType = AudioUnitSubType.Sampler, + ComponentManufacturer = AudioComponentManufacturerType.Apple, + }; + using var unit = AVSpeechSynthesisProviderAudioUnit.Create (cd, (AudioComponentInstantiationOptions) 0, out var error); + Assert.IsNotNull (unit, "Unit"); + Assert.IsNull (error, "Error"); + } + } +} diff --git a/tests/monotouch-test/CoreFoundation/ProxyTest.cs b/tests/monotouch-test/CoreFoundation/ProxyTest.cs index 23af0b5dc5f0..d3dc852811fa 100644 --- a/tests/monotouch-test/CoreFoundation/ProxyTest.cs +++ b/tests/monotouch-test/CoreFoundation/ProxyTest.cs @@ -76,6 +76,9 @@ public void Setup () var context = listener.GetContext (); var request = context.Request; var pacPath = Path.Combine (NSBundle.MainBundle.ResourcePath, request.RawUrl.Substring (1)); + pacPath = Path.GetFullPath (pacPath); + if (!pacPath.StartsWith (Path.GetFullPath (NSBundle.MainBundle.ResourcePath) + Path.DirectorySeparatorChar)) + throw new InvalidOperationException ($"Invalid access: {request.RawUrl}"); Console.WriteLine ($" Serving {pacPath}"); var buf = File.ReadAllBytes (pacPath); context.Response.ContentLength64 = buf.Length; diff --git a/tests/monotouch-test/CoreMedia/CMTagCollectionTests.cs b/tests/monotouch-test/CoreMedia/CMTagCollectionTests.cs new file mode 100644 index 000000000000..7552e289e6b8 --- /dev/null +++ b/tests/monotouch-test/CoreMedia/CMTagCollectionTests.cs @@ -0,0 +1,614 @@ +// +// Unit tests for CMTag +// +// Authors: +// Rolf Bjarne Kvinge +// +// Copyright 2024 Microsoft Corp. All rights reserved. +// +using System; + +using CoreFoundation; +using CoreMedia; +using Foundation; +using ObjCRuntime; + +using NUnit.Framework; + +using Xamarin.Utils; + +using MonoTouchFixtures.AVFoundation; + +namespace MonoTouchFixtures.CoreMedia { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CMTagCollectionTests { + [Test] + public void GetTypeIdTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.AreNotEqual (0, CMTagCollection.GetTypeId (), "GetTypeId"); + } + + [Test] + public void CreateTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (); + Assert.AreEqual (0, (int) tagCollection.Count, "Count A"); + Assert.IsTrue (tagCollection.IsEmpty, "IsEmpty A"); + } + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual (1, (int) tagCollection.Count, "Count B"); + Assert.IsFalse (tagCollection.IsEmpty, "IsEmpty B"); + } + + { + using var tagCollection = CMTagCollection.Create (new CMTag [] { CMTag.MediaTypeVideo }); + Assert.AreEqual (1, (int) tagCollection.Count, "Count C"); + Assert.IsFalse (tagCollection.IsEmpty, "IsEmpty C"); + } + + { + using var tagCollection = CMTagCollection.Create ((CMTag []) null); + Assert.AreEqual (0, (int) tagCollection.Count, "Count D"); + Assert.IsTrue (tagCollection.IsEmpty, "IsEmpty D"); + } + } + + [Test] + public void CreateTest_OSStatus () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status A"); + Assert.AreEqual (0, (int) tagCollection.Count, "Count A"); + Assert.IsTrue (tagCollection.IsEmpty, "IsEmpty A"); + } + + { + using var tagCollection = CMTagCollection.Create (out var status, CMTag.MediaTypeVideo); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status B"); + Assert.AreEqual (1, (int) tagCollection.Count, "Count B"); + Assert.IsFalse (tagCollection.IsEmpty, "IsEmpty B"); + } + + { + using var tagCollection = CMTagCollection.Create (out var status, new CMTag [] { CMTag.MediaTypeVideo }); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status C"); + Assert.AreEqual (1, (int) tagCollection.Count, "Count C"); + Assert.IsFalse (tagCollection.IsEmpty, "IsEmpty C"); + } + + { + using var tagCollection = CMTagCollection.Create (out var status, (CMTag []) null); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status D"); + Assert.AreEqual (0, (int) tagCollection.Count, "Count D"); + Assert.IsTrue (tagCollection.IsEmpty, "IsEmpty D"); + } + } + + [Test] + public void CreateMutableTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.CreateMutable (out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status A"); + Assert.AreEqual (0, (int) tagCollection.Count, "Count A"); + Assert.IsTrue (tagCollection.IsEmpty, "IsEmpty A"); + } + + { + using var tagCollection = CMTagCollection.CreateMutable (1, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status B"); + Assert.AreEqual (0, (int) tagCollection.Count, "Count B"); + Assert.IsTrue (tagCollection.IsEmpty, "IsEmpty B"); + } + + { + using var tagCollection = CMTagCollection.CreateMutable (-1, out var status); + Assert.AreEqual (CMTagCollectionError.ParamErr, status, "Status C"); + Assert.IsNull (tagCollection, "Null C"); + } + + { + using var tagCollection = CMTagCollection.CreateMutable (); + Assert.AreEqual (0, (int) tagCollection.Count, "Count D"); + Assert.IsTrue (tagCollection.IsEmpty, "IsEmpty D"); + } + } + + [Test] + public void CopyTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual (1, (int) tagCollection.Count, "Count A"); + Assert.IsFalse (tagCollection.IsEmpty, "IsEmpty A"); + + using var copy = tagCollection.Copy (out var status); + Assert.AreEqual (1, (int) copy.Count, "Count B"); + Assert.IsFalse (copy.IsEmpty, "IsEmpty B"); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status B"); + } + + [Test] + public void CreateMutableCopyTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual (1, (int) tagCollection.Count, "Count A"); + Assert.IsFalse (tagCollection.IsEmpty, "IsEmpty A"); + + using var copy = tagCollection.CreateMutableCopy (out var status); + Assert.AreEqual (1, (int) copy.Count, "Count B"); + Assert.IsFalse (copy.IsEmpty, "IsEmpty B"); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status B"); + } + + [Test] + public void ToStringTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual ("CMTagCollection{\n{category:'mdia' value:'vide' }\n}", tagCollection.ToString (), "ToString"); + } + + [Test] + public void ContainsTagTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual (true, tagCollection.ContainsTag (CMTag.MediaTypeVideo), "MediaTypeVideo"); + Assert.AreEqual (false, tagCollection.ContainsTag (CMTag.MediaTypeAudio), "MediaTypeAudio"); + } + + [Test] + public void ContainsTagCollectionTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio); + Assert.AreEqual (true, tagCollection1.ContainsTagCollection (tagCollection2), "1"); + Assert.AreEqual (false, tagCollection2.ContainsTagCollection (tagCollection1), "2"); + + Assert.Throws (() => tagCollection1.ContainsTagCollection (null), "Null"); + } + + [Test] + public void ContainsTagsTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + Assert.AreEqual (true, tagCollection.ContainsTags (CMTag.MediaTypeVideo), "MediaTypeVideo"); + Assert.AreEqual (true, tagCollection.ContainsTags (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio), "MediaTypeVideo+MediaTypeAudio"); + Assert.AreEqual (false, tagCollection.ContainsTags (CMTag.MediaTypeVideo, CMTag.PackingTypeNone), "MediaTypeVideo+PackingTypeNone"); + Assert.AreEqual (false, tagCollection.ContainsTags (CMTag.PackingTypeNone), "PackingTypeNone"); + } + + [Test] + public void ContainsCategoryTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + Assert.AreEqual (false, tagCollection.ContainsCategory (CMTagCategory.ProjectionType), "ProjectionType"); + Assert.AreEqual (true, tagCollection.ContainsCategory (CMTagCategory.MediaType), "MediaType"); + } + + [Test] + public void GetCountTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + Assert.AreEqual (0, (int) tagCollection.GetCount (CMTagCategory.ProjectionType), "ProjectionType"); + Assert.AreEqual (2, (int) tagCollection.GetCount (CMTagCategory.MediaType), "MediaType"); + } + + [Test] + public void TagsTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + var tags = tagCollection.Tags; + Assert.AreEqual (2, tags.Length, "Length"); + } + + [Test] + public void GetTagsTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + var tags = tagCollection.GetTags (out var status); + Assert.AreEqual (2, tags.Length, "Length"); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + } + + [Test] + public void GetTags2Test () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + var tags = new CMTag [1]; + var status = tagCollection.GetTags (tags, tags.Length, out var tagsCopied); + Assert.AreEqual (1, tags.Length, "Length"); + Assert.AreEqual (1, (int) tagsCopied, "Tags Copied"); + Assert.AreEqual (CMTagCollectionError.ExhaustedBufferSize, status, "Status"); + Assert.IsTrue (tags [0].IsValid, "Tags[0].IsValid"); + + Assert.Throws (() => tagCollection.GetTags (tags, tags.Length + 1, out tagsCopied), "AOORE"); + Assert.Throws (() => tagCollection.GetTags (tags, -1, out tagsCopied), "AOORE 2"); + } + + [Test] + public void GetTagsForCategoryTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + var tags = tagCollection.GetTags (CMTagCategory.MediaType, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (2, tags.Length, "Length"); + } + + [Test] + public void GetTagsForCategory2Test () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + var tags = new CMTag [1]; + var status = tagCollection.GetTags (CMTagCategory.MediaType, tags, tags.Length, out var tagsCopied); + Assert.AreEqual (1, tags.Length, "Length"); + Assert.AreEqual (1, (int) tagsCopied, "Tags Copied"); + Assert.AreEqual (CMTagCollectionError.ExhaustedBufferSize, status, "Status"); + Assert.IsTrue (tags [0].IsValid, "Tags[0].IsValid"); + + Assert.Throws (() => tagCollection.GetTags (CMTagCategory.MediaType, tags, tags.Length + 1, out var tagsCopied), "AOORE"); + Assert.Throws (() => tagCollection.GetTags (CMTagCategory.MediaType, tags, -1, out var tagsCopied), "AOORE 2"); + } + + [Test] + public void GetCount_Filter () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + Assert.AreEqual (2, (int) tagCollection.GetCount ((v) => v.Category == CMTagCategory.MediaType), "Count"); + } + + [Test] + public void GetTags_Filter () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + var count = tagCollection.GetCount ((v) => v.Category == CMTagCategory.MediaType); + Assert.AreEqual (2, (int) count, "Count"); + } + + [Test] + public void GetTags2_Filter () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + var tags = new CMTag [1]; + var status = tagCollection.GetTags ((v) => v.Category == CMTagCategory.MediaType, tags, tags.Length, out var tagsCopied); + Assert.AreEqual (1, tags.Length, "Length"); + Assert.AreEqual (1, (int) tagsCopied, "Tags Copied"); + Assert.AreEqual (CMTagCollectionError.ExhaustedBufferSize, status, "Status"); + Assert.IsTrue (tags [0].IsValid, "Tags[0].IsValid"); + + Assert.Throws (() => tagCollection.GetTags ((v) => v.Category == CMTagCategory.MediaType, tags, tags.Length + 1, out tagsCopied), "AOORE"); + Assert.Throws (() => tagCollection.GetTags ((v) => v.Category == CMTagCategory.MediaType, tags, -1, out tagsCopied), "AOORE 2"); + } + + [Test] + public void CreateWithCopyOfTags_Filter () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection2 = tagCollection1.CreateWithCopyOfTags (out var status, CMTagCategory.MediaType); + Assert.AreEqual (2, (int) tagCollection2.Count, "Count"); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + } + + [Test] + public void ApplyTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var counter = 0; + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + tagCollection.Apply ((v) => { + counter++; + }); + Assert.AreEqual ((int) tagCollection.Count, counter, "Counter"); + } + + [Test] + public void ApplyUntilTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var counter = 0; + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + var tag = tagCollection.ApplyUntil ((v) => { + counter++; + return false; + }); + Assert.AreEqual ((int) tagCollection.Count, counter, "Counter A"); + Assert.IsFalse (tag.IsValid, "IsValid A"); + + counter = 0; + tag = tagCollection.ApplyUntil ((v) => { + counter++; + if (v.Category == CMTagCategory.PackingType) + return true; + return false; + }); + Assert.That (counter, Is.GreaterThan (0), "Counter B1"); + Assert.That (counter, Is.LessThanOrEqualTo ((int) tagCollection.Count), "Counter B2"); + Assert.IsTrue (tag.IsValid, "IsValid B"); + Assert.IsTrue (CMTag.Equals (tag, CMTag.PackingTypeNone), "Equals B"); + } + + [Test] + public void Intersect () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = CMTagCollection.Intersect (tagCollection1, tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (1, (int) tagCollection.Count, "Count"); + Assert.IsTrue (CMTag.Equals (CMTag.MediaTypeAudio, tagCollection.Tags [0]), "Tag #0"); + } + + + [Test] + public void Intersect_Instance () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = tagCollection1.Intersect (tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (1, (int) tagCollection.Count, "Count"); + Assert.IsTrue (CMTag.Equals (CMTag.MediaTypeAudio, tagCollection.Tags [0]), "Tag #0"); + } + + [Test] + public void Union () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = CMTagCollection.Union (tagCollection1, tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (3, (int) tagCollection.Count, "Count"); + } + + + [Test] + public void Union_Instance () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = tagCollection1.Union (tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (3, (int) tagCollection.Count, "Count"); + } + + [Test] + public void Subtract () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = CMTagCollection.Subtract (tagCollection1, tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (1, (int) tagCollection.Count, "Count"); + Assert.IsTrue (CMTag.Equals (CMTag.MediaTypeVideo, tagCollection.Tags [0]), "Tag #0"); + } + + [Test] + public void Subtract_Instance () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = tagCollection1.Subtract (tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (1, (int) tagCollection.Count, "Count"); + Assert.IsTrue (CMTag.Equals (CMTag.MediaTypeVideo, tagCollection.Tags [0]), "Tag #0"); + } + + [Test] + public void ExclusiveOr () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = CMTagCollection.ExclusiveOr (tagCollection1, tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (2, (int) tagCollection.Count, "Count"); + } + + [Test] + public void ExclusiveOr_Instance () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + using var tagCollection = tagCollection1.ExclusiveOr (tagCollection2, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, "Status"); + Assert.AreEqual (2, (int) tagCollection.Count, "Count"); + } + + [Test] + public void AddTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + // Trying to modify a non-mutable collection + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual (CMTagCollectionError.ParamErr, tagCollection.Add (CMTag.MediaTypeAudio), "Add"); + } + + [Test] + public void AddMutableTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.CreateMutable (); + Assert.AreEqual (CMTagCollectionError.Success, tagCollection.Add (CMTag.MediaTypeAudio), "Add 1"); + Assert.AreEqual (CMTagCollectionError.Success, tagCollection.Add (CMTag.MediaTypeAudio), "Add 2"); + Assert.AreEqual (1, (int) tagCollection.Count, "Count"); + } + + [Test] + public void RemoveTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + // Trying to modify a non-mutable collection + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual (CMTagCollectionError.ParamErr, tagCollection.Remove (CMTag.MediaTypeAudio), "Remove"); + } + + [Test] + public void RemoveMutableTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.CreateMutable (); + Assert.AreEqual (CMTagCollectionError.TagNotFound, tagCollection.Remove (CMTag.MediaTypeAudio), "Remove 1"); + Assert.AreEqual (CMTagCollectionError.Success, tagCollection.Add (CMTag.MediaTypeAudio), "Add 1"); + Assert.AreEqual (CMTagCollectionError.Success, tagCollection.Remove (CMTag.MediaTypeAudio), "Remove 2"); + Assert.AreEqual (0, (int) tagCollection.Count, "Count"); + Assert.AreEqual (CMTagCollectionError.TagNotFound, tagCollection.Remove (CMTag.MediaTypeAudio), "Remove 3"); + } + + [Test] + public void RemoveAllTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + // Trying to modify a non-mutable collection + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + Assert.AreEqual (CMTagCollectionError.ParamErr, tagCollection.RemoveAllTags (), "Remove"); + } + + [Test] + public void RemoveAllMutableTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.CreateMutable (); + Assert.AreEqual (CMTagCollectionError.Success, tagCollection.Add (CMTag.MediaTypeAudio), "Add 1"); + Assert.AreEqual (CMTagCollectionError.Success, tagCollection.Add (CMTag.MediaTypeVideo), "Add 2"); + Assert.AreEqual (CMTagCollectionError.Success, tagCollection.RemoveAllTags (), "RemoveAll"); + Assert.AreEqual (0, (int) tagCollection.Count, "Count"); + } + + [Test] + public void AddCollection () + { + TestRuntime.AssertXcodeVersion (15, 0); + + // Trying to modify a non-mutable collection + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio, CMTag.PackingTypeNone); + Assert.Throws (() => tagCollection1.Add ((CMTagCollection) null), "Add null"); + Assert.AreEqual (CMTagCollectionError.ParamErr, tagCollection1.Add (tagCollection2), "Add"); + } + + [Test] + public void AddTags () + { + TestRuntime.AssertXcodeVersion (15, 0); + + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + Assert.Throws (() => tagCollection.Add ((CMTag []) null), "Add null"); + Assert.AreEqual (CMTagCollectionError.ParamErr, tagCollection.Add (CMTag.MediaTypeAudio, CMTag.PackingTypeNone), "Add"); + } + + [Test] + public void Dictionary () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var roundTrip = new Action ((collection, message) => { + var dict = collection.ToDictionary (); + var deserializedCollection = CMTagCollection.Create (dict, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, $"{message}: Status"); + // if the union of the original and deserialized collection has the same number of tags as the original collection, then the original and deserialized collections are identical. + var union = collection.Union (deserializedCollection, out status); + Assert.AreEqual (CMTagCollectionError.Success, status, $"{message}: Status 2"); + Assert.AreEqual (collection.Count, union.Count, "Count"); + }); + + Assert.Multiple (() => { + roundTrip (CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio), "Create"); + var tagCollection = CMTagCollection.CreateMutable (); + tagCollection.Add (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + roundTrip (tagCollection, "CreateMutable"); + }); + } + + [Test] + public void Data () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var roundTrip = new Action ((collection, message) => { + var data = collection.ToData (); + var deserializedCollection = CMTagCollection.Create (data, out var status); + Assert.AreEqual (CMTagCollectionError.Success, status, $"{message}: Status"); + // if the union of the original and deserialized collection has the same number of tags as the original collection, then the original and deserialized collections are identical. + var union = collection.Union (deserializedCollection, out status); + Assert.AreEqual (CMTagCollectionError.Success, status, $"{message}: Status 2"); + Assert.AreEqual (collection.Count, union.Count, "Count"); + }); + + Assert.Multiple (() => { + roundTrip (CMTagCollection.Create (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio), "Create"); + var tagCollection = CMTagCollection.CreateMutable (); + tagCollection.Add (CMTag.MediaTypeVideo, CMTag.MediaTypeAudio); + roundTrip (tagCollection, "CreateMutable"); + }); + } + } +} diff --git a/tests/monotouch-test/CoreMedia/CMTagTests.cs b/tests/monotouch-test/CoreMedia/CMTagTests.cs new file mode 100644 index 000000000000..4ca189525b51 --- /dev/null +++ b/tests/monotouch-test/CoreMedia/CMTagTests.cs @@ -0,0 +1,347 @@ +// +// Unit tests for CMTag +// +// Authors: +// Rolf Bjarne Kvinge +// +// Copyright 2025 Microsoft Corp. All rights reserved. +// +using System; + +using CoreFoundation; +using CoreMedia; +using Foundation; +using ObjCRuntime; + +using NUnit.Framework; + +using Xamarin.Utils; + +using MonoTouchFixtures.AVFoundation; + +namespace MonoTouchFixtures.CoreMedia { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CMTagTests { + + public static string FourCC (int value) + { + return AVFoundationEnumTest.FourCC (value); + } + + public static string FourCC (uint value) + { + return AVFoundationEnumTest.FourCC (value); + } + + public static uint FourCC (string value) + { + return AVFoundationEnumTest.FourCC (value); + } + + [Test] + public void Default () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var tag = default (CMTag); + AssertTag (tag, CMTagCategory.Undefined, CMTagDataType.Invalid, 0, false, false, 0, false, 0, false, 0, false, 0, "Default"); + } + + [Test] + public void Create () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.Multiple (() => { + AssertTag ( + CMTag.CreateWithSInt64Value (CMTagCategory.MediaType, 314), + CMTagCategory.MediaType, CMTagDataType.SInt64, 314, true, false, 0, false, 0, false, 0, true, 314, "CreateWithSInt64Value"); + + AssertTag ( + CMTag.CreateWithFloat64Value (CMTagCategory.MediaType, 3.14), + CMTagCategory.MediaType, CMTagDataType.Float64, 4614253070214989087, true, true, 3.14, false, 0, false, 0, false, 0, "CreateWithFloat64Value"); + + AssertTag ( + CMTag.CreateWithOSTypeValue (CMTagCategory.MediaType, 314), + CMTagCategory.MediaType, CMTagDataType.OSType, 314, true, false, 0, true, 314, false, 0, false, 0, "CreateWithOSTypeValue"); + + AssertTag ( + CMTag.CreateWithFlagsValue (CMTagCategory.MediaType, 314), + CMTagCategory.MediaType, CMTagDataType.Flags, 314, true, false, 0, false, 0, true, 314, false, 0, "CreateWithFlagsValue"); + }); + } + + [Test] + public void Equals () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.Multiple (() => { + Assert.AreEqual (true, CMTag.Equals (default (CMTag), default (CMTag)), "Default"); + Assert.AreEqual (true, CMTag.Equals (CMTag.Invalid, CMTag.Invalid), "Invalid"); + Assert.AreEqual (true, CMTag.Equals (CMTag.MediaTypeVideo, CMTag.MediaTypeVideo), "MediaTypeVideo"); + Assert.AreEqual (true, CMTag.Equals (CMTag.MediaSubTypeMebx, CMTag.MediaSubTypeMebx), "MediaSubTypeMebx"); + Assert.AreEqual (true, CMTag.Equals (CMTag.MediaTypeAudio, CMTag.MediaTypeAudio), "MediaTypeAudio"); + Assert.AreEqual (true, CMTag.Equals (CMTag.MediaTypeMetadata, CMTag.MediaTypeMetadata), "MediaTypeMetadata"); + Assert.AreEqual (true, CMTag.Equals (CMTag.StereoLeftEye, CMTag.StereoLeftEye), "StereoLeftEye"); + Assert.AreEqual (true, CMTag.Equals (CMTag.StereoRightEye, CMTag.StereoRightEye), "StereoRightEye"); + Assert.AreEqual (true, CMTag.Equals (CMTag.StereoLeftAndRightEye, CMTag.StereoLeftAndRightEye), "StereoLeftAndRightEye"); + Assert.AreEqual (true, CMTag.Equals (CMTag.StereoNone, CMTag.StereoNone), "StereoNone"); + Assert.AreEqual (true, CMTag.Equals (CMTag.StereoInterpretationOrderReversed, CMTag.StereoInterpretationOrderReversed), "StereoInterpretationOrderReversed"); + Assert.AreEqual (true, CMTag.Equals (CMTag.ProjectionTypeRectangular, CMTag.ProjectionTypeRectangular), "ProjectionTypeRectangular"); + Assert.AreEqual (true, CMTag.Equals (CMTag.ProjectionTypeEquirectangular, CMTag.ProjectionTypeEquirectangular), "ProjectionTypeEquirectangular"); + Assert.AreEqual (true, CMTag.Equals (CMTag.ProjectionTypeHalfEquirectangular, CMTag.ProjectionTypeHalfEquirectangular), "ProjectionTypeHalfEquirectangular"); + Assert.AreEqual (true, CMTag.Equals (CMTag.ProjectionTypeFisheye, CMTag.ProjectionTypeFisheye), "ProjectionTypeFisheye"); + Assert.AreEqual (true, CMTag.Equals (CMTag.PackingTypeNone, CMTag.PackingTypeNone), "PackingTypeNone"); + Assert.AreEqual (true, CMTag.Equals (CMTag.PackingTypeSideBySide, CMTag.PackingTypeSideBySide), "PackingTypeSideBySide"); + Assert.AreEqual (true, CMTag.Equals (CMTag.PackingTypeOverUnder, CMTag.PackingTypeOverUnder), "PackingTypeOverUnder"); + + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.MediaTypeVideo), "Invalid vs MediaTypeVideo"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.MediaSubTypeMebx), "Invalid vs MediaSubTypeMebx"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.MediaTypeAudio), "Invalid vs MediaTypeAudio"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.MediaTypeMetadata), "Invalid vs MediaTypeMetadata"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.StereoLeftEye), "Invalid vs StereoLeftEye"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.StereoRightEye), "Invalid vs StereoRightEye"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.StereoLeftAndRightEye), "Invalid vs StereoLeftAndRightEye"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.StereoNone), "Invalid vs StereoNone"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.StereoInterpretationOrderReversed), "Invalid vs StereoInterpretationOrderReversed"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.ProjectionTypeRectangular), "Invalid vs ProjectionTypeRectangular"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.ProjectionTypeEquirectangular), "Invalid vs ProjectionTypeEquirectangular"); + Assert.AreEqual (!TestRuntime.CheckXcodeVersion (16, 0), CMTag.Equals (CMTag.Invalid, CMTag.ProjectionTypeHalfEquirectangular), "Invalid vs ProjectionTypeHalfEquirectangular"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.ProjectionTypeFisheye), "Invalid vs ProjectionTypeFisheye"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.PackingTypeNone), "Invalid vs PackingTypeNone"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.PackingTypeSideBySide), "Invalid vs PackingTypeSideBySide"); + Assert.AreEqual (false, CMTag.Equals (CMTag.Invalid, CMTag.PackingTypeOverUnder), "Invalid vs PackingTypeOverUnder"); + + Assert.AreEqual (false, CMTag.Equals (CMTag.MediaTypeVideo, CMTag.Invalid), "MediaTypeVideo vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.MediaSubTypeMebx, CMTag.Invalid), "MediaSubTypeMebx vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.MediaTypeAudio, CMTag.Invalid), "MediaTypeAudio vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.MediaTypeMetadata, CMTag.Invalid), "MediaTypeMetadata vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.StereoLeftEye, CMTag.Invalid), "StereoLeftEye vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.StereoRightEye, CMTag.Invalid), "StereoRightEye vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.StereoLeftAndRightEye, CMTag.Invalid), "StereoLeftAndRightEye vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.StereoNone, CMTag.Invalid), "StereoNone vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.StereoInterpretationOrderReversed, CMTag.Invalid), "StereoInterpretationOrderReversed vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.ProjectionTypeRectangular, CMTag.Invalid), "ProjectionTypeRectangular vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.ProjectionTypeEquirectangular, CMTag.Invalid), "ProjectionTypeEquirectangular vs Invalid"); + Assert.AreEqual (!TestRuntime.CheckXcodeVersion (16, 0), CMTag.Equals (CMTag.ProjectionTypeHalfEquirectangular, CMTag.Invalid), "ProjectionTypeHalfEquirectangular vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.ProjectionTypeFisheye, CMTag.Invalid), "ProjectionTypeFisheye vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.PackingTypeNone, CMTag.Invalid), "PackingTypeNone vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.PackingTypeSideBySide, CMTag.Invalid), "PackingTypeSideBySide vs Invalid"); + Assert.AreEqual (false, CMTag.Equals (CMTag.PackingTypeOverUnder, CMTag.Invalid), "PackingTypeOverUnder vs Invalid"); + }); + } + + [Test] + public void Compare () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.Multiple (() => { + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (default (CMTag), default (CMTag)), "Default"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.Invalid, CMTag.Invalid), "Invalid"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.MediaTypeVideo, CMTag.MediaTypeVideo), "MediaTypeVideo"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.MediaSubTypeMebx, CMTag.MediaSubTypeMebx), "MediaSubTypeMebx"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.MediaTypeAudio, CMTag.MediaTypeAudio), "MediaTypeAudio"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.MediaTypeMetadata, CMTag.MediaTypeMetadata), "MediaTypeMetadata"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.StereoLeftEye, CMTag.StereoLeftEye), "StereoLeftEye"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.StereoRightEye, CMTag.StereoRightEye), "StereoRightEye"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.StereoLeftAndRightEye, CMTag.StereoLeftAndRightEye), "StereoLeftAndRightEye"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.StereoNone, CMTag.StereoNone), "StereoNone"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.StereoInterpretationOrderReversed, CMTag.StereoInterpretationOrderReversed), "StereoInterpretationOrderReversed"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.ProjectionTypeRectangular, CMTag.ProjectionTypeRectangular), "ProjectionTypeRectangular"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.ProjectionTypeEquirectangular, CMTag.ProjectionTypeEquirectangular), "ProjectionTypeEquirectangular"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.ProjectionTypeHalfEquirectangular, CMTag.ProjectionTypeHalfEquirectangular), "ProjectionTypeHalfEquirectangular"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.ProjectionTypeFisheye, CMTag.ProjectionTypeFisheye), "ProjectionTypeFisheye"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.PackingTypeNone, CMTag.PackingTypeNone), "PackingTypeNone"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.PackingTypeSideBySide, CMTag.PackingTypeSideBySide), "PackingTypeSideBySide"); + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.PackingTypeOverUnder, CMTag.PackingTypeOverUnder), "PackingTypeOverUnder"); + + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.MediaTypeVideo), "Invalid vs MediaTypeVideo"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.MediaSubTypeMebx), "Invalid vs MediaSubTypeMebx"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.MediaTypeAudio), "Invalid vs MediaTypeAudio"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.MediaTypeMetadata), "Invalid vs MediaTypeMetadata"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.StereoLeftEye), "Invalid vs StereoLeftEye"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.StereoRightEye), "Invalid vs StereoRightEye"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.StereoLeftAndRightEye), "Invalid vs StereoLeftAndRightEye"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.StereoNone), "Invalid vs StereoNone"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.StereoInterpretationOrderReversed), "Invalid vs StereoInterpretationOrderReversed"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.ProjectionTypeRectangular), "Invalid vs ProjectionTypeRectangular"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.ProjectionTypeEquirectangular), "Invalid vs ProjectionTypeEquirectangular"); + if (TestRuntime.CheckXcodeVersion (16, 0)) { + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.ProjectionTypeHalfEquirectangular), "Invalid vs ProjectionTypeHalfEquirectangular"); + } else { + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.Invalid, CMTag.ProjectionTypeHalfEquirectangular), "Invalid vs ProjectionTypeHalfEquirectangular"); + } + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.ProjectionTypeFisheye), "Invalid vs ProjectionTypeFisheye"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.PackingTypeNone), "Invalid vs PackingTypeNone"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.PackingTypeSideBySide), "Invalid vs PackingTypeSideBySide"); + Assert.AreEqual (CFComparisonResult.LessThan, CMTag.Compare (CMTag.Invalid, CMTag.PackingTypeOverUnder), "Invalid vs PackingTypeOverUnder"); + + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.MediaTypeVideo, CMTag.Invalid), "MediaTypeVideo vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.MediaSubTypeMebx, CMTag.Invalid), "MediaSubTypeMebx vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.MediaTypeAudio, CMTag.Invalid), "MediaTypeAudio vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.MediaTypeMetadata, CMTag.Invalid), "MediaTypeMetadata vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.StereoLeftEye, CMTag.Invalid), "StereoLeftEye vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.StereoRightEye, CMTag.Invalid), "StereoRightEye vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.StereoLeftAndRightEye, CMTag.Invalid), "StereoLeftAndRightEye vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.StereoNone, CMTag.Invalid), "StereoNone vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.StereoInterpretationOrderReversed, CMTag.Invalid), "StereoInterpretationOrderReversed vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.ProjectionTypeRectangular, CMTag.Invalid), "ProjectionTypeRectangular vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.ProjectionTypeEquirectangular, CMTag.Invalid), "ProjectionTypeEquirectangular vs Invalid"); + if (TestRuntime.CheckXcodeVersion (16, 0)) { + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.ProjectionTypeHalfEquirectangular, CMTag.Invalid), "ProjectionTypeHalfEquirectangular vs Invalid"); + } else { + Assert.AreEqual (CFComparisonResult.EqualTo, CMTag.Compare (CMTag.ProjectionTypeHalfEquirectangular, CMTag.Invalid), "ProjectionTypeHalfEquirectangular vs Invalid"); + } + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.ProjectionTypeFisheye, CMTag.Invalid), "ProjectionTypeFisheye vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.PackingTypeNone, CMTag.Invalid), "PackingTypeNone vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.PackingTypeSideBySide, CMTag.Invalid), "PackingTypeSideBySide vs Invalid"); + Assert.AreEqual (CFComparisonResult.GreaterThan, CMTag.Compare (CMTag.PackingTypeOverUnder, CMTag.Invalid), "PackingTypeOverUnder vs Invalid"); + }); + } + + void AssertTag (CMTag tag, CMTagCategory category, CMTagDataType dataType, ulong value, bool isValid, bool hasFloat64Value, double float64Value, bool hasOSTypeValue, uint osTypeValue, bool hasFlagsValue, ulong flagsValue, bool hasInt64Value, long int64Value, string message) + { + Assert.AreEqual (category, tag.Category, $"{message}: Category"); + Assert.AreEqual (dataType, tag.DataType, $"{message}: DataType"); + Assert.AreEqual (value, tag.Value, $"{message}: Value"); + Assert.AreEqual (isValid, tag.IsValid, $"{message}: IsValid"); + Assert.AreEqual (hasFloat64Value, tag.HasFloat64Value, $"{message}: HasFloat64Value"); + if (hasFloat64Value) + Assert.AreEqual (float64Value, tag.Float64Value, $"{message}: Float64Value"); + Assert.AreEqual (hasOSTypeValue, tag.HasOSTypeValue, $"{message}: HasOSTypeValue"); + if (hasOSTypeValue) + Assert.AreEqual (osTypeValue, tag.OSTypeValue, $"{message}: OSTypeValue ({AVFoundationEnumTest.FourCC (osTypeValue)}={osTypeValue} vs {AVFoundationEnumTest.FourCC (tag.OSTypeValue)}={tag.OSTypeValue})"); + Assert.AreEqual (hasFlagsValue, tag.HasFlagsValue, $"{message}: HasFlagsValue"); + if (hasFlagsValue) + Assert.AreEqual (flagsValue, tag.FlagsValue, $"{message}: FlagsValue"); + Assert.AreEqual (hasInt64Value, tag.HasInt64Value, $"{message}: HasInt64Value"); + if (hasInt64Value) + Assert.AreEqual (int64Value, tag.Int64Value, $"{message}: Int64Value"); + } + + [Test] + public void Fields () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.Multiple (() => { + AssertTag (CMTag.Invalid, CMTagCategory.Undefined, CMTagDataType.Invalid, 0, false, false, 0, false, 0, false, 0, false, 0, "Invalid"); + AssertTag (CMTag.MediaTypeVideo, CMTagCategory.MediaType, CMTagDataType.OSType, FourCC ("vide"), true, false, 0, true, FourCC ("vide"), false, 0, false, 0, "MediaTypeVideo"); + AssertTag (CMTag.MediaSubTypeMebx, CMTagCategory.MediaSubType, CMTagDataType.OSType, FourCC ("mebx"), true, false, 0, true, FourCC ("mebx"), false, 0, false, 0, "MediaSubTypeMebx"); + AssertTag (CMTag.MediaTypeAudio, CMTagCategory.MediaType, CMTagDataType.OSType, FourCC ("soun"), true, false, 0, true, FourCC ("soun"), false, 0, false, 0, "MediaTypeAudio"); + AssertTag (CMTag.MediaTypeMetadata, CMTagCategory.MediaType, CMTagDataType.OSType, FourCC ("meta"), true, false, 0, true, FourCC ("meta"), false, 0, false, 0, "MediaTypeMetadata"); + AssertTag (CMTag.StereoLeftEye, CMTagCategory.StereoView, CMTagDataType.Flags, 1, true, false, 0, false, 0, true, 1, false, 0, "StereoLeftEye"); + AssertTag (CMTag.StereoRightEye, CMTagCategory.StereoView, CMTagDataType.Flags, 2, true, false, 0, false, 0, true, 2, false, 0, "StereoRightEye"); + AssertTag (CMTag.StereoLeftAndRightEye, CMTagCategory.StereoView, CMTagDataType.Flags, 3, true, false, 0, false, 0, true, 3, false, 0, "StereoLeftAndRightEye"); + AssertTag (CMTag.StereoNone, CMTagCategory.StereoView, CMTagDataType.Flags, 0, true, false, 0, false, 0, true, 0, false, 0, "StereoNone"); + AssertTag (CMTag.StereoInterpretationOrderReversed, CMTagCategory.StereoViewInterpretation, CMTagDataType.Flags, 1, true, false, 0, false, 0, true, 1, false, 0, "StereoInterpretationOrderReversed"); + AssertTag (CMTag.ProjectionTypeRectangular, CMTagCategory.ProjectionType, CMTagDataType.OSType, FourCC ("rect"), true, false, 0, true, FourCC ("rect"), false, 0, false, 0, "ProjectionTypeRectangular"); + AssertTag (CMTag.ProjectionTypeEquirectangular, CMTagCategory.ProjectionType, CMTagDataType.OSType, FourCC ("equi"), true, false, 0, true, FourCC ("equi"), false, 0, false, 0, "ProjectionTypeEquirectangular"); + if (TestRuntime.CheckXcodeVersion (16, 0)) { + AssertTag (CMTag.ProjectionTypeHalfEquirectangular, CMTagCategory.ProjectionType, CMTagDataType.OSType, FourCC ("hequ"), true, false, 0, true, FourCC ("hequ"), false, 0, false, 0, "ProjectionTypeHalfEquirectangular"); + } else { + AssertTag (CMTag.ProjectionTypeHalfEquirectangular, CMTagCategory.Undefined, CMTagDataType.Invalid, 0, false, false, 0, false, 0, false, 0, false, 0, "Invalid"); + } + AssertTag (CMTag.ProjectionTypeFisheye, CMTagCategory.ProjectionType, CMTagDataType.OSType, FourCC ("fish"), true, false, 0, true, FourCC ("fish"), false, 0, false, 0, "ProjectionTypeFisheye"); + AssertTag (CMTag.PackingTypeNone, CMTagCategory.PackingType, CMTagDataType.OSType, FourCC ("none"), true, false, 0, true, FourCC ("none"), false, 0, false, 0, "PackingTypeNone"); + AssertTag (CMTag.PackingTypeSideBySide, CMTagCategory.PackingType, CMTagDataType.OSType, FourCC ("side"), true, false, 0, true, FourCC ("side"), false, 0, false, 0, "PackingTypeSideBySide"); + AssertTag (CMTag.PackingTypeOverUnder, CMTagCategory.PackingType, CMTagDataType.OSType, FourCC ("over"), true, false, 0, true, FourCC ("over"), false, 0, false, 0, "PackingTypeOverUnder"); + }); + } + + [Test] + public void ToStringTests () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.Multiple (() => { + Assert.AreEqual ("{category:''{INVALID}", default (CMTag).ToString (), "Default"); + Assert.AreEqual ("{category:''{INVALID}", CMTag.Invalid.ToString (), "Invalid"); + Assert.AreEqual ("{category:'mdia' value:'vide' }", CMTag.MediaTypeVideo.ToString (), "MediaTypeVideo"); + Assert.AreEqual ("{category:'msub' value:'mebx' }", CMTag.MediaSubTypeMebx.ToString (), "MediaSubTypeMebx"); + Assert.AreEqual ("{category:'mdia' value:'soun' }", CMTag.MediaTypeAudio.ToString (), "MediaTypeAudio"); + Assert.AreEqual ("{category:'mdia' value:'meta' }", CMTag.MediaTypeMetadata.ToString (), "MediaTypeMetadata"); + Assert.AreEqual ("{category:'eyes' value:0x1 }", CMTag.StereoLeftEye.ToString (), "StereoLeftEye"); + Assert.AreEqual ("{category:'eyes' value:0x2 }", CMTag.StereoRightEye.ToString (), "StereoRightEye"); + Assert.AreEqual ("{category:'eyes' value:0x3 }", CMTag.StereoLeftAndRightEye.ToString (), "StereoLeftAndRightEye"); + Assert.AreEqual ("{category:'eyes' value:0x0 }", CMTag.StereoNone.ToString (), "StereoNone"); + Assert.AreEqual ("{category:'eyip' value:0x1 }", CMTag.StereoInterpretationOrderReversed.ToString (), "StereoInterpretationOrderReversed"); + Assert.AreEqual ("{category:'proj' value:'rect' }", CMTag.ProjectionTypeRectangular.ToString (), "ProjectionTypeRectangular"); + Assert.AreEqual ("{category:'proj' value:'equi' }", CMTag.ProjectionTypeEquirectangular.ToString (), "ProjectionTypeEquirectangular"); + if (TestRuntime.CheckXcodeVersion (16, 0)) { + Assert.AreEqual ("{category:'proj' value:'hequ' }", CMTag.ProjectionTypeHalfEquirectangular.ToString (), "ProjectionTypeHalfEquirectangular"); + } else { + Assert.AreEqual ("{category:''{INVALID}", CMTag.ProjectionTypeHalfEquirectangular.ToString (), "ProjectionTypeHalfEquirectangular"); + } + Assert.AreEqual ("{category:'proj' value:'fish' }", CMTag.ProjectionTypeFisheye.ToString (), "ProjectionTypeFisheye"); + Assert.AreEqual ("{category:'pack' value:'none' }", CMTag.PackingTypeNone.ToString (), "PackingTypeNone"); + Assert.AreEqual ("{category:'pack' value:'side' }", CMTag.PackingTypeSideBySide.ToString (), "PackingTypeSideBySide"); + Assert.AreEqual ("{category:'pack' value:'over' }", CMTag.PackingTypeOverUnder.ToString (), "PackingTypeOverUnder"); + }); + } + + [Test] + public void Dictionary () + { + TestRuntime.AssertXcodeVersion (15, 0); + + var roundTrip = new Action ((tag, message) => { + var dict = tag.ToDictionary (); + var deserializedTag = CMTag.Create (dict); + Assert.AreEqual (true, CMTag.Equals (tag, deserializedTag), message); + }); + + Assert.Multiple (() => { + roundTrip (default (CMTag), "Default"); + roundTrip (CMTag.Invalid, "Invalid"); + roundTrip (CMTag.MediaTypeVideo, "MediaTypeVideo"); + roundTrip (CMTag.MediaSubTypeMebx, "MediaSubTypeMebx"); + roundTrip (CMTag.MediaTypeAudio, "MediaTypeAudio"); + roundTrip (CMTag.MediaTypeMetadata, "MediaTypeMetadata"); + roundTrip (CMTag.StereoLeftEye, "StereoLeftEye"); + roundTrip (CMTag.StereoRightEye, "StereoRightEye"); + roundTrip (CMTag.StereoLeftAndRightEye, "StereoLeftAndRightEye"); + roundTrip (CMTag.StereoNone, "StereoNone"); + roundTrip (CMTag.StereoInterpretationOrderReversed, "StereoInterpretationOrderReversed"); + roundTrip (CMTag.ProjectionTypeRectangular, "ProjectionTypeRectangular"); + roundTrip (CMTag.ProjectionTypeEquirectangular, "ProjectionTypeEquirectangular"); + roundTrip (CMTag.ProjectionTypeHalfEquirectangular, "ProjectionTypeHalfEquirectangular"); + roundTrip (CMTag.ProjectionTypeFisheye, "ProjectionTypeFisheye"); + roundTrip (CMTag.PackingTypeNone, "PackingTypeNone"); + roundTrip (CMTag.PackingTypeSideBySide, "PackingTypeSideBySide"); + roundTrip (CMTag.PackingTypeOverUnder, "PackingTypeOverUnder"); + }); + } + + [Test] + public void Hash () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.Multiple (() => { + Assert.AreNotEqual (0, default (CMTag).GetHashCode (), "Default"); + Assert.AreNotEqual (0, CMTag.Invalid.GetHashCode (), "Invalid"); + Assert.AreNotEqual (0, CMTag.MediaTypeVideo.GetHashCode (), "MediaTypeVideo"); + Assert.AreNotEqual (0, CMTag.MediaSubTypeMebx.GetHashCode (), "MediaSubTypeMebx"); + Assert.AreNotEqual (0, CMTag.MediaTypeAudio.GetHashCode (), "MediaTypeAudio"); + Assert.AreNotEqual (0, CMTag.MediaTypeMetadata.GetHashCode (), "MediaTypeMetadata"); + Assert.AreNotEqual (0, CMTag.StereoLeftEye.GetHashCode (), "StereoLeftEye"); + Assert.AreNotEqual (0, CMTag.StereoRightEye.GetHashCode (), "StereoRightEye"); + Assert.AreNotEqual (0, CMTag.StereoLeftAndRightEye.GetHashCode (), "StereoLeftAndRightEye"); + Assert.AreNotEqual (0, CMTag.StereoNone.GetHashCode (), "StereoNone"); + Assert.AreNotEqual (0, CMTag.StereoInterpretationOrderReversed.GetHashCode (), "StereoInterpretationOrderReversed"); + Assert.AreNotEqual (0, CMTag.ProjectionTypeRectangular.GetHashCode (), "ProjectionTypeRectangular"); + Assert.AreNotEqual (0, CMTag.ProjectionTypeEquirectangular.GetHashCode (), "ProjectionTypeEquirectangular"); + Assert.AreNotEqual (0, CMTag.ProjectionTypeHalfEquirectangular.GetHashCode (), "ProjectionTypeHalfEquirectangular"); + Assert.AreNotEqual (0, CMTag.ProjectionTypeFisheye.GetHashCode (), "ProjectionTypeFisheye"); + Assert.AreNotEqual (0, CMTag.PackingTypeNone.GetHashCode (), "PackingTypeNone"); + Assert.AreNotEqual (0, CMTag.PackingTypeSideBySide.GetHashCode (), "PackingTypeSideBySide"); + Assert.AreNotEqual (0, CMTag.PackingTypeOverUnder.GetHashCode (), "PackingTypeOverUnder"); + }); + } + } +} diff --git a/tests/monotouch-test/CoreMedia/CMTaggedBufferGroupTests.cs b/tests/monotouch-test/CoreMedia/CMTaggedBufferGroupTests.cs new file mode 100644 index 000000000000..cc758ad9cfb4 --- /dev/null +++ b/tests/monotouch-test/CoreMedia/CMTaggedBufferGroupTests.cs @@ -0,0 +1,595 @@ +// +// Unit tests for CMTag +// +// Authors: +// Rolf Bjarne Kvinge +// +// Copyright 2024 Microsoft Corp. All rights reserved. +// +using System; + +using CoreFoundation; +using CoreMedia; +using CoreVideo; +using Foundation; +using ObjCRuntime; + +using NUnit.Framework; + +using Xamarin.Utils; + +using MonoTouchFixtures.AVFoundation; + +namespace MonoTouchFixtures.CoreMedia { + + [TestFixture] + [Preserve (AllMembers = true)] + public class CMTaggedBufferGroupTests { + [Test] + public void GetTypeIdTest () + { + TestRuntime.AssertXcodeVersion (15, 0); + + Assert.AreNotEqual (0, CMTaggedBufferGroup.GetTypeId (), "GetTypeId"); + } + + [Test] + public void Create_PixelBuffers () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var pixelBuffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { pixelBuffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { pixelBuffer, pixelBuffer }, + out var _), "AE 1 Different element count"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + null, + new [] { pixelBuffer }, + out var _), "ANE 1"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + (CVPixelBuffer []) null, + out var _), "ANE 2"); + } + } + + static CMSampleBuffer CreateCMSampleBuffer () + { + var pixelBuffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + var desc = CMVideoFormatDescription.CreateForImageBuffer (pixelBuffer, out var fde); + var sampleTiming = new CMSampleTimingInfo (); + return CMSampleBuffer.CreateForImageBuffer (pixelBuffer, true, desc, sampleTiming, out var sbe); + } + + [Test] + public void Create_MediaBuffers () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var sampleBuffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { sampleBuffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { sampleBuffer, sampleBuffer }, + out var _), "AE 1 Different element count"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + null, + new [] { sampleBuffer }, + out var _), "ANE 1"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + (CMSampleBuffer []) null, + out var _), "ANE 2"); + } + } + + [Test] + public void Create_MixedBuffers () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var pixelBuffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var sampleBuffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection1, tagCollection2 }, + new NativeObject [] { pixelBuffer, sampleBuffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status"); + Assert.AreEqual (2, (int) group.Count, "Count A"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + new [] { tagCollection1 }, + new NativeObject [] { pixelBuffer, sampleBuffer }, + out var _), "AE 1 Different element count"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + null, + new NativeObject [] { pixelBuffer, sampleBuffer }, + out var _), "ANE 1"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + new [] { tagCollection1 }, + (NativeObject []) null, + out var _), "ANE 2"); + + Assert.Throws (() => CMTaggedBufferGroup.Create ( + new [] { tagCollection1 }, + new NativeObject [] { tagCollection2 }, + out var _), "AE 2 Wrong element type"); + } + } + + [Test] + public void Combine () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer1 = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group1 = CMTaggedBufferGroup.Create ( + new [] { tagCollection1 }, + new [] { buffer1 }, + out var status1); + + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer2 = CreateCMSampleBuffer (); // new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group2 = CMTaggedBufferGroup.Create ( + new [] { tagCollection2 }, + new [] { buffer2 }, + out var status2); + + using var group = CMTaggedBufferGroup.Combine (out var status, group1, group2); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status"); + Assert.AreEqual (2, (int) group.Count, "Count A"); + } + } + + [Test] + public void GetTagCollection () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var pixelBuffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { pixelBuffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.AreEqual (tagCollection.Handle, group.GetTagCollection (0).Handle, "#0"); + + Assert.Throws (() => group.GetTagCollection (-1), "AOORE: -1"); + Assert.Throws (() => group.GetTagCollection (1), "AOORE: 1"); + } + } + + [Test] + public void GetPixelBuffer () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.IsNotNull (group.GetPixelBuffer (0), "#0 A"); + + Assert.Throws (() => group.GetPixelBuffer (-1), "AOORE: -1"); + Assert.Throws (() => group.GetPixelBuffer (1), "AOORE: 1"); + } + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status B"); + Assert.AreEqual (1, (int) group.Count, "Count B"); + Assert.IsNull (group.GetPixelBuffer (0), "#0 B"); + } + } + + [Test] + public void GetSampleBuffer () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.AreEqual (buffer.Handle, group.GetSampleBuffer (0).Handle, "#0 A"); + + Assert.Throws (() => group.GetSampleBuffer (-1), "AOORE: -1"); + Assert.Throws (() => group.GetSampleBuffer (1), "AOORE: 1"); + } + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status B"); + Assert.AreEqual (1, (int) group.Count, "Count B"); + Assert.IsNull (group.GetSampleBuffer (0), "#0 B"); + } + } + + [Test] + public void GetMixedBuffers () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var pixelBuffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var sampleBuffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection1, tagCollection2 }, + new NativeObject [] { pixelBuffer, sampleBuffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status C"); + Assert.AreEqual (2, (int) group.Count, "Count C"); + + Assert.IsNotNull (group.GetPixelBuffer (0), "#0 C1"); + Assert.IsNull (group.GetPixelBuffer (1), "#1 C1"); + + Assert.IsNull (group.GetSampleBuffer (0), "#0 C2"); + Assert.IsNotNull (group.GetSampleBuffer (1), "#1 C2"); + } + } + + [Test] + public void GetPixelBuffer_Tag () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.AreEqual (buffer.Handle, group.GetPixelBuffer (CMTag.MediaTypeVideo, out var index).Handle, "Video A"); + Assert.AreEqual (0, (int) index, "Index A"); + Assert.IsNull (group.GetPixelBuffer (CMTag.MediaTypeAudio, out index), "Audio A"); + } + + { + // buffer of wrong type + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.IsNull (group.GetPixelBuffer (CMTag.MediaTypeVideo, out var index), "Video A"); + } + + { + // more than one of the buffers match + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer1 = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var buffer2 = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection1, tagCollection2 }, + new [] { buffer1, buffer2 }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (2, (int) group.Count, "Count A"); + Assert.IsNull (group.GetPixelBuffer (CMTag.MediaTypeVideo, out var index), "Video A"); + } + } + + [Test] + public void GetPixelBuffer_TagCollection () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.AreEqual (buffer.Handle, group.GetPixelBuffer (tagCollection, out var index).Handle, "Video A"); + Assert.AreEqual (0, (int) index, "Index A"); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio); + Assert.IsNull (group.GetPixelBuffer (tagCollection2, out index), "Audio A"); + } + + { + // buffer of wrong type + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.IsNull (group.GetPixelBuffer (tagCollection, out var index), "Video A"); + } + + { + // more than one of the buffers match + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer1 = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var buffer2 = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection1, tagCollection2 }, + new [] { buffer1, buffer2 }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (2, (int) group.Count, "Count A"); + Assert.IsNull (group.GetPixelBuffer (tagCollection1, out var index), "Video A"); + } + } + + [Test] + public void GetSampleBuffer_Tag () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.AreEqual (buffer.Handle, group.GetSampleBuffer (CMTag.MediaTypeVideo, out var index).Handle, "Video A"); + Assert.AreEqual (0, (int) index, "Index A"); + Assert.IsNull (group.GetSampleBuffer (CMTag.MediaTypeAudio, out index), "Audio A"); + } + + { + // buffer of wrong type + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.IsNull (group.GetSampleBuffer (CMTag.MediaTypeVideo, out var index), "Video A"); + } + + { + // more than one of the buffers match + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer1 = CreateCMSampleBuffer (); + using var buffer2 = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection1, tagCollection2 }, + new [] { buffer1, buffer2 }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (2, (int) group.Count, "Count A"); + Assert.IsNull (group.GetSampleBuffer (CMTag.MediaTypeVideo, out var index), "Video A"); + } + } + + [Test] + public void GetSampleBuffer_TagCollection () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + Assert.IsNotNull (group.GetSampleBuffer (tagCollection, out var index), "Video A"); + Assert.AreEqual (0, (int) index, "Index A"); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeAudio); + Assert.IsNull (group.GetSampleBuffer (tagCollection2, out index), "Audio A"); + } + + { + // buffer of wrong type + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = new CVPixelBuffer (20, 10, CVPixelFormatType.CV24RGB); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status B"); + Assert.AreEqual (1, (int) group.Count, "Count B"); + Assert.IsNull (group.GetSampleBuffer (tagCollection, out var index), "Video B"); + } + + { + // more than one of the buffers match + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer1 = CreateCMSampleBuffer (); + using var buffer2 = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection1, tagCollection2 }, + new [] { buffer1, buffer2 }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status C"); + Assert.AreEqual (2, (int) group.Count, "Count C"); + Assert.IsNull (group.GetSampleBuffer (tagCollection1, out var index), "Video C"); + } + } + + [Test] + public void GetNumberOfMatches () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + // more than one of the buffers match + using var tagCollection1 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var tagCollection2 = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer1 = CreateCMSampleBuffer (); + using var buffer2 = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection1, tagCollection2 }, + new [] { buffer1, buffer2 }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (2, (int) group.Count, "Count A"); + Assert.AreEqual (2, (int) group.GetNumberOfMatches (tagCollection1), "Matches 1 A"); + using var tagCollection3 = CMTagCollection.Create (CMTag.MediaTypeAudio); + Assert.AreEqual (0, (int) group.GetNumberOfMatches (tagCollection3), "Matches 2 A"); + } + } + + [Test] + public void CreateFormatDescription () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + using var desc = group.CreateFormatDescription (out status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status Desc A"); + Assert.AreEqual (CMMediaType.TaggedBufferGroup, desc.MediaType, $"Desc.MediaType: {AVFoundationEnumTest.FourCC ((int) desc.MediaType)}"); + Assert.AreEqual (CMTaggedBufferGroupFormatType.TaggedBufferGroup, desc.TaggedBufferGroupFormatType, "Desc.TaggedBufferGroupFormatType"); + } + } + + [Test] + public void Matches () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + using var desc = group.CreateFormatDescription (out status); + Assert.IsTrue (group.Matches (desc), "Matches A"); + using var desc2 = CMFormatDescription.Create (CMMediaType.ClosedCaption, (uint) CMClosedCaptionFormatType.CEA608, out var fde); + Assert.AreEqual (CMFormatDescriptionError.None, fde, "FDE"); + Assert.IsFalse (group.Matches (desc2), "Matches B"); + } + } + + [Test] + public void CreateSampleBuffer () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + using var formatDescription = CMFormatDescription.Create (CMMediaType.TaggedBufferGroup, (uint) CMTaggedBufferGroupFormatType.TaggedBufferGroup, out var fde); + Assert.AreEqual (CMFormatDescriptionError.None, fde, "FDE A"); + using var sampleBuffer = group.CreateSampleBuffer (CMTime.Zero, CMTime.FromSeconds (1, 1), formatDescription, out status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status CSB A"); + } + } + + [Test] + public void GetTaggedBufferGroup () + { + TestRuntime.AssertXcodeVersion (15, 0); + + { + using var tagCollection = CMTagCollection.Create (CMTag.MediaTypeVideo); + using var buffer = CreateCMSampleBuffer (); + using var group = CMTaggedBufferGroup.Create ( + new [] { tagCollection }, + new [] { buffer }, + out var status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status A"); + Assert.AreEqual (1, (int) group.Count, "Count A"); + using var formatDescription = CMFormatDescription.Create (CMMediaType.TaggedBufferGroup, (uint) CMTaggedBufferGroupFormatType.TaggedBufferGroup, out var fde); + Assert.AreEqual (CMFormatDescriptionError.None, fde, "FDE A"); + using var sampleBuffer = group.CreateSampleBuffer (CMTime.Zero, CMTime.FromSeconds (1, 1), formatDescription, out status); + Assert.AreEqual (CMTaggedBufferGroupError.Success, status, "Status CSB A"); + + Assert.IsNotNull (sampleBuffer.TaggedBufferGroup, "CMSampleBuffer.GetTaggedBufferGroup A"); + Assert.IsNotNull (CMTaggedBufferGroup.GetTaggedBufferGroup (sampleBuffer), "CMTaggedBufferGroup.GetTaggedBufferGroup A"); + + Assert.IsNull (buffer.TaggedBufferGroup, "CMSampleBuffer.GetTaggedBufferGroup B"); + Assert.IsNull (CMTaggedBufferGroup.GetTaggedBufferGroup (buffer), "CMTaggedBufferGroup.GetTaggedBufferGroup B"); + + Assert.Throws (() => CMTaggedBufferGroup.GetTaggedBufferGroup (null), "ANE"); + } + } + } +} diff --git a/tests/monotouch-test/CoreVideo/CVDisplayLinkTest.cs b/tests/monotouch-test/CoreVideo/CVDisplayLinkTest.cs index 02cd13d7882e..eb39df123a95 100644 --- a/tests/monotouch-test/CoreVideo/CVDisplayLinkTest.cs +++ b/tests/monotouch-test/CoreVideo/CVDisplayLinkTest.cs @@ -12,18 +12,6 @@ namespace MonoTouchFixtures.CoreVideo { [TestFixture] [Preserve (AllMembers = true)] public class CVDisplayLinkTest { - - void IgnoreIfLockedScreen () - { -#if NET - var props = CGSession.GetProperties (); - var value = props.Dictionary [(NSString) "CGSSessionScreenIsLocked"]; // This key isn't documented, so no binding for it. - var isLocked = (value as NSNumber)?.BoolValue; - if (isLocked == true) - Assert.Ignore ("The screen is locked."); -#endif - } - [Test] public void CreateFromDisplayIdValidIdTest () { @@ -72,7 +60,7 @@ public void CreateFromOpenGLMaskTest () public void DefaultConstructorTest () { TestRuntime.AssertNotVSTS (); - IgnoreIfLockedScreen (); + TestRuntime.IgnoreIfLockedScreen (); Assert.DoesNotThrow (() => { using var displayLink = new CVDisplayLink (); }); @@ -82,7 +70,7 @@ public void DefaultConstructorTest () public void SetCurrentDisplayOpenGLTest () { TestRuntime.AssertNotVSTS (); - IgnoreIfLockedScreen (); + TestRuntime.IgnoreIfLockedScreen (); Assert.DoesNotThrow (() => { using var displayLink = new CVDisplayLink (); displayLink.SetCurrentDisplay (CGDisplay.MainDisplayID); @@ -93,7 +81,7 @@ public void SetCurrentDisplayOpenGLTest () public void GetCurrentDisplayTest () { TestRuntime.AssertNotVSTS (); - IgnoreIfLockedScreen (); + TestRuntime.IgnoreIfLockedScreen (); Assert.DoesNotThrow (() => { using var displayLink = new CVDisplayLink (); Assert.AreEqual (CGDisplay.MainDisplayID, displayLink.GetCurrentDisplay ()); @@ -114,7 +102,7 @@ public void TryTranslateTimeValidTest () { TestRuntime.AssertNotVSTS (); TestRuntime.AssertSystemVersion (ApplePlatform.MacOSX, 12, 0); - IgnoreIfLockedScreen (); + TestRuntime.IgnoreIfLockedScreen (); var outTime = new CVTimeStamp { Version = 0, Flags = (1L << 0) | (1L << 1), // kCVTimeStampVideoTimeValid | kCVTimeStampHostTimeValid diff --git a/tests/monotouch-test/Foundation/ArrayTest.cs b/tests/monotouch-test/Foundation/ArrayTest.cs index acf7598adefc..d411257309cd 100644 --- a/tests/monotouch-test/Foundation/ArrayTest.cs +++ b/tests/monotouch-test/Foundation/ArrayTest.cs @@ -14,9 +14,7 @@ using Security; using NUnit.Framework; -#if !NET -using NativeHandle = System.IntPtr; -#endif +#nullable enable namespace MonoTouchFixtures.Foundation { @@ -51,11 +49,7 @@ public void Null () NSComparisonResult Comparator (NSObject obj1, NSObject obj2) { comparator_count++; -#if NET return (NSComparisonResult) (((long) (IntPtr) obj2.Handle - (long) (IntPtr) obj1.Handle)); -#else - return (NSComparisonResult) (long) ((nint) obj2.Handle - (nint) obj1.Handle); -#endif } [Test] @@ -87,6 +81,8 @@ bool Evaluator (NSObject evaluatedObject, NSDictionary bindings) [Test] public void Filter () { + TestRuntime.AssertNotInterpreter ("This test does not work in the interpreter: https://github.com/dotnet/runtime/issues/110649"); + evaluator_count = 0; using (var obj1 = new NSObject ()) using (var obj2 = new NSObject ()) diff --git a/tests/monotouch-test/Foundation/AttributedStringTest.cs b/tests/monotouch-test/Foundation/AttributedStringTest.cs index 04b68547fd28..27ca7132334b 100644 --- a/tests/monotouch-test/Foundation/AttributedStringTest.cs +++ b/tests/monotouch-test/Foundation/AttributedStringTest.cs @@ -140,17 +140,53 @@ public void NullDictionary () [Test] public void Create_Url_Error () { - var obj = NSAttributedString.Create (new NSUrl (""), new NSAttributedStringDocumentAttributes (), out var rda, out var e); + { + using var obj = NSAttributedString.Create (new NSUrl (""), new NSAttributedStringDocumentAttributes (), out var rda, out var e); + Assert.IsNull (obj, "IsNull"); + Assert.IsNotNull (e, "Error"); + } + + { + using var obj = NSAttributedString.Create (new NSUrl (""), new NSAttributedStringDocumentAttributes (), out var e); + Assert.IsNull (obj, "IsNull 2"); + Assert.IsNotNull (e, "Error 2"); + } + } + + [Test] + public void Create_Markdown_Url_Error () + { + using var markdownOptions = new NSAttributedStringMarkdownParsingOptions (); + using var obj = NSAttributedString.Create (new NSUrl (""), markdownOptions, null, out var e); Assert.IsNull (obj, "IsNull"); Assert.IsNotNull (e, "Error"); } + [Test] public void Create_Url () { var textFile = Path.Combine (NSBundle.MainBundle.ResourcePath, "uncompressed.txt"); var textUrl = NSUrl.CreateFileUrl (textFile); - var obj = NSAttributedString.Create (textUrl, new NSAttributedStringDocumentAttributes (), out var rda, out var e); + { + using var obj = NSAttributedString.Create (textUrl, new NSAttributedStringDocumentAttributes (), out var rda, out var e); + Assert.IsNull (e, "Error"); + Assert.IsNotNull (obj, "IsNull"); + } + { + using var obj = NSAttributedString.Create (textUrl, new NSAttributedStringDocumentAttributes (), out var e); + Assert.IsNull (e, "Error 2"); + Assert.IsNotNull (obj, "IsNull 2"); + } + } + + [Test] + public void Create_Markdown_Url () + { + var textFile = Path.Combine (NSBundle.MainBundle.ResourcePath, "uncompressed.txt"); + var textUrl = NSUrl.CreateFileUrl (textFile); + using var markdownOptions = new NSAttributedStringMarkdownParsingOptions (); + using var obj = NSAttributedString.Create (textUrl, markdownOptions, null, out var e); Assert.IsNull (e, "Error"); Assert.IsNotNull (obj, "IsNull"); } @@ -160,7 +196,23 @@ public void Create_Data_Error () { var attributes = new NSAttributedStringDocumentAttributes (); attributes.DocumentType = NSDocumentType.RTF; - var obj = NSAttributedString.Create (NSData.FromArray (new byte [42]), attributes, out var rda, out var e); + { + using var obj = NSAttributedString.Create (NSData.FromArray (new byte [42]), attributes, out var rda, out var e); + Assert.IsNull (obj, "IsNull"); + Assert.IsNotNull (e, "Error"); + } + { + using var obj = NSAttributedString.Create (NSData.FromArray (new byte [42]), attributes, out var e); + Assert.IsNull (obj, "IsNull 2"); + Assert.IsNotNull (e, "Error 2"); + } + } + + [Test] + public void Create_Markdown_Data_Error () + { + using var markdownOptions = new NSAttributedStringMarkdownParsingOptions (); + using var obj = NSAttributedString.Create (NSData.FromArray (new byte [] { (byte) '[', (byte) '!', (byte) '"', (byte) '$', (byte) '%', (byte) '&', (byte) '/', (byte) '(', (byte) ')', (byte) '=', (byte) '?', (byte) '¿', (byte) '^', (byte) '*', (byte) '¨', (byte) '´', (byte) '}', (byte) '\\' }), markdownOptions, null, out var e); Assert.IsNull (obj, "IsNull"); Assert.IsNotNull (e, "Error"); } @@ -168,7 +220,33 @@ public void Create_Data_Error () [Test] public void Create_Data () { - var obj = NSAttributedString.Create (new NSData (), new NSAttributedStringDocumentAttributes (), out var rda, out var e); + { + using var obj = NSAttributedString.Create (new NSData (), new NSAttributedStringDocumentAttributes (), out var rda, out var e); + Assert.IsNotNull (obj, "IsNull"); + Assert.IsNull (e, "Error"); + } + { + using var obj = NSAttributedString.Create (new NSData (), new NSAttributedStringDocumentAttributes (), out var e); + Assert.IsNotNull (obj, "IsNull 2"); + Assert.IsNull (e, "Error 2"); + } + } + + [Test] + public void Create_Markdown_Data () + { + using var markdownOptions = new NSAttributedStringMarkdownParsingOptions (); + using var obj = NSAttributedString.Create (new NSData (), markdownOptions, null, out var e); + Assert.IsNotNull (obj, "IsNull"); + Assert.IsNull (e, "Error"); + } + + + [Test] + public void Create_Markdown_String () + { + using var markdownOptions = new NSAttributedStringMarkdownParsingOptions (); + using var obj = NSAttributedString.Create ("#markdown", markdownOptions, null, out var e); Assert.IsNotNull (obj, "IsNull"); Assert.IsNull (e, "Error"); } diff --git a/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs b/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs index 310034ba0f50..8108d5a94560 100644 --- a/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs +++ b/tests/monotouch-test/GameplayKit/GKMeshGraphTests.cs @@ -8,19 +8,15 @@ // Copyright 2016 Xamarin Inc. All rights reserved. // -#if !__WATCHOS__ - using System; using NUnit.Framework; using Foundation; using GameplayKit; -#if NET using System.Numerics; -#else -using OpenTK; -#endif + +#nullable enable namespace MonoTouchFixtures.GamePlayKit { [TestFixture] @@ -30,8 +26,7 @@ public class GKMeshGraphTests { [Test] public void GKTriangleTest () { - if (!TestRuntime.CheckXcodeVersion (8, 0)) - Assert.Ignore ("Ignoring GameplayKit tests: Requires iOS10+"); + TestRuntime.AssertNotInterpreter ("This test does not work in the interpreter: https://github.com/dotnet/runtime/issues/110644"); var max = new Vector2 (10, 10); var min = new Vector2 (1, 1); @@ -61,4 +56,3 @@ public void GKTriangleTest () } } } -#endif diff --git a/tests/monotouch-test/MediaPlayer/MoviePlayerControllerTest.cs b/tests/monotouch-test/MediaPlayer/MoviePlayerControllerTest.cs deleted file mode 100644 index c8da7eea3703..000000000000 --- a/tests/monotouch-test/MediaPlayer/MoviePlayerControllerTest.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// Unit tests for MPMoviePlayerController -// -// Authors: -// Sebastien Pouliot -// -// Copyright 2014 Xamarin Inc. All rights reserved. -// - -#if HAS_IAD - -using System; -using Foundation; -using MediaPlayer; -using UIKit; -using iAd; -using ObjCRuntime; -using NUnit.Framework; -using Xamarin.Utils; - -namespace MonoTouchFixtures.MediaPlayer { - - [TestFixture] - [Preserve (AllMembers = true)] - public class MoviePlayerControllerTest { - - [Test] - public void PreparePrerollAds_New () - { - TestRuntime.AssertSystemVersion (ApplePlatform.iOS, 7, 0); - - // NSInvalidArgumentException +[MPMoviePlayerController preparePrerollAds]: unrecognized selector sent to class 0x109c46b48 - if (TestRuntime.CheckSystemVersion (ApplePlatform.iOS, 10, 0)) - Assert.Ignore ("Broken on iOS 10 beta 3"); - - MPMoviePlayerController.PrepareForPrerollAds (); - } - } -} - -#endif // HAS_IAD diff --git a/tests/monotouch-test/ObjCRuntime/DelegateAndDataSourceTest.cs b/tests/monotouch-test/ObjCRuntime/DelegateAndDataSourceTest.cs index 9bca165600e7..ed53212d77ba 100644 --- a/tests/monotouch-test/ObjCRuntime/DelegateAndDataSourceTest.cs +++ b/tests/monotouch-test/ObjCRuntime/DelegateAndDataSourceTest.cs @@ -148,8 +148,6 @@ bool Skip (Type t) switch (t.Namespace) { case "SafetyKit": return true; // SafetyKit requires a custom entitlement, and will throw exceptions if it's not present. - case "QTKit": - return true; // QTKit has been removed from macos. } return false; diff --git a/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs b/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs index 909dbecdca53..a6c81fe64c79 100644 --- a/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs +++ b/tests/monotouch-test/ObjCRuntime/DlfcnTest.cs @@ -59,6 +59,18 @@ public void GetVariables () Assert.AreEqual (-7.7576533930025207E-103d, Dlfcn.GetDouble (handle, symbol), "GetDouble"); Assert.AreEqual ((nuint) 0xaabbccddeeff8899, (nuint) Dlfcn.GetIntPtr (handle, symbol), "GetIntPtr"); // won't work in 32-bit, but we don't care about that anymore Assert.AreEqual ((nuint) 0xaabbccddeeff8899, Dlfcn.GetUIntPtr (handle, symbol), "GetUIntPtr"); + Assert.AreEqual ((nint) 0xaabbccddeeff8899, Dlfcn.GetStruct (handle, symbol), "GetStruct"); // won't work in 32-bit, but we don't care about that anymore + Assert.AreEqual ((nuint) 0xaabbccddeeff8899, Dlfcn.GetStruct (handle, symbol), "GetStruct"); // won't work in 32-bit, but we don't care about that anymore + Assert.AreEqual ((long) 0xaabbccddeeff8899, Dlfcn.GetStruct (handle, symbol), "GetStruct"); + Assert.AreEqual ((ulong) 0xaabbccddeeff8899, Dlfcn.GetStruct (handle, symbol), "GetStruct"); + Assert.AreEqual ((int) 0xeeff8899, Dlfcn.GetStruct (handle, symbol), "GetStruct"); + Assert.AreEqual ((uint) 0xeeff8899, Dlfcn.GetStruct (handle, symbol), "GetStruct"); + Assert.AreEqual ((ulong) 0xaabbccddeeff8899, Dlfcn.GetStruct (handle, symbol).Value, "GetStruct"); + Assert.AreEqual (-3.9541907E+28f, Dlfcn.GetStruct (handle, symbol), "GetStruct"); + Assert.AreEqual (-7.7576533930025207E-103d, Dlfcn.GetStruct (handle, symbol), "GetStruct"); + + Assert.AreEqual ((ulong) 0, Dlfcn.GetStruct (handle, "inexistent_symbol"), "GetStruct inexistent"); + Assert.AreEqual ((ulong) 0, Dlfcn.GetStruct (handle, "inexistent_symbol").Value, "GetStruct inexistent"); Dlfcn.SetInt16 (handle, symbol, 0x77); Assert.AreEqual ((short) 0x77, Dlfcn.GetInt16 (handle, symbol), "SetInt16"); @@ -110,6 +122,12 @@ public void GetVariables () } }); } + +#pragma warning disable CS0649 // Field 'DlfcnTest.SomeValue.Value' is never assigned to, and will always have its default value 0 + struct SomeValue { + public ulong Value; + } +#pragma warning restore CS0649 #endif } } diff --git a/tests/monotouch-test/ObjCRuntime/EveryFrameworkSmokeTest.cs b/tests/monotouch-test/ObjCRuntime/EveryFrameworkSmokeTest.cs index 6fe5f8de3af2..f620fda96e14 100644 --- a/tests/monotouch-test/ObjCRuntime/EveryFrameworkSmokeTest.cs +++ b/tests/monotouch-test/ObjCRuntime/EveryFrameworkSmokeTest.cs @@ -26,12 +26,6 @@ LoadStatus CheckLoadFailure (string libraryName, string path) // No bindings for any of these yet switch (libraryName) { -#if !NET - case "QTKitLibrary": // no ARM64 version present - if (Runtime.IsARM64CallingConvention) - return LoadStatus.Acceptable; - break; -#endif case "CryptoTokenKitLibrary": case "FinderSyncLibrary": case "HypervisorLibrary": diff --git a/tests/monotouch-test/System.Net.Http/MessageHandlers.cs b/tests/monotouch-test/System.Net.Http/MessageHandlers.cs index 487ab0db12d0..8db9ba50ded8 100644 --- a/tests/monotouch-test/System.Net.Http/MessageHandlers.cs +++ b/tests/monotouch-test/System.Net.Http/MessageHandlers.cs @@ -471,12 +471,14 @@ public void RejectSslCertificatesServicePointManager (Type handlerType) // return false, since we want to test that the exception is raised return false; }; +#pragma warning disable SM02184 // "Server certificate validation disabled" - the warning is incorrect, because it's supposed to detect when server validation always passes (i.e. the callback returns 'true'), but we return _false_ (i.e. we always fail the server validation). #pragma warning disable SYSLIB0014 // 'ServicePointManager' is obsolete: 'WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. Settings on ServicePointManager no longer affect SslStream or HttpClient.' (https://aka.ms/dotnet-warnings/SYSLIB0014) ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => { #pragma warning restore SYSLIB0014 invalidServicePointManagerCbWasExcuted = true; return false; }; +#pragma warning restore SM02184 #if NET } else if (handler is SocketsHttpHandler shh) { expectedExceptionType = typeof (AuthenticationException); @@ -592,6 +594,7 @@ public void AcceptSslCertificatesServicePointManager (Type handlerType) } #if NET + [Ignore ("https://github.com/xamarin/xamarin-macios/issues/21912")] [TestCase ("https://self-signed.badssl.com/")] [TestCase ("https://wrong.host.badssl.com/")] public void AcceptSslCertificatesWithCustomValidationCallbackNSUrlSessionHandler (string url) @@ -626,7 +629,7 @@ public void AcceptSslCertificatesWithCustomValidationCallbackNSUrlSessionHandler Assert.IsNotNull (serverCertificate, "Server certificate is null"); Assert.IsNull (ex, "Exception wasn't expected."); Assert.IsNotNull (result, "Result was null"); - Assert.IsTrue (result.IsSuccessStatusCode, "Status code was not success"); + Assert.IsTrue (result.IsSuccessStatusCode, $"Status code was not success: {result.StatusCode}"); } } diff --git a/tests/monotouch-test/UIKit/ViewControllerTest.cs b/tests/monotouch-test/UIKit/ViewControllerTest.cs index 48a69fe0ea76..729fc3ac39ca 100644 --- a/tests/monotouch-test/UIKit/ViewControllerTest.cs +++ b/tests/monotouch-test/UIKit/ViewControllerTest.cs @@ -14,9 +14,6 @@ using Foundation; using UIKit; using ObjCRuntime; -#if HAS_IAD -using iAd; -#endif using NUnit.Framework; using Xamarin.Utils; @@ -174,16 +171,6 @@ public void AppearanceTransition () vc.EndAppearanceTransition (); } } - -#if HAS_IAD - [Test] - public void InterstitialAds_New () - { - TestRuntime.AssertSystemVersion (ApplePlatform.iOS, 7, 0, throwIfOtherPlatform: false); - - UIViewController.PrepareForInterstitialAds (); - } -#endif // HAS_IAD } } diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Resources/APS_Development_Environment_Profile.mobileprovision b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Resources/APS_Development_Environment_Profile.mobileprovision new file mode 100644 index 000000000000..8bbde8045ce3 Binary files /dev/null and b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Resources/APS_Development_Environment_Profile.mobileprovision differ diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CompileEntitlementsTaskTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CompileEntitlementsTaskTests.cs index 17186c306f29..d07956c2adbb 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CompileEntitlementsTaskTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CompileEntitlementsTaskTests.cs @@ -1,6 +1,10 @@ +using System; using System.Collections.Generic; +using System.Configuration; using System.IO; +using System.IO.Pipes; using System.Linq; +using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Newtonsoft.Json.Linq; using NUnit.Framework; @@ -27,7 +31,7 @@ CustomCompileEntitlements CreateEntitlementsTask (out string compiledEntitlement return CreateEntitlementsTask (out compiledEntitlements, out var _); } - CustomCompileEntitlements CreateEntitlementsTask (out string compiledEntitlements, out string archivedEntitlements) + CustomCompileEntitlements CreateEntitlementsTask (out string compiledEntitlements, out string archivedEntitlements, string mobileProvision = "profile.mobileprovision") { var task = CreateTask (); @@ -35,7 +39,8 @@ CustomCompileEntitlements CreateEntitlementsTask (out string compiledEntitlement task.BundleIdentifier = "com.xamarin.MySingleView"; task.CompiledEntitlements = new TaskItem (Path.Combine (MonoTouchProjectObjPath, "Entitlements.xcent")); task.Entitlements = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location)!, "Resources", "Entitlements.plist"); - task.ProvisioningProfile = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location)!, "Resources", "profile.mobileprovision"); + if (!string.IsNullOrEmpty (mobileProvision)) + task.ProvisioningProfile = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location)!, "Resources", mobileProvision); task.SdkPlatform = "iPhoneOS"; task.SdkVersion = "6.1"; task.TargetFrameworkMoniker = "Xamarin.iOS,v1.0"; @@ -257,5 +262,167 @@ public void TeamIdentifierPrefix () var archivedKag = ((PString?) archived ["keychain-access-group"])?.Value; Assert.That (archivedKag, Is.EqualTo ("Z8CSQKJE7R.org.xamarin"), "archived value 1"); } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_Invalid (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("invalid", 1, mode); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Message, "Invalid value 'invalid' for the 'ValidateEntitlements' property. Valid values are: 'disable', 'warn' or 'error'.", "Error message"); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Code, "MT7138", "Error code"); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "WarningCount"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_NotInProfile_Default (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("", 1, mode); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Message, "The app requests the entitlement 'aps-environment', but the provisioning profile 'iOS Team Provisioning Profile: *' does not contain this entitlement.", "Error message"); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Code, "MT7140", "Error code"); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "WarningCount"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_NotInProfile_Error (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("error", 1, mode); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Message, "The app requests the entitlement 'aps-environment', but the provisioning profile 'iOS Team Provisioning Profile: *' does not contain this entitlement.", "Error message"); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Code, "MT7140", "Error code"); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "WarningCount"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_NotInProfile_Warning (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("warn", 0, mode); + Assert.AreEqual (1, Engine.Logger.WarningsEvents.Count, "WarningCount"); + Assert.AreEqual (Engine.Logger.WarningsEvents [0].Message, "The app requests the entitlement 'aps-environment', but the provisioning profile 'iOS Team Provisioning Profile: *' does not contain this entitlement.", "Warning message"); + Assert.AreEqual (Engine.Logger.WarningsEvents [0].Code, "MT7140", "Warning code"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_NoProfile_Error (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("error", 1, mode, mobileProvision: string.Empty); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Message, "The app requests the entitlement 'aps-environment', but no provisioning profile has been specified. Please specify the name of the provisioning profile to use with the 'CodesignProvision' property in the project file.", "Error message"); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Code, "MT7139", "Error code"); + Assert.AreEqual (0, GetWarningsSkippingIrrelevantWarnings ().Count, "WarningCount"); + } + + List GetWarningsSkippingIrrelevantWarnings () + { + return Engine.Logger.WarningsEvents.Where (v => { + Console.WriteLine ($"Message: {v.Message}"); + return v.Message != ("Cannot expand $(AppIdentifierPrefix) in Entitlements.plist without a provisioning profile for key 'application-identifier' with value '$(AppIdentifierPrefix)$(CFBundleIdentifier)'."); + }).ToList (); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_NoProfile_Warning (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("warn", 0, mode, mobileProvision: string.Empty); + var warnings = GetWarningsSkippingIrrelevantWarnings (); + Assert.AreEqual (1, warnings.Count, "WarningCount"); + Assert.AreEqual (warnings [0].Message, "The app requests the entitlement 'aps-environment', but no provisioning profile has been specified. Please specify the name of the provisioning profile to use with the 'CodesignProvision' property in the project file.", "Error message"); + Assert.AreEqual (warnings [0].Code, "MT7139", "Warning code"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_MismatchedValue_Error (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("error", 1, mode, mobileProvision: "APS_Development_Environment_Profile.mobileprovision"); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Message, "The app requests the entitlement 'aps-environment' with the value 'production', but the provisioning profile 'APS Development Environment Profile' grants it for the value 'development'.", "Error message"); + Assert.AreEqual (Engine.Logger.ErrorEvents [0].Code, "MT7137", "Error code"); + var warnings = GetWarningsSkippingIrrelevantWarnings (); + Assert.AreEqual (0, warnings.Count, "WarningCount"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_MismatchedValue_Warning (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("warn", 0, mode, mobileProvision: "APS_Development_Environment_Profile.mobileprovision"); + Assert.AreEqual (1, Engine.Logger.WarningsEvents.Count, "WarningCount"); + Assert.AreEqual (Engine.Logger.WarningsEvents [0].Message, "The app requests the entitlement 'aps-environment' with the value 'production', but the provisioning profile 'APS Development Environment Profile' grants it for the value 'development'.", "Warning message"); + Assert.AreEqual (Engine.Logger.WarningsEvents [0].Code, "MT7137", "Warning code"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_MatchingValue_NoError (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("error", 0, mode, mobileProvision: "APS_Development_Environment_Profile.mobileprovision", apsEnvironmentValue: "development"); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "WarningCount"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_MatchingValue_NoWarning (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("warn", 0, mode, mobileProvision: "APS_Development_Environment_Profile.mobileprovision", apsEnvironmentValue: "development"); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "WarningCount"); + } + + [Test] + [TestCase (EntitlementsMode.InCustomEntitlements)] + [TestCase (EntitlementsMode.InFile)] + public void ValidateEntitlements_Disabled (EntitlementsMode mode) + { + ValidateEntitlementsImpl ("disable", 0, mode); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "WarningCount"); + } + + public enum EntitlementsMode { + None, + InFile, + InCustomEntitlements, + } + + CompileEntitlements ValidateEntitlementsImpl (string validateEntitlements, int expectedErrorCount, EntitlementsMode entitlementsMode, string mobileProvision = "profile.mobileprovision", string apsEnvironmentValue = "production") + { + var task = CreateTask (); + + var dir = Cache.CreateTemporaryDirectory (); + task.AppBundleDir = Path.Combine (dir, "TestApp.app"); + task.BundleIdentifier = "com.xamarin.compileentitlementstasktest"; + task.CompiledEntitlements = new TaskItem (Path.Combine (dir, "Entitlements.xcent")); + switch (entitlementsMode) { + case EntitlementsMode.InFile: + var path = Path.Combine (dir, "Entitlements.plist"); + File.WriteAllText (path, $"aps-environment{apsEnvironmentValue}"); + task.Entitlements = path; + break; + case EntitlementsMode.InCustomEntitlements: + var apsEnvironment = new TaskItem ("aps-environment"); + apsEnvironment.SetMetadata ("Type", "String"); + apsEnvironment.SetMetadata ("Value", apsEnvironmentValue); + task.CustomEntitlements = new [] { apsEnvironment }; + break; + } + if (!string.IsNullOrEmpty (mobileProvision)) + task.ProvisioningProfile = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location)!, "Resources", mobileProvision); + task.SdkPlatform = "iPhoneOS"; + // task.SdkVersion = "6.1"; + task.TargetFrameworkMoniker = ".NETCoreApp,Version=v6.0,Profile=ios"; + task.ValidateEntitlements = validateEntitlements; + ExecuteTask (task, expectedErrorCount: expectedErrorCount); + return task; + } } } diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MergeAppBundleTaskTest.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MergeAppBundleTaskTest.cs index 89298ac3628f..16a79e70fb84 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MergeAppBundleTaskTest.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MergeAppBundleTaskTest.cs @@ -22,7 +22,6 @@ public void SetUp () { "MSBuildSDKsPath", null }, // Comes from MSBuild, and confuses 'dotnet build' }; - RunMake (Path.Combine (Configuration.RootPath, "tests", "test-libraries"), environment: env); RunMake (Path.Combine (Configuration.RootPath, "tests", "common", "TestProjects", "ComplexAssembly"), environment: env); } diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs index 952c1d48a8eb..1ec21bb8960a 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs @@ -100,32 +100,42 @@ public void NoDSymUtil () } [Test] - [TestCase ("--marshal-managed-exceptions", "")] - [TestCase ("--marshal-managed-exceptions:", "")] - [TestCase ("--marshal-managed-exceptions:default", "default")] - [TestCase ("--marshal-managed-exceptions default", "default")] - [TestCase ("--marshal-managed-exceptions:dummy", "dummy")] - [TestCase ("-marshal-managed-exceptions:dummy", "dummy")] - [TestCase ("/marshal-managed-exceptions:dummy", "dummy")] - public void MarshalManagedExceptionMode (string input, string output) + [TestCase ("--marshal-managed-exceptions", "", null)] + [TestCase ("--marshal-managed-exceptions:", "", null)] + [TestCase ("--marshal-managed-exceptions:default", "default", null)] + [TestCase ("--marshal-managed-exceptions default", "default", null)] + [TestCase ("--marshal-managed-exceptions:dummy", "dummy", null)] + [TestCase ("-marshal-managed-exceptions:dummy", "dummy", null)] + [TestCase ("/marshal-managed-exceptions:dummy", "dummy", null)] + [TestCase ("/marshal-managed-exceptions:dummy", "dummy", "existing")] + [TestCase ("--marshal-managed-exceptions", "", "existing")] + [TestCase ("--marshal-managed-exceptions:", "", "existing")] + [TestCase ("--marshal-objectivec-exceptions:", "existing", "existing")] + public void MarshalManagedExceptionMode (string input, string output, string existingValue) { var task = CreateTask (); + task.MarshalManagedExceptionMode = existingValue; task.ExtraArgs = input; Assert.IsTrue (task.Execute (), input); Assert.AreEqual (output, task.MarshalManagedExceptionMode, output); } [Test] - [TestCase ("--marshal-objectivec-exceptions", "")] - [TestCase ("--marshal-objectivec-exceptions:", "")] - [TestCase ("--marshal-objectivec-exceptions:default", "default")] - [TestCase ("--marshal-objectivec-exceptions default", "default")] - [TestCase ("--marshal-objectivec-exceptions:dummy", "dummy")] - [TestCase ("-marshal-objectivec-exceptions:dummy", "dummy")] - [TestCase ("/marshal-objectivec-exceptions:dummy", "dummy")] - public void MarshalObjetiveCExceptionMode (string input, string output) + [TestCase ("--marshal-objectivec-exceptions", "", null)] + [TestCase ("--marshal-objectivec-exceptions:", "", null)] + [TestCase ("--marshal-objectivec-exceptions:default", "default", null)] + [TestCase ("--marshal-objectivec-exceptions default", "default", null)] + [TestCase ("--marshal-objectivec-exceptions:dummy", "dummy", null)] + [TestCase ("-marshal-objectivec-exceptions:dummy", "dummy", null)] + [TestCase ("/marshal-objectivec-exceptions:dummy", "dummy", null)] + [TestCase ("/marshal-objectivec-exceptions:dummy", "dummy", "existing")] + [TestCase ("--marshal-objectivec-exceptions", "", "existing")] + [TestCase ("--marshal-objectivec-exceptions:", "", "existing")] + [TestCase ("--marshal-managed-exceptions:", "existing", "existing")] + public void MarshalObjetiveCExceptionMode (string input, string output, string existingValue) { var task = CreateTask (); + task.MarshalObjectiveCExceptionMode = existingValue; task.ExtraArgs = input; Assert.IsTrue (task.Execute (), input); Assert.AreEqual (output, task.MarshalObjectiveCExceptionMode, output); diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ValidateNoStaticLibraresTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ValidateNoStaticLibraresTests.cs new file mode 100644 index 000000000000..6d12ecd9dc88 --- /dev/null +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ValidateNoStaticLibraresTests.cs @@ -0,0 +1,128 @@ +#nullable enable + +using System; +using System.IO; +using System.Linq; +using Microsoft.Build.Utilities; +using NUnit.Framework; + +using Xamarin.Tests; +using Xamarin.Utils; + +namespace Xamarin.MacDev.Tasks { + [TestFixture] + public class ValidateNoStaticLibrariesTests : TestBase { + ValidateNoStaticLibraries CreateTask (string skipStaticLibraryValidation, params string [] paths) + { + var task = CreateTask (); + task.SkipStaticLibraryValidation = skipStaticLibraryValidation; + task.ValidateItems = paths.Select (v => new TaskItem (v)).ToArray (); + return task; + } + + [Test] + [TestCase ("error")] + [TestCase ("false")] + [TestCase ("")] + public void StaticLibraries_Error (string skipStaticLibraryValidation) + { + Configuration.IgnoreIfIgnoredPlatform (ApplePlatform.iOS); + + var paths = new [] { + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libtest.a"), + Path.Combine (Configuration.RootPath, "README.md"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libframework.dylib"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework", "SwiftTest"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework", "Info.plist"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "XStaticArTest.framework", "XStaticArTest"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "XStaticObjectTest.framework", "XStaticObjectTest"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "XTest.framework", "XTest"), + }; + var task = CreateTask (skipStaticLibraryValidation, paths); + ExecuteTask (task, expectedErrorCount: 3); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "Warning Count"); + Assert.AreEqual ($"The library {paths [0]} is a static library, and static libraries are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error.", Engine.Logger.ErrorEvents [0].Message, "Error message 1"); + Assert.AreEqual ($"The library {paths [5]} is a static library, and static libraries are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error.", Engine.Logger.ErrorEvents [1].Message, "Error message 2"); + Assert.AreEqual ($"The file {paths [6]} is an object file, and object files are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error.", Engine.Logger.ErrorEvents [2].Message, "Error message 3"); + } + + [Test] + [TestCase ("warn")] + public void StaticLibraries_Warn (string skipStaticLibraryValidation) + { + Configuration.IgnoreIfIgnoredPlatform (ApplePlatform.iOS); + + var paths = new [] { + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libtest.a"), + Path.Combine (Configuration.RootPath, "README.md"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libframework.dylib"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework/SwiftTest"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework/Info.plist"), + }; + var task = CreateTask (skipStaticLibraryValidation, paths); + ExecuteTask (task, expectedErrorCount: 0); + Assert.AreEqual (1, Engine.Logger.WarningsEvents.Count, "Warning Count"); + Assert.AreEqual ($"The library {paths [0]} is a static library, and static libraries are not supported with Hot Restart. Set 'SkipStaticLibraryValidation=true' in the project file to ignore this error.", Engine.Logger.WarningsEvents [0].Message, "Error message"); + } + + [Test] + [TestCase ("disable")] + public void StaticLibraries_Disabled (string skipStaticLibraryValidation) + { + Configuration.IgnoreIfIgnoredPlatform (ApplePlatform.iOS); + + var paths = new [] { + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libtest.a"), + Path.Combine (Configuration.RootPath, "README.md"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libframework.dylib"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework/SwiftTest"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework/Info.plist"), + "/does/not/exist", + }; + var task = CreateTask (skipStaticLibraryValidation, paths); + ExecuteTask (task, expectedErrorCount: 0); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "Warning Count"); + } + + [Test] + [TestCase ("invalid")] + public void StaticLibraries_Invalid (string skipStaticLibraryValidation) + { + Configuration.IgnoreIfIgnoredPlatform (ApplePlatform.iOS); + + var paths = new [] { + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libtest.a"), + Path.Combine (Configuration.RootPath, "README.md"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "libframework.dylib"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework/SwiftTest"), + Path.Combine (Configuration.RootPath, "tests", "test-libraries", ".libs", "iossimulator", "SwiftTest.framework/Info.plist"), + "/does/not/exist", + }; + var task = CreateTask (skipStaticLibraryValidation, paths); + ExecuteTask (task, expectedErrorCount: 1); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "Warning Count"); + Assert.AreEqual ($"Unknown value for 'SkipStaticLibraryValidation': {skipStaticLibraryValidation}. Valid values are: 'true', 'false', 'warn'.", Engine.Logger.ErrorEvents [0].Message, "Error Message"); + } + + [Test] + [TestCase ("")] + [TestCase ("error")] + public void StaticLibraries_Error_Inexistent (string skipStaticLibraryValidation) + { + var task = CreateTask (skipStaticLibraryValidation, "/does/not/exist"); + ExecuteTask (task, expectedErrorCount: 1); + Assert.AreEqual (0, Engine.Logger.WarningsEvents.Count, "Warning Count"); + Assert.AreEqual ($"The file '/does/not/exist' does not exist.", Engine.Logger.ErrorEvents [0].Message.TrimEnd (), "Error Message"); + } + + [Test] + [TestCase ("warn")] + public void StaticLibraries_Warn_Inexistent (string skipStaticLibraryValidation) + { + var task = CreateTask (skipStaticLibraryValidation, "/does/not/exist"); + ExecuteTask (task, expectedErrorCount: 0); + Assert.AreEqual (1, Engine.Logger.WarningsEvents.Count, "Warning Count"); + Assert.AreEqual ($"The file '/does/not/exist' does not exist.", Engine.Logger.WarningsEvents [0].Message.TrimEnd (), "Error Message"); + } + } +} diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TestHelpers/TestBase.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TestHelpers/TestBase.cs index c3ecbbe86ac9..8f38b34b0225 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TestHelpers/TestBase.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TestHelpers/TestBase.cs @@ -65,15 +65,15 @@ public virtual void Setup () public void ExecuteTask (Task task, int expectedErrorCount = 0) { var rv = task.Execute (); + string messages = string.Empty; + var allEvents = Engine.Logger.AllEvents.ToArray (); + if (allEvents.Any ()) { + messages = "\n\t" + string.Join ("\n\t", allEvents.Select ((v) => v.AsString ()).ToArray ()); + } if (expectedErrorCount != Engine.Logger.ErrorEvents.Count) { - string messages = string.Empty; - var allEvents = Engine.Logger.AllEvents.ToArray (); - if (allEvents.Any ()) { - messages = "\n\t" + string.Join ("\n\t", allEvents.Select ((v) => v.AsString ()).ToArray ()); - } Assert.AreEqual (expectedErrorCount, Engine.Logger.ErrorEvents.Count, "#RunTask-ErrorCount" + messages); } - Assert.AreEqual (expectedErrorCount == 0, rv, "Failure"); + Assert.AreEqual (expectedErrorCount == 0, rv, "Failure" + messages); } protected string CreateTempFile (string path) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj index 4a8bafb836c3..354782fa214d 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj @@ -38,6 +38,7 @@ + @@ -81,7 +82,7 @@ PreserveNewest - + PreserveNewest diff --git a/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj b/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj index 2e130dd64d2a..0db590d62223 100644 --- a/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj +++ b/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj @@ -15,6 +15,7 @@ + diff --git a/tests/mtouch/RegistrarTest.cs b/tests/mtouch/RegistrarTest.cs index 5adb8b6c90f2..7ffe964e4166 100644 --- a/tests/mtouch/RegistrarTest.cs +++ b/tests/mtouch/RegistrarTest.cs @@ -345,7 +345,6 @@ public void MT4134 () new { Framework = "QuickLookThumbnailing", Version = "13.0" }, new { Framework = "AutomaticAssessmentConfiguration", Version = "13.4" }, new { Framework = "CoreLocationUI", Version = "15.0" }, - new { Framework = "Chip", Version = "15.0" }, new { Framework = "ThreadNetwork", Version = "15.0" }, new { Framework = "BackgroundAssets", Version = "16.0" }, new { Framework = "DeviceDiscoveryExtension", Version = "16.0" }, diff --git a/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BaseGeneratorWithAnalyzerTestClass.cs b/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BaseGeneratorWithAnalyzerTestClass.cs index e3df3d973dda..597f281beae0 100644 --- a/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BaseGeneratorWithAnalyzerTestClass.cs +++ b/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BaseGeneratorWithAnalyzerTestClass.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using System.Threading.Tasks; using Microsoft.CodeAnalysis; diff --git a/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BindingTypeSemanticAnalyzerTests.cs b/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BindingTypeSemanticAnalyzerTests.cs index 0c39445a326d..493566bc3d17 100644 --- a/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BindingTypeSemanticAnalyzerTests.cs +++ b/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/BindingTypeSemanticAnalyzerTests.cs @@ -1,3 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System.Collections; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis; @@ -8,12 +13,115 @@ namespace Microsoft.Macios.Bindings.Analyzer.Tests; public class BindingTypeSemanticAnalyzerTests : BaseGeneratorWithAnalyzerTestClass { + class TestDataBindingTypeAnalyzerTests : IEnumerable { + public IEnumerator GetEnumerator () + { + const string nonPartialClassBinding = @" +using ObjCBindings; - [Theory] - [AllSupportedPlatforms] - public async Task BindingTypeMustBePartial (ApplePlatform platform) - { - const string inputText = @" +namespace Test { + [BindingType] + public class Examples { + } +} +"; + yield return [ + nonPartialClassBinding, + BindingTypeSemanticAnalyzer.RBI0001.Id, + "The binding type 'Test.Examples' must be declared partial" + ]; + + const string classBindingNotClas = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public interface Examples { + } +} +"; + yield return [ + classBindingNotClas, + BindingTypeSemanticAnalyzer.RBI0002.Id, + "BindingType can only be used to decorate a class but was found on 'Test.Examples' which is not a class" + ]; + + const string nonPartialCategory = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public class Examples { + } +} +"; + yield return [ + nonPartialCategory, + BindingTypeSemanticAnalyzer.RBI0001.Id, + "The binding type 'Test.Examples' must be declared partial" + ]; + + const string nonClassCategory = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public interface Examples { + } +} +"; + yield return [ + nonClassCategory, + BindingTypeSemanticAnalyzer.RBI0003.Id, + "BindingType can only be used to decorate a class but was found on 'Test.Examples' which is not a class" + ]; + + const string nonStaticCategory = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public partial class Examples { + } +} +"; + yield return [ + nonStaticCategory, + BindingTypeSemanticAnalyzer.RBI0004.Id, + "BindingType can only be used to decorate a static class but was found on 'Test.Examples' which is not static" + ]; + + const string nonPartialProtocol = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public interface Examples { + } +} +"; + yield return [ + nonPartialProtocol, + BindingTypeSemanticAnalyzer.RBI0001.Id, + "The binding type 'Test.Examples' must be declared partial" + ]; + + const string nonInterfaceProtocol = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public class Examples { + } +} +"; + yield return [ + nonInterfaceProtocol, + BindingTypeSemanticAnalyzer.RBI0005.Id, + "BindingType can only be used to decorate an interface but was found on 'Test.Examples' which is not an interface" + ]; + + const string nonSmartEnum = @" using ObjCBindings; namespace Test { @@ -22,14 +130,57 @@ public class Examples { } } "; + yield return [ + nonSmartEnum, + BindingTypeSemanticAnalyzer.RBI0006.Id, + "BindingType can only be used to decorate an enumerator but was found on 'Test.Examples' which is not an enumerator" + ]; + + const string nonPartialStrongDictionary = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public class Examples { + } +} +"; + yield return [ + nonPartialStrongDictionary, + BindingTypeSemanticAnalyzer.RBI0001.Id, + "The binding type 'Test.Examples' must be declared partial" + ]; + + const string nonClassStrongDictionary = @" +using ObjCBindings; + +namespace Test { + [BindingType] + public interface Examples { + } +} +"; + yield return [ + nonClassStrongDictionary, + BindingTypeSemanticAnalyzer.RBI0007.Id, + "BindingType can only be used to decorate a class but was found on 'Test.Examples' which is not a class" + ]; + } - var (compilation, _) = CreateCompilation (nameof (CompareGeneratedCode), platform, inputText); + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + public async Task BindingTypeAnalyzerTests (ApplePlatform platform, string inputText, string diagnosticId, + string diagnosticMessage) + { + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new BindingTypeSemanticAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == BindingTypeSemanticAnalyzer.RBI0001.Id).ToArray (); + .Where (d => d.Id == diagnosticId).ToArray (); Assert.Single (analyzerDiagnotics); // verify the diagnostic message - VerifyDiagnosticMessage (analyzerDiagnotics [0], BindingTypeSemanticAnalyzer.RBI0001.Id, - DiagnosticSeverity.Error, "The binding type 'Test.Examples' must declared as a partial class"); + VerifyDiagnosticMessage (analyzerDiagnotics [0], diagnosticId, DiagnosticSeverity.Error, diagnosticMessage); } } diff --git a/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/SmartEnumsAnalyzerTests.cs b/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/SmartEnumsAnalyzerTests.cs index 677b6b38db9d..ddb2b019b09d 100644 --- a/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/SmartEnumsAnalyzerTests.cs +++ b/tests/rgen/Microsoft.Macios.Bindings.Analyzer.Tests/SmartEnumsAnalyzerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Linq; using System.Threading.Tasks; using Microsoft.CodeAnalysis; @@ -38,13 +40,13 @@ public enum AVCaptureSystemPressureExampleLevel { } "; - var (compilation, _) = CreateCompilation (nameof (SmartEnumsAnalyzerTests), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new SmartEnumsAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == SmartEnumsAnalyzer.RBI0002.Id).ToArray (); + .Where (d => d.Id == SmartEnumsAnalyzer.RBI0008.Id).ToArray (); Assert.Single (analyzerDiagnotics); // verify the diagnostic message - VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0002.Id, + VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0008.Id, DiagnosticSeverity.Error, "The enum value 'AVFoundation.AVCaptureSystemPressureExampleLevel.Shutdown' must be tagged with a Field attribute"); } @@ -126,12 +128,12 @@ public enum AVCaptureSystemPressureExampleLevel { [AllSupportedPlatforms (notValidIdentifierNewLines, "The\nValues")] public async Task SmartEnumSymbolMustBeValidIdentifier (ApplePlatform platform, string inputText, string fieldValue) { - var (compilation, _) = CreateCompilation (nameof (SmartEnumsAnalyzerTests), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new SmartEnumsAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == SmartEnumsAnalyzer.RBI0004.Id).ToArray (); + .Where (d => d.Id == SmartEnumsAnalyzer.RBI0010.Id).ToArray (); Assert.Single (analyzerDiagnotics); - VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0004.Id, + VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0010.Id, DiagnosticSeverity.Error, $"The enum value 'AVFoundation.AVCaptureSystemPressureExampleLevel.Shutdown' backing field '{fieldValue}' is not a valid identifier"); } @@ -193,13 +195,13 @@ public enum AVCaptureSystemPressureExampleLevel { [AllSupportedPlatforms (appleFrameworkLibNamedParameter)] public async Task SmartEnumAppleFrameworkNotLibrary (ApplePlatform platform, string inputText) { - var (compilation, _) = CreateCompilation (nameof (SmartEnumsAnalyzerTests), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new SmartEnumsAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == SmartEnumsAnalyzer.RBI0006.Id).ToArray (); + .Where (d => d.Id == SmartEnumsAnalyzer.RBI0012.Id).ToArray (); Assert.Single (analyzerDiagnotics); - VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0006.Id, + VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0012.Id, DiagnosticSeverity.Warning, "The Field attribute for the enum value 'AVFoundation.AVCaptureSystemPressureExampleLevel.Shutdown' must not provide a value for 'LibraryName'"); } @@ -273,12 +275,12 @@ public enum CustomLibraryEnum { [AllSupportedPlatforms (customLibraryEmptyLibraryNameParameter)] public async Task SmartEnumThirdPartyLibrary (ApplePlatform platform, string inputText) { - var (compilation, _) = CreateCompilation (nameof (SmartEnumsAnalyzerTests), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new SmartEnumsAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == SmartEnumsAnalyzer.RBI0005.Id).ToArray (); + .Where (d => d.Id == SmartEnumsAnalyzer.RBI0011.Id).ToArray (); Assert.Single (analyzerDiagnotics); - VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0005.Id, + VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0011.Id, DiagnosticSeverity.Error, "The field attribute for the enum value 'CustomLibrary.CustomLibraryEnum.High' must set the property 'LibraryName'"); } @@ -303,10 +305,10 @@ public enum CustomLibraryEnum { High, } "; - var (compilation, _) = CreateCompilation (nameof (SmartEnumsAnalyzerTests), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new SmartEnumsAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == SmartEnumsAnalyzer.RBI0002.Id).ToArray (); + .Where (d => d.Id == SmartEnumsAnalyzer.RBI0008.Id).ToArray (); // we should have a diagnostic for each enum value Assert.Equal (3, analyzerDiagnotics.Length); } @@ -341,12 +343,12 @@ public enum AVCaptureSystemPressureExampleLevel { Shutdown, }"; - var (compilation, _) = CreateCompilation (nameof (SmartEnumsAnalyzerTests), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new SmartEnumsAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == SmartEnumsAnalyzer.RBI0003.Id).ToArray (); + .Where (d => d.Id == SmartEnumsAnalyzer.RBI0009.Id).ToArray (); Assert.Single (analyzerDiagnotics); - VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0003.Id, + VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0009.Id, DiagnosticSeverity.Error, "The backing field 'AVFoundation.AVCaptureSystemPressureExampleLevel.Fair' for the enum value 'AVCaptureSystemPressureLevelNominal' is already in use for the enum value 'AVFoundation.AVCaptureSystemPressureExampleLevel.Fair'"); } @@ -368,14 +370,14 @@ public enum AVCaptureSystemPressureExampleLevel { [Field (""TheField"")] Shutdown, }"; - var (compilation, _) = CreateCompilation (nameof (SmartEnumsAnalyzerTests), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); var diagnostics = await RunAnalyzer (new SmartEnumsAnalyzer (), compilation); var analyzerDiagnotics = diagnostics - .Where (d => d.Id == SmartEnumsAnalyzer.RBI0007.Id).ToArray (); + .Where (d => d.Id == SmartEnumsAnalyzer.RBI0013.Id).ToArray (); // we should have a diagnostic for each enum value Assert.Single (analyzerDiagnotics); - VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0007.Id, + VerifyDiagnosticMessage (analyzerDiagnotics [0], SmartEnumsAnalyzer.RBI0013.Id, DiagnosticSeverity.Error, "Used attribute 'ObjCBindings.FieldAttribute' on enum value 'AVFoundation.AVCaptureSystemPressureExampleLevel.Shutdown' when 'ObjCBindings.FieldAttribute' was expected"); } diff --git a/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BaseCodeFixerTestClass.cs b/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BaseCodeFixerTestClass.cs index 8c1f518c246a..89df86d50f69 100644 --- a/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BaseCodeFixerTestClass.cs +++ b/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BaseCodeFixerTestClass.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.Macios.Bindings.Analyzer.Tests; namespace Microsoft.Bindings.CodeFixers.Tests; diff --git a/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BindingTypeCodeFixProviderTests.cs b/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BindingTypeCodeFixProviderTests.cs index 905cfb8d5c2f..dc520e4ece28 100644 --- a/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BindingTypeCodeFixProviderTests.cs +++ b/tests/rgen/Microsoft.Macios.Bindings.CodeFixers.Tests/BindingTypeCodeFixProviderTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. namespace Microsoft.Bindings.CodeFixers.Tests; public class BindingTypeCodeFixProviderTests { diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/AttributeParsingErrorTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/AttributeParsingErrorTests.cs index e1b0f5f0bd3b..cb265841d87e 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/AttributeParsingErrorTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/AttributeParsingErrorTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. namespace Microsoft.Macios.Generator.Tests.Attributes; public class AttributeParsingErrorTests { diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/ExportDataTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/ExportDataTests.cs new file mode 100644 index 000000000000..04470f323983 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/ExportDataTests.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System; +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.Attributes; +using ObjCBindings; +using ObjCRuntime; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Attributes; + +public class ExportDataTests { + + [Fact] + public void TestExportDataEqualsDiffSelector () + { + var x = new ExportData ("field1"); + var y = new ExportData ("field2"); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void TestExportDataEqualsDiffArgumentSemantic () + { + var x = new ExportData ("property", ArgumentSemantic.None); + var y = new ExportData ("property", ArgumentSemantic.Retain); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Theory] + [InlineData (Property.Default, Property.Default, true)] + [InlineData (Property.Notification, Property.Default, false)] + public void TestExportDataEqualsDiffFlag (Property xFlag, Property yFlag, bool expected) + { + var x = new ExportData ("property", ArgumentSemantic.None, xFlag); + var y = new ExportData ("property", ArgumentSemantic.None, yFlag); + Assert.Equal (expected, x.Equals (y)); + Assert.Equal (expected, y.Equals (x)); + Assert.Equal (expected, x == y); + Assert.Equal (!expected, x != y); + } + + class TestDataToString : IEnumerable { + public IEnumerator GetEnumerator () + { + yield return [ + Method.Default, + new ExportData ("symbol", ArgumentSemantic.None, Method.Default), + "{ Type: 'ObjCBindings.Method', Selector: 'symbol', ArgumentSemantic: 'None', Flags: 'Default' }" + ]; + yield return [ + Method.Default, + new ExportData ("symbol"), + "{ Type: 'ObjCBindings.Method', Selector: 'symbol', ArgumentSemantic: 'None', Flags: 'Default' }" + ]; + yield return [ + Property.Default, + new ExportData ("symbol", ArgumentSemantic.Retain, Property.Default), + "{ Type: 'ObjCBindings.Property', Selector: 'symbol', ArgumentSemantic: 'Retain', Flags: 'Default' }" + ]; + yield return [ + Property.Default, + new ExportData ("symbol"), + "{ Type: 'ObjCBindings.Property', Selector: 'symbol', ArgumentSemantic: 'None', Flags: 'Default' }" + ]; + } + + IEnumerator IEnumerable.GetEnumerator () + => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataToString))] + void TestFieldDataToString (T @enum, ExportData x, string expected) where T : Enum + { + Assert.NotNull (@enum); + Assert.Equal (expected, x.ToString ()); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/FieldDataTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/FieldDataTests.cs new file mode 100644 index 000000000000..15fb125cb083 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Attributes/FieldDataTests.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System; +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.Attributes; +using ObjCBindings; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Attributes; + +public class FieldDataTests { + [Fact] + public void TestFieldDataEqualsDiffSymbolName () + { + const string xSymbolName = "x"; + const string ySymbolName = "y"; + const string libraryName = "library"; + var x = new FieldData (xSymbolName, libraryName, EnumValue.Default); + var y = new FieldData (ySymbolName, libraryName, EnumValue.Default); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Theory] + [InlineData (null, null, true)] + [InlineData ("", "", true)] + [InlineData ("", null, false)] + [InlineData (null, "", false)] + [InlineData ("xLib", "yLib", false)] + public void TestFieldDataEqualsDiffLibraryName (string? xLibName, string? yLibName, bool expected) + { + const string symbolName = "symbol"; + var x = new FieldData (symbolName, xLibName, EnumValue.Default); + var y = new FieldData (symbolName, yLibName, EnumValue.Default); + Assert.Equal (expected, x.Equals (y)); + Assert.Equal (expected, y.Equals (x)); + Assert.Equal (expected, x == y); + Assert.Equal (!expected, x != y); + } + + [Theory] + [InlineData (StringComparison.Ordinal, StringComparison.Ordinal, true)] + [InlineData (StringComparison.Ordinal, StringComparison.OrdinalIgnoreCase, false)] + public void TestFieldDataEqualsDiffFlag (StringComparison xFlag, StringComparison yFlag, bool expected) + { + const string symbolName = "symbol"; + const string libraryName = "library"; + var x = new FieldData (symbolName, libraryName, xFlag); + var y = new FieldData (symbolName, libraryName, yFlag); + Assert.Equal (expected, x.Equals (y)); + Assert.Equal (expected, y.Equals (x)); + Assert.Equal (expected, x == y); + Assert.Equal (!expected, x != y); + } + + + class TestDataToString : IEnumerable { + public IEnumerator GetEnumerator () + { + yield return [ + new FieldData ("symbol", null, EnumValue.Default), + "{ SymbolName: 'symbol' LibraryName: 'null', Flags: 'Default' }" + ]; + yield return [ + new FieldData ("symbol", "lib", EnumValue.Default), + "{ SymbolName: 'symbol' LibraryName: 'lib', Flags: 'Default' }" + ]; + } + + IEnumerator IEnumerable.GetEnumerator () + => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataToString))] + void TestFieldDataToString (FieldData x, string expected) + => Assert.Equal (expected, x.ToString ()); +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/AttributesNamesTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/AttributesNamesTests.cs new file mode 100644 index 000000000000..a3e2a56aefe6 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/AttributesNamesTests.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System; +using ObjCBindings; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests; + +public class AttributesNamesTests { + + [Theory] + [InlineData (StringComparison.Ordinal, null)] + [InlineData (EnumValue.Default, null)] + [InlineData (Property.Default, AttributesNames.ExportPropertyAttribute)] + [InlineData (Method.Default, AttributesNames.ExportMethodAttribute)] + public void GetExportAttributeName (T @enum, string? expectedName) where T : Enum + { + Assert.NotNull (@enum); + Assert.Equal (expectedName, AttributesNames.GetExportAttributeName ()); + } + + [Theory] + [InlineData (StringComparison.Ordinal, null)] + [InlineData (Method.Default, null)] + [InlineData (Property.Default, AttributesNames.FieldPropertyAttribute)] + [InlineData (EnumValue.Default, AttributesNames.EnumFieldAttribute)] + public void GetFieldAttributeName (T @enum, string? expectedName) where T : Enum + { + Assert.NotNull (@enum); + Assert.Equal (expectedName, AttributesNames.GetFieldAttributeName ()); + } + + [Theory] + [InlineData (StringComparison.Ordinal, null)] + [InlineData (EnumValue.Default, null)] + [InlineData (Category.Default, AttributesNames.BindingCategoryAttribute)] + [InlineData (Class.Default, AttributesNames.BindingClassAttribute)] + [InlineData (Protocol.Default, AttributesNames.BindingProtocolAttribute)] + [InlineData (StrongDictionary.Default, AttributesNames.BindingStrongDictionaryAttribute)] + public void GetBindingTypeAttributeName (T @enum, string? expectedName) where T : Enum + { + Assert.NotNull (@enum); + Assert.Equal (expectedName, AttributesNames.GetBindingTypeAttributeName ()); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityEqualityTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityEqualityTests.cs index ca8b75df650c..3d88956ca95a 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityEqualityTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityEqualityTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using Microsoft.Macios.Generator.Availability; using Xamarin.Utils; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityMergeTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityMergeTests.cs index ef5baa8096cc..af91249c57e9 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityMergeTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityMergeTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using Microsoft.Macios.Generator.Availability; using Xamarin.Utils; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityTests.cs index f2e3ba57a08f..9b4a78eeec10 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Linq; @@ -330,7 +332,7 @@ public void ObsoleteSeveralVersionAndPlatform (ApplePlatform platform, string [] } [Theory] - [InlineData (ApplePlatform.iOS, new [] { "12.0", "13.0", "13.1", "15.0", "16.0" }, "Unsupporte on iOS")] + [InlineData (ApplePlatform.iOS, new [] { "12.0", "13.0", "13.1", "15.0", "16.0" }, "Unsupported on iOS")] [InlineData (ApplePlatform.MacOSX, new [] { "9.0", "10.0", "11.5", "14.0" }, "UseAppKit enum")] [InlineData (ApplePlatform.TVOS, new [] { "8.0", "9.0", "12.0" }, "Not present in TVOS")] [InlineData (ApplePlatform.MacCatalyst, new [] { "10.0", "11.0", "13.1" }, "Use the UIKit version instead")] diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityToStringTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityToStringTests.cs new file mode 100644 index 000000000000..1072fd9fca2e --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/PlatformAvailabilityToStringTests.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.Availability; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Availability; + +public class PlatformAvailabilityToStringTests { + + class TestDataToString : IEnumerable { + + public IEnumerator GetEnumerator () + { + // build platform availabilities to ensure that the string returned is the + // expected one. We will use a builder that we can clear after each yield return + var builder = PlatformAvailability.CreateBuilder (ApplePlatform.iOS); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: [], Obsoleted: [] }"]; + + builder.Clear (); + builder.AddSupportedVersion (new Version (16, 0)); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '16.0', Unsupported: [], Obsoleted: [] }"]; + + builder.Clear (); + builder.AddUnsupportedVersion (new Version (16, 0), null); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: ['16.0': 'null'], Obsoleted: [] }"]; + + builder.Clear (); + builder.AddUnsupportedVersion (new Version (16, 0), "Not supported."); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: ['16.0': 'Not supported.'], Obsoleted: [] }"]; + + builder.Clear (); + builder.AddUnsupportedVersion (new Version (16, 0), "Not supported."); + builder.AddUnsupportedVersion (new Version (18, 0), "Not supported."); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: ['16.0': 'Not supported.', '18.0': 'Not supported.'], Obsoleted: [] }"]; + + builder.Clear (); + builder.AddObsoletedVersion (new Version (16, 0), null, null); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: [], Obsoleted: ['16.0': ('null', 'null')] }"]; + + builder.Clear (); + builder.AddObsoletedVersion (new Version (16, 0), "Obsoleted method", null); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: [], Obsoleted: ['16.0': ('Obsoleted method', 'null')] }"]; + + builder.Clear (); + builder.AddObsoletedVersion (new Version (16, 0), "Obsoleted method", "https://bing.com"); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: [], Obsoleted: ['16.0': ('Obsoleted method', 'https://bing.com')] }"]; + + builder.Clear (); + builder.AddObsoletedVersion (new Version (16, 0), "Obsoleted method", "https://bing.com"); + builder.AddObsoletedVersion (new Version (18, 0), "Obsoleted method", "https://bing.com"); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '', Unsupported: [], Obsoleted: ['16.0': ('Obsoleted method', 'https://bing.com'), '18.0': ('Obsoleted method', 'https://bing.com')] }"]; + + builder.Clear (); + builder.AddSupportedVersion (new Version (16, 0)); + builder.AddUnsupportedVersion (new Version (16, 0), "Not supported."); + builder.AddUnsupportedVersion (new Version (18, 0), "Not supported."); + builder.AddObsoletedVersion (new Version (16, 0), "Obsoleted method", "https://bing.com"); + builder.AddObsoletedVersion (new Version (18, 0), "Obsoleted method", "https://bing.com"); + yield return [builder.ToImmutable (), "{ Platform: 'iOS', Supported: '16.0', Unsupported: ['16.0': 'Not supported.', '18.0': 'Not supported.'], Obsoleted: ['16.0': ('Obsoleted method', 'https://bing.com'), '18.0': ('Obsoleted method', 'https://bing.com')] }"]; + } + + IEnumerator IEnumerable.GetEnumerator () + => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataToString))] + void ToStringTest (PlatformAvailability availability, string expected) + => Assert.Equal (expected, availability.ToString ()); +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityEqualityTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityEqualityTests.cs index da521ac78677..d66d4b24d8a5 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityEqualityTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityEqualityTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.Availability; using Xunit; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityMergeTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityMergeTests.cs index 3c6291ea1fa3..dd064732a512 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityMergeTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityMergeTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.Availability; using Xamarin.Utils; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityTests.cs index ee6a74810a35..dd29e269ec0b 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using System.Linq; using Microsoft.Macios.Generator.Attributes; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityToStringTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityToStringTests.cs new file mode 100644 index 000000000000..626164ddf1eb --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Availability/SymbolAvailabilityToStringTests.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.Availability; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Availability; + +public class SymbolAvailabilityToStringTests { + + class TestDataToString : IEnumerable { + + public IEnumerator GetEnumerator () + { + var builder = SymbolAvailability.CreateBuilder (); + yield return [builder.ToImmutable (), "[]"]; + + builder.Clear (); + builder.AddSupportedVersion (ApplePlatform.iOS, new (16, 0)); + yield return [builder.ToImmutable (), "[{ Platform: 'iOS', Supported: '16.0', Unsupported: [], Obsoleted: [] }]"]; + + builder.Clear (); + builder.AddSupportedVersion (ApplePlatform.TVOS, new (16, 0)); + yield return [builder.ToImmutable (), "[{ Platform: 'TVOS', Supported: '16.0', Unsupported: [], Obsoleted: [] }]"]; + + builder.Clear (); + builder.AddSupportedVersion (ApplePlatform.MacOSX, new (11, 0)); + yield return [builder.ToImmutable (), "[{ Platform: 'MacOSX', Supported: '11.0', Unsupported: [], Obsoleted: [] }]"]; + + builder.Clear (); + builder.AddSupportedVersion (ApplePlatform.MacCatalyst, new (16, 0)); + yield return [builder.ToImmutable (), "[{ Platform: 'MacCatalyst', Supported: '16.0', Unsupported: [], Obsoleted: [] }]"]; + + builder.Clear (); + builder.AddSupportedVersion (ApplePlatform.iOS, new (16, 0)); + builder.AddSupportedVersion (ApplePlatform.MacOSX, new (11, 0)); + builder.AddSupportedVersion (ApplePlatform.MacCatalyst, new (16, 0)); + yield return [builder.ToImmutable (), "[{ Platform: 'MacOSX', Supported: '11.0', Unsupported: [], Obsoleted: [] }, { Platform: 'iOS', Supported: '16.0', Unsupported: [], Obsoleted: [] }, { Platform: 'MacCatalyst', Supported: '16.0', Unsupported: [], Obsoleted: [] }]"]; + + builder.Clear (); + builder.AddSupportedVersion (ApplePlatform.iOS, new (16, 0)); + builder.AddUnsupportedVersion (ApplePlatform.MacOSX, new (11, 0), null); + builder.AddSupportedVersion (ApplePlatform.MacCatalyst, new (16, 0)); + yield return [builder.ToImmutable (), "[{ Platform: 'MacOSX', Supported: '', Unsupported: ['11.0': 'null'], Obsoleted: [] }, { Platform: 'iOS', Supported: '16.0', Unsupported: [], Obsoleted: [] }, { Platform: 'MacCatalyst', Supported: '16.0', Unsupported: [], Obsoleted: [] }]"]; + } + + IEnumerator IEnumerable.GetEnumerator () + => GetEnumerator (); + } + [Theory] + [ClassData (typeof (TestDataToString))] + void ToStringTest (SymbolAvailability availability, string expected) + => Assert.Equal (expected, availability.ToString ()); +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/BaseGeneratorTestClass.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/BaseGeneratorTestClass.cs index 2d3967d91774..7d4eaec29e4d 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/BaseGeneratorTestClass.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/BaseGeneratorTestClass.cs @@ -1,8 +1,11 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using System.Collections.Immutable; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Xamarin.Tests; @@ -42,7 +45,7 @@ protected Compilation RunGeneratorsAndUpdateCompilation (Compilation compilation protected GeneratorDriverRunResult RunGenerators (Compilation compilation) => Driver.RunGenerators (compilation).GetRunResult (); - protected CompilationResult CreateCompilation (string name, ApplePlatform platform, params string [] sources) + protected CompilationResult CreateCompilation (ApplePlatform platform, [CallerMemberName] string name = "", params string [] sources) { // get the dotnet bcl and fully load it for the test. var references = Directory.GetFiles (Configuration.DotNetBclDir, "*.dll") @@ -68,7 +71,7 @@ protected CompilationResult CreateCompilation (string name, ApplePlatform platfo protected void CompareGeneratedCode (ApplePlatform platform, string className, string inputFileName, string inputText, string outputFileName, string expectedOutputText, string? expectedLibraryText) { // We need to create a compilation with the required source code. - var (compilation, _) = CreateCompilation (nameof (CompareGeneratedCode), platform, inputText); + var (compilation, _) = CreateCompilation (platform, sources: inputText); // Run generators and retrieve all results. var runResult = RunGenerators (compilation); diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/BaseTestDataGenerator.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/BaseTestDataGenerator.cs index b587edeceac1..d3a1915a793e 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/BaseTestDataGenerator.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/BaseTestDataGenerator.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.IO; using System.Runtime.CompilerServices; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/BindingSourceGeneratorGeneratorTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/BindingSourceGeneratorGeneratorTests.cs index 6bcc96e9013b..cbe47cc3287c 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/BindingSourceGeneratorGeneratorTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/BindingSourceGeneratorGeneratorTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Linq; using Xamarin.Tests; using Xamarin.Utils; @@ -14,25 +16,46 @@ public class BindingSourceGeneratorGeneratorTests : BaseGeneratorTestClass { using ObjCBindings; namespace TestNamespace; -[BindingType (Name = ""AVAudioPCMBuffer"")] +[BindingType (Name = ""AVAudioPCMBuffer"", Flags=Class.DisableDefaultCtor)] public partial class AVAudioPcmBuffer : AVAudioBuffer { } "; + const string usingImportOutput = @"// #nullable enable using Foundation; using ObjCBindings; +using ObjCRuntime; using System; +using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Drawing; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Threading.Tasks; + +namespace TestNamespace; -namespace TestNamespace +[Register (""AVAudioPCMBuffer"", true)] +public partial class AVAudioPcmBuffer { - public partial class AVAudioPcmBuffer - { - // TODO: add binding code here - } + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + static readonly NativeHandle class_ptr = Class.GetHandle (""AVAudioPCMBuffer""); + + public override NativeHandle ClassHandle => class_ptr; + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected AVAudioPcmBuffer (NSObjectFlag t) : base (t) {} + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected internal AVAudioPcmBuffer (NativeHandle handle) : base (handle) {} + // TODO: add binding code here } "; @@ -41,8 +64,7 @@ public partial class AVAudioPcmBuffer public void CorrectUsingImports (ApplePlatform platform, string input, string expectedOutput) { // We need to create a compilation with the required source code. - var (compilation, _) = CreateCompilation (nameof (CorrectUsingImports), - platform, input); + var (compilation, _) = CreateCompilation (platform, sources: input); // Run generators and retrieve all results. var runResult = Driver.RunGenerators (compilation).GetRunResult (); diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs new file mode 100644 index 000000000000..e88c49c9ae88 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Classes; + +public class ClassGenerationTests : BaseGeneratorTestClass { + + public class TestDataGenerator : BaseTestDataGenerator, IEnumerable { + readonly List<(ApplePlatform Platform, string ClassName, string BindingFile, string OutputFile, string? LibraryText)> _data = new () + { + (ApplePlatform.iOS, "AVAudioPcmBuffer", "AVAudioPcmBufferNoDefaultCtr.cs", "ExpectedAVAudioPcmBufferNoDefaultCtr.cs", null), + (ApplePlatform.TVOS, "AVAudioPcmBuffer", "AVAudioPcmBufferNoDefaultCtr.cs", "ExpectedAVAudioPcmBufferNoDefaultCtr.cs", null), + (ApplePlatform.MacCatalyst, "AVAudioPcmBuffer", "AVAudioPcmBufferNoDefaultCtr.cs", "ExpectedAVAudioPcmBufferNoDefaultCtr.cs", null), + (ApplePlatform.MacOSX, "AVAudioPcmBuffer", "AVAudioPcmBufferNoDefaultCtr.cs", "ExpectedAVAudioPcmBufferNoDefaultCtr.cs", null), + (ApplePlatform.iOS, "AVAudioPcmBuffer", "AVAudioPcmBufferDefaultCtr.cs", "ExpectedAVAudioPcmBufferDefaultCtr.cs", null), + (ApplePlatform.MacOSX, "AVAudioPcmBuffer", "AVAudioPcmBufferDefaultCtr.cs", "ExpectedAVAudioPcmBufferDefaultCtr.cs", null), + (ApplePlatform.iOS, "AVAudioPcmBuffer", "AVAudioPcmBufferNoNativeName.cs", "ExpectedAVAudioPcmBufferNoNativeName.cs", null), + (ApplePlatform.MacOSX, "AVAudioPcmBuffer", "AVAudioPcmBufferNoNativeName.cs", "ExpectedAVAudioPcmBufferNoNativeName.cs", null), + + }; + + public IEnumerator GetEnumerator () + { + foreach (var testData in _data) { + var libraryText = string.IsNullOrEmpty (testData.LibraryText) ? + null : ReadFileAsString (testData.LibraryText); + if (Configuration.IsEnabled (testData.Platform)) + yield return [ + testData.Platform, + testData.ClassName, + testData.BindingFile, + ReadFileAsString (testData.BindingFile), + testData.OutputFile, + ReadFileAsString (testData.OutputFile), + libraryText!, + ]; + } + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataGenerator))] + public void GenerationTests (ApplePlatform platform, string className, string inputFileName, string inputText, string outputFileName, string expectedOutputText, string? expectedLibraryText) + => CompareGeneratedCode (platform, className, inputFileName, inputText, outputFileName, expectedOutputText, expectedLibraryText); + +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferDefaultCtr.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferDefaultCtr.cs new file mode 100644 index 000000000000..15beb599a233 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferDefaultCtr.cs @@ -0,0 +1,9 @@ +using System; +using Foundation; +using ObjCBindings; + +namespace TestNamespace; + +[BindingType (Name = "AVAudioPCMBuffer")] +public partial class AVAudioPcmBuffer { +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferNoDefaultCtr.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferNoDefaultCtr.cs new file mode 100644 index 000000000000..72956722d1ba --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferNoDefaultCtr.cs @@ -0,0 +1,9 @@ +using System; +using Foundation; +using ObjCBindings; + +namespace TestNamespace; + +[BindingType (Name = "AVAudioPCMBuffer", Flags = Class.DisableDefaultCtor)] +public partial class AVAudioPcmBuffer { +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferNoNativeName.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferNoNativeName.cs new file mode 100644 index 000000000000..e015ac4c2ece --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/AVAudioPcmBufferNoNativeName.cs @@ -0,0 +1,9 @@ +using System; +using Foundation; +using ObjCBindings; + +namespace TestNamespace; + +[BindingType (Flags = Class.DisableDefaultCtor)] +public partial class AVAudioPcmBuffer { +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferDefaultCtr.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferDefaultCtr.cs new file mode 100644 index 000000000000..39ddeb9d0972 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferDefaultCtr.cs @@ -0,0 +1,46 @@ +// + +#nullable enable + +using Foundation; +using ObjCBindings; +using ObjCRuntime; +using System; +using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Drawing; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Threading.Tasks; + +namespace TestNamespace; + +[Register ("AVAudioPCMBuffer", true)] +public partial class AVAudioPcmBuffer +{ + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + static readonly NativeHandle class_ptr = Class.GetHandle ("AVAudioPCMBuffer"); + + public override NativeHandle ClassHandle => class_ptr; + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [DesignatedInitializer] + [Export ("init")] + public AVAudioPcmBuffer () : base (NSObjectFlag.Empty) + { + if (IsDirectBinding) + InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, global::ObjCRuntime.Selector.GetHandle ("init")), "init"); + else + InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, global::ObjCRuntime.Selector.GetHandle ("init")), "init"); + } + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected AVAudioPcmBuffer (NSObjectFlag t) : base (t) {} + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected internal AVAudioPcmBuffer (NativeHandle handle) : base (handle) {} + // TODO: add binding code here +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferNoDefaultCtr.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferNoDefaultCtr.cs new file mode 100644 index 000000000000..483f31028ec5 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferNoDefaultCtr.cs @@ -0,0 +1,35 @@ +// + +#nullable enable + +using Foundation; +using ObjCBindings; +using ObjCRuntime; +using System; +using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Drawing; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Threading.Tasks; + +namespace TestNamespace; + +[Register ("AVAudioPCMBuffer", true)] +public partial class AVAudioPcmBuffer +{ + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + static readonly NativeHandle class_ptr = Class.GetHandle ("AVAudioPCMBuffer"); + + public override NativeHandle ClassHandle => class_ptr; + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected AVAudioPcmBuffer (NSObjectFlag t) : base (t) {} + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected internal AVAudioPcmBuffer (NativeHandle handle) : base (handle) {} + // TODO: add binding code here +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferNoNativeName.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferNoNativeName.cs new file mode 100644 index 000000000000..087cbe392a93 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedAVAudioPcmBufferNoNativeName.cs @@ -0,0 +1,35 @@ +// + +#nullable enable + +using Foundation; +using ObjCBindings; +using ObjCRuntime; +using System; +using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Drawing; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Threading.Tasks; + +namespace TestNamespace; + +[Register ("AVAudioPcmBuffer", true)] +public partial class AVAudioPcmBuffer +{ + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + static readonly NativeHandle class_ptr = Class.GetHandle ("AVAudioPcmBuffer"); + + public override NativeHandle ClassHandle => class_ptr; + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected AVAudioPcmBuffer (NSObjectFlag t) : base (t) {} + + [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] + [EditorBrowsable (EditorBrowsableState.Advanced)] + protected internal AVAudioPcmBuffer (NativeHandle handle) : base (handle) {} + // TODO: add binding code here +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/ListComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/CollectionComparerTests.cs similarity index 85% rename from tests/rgen/Microsoft.Macios.Generator.Tests/ListComparerTests.cs rename to tests/rgen/Microsoft.Macios.Generator.Tests/CollectionComparerTests.cs index f368493f933e..9ebae0e79961 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/ListComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/CollectionComparerTests.cs @@ -1,16 +1,18 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; using Xunit; namespace Microsoft.Macios.Generator.Tests; -public class ListComparerTests { +public class CollectionComparerTests { class MyComparer : IComparer { public int Compare (string? x, string? y) => String.Compare (x, y, StringComparison.Ordinal); } - readonly ListComparer comparer = new (new MyComparer ()); + readonly CollectionComparer comparer = new (new MyComparer ()); [Fact] public void CompareBothNull () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/CompilationResult.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/CompilationResult.cs index f01cf39d0174..3cf2bb9d098a 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/CompilationResult.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/CompilationResult.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.CodeAnalysis; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Context/RootBindingContextTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Context/RootBindingContextTests.cs index 1012afa31025..c745391fc579 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Context/RootBindingContextTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Context/RootBindingContextTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.Macios.Generator.Context; using Xamarin.Tests; using Xamarin.Utils; @@ -25,8 +27,9 @@ public class MyClass { } } "; - var (compilation, _) = CreateCompilation (nameof (TryComputeLibraryNamePlusLibsTests), platform, inputText); - var rootContext = new RootBindingContext (compilation); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (compilation.SyntaxTrees); + var rootContext = new RootBindingContext (compilation.GetSemanticModel (syntaxTrees [0])); Assert.True (rootContext.TryComputeLibraryName (attributeLibName, ns, out var libName, out var libPath)); Assert.Equal (expectedLibraryName, libName); } @@ -46,8 +49,9 @@ public class MyClass { } } "; - var (compilation, _) = CreateCompilation (nameof (TryComputeLibraryNamePlusLibsTests), platform, inputText); - var rootContext = new RootBindingContext (compilation); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (compilation.SyntaxTrees); + var rootContext = new RootBindingContext (compilation.GetSemanticModel (syntaxTrees [0])); Assert.Equal (rootContext.IsSystemLibrary (lib), expectedResult); } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorKindTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorKindTests.cs index b85c43c95c96..8bdea5e0420b 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorKindTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorKindTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis.CSharp; using Microsoft.Macios.Generator.DataModel; using Xunit; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorTests.cs index fb0bb0e18fef..844997aa508c 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorTests.cs @@ -1,4 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis.CSharp; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; using Xunit; @@ -8,8 +12,41 @@ public class AccessorTests { [Fact] public void CompareDiffKind () { - var x = new Accessor (AccessorKind.Getter, [], []); - var y = new Accessor (AccessorKind.Setter, [], []); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []); + var y = new Accessor ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []); + + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void CompareDiffExportData () + { + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: new ("name"), + attributes: [], + modifiers: []); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: new ("surname"), + attributes: [], + modifiers: []); + Assert.False (x.Equals (y)); Assert.False (y.Equals (x)); Assert.False (x == y); @@ -19,13 +56,23 @@ public void CompareDiffKind () [Fact] public void CompareSameKindDiffAttrCount () { - var x = new Accessor (AccessorKind.Getter, [ - new ("First"), - new ("Second"), - ], []); - var y = new Accessor (AccessorKind.Getter, [ - new ("First"), - ], []); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: []); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("First"), + ], + modifiers: []); Assert.False (x.Equals (y)); Assert.False (y.Equals (x)); Assert.False (x == y); @@ -35,14 +82,25 @@ public void CompareSameKindDiffAttrCount () [Fact] public void CompareSameKindDiffAttr () { - var x = new Accessor (AccessorKind.Getter, [ - new ("First"), - new ("Second"), - ], []); - var y = new Accessor (AccessorKind.Getter, [ - new ("Third"), - new ("Fourth"), - ], []); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: []); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("Third"), + new ("Fourth"), + ], + modifiers: []); + Assert.False (x.Equals (y)); Assert.False (y.Equals (x)); Assert.False (x == y); @@ -52,14 +110,25 @@ public void CompareSameKindDiffAttr () [Fact] public void CompareSameKindDiffAttrOrder () { - var x = new Accessor (AccessorKind.Getter, [ - new ("First"), - new ("Second"), - ], []); - var y = new Accessor (AccessorKind.Getter, [ - new ("Second"), - new ("First"), - ], []); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: []); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("Second"), + new ("First"), + ], + modifiers: []); + Assert.True (x.Equals (y)); Assert.True (y.Equals (x)); Assert.True (x == y); @@ -69,19 +138,29 @@ public void CompareSameKindDiffAttrOrder () [Fact] public void CompareSameKindSameAttrDiffModifiersCount () { - var x = new Accessor (AccessorKind.Getter, [ - new ("First"), - new ("Second"), - ], [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), - SyntaxFactory.Token (SyntaxKind.PrivateKeyword) - ]); - var y = new Accessor (AccessorKind.Getter, [ - new ("Second"), - new ("First"), - ], [ - SyntaxFactory.Token (SyntaxKind.PrivateKeyword) - ]); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PrivateKeyword) + ]); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("Second"), + new ("First"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PrivateKeyword) + ]); Assert.False (x.Equals (y)); Assert.False (y.Equals (x)); @@ -92,20 +171,30 @@ public void CompareSameKindSameAttrDiffModifiersCount () [Fact] public void CompareSameKindSameAttrDiffModifiers () { - var x = new Accessor (AccessorKind.Getter, [ - new ("First"), - new ("Second"), - ], [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), - SyntaxFactory.Token (SyntaxKind.PrivateKeyword) - ]); - var y = new Accessor (AccessorKind.Getter, [ - new ("Second"), - new ("First"), - ], [ - SyntaxFactory.Token (SyntaxKind.PrivateKeyword), - SyntaxFactory.Token (SyntaxKind.ProtectedKeyword) - ]); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PrivateKeyword) + ]); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("Second"), + new ("First"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PrivateKeyword), + SyntaxFactory.Token (SyntaxKind.ProtectedKeyword) + ]); Assert.False (x.Equals (y)); Assert.False (y.Equals (x)); @@ -116,20 +205,103 @@ public void CompareSameKindSameAttrDiffModifiers () [Fact] public void CompareSameKindSameAttrDiffModifiersOrder () { - var x = new Accessor (AccessorKind.Getter, [ - new ("First"), - new ("Second"), - ], [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), - SyntaxFactory.Token (SyntaxKind.PrivateKeyword) - ]); - var y = new Accessor (AccessorKind.Getter, [ - new ("Second"), - new ("First"), - ], [ - SyntaxFactory.Token (SyntaxKind.PrivateKeyword), - SyntaxFactory.Token (SyntaxKind.PublicKeyword), - ]); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PrivateKeyword) + ]); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("Second"), + new ("First"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PrivateKeyword), + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ]); + + Assert.True (x.Equals (y)); + Assert.True (y.Equals (x)); + Assert.True (x == y); + Assert.False (x != y); + } + + [Fact] + public void CompareSameKindSameAttrDiffAvailability () + { + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios17.0")); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: builder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PrivateKeyword) + ]); + builder.Clear (); + builder.Add (new SupportedOSPlatformData ("tvos17.0")); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: builder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new ("Second"), + new ("First"), + ], modifiers: [ + SyntaxFactory.Token (SyntaxKind.PrivateKeyword), + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ]); + + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void CompareSameKindSameAttrSameAvailability () + { + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios17.0")); + var x = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: builder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new ("First"), + new ("Second"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PrivateKeyword) + ]); + var y = new Accessor ( + accessorKind: AccessorKind.Getter, + symbolAvailability: builder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new ("Second"), + new ("First"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PrivateKeyword), + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ]); Assert.True (x.Equals (y)); Assert.True (y.Equals (x)); diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorsEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorsEqualityComparerTests.cs index 055718d2a1ec..09b639bd500e 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorsEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AccessorsEqualityComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.Macios.Generator.DataModel; using Xunit; @@ -19,11 +21,26 @@ public void CompareTwoEmptyAccessorsArray () public void CompareSameSizeDiffSizes () { ImmutableArray x = [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; ImmutableArray y = [ - new (AccessorKind.Getter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; Assert.False (equalityComparer.Equals (x, y)); @@ -33,12 +50,32 @@ public void CompareSameSizeDiffSizes () public void CompareSameSizeDiffAccessors () { ImmutableArray x = [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; ImmutableArray y = [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; Assert.False (equalityComparer.Equals (x, y)); @@ -48,12 +85,32 @@ public void CompareSameSizeDiffAccessors () public void CompareTwoAccessorsDiffOrder () { ImmutableArray x = [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; ImmutableArray y = [ - new (AccessorKind.Setter, [], []), - new (AccessorKind.Getter, [], []), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; Assert.True (equalityComparer.Equals (x, y)); @@ -63,13 +120,33 @@ public void CompareTwoAccessorsDiffOrder () public void CompareTwoAccessorsEqual () { ImmutableArray x = [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; ImmutableArray y = [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]; Assert.True (equalityComparer.Equals (x, y)); diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeCodeChangeTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeCodeChangeTests.cs index 708c5aef295e..52d08f8fc451 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeCodeChangeTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeCodeChangeTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.Macios.Generator.DataModel; using Xunit; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeComparerTests.cs index fc1c2052182c..ed35f2f8249a 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributeComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using Microsoft.Macios.Generator.DataModel; using Xunit; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributesEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributesEqualityComparerTests.cs index 847b0c9dd0f3..5a592d7d5598 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributesEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/AttributesEqualityComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.Macios.Generator.DataModel; using Xunit; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/BindingInfoTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/BindingInfoTests.cs new file mode 100644 index 000000000000..a360966921b5 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/BindingInfoTests.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System; +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.DataModel; +using ObjCBindings; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.DataModel; + +public class BindingInfoTests { + + [Fact] + public void ConstructorBindingTypeData () + { + + var bindingTypeData = new BindingTypeData ("BindingType"); + BindingInfo bindingInfo = new BindingInfo (BindingType.SmartEnum, bindingTypeData); + Assert.Equal (bindingTypeData, (BindingTypeData) bindingInfo); + Assert.Equal (bindingTypeData.Name, ((BindingTypeData) bindingInfo).Name); + Assert.Equal (BindingType.SmartEnum, bindingInfo.BindingType); + } + + [Fact] + public void ConstructorBindingTypeClassData () + { + var bindingTypeData = new BindingTypeData ("BindingType", Class.DisableDefaultCtor); + BindingInfo bindingInfo = new BindingInfo (bindingTypeData); + Assert.Equal (bindingTypeData, (BindingTypeData) bindingInfo); + Assert.Equal (bindingTypeData.Name, ((BindingTypeData) bindingInfo).Name); + Assert.Equal (bindingTypeData.Flags, ((BindingTypeData) bindingInfo).Flags); + Assert.Equal (BindingType.Class, bindingInfo.BindingType); + } + + [Fact] + public void ConstructorBindingProtocolData () + { + var bindingTypeData = new BindingTypeData ("BindingType"); + BindingInfo bindingInfo = new BindingInfo (bindingTypeData); + Assert.Equal (bindingTypeData, (BindingTypeData) bindingInfo); + Assert.Equal (bindingTypeData.Name, ((BindingTypeData) bindingInfo).Name); + Assert.Equal (bindingTypeData.Flags, ((BindingTypeData) bindingInfo).Flags); + Assert.Equal (BindingType.Protocol, bindingInfo.BindingType); + } + + [Fact] + public void ConstructorBindingCategoryData () + { + var bindingTypeData = new BindingTypeData ("BindingType"); + BindingInfo bindingInfo = new BindingInfo (bindingTypeData); + Assert.Equal (bindingTypeData, (BindingTypeData) bindingInfo); + Assert.Equal (bindingTypeData.Name, ((BindingTypeData) bindingInfo).Name); + Assert.Equal (bindingTypeData.Flags, ((BindingTypeData) bindingInfo).Flags); + Assert.Equal (BindingType.Category, bindingInfo.BindingType); + } + + [Fact] + public void EqualsDiffBindingType () + { + var xBinding = new BindingTypeData ("Name"); + var x = new BindingInfo (BindingType.SmartEnum, xBinding); + var y = new BindingInfo (BindingType.Unknown, xBinding); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void EqualsDiffEnumBindingType () + { + var xBinding = new BindingTypeData ("Name1"); + var yBinding = new BindingTypeData ("Name2"); + var x = new BindingInfo (BindingType.SmartEnum, xBinding); + var y = new BindingInfo (yBinding); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void EqualsSameEnumBindingType () + { + var xBinding = new BindingTypeData ("Name"); + var yBinding = new BindingTypeData ("Name"); + var x = new BindingInfo (BindingType.SmartEnum, xBinding); + var y = new BindingInfo (BindingType.SmartEnum, yBinding); + Assert.True (x.Equals (y)); + Assert.True (y.Equals (x)); + Assert.True (x == y); + Assert.False (x != y); + } + + [Fact] + public void EqualsDiffClassBindingType () + { + var xBinding = new BindingTypeData ("Name1"); + var yBinding = new BindingTypeData ("Name2"); + var x = new BindingInfo (xBinding); + var y = new BindingInfo (yBinding); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void EqualsSameClassBindingType () + { + var xBinding = new BindingTypeData ("Name"); + var yBinding = new BindingTypeData ("Name"); + var x = new BindingInfo (xBinding); + var y = new BindingInfo (yBinding); + Assert.True (x.Equals (y)); + Assert.True (y.Equals (x)); + Assert.True (x == y); + Assert.False (x != y); + } + + [Fact] + public void EqualsDiffProtocolBindingType () + { + var xBinding = new BindingTypeData ("Name1"); + var yBinding = new BindingTypeData ("Name2"); + var x = new BindingInfo (xBinding); + var y = new BindingInfo (yBinding); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void EqualsSameProtocolBindingType () + { + var xBinding = new BindingTypeData ("Name"); + var yBinding = new BindingTypeData ("Name"); + var x = new BindingInfo (xBinding); + var y = new BindingInfo (yBinding); + Assert.True (x.Equals (y)); + Assert.True (y.Equals (x)); + Assert.True (x == y); + Assert.False (x != y); + } + + [Fact] + public void EqualsDiffCategoryBindingType () + { + var xBinding = new BindingTypeData ("Name1"); + var yBinding = new BindingTypeData ("Name2"); + var x = new BindingInfo (xBinding); + var y = new BindingInfo (yBinding); + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void EqualsSameCategoryBindingType () + { + var xBinding = new BindingTypeData ("Name"); + var yBinding = new BindingTypeData ("Name"); + var x = new BindingInfo (xBinding); + var y = new BindingInfo (yBinding); + Assert.True (x.Equals (y)); + Assert.True (y.Equals (x)); + Assert.True (x == y); + Assert.False (x != y); + } + + class TestDataToString : IEnumerable { + public IEnumerator GetEnumerator () + { + yield return [ + new BindingInfo (BindingType.SmartEnum, new BindingTypeData ("Name")), + "{ BindingType: SmartEnum, BindingData: { Name: 'Name' } }", + ]; + + yield return [ + new BindingInfo (new BindingTypeData ("Name")), + "{ BindingType: Class, BindingData: { Name: 'Name', Flags: 'Default' } }" + ]; + + yield return [ + new BindingInfo (new BindingTypeData ("Name", Class.DisableDefaultCtor)), + "{ BindingType: Class, BindingData: { Name: 'Name', Flags: 'DisableDefaultCtor' } }" + ]; + + yield return [ + new BindingInfo (new BindingTypeData ("Name")), + "{ BindingType: Protocol, BindingData: { Name: 'Name', Flags: 'Default' } }" + ]; + + yield return [ + new BindingInfo (new BindingTypeData ("Name")), + "{ BindingType: Category, BindingData: { Name: 'Name', Flags: 'Default' } }" + ]; + } + + IEnumerator IEnumerable.GetEnumerator () + => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataToString))] + void TestFieldDataToString (BindingInfo x, string expected) + => Assert.Equal (expected, x.ToString ()); + + [Fact] + void TestCasting () + { + // failures + Assert.Throws (() => + (BindingTypeData) new BindingInfo (new BindingTypeData ("name"))); + Assert.Throws (() => + (BindingTypeData) new BindingInfo (new BindingTypeData ("name"))); + Assert.Throws (() => + (BindingTypeData) new BindingInfo (new BindingTypeData ("name"))); + + var classBinding = new BindingTypeData ("Name"); + Assert.Equal (classBinding, (BindingTypeData) new BindingInfo (classBinding)); + var protocolBinding = new BindingTypeData ("Name"); + Assert.Equal (protocolBinding, (BindingTypeData) new BindingInfo (protocolBinding)); + var categoryBinding = new BindingTypeData ("Name"); + Assert.Equal (categoryBinding, (BindingTypeData) new BindingInfo (categoryBinding)); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ClassCodeChangesTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ClassCodeChangesTests.cs index befd098227bd..1d1e5c3a3b0d 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ClassCodeChangesTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ClassCodeChangesTests.cs @@ -1,12 +1,22 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 using System.Collections; using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; +using ObjCBindings; +using ObjCRuntime; using Xamarin.Tests; using Xamarin.Utils; using Xunit; +using Property = ObjCBindings.Property; +using static Microsoft.Macios.Generator.Tests.TestDataFactory; namespace Microsoft.Macios.Generator.Tests.DataModel; @@ -16,6 +26,11 @@ public class ClassCodeChangesTests : BaseGeneratorTestClass { class TestDataCodeChangesFromClassDeclaration : IEnumerable { public IEnumerator GetEnumerator () { + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios17.0")); + builder.Add (new SupportedOSPlatformData ("tvos17.0")); + builder.Add (new UnsupportedOSPlatformData ("macos")); + const string emptyClass = @" using Foundation; using ObjCRuntime; @@ -23,7 +38,7 @@ public IEnumerator GetEnumerator () namespace NS; -[BindingType] +[BindingType] public partial class MyClass { } "; @@ -31,11 +46,166 @@ public partial class MyClass { yield return [ emptyClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "Foundation", "ObjCRuntime", "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ] + } + ]; + + const string emptyClassWithBase = @" +using Foundation; +using ObjCRuntime; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass : NSObject { +} +"; + + yield return [ + emptyClassWithBase, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () + ) { + Base = "Foundation.NSObject", + Interfaces = ImmutableArray.Empty, + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "Foundation", "ObjCRuntime", "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ] + } + ]; + + const string emptyClassWithBaseWithInterface = @" +using Foundation; +using ObjCRuntime; +using ObjCBindings; + +namespace NS; + +public interface IMyInterface {} + +[BindingType] +public partial class MyClass : NSObject, IMyInterface { +} +"; + + yield return [ + emptyClassWithBaseWithInterface, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () + ) { + Base = "Foundation.NSObject", + Interfaces = ["NS.IMyInterface"], + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "Foundation", "ObjCRuntime", "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ] + } + ]; + + const string internalClass = @" +using Foundation; +using ObjCRuntime; +using ObjCBindings; + +namespace NS; + +[BindingType] +internal partial class MyClass { +} +"; + + yield return [ + internalClass, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () + ) { + Base = "object", + Interfaces = ImmutableArray.Empty, + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "Foundation", "ObjCRuntime", "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.InternalKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ] + } + ]; + + const string emptyClassAvailability = @" +using System.Runtime.Versioning; +using Foundation; +using ObjCRuntime; +using ObjCBindings; + +namespace NS; + +[BindingType] +[SupportedOSPlatform (""ios17.0"")] +[SupportedOSPlatform (""tvos17.0"")] +[UnsupportedOSPlatform (""macos"")] +public partial class MyClass { +} +"; + + yield return [ + emptyClassAvailability, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: builder.ToImmutable () + ) { + Base = "object", + Interfaces = ImmutableArray.Empty, + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute"), + new ("System.Runtime.Versioning.UnsupportedOSPlatformAttribute", ["macos"]), + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["tvos17.0"]), + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + UsingDirectives = new HashSet { "Foundation", "ObjCRuntime", "ObjCBindings", "System.Runtime.Versioning" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ] } ]; @@ -45,7 +215,7 @@ public partial class MyClass { namespace NS; -[BindingType] +[BindingType] public partial class MyClass { string name = string.Empty; @@ -56,15 +226,26 @@ public MyClass () {} yield return [ singleConstructorClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Constructors = [ new ( - type: "NS.MyClass", + type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword) @@ -80,14 +261,14 @@ public MyClass () {} namespace NS; -[BindingType] +[BindingType] public partial class MyClass { string name = string.Empty; public MyClass () {} - public MyClass(string inName) { - name = inName; + public MyClass(string name) { + name = name; } } "; @@ -95,15 +276,26 @@ public MyClass(string inName) { yield return [ multiConstructorClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Constructors = [ new ( - type: "NS.MyClass", + type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword) @@ -111,7 +303,8 @@ public MyClass(string inName) { parameters: [] ), new ( - type: "NS.MyClass", + type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword) @@ -120,7 +313,8 @@ public MyClass(string inName) { new ( position: 0, type: "string", - name: "inName" + name: "name", + isBlittable: false ) ] ), @@ -133,7 +327,7 @@ public MyClass(string inName) { namespace NS; -[BindingType] +[BindingType] public partial class MyClass { [Export (""name"")] public partial string Name { get; set; } = string.Empty; @@ -143,16 +337,27 @@ public partial class MyClass { yield return [ singlePropertyClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Properties = [ new ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["name"]) ], @@ -161,20 +366,314 @@ public partial class MyClass { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ) + ) { + ExportPropertyData = new ("name") + } ] } ]; - const string multiPropertyClassMissingExport = @" + const string singlePropertySmartEnumClass = @" +using ObjCBindings; + +namespace NS; + +[BindingType] +public enum MyEnum { + None = 0, +} + +[BindingType] +public partial class MyClass { + [Export (""name"")] + public partial MyEnum Name { get; set; } +} +"; + + yield return [ + singlePropertySmartEnumClass, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () + ) { + Base = "object", + Interfaces = ImmutableArray.Empty, + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + Properties = [ + new ( + name: "Name", + returnType: ReturnTypeForEnum ("NS.MyEnum", isSmartEnum: true), + symbolAvailability: new (), + attributes: [ + new ("ObjCBindings.ExportAttribute", ["name"]) + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ] + ) { + ExportPropertyData = new ("name") + } + ] + } + ]; + + const string singlePropertyEnumClass = @" +using ObjCBindings; + +namespace NS; + +public enum MyEnum { + None = 0, +} + +[BindingType] +public partial class MyClass { + [Export (""name"")] + public partial MyEnum Name { get; set; } +} +"; + + yield return [ + singlePropertyEnumClass, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () + ) { + Base = "object", + Interfaces = ImmutableArray.Empty, + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + Properties = [ + new ( + name: "Name", + returnType: ReturnTypeForEnum ("NS.MyEnum"), + symbolAvailability: new (), + attributes: [ + new ("ObjCBindings.ExportAttribute", ["name"]) + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ] + ) { + ExportPropertyData = new ("name") + } + ] + } + ]; + + const string notificationPropertyClass = @" using ObjCBindings; namespace NS; [BindingType] +public partial class MyClass { + [Field (""name"", Property.Notification)] + public partial string Name { get; set; } = string.Empty; +} +"; + + yield return [ + notificationPropertyClass, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () + ) { + Base = "object", + Interfaces = ImmutableArray.Empty, + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + Properties = [ + new ( + name: "Name", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [ + new ("ObjCBindings.FieldAttribute", ["name", "ObjCBindings.Property.Notification"]) + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ] + ) { + + ExportFieldData = new ( + fieldData: new (symbolName: "name", flags: Property.Notification), + libraryName: "NS"), + } + ] + } + ]; + + const string fieldPropertyClass = @" +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + [Field (""CONSTANT"")] + public static partial string Name { get; set; } = string.Empty; +} +"; + + yield return [ + fieldPropertyClass, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () + ) { + Base = "object", + Interfaces = ImmutableArray.Empty, + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + Properties = [ + new ( + name: "Name", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [ + new ("ObjCBindings.FieldAttribute", ["CONSTANT"]) + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.StaticKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ] + ) { + + ExportFieldData = new ( + fieldData: new ("CONSTANT"), + libraryName: "NS"), + } + ] + } + ]; + + const string multiPropertyClassMissingExport = @" +using ObjCBindings; + +namespace NS; + +[BindingType] public partial class MyClass { [Export (""name"")] public partial string Name { get; set; } = string.Empty; @@ -186,16 +685,27 @@ public partial class MyClass { yield return [ multiPropertyClassMissingExport, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Properties = [ new ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["name"]) ], @@ -204,10 +714,24 @@ public partial class MyClass { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ) + ) { + ExportPropertyData = new ("name") + } ] } ]; @@ -217,7 +741,7 @@ public partial class MyClass { namespace NS; -[BindingType] +[BindingType] public partial class MyClass { [Export (""name"")] public partial string Name { get; set; } = string.Empty; @@ -230,16 +754,27 @@ public partial class MyClass { yield return [ multiPropertyClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Properties = [ new ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["name"]) ], @@ -248,13 +783,28 @@ public partial class MyClass { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ), + ) { + ExportPropertyData = new ("name") + }, new ( name: "Surname", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["surname"]) ], @@ -263,10 +813,24 @@ public partial class MyClass { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ), + ) { + ExportPropertyData = new ("surname") + }, ] } ]; @@ -276,27 +840,39 @@ public partial class MyClass { namespace NS; -[BindingType] +[BindingType] public partial class MyClass { [Export (""withName:"")] - public partial void SetName (string inName); + public partial void SetName (string name); } "; yield return [ singleMethodClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Methods = [ new ( type: "NS.MyClass", name: "SetName", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withName:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withName:"]) ], @@ -305,7 +881,7 @@ public partial class MyClass { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inName") + new (position: 0, type: "string", name: "name", isBlittable: false) ] ), ] @@ -317,10 +893,10 @@ public partial class MyClass { namespace NS; -[BindingType] +[BindingType] public partial class MyClass { [Export (""withName:"")] - public partial void SetName (string inName); + public partial void SetName (string name); public void SetSurname (string inSurname) {} } @@ -329,17 +905,29 @@ public void SetSurname (string inSurname) {} yield return [ multiMethodClassMissingExport, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Methods = [ new ( type: "NS.MyClass", name: "SetName", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withName:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withName:"]) ], @@ -348,7 +936,7 @@ public void SetSurname (string inSurname) {} SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inName") + new (position: 0, type: "string", name: "name", isBlittable: false) ] ), ] @@ -361,10 +949,10 @@ public void SetSurname (string inSurname) {} namespace NS; -[BindingType] +[BindingType] public partial class MyClass { [Export (""withName:"")] - public partial void SetName (string inName); + public partial void SetName (string name); [Export (""withSurname:"")] public partial void SetSurname (string inSurname); @@ -373,17 +961,29 @@ public partial class MyClass { yield return [ multiMethodClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Methods = [ new ( type: "NS.MyClass", name: "SetName", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withName:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withName:"]) ], @@ -392,13 +992,15 @@ public partial class MyClass { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inName") + new (position: 0, type: "string", name: "name", isBlittable: false) ] ), new ( type: "NS.MyClass", name: "SetSurname", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withSurname:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withSurname:"]) ], @@ -407,7 +1009,7 @@ public partial class MyClass { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inSurname") + new (position: 0, type: "string", name: "inSurname", isBlittable: false) ] ), ] @@ -420,7 +1022,7 @@ public partial class MyClass { namespace NS; -[BindingType] +[BindingType] public partial class MyClass { public event EventHandler Changed { add; remove; } @@ -430,23 +1032,46 @@ public partial class MyClass { yield return [ singleEventClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings", "System" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Events = [ new ( name: "Changed", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []) + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]) ], } @@ -458,7 +1083,7 @@ public partial class MyClass { namespace NS; -[BindingType] +[BindingType] public partial class MyClass { public event EventHandler Changed { add; remove; } @@ -470,35 +1095,71 @@ public partial class MyClass { yield return [ multiEventClass, new CodeChanges ( - bindingType: BindingType.Class, - fullyQualifiedSymbol: "NS.MyClass" + bindingInfo: new (new BindingTypeData ()), + name: "MyClass", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.MyClass", + symbolAvailability: new () ) { + Base = "object", + Interfaces = ImmutableArray.Empty, Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings", "System" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Events = [ new ( name: "Changed", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []) + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ] ), new ( name: "Removed", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []) + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ] ), ], @@ -513,8 +1174,7 @@ public partial class MyClass { [AllSupportedPlatformsClassData] void CodeChangesFromClassDeclaration (ApplePlatform platform, string inputText, CodeChanges expected) { - var (compilation, sourceTrees) = - CreateCompilation (nameof (CodeChangesFromClassDeclaration), platform, inputText); + var (compilation, sourceTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); // get the declarations we want to work with and the semantic model var node = sourceTrees [0].GetRoot () @@ -527,4 +1187,85 @@ void CodeChangesFromClassDeclaration (ApplePlatform platform, string inputText, Assert.NotNull (changes); Assert.Equal (expected, changes.Value, comparer); } + + [Fact] + public void IsStaticPropertyTest () + { + var changes = new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + + Assert.False (changes.IsStatic); + + changes = new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()) { + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.StaticKeyword), + ] + }; + + Assert.True (changes.IsStatic); + } + + [Fact] + public void IsPartialPropertyTest () + { + var changes = new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + + Assert.False (changes.IsPartial); + + changes = new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()) { + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ] + }; + + Assert.True (changes.IsPartial); + } + + [Fact] + public void IsAbstractPropertyTest () + { + var changes = new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + + Assert.False (changes.IsAbstract); + + changes = new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()) { + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.AbstractKeyword), + ] + }; + + Assert.True (changes.IsAbstract); + } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesComparerTests.cs index 439415a37dc4..2a49d96cb44a 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesComparerTests.cs @@ -1,9 +1,9 @@ -using System.Linq; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; -using Xamarin.Tests; -using Xamarin.Utils; using Xunit; namespace Microsoft.Macios.Generator.Tests.DataModel; @@ -14,26 +14,136 @@ public class CodeChangesComparerTests : BaseGeneratorTestClass { [Fact] public void CompareDifferentFullyQualifiedSymbol () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name1"); - var changes2 = new CodeChanges (BindingType.SmartEnum, "name2"); + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name2", + symbolAvailability: new ()); + Assert.False (comparer.Equals (changes1, changes2)); + } + + [Fact] + public void CompareDifferentBase () + { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()) { + Base = "Base1" + }; + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()) { + Base = "Base2" + }; + Assert.False (comparer.Equals (changes1, changes2)); + } + + [Fact] + public void CompareDifferentInterface () + { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()) { + Interfaces = ["IBase1"] + }; + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()) { + Interfaces = ["IBase1", "IBase2"], + }; + Assert.False (comparer.Equals (changes1, changes2)); + } + + [Fact] + public void CompareDifferentNameSymbol () + { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name2", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + Assert.False (comparer.Equals (changes1, changes2)); + } + + [Fact] + public void CompareDifferentNamespaceSymbol () + { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS1"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name1", + @namespace: ["NS2"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); Assert.False (comparer.Equals (changes1, changes2)); } [Fact] public void CompareDifferentBindingType () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name"); - var changes2 = new CodeChanges (BindingType.Unknown, "name"); + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); Assert.False (comparer.Equals (changes1, changes2)); } [Fact] public void CompareDifferentAttributesLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name"); - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { Attributes = [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) + new AttributeCodeChange (name: "name", arguments: ["arg1", "arg2"]) ] }; Assert.False (comparer.Equals (changes1, changes2)); @@ -42,14 +152,24 @@ public void CompareDifferentAttributesLength () [Fact] public void CompareDifferentAttributes () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { Attributes = [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) + new AttributeCodeChange (name: "name", arguments: ["arg1", "arg2"]) ], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { Attributes = [ - new AttributeCodeChange ("name2", ["arg1", "arg2"]) + new AttributeCodeChange (name: "name2", arguments: ["arg1", "arg2"]) ], }; Assert.False (comparer.Equals (changes1, changes2)); @@ -58,10 +178,26 @@ public void CompareDifferentAttributes () [Fact] public void CompareDifferentMembersLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name"); - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [ - new EnumMember ("name", []) + new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []) ], }; Assert.False (comparer.Equals (changes1, changes2)); @@ -70,14 +206,36 @@ public void CompareDifferentMembersLength () [Fact] public void CompareDifferentMembers () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [ - new EnumMember ("name", []) + new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []) ], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [ - new EnumMember ("name2", []) + new EnumMember ( + name: "name2", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []) ], }; Assert.False (comparer.Equals (changes1, changes2)); @@ -86,16 +244,27 @@ public void CompareDifferentMembers () [Fact] public void CompareDifferentPropertyLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -103,12 +272,24 @@ public void CompareDifferentPropertyLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]) ] }; @@ -119,12 +300,16 @@ public void CompareDifferentPropertyLength () [Fact] public void CompareSamePropertiesDiffOrder () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], fullyQualifiedSymbol: "NS.name", symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -132,14 +317,27 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -147,21 +345,39 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -169,16 +385,29 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -186,10 +415,22 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; @@ -199,12 +440,18 @@ public void CompareSamePropertiesDiffOrder () [Fact] public void CompareDifferentProperties () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -212,14 +459,27 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -227,21 +487,39 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -249,16 +527,28 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -266,10 +556,22 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; @@ -279,12 +581,18 @@ public void CompareDifferentProperties () [Fact] public void CompareDifferentEventsLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -292,14 +600,27 @@ public void CompareDifferentEventsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -307,31 +628,55 @@ public void CompareDifferentEventsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -339,16 +684,29 @@ public void CompareDifferentEventsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -356,10 +714,22 @@ public void CompareDifferentEventsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; @@ -369,12 +739,18 @@ public void CompareDifferentEventsLength () [Fact] public void CompareSameEventsDiffOrder () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -382,14 +758,27 @@ public void CompareSameEventsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -397,40 +786,77 @@ public void CompareSameEventsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]), new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -438,16 +864,29 @@ public void CompareSameEventsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -455,29 +894,61 @@ public void CompareSameEventsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; @@ -488,12 +959,18 @@ public void CompareSameEventsDiffOrder () [Fact] public void CompareDifferentEvents () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -501,14 +978,27 @@ public void CompareDifferentEvents () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -516,31 +1006,55 @@ public void CompareDifferentEvents () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), ]), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -548,16 +1062,29 @@ public void CompareDifferentEvents () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -565,22 +1092,41 @@ public void CompareDifferentEvents () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.InternalKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; @@ -590,12 +1136,18 @@ public void CompareDifferentEvents () [Fact] public void CompareDifferentMethodsLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -603,14 +1155,27 @@ public void CompareDifferentMethodsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -618,44 +1183,85 @@ public void CompareDifferentMethodsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Methods = [ new ( type: "NS.MyClass", name: "TryGetString", - returnType: "bool", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "example") { + new (position: 0, type: "string?", name: "example", isBlittable: false) { IsNullable = true, ReferenceKind = ReferenceKind.Out, }, @@ -664,23 +1270,31 @@ public void CompareDifferentMethodsLength () new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "NS.CustomType", "input") + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false) ] ) ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -688,16 +1302,29 @@ public void CompareDifferentMethodsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -705,42 +1332,82 @@ public void CompareDifferentMethodsLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Methods = [ new ( type: "NS.MyClass", name: "TryGetString", - returnType: "bool", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "example") { + new (position: 0, type: "string?", name: "example", isBlittable: false) { IsNullable = true, ReferenceKind = ReferenceKind.Out, }, @@ -755,12 +1422,18 @@ public void CompareDifferentMethodsLength () [Fact] public void CompareSameMethodsDiffOrder () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -768,14 +1441,27 @@ public void CompareSameMethodsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -783,44 +1469,85 @@ public void CompareSameMethodsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Methods = [ new ( type: "NS.MyClass", name: "TryGetString", - returnType: "bool", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "example") { + new (position: 0, type: "string?", name: "example", isBlittable: false) { IsNullable = true, ReferenceKind = ReferenceKind.Out, }, @@ -829,23 +1556,31 @@ public void CompareSameMethodsDiffOrder () new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "NS.CustomType", "input") + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false) ] ) ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -853,16 +1588,29 @@ public void CompareSameMethodsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -870,54 +1618,97 @@ public void CompareSameMethodsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Methods = [ new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "NS.CustomType", "input") + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false) ] ), new ( type: "NS.MyClass", name: "TryGetString", - returnType: "bool", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "example") { + new (position: 0, type: "string?", name: "example", isBlittable: false) { IsNullable = true, ReferenceKind = ReferenceKind.Out, }, @@ -932,12 +1723,18 @@ public void CompareSameMethodsDiffOrder () [Fact] public void CompareDifferentMethods () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -945,14 +1742,27 @@ public void CompareDifferentMethods () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -960,54 +1770,94 @@ public void CompareDifferentMethods () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Events = [ new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Methods = [ new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "NS.CustomType", "input") + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false), ] ), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -1015,16 +1865,319 @@ public void CompareDifferentMethods () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), + ]), + new ( + name: "Surname", + returnType: new ("string"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + ], + Events = [ + new ( + name: "MyEvent2", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + new ( + name: "MyEvent", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + ], + Methods = [ + new ( + type: "NS.MyClass", + name: "TryGetString", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string?", name: "example", isBlittable: false) { + IsNullable = true, + ReferenceKind = ReferenceKind.Out, + }, + ] + ), + ] + }; + + Assert.False (comparer.Equals (changes1, changes2)); + } + + [Fact] + public void CompareSameMethodsDiffAvailability () + { + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios")); + builder.Add (new SupportedOSPlatformData ("tvos")); + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: builder.ToImmutable ()) { + EnumMembers = [], + Properties = [ + new ( + name: "Surname", + returnType: new ("string"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + new ( + name: "Name", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), + ]), + ], + Events = [ + new ( + name: "MyEvent", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + new ( + name: "MyEvent2", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + ], + Methods = [ + new ( + type: "NS.MyClass", + name: "TryGetString", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string?", name: "example", isBlittable: false) { + IsNullable = true, + ReferenceKind = ReferenceKind.Out, + }, + ] + ), + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false) + ] + ) + ] + }; + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { + EnumMembers = [], + Properties = [ + new ( + name: "Name", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -1032,42 +2185,89 @@ public void CompareDifferentMethods () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + ], modifiers: []), + new (AccessorKind.Setter, new (), null, [], []), ]), ], Events = [ new ( name: "MyEvent2", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Methods = [ + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false) + ] + ), new ( type: "NS.MyClass", name: "TryGetString", - returnType: "bool", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "example") { + new (position: 0, type: "string?", name: "example", isBlittable: false) { IsNullable = true, ReferenceKind = ReferenceKind.Out, }, @@ -1078,4 +2278,307 @@ public void CompareDifferentMethods () Assert.False (comparer.Equals (changes1, changes2)); } + + [Fact] + public void CompareSameMethodsSameAvailability () + { + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios")); + builder.Add (new SupportedOSPlatformData ("tvos")); + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: builder.ToImmutable ()) { + EnumMembers = [], + Properties = [ + new ( + name: "Surname", + returnType: new ("string"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + new ( + name: "Name", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), + ]), + ], + Events = [ + new ( + name: "MyEvent", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + new ( + name: "MyEvent2", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + ], + Methods = [ + new ( + type: "NS.MyClass", + name: "TryGetString", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string?", name: "example", isBlittable: false) { + IsNullable = true, + ReferenceKind = ReferenceKind.Out, + }, + ] + ), + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false) + ] + ) + ] + }; + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: builder.ToImmutable ()) { + EnumMembers = [], + Properties = [ + new ( + name: "Name", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), + ]), + new ( + name: "Surname", + returnType: new ("string"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + ], + Events = [ + new ( + name: "MyEvent2", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + new ( + name: "MyEvent", + type: "System.EventHandler", + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + ], + Methods = [ + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false) + ] + ), + new ( + type: "NS.MyClass", + name: "TryGetString", + returnType: new ( + name: "bool", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string?", name: "example", isBlittable: false) { + IsNullable = true, + ReferenceKind = ReferenceKind.Out, + }, + ] + ), + ] + }; + + Assert.True (comparer.Equals (changes1, changes2)); + } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesEqualityComparerTests.cs index 66686d90d764..f3a603c06133 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesEqualityComparerTests.cs @@ -1,9 +1,7 @@ -using System.Linq; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Macios.Generator.DataModel; -using Xamarin.Tests; -using Xamarin.Utils; using Xunit; namespace Microsoft.Macios.Generator.Tests.DataModel; @@ -14,26 +12,56 @@ public class CodeChangesEqualityComparerTests : BaseGeneratorTestClass { [Fact] public void CompareDifferentFullyQualifiedSymbol () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name1"); - var changes2 = new CodeChanges (BindingType.SmartEnum, "name2"); + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name1", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name1", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name2", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name2", + symbolAvailability: new ()); Assert.False (equalityComparer.Equals (changes1, changes2)); } [Fact] public void CompareDifferentBindingType () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name"); - var changes2 = new CodeChanges (BindingType.Unknown, "name"); + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.SmartEnum, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); Assert.False (equalityComparer.Equals (changes1, changes2)); } [Fact] public void CompareDifferentAttributesLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name"); - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { Attributes = [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) + new AttributeCodeChange (name: "name", arguments: ["arg1", "arg2"]) ] }; Assert.False (equalityComparer.Equals (changes1, changes2)); @@ -42,14 +70,24 @@ public void CompareDifferentAttributesLength () [Fact] public void CompareDifferentAttributes () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { Attributes = [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) + new AttributeCodeChange (name: "name", arguments: ["arg1", "arg2"]) ], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { Attributes = [ - new AttributeCodeChange ("name2", ["arg1", "arg2"]) + new AttributeCodeChange (name: "name2", arguments: ["arg1", "arg2"]) ], }; Assert.False (equalityComparer.Equals (changes1, changes2)); @@ -58,10 +96,26 @@ public void CompareDifferentAttributes () [Fact] public void CompareDifferentMembersLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name"); - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()); + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [ - new EnumMember ("name", []) + new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []) ], }; Assert.False (equalityComparer.Equals (changes1, changes2)); @@ -70,14 +124,36 @@ public void CompareDifferentMembersLength () [Fact] public void CompareDifferentMembers () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [ - new EnumMember ("name", []) + new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []) ], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [ - new EnumMember ("name2", []) + new EnumMember ( + name: "name2", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []) ], }; Assert.False (equalityComparer.Equals (changes1, changes2)); @@ -86,13 +162,27 @@ public void CompareDifferentMembers () [Fact] public void CompareDifferentPropertyLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { EnumMembers = [], Properties = [] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { + EnumMembers = [], + Properties = [] + }; + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -100,12 +190,24 @@ public void CompareDifferentPropertyLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]) ] }; @@ -116,12 +218,18 @@ public void CompareDifferentPropertyLength () [Fact] public void CompareSamePropertiesDiffOrder () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -129,14 +237,27 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -144,21 +265,39 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -166,16 +305,29 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -183,10 +335,22 @@ public void CompareSamePropertiesDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; @@ -196,12 +360,18 @@ public void CompareSamePropertiesDiffOrder () [Fact] public void CompareDifferentProperties () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -209,14 +379,27 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -224,21 +407,39 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ] }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -246,16 +447,29 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -263,10 +477,22 @@ public void CompareDifferentProperties () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ] }; @@ -276,12 +502,18 @@ public void CompareDifferentProperties () [Fact] public void CompareDifferentConstructorLength () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -289,14 +521,27 @@ public void CompareDifferentConstructorLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -304,22 +549,40 @@ public void CompareDifferentConstructorLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Constructors = [], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -327,16 +590,29 @@ public void CompareDifferentConstructorLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -344,14 +620,26 @@ public void CompareDifferentConstructorLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Constructors = [ - new ("MyClass", [], [], []) + new (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []) ], }; Assert.False (equalityComparer.Equals (changes1, changes2)); @@ -360,12 +648,18 @@ public void CompareDifferentConstructorLength () [Fact] public void CompareDifferentConstructors () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -373,14 +667,27 @@ public void CompareDifferentConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -388,24 +695,42 @@ public void CompareDifferentConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Constructors = [ - new ("MyClass", [], [], []) + new (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []) ], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -413,16 +738,29 @@ public void CompareDifferentConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -430,18 +768,31 @@ public void CompareDifferentConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Constructors = [ - new ("MyClass", + new (type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]) ], }; @@ -451,12 +802,18 @@ public void CompareDifferentConstructors () [Fact] public void CompareSameConstructors () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -464,14 +821,27 @@ public void CompareSameConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -479,30 +849,49 @@ public void CompareSameConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Constructors = [ - new Constructor ("MyClass", [], [], []), - new ("MyClass", + new Constructor (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []), + new (type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]) ], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -510,16 +899,29 @@ public void CompareSameConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -527,19 +929,32 @@ public void CompareSameConstructors () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Constructors = [ - new Constructor ("MyClass", [], [], []), - new ("MyClass", + new Constructor (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []), + new (type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]) ], }; @@ -549,12 +964,18 @@ public void CompareSameConstructors () [Fact] public void CompareSameConstructorsDiffOrder () { - var changes1 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -562,14 +983,27 @@ public void CompareSameConstructorsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -577,30 +1011,49 @@ public void CompareSameConstructorsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), ]), ], Constructors = [ - new ("MyClass", + new (type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]), - new ("MyClass", [], [], []), + new (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []), ], }; - var changes2 = new CodeChanges (BindingType.SmartEnum, "name") { + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { EnumMembers = [], Properties = [ new ( name: "Name", - type: "Utils.MyClass", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -608,16 +1061,28 @@ public void CompareSameConstructorsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: []), ]), new ( name: "Surname", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -625,22 +1090,206 @@ public void CompareSameConstructorsDiffOrder () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]), ], Constructors = [ - new ("MyClass", [], [], []), - new ("MyClass", + new (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []), + new (type: "MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]), ], }; Assert.True (equalityComparer.Equals (changes1, changes2)); } + + [Fact] + public void CompareSameDiffModifiers () + { + var changes1 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { + Modifiers = [ + SyntaxFactory.Token (kind: SyntaxKind.InternalKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PartialKeyword) + ], + EnumMembers = [], + Properties = [ + new ( + name: "Surname", + returnType: new ("string"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + new ( + name: "Name", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), + ]), + ], + Constructors = [ + new (type: "MyClass", + symbolAvailability: new (), + attributes: [], + modifiers: [], + parameters: [ + new (position: 0, type: "string", name: "name", isBlittable: false), + ]), + new (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []), + ], + }; + var changes2 = new CodeChanges ( + bindingInfo: new (BindingType.Protocol, new ()), + name: "name", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.name", + symbolAvailability: new ()) { + Modifiers = [ + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.StaticKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PartialKeyword) + ], + EnumMembers = [], + Properties = [ + new ( + name: "Name", + returnType: new ("Utils.MyClass"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), + ], + modifiers: [] + ), + ]), + new ( + name: "Surname", + returnType: new ("string"), + symbolAvailability: new (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]), + ], + Constructors = [ + new (type: "MyClass", symbolAvailability: new (), attributes: [], modifiers: [], parameters: []), + new (type: "MyClass", + symbolAvailability: new (), + attributes: [], + modifiers: [], + parameters: [ + new (position: 0, type: "string", name: "name", isBlittable: false), + ]), + ], + }; + Assert.False (equalityComparer.Equals (changes1, changes2)); + } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesTests.cs index e81d8dec7887..2542637ee4ae 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/CodeChangesTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections; using System.Collections.Generic; using System.Linq; @@ -63,8 +65,7 @@ enum AVMediaCharacteristics { [AllSupportedPlatformsClassData] public void SkipEnumValueDeclaration (ApplePlatform platform, string inputText, bool expected) { - var (compilation, sourceTrees) = - CreateCompilation (nameof (SkipEnumValueDeclaration), platform, inputText); + var (compilation, sourceTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); // get the declarations we want to work with and the semantic model var node = sourceTrees [0].GetRoot () @@ -122,7 +123,7 @@ public class TestClass { "; yield return [wrongAttributeInProperty, true]; - const string fieldAttributeInProperty = @" + const string exportFieldAttributeInProperty = @" using System; using Foundation; using ObjCRuntime; @@ -133,6 +134,20 @@ public class TestClass { [Export (""name"")] public partial string Name { get;set; } } +"; + yield return [exportFieldAttributeInProperty, true]; + + const string fieldAttributeInProperty = @" +using System; +using Foundation; +using ObjCRuntime; +using ObjCBindings; + +[BindingType] +public class TestClass { + [Field (""name"")] + public partial string Name { get;set; } +} "; yield return [fieldAttributeInProperty, false]; @@ -159,8 +174,7 @@ public class TestClass { [AllSupportedPlatformsClassData] public void SkipPropertyDeclaration (ApplePlatform platform, string inputText, bool expected) { - var (compilation, sourceTrees) = - CreateCompilation (nameof (SkipPropertyDeclaration), platform, inputText); + var (compilation, sourceTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); // get the declarations we want to work with and the semantic model var node = sourceTrees [0].GetRoot () @@ -226,7 +240,7 @@ public class TestClass { public void SkipMethodDeclaration (ApplePlatform platform, string inputText, bool expected) { var (compilation, sourceTrees) = - CreateCompilation (nameof (SkipMethodDeclaration), platform, inputText); + CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); // get the declarations we want to work with and the semantic model var node = sourceTrees [0].GetRoot () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorComparerTests.cs index b3febf554bc7..eb8a18369b9d 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using Microsoft.CodeAnalysis.CSharp; using Microsoft.Macios.Generator.DataModel; @@ -11,8 +13,8 @@ public class ConstructorComparerTests { [Fact] public void CompareDiffType () { - var x = new Constructor ("MyClass", [], [], []); - var y = new Constructor ("MyClass2", [], [], []); + var x = new Constructor ("MyClass", new (), [], [], []); + var y = new Constructor ("MyClass2", new (), [], [], []); Assert.Equal (String.Compare (x.Type, y.Type, StringComparison.Ordinal), comparer.Compare (x, y)); } @@ -21,12 +23,14 @@ public void CompareModifierDiffLength () { var x = new Constructor ("MyClass", attributes: [], + symbolAvailability: new (), modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: []); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -39,12 +43,14 @@ public void CompareModifierDiffLength () public void CompareDiffModifier () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: []); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -58,6 +64,7 @@ public void CompareDiffModifier () public void CompareAttrsDiffLength () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("FirstAttr"), new ("SecondAttr", ["first"]), @@ -68,6 +75,7 @@ public void CompareAttrsDiffLength () ], parameters: []); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("FirstAttr"), ], @@ -83,6 +91,7 @@ public void CompareAttrsDiffLength () public void CompareDiffAttrs () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("FirstAttr"), ], @@ -92,6 +101,7 @@ public void CompareDiffAttrs () ], parameters: []); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("SecondAttr", ["first"]), ], @@ -109,6 +119,7 @@ public void CompareParameterDiffLength () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("FirstAttr"), ], @@ -117,9 +128,10 @@ public void CompareParameterDiffLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("FirstAttr"), ], @@ -128,8 +140,8 @@ public void CompareParameterDiffLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname"), + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ]); Assert.Equal (x.Parameters.Length.CompareTo (y.Parameters.Length), comparer.Compare (x, y)); } @@ -138,6 +150,7 @@ public void CompareParameterDiffLength () public void CompareDiffParameters () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("FirstAttr"), ], @@ -146,9 +159,10 @@ public void CompareDiffParameters () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [ new ("FirstAttr"), ], @@ -157,7 +171,42 @@ public void CompareDiffParameters () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (1, "string", "surname"), + new (position: 1, type: "string", name: "surname", isBlittable: false), + ]); + var parameterCompare = new ParameterComparer (); + Assert.Equal (parameterCompare.Compare (x.Parameters [0], y.Parameters [0]), comparer.Compare (x, y)); + } + + [Fact] + public void CompareDiffParametersSmartEnum () + { + var x = new Constructor ("MyClass", + symbolAvailability: new (), + attributes: [ + new ("FirstAttr"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "MyEnum", name: "name", isBlittable: false) { + IsSmartEnum = true + }, + ]); + var y = new Constructor ("MyClass", + symbolAvailability: new (), + attributes: [ + new ("FirstAttr"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "MyEnum", name: "name", isBlittable: false) { + IsSmartEnum = false + }, ]); var parameterCompare = new ParameterComparer (); Assert.Equal (parameterCompare.Compare (x.Parameters [0], y.Parameters [0]), comparer.Compare (x, y)); diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorTests.cs index 6b15d1e4458a..1866feddd746 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorTests.cs @@ -1,8 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections; using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; using Xamarin.Tests; using Xamarin.Utils; @@ -30,7 +34,8 @@ public TestClass () { yield return [ emptyConstructor, new Constructor ( - type: "NS.TestClass", + type: "TestClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -54,13 +59,14 @@ public TestClass (string inName) { yield return [ singleParameter, new Constructor ( - type: "NS.TestClass", + type: "TestClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "inName"), + new (position: 0, type: "string", name: "inName", isBlittable: false), ] ) ]; @@ -83,14 +89,15 @@ public TestClass (string inName, int inAge) { yield return [ multiParameter, new Constructor ( - type: "NS.TestClass", + type: "TestClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "inName"), - new (1, "int", "inAge"), + new (position: 0, type: "string", name: "inName", isBlittable: false), + new (position: 1, type: "int", name: "inAge", isBlittable: true), ] ) ]; @@ -113,14 +120,17 @@ public TestClass (string? inName, int inAge) { yield return [ nullableParameter, new Constructor ( - type: "NS.TestClass", + type: "TestClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "inName") { IsNullable = true, }, - new (1, "int", "inAge"), + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + }, + new (position: 1, type: "int", name: "inAge", isBlittable: true), ] ) ]; @@ -146,15 +156,221 @@ public TestClass (string? inName, int inAge, params string[] inSurnames) { yield return [ paramsCollectionParameter, new Constructor ( - type: "NS.TestClass", + type: "TestClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "inName") { IsNullable = true, }, - new (1, "int", "inAge"), - new (2, "string[]", "inSurnames") { IsParams = true, }, + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + }, + new (position: 1, type: "int", name: "inAge", isBlittable: true), + new (position: 2, type: "string", name: "inSurnames", isBlittable: false) { + IsParams = true, + IsArray = true, + }, + ] + ) + ]; + + const string arrayParameter = @" +using System; + +namespace NS { + public class TestClass { + string name; + int age; + string [] surnames; + + public TestClass (string? inName, int inAge, string[] inSurnames) { + name = inName ?? string.Empty; + age = inAge; + surnames = inSurnames; + } + } +} +"; + + yield return [ + arrayParameter, + new Constructor ( + type: "TestClass", + symbolAvailability: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + }, + new (position: 1, type: "int", name: "inAge", isBlittable: true), + new (position: 2, type: "string", name: "inSurnames", isBlittable: false) { + IsParams = false, + IsArray = true + }, + ] + ) + ]; + + const string nullableArrayParameter = @" +using System; + +namespace NS { + public class TestClass { + string name; + int age; + string [] surnames; + + public TestClass (string? inName, int inAge, string[]? inSurnames) { + name = inName ?? string.Empty; + age = inAge; + surnames = inSurnames; + } + } +} +"; + + yield return [ + nullableArrayParameter, + new Constructor ( + type: "TestClass", + symbolAvailability: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + }, + new (position: 1, type: "int", name: "inAge", isBlittable: true), + new (position: 2, type: "string", name: "inSurnames", isBlittable: false) { + IsNullable = true, + IsArray = true + }, + ] + ) + ]; + + const string arrayOfNullableParameter = @" +using System; + +namespace NS { + public class TestClass { + string name; + int age; + string [] surnames; + + public TestClass (string? inName, int inAge, string?[] inSurnames) { + name = inName ?? string.Empty; + age = inAge; + surnames = inSurnames; + } + } +} +"; + + yield return [ + arrayOfNullableParameter, + new Constructor ( + type: "TestClass", + symbolAvailability: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + }, + new (position: 1, type: "int", name: "inAge", isBlittable: true), + new (position: 2, type: "string?", name: "inSurnames", isBlittable: false) { + IsNullable = false, + IsArray = true + }, + ] + ) + ]; + + const string nullableArrayOfNullableParameter = @" +using System; + +namespace NS { + public class TestClass { + string name; + int age; + string [] surnames; + + public TestClass (string? inName, int inAge, string?[]? inSurnames) { + name = inName ?? string.Empty; + age = inAge; + surnames = inSurnames; + } + } +} +"; + + yield return [ + nullableArrayOfNullableParameter, + new Constructor ( + type: "TestClass", + symbolAvailability: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (0, "string", "inName", false) { + IsNullable = true, + }, + new (1, "int", "inAge", true), + new (2, "string?", "inSurnames", false) { + IsNullable = true, + IsArray = true + }, + ] + ) + ]; + + const string twoDimensionalArrayParameter = @" +using System; + +namespace NS { + public class TestClass { + string name; + int age; + string [] surnames; + + public TestClass (string? inName, int inAge, string[][] inSurnames) { + name = inName ?? string.Empty; + age = inAge; + surnames = inSurnames; + } + } +} +"; + + yield return [ + twoDimensionalArrayParameter, + new Constructor ( + type: "TestClass", + symbolAvailability: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + }, + new (position: 1, type: "int", name: "inAge", isBlittable: true), + new (position: 2, type: "string[]", name: "inSurnames", isBlittable: false) { + IsParams = false, + IsArray = true + }, ] ) ]; @@ -175,13 +391,17 @@ public TestClass (string? inName = null) { yield return [ optionalParameter, new Constructor ( - type: "NS.TestClass", + type: "TestClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "inName") { IsNullable = true, IsOptional = true, }, + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + IsOptional = true, + }, ] ) ]; @@ -202,16 +422,58 @@ public TestClass (T? inName = null) { yield return [ genericParameter, new Constructor ( - type: "NS.TestClass", + type: "TestClass", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "T?", "inName") { IsOptional = true, IsNullable = true, }, + new (position: 0, type: "T", name: "inName", isBlittable: false) { + IsOptional = true, + IsNullable = true, + }, ] ) ]; + + const string availabilityPresent = @" +using System.Runtime.Versioning; +using System; + +namespace NS { + [SupportedOSPlatform (""ios"")] + [SupportedOSPlatform (""tvos"")] + public class TestClass { + string name; + public TestClass (string? inName = null) { + name = inName ?? string.Empty; + } + } +} +"; + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios")); + builder.Add (new SupportedOSPlatformData ("tvos")); + + yield return [ + availabilityPresent, + new Constructor ( + type: "TestClass", + symbolAvailability: builder.ToImmutable (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string", name: "inName", isBlittable: false) { + IsNullable = true, + IsOptional = true, + }, + ] + ) + ]; + } IEnumerator IEnumerable.GetEnumerator () @@ -224,8 +486,7 @@ IEnumerator IEnumerable.GetEnumerator () [AllSupportedPlatformsClassData] void FromConstructorDeclaration (ApplePlatform platform, string inputText, Constructor expected) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (FromConstructorDeclaration), - platform, inputText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (syntaxTrees); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var declaration = syntaxTrees [0].GetRoot () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorsEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorsEqualityComparerTests.cs index b21aba6f2039..f21926c38cec 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorsEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ConstructorsEqualityComparerTests.cs @@ -1,3 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; using Xunit; @@ -14,17 +18,19 @@ public void CompareEmpty () public void CompareSingleElementDiffParameterCount () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (0, "string", "surname"), + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 0, type: "string", name: "surname", isBlittable: false), ]); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]); Assert.False (compare.Equals ([x], [y])); } @@ -33,16 +39,18 @@ public void CompareSingleElementDiffParameterCount () public void CompareSingleElementSameParameterCountDifferentParams () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "surname"), + new (position: 0, type: "string", name: "surname", isBlittable: false), ]); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]); Assert.False (compare.Equals ([x], [y])); } @@ -51,16 +59,18 @@ public void CompareSingleElementSameParameterCountDifferentParams () public void CompareDifferentConstructorCount () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "surname"), + new (position: 0, type: "string", name: "surname", isBlittable: false), ]); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]); Assert.False (compare.Equals ([x, y], [y])); } @@ -69,17 +79,76 @@ public void CompareDifferentConstructorCount () public void CompareSameConstructorsDifferentOrder () { var x = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "surname"), + new (position: 0, type: "string", name: "surname", isBlittable: false), ]); var y = new Constructor ("MyClass", + symbolAvailability: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ]); Assert.True (compare.Equals ([x, y], [y, x])); } + + [Fact] + public void CompareSameConstructorsDifferentAvailability () + { + var xBuilder = SymbolAvailability.CreateBuilder (); + xBuilder.Add (new SupportedOSPlatformData ("ios")); + xBuilder.Add (new SupportedOSPlatformData ("tvos")); + xBuilder.Add (new UnsupportedOSPlatformData ("macos")); + + var x = new Constructor ("MyClass", + symbolAvailability: xBuilder.ToImmutable (), + attributes: [], + modifiers: [], + parameters: [ + new (position: 0, type: "string", name: "surname", isBlittable: false), + ]); + + var yBuilder = SymbolAvailability.CreateBuilder (); + yBuilder.Add (new SupportedOSPlatformData ("ios")); + yBuilder.Add (new UnsupportedOSPlatformData ("tvos")); + + var y = new Constructor ("MyClass", + symbolAvailability: yBuilder.ToImmutable (), + attributes: [], + modifiers: [], + parameters: [ + new (position: 0, type: "string", name: "name", isBlittable: false), + ]); + Assert.False (compare.Equals ([x], [y])); + } + + [Fact] + public void CompareSameConstructorsSameAvailability () + { + + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios")); + builder.Add (new SupportedOSPlatformData ("tvos")); + + var x = new Constructor ("MyClass", + symbolAvailability: builder.ToImmutable (), + attributes: [], + modifiers: [], + parameters: [ + new (position: 0, type: "string", name: "surname", isBlittable: false), + ]); + + var y = new Constructor ("MyClass", + symbolAvailability: builder.ToImmutable (), + attributes: [], + modifiers: [], + parameters: [ + new (position: 0, type: "string", name: "surname", isBlittable: false), + ]); + Assert.True (compare.Equals ([x], [y])); + + } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/DelegateInfoTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/DelegateInfoTests.cs new file mode 100644 index 000000000000..90eed31b510e --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/DelegateInfoTests.cs @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; +using static Microsoft.Macios.Generator.Tests.TestDataFactory; + +namespace Microsoft.Macios.Generator.Tests.DataModel; + +public class DelegateInfoTests : BaseGeneratorTestClass { + + class TestDataFromMethodDeclaration : IEnumerable { + public IEnumerator GetEnumerator () + { + + const string actionNoParam = @" +using System; + +namespace NS { + public class MyClass { + public void MyMethod (Action cb) {} + } +} +"; + + yield return [ + actionNoParam, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new ( + position: 0, + type: "System.Action", + name: "cb", + isBlittable: false + ) { + Delegate = new ( + type: "System.Action", + name: "Invoke", + returnType: "void", + parameters: [] + ) + } + ] + ) + ]; + + const string actionSingleParam = @" +using System; + +namespace NS { + public class MyClass { + public void MyMethod (Action cb) {} + } +} +"; + + yield return [ + actionSingleParam, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new ( + position: 0, + type: "System.Action", + name: "cb", + isBlittable: false + ) { + Delegate = new ( + type: "System.Action", + name: "Invoke", + returnType: "void", + parameters: [ + new ( + position: 0, + type: "string", + name: "obj", + isBlittable: false + ), + ]) + } + ] + ) + ]; + + const string actionSingleNullableParam = @" +using System; + +namespace NS { + public class MyClass { + public void MyMethod (Action cb) {} + } +} +"; + + yield return [ + actionSingleNullableParam, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new ( + position: 0, + type: "System.Action", + name: "cb", + isBlittable: false + ) { + Delegate = new ( + type: "System.Action", + name: "Invoke", + returnType: "void", + parameters: [ + new ( + position: 0, + type: "string", + name: "obj", + isBlittable: false + ) { + IsNullable = true + }, + ]) + } + ] + ) + ]; + + const string actionMultiParam = @" +using System; + +namespace NS { + public class MyClass { + public void MyMethod (Action cb) {} + } +} +"; + + yield return [ + actionMultiParam, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new ( + position: 0, + type: "System.Action", + name: "cb", + isBlittable: false + ) { + Delegate = new ( + type: "System.Action", + name: "Invoke", + returnType: "void", + parameters: [ + new ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ), + new ( + position: 1, + type: "string", + name: "arg2", + isBlittable: false + ), + ]) + } + ] + ) + ]; + + const string funcSingleParam = @" +using System; + +namespace NS { + public class MyClass { + public void MyMethod (Func cb) {} + } +} +"; + + yield return [ + funcSingleParam, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new ( + position: 0, + type: "System.Func", + name: "cb", + isBlittable: false + ) { + Delegate = new ( + type: "System.Func", + name: "Invoke", + returnType: "string", + parameters: [ + new ( + position: 0, + type: "string", + name: "arg", + isBlittable: false + ), + ]) + } + ] + ) + ]; + + const string funcMultiParam = @" +using System; + +namespace NS { + public class MyClass { + public void MyMethod (Func cb) {} + } +} +"; + + yield return [ + funcMultiParam, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new ( + position: 0, + type: "System.Func", + name: "cb", + isBlittable: false + ) { + Delegate = new ( + type: "System.Func", + name: "Invoke", + returnType: "string", + parameters: [ + new ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ), + new ( + position: 1, + type: "string", + name: "arg2", + isBlittable: false + ), + ]) + } + ] + ) + ]; + + const string customDelegate = @" +using System; + +namespace NS { + public class MyClass { + public delegate int? Callback(string name, string? middleName, params string[] surname); + + public void MyMethod (Callback cb) {} + } +} +"; + + yield return [ + customDelegate, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new ( + position: 0, + type: "NS.MyClass.Callback", + name: "cb", + isBlittable: false + ) { + Delegate = new ( + type: "NS.MyClass.Callback", + name: "Invoke", + returnType: "int?", + parameters: [ + new ( + position: 0, + type: "string", + name: "name", + isBlittable: false + ), + new ( + position: 1, + type: "string", + name: "middleName", + isBlittable: false + ) { + IsNullable = true + }, + new ( + position: 2, + type: "string", + name: "surname", + isBlittable: false + ) { + IsParams = true, + IsArray = true, + }, + ]) + } + ] + ) + ]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void FromMethodDeclaration (ApplePlatform platform, string inputText, Method expected) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes ().OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + Assert.True (Method.TryCreate (declaration, semanticModel, out var changes)); + Assert.NotNull (changes); + Assert.Equal (expected, changes); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/DelegateParameterTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/DelegateParameterTests.cs new file mode 100644 index 000000000000..25c818713fa1 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/DelegateParameterTests.cs @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.DataModel; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.DataModel; + +public class DelegateParameterTests { + + class TestDataEquals : IEnumerable { + public IEnumerator GetEnumerator () + { + // diff pos + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 1, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff type + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "int", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff name + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg2", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff blittable + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: true + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff optional + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = true, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff is params + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = true, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff is this + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = true, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff is nullable + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = true, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff is smart enum + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = true, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff is array + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = true, + ReferenceKind = ReferenceKind.None, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + + // diff ref type + yield return [ + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.In, + }, + new DelegateParameter ( + position: 0, + type: "string", + name: "arg1", + isBlittable: false + ) { + IsOptional = false, + IsParams = false, + IsThis = false, + IsNullable = false, + IsSmartEnum = false, + IsArray = false, + ReferenceKind = ReferenceKind.None, + }, + ]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataEquals))] + void CompareDiffPosition (DelegateParameter x, DelegateParameter y) + { + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumDeclarationCodeChangesTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumDeclarationCodeChangesTests.cs index db8f74f7655a..17dee7248e2c 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumDeclarationCodeChangesTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumDeclarationCodeChangesTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Linq; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Macios.Generator.DataModel; @@ -10,8 +12,7 @@ namespace Microsoft.Macios.Generator.Tests.DataModel; public class EnumDeclarationCodeChangesTests : BaseGeneratorTestClass { CodeChanges CreateCodeChanges (ApplePlatform platform, string name, string inputText) { - var (compilation, sourceTrees) = - CreateCompilation (nameof (CreateCodeChangeNoFieldsNoAttributes), platform, inputText); + var (compilation, sourceTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); var enumDeclaration = sourceTrees [0].GetRoot () .DescendantNodes () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMemberCodeChangesTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMemberCodeChangesTests.cs index 61d981cb4520..880bf2be4e3f 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMemberCodeChangesTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMemberCodeChangesTests.cs @@ -1,4 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; +using ObjCBindings; using Xunit; namespace Microsoft.Macios.Generator.Tests.DataModel; @@ -7,8 +15,20 @@ public class EnumMemberCodeChangesTests { [Fact] public void EqualsNoParams () { - var memberCodeChange1 = new EnumMember ("name", []); - var memberCodeChange2 = new EnumMember ("name", []); + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []); Assert.True (memberCodeChange1.Equals (memberCodeChange2)); Assert.True (memberCodeChange1 == memberCodeChange2); Assert.False (memberCodeChange1 != memberCodeChange2); @@ -17,12 +37,26 @@ public void EqualsNoParams () [Fact] public void EqualsWithArgumentParams () { - var memberCodeChange1 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) - ]); - var memberCodeChange2 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) - ]); + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]) + ] + ); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]) + ] + ); Assert.True (memberCodeChange1.Equals (memberCodeChange2)); Assert.True (memberCodeChange1 == memberCodeChange2); Assert.False (memberCodeChange1 != memberCodeChange2); @@ -31,22 +65,49 @@ public void EqualsWithArgumentParams () [Fact] public void NotEqualsDifferentName () { - var memberCodeChange1 = new EnumMember ("name", []); - var memberCodeChange2 = new EnumMember ("name2", []); + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: []); + var memberCodeChange2 = new EnumMember ( + name: "name2", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [] + ); Assert.False (memberCodeChange1.Equals (memberCodeChange2)); Assert.False (memberCodeChange1 == memberCodeChange2); Assert.True (memberCodeChange1 != memberCodeChange2); } [Fact] - public void NotEqualsDiffenretAttributeNames () + public void NotEqualsDifferentAttributeNames () { - var memberCodeChange1 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) - ]); - var memberCodeChange2 = new EnumMember ("name", [ - new AttributeCodeChange ("name2", ["arg1", "arg2"]) - ]); + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]) + ] + ); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name2", ["arg1", "arg2"]) + ] + ); Assert.False (memberCodeChange1.Equals (memberCodeChange2)); Assert.False (memberCodeChange1 == memberCodeChange2); Assert.True (memberCodeChange1 != memberCodeChange2); @@ -55,12 +116,26 @@ public void NotEqualsDiffenretAttributeNames () [Fact] public void NotEqualsDifferentAttributeParams () { - var memberCodeChange1 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) - ]); - var memberCodeChange2 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg1", "arg3"]) - ]); + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]) + ] + ); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg3"]) + ] + ); Assert.False (memberCodeChange1.Equals (memberCodeChange2)); Assert.False (memberCodeChange1 == memberCodeChange2); Assert.True (memberCodeChange1 != memberCodeChange2); @@ -69,12 +144,26 @@ public void NotEqualsDifferentAttributeParams () [Fact] public void NotEqualsDifferentAttributeParamsOrder () { - var memberCodeChange1 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg1", "arg2"]) - ]); - var memberCodeChange2 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg2", "arg1"]) - ]); + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]) + ] + ); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg2", "arg1"]) + ] + ); Assert.False (memberCodeChange1.Equals (memberCodeChange2)); Assert.False (memberCodeChange1 == memberCodeChange2); Assert.True (memberCodeChange1 != memberCodeChange2); @@ -83,17 +172,159 @@ public void NotEqualsDifferentAttributeParamsOrder () [Fact] public void NotEqualsDifferentAttributesCount () { + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]), + new AttributeCodeChange ("name2", []) + ] + ); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg2", "arg1"]) + ] + ); + Assert.False (memberCodeChange1.Equals (memberCodeChange2)); + Assert.False (memberCodeChange1 == memberCodeChange2); + Assert.True (memberCodeChange1 != memberCodeChange2); + } + + [Fact] + public void NotEqualsDifferentPlatformAvailability () + { + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios")); + builder.Add (new SupportedOSPlatformData ("tvos")); + builder.Add (new UnsupportedOSPlatformData ("tvos")); + var availability = builder.ToImmutable (); - var memberCodeChange1 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg1", "arg2"]), - new AttributeCodeChange ("name2", []) - ]); - var memberCodeChange2 = new EnumMember ("name", [ - new AttributeCodeChange ("name", ["arg2", "arg1"]) - ]); + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: availability, + attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]), + new AttributeCodeChange ("name2", []) + ] + ); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new (), + symbolAvailability: new (), + attributes: [ + new AttributeCodeChange ("name", ["arg2", "arg1"]) + ] + ); Assert.False (memberCodeChange1.Equals (memberCodeChange2)); Assert.False (memberCodeChange1 == memberCodeChange2); Assert.True (memberCodeChange1 != memberCodeChange2); } + [Fact] + public void NotEqualsDifferentFieldData () + { + var memberCodeChange1 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new ("x", "libName", EnumValue.Default), + symbolAvailability: new (), attributes: [ + new AttributeCodeChange ("name", ["arg1", "arg2"]), + ] + ); + var memberCodeChange2 = new EnumMember ( + name: "name", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new ("x", "yLibName", EnumValue.Default), + symbolAvailability: new (), attributes: [ + new AttributeCodeChange ("name", ["arg2", "arg1"]) + ] + ); + Assert.False (memberCodeChange1.Equals (memberCodeChange2)); + Assert.False (memberCodeChange1 == memberCodeChange2); + Assert.True (memberCodeChange1 != memberCodeChange2); + } + + class TestDataToString : IEnumerable { + public IEnumerator GetEnumerator () + { + + var simpleEnum = new EnumMember ( + name: "EnumValue", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: null, + symbolAvailability: new (), + attributes: []); + yield return [simpleEnum, "{ Name: 'EnumValue' SymbolAvailability: [] FieldInfo: Attributes: [] }"]; + + var fieldDataEnum = new EnumMember ( + name: "EnumValue", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new ("x", "libName", EnumValue.Default), + symbolAvailability: new (), + attributes: []); + yield return [ + fieldDataEnum, + "{ Name: 'EnumValue' SymbolAvailability: [] FieldInfo: FieldData = { SymbolName: 'x' LibraryName: 'libName', Flags: 'Default' }, LibraryName = Test, LibraryPath = /path/to/library Attributes: [] }" + ]; + + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios")); + + var availabilityEnum = new EnumMember ( + name: "EnumValue", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new ("x", "libName", EnumValue.Default), + symbolAvailability: builder.ToImmutable (), + attributes: []); + yield return [ + availabilityEnum, + "{ Name: 'EnumValue' SymbolAvailability: [{ Platform: 'iOS', Supported: '0.0', Unsupported: [], Obsoleted: [] }] FieldInfo: FieldData = { SymbolName: 'x' LibraryName: 'libName', Flags: 'Default' }, LibraryName = Test, LibraryPath = /path/to/library Attributes: [] }" + ]; + + var attrsEnum = new EnumMember ( + name: "EnumValue", + libraryName: "Test", + libraryPath: "/path/to/library", + fieldData: new ("x", "libName", EnumValue.Default), + symbolAvailability: builder.ToImmutable (), + attributes: [ + new ("Attribute1"), + new ("Attribute2"), + ]); + yield return [ + attrsEnum, + "{ Name: 'EnumValue' SymbolAvailability: [{ Platform: 'iOS', Supported: '0.0', Unsupported: [], Obsoleted: [] }] FieldInfo: FieldData = { SymbolName: 'x' LibraryName: 'libName', Flags: 'Default' }, LibraryName = Test, LibraryPath = /path/to/library Attributes: [{ Name: Attribute1, Arguments: [] }, { Name: Attribute2, Arguments: [] }] }" + ]; + } + + IEnumerator IEnumerable.GetEnumerator () + => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataToString))] + void TestFieldDataToString (EnumMember x, string expected) + { + var str = x.ToString (); + Assert.Equal (expected, x.ToString ()); + } + } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMembersEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMembersEqualityComparerTests.cs index ecbfb05dab80..1c0e35d265c7 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMembersEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EnumMembersEqualityComparerTests.cs @@ -1,5 +1,10 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 using System.Collections.Immutable; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; +using ObjCBindings; using Xunit; namespace Microsoft.Macios.Generator.Tests.DataModel; @@ -16,32 +21,43 @@ public EnumMembersEqualityComparerTests () [Fact] public void NotEqualsDiffLength () { - ImmutableArray x = [new ("name", []), new ("name1")]; - ImmutableArray y = [new ("name", [])]; + ImmutableArray x = [new ("name", string.Empty, string.Empty, new (), new (), []), new ("name1", string.Empty, string.Empty)]; + ImmutableArray y = [new ("name", string.Empty, string.Empty, new (), new (), [])]; Assert.False (comparer.Equals (x, y)); } [Fact] public void NotEqualsDiffAttributes () { - ImmutableArray x = [new ("name", []), new ("name1")]; - ImmutableArray y = [new ("name1", []), new ("name1")]; + ImmutableArray x = [new ("name", string.Empty, string.Empty, new (), new (), []), new ("name1", string.Empty, string.Empty)]; + ImmutableArray y = [new ("name", string.Empty, string.Empty, new (), new (), [ + new ("AttrName") + ]), + new ("name1", string.Empty, string.Empty)]; Assert.False (comparer.Equals (x, y)); } [Fact] public void EqualsSameOrder () { - ImmutableArray x = [new ("name", []), new ("name1")]; - ImmutableArray y = [new ("name", []), new ("name1")]; + ImmutableArray x = [new ("name", string.Empty, string.Empty, new (), new SymbolAvailability (), []), new ("name1", string.Empty, string.Empty)]; + ImmutableArray y = [new ("name", string.Empty, string.Empty, new (), new SymbolAvailability (), []), new ("name1", string.Empty, string.Empty)]; Assert.True (comparer.Equals (x, y)); } [Fact] public void EqualsDiffOrder () { - ImmutableArray x = [new ("name1", []), new ("name")]; - ImmutableArray y = [new ("name", []), new ("name1")]; + ImmutableArray x = [new ("name1", string.Empty, string.Empty), new ("name", string.Empty, string.Empty)]; + ImmutableArray y = [new ("name", string.Empty, string.Empty), new ("name1", string.Empty, string.Empty)]; Assert.True (comparer.Equals (x, y)); } + + [Fact] + public void NotEqualsDiffFieldData () + { + ImmutableArray x = [new ("name", "", "", new ("x", "xLib", EnumValue.Default), new SymbolAvailability (), []), new ("name1", "", "")]; + ImmutableArray y = [new ("name", "", "", new ("y", "xLib", EnumValue.Default), new SymbolAvailability (), []), new ("name1", "", "")]; + Assert.False (comparer.Equals (x, y)); + } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventEqualityComparerTests.cs index 8fafd7eb18f1..548df3aeb781 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventEqualityComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.CodeAnalysis.CSharp; using Microsoft.Macios.Generator.DataModel; @@ -24,34 +26,55 @@ public void CompareDifferentSize () new ( name: "FirstEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), new ( name: "SecondEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; ImmutableArray y = [ new ( name: "FirstEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; @@ -65,24 +88,38 @@ public void CompareSameSizeDiffProperties () new ( name: "FirstEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; ImmutableArray y = [ new ( name: "FirstEvent", type: "AVFoundation.AVVideo", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; @@ -96,24 +133,38 @@ public void CompareSameSizeSameProperties () new ( name: "FirstEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; ImmutableArray y = [ new ( name: "FirstEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventTests.cs index e76c028adbf4..f95a4c1035e7 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/EventTests.cs @@ -1,8 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections; using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; using Xamarin.Tests; using Xamarin.Utils; @@ -30,13 +34,25 @@ public class TestClass { new Event ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: []), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] ) ]; @@ -57,12 +73,19 @@ public class TestClass { new Event ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] ) ]; @@ -83,15 +106,28 @@ public class TestClass { new Event ( name: "MyEvent", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], [ - SyntaxFactory.Token (SyntaxKind.InternalKeyword) - ]), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.InternalKeyword) + ] + ), ] ) ]; @@ -119,20 +155,129 @@ public class TestClass { new Event ( name: "MyEvent", type: "Test.MyEventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], [ - SyntaxFactory.Token (SyntaxKind.InternalKeyword) - ]), + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.InternalKeyword) + ] + ), + ] + ) + ]; + + const string eventAvailability = @" +using System.Runtime.Versioning; +using System; + +namespace Test; + +public class TestClass { + + [SupportedOSPlatform (""ios17.0"")] + public event EventHandler MyEvent { add; } +} +"; + var eventAvailabilityBuilder = SymbolAvailability.CreateBuilder (); + eventAvailabilityBuilder.Add (new SupportedOSPlatformData ("ios17.0")); + + yield return [ + eventAvailability, + new Event ( + name: "MyEvent", + type: "System.EventHandler", + symbolAvailability: eventAvailabilityBuilder.ToImmutable (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Add + , symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] ) ]; - } + const string eventAccessorAvailability = @" +using System.Runtime.Versioning; +using System; + +namespace Test; + +public class TestClass { + + [SupportedOSPlatform (""ios"")] + public event EventHandler MyEvent { + [SupportedOSPlatform (""ios17.0"")] + add; + [SupportedOSPlatform (""ios17.0"")] + remove;} +} +"; + eventAvailabilityBuilder.Clear (); + eventAvailabilityBuilder.Add (new SupportedOSPlatformData ("ios")); + + var accessorAvailabilityBuilder = SymbolAvailability.CreateBuilder (); + accessorAvailabilityBuilder.Add (new SupportedOSPlatformData ("ios17.0")); + + + yield return [ + eventAccessorAvailability, + new Event ( + name: "MyEvent", + type: "System.EventHandler", + symbolAvailability: eventAvailabilityBuilder.ToImmutable (), + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: accessorAvailabilityBuilder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: accessorAvailabilityBuilder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), + ], + modifiers: [] + ), + ] + ) + ]; + } IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); @@ -142,8 +287,7 @@ IEnumerator IEnumerable.GetEnumerator () [AllSupportedPlatformsClassData] void FromEventDeclaration (ApplePlatform platform, string inputText, Event expected) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (FromEventDeclaration), - platform, inputText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (syntaxTrees); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var declaration = syntaxTrees [0].GetRoot () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/FieldInfoTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/FieldInfoTests.cs new file mode 100644 index 000000000000..deb281c8c939 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/FieldInfoTests.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +#pragma warning disable APL0003 +using Microsoft.Macios.Generator.DataModel; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.DataModel; + +public class FieldInfoTests { + + [Fact] + public void CompareSame () + { + var x = new FieldInfo (new ("test"), ""); + var y = new FieldInfo (new ("test"), ""); + + Assert.True (x.Equals (y)); + Assert.True (x == y); + Assert.False (x != y); + } + + [Fact] + public void CompareDiffAttr () + { + var x = new FieldInfo (new ("xData"), ""); + var y = new FieldInfo (new ("test"), ""); + + Assert.False (x.Equals (y)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void CompareDiffLibraryName () + { + var x = new FieldInfo (new ("test"), "xLib"); + var y = new FieldInfo (new ("test"), "yLib"); + + Assert.False (x.Equals (y)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void CompareDiffLibraryPath () + { + var x = new FieldInfo (new ("test"), "lib", "xpath"); + var y = new FieldInfo (new ("test"), "lib"); + + Assert.False (x.Equals (y)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void DeconstructTests () + { + var x = new FieldInfo (new ("test"), "lib", "xpath"); + var (attr, name, path) = x; + Assert.Equal (x.FieldData, attr); + Assert.Equal (name, x.LibraryName); + Assert.Equal (path, x.LibraryPath); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/InterfaceCodeChangesTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/InterfaceCodeChangesTests.cs index f7ca09fe72bc..d952ab77f3ff 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/InterfaceCodeChangesTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/InterfaceCodeChangesTests.cs @@ -1,12 +1,19 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 using System.Collections; using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.DataModel; +using ObjCBindings; using Xamarin.Tests; using Xamarin.Utils; using Xunit; +using Property = ObjCBindings.Property; +using static Microsoft.Macios.Generator.Tests.TestDataFactory; namespace Microsoft.Macios.Generator.Tests.DataModel; @@ -23,7 +30,7 @@ public IEnumerator GetEnumerator () namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { } "; @@ -31,12 +38,52 @@ public partial interface IProtocol { yield return [ emptyInterface, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") - ] + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "Foundation", "ObjCBindings", "ObjCRuntime" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + } + ]; + + const string internalInterface = @" +using Foundation; +using ObjCRuntime; +using ObjCBindings; + +namespace NS; + +[BindingType] +internal partial interface IProtocol { +} +"; + + yield return [ + internalInterface, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () + ) { + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "Foundation", "ObjCBindings", "ObjCRuntime" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.InternalKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], } ]; @@ -45,7 +92,7 @@ public partial interface IProtocol { namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { [Export (""name"")] public partial string Name { get; set; } = string.Empty; @@ -55,16 +102,25 @@ public partial interface IProtocol { yield return [ singlePropertyInterface, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Properties = [ new ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["name"]) ], @@ -73,20 +129,237 @@ public partial interface IProtocol { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ) + ) { + ExportPropertyData = new ("name") + } ] } ]; - const string multiPropertyInterfaceMissingExport = @" + const string singlePropertySmartEnumInterface = @" using ObjCBindings; namespace NS; [BindingType] +public enum MyEnum { + First, +} + +[BindingType] +public partial interface IProtocol { + [Export (""name"")] + public partial MyEnum Name { get; set; } +} +"; + + yield return [ + singlePropertySmartEnumInterface, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () + ) { + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + Properties = [ + new ( + name: "Name", + returnType: ReturnTypeForEnum ("NS.MyEnum", isSmartEnum: true), + symbolAvailability: new (), + attributes: [ + new ("ObjCBindings.ExportAttribute", ["name"]) + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ] + ) { + ExportPropertyData = new ("name") + } + ] + } + ]; + + const string singlePropertyEnumInterface = @" +using ObjCBindings; + +namespace NS; + +public enum MyEnum { + First, +} + +[BindingType] +public partial interface IProtocol { + [Export (""name"")] + public partial MyEnum Name { get; set; } +} +"; + + yield return [ + singlePropertyEnumInterface, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () + ) { + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + Properties = [ + new ( + name: "Name", + returnType: ReturnTypeForEnum ("NS.MyEnum"), + symbolAvailability: new (), + attributes: [ + new ("ObjCBindings.ExportAttribute", ["name"]) + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ] + ) { + ExportPropertyData = new ("name") + } + ] + } + ]; + + const string notificationPropertyInterface = @" +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial interface IProtocol { + [Field (""name"", Property.Notification)] + public partial string Name { get; set; } = string.Empty; +} +"; + + yield return [ + notificationPropertyInterface, + new CodeChanges ( + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () + ) { + Attributes = [ + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) + ], + Properties = [ + new ( + name: "Name", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [ + new ("ObjCBindings.FieldAttribute", ["name", "ObjCBindings.Property.Notification"]) + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ] + ) { + ExportFieldData = new ( + fieldData: new ("name", Property.Notification), + libraryName: "NS"), + } + ] + } + ]; + + const string multiPropertyInterfaceMissingExport = @" +using ObjCBindings; + +namespace NS; + +[BindingType] public partial interface IProtocol { [Export (""name"")] public partial string Name { get; set; } = string.Empty; @@ -98,16 +371,25 @@ public partial interface IProtocol { yield return [ multiPropertyInterfaceMissingExport, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Properties = [ new ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["name"]) ], @@ -116,10 +398,24 @@ public partial interface IProtocol { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ) + ) { + ExportPropertyData = new ("name") + } ] } ]; @@ -129,7 +425,7 @@ public partial interface IProtocol { namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { [Export (""name"")] public partial string Name { get; set; } = string.Empty; @@ -142,16 +438,25 @@ public partial interface IProtocol { yield return [ multiPropertyInterface, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Properties = [ new ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["name"]) ], @@ -160,13 +465,28 @@ public partial interface IProtocol { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ), + ) { + ExportPropertyData = new ("name") + }, new ( name: "Surname", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [ new ("ObjCBindings.ExportAttribute", ["surname"]) ], @@ -175,10 +495,24 @@ public partial interface IProtocol { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ] - ), + ) { + ExportPropertyData = new ("surname") + }, ] } ]; @@ -188,27 +522,37 @@ public partial interface IProtocol { namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { [Export (""withName:"")] - public partial void SetName (string inName); + public partial void SetName (string name); } "; yield return [ singleMethodInterface, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Methods = [ new ( type: "NS.IProtocol", name: "SetName", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withName:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withName:"]) ], @@ -217,7 +561,7 @@ public partial interface IProtocol { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inName") + new (position: 0, type: "string", name: "name", isBlittable: false), ] ), ] @@ -229,10 +573,10 @@ public partial interface IProtocol { namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { [Export (""withName:"")] - public partial void SetName (string inName); + public partial void SetName (string name); public void SetSurname (string inSurname) {} } @@ -241,17 +585,27 @@ public void SetSurname (string inSurname) {} yield return [ multiMethodInterfaceMissingExport, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Methods = [ new ( type: "NS.IProtocol", name: "SetName", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withName:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withName:"]) ], @@ -260,7 +614,7 @@ public void SetSurname (string inSurname) {} SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inName") + new (position: 0, type: "string", name: "name", isBlittable: false), ] ), ] @@ -273,10 +627,10 @@ public void SetSurname (string inSurname) {} namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { [Export (""withName:"")] - public partial void SetName (string inName); + public partial void SetName (string name); [Export (""withSurname:"")] public partial void SetSurname (string inSurname); @@ -285,17 +639,27 @@ public partial interface IProtocol { yield return [ multiMethodInterface, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Methods = [ new ( type: "NS.IProtocol", name: "SetName", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withName:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withName:"]) ], @@ -304,13 +668,15 @@ public partial interface IProtocol { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inName") + new (position: 0, type: "string", name: "name", isBlittable: false), ] ), new ( type: "NS.IProtocol", name: "SetSurname", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("withSurname:"), attributes: [ new ("ObjCBindings.ExportAttribute", ["withSurname:"]) ], @@ -319,7 +685,7 @@ public partial interface IProtocol { SyntaxFactory.Token (SyntaxKind.PartialKeyword), ], parameters: [ - new (0, "string", "inSurname") + new (position: 0, type: "string", name: "inSurname", isBlittable: false), ] ), ] @@ -332,7 +698,7 @@ public partial interface IProtocol { namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { public event EventHandler Changed { add; remove; } @@ -342,23 +708,44 @@ public partial interface IProtocol { yield return [ singleEventInterface, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "System", "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Events = [ new ( name: "Changed", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []) + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]) ], } @@ -370,7 +757,7 @@ public partial interface IProtocol { namespace NS; -[BindingType] +[BindingType] public partial interface IProtocol { public event EventHandler Changed { add; remove; } @@ -382,35 +769,69 @@ public partial interface IProtocol { yield return [ multiEventInterface, new CodeChanges ( - bindingType: BindingType.Protocol, - fullyQualifiedSymbol: "NS.IProtocol" + bindingInfo: new (new BindingTypeData ()), + name: "IProtocol", + @namespace: ["NS"], + fullyQualifiedSymbol: "NS.IProtocol", + symbolAvailability: new () ) { Attributes = [ - new ("ObjCBindings.BindingTypeAttribute") + new ("ObjCBindings.BindingTypeAttribute") + ], + UsingDirectives = new HashSet { "System", "ObjCBindings" }, + Modifiers = [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (SyntaxKind.PartialKeyword) ], Events = [ new ( name: "Changed", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []) + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ] ), new ( name: "Removed", type: "System.EventHandler", + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Add, [], []), - new (AccessorKind.Remove, [], []) + new ( + accessorKind: AccessorKind.Add, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Remove, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ] ), ], @@ -426,7 +847,7 @@ public partial interface IProtocol { void CodeChangesFromInterfaceDeclaration (ApplePlatform platform, string inputText, CodeChanges expected) { var (compilation, sourceTrees) = - CreateCompilation (nameof (CodeChangesFromInterfaceDeclaration), platform, inputText); + CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); // get the declarations we want to work with and the semantic model var node = sourceTrees [0].GetRoot () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodComparerTests.cs index e374d9e702ce..dd757315d893 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using Microsoft.CodeAnalysis.CSharp; using Microsoft.Macios.Generator.DataModel; @@ -14,7 +16,9 @@ public void CompareDiffType () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -23,7 +27,9 @@ public void CompareDiffType () var y = new Method ( type: "MyOtherType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -38,7 +44,9 @@ public void CompareDiffName () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -47,7 +55,9 @@ public void CompareDiffName () var y = new Method ( type: "MyType", name: "MyOtherMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -61,7 +71,9 @@ public void CompareDiffReturnType () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -70,12 +82,22 @@ public void CompareDiffReturnType () var y = new Method ( type: "MyType", name: "MyMethod", - returnType: "int", + returnType: new ( + name: "int", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: true, + isReferenceType: false + ), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] ); - Assert.Equal (String.Compare (x.ReturnType, y.ReturnType, StringComparison.Ordinal), comparer.Compare (x, y)); + var returnTypeComparer = new TypeInfoComparer (); + Assert.Equal (returnTypeComparer.Compare (x.ReturnType, y.ReturnType), comparer.Compare (x, y)); } [Fact] @@ -84,7 +106,9 @@ public void CompareModifierDiffLength () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -96,7 +120,9 @@ public void CompareModifierDiffLength () var y = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -112,7 +138,9 @@ public void CompareDiffModifier () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PartialKeyword), @@ -123,7 +151,9 @@ public void CompareDiffModifier () var y = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -141,7 +171,9 @@ public void CompareAttrsDiffLength () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("FirstAttr"), new ("SecondAttr", ["first"]), @@ -155,7 +187,9 @@ public void CompareAttrsDiffLength () var y = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("FirstAttr"), ], @@ -173,7 +207,9 @@ public void CompareDiffAttrs () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("FirstAttr"), ], @@ -186,7 +222,9 @@ public void CompareDiffAttrs () var y = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("SecondAttr", ["first"]), ], @@ -205,7 +243,9 @@ public void CompareParameterDiffLength () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("FirstAttr"), ], @@ -213,14 +253,16 @@ public void CompareParameterDiffLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ] ); var y = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("FirstAttr"), ], @@ -228,8 +270,8 @@ public void CompareParameterDiffLength () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname"), + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ); Assert.Equal (x.Parameters.Length.CompareTo (y.Parameters.Length), comparer.Compare (x, y)); @@ -241,7 +283,9 @@ public void CompareDiffParameters () var x = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("FirstAttr"), ], @@ -249,14 +293,16 @@ public void CompareDiffParameters () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ] ); var y = new Method ( type: "MyType", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ new ("FirstAttr"), ], @@ -264,7 +310,51 @@ public void CompareDiffParameters () SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (1, "string", "surname"), + new (position: 1, type: "string", name: "surname", isBlittable: false), + ] + ); + var parameterCompare = new ParameterComparer (); + Assert.Equal (parameterCompare.Compare (x.Parameters [0], y.Parameters [0]), comparer.Compare (x, y)); + } + + [Fact] + public void CompareDiffParametersSmartEnum () + { + var x = new Method ( + type: "MyType", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [ + new ("FirstAttr"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "MyEnum", name: "name", isBlittable: false) { + IsSmartEnum = true + }, + ] + ); + + var y = new Method ( + type: "MyType", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [ + new ("FirstAttr"), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "MyEnum", name: "name", isBlittable: false) { + IsSmartEnum = false + }, ] ); var parameterCompare = new ParameterComparer (); diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodEqualityComparerTests.cs index db53496a1391..b8c530b4c7ac 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodEqualityComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.Macios.Generator.DataModel; using Xunit; @@ -18,7 +20,9 @@ public void CompareSingleElementDifferentMethodName () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -28,7 +32,39 @@ public void CompareSingleElementDifferentMethodName () new ( type: "MyTypeName", name: "Test", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [], + parameters: [] + ) + ]; + Assert.False (equalityComparer.Equals (x, y)); + } + + [Fact] + public void CompareSingleElementDifferentExportData () + { + ImmutableArray x = [ + new ( + type: "MyTypeName", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new ("myMethod"), + attributes: [], + modifiers: [], + parameters: [] + ) + ]; + ImmutableArray y = [ + new ( + type: "MyTypeName", + name: "MyMethod", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new ("objcMethod"), attributes: [], modifiers: [], parameters: [] @@ -44,7 +80,9 @@ public void CompareSingleElementDifferentReturnType () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -54,7 +92,9 @@ public void CompareSingleElementDifferentReturnType () new ( type: "MyTypeName", name: "MyMethod", - returnType: "int", + returnType: new ("int"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [] @@ -70,12 +110,14 @@ public void CompareSingleElementDifferentParameterCount () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname") + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ) ]; @@ -83,11 +125,13 @@ public void CompareSingleElementDifferentParameterCount () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), + new (position: 0, type: "string", name: "name", isBlittable: false), ] ) ]; @@ -101,12 +145,14 @@ public void CompareSingleElementDifferentParameterType () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname") + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ) ]; @@ -114,12 +160,14 @@ public void CompareSingleElementDifferentParameterType () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -133,23 +181,27 @@ public void CompareDifferentMethodCount () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname") + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ), new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -157,12 +209,14 @@ public void CompareDifferentMethodCount () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -176,12 +230,14 @@ public void CompareSameMethodNamesDiffReturnTypes () new ( type: "MyTypeName", name: "MyMethod", - returnType: "string", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -189,12 +245,14 @@ public void CompareSameMethodNamesDiffReturnTypes () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("string"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -208,23 +266,27 @@ public void CompareSameMethods () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname") + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ), new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -232,23 +294,27 @@ public void CompareSameMethods () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname") + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ), new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -263,23 +329,27 @@ public void CompareSameMethodsDifferentOrder () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname") + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ), new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ) ]; @@ -287,23 +357,27 @@ public void CompareSameMethodsDifferentOrder () new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "int", "name"), - new (1, "int", "surname") + new (position: 0, type: "int", name: "name", isBlittable: false), + new (position: 1, type: "int", name: "surname", isBlittable: false), ] ), new ( type: "MyTypeName", name: "MyMethod", - returnType: "void", + returnType: new ("void"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [], parameters: [ - new (0, "string", "name"), - new (1, "string", "surname") + new (position: 0, type: "string", name: "name", isBlittable: false), + new (position: 1, type: "string", name: "surname", isBlittable: false), ] ), ]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodTests.cs index 673f11e17d86..444bba85bc98 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/MethodTests.cs @@ -1,12 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections; using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; using Xamarin.Tests; using Xamarin.Utils; using Xunit; +using static Microsoft.Macios.Generator.Tests.TestDataFactory; namespace Microsoft.Macios.Generator.Tests.DataModel; @@ -29,7 +34,9 @@ public void MyMethod () {} new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -38,6 +45,36 @@ public void MyMethod () {} ) ]; + const string voidMethodNoParamsExportData = @" +using System; +using ObjCBindings; + +namespace NS { + public class MyClass { + [Export(""myMethod"")] + public void MyMethod () {} + } +} +"; + + yield return [ + voidMethodNoParamsExportData, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new ("myMethod"), + attributes: [ + new ("ObjCBindings.ExportAttribute", ["myMethod"]), + ], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + const string stringMethodNoParams = @" using System; @@ -53,7 +90,9 @@ public class MyClass { new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -80,7 +119,9 @@ public class MyClass { new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "NS.CustomType", + returnType: ReturnTypeForClass ("NS.CustomType"), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), @@ -104,13 +145,168 @@ public class MyClass { new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string", name: "input", isBlittable: false), + ] + ) + ]; + + const string singleArrayParameterMethod = @" +using System; + +namespace NS { + public class MyClass { + public string MyMethod (string[] input) => $""{input}_test""; + } +} +"; + + yield return [ + singleArrayParameterMethod, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string", name: "input", isBlittable: false) { + IsArray = true + } + ] + ) + ]; + + const string nullableSingleArrayParameterMethod = @" +using System; + +namespace NS { + public class MyClass { + public string MyMethod (string[]? input) => $""{input}_test""; + } +} +"; + + yield return [ + nullableSingleArrayParameterMethod, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "input") + new (position: 0, type: "string", name: "input", isBlittable: false) { + IsArray = true, + IsNullable = true, + } + ] + ) + ]; + + const string singleArrayNullableParameterMethod = @" +using System; + +namespace NS { + public class MyClass { + public string MyMethod (string?[] input) => $""{input}_test""; + } +} +"; + + yield return [ + singleArrayNullableParameterMethod, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string?", name: "input", isBlittable: false) { + IsArray = true, + IsNullable = false, + } + ] + ) + ]; + + const string nullableSingleArrayNullableParameterMethod = @" +using System; + +namespace NS { + public class MyClass { + public string MyMethod (string?[]? input) => $""{input}_test""; + } +} +"; + + yield return [ + nullableSingleArrayNullableParameterMethod, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string?", name: "input", isBlittable: false) { + IsArray = true, + IsNullable = true, + } + ] + ) + ]; + + const string twoDimensionArrayParameterMethod = @" +using System; + +namespace NS { + public class MyClass { + public string MyMethod (string[][] input) => $""{input}_test""; + } +} +"; + + yield return [ + twoDimensionArrayParameterMethod, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [ + new (position: 0, type: "string[]", name: "input", isBlittable: false) { + IsArray = true + } ] ) ]; @@ -133,13 +329,15 @@ public void MyMethod (CustomType input) {} new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "NS.CustomType", "input") + new (position: 0, type: "NS.CustomType", name: "input", isBlittable: false), ] ) ]; @@ -160,14 +358,16 @@ public class MyClass { new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "input"), - new (1, "string?", "second") { + new (position: 0, type: "string", name: "input", isBlittable: false), + new (position: 1, type: "string", name: "second", isBlittable: false) { IsNullable = true, } ] @@ -191,13 +391,15 @@ public bool TryGetString (out string? example) { new Method ( type: "NS.MyClass", name: "TryGetString", - returnType: "bool", + returnType: ReturnTypeForBool (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "example") { + new (position: 0, type: "string", name: "example", isBlittable: false) { IsNullable = true, ReferenceKind = ReferenceKind.Out, }, @@ -228,13 +430,15 @@ public void MyMethod (in MyStruct data) { new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "NS.MyStruct", "data") { + new (position: 0, type: "NS.MyStruct", name: "data", isBlittable: false) { ReferenceKind = ReferenceKind.In, }, ] @@ -263,13 +467,15 @@ public void MyMethod (ref MyStruct data) { new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "void", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "NS.MyStruct", "data") { + new (position: 0, type: "NS.MyStruct", name: "data", isBlittable: false) { ReferenceKind = ReferenceKind.Ref, }, ] @@ -287,13 +493,17 @@ public class MyClass { } } "; + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios")); yield return [ methodWithAttribute, new Method ( type: "NS.MyClass", name: "MyMethod", - returnType: "string", + returnType: ReturnTypeForString (), + symbolAvailability: builder.ToImmutable (), + exportMethodData: new (), attributes: [ new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), ], @@ -301,8 +511,8 @@ public class MyClass { SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string", "input"), - new (1, "string?", "second") { + new (position: 0, type: "string", name: "input", isBlittable: false), + new (position: 1, type: "string", name: "second", isBlittable: false) { IsNullable = true, } ] @@ -328,24 +538,25 @@ public bool TryGetString ([NotNullWhen (true)] out string? example) { new Method ( type: "NS.MyClass", name: "TryGetString", - returnType: "bool", + returnType: ReturnTypeForBool (), + symbolAvailability: new (), + exportMethodData: new (), attributes: [ ], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], parameters: [ - new (0, "string?", "example") { + new (position: 0, type: "string", name: "example", isBlittable: false) { IsNullable = true, ReferenceKind = ReferenceKind.Out, Attributes = [ - new ("System.Diagnostics.CodeAnalysis.NotNullWhenAttribute", ["true"]) + new (name: "System.Diagnostics.CodeAnalysis.NotNullWhenAttribute", arguments: ["true"]) ], }, ] ) ]; - } IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); @@ -355,8 +566,7 @@ public bool TryGetString ([NotNullWhen (true)] out string? example) { [AllSupportedPlatformsClassData] void FromMethodDeclaration (ApplePlatform platform, string inputText, Method expected) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (FromMethodDeclaration), - platform, inputText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (syntaxTrees); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var declaration = syntaxTrees [0].GetRoot () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ModifiersEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ModifiersEqualityComparerTests.cs index 3e9255ee5679..38883184376d 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ModifiersEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ModifiersEqualityComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertiesEqualityComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertiesEqualityComparerTests.cs index cdef27ba7648..ecc3fe1a84df 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertiesEqualityComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertiesEqualityComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Immutable; using Microsoft.CodeAnalysis.CSharp; using Microsoft.Macios.Generator.DataModel; @@ -23,35 +25,56 @@ public void CompareDifferentSize () ImmutableArray x = [ new ( name: "FirstProperty", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), new ( name: "SecondProperty", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; ImmutableArray y = [ new ( name: "FirstProperty", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; @@ -64,25 +87,39 @@ public void CompareSameSizeDiffProperties () ImmutableArray x = [ new ( name: "FirstProperty", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; ImmutableArray y = [ new ( name: "FirstProperty", - type: "AVFoundation.AVVideo", + returnType: new ("AVFoundation.AVVideo"), + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; @@ -95,28 +132,87 @@ public void CompareSameSizeSameProperties () ImmutableArray x = [ new ( name: "FirstProperty", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; ImmutableArray y = [ new ( name: "FirstProperty", - type: "string", + returnType: new ("string"), + symbolAvailability: new (), attributes: [], modifiers: [ SyntaxFactory.Token (SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) ]), ]; Assert.True (equalityComparer.Equals (x, y)); } + + [Fact] + public void CompareDiffSmartEnum () + { + ImmutableArray x = [ + new ( + name: "FirstProperty", + returnType: new ("string"), + symbolAvailability: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) + ]), + ]; + ImmutableArray y = [ + new ( + name: "FirstProperty", + returnType: new ("string", isSmartEnum: true), + symbolAvailability: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) + ]), + ]; + + Assert.False (equalityComparer.Equals (x, y)); + } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertyTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertyTests.cs index a387963dada5..1b89cc212c3b 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertyTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/PropertyTests.cs @@ -1,21 +1,60 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 using System.Collections; using System.Collections.Generic; using System.Linq; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.DataModel; using Xamarin.Tests; using Xamarin.Utils; using Xunit; +using Property = Microsoft.Macios.Generator.DataModel.Property; +using static Microsoft.Macios.Generator.Tests.TestDataFactory; namespace Microsoft.Macios.Generator.Tests.DataModel; public class PropertyTests : BaseGeneratorTestClass { + + [Theory] + [InlineData ("Name")] + [InlineData ("Surname")] + [InlineData ("Date")] + public void BackingFieldTests (string propertyName) + { + var property = new Property ( + name: propertyName, + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + Assert.Equal ($"_{propertyName}", property.BackingField); + } + [Fact] public void CompareDiffName () { - var x = new Property ("First", "string", [], [], []); - var y = new Property ("Second", "string", [], [], []); + var x = new Property ( + name: "First", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + var y = new Property ( + name: "Second", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); Assert.False (x.Equals (y)); Assert.False (y.Equals (x)); @@ -26,8 +65,142 @@ public void CompareDiffName () [Fact] public void CompareDiffType () { - var x = new Property ("First", "string", [], [], []); - var y = new Property ("First", "int", [], [], []); + var x = new Property ( + name: "First", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + var y = new Property ( + name: "First", + returnType: ReturnTypeForInt (), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void CompareDiffIsReferenceType () + { + var x = new Property ( + name: "First", + returnType: new ( + name: "string", + isBlittable: false, + isSmartEnum: false, + isNullable: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + var y = new Property ( + name: "First", + returnType: new ( + name: "string", + isBlittable: false, + isSmartEnum: false, + isNullable: false, + isArray: false, + isReferenceType: true + ), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + + Assert.False (condition: x.Equals (other: y)); + Assert.False (condition: y.Equals (other: x)); + Assert.False (condition: x == y); + Assert.True (condition: x != y); + } + + [Fact] + public void CompareDiffIsBlittableType () + { + var x = new Property ( + name: "First", + returnType: new ( + name: "string", + isBlittable: true, + isSmartEnum: false, + isNullable: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + var y = new Property ( + name: "First", + returnType: new ( + name: "string", + isBlittable: false, + isSmartEnum: false, + isNullable: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void CompareDiffIsSmartEnum () + { + var x = new Property ( + name: "First", + returnType: new ( + name: "string", + isBlittable: false, + isSmartEnum: true, + isNullable: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); + var y = new Property ( + name: "First", + returnType: new ( + name: "string", + isBlittable: false, + isSmartEnum: false, + isNullable: false, + isArray: false, + isReferenceType: false + ), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ); Assert.False (x.Equals (y)); Assert.False (y.Equals (x)); @@ -38,11 +211,11 @@ public void CompareDiffType () [Fact] public void CompareDiffAttrs () { - var x = new Property ("First", "string", [ + var x = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr1"), new ("Attr2"), ], [], []); - var y = new Property ("First", "int", [ + var y = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr2"), ], [], []); @@ -55,13 +228,13 @@ public void CompareDiffAttrs () [Fact] public void CompareDiffModifiers () { - var x = new Property ("First", "string", [ + var x = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr1"), new ("Attr2"), ], [ SyntaxFactory.Token (SyntaxKind.AbstractKeyword) ], []); - var y = new Property ("First", "int", [ + var y = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr1"), new ("Attr2"), ], [ @@ -77,22 +250,78 @@ public void CompareDiffModifiers () [Fact] public void CompareDiffAccessors () { - var x = new Property ("First", "string", [ + var x = new Property ("First", ReturnTypeForString (), new (), [ + new ("Attr1"), + new ("Attr2"), + ], [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword) + ], [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]); + var y = new Property ("First", ReturnTypeForString (), new (), [ + new ("Attr1"), + new ("Attr2"), + ], [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword) + ], [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + ]); + + Assert.False (x.Equals (y)); + Assert.False (y.Equals (x)); + Assert.False (x == y); + Assert.True (x != y); + } + + [Fact] + public void CompareDiffAccessorsExportData () + { + var x = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr1"), new ("Attr2"), ], [ SyntaxFactory.Token (SyntaxKind.PublicKeyword) ], [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: new ("name"), + attributes: [], + modifiers: [] + ), ]); - var y = new Property ("First", "int", [ + var y = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr1"), new ("Attr2"), ], [ SyntaxFactory.Token (SyntaxKind.PublicKeyword) ], [ - new (AccessorKind.Getter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: new ("surname"), + attributes: [], + modifiers: [] + ), ]); Assert.False (x.Equals (y)); @@ -104,23 +333,47 @@ public void CompareDiffAccessors () [Fact] public void CompareEquals () { - var x = new Property ("First", "string", [ + var x = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr1"), new ("Attr2"), ], [ SyntaxFactory.Token (SyntaxKind.PublicKeyword) ], [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]); - var y = new Property ("First", "string", [ + var y = new Property ("First", ReturnTypeForString (), new (), [ new ("Attr1"), new ("Attr2"), ], [ SyntaxFactory.Token (SyntaxKind.PublicKeyword) ], [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]); Assert.True (x.Equals (y)); @@ -129,16 +382,39 @@ public void CompareEquals () Assert.False (x != y); } + [Theory] + [InlineData (ObjCBindings.Property.Default, false)] + [InlineData (ObjCBindings.Property.Notification, true)] +#pragma warning disable xUnit1025 + [InlineData (ObjCBindings.Property.Notification | ObjCBindings.Property.Default, true)] +#pragma warning restore xUnit1025 + public void IsNotification (ObjCBindings.Property flag, bool expectedResult) + { + var property = new Property ( + name: "Test", + returnType: new TypeInfo ("string"), + symbolAvailability: new (), + attributes: [], + modifiers: [], + accessors: [] + ) { + ExportFieldData = new (new FieldData ("name", flag), ""), + }; + Assert.Equal (expectedResult, property.IsNotification); + } + class TestDataFromPropertyDeclaration : IEnumerable { public IEnumerator GetEnumerator () { const string automaticGetter = @" using System; +using ObjCBindings; namespace Test; public class TestClass { + [Export(""name"")] public string Name { get; } } "; @@ -146,23 +422,118 @@ public class TestClass { automaticGetter, new Property ( name: "Name", - type: "string", - attributes: [], + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["name"]), + ], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []) - ]) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) + ] + ) { + ExportPropertyData = new (selector: "name"), + } + ]; + + const string valueTypeProperty = @" +using System; +using ObjCBindings; + +namespace Test; + +public class TestClass { + + [Export(""name"")] + public int Name { get; } +} +"; + yield return [ + valueTypeProperty, + new Property ( + name: "Name", + returnType: ReturnTypeForInt (), + symbolAvailability: new (), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["name"]), + ], + modifiers: [ + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) + ] + ) { + ExportPropertyData = new (selector: "name"), + }, + ]; + + const string automaticGetterExportData = @" +using System; +using ObjCBindings; + +namespace Test; + +public class TestClass { + + [Export(""name"")] + public string Name { + [Export(""myName"")] + get; + } +} +"; + yield return [ + automaticGetterExportData, + new Property ( + name: "Name", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["name"]), + ], + modifiers: [ + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: new (selector: "myName"), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["myName"]), + ], + modifiers: [] + ) + ] + ) { + ExportPropertyData = new (selector: "name"), + }, ]; const string automaticGetterSetter = @" using System; +using ObjCBindings; namespace Test; public class TestClass { + [Export(""name"")] internal string Name { get; set; } } "; @@ -171,15 +542,86 @@ public class TestClass { automaticGetterSetter, new Property ( name: "Name", - type: "string", - attributes: [], + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["name"]), + ], modifiers: [ - SyntaxFactory.Token (SyntaxKind.InternalKeyword), + SyntaxFactory.Token (kind: SyntaxKind.InternalKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []) - ]) + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ) + ]) { + ExportPropertyData = new (selector: "name"), + }, + ]; + + const string automaticGetterSetterExportData = @" +using System; +using ObjCBindings; + +namespace Test; + +public class TestClass { + + [Export(""name"")] + internal string Name { + [Export(""myName"")] + get; + [Export(""setMyName"")] + set; + } +} +"; + + yield return [ + automaticGetterSetterExportData, + new Property ( + name: "Name", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["name"]), + ], + modifiers: [ + SyntaxFactory.Token (kind: SyntaxKind.InternalKeyword), + ], + accessors: [ + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: new (selector: "myName"), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["myName"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: new (selector: "setMyName"), + attributes: [ + new (name: "ObjCBindings.ExportAttribute", arguments: ["setMyName"]), + ], + modifiers: [] + ) + ]) { + ExportPropertyData = new (selector: "name"), + }, ]; const string manualGetter = @" @@ -195,13 +637,20 @@ public class TestClass { manualGetter, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]) ]; @@ -218,13 +667,20 @@ public class TestClass { expressionGetter, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]) ]; @@ -243,14 +699,27 @@ public string Name { expressionGetterSetter, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]) ]; @@ -270,17 +739,29 @@ public string Name { manualGetterSetter, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]) ]; - const string internalSetter = @" namespace Test; @@ -297,21 +778,36 @@ public string Name { internalSetter, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: new (), attributes: [], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], [ - SyntaxFactory.Token (SyntaxKind.InternalKeyword), - ]), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [ + SyntaxFactory.Token (kind: SyntaxKind.InternalKeyword), + ] + ), ]) ]; const string propertyWithAttribute = @" using System.Runtime.Versioning; +using ObjCBindings; + namespace Test; public class TestClass { @@ -325,25 +821,43 @@ public string Name { } "; + var propertyAvailabilityBuilder = SymbolAvailability.CreateBuilder (); + propertyAvailabilityBuilder.Add (supportedPlatform: new SupportedOSPlatformData (platformName: "ios")); + yield return [ propertyWithAttribute, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: propertyAvailabilityBuilder.ToImmutable (), attributes: [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios"]), ], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]) ]; const string propertyGetterWithAttribute = @" using System.Runtime.Versioning; +using ObjCBindings; + namespace Test; public class TestClass { @@ -358,27 +872,45 @@ public string Name { } "; + var getterAvailabilityBuilder = SymbolAvailability.CreateBuilder (); + var setterAvailabilityBuilder = SymbolAvailability.CreateBuilder (); + getterAvailabilityBuilder.Add (supportedPlatform: new SupportedOSPlatformData (platformName: "ios17.0")); yield return [ propertyGetterWithAttribute, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: propertyAvailabilityBuilder.ToImmutable (), attributes: [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios"]), ], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: getterAvailabilityBuilder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: new (), + exportPropertyData: null, + attributes: [], + modifiers: [] + ), ]) ]; const string propertyWithGetterAndSetterWithAttribute = @" using System.Runtime.Versioning; +using ObjCBindings; + namespace Test; public class TestClass { @@ -394,29 +926,48 @@ public string Name { } "; + getterAvailabilityBuilder.Clear (); + setterAvailabilityBuilder.Clear (); + getterAvailabilityBuilder.Add (supportedPlatform: new SupportedOSPlatformData (platformName: "ios17.0")); + setterAvailabilityBuilder.Add (supportedPlatform: new SupportedOSPlatformData (platformName: "ios18.0")); + yield return [ propertyWithGetterAndSetterWithAttribute, new Property ( name: "Name", - type: "string", + returnType: ReturnTypeForString (), + symbolAvailability: propertyAvailabilityBuilder.ToImmutable (), attributes: [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios"]), ], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: getterAvailabilityBuilder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: setterAvailabilityBuilder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios18.0"]), + ], + modifiers: [] + ), ]) ]; const string propertyWithCustomType = @" using System.Runtime.Versioning; +using ObjCBindings; namespace Utils { public class MyClass {} @@ -436,25 +987,42 @@ public Utils.MyClass Name { } } "; + getterAvailabilityBuilder.Clear (); + setterAvailabilityBuilder.Clear (); + getterAvailabilityBuilder.Add (supportedPlatform: new SupportedOSPlatformData (platformName: "ios17.0")); + setterAvailabilityBuilder.Add (supportedPlatform: new SupportedOSPlatformData (platformName: "ios18.0")); yield return [ propertyWithCustomType, new Property ( name: "Name", - type: "Utils.MyClass", + returnType: ReturnTypeForClass ("Utils.MyClass"), + symbolAvailability: propertyAvailabilityBuilder.ToImmutable (), attributes: [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios"]), + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios"]), ], modifiers: [ - SyntaxFactory.Token (SyntaxKind.PublicKeyword), + SyntaxFactory.Token (kind: SyntaxKind.PublicKeyword), ], accessors: [ - new (AccessorKind.Getter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios17.0"]), - ], []), - new (AccessorKind.Setter, [ - new ("System.Runtime.Versioning.SupportedOSPlatformAttribute", ["ios18.0"]), - ], []), + new ( + accessorKind: AccessorKind.Getter, + symbolAvailability: getterAvailabilityBuilder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios17.0"]), + ], + modifiers: [] + ), + new ( + accessorKind: AccessorKind.Setter, + symbolAvailability: setterAvailabilityBuilder.ToImmutable (), + exportPropertyData: null, + attributes: [ + new (name: "System.Runtime.Versioning.SupportedOSPlatformAttribute", arguments: ["ios18.0"]), + ], + modifiers: [] + ), ]) ]; } @@ -467,8 +1035,7 @@ IEnumerator IEnumerable.GetEnumerator () [AllSupportedPlatformsClassData] void FromPropertyDeclaration (ApplePlatform platform, string inputText, Property expected) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (FromPropertyDeclaration), - platform, inputText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (syntaxTrees); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var declaration = syntaxTrees [0].GetRoot () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ReferenceKindTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ReferenceKindTests.cs new file mode 100644 index 000000000000..79da18c28918 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ReferenceKindTests.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.Macios.Generator.DataModel; +using Xunit; + +using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; + +namespace Microsoft.Macios.Generator.Tests.DataModel; + +public class ReferenceKindTests { + + [Theory] + [InlineData (RefKind.Ref, ReferenceKind.Ref)] + [InlineData (RefKind.Out, ReferenceKind.Out)] + [InlineData (RefKind.In, ReferenceKind.In)] + [InlineData (RefKind.RefReadOnlyParameter, ReferenceKind.RefReadOnlyParameter)] + [InlineData ((RefKind) 100, ReferenceKind.None)] + void ToReferenceKind (RefKind refKind, ReferenceKind expected) + => Assert.Equal (expected, refKind.ToReferenceKind ()); + + + class TestDataToTokens : IEnumerable { + public IEnumerator GetEnumerator () + { + yield return [ReferenceKind.Ref, new SyntaxTokenList (Token (SyntaxKind.RefKeyword))]; + yield return [ReferenceKind.Out, new SyntaxTokenList (Token (SyntaxKind.OutKeyword))]; + yield return [ReferenceKind.In, new SyntaxTokenList (Token (SyntaxKind.InKeyword))]; + yield return [ + ReferenceKind.RefReadOnlyParameter, + new SyntaxTokenList (Token (SyntaxKind.RefKeyword), Token (SyntaxKind.ReadOnlyKeyword)) + ]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [ClassData (typeof (TestDataToTokens))] + void ToTokens (ReferenceKind referenceKind, SyntaxTokenList expected) + { + var comparer = new CollectionComparer (); + Assert.Equal (expected, referenceKind.ToTokens (), comparer); + } + +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/TypeInfoComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/TypeInfoComparerTests.cs new file mode 100644 index 000000000000..572008f199ff --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/TypeInfoComparerTests.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using Microsoft.Macios.Generator.DataModel; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.DataModel; + +public class TypeInfoComparerTests { + + TypeInfoComparer compare = new (); + + [Fact] + public void CompareDiffReturnType () + { + var x = new TypeInfo ("string"); + var y = new TypeInfo ("int"); + Assert.Equal (String.Compare (x.Name, y.Name, StringComparison.Ordinal), compare.Compare (x, y)); + } + + [Fact] + public void CompareDiffNullable () + { + var x = new TypeInfo ( + name: "void", + isNullable: true, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ); + + var y = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ); + Assert.Equal (x.IsNullable.CompareTo (y.IsNullable), compare.Compare (x, y)); + } + + [Fact] + public void CompareDiffBlittable () + { + var x = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: true, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ); + + var y = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ); + Assert.Equal (x.IsBlittable.CompareTo (y.IsBlittable), compare.Compare (x, y)); + } + + [Fact] + public void CompareDiffSmartEnum () + { + var x = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: true, + isArray: false, + isReferenceType: false + ); + + var y = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ); + Assert.Equal (x.IsSmartEnum.CompareTo (y.IsSmartEnum), compare.Compare (x, y)); + } + + [Fact] + public void CompareDiffIsArray () + { + var x = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: true, + isReferenceType: false + ); + + var y = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ); + Assert.Equal (x.IsArray.CompareTo (y.IsArray), compare.Compare (x, y)); + } + + [Fact] + public void CompareDiffIsReference () + { + var x = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: true + ); + + var y = new TypeInfo ( + name: "void", + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: false + ); + Assert.Equal (x.IsReferenceType.CompareTo (y.IsReferenceType), compare.Compare (x, y)); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/TypeInfoTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/TypeInfoTests.cs new file mode 100644 index 000000000000..cf7d16b940b0 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/TypeInfoTests.cs @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +using static Microsoft.Macios.Generator.Tests.TestDataFactory; +namespace Microsoft.Macios.Generator.Tests.DataModel; + +public class TypeInfoTests : BaseGeneratorTestClass { + + class TestDataFromMethodDeclaration : IEnumerable { + public IEnumerator GetEnumerator () + { + const string voidMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public void MyMethod () {} + } +} +"; + + yield return [ + voidMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForVoid (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string intMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public int MyMethod () {} + } +} +"; + yield return [ + intMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForInt (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string nullableIntMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public int? MyMethod () {} + } +} +"; + yield return [ + nullableIntMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForInt (isNullable: true), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string intArrayMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public int[] MyMethod () {} + } +} +"; + yield return [ + intArrayMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForArray ("int", isBlittable: true), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string nullableIntArrayMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public int[]? MyMethod () {} + } +} +"; + yield return [ + nullableIntArrayMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForArray ("int", isNullable: true), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string intNullArrayMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public int?[] MyMethod () {} + } +} +"; + yield return [ + intNullArrayMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForArray ("int?", isBlittable: false), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string int2DArrayMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public int[][] MyMethod () {} + } +} +"; + yield return [ + int2DArrayMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForArray ("int[]", isBlittable: true), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string stringMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public string MyMethod () {} + } +} +"; + yield return [ + stringMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForString (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string customClassMethodNoParams = @" +using System; + +namespace NS { + public class ReturnClass {} + + public class MyClass { + public ReturnClass MyMethod () {} + } +} +"; + yield return [ + customClassMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForClass ("NS.ReturnClass"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string customStructMethodNoParams = @" +using System; + +namespace NS { + public struct ReturnClass {} + + public class MyClass { + public ReturnClass MyMethod () {} + } +} +"; + yield return [ + customStructMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForStruct ("NS.ReturnClass"), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string intPtrMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public IntPtr MyMethod () {} + } +} +"; + yield return [ + intPtrMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForIntPtr (), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + + const string nullableIntPtrMethodNoParams = @" +using System; + +namespace NS { + public class MyClass { + public IntPtr? MyMethod () {} + } +} +"; + yield return [ + nullableIntPtrMethodNoParams, + new Method ( + type: "NS.MyClass", + name: "MyMethod", + returnType: ReturnTypeForIntPtr (isNullable: true), + symbolAvailability: new (), + exportMethodData: new (), + attributes: [], + modifiers: [ + SyntaxFactory.Token (SyntaxKind.PublicKeyword), + ], + parameters: [] + ) + ]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void FromMethodDeclaration (ApplePlatform platform, string inputText, Method expected) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes ().OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + Assert.True (Method.TryCreate (declaration, semanticModel, out var changes)); + Assert.NotNull (changes); + Assert.Equal (expected, changes); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DictionaryComparerTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DictionaryComparerTests.cs index 639292978cdb..92512e5979bb 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/DictionaryComparerTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DictionaryComparerTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections.Generic; using Xunit; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/BindingSyntaxFactoryTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/BindingSyntaxFactoryTests.cs new file mode 100644 index 000000000000..8b089a280fc4 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/BindingSyntaxFactoryTests.cs @@ -0,0 +1,840 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Context; +using Microsoft.Macios.Generator.DataModel; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; +using static Microsoft.Macios.Generator.Emitters.BindingSyntaxFactory; + +namespace Microsoft.Macios.Generator.Tests.Emitters; + +public class BindingSyntaxFactoryTests : BaseGeneratorTestClass { + + class TestDataFieldConstantGetter : IEnumerable { + public IEnumerator GetEnumerator () + { + const string nsStringFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial NSString GenericGray { get; } + + } +} +"; + + yield return [nsStringFieldProperty, + "Dlfcn.GetStringConstant (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string byteFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial byte GenericGray { get; } + + } +} +"; + + yield return [byteFieldProperty, + "Dlfcn.GetByte (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherByteFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial Byte GenericGray { get; } + + } +} +"; + yield return [otherByteFieldProperty, + "Dlfcn.GetByte (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string sbyteFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial sbyte GenericGray { get; } + + } +} +"; + + yield return [sbyteFieldProperty, + "Dlfcn.GetSByte (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherSbyteFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial SByte GenericGray { get; } + + } +} +"; + + yield return [otherSbyteFieldProperty, + "Dlfcn.GetSByte (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string int16FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial short GenericGray { get; } + + } +} +"; + + yield return [int16FieldProperty, + "Dlfcn.GetInt16 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherInt16FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial Int16 GenericGray { get; } + + } +} +"; + + yield return [otherInt16FieldProperty, + "Dlfcn.GetInt16 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string uint16FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial ushort GenericGray { get; } + + } +} +"; + + yield return [uint16FieldProperty, + "Dlfcn.GetUInt16 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherUint16FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial UInt16 GenericGray { get; } + + } +} +"; + + yield return [otherUint16FieldProperty, + "Dlfcn.GetUInt16 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string int32FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial int GenericGray { get; } + + } +} +"; + + yield return [int32FieldProperty, + "Dlfcn.GetInt32 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherInt32FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial Int32 GenericGray { get; } + + } +} +"; + + yield return [otherInt32FieldProperty, + "Dlfcn.GetInt32 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string uint32FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial uint GenericGray { get; } + + } +} +"; + + yield return [uint32FieldProperty, + "Dlfcn.GetUInt32 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherUint32FieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial UInt32 GenericGray { get; } + + } +} +"; + + yield return [otherUint32FieldProperty, + "Dlfcn.GetUInt32 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string doubleFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial double GenericGray { get; } + + } +} +"; + + yield return [doubleFieldProperty, + "Dlfcn.GetDouble (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherDoubleFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial Double GenericGray { get; } + + } +} +"; + + yield return [otherDoubleFieldProperty, + "Dlfcn.GetDouble (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string floatFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial float GenericGray { get; } + + } +} +"; + + yield return [floatFieldProperty, + "Dlfcn.GetFloat (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string otherFloatFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial Single GenericGray { get; } + + } +} +"; + + yield return [otherFloatFieldProperty, + "Dlfcn.GetFloat (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string intPtrFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial IntPtr GenericGray { get; } + + } +} +"; + + yield return [intPtrFieldProperty, + "Dlfcn.GetIntPtr (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string uintPtrFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial UIntPtr GenericGray { get; } + + } +} +"; + + yield return [uintPtrFieldProperty, + "Dlfcn.GetUIntPtr (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string nintFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial nint GenericGray { get; } + + } +} +"; + + yield return [nintFieldProperty, + "Dlfcn.GetIntPtr (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string nuintFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial nuint GenericGray { get; } + + } +} +"; + + yield return [nuintFieldProperty, + "Dlfcn.GetUIntPtr (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string nfloatFieldProperty = @" +using System; +using Foundation; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial nfloat GenericGray { get; } + + } +} +"; + + yield return [nfloatFieldProperty, + "Dlfcn.GetNFloat (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string cgsizeFieldProperty = @" +using System; +using Foundation; +using CoreGraphics; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGSize GenericGray { get; } + + } +} +"; + + yield return [cgsizeFieldProperty, + "Dlfcn.GetCGSize (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string cmtagFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CMTag GenericGray { get; } + + } +} +"; + + yield return [cmtagFieldProperty, + "Dlfcn.GetStruct (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");"]; + + const string nsArrayFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial NSArray GenericGray { get; } + + } +} +"; + + yield return [nsArrayFieldProperty, + "Runtime.GetNSObject (Dlfcn.GetIndirect (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\"))!;"]; + + const string nsNumberFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial NSNumber GenericGray { get; } + + } +} +"; + + yield return [nsNumberFieldProperty, + "Runtime.GetNSObject (Dlfcn.GetIndirect (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\"))!;"]; + + const string sbyteEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : sbyte{ + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + sbyteEnumFieldProperty, + "Dlfcn.GetSByte (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string byteEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : byte{ + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + byteEnumFieldProperty, + "Dlfcn.GetByte (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string shortEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : short { + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + shortEnumFieldProperty, + "Dlfcn.GetInt16 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string ushortEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : ushort { + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + ushortEnumFieldProperty, + "Dlfcn.GetUInt16 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string intEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : int { + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + intEnumFieldProperty, + "Dlfcn.GetInt32 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string uintEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : uint { + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + uintEnumFieldProperty, + "Dlfcn.GetUInt32 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string longEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : long { + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + longEnumFieldProperty, + "Dlfcn.GetInt64 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string ulongEnumFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + public enum CGColorSpaceGenericGray : ulong { + First, + Second, + } + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CGColorSpaceGenericGray GenericGray { get; } + + } +} +"; + + yield return [ + ulongEnumFieldProperty, + "Dlfcn.GetUInt64 (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\");" + ]; + + const string cmTimeFieldProperty = @" +using System; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial CMTime GenericGray { get; } + + } +} +"; + + yield return [ + cmTimeFieldProperty, + "*((CoreMedia.CMTime*) Dlfcn.dlsym (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\"));" + ]; + + const string whiteFieldProperty = @" +using System; +using AVFoundation; +using Foundation; +using CoreMedia; +using ObjCBindings; + +namespace CoreGraphics { + + [BindingType] + public partial class CGColorSpaceNames { + + [Field (""kCGColorSpaceGenericGray"")] + public partial AVCaptureWhiteBalanceGains GenericGray { get; } + + } +} +"; + + yield return [ + whiteFieldProperty, + "*((AVFoundation.AVCaptureWhiteBalanceGains*) Dlfcn.dlsym (Libraries.CoreGraphics.Handle, \"kCGColorSpaceGenericGray\"));" + ]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void FieldConstantGetterTests (ApplePlatform platform, string inputText, string expectedCall) + { + var (compilation, sourceTrees) = + CreateCompilation (platform, sources: inputText); + Assert.Single (sourceTrees); + // get the declarations we want to work with and the semantic model + var node = sourceTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (node); + var semanticModel = compilation.GetSemanticModel (sourceTrees [0]); + var context = new RootBindingContext (semanticModel); + Assert.True (Property.TryCreate (node, context, out var property)); + var compilationUnit = FieldConstantGetter (property.Value).ToString (); + var str = compilationUnit.ToString (); + Assert.Equal (expectedCall, FieldConstantGetter (property.Value).ToString ()); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/EmitterFactoryTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/EmitterFactoryTests.cs index 369c93cd2267..63af590719e0 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/EmitterFactoryTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/EmitterFactoryTests.cs @@ -1,8 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Linq; -using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -using Microsoft.Macios.Generator.Context; using Microsoft.Macios.Generator.DataModel; using Microsoft.Macios.Generator.Emitters; using Xamarin.Tests; @@ -12,12 +12,9 @@ namespace Microsoft.Macios.Generator.Tests.Emitters; public class EmitterFactoryTests : BaseGeneratorTestClass { - TabbedStringBuilder sb = new (new ()); - - (CodeChanges Changes, RootBindingContext Context, SemanticModel SemanticModel, INamedTypeSymbol Symbol) - CreateSymbol (ApplePlatform platform, string inputText) where T : BaseTypeDeclarationSyntax + CodeChanges CreateSymbol (ApplePlatform platform, string inputText) where T : BaseTypeDeclarationSyntax { - var (compilation, syntaxTrees) = CreateCompilation (nameof (EmitterFactoryTests), platform, inputText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (syntaxTrees); var declaration = syntaxTrees [0].GetRoot () .DescendantNodes () @@ -25,13 +22,12 @@ public class EmitterFactoryTests : BaseGeneratorTestClass { .FirstOrDefault (); Assert.NotNull (declaration); - var rootContext = new RootBindingContext (compilation); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var symbol = semanticModel.GetDeclaredSymbol (declaration); Assert.NotNull (symbol); var changes = CodeChanges.FromDeclaration (declaration, semanticModel); Assert.NotNull (changes); - return (changes.Value, rootContext, semanticModel, symbol); + return changes.Value; } [Theory] @@ -47,9 +43,11 @@ public enum TestEnum { Three } "; - var (changes, rootContext, semanticModel, symbol) = CreateSymbol (platform, inputText); - Assert.True (EmitterFactory.TryCreate (changes, rootContext, semanticModel, symbol, sb, out var emitter)); + var changes = CreateSymbol (platform, inputText); + Assert.True (EmitterFactory.TryCreate (changes, out var emitter)); Assert.IsType (emitter); + Assert.True (EmitterFactory.TryCreate (changes, out var secondEmitter)); + Assert.Same (emitter, secondEmitter); } [Theory] @@ -62,9 +60,11 @@ namespace Test; public class TestClass { } "; - var (changes, rootContext, semanticModel, symbol) = CreateSymbol (platform, inputText); - Assert.True (EmitterFactory.TryCreate (changes, rootContext, semanticModel, symbol, sb, out var emitter)); + var changes = CreateSymbol (platform, inputText); + Assert.True (EmitterFactory.TryCreate (changes, out var emitter)); Assert.IsType (emitter); + Assert.True (EmitterFactory.TryCreate (changes, out var secondEmitter)); + Assert.Same (emitter, secondEmitter); } [Theory] @@ -77,8 +77,10 @@ namespace Test; public interface ITestInterface { } "; - var (changes, rootContext, semanticModel, symbol) = CreateSymbol (platform, inputText); - Assert.True (EmitterFactory.TryCreate (changes, rootContext, semanticModel, symbol, sb, out var emitter)); + var changes = CreateSymbol (platform, inputText); + Assert.True (EmitterFactory.TryCreate (changes, out var emitter)); Assert.IsType (emitter); + Assert.True (EmitterFactory.TryCreate (changes, out var secondEmitter)); + Assert.Same (emitter, secondEmitter); } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/BaseTypeDeclarationSyntaxExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/BaseTypeDeclarationSyntaxExtensionsTests.cs index 4257ba88cbd6..b1f7ddc3698a 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/BaseTypeDeclarationSyntaxExtensionsTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/BaseTypeDeclarationSyntaxExtensionsTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections; using System.Collections.Generic; using System.Linq; @@ -62,7 +64,7 @@ public enum Final { "; T GetDeclaration (ApplePlatform platform, string inputText) where T : BaseTypeDeclarationSyntax { - var (_, sourceTrees) = CreateCompilation (nameof (BaseTypeDeclarationSyntaxExtensionsTests), platform, inputText); + var (_, sourceTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); var declaration = sourceTrees [0].GetRoot () .DescendantNodes () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/CompilationExtensionsTest.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/CompilationExtensionsTest.cs index 076fc6acf8b0..6276f27412c1 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/CompilationExtensionsTest.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/CompilationExtensionsTest.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.Macios.Generator.Extensions; using Xamarin.Tests; using Xamarin.Utils; @@ -16,7 +18,7 @@ public void GetCurrentPlatformTests (ApplePlatform platform, PlatformName expect { // get the current compilation for the platform and assert we return the correct one from // the compilation - var (compilation, _) = CreateCompilation (nameof (GetCurrentPlatformTests), platform); + var (compilation, _) = CreateCompilation (platform); Assert.Equal (expectedPlatform, compilation.GetCurrentPlatform ()); } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/FieldSymbolExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/FieldSymbolExtensionsTests.cs new file mode 100644 index 000000000000..2bc390bf3482 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/FieldSymbolExtensionsTests.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Extensions; +using ObjCBindings; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Extensions; + +public class FieldSymbolExtensionsTests : BaseGeneratorTestClass { + + + [Theory] + [AllSupportedPlatforms] + public void GetFieldDataMissingAttribute (ApplePlatform platform) + { + const string inputString = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + First, + Second, + Last, +} +"; + + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + var enumValue = symbol.GetMembers ().FirstOrDefault () as IFieldSymbol; + Assert.NotNull (enumValue); + var fieldData = enumValue.GetFieldData (); + Assert.Null (fieldData); + } + + [Theory] + [AllSupportedPlatforms] + public void GetFieldDataPresentAttributeWithField (ApplePlatform platform) + { + + const string inputString = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + [Field (""First"")] + First, +} +"; + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + var enumValue = symbol.GetMembers ().FirstOrDefault () as IFieldSymbol; + Assert.NotNull (enumValue); + var fieldData = enumValue.GetFieldData (); + Assert.NotNull (fieldData); + Assert.Equal ("First", fieldData.Value.SymbolName); + Assert.Null (fieldData.Value.LibraryName); + Assert.Equal (EnumValue.Default, fieldData.Value.Flags); + } + + [Theory] + [AllSupportedPlatforms] + public void GetFieldDataPresentAttributeWithLibraryName (ApplePlatform platform) + { + const string inputString = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + [Field (""First"", ""Lib"")] + First, +} +"; + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + var enumValue = symbol.GetMembers ().FirstOrDefault () as IFieldSymbol; + Assert.NotNull (enumValue); + var fieldData = enumValue.GetFieldData (); + Assert.NotNull (fieldData); + Assert.Equal ("First", fieldData.Value.SymbolName); + Assert.Equal ("Lib", fieldData.Value.LibraryName); + Assert.Equal (EnumValue.Default, fieldData.Value.Flags); + } + + class TestDataGetFieldDataPresentAttributeNotValid : IEnumerable { + public IEnumerator GetEnumerator () + { + const string missingFieldAttributes = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + First, + Second, + Last, +} +"; + yield return [missingFieldAttributes]; + + + const string fieldWithQuotes = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + [Field (""Field\""With\""Quotes"")] + First, +} +"; + yield return [fieldWithQuotes]; + + const string leadingWithNumber = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + [Field (""42Tries"")] + First, +} +"; + yield return [leadingWithNumber]; + + const string fieldWithNewLines = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + [Field (""With\nNew\nLine"")] + First, +} +"; + yield return [fieldWithNewLines]; + + const string fieldWithKeyword = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + [Field (""class"")] + First, +} +"; + yield return [fieldWithKeyword]; + + const string fieldWithTabs = @" +using ObjCBindings; + +namespace Test; +public enum MyEnum { + [Field ("" \tSecondBackendField\t \n"")] + First, +} +"; + + yield return [fieldWithTabs]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + [Theory] + [AllSupportedPlatformsClassData] + public void GetFieldDataPresentAttributeNotValid (ApplePlatform platform, string inputString) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + var enumValue = symbol.GetMembers ().FirstOrDefault () as IFieldSymbol; + Assert.NotNull (enumValue); + var fieldData = enumValue.GetFieldData (); + Assert.Null (fieldData); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/MemberDeclarationSyntaxExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/MemberDeclarationSyntaxExtensionsTests.cs index 8ffe02f04a77..eb525592325a 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/MemberDeclarationSyntaxExtensionsTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/MemberDeclarationSyntaxExtensionsTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Linq; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Macios.Generator.Extensions; @@ -53,7 +55,7 @@ public interface IInterface { "; // create a compilation unit and get the diff syntax node, semantic model and expected attr result var (compilation, sourceTrees) = - CreateCompilation (nameof (MemberDeclarationSyntaxExtensionsTests), platform, attrsText, inputText); + CreateCompilation (platform, sources: [attrsText, inputText]); Assert.Equal (2, sourceTrees.Length); // get the declarations we want to work with and the semantic model var nodes = sourceTrees [1].GetRoot ().DescendantNodes ().ToArray (); @@ -119,7 +121,7 @@ public void SayGoodbye () { } "; var (compilation, sourceTrees) = - CreateCompilation (nameof (MemberDeclarationSyntaxExtensionsTests), platform, inputText); + CreateCompilation (platform, sources: inputText); Assert.Single (sourceTrees); // get the declarations we want to work with and the semantic model var declarations = sourceTrees [0].GetRoot () @@ -170,7 +172,7 @@ public void SayHello () { "; // create a compilation unit and get the diff syntax node, semantic model and expected attr result var (compilation, sourceTrees) = - CreateCompilation (nameof (MemberDeclarationSyntaxExtensionsTests), platform, attrsText, inputText); + CreateCompilation (platform, sources: [attrsText, inputText]); Assert.Equal (2, sourceTrees.Length); // get the declarations we want to work with and the semantic model var nodes = sourceTrees [1].GetRoot ().DescendantNodes ().ToArray (); diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/NamedTypeSymbolExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/NamedTypeSymbolExtensionsTests.cs index 562b544717a7..90260031aa6e 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/NamedTypeSymbolExtensionsTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/NamedTypeSymbolExtensionsTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections; using System.Collections.Generic; using System.Linq; @@ -20,7 +22,7 @@ namespace Test; public class NotEnum { } "; - var (compilation, syntaxTrees) = CreateCompilation (nameof (TryGetEnumFieldsNotEnum), platform, inputString); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); Assert.Single (syntaxTrees); var declaration = syntaxTrees [0].GetRoot () .DescendantNodes () @@ -39,6 +41,8 @@ class TestDataTryGetEnumFieldsNoFields : IEnumerable { public IEnumerator GetEnumerator () { const string emptyEnum = @" +using ObjCBindings; + namespace Test; public enum MyEnum { } @@ -54,9 +58,39 @@ public enum MyEnum { } "; yield return [missingFieldAttributes]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + + [Theory] + [AllSupportedPlatformsClassData] + public void TryGetEnumFieldsNoFields (ApplePlatform platform, string inputString) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + Assert.True (symbol.TryGetEnumFields (out var fields, out var diagnostics)); + Assert.NotNull (fields); + Assert.Empty (fields); + Assert.Null (diagnostics); + } + class TestDataTryGetEnumFieldsInvalidFields : IEnumerable { + public IEnumerator GetEnumerator () + { const string fieldWithQuotes = @" +using ObjCBindings; + namespace Test; public enum MyEnum { [Field (""Field\""With\""Quotes"")] @@ -66,6 +100,8 @@ public enum MyEnum { yield return [fieldWithQuotes]; const string leadingWithNumber = @" +using ObjCBindings; + namespace Test; public enum MyEnum { [Field (""42Tries"")] @@ -75,6 +111,8 @@ public enum MyEnum { yield return [leadingWithNumber]; const string fieldWithNewLines = @" +using ObjCBindings; + namespace Test; public enum MyEnum { [Field (""With\nNew\nLine"")] @@ -84,6 +122,8 @@ public enum MyEnum { yield return [fieldWithNewLines]; const string fieldWithKeyword = @" +using ObjCBindings; + namespace Test; public enum MyEnum { [Field (""class"")] @@ -93,6 +133,8 @@ public enum MyEnum { yield return [fieldWithKeyword]; const string fieldWithTabs = @" +using ObjCBindings; + namespace Test; public enum MyEnum { [Field ("" \tSecondBackendField\t \n"")] @@ -106,12 +148,11 @@ public enum MyEnum { IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); } - [Theory] - [AllSupportedPlatformsClassData] - public void TryGetEnumFieldsNoFields (ApplePlatform platform, string inputString) + [AllSupportedPlatformsClassData] + public void TryGetEnumFieldsInvalidFields (ApplePlatform platform, string inputString) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (TryGetEnumFieldsNotEnum), platform, inputString); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); Assert.Single (syntaxTrees); var declaration = syntaxTrees [0].GetRoot () .DescendantNodes () @@ -121,10 +162,10 @@ public void TryGetEnumFieldsNoFields (ApplePlatform platform, string inputString var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var symbol = semanticModel.GetDeclaredSymbol (declaration); Assert.NotNull (symbol); - Assert.True (symbol.TryGetEnumFields (out var fields, out var diagnostics)); - Assert.NotNull (fields); - Assert.Empty (fields); - Assert.Null (diagnostics); + Assert.False (symbol.TryGetEnumFields (out var fields, out var diagnostics)); + Assert.Null (fields); + Assert.NotNull (diagnostics); + Assert.Single (diagnostics); } [Theory] @@ -145,7 +186,7 @@ public enum MyEnum { Last, } "; - var (compilation, syntaxTrees) = CreateCompilation (nameof (TryGetEnumFieldsNotEnum), platform, inputString); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputString); Assert.Single (syntaxTrees); var declaration = syntaxTrees [0].GetRoot () .DescendantNodes () diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/SemanticModelExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/SemanticModelExtensionsTests.cs new file mode 100644 index 000000000000..1826080c045a --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/SemanticModelExtensionsTests.cs @@ -0,0 +1,643 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Attributes; +using Microsoft.Macios.Generator.Availability; +using Microsoft.Macios.Generator.DataModel; +using Microsoft.Macios.Generator.Extensions; +using ObjCBindings; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Extensions; + +public class SemanticModelExtensionsTests : BaseGeneratorTestClass { + + CollectionComparer nameSpaceComparer = new (); // order matters in namespaces + CollectionComparer interfacesComparer = new (StringComparer.InvariantCulture); // order does not matter in interfaces + class TestDataGetNameAndNamespaceTests : IEnumerable { + public IEnumerator GetEnumerator () + { + var bindingData = new BindingInfo (new BindingTypeData ()); + var builder = SymbolAvailability.CreateBuilder (); + const string filescopedNamespaceClass = @" +using ObjCBindings; + +namespace Test; + +[BindingType] +public class Foo { +} +"; + ImmutableArray ns = ImmutableArray.Create ("Test"); + yield return [ + BindingType.Class, + filescopedNamespaceClass, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + const string filescopedNamespaceNestedClass = @" +using ObjCBindings; + +namespace Test; + +[BindingType] +public class Foo { + public class Bar { + } +} +"; + yield return [ + BindingType.Class, + filescopedNamespaceNestedClass, + "Bar", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + const string namespaceClass = @" +using ObjCBindings; + +namespace Test { + + [BindingType] + public class Foo { + } +} +"; + + yield return [ + BindingType.Class, + namespaceClass, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + const string nestedNamespaces = @" +using ObjCBindings; + +namespace Foo { + namespace Bar { + [BindingType] + public class Test {} + } +} +"; + ns = ImmutableArray.Create ("Foo", "Bar"); + yield return [ + BindingType.Class, + nestedNamespaces, + "Test", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + class TestDataGetNameAndNamespaceAndAvailabilityTests : IEnumerable { + public IEnumerator GetEnumerator () + { + var bindingData = new BindingInfo (new BindingTypeData ()); + var builder = SymbolAvailability.CreateBuilder (); + builder.Add (new SupportedOSPlatformData ("ios17.0")); + builder.Add (new SupportedOSPlatformData ("tvos17.0")); + builder.Add (new UnsupportedOSPlatformData ("macos")); + const string filescopedNamespaceClass = @" +using System.Runtime.Versioning; +using ObjCBindings; + +namespace Test; + +[BindingType] +[SupportedOSPlatform (""ios17.0"")] +[SupportedOSPlatform (""tvos17.0"")] +[UnsupportedOSPlatform (""macos"")] +public class Foo { +} +"; + ImmutableArray ns = ImmutableArray.Create ("Test"); + yield return [ + BindingType.Class, + filescopedNamespaceClass, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + const string filescopedNamespaceNestedClass = @" +using System.Runtime.Versioning; +using ObjCBindings; + +namespace Test; + +[BindingType] +public class Foo { + + [SupportedOSPlatform (""ios17.0"")] + [SupportedOSPlatform (""tvos17.0"")] + [UnsupportedOSPlatform (""macos"")] + public class Bar { + } +} +"; + yield return [ + BindingType.Class, + filescopedNamespaceNestedClass, + "Bar", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + const string namespaceClass = @" +using System.Runtime.Versioning; +using ObjCBindings; + +namespace Test { + + [BindingType] + [SupportedOSPlatform (""ios17.0"")] + [SupportedOSPlatform (""tvos17.0"")] + [UnsupportedOSPlatform (""macos"")] + public class Foo { + } +} +"; + + yield return [ + BindingType.Class, + namespaceClass, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + const string nestedNamespaces = @" +using System.Runtime.Versioning; +using ObjCBindings; + +namespace Foo { + namespace Bar { + + [BindingType] + [SupportedOSPlatform (""ios17.0"")] + [SupportedOSPlatform (""tvos17.0"")] + [UnsupportedOSPlatform (""macos"")] + public class Test {} + } +} +"; + ns = ImmutableArray.Create ("Foo", "Bar"); + yield return [ + BindingType.Class, + nestedNamespaces, + "Test", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + bindingData]; + + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + class TestDataGetNameAndNamespaceDiffBindingType : IEnumerable { + public IEnumerator GetEnumerator () + { + var builder = SymbolAvailability.CreateBuilder (); + ImmutableArray ns = ImmutableArray.Create ("Test"); + + const string classBindingType = @" +using ObjCBindings; + +namespace Test; + +[BindingType] +public class Foo { +} +"; + yield return [BindingType.Class, + classBindingType, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + new BindingInfo (new BindingTypeData ())]; + + const string classBindingDisableConstructorsType = @" +using ObjCBindings; + +namespace Test; + +[BindingType (Flags = Class.DisableDefaultCtor)] +public class Foo { +} +"; + yield return [BindingType.Class, + classBindingDisableConstructorsType, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + new BindingInfo (new BindingTypeData (Class.DisableDefaultCtor))]; + + const string classBindingName = @" +using ObjCBindings; + +namespace Test; + +[BindingType (Name = ""ObjcFoo"")] +public class Foo { +} +"; + yield return [BindingType.Class, + classBindingName, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + new BindingInfo (new BindingTypeData ("ObjcFoo"))]; + + const string classBindingNameAndFlags = @" +using ObjCBindings; + +namespace Test; + +[BindingType (Name = ""ObjcFoo"", Flags = Class.DisableDefaultCtor)] +public class Foo { +} +"; + yield return [BindingType.Class, + classBindingNameAndFlags, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + new BindingInfo (new BindingTypeData ("ObjcFoo", Class.DisableDefaultCtor))]; + + const string categoryBindingType = @" +using ObjCBindings; + +namespace Test; + +[BindingType] +public static class Foo { +} +"; + yield return [BindingType.Category, + categoryBindingType, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + new BindingInfo (new BindingTypeData ())]; + + const string protocolBindingType = @" +using ObjCBindings; + +namespace Test; + +[BindingType] +public interface IFoo { +} +"; + yield return [BindingType.Protocol, + protocolBindingType, + "IFoo", + null!, + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + new BindingInfo (new BindingTypeData ())]; + + const string smartEnumBindingType = @" +using ObjCBindings; + +namespace Test; + +[BindingType] +public enum Foo { + First, +} +"; + yield return [BindingType.SmartEnum, + smartEnumBindingType, + "Foo", + "System.Enum", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + new BindingInfo (BindingType.SmartEnum, new ())]; + + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + class TestDataGetNameAndNamespaceInheritanceTests : IEnumerable { + public IEnumerator GetEnumerator () + { + var classBindingData = new BindingInfo (new BindingTypeData ()); + var protocolBindingData = new BindingInfo (new BindingTypeData ()); + var builder = SymbolAvailability.CreateBuilder (); + ImmutableArray ns = ImmutableArray.Create ("Test"); + + const string classBindingNoBase = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +[BindingType] +public class Foo { +} +"; + yield return [ + BindingType.Class, + classBindingNoBase, + "Foo", + "object", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + classBindingData + ]; + + const string classBindingNoBaseAndInterface = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +public interface IFoo {} + +[BindingType] +public class Foo : IFoo { +} +"; + yield return [ + BindingType.Class, + classBindingNoBaseAndInterface, + "Foo", + "object", + ImmutableArray.Create ("Test.IFoo"), + ns, + builder.ToImmutable (), + classBindingData + ]; + + const string classBindingNoBaseAndSeveralInterface = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +public interface IFoo {} + +public interface IBar {} + +[BindingType] +public class Foo : IFoo, IBar { +} +"; + yield return [ + BindingType.Class, + classBindingNoBaseAndSeveralInterface, + "Foo", + "object", + ImmutableArray.Create ("Test.IFoo", "Test.IBar"), + ns, + builder.ToImmutable (), + classBindingData + ]; + + const string classBindingWithBase = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +[BindingType] +public class Foo : NSObject { +} +"; + yield return [ + BindingType.Class, + classBindingWithBase, + "Foo", + "Foundation.NSObject", + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + classBindingData + ]; + + const string classBindingWithBaseInterface = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +public interface IFoo {} + +[BindingType] +public class Foo : NSObject, IFoo { +} +"; + yield return [ + BindingType.Class, + classBindingWithBaseInterface, + "Foo", + "Foundation.NSObject", + ImmutableArray.Create ("Test.IFoo"), + ns, + builder.ToImmutable (), + classBindingData + ]; + + const string classBindingWithBaseSeveralInterface = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +public interface IFoo {} + +public interface IBar {} + +[BindingType] +public class Foo : NSObject, IFoo, IBar { +} +"; + yield return [ + BindingType.Class, + classBindingWithBaseSeveralInterface, + "Foo", + "Foundation.NSObject", + ImmutableArray.Create ("Test.IFoo", "Test.IBar"), + ns, + builder.ToImmutable (), + classBindingData + ]; + + const string interfaceBinding = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +[BindingType] +public interface IFoo { +} +"; + yield return [ + BindingType.Protocol, + interfaceBinding, + "IFoo", + null!, + ImmutableArray.Empty, + ns, + builder.ToImmutable (), + protocolBindingData + ]; + + const string interfaceWithBaseBinding = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +public interface IBar {} + +[BindingType] +public interface IFoo : IBar { +} +"; + yield return [ + BindingType.Protocol, + interfaceWithBaseBinding, + "IFoo", + null!, + ImmutableArray.Create ("Test.IBar"), + ns, + builder.ToImmutable (), + protocolBindingData + ]; + + const string interfaceWithSeveralBaseBinding = @" +using Foundation; +using ObjCBindings; + +namespace Test; + +public interface IBar {} +public interface IBaz {} + +[BindingType] +public interface IFoo : IBar, IBaz { +} +"; + yield return [ + BindingType.Protocol, + interfaceWithSeveralBaseBinding, + "IFoo", + null!, + ImmutableArray.Create ("Test.IBar", "Test.IBaz"), + ns, + builder.ToImmutable (), + protocolBindingData + ]; + + const string interfaceWithBaseListGenericBinding = @" +using System.Collections.Generic; +using Foundation; +using ObjCBindings; + +namespace Test; + + +[BindingType] +public interface IFoo : IList { +} +"; + yield return [ + BindingType.Protocol, + interfaceWithBaseListGenericBinding, + "IFoo", + null!, + ImmutableArray.Create ("System.Collections.Generic.IList"), + ns, + builder.ToImmutable (), + protocolBindingData + ]; + } + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + [AllSupportedPlatformsClassData] + [AllSupportedPlatformsClassData] + [AllSupportedPlatformsClassData] + internal void GetNameAndNamespaceTests (ApplePlatform platform, BindingType bindingType, + string inputText, string expectedName, string? expectedBaseClass, ImmutableArray expectedInterfaces, + ImmutableArray expectedNamespace, SymbolAvailability expectedAvailability, BindingInfo expectedInfo) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .LastOrDefault (); + Assert.NotNull (declaration); + semanticModel.GetSymbolData ( + declaration: declaration, + bindingType: bindingType, + name: out var name, + baseClass: out var baseClass, + interfaces: out var interfaces, + namespaces: out var @namespace, + symbolAvailability: out var symbolAvailability, + bindingInfo: out var bindingData); + Assert.Equal (expectedName, name); + Assert.Equal (expectedBaseClass, baseClass); + Assert.Equal (expectedInterfaces, interfaces, interfacesComparer); + Assert.Equal (expectedNamespace, @namespace, nameSpaceComparer); + Assert.Equal (expectedAvailability, symbolAvailability); + Assert.Equal (expectedInfo, bindingData); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/StringExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/StringExtensionsTests.cs index 42c27c5e2ca3..f21f1bdc4267 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/StringExtensionsTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/StringExtensionsTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using Microsoft.Macios.Generator.Extensions; using Xunit; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/SyntaxTreeExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/SyntaxTreeExtensionsTests.cs new file mode 100644 index 000000000000..c40457499911 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/SyntaxTreeExtensionsTests.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System; +using System.Collections; +using System.Collections.Generic; +using Microsoft.Macios.Generator.Extensions; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Extensions; + +public class SyntaxTreeExtensionsTests : BaseGeneratorTestClass { + readonly CollectionComparer comparer = new (StringComparer.InvariantCulture); + + class TestDataCollectUsingStatementsTest : IEnumerable { + public IEnumerator GetEnumerator () + { + const string noUsingPresent = @" +namespace NS { + public class TestClass { + } +} +"; + yield return [noUsingPresent, Array.Empty ()]; + + const string singleUsing = @" +using System; + +namespace NS { + public class TestClass { + } +} +"; + yield return [singleUsing, new [] { "System" }]; + + const string unsortedUsingStatements = @" +using System; +using AVFoundation; +using ObjCRuntime; +using System.Collections.Generic; + +namespace NS { + public class TestClass { + } +} +"; + yield return [unsortedUsingStatements, new [] { "System", "AVFoundation", "ObjCRuntime", "System.Collections.Generic" }]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + public void CollectUsingStatementsTest (ApplePlatform platform, string inputText, string [] expectedUsingStatements) + { + var (_, sourceTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (sourceTrees); + var tree = sourceTrees [0].GetRoot ().SyntaxTree; + Assert.NotNull (tree); + Assert.Equal (expectedUsingStatements, tree.CollectUsingStatements (), comparer); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/TypeSymbolExtensionsInheritanceTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/TypeSymbolExtensionsInheritanceTests.cs new file mode 100644 index 000000000000..ba791b750b0e --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/TypeSymbolExtensionsInheritanceTests.cs @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.Extensions; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Extensions; + +public class TypeSymbolExtensionsInheritanceTests : BaseGeneratorTestClass { + + readonly CollectionComparer comparer = new CollectionComparer (); + + class TestDataInheritanceClasses : IEnumerable { + public IEnumerator GetEnumerator () + { + const string simpleClass = @" +using System; + +namespace NS; + +public class TestClass {} +"; + yield return [simpleClass, false, false, new [] { "object" }, new string [] { }]; + + const string genericClass = @" +using System; + +namespace NS; + +public class TestClass where T Enum {} +"; + yield return [genericClass, false, false, new [] { "object" }, new string [] { }]; + + const string singleParent = @" +using System; + +namespace NS; + +public class Parent {} +public class TestClass : Parent {} +"; + + yield return [singleParent, false, false, new [] { "NS.Parent", "object" }, new string [] { }]; + + const string genericParent = @" +using System; + +namespace NS; + +public class Parent where T object {} +public class TestClass : Parent {} +"; + + yield return [genericParent, false, false, new [] { "NS.Parent", "object" }, new string [] { }]; + + const string multiParent = @" +using System; + +namespace NS; + +public class Parent0 {} +public class Parent1 : Parent0 {} +public class TestClass : Parent1 {} +"; + + yield return [multiParent, false, false, new [] { "NS.Parent1", "NS.Parent0", "object" }, new string [] { }]; + + const string singleInterface = @" +using System; + +namespace NS; + +public interface IInterface {} +public class TestClass : IInterface {} +"; + + yield return [singleInterface, false, false, new [] { "object" }, new [] { "NS.IInterface" }]; + + const string genericInterface = @" +using System; + +namespace NS; + +public interface IInterface where T : object {} +public class TestClass : IInterface {} +"; + + yield return [genericInterface, false, false, new [] { "object" }, new [] { "NS.IInterface" }]; + + const string severalInterfaces = @" +using System; + +namespace NS; + +public interface IInterface1 {} +public interface IInterface2 {} +public class TestClass : IInterface1, IInterface2 {} +"; + + yield return [severalInterfaces, false, false, new [] { "object" }, new [] { "NS.IInterface1", "NS.IInterface2" }]; + + const string severalGenericInterfaces = @" +using System; + +namespace NS; + +public interface IInterface1 where T : object {} +public class TestClass : IInterface1, IInterface1 {} +"; + + yield return [severalGenericInterfaces, false, false, new [] { "object" }, new [] { "NS.IInterface1", "NS.IInterface1" }]; + + const string parentSingleInterface = @" +using System; + +namespace NS; + +public interface IInterface {} +public class Parent : IInterface {} +public class TestClass : Parent {} +"; + + yield return [parentSingleInterface, false, false, new [] { "NS.Parent", "object" }, new [] { "NS.IInterface" }]; + + const string nsObjectChild = @" +using System; +using Foundation; +using ObjCRuntime; + +namespace NS; +public partial class AVCaptureDataOutputSynchronizer : NSObject +{ + public override NativeHandle ClassHandle { get { throw new PlatformNotSupportedException (); } } + + protected AVCaptureDataOutputSynchronizer (NSObjectFlag t) : base (t) + { + throw new PlatformNotSupportedException (); + } +} +"; + + yield return [nsObjectChild, + true, + true, + new [] { "Foundation.NSObject", "object" }, + new [] { + "ObjCRuntime.INativeObject", + "System.IEquatable", + "System.IDisposable", + "Foundation.INSObjectFactory", + "Foundation.INSObjectProtocol", + }]; + + const string nsObjectNestedChild = @" +using System; +using Foundation; +using ObjCRuntime; + +namespace NS; +public partial class AVCaptureDataOutputSynchronizer : NSObject +{ + public override NativeHandle ClassHandle { get { throw new PlatformNotSupportedException (); } } + + protected AVCaptureDataOutputSynchronizer (NSObjectFlag t) : base (t) + { + throw new PlatformNotSupportedException (); + } +} + +public partial class Child : AVCaptureDataOutputSynchronizer {} +"; + + yield return [nsObjectNestedChild, + true, + true, + new [] { "NS.AVCaptureDataOutputSynchronizer", "Foundation.NSObject", "object" }, + new [] { + "ObjCRuntime.INativeObject", + "System.IEquatable", + "System.IDisposable", + "Foundation.INSObjectFactory", + "Foundation.INSObjectProtocol", + }]; + + const string nativeObjectInterface = @" +using System; +using Foundation; +using ObjCRuntime; + +namespace NS; +public partial class AVCaptureDataOutputSynchronizer : INativeObject +{ + public override NativeHandle ClassHandle { get { throw new PlatformNotSupportedException (); } } + + protected AVCaptureDataOutputSynchronizer (NSObjectFlag t) : base (t) + { + throw new PlatformNotSupportedException (); + } +} +"; + + yield return [nativeObjectInterface, + false, + true, + new [] { "object" }, + new [] { + "ObjCRuntime.INativeObject", + }]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void GetInheritance (ApplePlatform platform, string inputText, + bool expectedIsNSObject, bool expectedIsNativeObject, string [] expectedParents, string [] expectedInterfaces) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .LastOrDefault (); // always grab the last one, you might get into failures if you are not careful with this + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + symbol.GetInheritance ( + isNSObject: out var isNsObject, + isNativeObject: out var isNativeObject, + parents: out var parents, + interfaces: out var interfaces); + Assert.Equal (expectedIsNSObject, isNsObject); + Assert.Equal (expectedIsNativeObject, isNativeObject); + Assert.Equal (expectedParents, parents); + Assert.Equal (expectedInterfaces, interfaces); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/TypeSymbolExtensionsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/TypeSymbolExtensionsTests.cs index b4f2ec56c97e..6b7eee836438 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/TypeSymbolExtensionsTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Extensions/TypeSymbolExtensionsTests.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 using System; using System.Collections; using System.Collections.Generic; @@ -8,6 +11,8 @@ using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.Availability; using Microsoft.Macios.Generator.Extensions; +using ObjCBindings; +using ObjCRuntime; using Xamarin.Tests; using Xamarin.Utils; using Xunit; @@ -78,8 +83,7 @@ public enum TestEnum { public void GetAttributeDataPresent (ApplePlatform platform, string inputText, string attributesText, HashSet expectedAttributes) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (GetAttributeDataPresent), - platform, inputText, attributesText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: [inputText, attributesText]); Assert.Equal (2, syntaxTrees.Length); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var declaration = syntaxTrees [0].GetRoot () @@ -175,8 +179,7 @@ public enum MyEnum { public void GetParentTests (ApplePlatform platform, string inputText, Func getNode, string [] expectedParents) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (GetAttributeDataPresent), - platform, inputText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (syntaxTrees); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var declaration = getNode (syntaxTrees [0].GetRoot ()); @@ -306,8 +309,7 @@ void GetSupportedPlatforms (ApplePlatform platform, string inputText, Func getNode, SymbolAvailability expectedAvailability) { - var (compilation, syntaxTrees) = CreateCompilation (nameof (GetAttributeDataPresent), - platform, inputText); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); Assert.Single (syntaxTrees); var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); var declaration = getNode (syntaxTrees [0].GetRoot ()); @@ -317,4 +319,1368 @@ void GetSupportedPlatforms (ApplePlatform platform, string inputText, var availability = symbol.GetSupportedPlatforms (); Assert.Equal (availability, expectedAvailability); } + + class TestDataHasAttribute : IEnumerable { + public IEnumerator GetEnumerator () + { + const string supportedOS = @" +using System; +using System.Runtime.Versioning; + +namespace Test; + +[SupportedOSPlatform (""ios12.0"")] +public class ParentClass{ + public void Method(){} +} +"; + yield return [supportedOS, AttributesNames.SupportedOSPlatformAttribute, true]; + yield return [supportedOS, AttributesNames.UnsupportedOSPlatformAttribute, false]; + } + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void HasAttributeTests (ApplePlatform platform, string inputText, string attrName, bool expected) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .LastOrDefault (); + Assert.NotNull (declaration); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + Assert.Equal (expected, symbol.HasAttribute (attrName)); + } + + class TestDataIsSmartEnum : IEnumerable { + public IEnumerator GetEnumerator () + { + const string classExample = @" +using System; +namespace Test; + +public class ClassExample { +}"; + yield return [classExample, false]; + + const string interfaceExample = @" +using System; +namespace Test; + +public interface InterfaceExample { +}"; + + yield return [interfaceExample, false]; + + const string enumExample = @" +using System; +namespace Test; + +public enum MyEnum { + None, +}"; + + yield return [enumExample, false]; + + const string smartEnumExample = @" +using ObjCBindings; +namespace Test; + +[BindingType] +public enum MyEnum { + None, +}"; + + yield return [smartEnumExample, true]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void IsSmartEnumTests (ApplePlatform platform, string inputText, bool expected) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .LastOrDefault (); + Assert.NotNull (declaration); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + Assert.Equal (expected, symbol.IsSmartEnum ()); + } + + class TestDataGetExportData : IEnumerable { + public IEnumerator GetEnumerator () + { + const string noAttrPropertyClass = @" +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public static partial string Name { get; set; } = string.Empty; +} +"; + yield return [noAttrPropertyClass, Property.Default, null!]; + + const string singlePropertyClass = @" +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + [Export (""name"")] + public partial string Name { get; set; } = string.Empty; +} +"; + yield return [singlePropertyClass, Property.Default, new ExportData ("name")]; + + const string notificationPropertyClass = @" +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + [Export (""name"", Property.Notification)] + public partial string Name { get; set; } = string.Empty; +} +"; + yield return [ + notificationPropertyClass, + Property.Default, + new ExportData ("name", ArgumentSemantic.None, Property.Notification) + ]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void GetExportData (ApplePlatform platform, string inputText, T @enum, ExportData? expectedData) + where T : Enum + { + Assert.NotNull (@enum); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + var exportData = symbol.GetExportData (); + Assert.Equal (expectedData, exportData); + } + + class TestDataGetFieldData : IEnumerable { + public IEnumerator GetEnumerator () + { + const string fieldPropertyClass = @" +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + [Field (""CONSTANT"")] + public static partial string Name { get; set; } = string.Empty; +} +"; + yield return [fieldPropertyClass, Property.Default, new FieldData ("CONSTANT")]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + void GetFieldData (ApplePlatform platform, string inputText, T @enum, FieldData? expectedData) + where T : Enum + { + Assert.NotNull (@enum); + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + var fieldData = symbol.GetFieldData (); + Assert.Equal (expectedData, fieldData); + } + + class TestDataIsBlittablePrimitiveType : IEnumerable { + public IEnumerator GetEnumerator () + { + const string byteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public byte Property { get; set; } +} +"; + yield return [byteProperty, true]; + + const string otherByteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Byte Property { get; set; } +} +"; + yield return [otherByteProperty, true]; + + const string sbyteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public sbyte Property { get; set; } +} +"; + yield return [sbyteProperty, true]; + + const string otherSByteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public SByte Property { get; set; } +} +"; + yield return [otherSByteProperty, true]; + + const string intProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public int Property { get; set; } +} +"; + yield return [intProperty, true]; + + const string int16Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Int16 Property { get; set; } +} +"; + yield return [int16Property, true]; + + const string shortProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public short Property { get; set; } +} +"; + yield return [shortProperty, true]; + + const string uint16Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UInt16 Property { get; set; } +} +"; + yield return [uint16Property, true]; + + const string ushortProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public ushort Property { get; set; } +} +"; + yield return [ushortProperty, true]; + + const string int32Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Int32 Property { get; set; } +} +"; + yield return [int32Property, true]; + + const string uint32Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UInt32 Property { get; set; } +} +"; + yield return [uint32Property, true]; + + const string uintProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public uint Property { get; set; } +} +"; + yield return [uintProperty, true]; + + const string int64Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Int64 Property { get; set; } +} +"; + yield return [int64Property, true]; + + const string longProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public long Property { get; set; } +} +"; + yield return [longProperty, true]; + + const string uint64Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UInt64 Property { get; set; } +} +"; + yield return [uint64Property, true]; + + const string ulongProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public ulong Property { get; set; } +} +"; + yield return [ulongProperty, true]; + + const string intPtrProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public IntPtr Property { get; set; } +} +"; + yield return [intPtrProperty, true]; + + const string uintPtrProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UIntPtr Property { get; set; } +} +"; + yield return [uintPtrProperty, true]; + + const string singleProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Single Property { get; set; } +} +"; + yield return [singleProperty, true]; + + const string floatProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public float Property { get; set; } +} +"; + yield return [floatProperty, true]; + + const string doubleProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public double Property { get; set; } +} +"; + yield return [doubleProperty, true]; + + const string otherDoubleProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Double Property { get; set; } +} +"; + yield return [otherDoubleProperty, true]; + + const string decimalProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Decimal Property { get; set; } +} +"; + yield return [decimalProperty, false]; + + const string charProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public char Property { get; set; } +} +"; + yield return [charProperty, false]; + + const string otherCharProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Char Property { get; set; } +} +"; + yield return [otherCharProperty, false]; + + const string stringProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public string Property { get; set; } +} +"; + yield return [stringProperty, false]; + + const string otherStringProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public String Property { get; set; } +} +"; + yield return [otherStringProperty, false]; + + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + class TestDataIsBlittableStructs : IEnumerable { + public IEnumerator GetEnumerator () + { + const string emptyStructNoLayout = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public struct MyStruct {} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [emptyStructNoLayout, false]; + + const string emptyStructExplicitLayout = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Explicit)] +public struct MyStruct {} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [emptyStructExplicitLayout, true]; + + const string emptyStructSequentialLayout = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct {} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [emptyStructSequentialLayout, true]; + + const string emptyStructAutoLayout = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Auto)] +public struct MyStruct {} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [emptyStructAutoLayout, false]; + + const string structBlittableContent = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct { + int a; + double b; +} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [structBlittableContent, true]; + + const string structNonBlittableContent = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct { + int a; + string b; +} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [structNonBlittableContent, false]; + + const string nestedStructBlittableContent = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyInnerStruct { + int a; + double b; +} + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct { + int a; + double b; + MyInnerStruct c; +} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [nestedStructBlittableContent, true]; + + const string nestedStructNoBlittableContent = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyInnerStruct { + int a; + string b; +} + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct { + int a; + double b; + MyInnerStruct c; +} + +[BindingType] +public partial class MyClass { + public MyStruct Property { get; set; } +} +"; + yield return [nestedStructNoBlittableContent, false]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + class TestDataIsBlittableArrays : IEnumerable { + public IEnumerator GetEnumerator () + { + const string byteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public byte[] Property { get; set; } +} +"; + yield return [byteProperty, true]; + + const string otherByteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Byte[] Property { get; set; } +} +"; + yield return [otherByteProperty, true]; + + const string sbyteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public sbyte[] Property { get; set; } +} +"; + yield return [sbyteProperty, true]; + + const string otherSByteProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public SByte[] Property { get; set; } +} +"; + yield return [otherSByteProperty, true]; + + const string intProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public int[] Property { get; set; } +} +"; + yield return [intProperty, true]; + + const string int16Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Int16[] Property { get; set; } +} +"; + yield return [int16Property, true]; + + const string shortProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public short[] Property { get; set; } +} +"; + yield return [shortProperty, true]; + + const string uint16Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UInt16[] Property { get; set; } +} +"; + yield return [uint16Property, true]; + + const string ushortProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public ushort[] Property { get; set; } +} +"; + yield return [ushortProperty, true]; + + const string int32Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Int32[] Property { get; set; } +} +"; + yield return [int32Property, true]; + + const string uint32Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UInt32[] Property { get; set; } +} +"; + yield return [uint32Property, true]; + + const string uintProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public uint[] Property { get; set; } +} +"; + yield return [uintProperty, true]; + + const string int64Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Int64[] Property { get; set; } +} +"; + yield return [int64Property, true]; + + const string longProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public long[] Property { get; set; } +} +"; + yield return [longProperty, true]; + + const string uint64Property = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UInt64[] Property { get; set; } +} +"; + yield return [uint64Property, true]; + + const string ulongProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public ulong[] Property { get; set; } +} +"; + yield return [ulongProperty, true]; + + const string intPtrProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public IntPtr[] Property { get; set; } +} +"; + yield return [intPtrProperty, true]; + + const string uintPtrProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public UIntPtr[] Property { get; set; } +} +"; + yield return [uintPtrProperty, true]; + + const string singleProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Single[] Property { get; set; } +} +"; + yield return [singleProperty, true]; + + const string floatProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public float[] Property { get; set; } +} +"; + yield return [floatProperty, true]; + + const string doubleProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public double[] Property { get; set; } +} +"; + yield return [doubleProperty, true]; + + const string otherDoubleProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Double[] Property { get; set; } +} +"; + yield return [otherDoubleProperty, true]; + + const string decimalProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Decimal[] Property { get; set; } +} +"; + yield return [decimalProperty, false]; + + const string charProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public char[] Property { get; set; } +} +"; + yield return [charProperty, false]; + + const string otherCharProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public Char[] Property { get; set; } +} +"; + yield return [otherCharProperty, false]; + + const string stringProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public string[] Property { get; set; } +} +"; + yield return [stringProperty, false]; + + const string otherStringProperty = @" +using System; +using ObjCBindings; + +namespace NS; + +[BindingType] +public partial class MyClass { + public String[] Property { get; set; } +} +"; + yield return [otherStringProperty, false]; + + const string structNonBlittableContent = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct { + int a; + string b; +} + +[BindingType] +public partial class MyClass { + public MyStruct[] Property { get; set; } +} +"; + yield return [structNonBlittableContent, false]; + + const string nestedStructBlittableContent = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyInnerStruct { + int a; + double b; +} + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct { + int a; + double b; + MyInnerStruct c; +} + +[BindingType] +public partial class MyClass { + public MyStruct[] Property { get; set; } +} +"; + yield return [nestedStructBlittableContent, true]; + + const string blittableWithNonInstanceContent = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +[StructLayout(LayoutKind.Sequential)] +public struct MyStruct { + public static string Data = ""test""; + int a; + double b; +} + +[BindingType] +public partial class MyClass { + public MyStruct[] Property { get; set; } +} +"; + yield return [blittableWithNonInstanceContent, true]; + + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + class TestDataIsBlittableEnums : IEnumerable { + public IEnumerator GetEnumerator () + { + const string defaultBackedEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [defaultBackedEnum, true]; + + const string byteEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : byte { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [byteEnum, true]; + + const string sbyteEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : sbyte { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [sbyteEnum, true]; + + const string shortEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : short { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [shortEnum, true]; + + const string ushortEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : ushort { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [ushortEnum, true]; + + const string intEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : int { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [intEnum, true]; + + const string uintEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : uint { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [uintEnum, true]; + + const string longEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : long { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [longEnum, true]; + + const string ulongEnum = @" +using System; +using System.Runtime.InteropServices; +using ObjCBindings; + +namespace NS; + +public enum MyEnum : ulong { + First, + Second, +} + +[BindingType] +public partial class MyClass { + public MyEnum Property { get; set; } +} +"; + yield return [ulongEnum, true]; + + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + [AllSupportedPlatformsClassData] + [AllSupportedPlatformsClassData] + void IsBlittable (ApplePlatform platform, string inputText, bool expectedResult) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + var symbol = semanticModel.GetDeclaredSymbol (declaration); + Assert.NotNull (symbol); + Assert.Equal (expectedResult, symbol.Type.IsBlittable ()); + } + } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/ConstructorFormatterTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/ConstructorFormatterTests.cs new file mode 100644 index 000000000000..d427e3ee556f --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/ConstructorFormatterTests.cs @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using Microsoft.Macios.Generator.Formatters; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Formatters; + +public class ConstructorFormatterTests : BaseGeneratorTestClass { + + class TestDataToDeclaration : IEnumerable { + public IEnumerator GetEnumerator () + { + const string emptyConstructor = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public MyClass (); +} +"; + yield return [emptyConstructor, "public MyClass ()"]; + + const string genericConstructor = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass where T : Enum { + public MyClass (); +} +"; + yield return [genericConstructor, "public MyClass ()"]; + + const string noSpaceParamsMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public MyClass(); +} +"; + yield return [noSpaceParamsMethod, "public MyClass ()"]; + + const string singleParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public MyClass (string myParam); +} +"; + yield return [singleParamConstructor, "public MyClass (string myParam)"]; + + const string severalParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public MyClass (string myParam, int myParamInt); +} +"; + yield return [severalParamConstructor, "public MyClass (string myParam, int myParamInt)"]; + + const string nullableParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public MyClass(string? myParam); +} +"; + yield return [nullableParamConstructor, "public MyClass (string? myParam)"]; + + const string customParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(MyStruct myParam); +} +"; + yield return [customParamConstructor, "public MyClass (NS.MyStruct myParam)"]; + + const string nullableCustomParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(MyStruct? myParam); +} +"; + yield return [nullableCustomParamConstructor, "public MyClass (NS.MyStruct? myParam)"]; + + const string refCustomParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(ref MyStruct myParam); +} +"; + yield return [refCustomParamConstructor, "public MyClass (ref NS.MyStruct myParam)"]; + + const string inCustomParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(in MyStruct myParam); +} +"; + yield return [inCustomParamConstructor, "public MyClass (in NS.MyStruct myParam)"]; + + const string refReadonlyCustomParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(ref readonly MyStruct myParam); +} +"; + yield return [refReadonlyCustomParamConstructor, "public MyClass (ref readonly NS.MyStruct myParam)"]; + + const string arrayParamConbstructor = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(MyStruct[] myParam); +} +"; + + yield return [arrayParamConbstructor, "public MyClass (NS.MyStruct[] myParam)"]; + + const string nullableArrayParamConstructor = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(MyStruct[]? myParam); +} +"; + + yield return [nullableArrayParamConstructor, "public MyClass (NS.MyStruct[]? myParam)"]; + + const string genericParamConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public MyClass(List myParam); +} +"; + + yield return [genericParamConstructor, "public MyClass (System.Collections.Generic.List myParam)"]; + + const string genericCustomParamConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(List myParam); +} +"; + + yield return [genericCustomParamConstructor, "public MyClass (System.Collections.Generic.List myParam)"]; + + const string nullableGenericParamConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public MyClass(List? myParam); +} +"; + + yield return [nullableGenericParamConstructor, "public MyClass (System.Collections.Generic.List? myParam)"]; + + const string nullableGenericCustomParamConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass(List? myParam); +} +"; + + yield return [nullableGenericCustomParamConstructor, "public MyClass (System.Collections.Generic.List? myParam)"]; + + const string nullableNullableGenericParamConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public MyClass (List? myParam); +} +"; + + yield return [nullableNullableGenericParamConstructor, "public MyClass (System.Collections.Generic.List? myParam)"]; + + const string nullableNullableGenericCustomParamConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public MyClass (List? myParam); +} +"; + + yield return [nullableNullableGenericCustomParamConstructor, "public MyClass (System.Collections.Generic.List? myParam)"]; + + + const string genericDictParamConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public MyClass (Dictionary myParam); +} +"; + + yield return [genericDictParamConstructor, "public MyClass (System.Collections.Generic.Dictionary myParam)"]; + + const string paramsConstructor = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public MyClass(params string[] data); +} +"; + + yield return [paramsConstructor, "public MyClass (params string[] data)"]; + + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + public void ToDeclarationTests (ApplePlatform platform, string inputText, string expectedDeclaration) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + Assert.True (Constructor.TryCreate (declaration, semanticModel, out var constructor)); + Assert.NotNull (constructor); + var constructorDeclaration = constructor.ToDeclaration (); + Assert.NotNull (constructorDeclaration); + Assert.Equal (expectedDeclaration, constructorDeclaration.ToString ()); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/MethodFormatterTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/MethodFormatterTests.cs new file mode 100644 index 000000000000..e7b4551843a1 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/MethodFormatterTests.cs @@ -0,0 +1,582 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using Microsoft.Macios.Generator.Formatters; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Formatters; + +public class MethodFormatterTests : BaseGeneratorTestClass { + + class TestDataToDeclaration : IEnumerable { + public IEnumerator GetEnumerator () + { + const string voidMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial void TestMethod (); +} +"; + yield return [voidMethod, "public partial void TestMethod ()"]; + + const string noSpaceParamsMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial void TestMethod(); +} +"; + yield return [noSpaceParamsMethod, "public partial void TestMethod ()"]; + + const string singleParamMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial void TestMethod(string myParam); +} +"; + yield return [singleParamMethod, "public partial void TestMethod (string myParam)"]; + + const string severalParamMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial void TestMethod(string myParam, int myParamInt); +} +"; + yield return [severalParamMethod, "public partial void TestMethod (string myParam, int myParamInt)"]; + + const string nullableParamMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial void TestMethod(string? myParam); +} +"; + yield return [nullableParamMethod, "public partial void TestMethod (string? myParam)"]; + + const string nullableReturnTypeMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial string? TestMethod(string? myParam); +} +"; + yield return [nullableReturnTypeMethod, "public partial string? TestMethod (string? myParam)"]; + + const string customReturnMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial MyStruct TestMethod(string? myParam); +} +"; + yield return [customReturnMethod, "public partial NS.MyStruct TestMethod (string? myParam)"]; + + const string nullableCustomReturnMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial MyStruct? TestMethod(string? myParam); +} +"; + yield return [nullableCustomReturnMethod, "public partial NS.MyStruct? TestMethod (string? myParam)"]; + + const string customParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(MyStruct myParam); +} +"; + yield return [customParamMethod, "public partial void TestMethod (NS.MyStruct myParam)"]; + + const string nullableCustomParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(MyStruct? myParam); +} +"; + yield return [nullableCustomParamMethod, "public partial void TestMethod (NS.MyStruct? myParam)"]; + + const string refCustomParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(ref MyStruct myParam); +} +"; + yield return [refCustomParamMethod, "public partial void TestMethod (ref NS.MyStruct myParam)"]; + + const string outCustomParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(out MyStruct myParam); +} +"; + yield return [outCustomParamMethod, "public partial void TestMethod (out NS.MyStruct myParam)"]; + + const string inCustomParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(in MyStruct myParam); +} +"; + yield return [inCustomParamMethod, "public partial void TestMethod (in NS.MyStruct myParam)"]; + + const string refReadonlyCustomParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(ref readonly MyStruct myParam); +} +"; + yield return [refReadonlyCustomParamMethod, "public partial void TestMethod (ref readonly NS.MyStruct myParam)"]; + + const string arrayParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(MyStruct[] myParam); +} +"; + + yield return [arrayParamMethod, "public partial void TestMethod (NS.MyStruct[] myParam)"]; + + const string nullableArrayParamMethod = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(MyStruct[]? myParam); +} +"; + + yield return [nullableArrayParamMethod, "public partial void TestMethod (NS.MyStruct[]? myParam)"]; + + const string genericParamMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial void TestMethod(List myParam); +} +"; + + yield return [genericParamMethod, "public partial void TestMethod (System.Collections.Generic.List myParam)"]; + + const string genericCustomParamMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(List myParam); +} +"; + + yield return [genericCustomParamMethod, "public partial void TestMethod (System.Collections.Generic.List myParam)"]; + + const string nullableGenericParamMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial void TestMethod(List? myParam); +} +"; + + yield return [nullableGenericParamMethod, "public partial void TestMethod (System.Collections.Generic.List? myParam)"]; + + const string nullableGenericCustomParamMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(List? myParam); +} +"; + + yield return [nullableGenericCustomParamMethod, "public partial void TestMethod (System.Collections.Generic.List? myParam)"]; + + const string nullableNullableGenericParamMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial void TestMethod(List? myParam); +} +"; + + yield return [nullableNullableGenericParamMethod, "public partial void TestMethod (System.Collections.Generic.List? myParam)"]; + + const string nullableNullableGenericCustomParamMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial void TestMethod(List? myParam); +} +"; + + yield return [nullableNullableGenericCustomParamMethod, "public partial void TestMethod (System.Collections.Generic.List? myParam)"]; + + const string genericDictParamMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial void TestMethod(Dictionary myParam); +} +"; + + yield return [genericDictParamMethod, "public partial void TestMethod (System.Collections.Generic.Dictionary myParam)"]; + + const string genericReturnMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial List TestMethod(); +} +"; + + yield return [genericReturnMethod, "public partial System.Collections.Generic.List TestMethod ()"]; + + const string genericCustomReturnMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} + +[BindingType] +public partial class MyClass { + public partial List TestMethod(); +} +"; + + yield return [genericCustomReturnMethod, "public partial System.Collections.Generic.List TestMethod ()"]; + + const string nullableGenericReturnMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial List? TestMethod(); +} +"; + + yield return [nullableGenericReturnMethod, "public partial System.Collections.Generic.List? TestMethod ()"]; + + const string nullableNullableGenericReturnMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial List? TestMethod(); +} +"; + + yield return [nullableNullableGenericReturnMethod, "public partial System.Collections.Generic.List? TestMethod ()"]; + + const string paramsMethod = @" +using System; +using System.Collections.Generic; +using ObjCBindings; +namespace NS; + +[BindingType] +public partial class MyClass { + public partial void TestMethod(params string[] data); +} +"; + + yield return [paramsMethod, "public partial void TestMethod (params string[] data)"]; + + + const string actionNoParam = @" +using System; + +namespace NS { + public class MyClass { + public partial void TestMethod (Action cb) {} + } +} +"; + yield return [actionNoParam, "public partial void TestMethod (System.Action cb)"]; + + const string actionSingleParam = @" +using System; + +namespace NS { + public class MyClass { + public partial void TestMethod (Action cb) {} + } +} +"; + yield return [actionSingleParam, "public partial void TestMethod (System.Action cb)"]; + + const string actionSingleNullableParam = @" +using System; + +namespace NS { + public class MyClass { + public partial void TestMethod (Action cb) {} + } +} +"; + yield return [actionSingleNullableParam, "public partial void TestMethod (System.Action cb)"]; + + const string actionMultiParam = @" +using System; + +namespace NS { + public class MyClass { + public partial void TestMethod (Action cb) {} + } +} +"; + yield return [actionMultiParam, "public partial void TestMethod (System.Action cb)"]; + + const string funcSingleParam = @" +using System; + +namespace NS { + public class MyClass { + public partial void TestMethod (Func cb) {} + } +} +"; + yield return [funcSingleParam, "public partial void TestMethod (System.Func cb)"]; + + const string customDelegate = @" +using System; + +namespace NS { + public class MyClass { + public delegate int? Callback(string name, string? middleName, params string[] surname); + + public partial void TestMethod (Callback cb) {} + } +} +"; + yield return [customDelegate, "public partial void TestMethod (NS.MyClass.Callback cb)"]; + + const string intReturnMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial int TestMethod(string myParam, int myParamInt); +} +"; + yield return [intReturnMethod, "public partial int TestMethod (string myParam, int myParamInt)"]; + + const string nullableIntReturnMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial int? TestMethod(string myParam, int myParamInt); +} +"; + yield return [nullableIntReturnMethod, "public partial int? TestMethod (string myParam, int myParamInt)"]; + + const string intPtrReturnMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial IntPtr TestMethod(string myParam, int myParamInt); +} +"; + yield return [intPtrReturnMethod, "public partial IntPtr TestMethod (string myParam, int myParamInt)"]; + + const string nullableIntPtrReturnMethod = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial IntPtr? TestMethod(string myParam, int myParamInt); +} +"; + yield return [nullableIntPtrReturnMethod, "public partial IntPtr? TestMethod (string myParam, int myParamInt)"]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + public void ToDeclarationTests (ApplePlatform platform, string inputText, string expectedDeclaration) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + Assert.True (Method.TryCreate (declaration, semanticModel, out var method)); + Assert.NotNull (method); + var methodDeclaration = method.ToDeclaration (); + Assert.NotNull (methodDeclaration); + Assert.Equal (expectedDeclaration, methodDeclaration.ToString ()); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/PropertyFormatterTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/PropertyFormatterTests.cs new file mode 100644 index 000000000000..aaa35542162d --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/PropertyFormatterTests.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using Microsoft.Macios.Generator.Formatters; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Formatters; + +public class PropertyFormatterTests : BaseGeneratorTestClass { + + class TestDataToDeclaration : IEnumerable { + public IEnumerator GetEnumerator () + { + const string stringProperty = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public string Property { get; set; } +} +"; + yield return [stringProperty, "public string Property"]; + + const string nullableStringProperty = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public string? Property { get; set; } +} +"; + yield return [nullableStringProperty, "public string? Property"]; + + + const string internalStringProperty = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + internal string Property { get; set; } +} +"; + yield return [internalStringProperty, "internal string Property"]; + + const string partialStringProperty = @" +using System; +using ObjCBindings; +namespace NS; +[BindingType] +public partial class MyClass { + public partial string Property { get; set; } +} +"; + yield return [partialStringProperty, "public partial string Property"]; + + const string nullableStructProperty = @" +using System; +using ObjCBindings; +namespace NS; + +public struct MyStruct { + public string Name; + public string Surname; +} +[BindingType] +public partial class MyClass { + public partial MyStruct? Property { get; set; } +} +"; + yield return [nullableStructProperty, "public partial NS.MyStruct? Property"]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + public void ToDeclarationTests (ApplePlatform platform, string inputText, string expectedDeclaration) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + Assert.True (Property.TryCreate (declaration, semanticModel, out var property)); + Assert.NotNull (property); + var propertyDeclaration = property.ToDeclaration (); + Assert.NotNull (propertyDeclaration); + Assert.Equal (expectedDeclaration, propertyDeclaration.ToString ()); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/SmartEnumFormatterTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/SmartEnumFormatterTests.cs new file mode 100644 index 000000000000..3293894cb3b9 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Formatters/SmartEnumFormatterTests.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.Macios.Generator.DataModel; +using Microsoft.Macios.Generator.Formatters; +using Xamarin.Tests; +using Xamarin.Utils; +using Xunit; + +namespace Microsoft.Macios.Generator.Tests.Formatters; + +public class SmartEnumFormatterTests : BaseGeneratorTestClass { + + class TestDataToExtensionDeclaration : IEnumerable { + public IEnumerator GetEnumerator () + { + const string publicSmartEnum = @" +using System; +using Foundation; +using ObjCBindings; + +namespace AVFoundation; + +[BindingType] +public enum AVCaptureDeviceType { + + [Field (""AVCaptureDeviceTypeBuiltInMicrophone"")] + BuiltInMicrophone, + + [Field (""AVCaptureDeviceTypeBuiltInWideAngleCamera"")] + BuiltInWideAngleCamera, +} +"; + yield return [publicSmartEnum, "AVCaptureDeviceTypeExtensions", "public static partial class AVCaptureDeviceTypeExtensions"]; + + const string internalSmartEnum = @" +using System; +using Foundation; +using ObjCBindings; + +namespace AVFoundation; + +[BindingType] +internal enum AVCaptureDeviceType { + + [Field (""AVCaptureDeviceTypeBuiltInMicrophone"")] + BuiltInMicrophone, + + [Field (""AVCaptureDeviceTypeBuiltInWideAngleCamera"")] + BuiltInWideAngleCamera, +} +"; + + yield return [internalSmartEnum, "AVCaptureDeviceTypeExtensions", "internal static partial class AVCaptureDeviceTypeExtensions"]; + } + + IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); + } + + [Theory] + [AllSupportedPlatformsClassData] + public void ToDeclarationTests (ApplePlatform platform, string inputText, string className, string expectedDeclaration) + { + var (compilation, syntaxTrees) = CreateCompilation (platform, sources: inputText); + Assert.Single (syntaxTrees); + var declaration = syntaxTrees [0].GetRoot () + .DescendantNodes () + .OfType () + .FirstOrDefault (); + Assert.NotNull (declaration); + var semanticModel = compilation.GetSemanticModel (syntaxTrees [0]); + Assert.NotNull (semanticModel); + var changes = CodeChanges.FromDeclaration (declaration, semanticModel); + Assert.NotNull (changes); + var classDeclaration = changes.ToSmartEnumExtensionDeclaration (className); + Assert.NotNull (classDeclaration); + var str = classDeclaration.ToString (); + Assert.Equal (expectedDeclaration, classDeclaration.ToString ()); + } +} diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Microsoft.Macios.Generator.Tests.csproj b/tests/rgen/Microsoft.Macios.Generator.Tests/Microsoft.Macios.Generator.Tests.csproj index 8e96f4bc9dbe..9571632f8d71 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/Microsoft.Macios.Generator.Tests.csproj +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Microsoft.Macios.Generator.Tests.csproj @@ -51,8 +51,12 @@ - - + + + + + + diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureDeviceTypeEnum.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureDeviceTypeEnum.cs index 4f0a3124f5c6..137621264fd4 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureDeviceTypeEnum.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureDeviceTypeEnum.cs @@ -10,7 +10,7 @@ namespace AVFoundation; [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] -static public partial class AVCaptureDeviceTypeExtensions +public static partial class AVCaptureDeviceTypeExtensions { static IntPtr[] values = new IntPtr [11]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureSystemPressureLevel.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureSystemPressureLevel.cs index 6ff213903398..ecdd60b7b700 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureSystemPressureLevel.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedAVCaptureSystemPressureLevel.cs @@ -10,7 +10,7 @@ namespace AVFoundation; [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] -static public partial class AVCaptureSystemPressureLevelExtensions +public static partial class AVCaptureSystemPressureLevelExtensions { static IntPtr[] values = new IntPtr [5]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnum.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnum.cs index 680fa985ff7b..f729baab9ef7 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnum.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnum.cs @@ -11,7 +11,7 @@ namespace CustomLibrary; [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] -static public partial class CustomLibraryEnumExtensions +public static partial class CustomLibraryEnumExtensions { static IntPtr[] values = new IntPtr [3]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnumInternal.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnumInternal.cs index 11323e6062c7..f30d1af5f75b 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnumInternal.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedCustomLibraryEnumInternal.cs @@ -11,7 +11,7 @@ namespace CustomLibrary; [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] -static public partial class CustomLibraryEnumInternalExtensions +public static partial class CustomLibraryEnumInternalExtensions { static IntPtr[] values = new IntPtr [3]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedMacOSAVMediaCharacteristics.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedMacOSAVMediaCharacteristics.cs index a3a6435fac66..d49b2def67d6 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedMacOSAVMediaCharacteristics.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectedMacOSAVMediaCharacteristics.cs @@ -15,7 +15,7 @@ namespace AVFoundation; [SupportedOSPlatform ("tvos11.0")] [SupportedOSPlatform ("maccatalyst13.1")] [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] -static public partial class AVMediaCharacteristicsExtensions +static partial class AVMediaCharacteristicsExtensions { static IntPtr[] values = new IntPtr [17]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectediOSAVMediaCharacteristics.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectediOSAVMediaCharacteristics.cs index 4905ba70858b..d66462b9bfbb 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectediOSAVMediaCharacteristics.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/Data/ExpectediOSAVMediaCharacteristics.cs @@ -15,7 +15,7 @@ namespace AVFoundation; [SupportedOSPlatform ("tvos11.0")] [SupportedOSPlatform ("maccatalyst13.1")] [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)] -static public partial class AVMediaCharacteristicsExtensions +static partial class AVMediaCharacteristicsExtensions { static IntPtr[] values = new IntPtr [18]; diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/SmartEnumDiagnosticsTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/SmartEnumDiagnosticsTests.cs index 8085f0de7acf..d4ae963e5c68 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/SmartEnumDiagnosticsTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/SmartEnum/SmartEnumDiagnosticsTests.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System.Collections; using System.Collections.Generic; using Xamarin.Tests; @@ -17,6 +19,12 @@ public class TestDataGenerator : BaseTestDataGenerator, IEnumerable { (ApplePlatform.iOS, "AVCaptureDeviceTypeExtensions", "AVCaptureDeviceTypeEnum.cs", "ExpectedAVCaptureDeviceTypeEnum.cs", null), (ApplePlatform.iOS, "AVCaptureSystemPressureLevelExtensions", "AVCaptureSystemPressureLevel.cs", "ExpectedAVCaptureSystemPressureLevel.cs", null), (ApplePlatform.iOS, "AVMediaCharacteristicsExtensions", "AVMediaCharacteristics.cs", "ExpectediOSAVMediaCharacteristics.cs", null), + (ApplePlatform.TVOS, "AVCaptureDeviceTypeExtensions", "AVCaptureDeviceTypeEnum.cs", "ExpectedAVCaptureDeviceTypeEnum.cs", null), + (ApplePlatform.TVOS, "AVCaptureSystemPressureLevelExtensions", "AVCaptureSystemPressureLevel.cs", "ExpectedAVCaptureSystemPressureLevel.cs", null), + (ApplePlatform.TVOS, "AVMediaCharacteristicsExtensions", "AVMediaCharacteristics.cs", "ExpectediOSAVMediaCharacteristics.cs", null), + (ApplePlatform.MacCatalyst, "AVCaptureDeviceTypeExtensions", "AVCaptureDeviceTypeEnum.cs", "ExpectedAVCaptureDeviceTypeEnum.cs", null), + (ApplePlatform.MacCatalyst, "AVCaptureSystemPressureLevelExtensions", "AVCaptureSystemPressureLevel.cs", "ExpectedAVCaptureSystemPressureLevel.cs", null), + (ApplePlatform.MacCatalyst, "AVMediaCharacteristicsExtensions", "AVMediaCharacteristics.cs", "ExpectediOSAVMediaCharacteristics.cs", null), (ApplePlatform.MacOSX, "AVMediaCharacteristicsExtensions", "AVMediaCharacteristics.cs", "ExpectedMacOSAVMediaCharacteristics.cs", null), (ApplePlatform.MacOSX, "CustomLibraryEnumExtensions", "CustomLibraryEnum.cs", "ExpectedCustomLibraryEnum.cs", "ExpectedCustomLibraryEnumLibrariesClass.cs"), (ApplePlatform.MacOSX, "CustomLibraryEnumInternalExtensions", "CustomLibraryEnumInternal.cs", "ExpectedCustomLibraryEnumInternal.cs", "ExpectedCustomLibraryEnumInternalLibrariesClass.cs"), @@ -48,43 +56,4 @@ public IEnumerator GetEnumerator () public void ExtensionGenerationTests (ApplePlatform platform, string className, string inputFileName, string inputText, string outputFileName, string expectedOutputText, string? expectedLibraryText) => CompareGeneratedCode (platform, className, inputFileName, inputText, outputFileName, expectedOutputText, expectedLibraryText); - [Theory] - [AllSupportedPlatforms] - public void DuplicatedSymbolsDoNotGenerateCode (ApplePlatform platform) - { - const string inputText = @" -using Foundation; -using ObjCRuntime; -using ObjCBindings; - -namespace AVFoundation; - -[BindingType] -public enum AVCaptureSystemPressureExampleLevel { - [Field (""AVCaptureSystemPressureLevelNominal"")] - Nominal, - - // duplicated, this should be an error - [Field (""AVCaptureSystemPressureLevelNominal"")] - Fair, - - [Field (""AVCaptureSystemPressureLevelSerious"")] - Serious, - - [Field (""AVCaptureSystemPressureLevelCritical"")] - Critical, - - [Field (""AVCaptureSystemPressureLevelShutdown"")] - Shutdown, -}"; - - // We need to create a compilation with the required source code. - var (compilation, _) = CreateCompilation (nameof (CompareGeneratedCode), platform, inputText); - - // Run generators and retrieve all results. - var runResult = RunGenerators (compilation); - - // bad formed bindings should not generate code - Assert.Empty (runResult.GeneratedTrees); - } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/TabbedStringBuilderTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/TabbedStringBuilderTests.cs index 8e8c067f0ea2..0f37aa02be93 100644 --- a/tests/rgen/Microsoft.Macios.Generator.Tests/TabbedStringBuilderTests.cs +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/TabbedStringBuilderTests.cs @@ -1,5 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. using System; using System.Collections.Generic; +using System.ComponentModel; using System.Text; using Microsoft.Macios.Generator.Attributes; using Microsoft.Macios.Generator.Availability; @@ -161,16 +164,32 @@ public void AppendGeneratedCodeAttributeOptimizableTest (uint tabCount, string e Assert.Equal (expected, result); } + [Theory] + [InlineData (EditorBrowsableState.Advanced, 0, "")] + [InlineData (EditorBrowsableState.Never, 1, "\t")] + [InlineData (EditorBrowsableState.Always, 5, "\t\t\t\t\t")] + public void AppendEditorBrowsableAttributeTest (EditorBrowsableState state, uint tabCount, string expectedTabs) + { + var expected = $"{expectedTabs}[EditorBrowsable (EditorBrowsableState.{state})]\n"; + string result; + using (var block = new TabbedStringBuilder (sb, tabCount)) { + block.AppendEditorBrowsableAttribute (state); + result = block.ToString (); + } + + Assert.Equal (expected, result); + } + [Theory] [InlineData (0, "")] [InlineData (1, "\t")] [InlineData (5, "\t\t\t\t\t")] - public void AppendEditorBrowsableAttributeTest (uint tabCount, string expectedTabs) + public void AppendDesignatedInitializer (uint tabCount, string expectedTabs) { - var expected = $"{expectedTabs}[EditorBrowsable (EditorBrowsableState.Never)]\n"; + var expected = $"{expectedTabs}[DesignatedInitializer]\n"; string result; using (var block = new TabbedStringBuilder (sb, tabCount)) { - block.AppendEditorBrowsableAttribute (); + block.AppendDesignatedInitializer (); result = block.ToString (); } @@ -298,4 +317,15 @@ void AppendMemberAvailabilityTest (SymbolAvailability availability, string expec var result = block.ToString (); Assert.Equal (expectedString, result); } + + [Fact] + public void ClearTests () + { + var block = new TabbedStringBuilder (sb); + var line = "My Line"; + block.Append (line); + Assert.Equal (line, block.ToString ()); + block.Clear (); + Assert.Equal (string.Empty, block.ToString ()); + } } diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/TestDataFactory.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/TestDataFactory.cs new file mode 100644 index 000000000000..f64d79ad80e8 --- /dev/null +++ b/tests/rgen/Microsoft.Macios.Generator.Tests/TestDataFactory.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +#pragma warning disable APL0003 +using Microsoft.CodeAnalysis; +using TypeInfo = Microsoft.Macios.Generator.DataModel.TypeInfo; + +namespace Microsoft.Macios.Generator.Tests; + +static class TestDataFactory { + + public static TypeInfo ReturnTypeForString () + => new ( + name: "string", + specialType: SpecialType.System_String, + isNullable: false, + isBlittable: false, + isSmartEnum: false, + isArray: false, + isReferenceType: true + ) { + Interfaces = [ + "System.Collections.Generic.IEnumerable", + "System.Collections.IEnumerable", + "System.ICloneable", + "System.IComparable", + "System.IComparable", + "System.IConvertible", + "System.IEquatable", + "System.IParsable", + "System.ISpanParsable" + ], + MetadataName = "String", + Parents = ["object"], + IsNSObject = false, + IsINativeObject = false, + }; + + public static TypeInfo ReturnTypeForInt (bool isNullable = false) + => new ( + name: "int", + specialType: SpecialType.System_Int32, + isBlittable: !isNullable, + isNullable: isNullable + ) { + Parents = ["System.ValueType", "object"], + Interfaces = isNullable + ? [] + : [ + "System.IComparable", + "System.IComparable", + "System.IConvertible", + "System.IEquatable", + "System.IFormattable", + "System.IParsable", + "System.ISpanFormattable", + "System.ISpanParsable", + "System.IUtf8SpanFormattable", + "System.IUtf8SpanParsable", + "System.Numerics.IAdditionOperators", + "System.Numerics.IAdditiveIdentity", + "System.Numerics.IBinaryInteger", + "System.Numerics.IBinaryNumber", + "System.Numerics.IBitwiseOperators", + "System.Numerics.IComparisonOperators", + "System.Numerics.IEqualityOperators", + "System.Numerics.IDecrementOperators", + "System.Numerics.IDivisionOperators", + "System.Numerics.IIncrementOperators", + "System.Numerics.IModulusOperators", + "System.Numerics.IMultiplicativeIdentity", + "System.Numerics.IMultiplyOperators", + "System.Numerics.INumber", + "System.Numerics.INumberBase", + "System.Numerics.ISubtractionOperators", + "System.Numerics.IUnaryNegationOperators", + "System.Numerics.IUnaryPlusOperators", + "System.Numerics.IShiftOperators", + "System.Numerics.IMinMaxValue", + "System.Numerics.ISignedNumber" + ], + MetadataName = "Int32", + }; + + public static TypeInfo ReturnTypeForIntPtr (bool isNullable = false) + => new ( + name: "nint", + specialType: SpecialType.System_IntPtr, + isBlittable: !isNullable, + isNullable: isNullable + ) { + Parents = ["System.ValueType", "object"], + Interfaces = isNullable + ? [] + : [ + "System.IComparable", + "System.IComparable", + "System.IEquatable", + "System.IFormattable", + "System.IParsable", + "System.ISpanFormattable", + "System.ISpanParsable", + "System.IUtf8SpanFormattable", + "System.IUtf8SpanParsable", + "System.Numerics.IAdditionOperators", + "System.Numerics.IAdditiveIdentity", + "System.Numerics.IBinaryInteger", + "System.Numerics.IBinaryNumber", + "System.Numerics.IBitwiseOperators", + "System.Numerics.IComparisonOperators", + "System.Numerics.IEqualityOperators", + "System.Numerics.IDecrementOperators", + "System.Numerics.IDivisionOperators", + "System.Numerics.IIncrementOperators", + "System.Numerics.IModulusOperators", + "System.Numerics.IMultiplicativeIdentity", + "System.Numerics.IMultiplyOperators", + "System.Numerics.INumber", + "System.Numerics.INumberBase", + "System.Numerics.ISubtractionOperators", + "System.Numerics.IUnaryNegationOperators", + "System.Numerics.IUnaryPlusOperators", + "System.Numerics.IShiftOperators", + "System.Numerics.IMinMaxValue", + "System.Numerics.ISignedNumber", + "System.Runtime.Serialization.ISerializable" + ], + MetadataName = "IntPtr", + }; + + public static TypeInfo ReturnTypeForBool () + => new ( + name: "bool", + specialType: SpecialType.System_Boolean, + isBlittable: false + ) { + Parents = ["System.ValueType", "object"], + Interfaces = [ + "System.IComparable", + "System.IComparable", + "System.IConvertible", + "System.IEquatable", + "System.IParsable", + "System.ISpanParsable" + ], + MetadataName = "Boolean", + }; + + public static TypeInfo ReturnTypeForVoid () + => new ("void", SpecialType.System_Void) { + Parents = ["System.ValueType", "object"], + }; + + public static TypeInfo ReturnTypeForClass (string className) + => new ( + name: className, + isReferenceType: true + ) { + Parents = ["object"] + }; + + public static TypeInfo ReturnTypeForStruct (string structName) + => new ( + name: structName + ) { + Parents = ["System.ValueType", "object"] + }; + + public static TypeInfo ReturnTypeForEnum (string enumName, bool isSmartEnum = false) + => new ( + name: enumName, + isBlittable: true, + isSmartEnum: isSmartEnum + ) { + Parents = [ + "System.Enum", + "System.ValueType", + "object" + ], + Interfaces = [ + "System.IComparable", + "System.IConvertible", + "System.IFormattable", + "System.ISpanFormattable" + ], + EnumUnderlyingType = SpecialType.System_Int32, + }; + + public static TypeInfo ReturnTypeForArray (string type, bool isNullable = false, bool isBlittable = false) + => new ( + name: type, + isNullable: isNullable, + isBlittable: isBlittable, + isArray: true, + isReferenceType: true + ) { + Parents = ["System.Array", "object"], + Interfaces = [ + $"System.Collections.Generic.IList<{type}>", + $"System.Collections.Generic.IReadOnlyList<{type}>", + "System.Collections.ICollection", + "System.Collections.IEnumerable", + "System.Collections.IList", + "System.Collections.IStructuralComparable", + "System.Collections.IStructuralEquatable", + "System.ICloneable" + ] + }; +} diff --git a/tests/rgen/Microsoft.Macios.Transformer.Tests/UnitTest1.cs b/tests/rgen/Microsoft.Macios.Transformer.Tests/UnitTest1.cs index ab641d95d35c..327ca91936b7 100644 --- a/tests/rgen/Microsoft.Macios.Transformer.Tests/UnitTest1.cs +++ b/tests/rgen/Microsoft.Macios.Transformer.Tests/UnitTest1.cs @@ -1,3 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. namespace Microsoft.Macios.Transformer.Tests; public class UnitTest1 { diff --git a/tests/test-libraries/Makefile b/tests/test-libraries/Makefile index 1110aa4154cf..4fe45ec5d5aa 100644 --- a/tests/test-libraries/Makefile +++ b/tests/test-libraries/Makefile @@ -17,11 +17,13 @@ TEST_FRAMEWORKS+=XTest TEST_FRAMEWORKS+=XStaticArTest TEST_FRAMEWORKS+=XStaticObjectTest TEST_FRAMEWORKS+=SwiftTest +TEST_FRAMEWORKS+=SwiftTest2 DYNAMIC_TEST_FRAMEWORKS+=XTest STATIC_AR_TEST_FRAMEWORKS+=XStaticArTest STATIC_OBJECT_TEST_FRAMEWORKS+=XStaticObjectTest DYNAMIC_TEST_FRAMEWORKS+=SwiftTest +DYNAMIC_TEST_FRAMEWORKS+=SwiftTest2 GENERATED_FILES = \ libtest.structs.h \ @@ -42,8 +44,10 @@ GENERATED_FILES_PATTERN = \ TrampolineTest.generated%cs \ TESTGENERATOR=bin/Debug/testgenerator.dll +$(TESTGENERATOR): export RUNTIMEIDENTIFIER= +$(TESTGENERATOR): export RUNTIMEIDENTIFIERS= $(TESTGENERATOR): testgenerator.cs Makefile - $(Q) unset MSBUILD_EXE_PATH && $(DOTNET) build testgenerator.csproj $(DOTNET_BUILD_VERBOSITY) + $(Q) unset MSBUILD_EXE_PATH && $(DOTNET) build testgenerator.csproj $(DOTNET_BUILD_VERBOSITY) /bl:$@.binlog $(GENERATED_FILES_PATTERN): $(TESTGENERATOR) $(Q) $(DOTNET) exec $< @@ -64,6 +68,7 @@ TEST_FRAMEWORK_$(1)_$(2)_TARGETS += \ .libs/$(1)/$(2).framework$($(1)_BINARY_INFIX)/$(2): .libs/$(1)/lib$(2).dylib | .libs/$(1)/$(2).framework$($(1)_BINARY_INFIX) $$(Q) $(CP) $$^ $$@ $$(Q) $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool -id @rpath/$(2).framework/$(2) $$@ + $$(Q) for lib in $$(DYNAMIC_TEST_FRAMEWORKS); do $(XCODE_DEVELOPER_ROOT)/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool -change .libs/$(1)/lib$$$$lib.dylib @rpath/$$$$lib.framework/$$$$lib $$@; done .libs/$(1)/$(2).framework$($(1)_INFO_PLIST_INFIX)/Info.plist: plists/$(2)-Info-$(1).plist | .libs/$(1)/$(2).framework$($(1)_INFO_PLIST_INFIX) $$(Q) $(CP) $$^ $$@ @@ -305,9 +310,12 @@ $(foreach platform,$(DOTNET_PLATFORMS),$(foreach rid,$(DOTNET_$(shell echo $(pla # EXTRA_libSwiftTest_FLAGS=-enable-library-evolution -emit-objc-header +EXTRA_libSwiftTest2_FLAGS=-emit-objc-header -lSwiftTest # SwiftTest is a framework where the binary code is a (fat) dynamic library SWIFT_TESTS+=SwiftTest +# SwiftTest2 is a framework where the binary code is a (fat) dynamic library, and which depends on SwiftTest. +SWIFT_TESTS+=SwiftTest2 define SwiftTestsPerPlatform .libs/$(1)/$(3).dylib: $$(foreach rid,$(2),.libs/$(1)/$(3).dylib) | .libs/$(1) @@ -315,10 +323,16 @@ define SwiftTestsPerPlatform endef $(foreach swiftTest,$(SWIFT_TESTS),$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(call SwiftTestsPerPlatform,$(platform),$(DOTNET_$(shell echo $(platform) | tr 'a-z' 'A-Z')_RUNTIME_IDENTIFIERS),$(swiftTest))))) +# Make sure libSwiftTest is built before libSwiftTest2, because libSwiftTest2 depends on libSwiftTest +define SwiftTest2AddDependency +.libs/$(1)/libSwiftTest2.dylib: .libs/$(1)/libSwiftTest.dylib +endef +$(foreach rid,$(DOTNET_RUNTIME_IDENTIFIERS),$(eval $(call SwiftTest2AddDependency,$(rid)))) + # create an xcframework of frameworks define TestFrameworkXCFramework $(1)_XCFRAMEWORKS += $$(foreach xcframeworkPlatform,$$(XCFRAMEWORK_PLATFORMS),.libs/$$(xcframeworkPlatform)/$(1).framework) -$(1)_XCTARGETS += $$(foreach xcframeworkPlatform,$$(XCFRAMEWORK_PLATFORMS),.libs/$$(xcframeworkPlatform)/$(1).framework/$(1)) +$(1)_XCTARGETS += $$(foreach xcframeworkPlatform,$$(XCFRAMEWORK_PLATFORMS),.libs/$$(xcframeworkPlatform)/$(1).framework.stamp) .libs/$(1).xcframework: $$($(1)_XCTARGETS) Makefile $$(Q) rm -rf $$@ $$(Q_GEN) $$(XCODE_DEVELOPER_ROOT)/usr/bin/xcodebuild -quiet -create-xcframework $$(foreach fw,$$($(1)_XCFRAMEWORKS),-framework $$(fw)) -output $$@ diff --git a/tests/test-libraries/frameworks/Makefile b/tests/test-libraries/frameworks/Makefile index 56efff206d0f..6e7a256ad86e 100644 --- a/tests/test-libraries/frameworks/Makefile +++ b/tests/test-libraries/frameworks/Makefile @@ -20,10 +20,10 @@ XPCSERVICES=XpcServiceE CompressedXpcServiceF XpcServiceG CompressedXpcServiceH # a few lookup tables, because the data we have is not always in the format we need it COMMON_DYLIB_ARGS=-g -dynamiclib -gdwarf-2 -fms-extensions shared.c -Wall -framework Foundation -lz -iphonesimulator_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(iossimulator_SDK) -iphoneos_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -miphoneos-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(ios_SDK) -tvsimulator_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION) -isysroot $(tvossimulator_SDK) -tvos_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -mtvos-version-min=$(MIN_TVOS_SDK_VERSION) -isysroot $(tvos_SDK) +iphonesimulator_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION) -isysroot $(iossimulator_SDK) +iphoneos_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -miphoneos-version-min=$(DOTNET_MIN_IOS_SDK_VERSION) -isysroot $(ios_SDK) +tvsimulator_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION) -isysroot $(tvossimulator_SDK) +tvos_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -mtvos-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION) -isysroot $(tvos_SDK) maccatalyst_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) $(maccatalyst_CFLAGS) mac_DYLIB_FLAGS=$(COMMON_DYLIB_ARGS) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC) -isysroot $(XCODE_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(OSX_SDK_VERSION).sdk diff --git a/tests/test-libraries/libSwiftTest.swift b/tests/test-libraries/libSwiftTest.swift index a674cc709c61..3637942cfdfc 100644 --- a/tests/test-libraries/libSwiftTest.swift +++ b/tests/test-libraries/libSwiftTest.swift @@ -2,7 +2,7 @@ import Foundation @objc(SwiftTestClass) @available(iOS 15, tvOS 15, macOS 12, macCatalyst 12, *) -public class SwiftTestClass : NSObject { +open class SwiftTestClass : NSObject { @objc public func SayHello() -> String { return "Hello from Swift" diff --git a/tests/test-libraries/libSwiftTest2.swift b/tests/test-libraries/libSwiftTest2.swift new file mode 100644 index 000000000000..083abb167d68 --- /dev/null +++ b/tests/test-libraries/libSwiftTest2.swift @@ -0,0 +1,11 @@ +import Foundation +import libSwiftTest + +@objc(SwiftTestClass2) +@available(iOS 15, tvOS 15, macOS 12, macCatalyst 12, *) +open class SwiftTestClass2 : SwiftTestClass { + @objc + public func SayHello2() -> String { + return "Hello from Swift 2" + } +} diff --git a/tests/test-libraries/libraries/Makefile b/tests/test-libraries/libraries/Makefile index 4544396f8a1a..f0f0cddf86d4 100644 --- a/tests/test-libraries/libraries/Makefile +++ b/tests/test-libraries/libraries/Makefile @@ -10,10 +10,10 @@ NO_INSTALL_NAME_TOOL_SkipInstallNameTool=1 # a few lookup tables, because the data we have is not always in the format we need it COMMON_ARGS=-g -gdwarf-2 -fms-extensions shared.c -Wall -iphonesimulator_COMPILER_FLAGS=$(COMMON_ARGS) -mios-simulator-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(iossimulator_SDK) -iphoneos_COMPILER_FLAGS=$(COMMON_ARGS) -miphoneos-version-min=$(MIN_IOS_SDK_VERSION) -isysroot $(ios_SDK) -tvsimulator_COMPILER_FLAGS=$(COMMON_ARGS) -mtvos-simulator-version-min=$(MIN_TVOS_SDK_VERSION) -isysroot $(tvossimulator_SDK) -tvos_COMPILER_FLAGS=$(COMMON_ARGS) -mtvos-version-min=$(MIN_TVOS_SDK_VERSION) -isysroot $(tvos_SDK) +iphonesimulator_COMPILER_FLAGS=$(COMMON_ARGS) -mios-simulator-version-min=$(DOTNET_MIN_IOS_SDK_VERSION) -isysroot $(iossimulator_SDK) +iphoneos_COMPILER_FLAGS=$(COMMON_ARGS) -miphoneos-version-min=$(DOTNET_MIN_IOS_SDK_VERSION) -isysroot $(ios_SDK) +tvsimulator_COMPILER_FLAGS=$(COMMON_ARGS) -mtvos-simulator-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION) -isysroot $(tvossimulator_SDK) +tvos_COMPILER_FLAGS=$(COMMON_ARGS) -mtvos-version-min=$(DOTNET_MIN_TVOS_SDK_VERSION) -isysroot $(tvos_SDK) maccatalyst_COMPILER_FLAGS=$(COMMON_ARGS) $(maccatalyst_CFLAGS) mac_COMPILER_FLAGS=$(COMMON_ARGS) -mmacosx-version-min=$(MIN_OSX_VERSION_FOR_MAC) -isysroot $(XCODE_DEVELOPER_ROOT)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(OSX_SDK_VERSION).sdk diff --git a/tests/test-libraries/plists/SwiftTest2-Info-ios-arm64.plist b/tests/test-libraries/plists/SwiftTest2-Info-ios-arm64.plist new file mode 100644 index 000000000000..881437108650 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-ios-arm64.plist @@ -0,0 +1,57 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + CFBundleSupportedPlatforms + + iPhoneOS + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + iphoneos + DTPlatformVersion + 8.2 + DTSDKBuild + 12D508 + DTSDKName + iphoneos8.2 + DTXcode + 0620 + DTXcodeBuild + 6C131e + MinimumOSVersion + 12.2 + UIDeviceFamily + + 1 + 2 + + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-iossimulator-arm64.plist b/tests/test-libraries/plists/SwiftTest2-Info-iossimulator-arm64.plist new file mode 100644 index 000000000000..881437108650 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-iossimulator-arm64.plist @@ -0,0 +1,57 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + CFBundleSupportedPlatforms + + iPhoneOS + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + iphoneos + DTPlatformVersion + 8.2 + DTSDKBuild + 12D508 + DTSDKName + iphoneos8.2 + DTXcode + 0620 + DTXcodeBuild + 6C131e + MinimumOSVersion + 12.2 + UIDeviceFamily + + 1 + 2 + + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-iossimulator-x64.plist b/tests/test-libraries/plists/SwiftTest2-Info-iossimulator-x64.plist new file mode 100644 index 000000000000..881437108650 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-iossimulator-x64.plist @@ -0,0 +1,57 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + CFBundleSupportedPlatforms + + iPhoneOS + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + iphoneos + DTPlatformVersion + 8.2 + DTSDKBuild + 12D508 + DTSDKName + iphoneos8.2 + DTXcode + 0620 + DTXcodeBuild + 6C131e + MinimumOSVersion + 12.2 + UIDeviceFamily + + 1 + 2 + + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-maccatalyst-arm64.plist b/tests/test-libraries/plists/SwiftTest2-Info-maccatalyst-arm64.plist new file mode 100644 index 000000000000..6f391c9caca8 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-maccatalyst-arm64.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + macosx + DTPlatformVersion + 10.15 + DTSDKBuild + 12D508 + DTSDKName + macosx10.15 + DTXcode + 0620 + DTXcodeBuild + 6C131e + LSMinimumSystemVersion + 12.0 + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-maccatalyst-x64.plist b/tests/test-libraries/plists/SwiftTest2-Info-maccatalyst-x64.plist new file mode 100644 index 000000000000..6f391c9caca8 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-maccatalyst-x64.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + macosx + DTPlatformVersion + 10.15 + DTSDKBuild + 12D508 + DTSDKName + macosx10.15 + DTXcode + 0620 + DTXcodeBuild + 6C131e + LSMinimumSystemVersion + 12.0 + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-osx-arm64.plist b/tests/test-libraries/plists/SwiftTest2-Info-osx-arm64.plist new file mode 100644 index 000000000000..11251fcc2f07 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-osx-arm64.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + macosx + DTPlatformVersion + 10.9 + DTSDKBuild + 12D508 + DTSDKName + macosx10.9 + DTXcode + 0620 + DTXcodeBuild + 6C131e + LSMinimumSystemVersion + 12.0 + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-osx-x64.plist b/tests/test-libraries/plists/SwiftTest2-Info-osx-x64.plist new file mode 100644 index 000000000000..11251fcc2f07 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-osx-x64.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + macosx + DTPlatformVersion + 10.9 + DTSDKBuild + 12D508 + DTSDKName + macosx10.9 + DTXcode + 0620 + DTXcodeBuild + 6C131e + LSMinimumSystemVersion + 12.0 + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-tvos-arm64.plist b/tests/test-libraries/plists/SwiftTest2-Info-tvos-arm64.plist new file mode 100644 index 000000000000..89115e680b78 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-tvos-arm64.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + CFBundleSupportedPlatforms + + AppleTVOS + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + appletvos + DTPlatformVersion + 9.0 + DTSDKBuild + 12D508 + DTSDKName + appletvos9.0 + DTXcode + 0620 + DTXcodeBuild + 6C131e + MinimumOSVersion + 12.2 + UIDeviceFamily + + 3 + + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-tvossimulator-arm64.plist b/tests/test-libraries/plists/SwiftTest2-Info-tvossimulator-arm64.plist new file mode 100644 index 000000000000..89115e680b78 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-tvossimulator-arm64.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + CFBundleSupportedPlatforms + + AppleTVOS + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + appletvos + DTPlatformVersion + 9.0 + DTSDKBuild + 12D508 + DTSDKName + appletvos9.0 + DTXcode + 0620 + DTXcodeBuild + 6C131e + MinimumOSVersion + 12.2 + UIDeviceFamily + + 3 + + + diff --git a/tests/test-libraries/plists/SwiftTest2-Info-tvossimulator-x64.plist b/tests/test-libraries/plists/SwiftTest2-Info-tvossimulator-x64.plist new file mode 100644 index 000000000000..89115e680b78 --- /dev/null +++ b/tests/test-libraries/plists/SwiftTest2-Info-tvossimulator-x64.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleIdentifier + xamarin.ios.swifttest2 + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SwiftTest2 + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.12 + NSPrincipalClass + + CFBundleExecutable + SwiftTest2 + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + CFBundleSupportedPlatforms + + AppleTVOS + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D508 + DTPlatformName + appletvos + DTPlatformVersion + 9.0 + DTSDKBuild + 12D508 + DTSDKName + appletvos9.0 + DTXcode + 0620 + DTXcodeBuild + 6C131e + MinimumOSVersion + 12.2 + UIDeviceFamily + + 3 + + + diff --git a/tests/xcframework-test/dotnet/shared.csproj b/tests/xcframework-test/dotnet/shared.csproj index 669ae673d384..1faa644c5b90 100644 --- a/tests/xcframework-test/dotnet/shared.csproj +++ b/tests/xcframework-test/dotnet/shared.csproj @@ -14,6 +14,10 @@ $(DefineConstants);DEBUG latest + + + true + Nullable diff --git a/tests/xharness/.vscode/launch.json b/tests/xharness/.vscode/launch.json index 085b39d60515..f3c709410174 100644 --- a/tests/xharness/.vscode/launch.json +++ b/tests/xharness/.vscode/launch.json @@ -13,7 +13,6 @@ "args": [ "--verbose", "--jenkins:server", - "--autoconf", "--rootdir", "..", ], diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index 3591dec744da..c9bcac43b55f 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -28,12 +28,11 @@ public enum HarnessAction { } public class HarnessConfiguration { - public bool AutoConf { get; set; } public string BuildConfiguration { get; set; } = "Debug"; public bool DryRun { get; set; } public Dictionary EnvironmentVariables { get; set; } = new Dictionary (); public bool? IncludeSystemPermissionTests { get; set; } - public List IOSTestProjects { get; set; } = new List (); + public List TestProjects { get; set; } = new List (); public string JenkinsConfiguration { get; set; } public HashSet Labels { get; set; } = new HashSet (); public string LogDirectory { get; set; } = Environment.CurrentDirectory; @@ -195,11 +194,9 @@ string GetVariable (string variable, string @default = null) return result; } - public List IOSTestProjects { get; } - public List MacTestProjects { get; } = new List (); + public List TestProjects { get; } = new (); readonly bool useSystemXamarinIOSMac; // if the system XI/XM should be used, or the locally build XI/XM. - readonly bool autoConf; public bool INCLUDE_IOS { get; } public bool INCLUDE_TVOS { get; } @@ -209,6 +206,10 @@ string GetVariable (string variable, string @default = null) public string DOTNET_DIR { get; set; } public string DOTNET_TFM { get; set; } + public Version DotNetVersion { + get => Version.Parse (DOTNET_TFM.Replace ("net", "")); + } + // Run public string XcodeRoot { get; private set; } @@ -236,11 +237,10 @@ public Harness (IResultParser resultParser, HarnessAction action, HarnessConfigu if (configuration is null) throw new ArgumentNullException (nameof (configuration)); - autoConf = configuration.AutoConf; buildConfiguration = configuration.BuildConfiguration ?? throw new ArgumentNullException (nameof (configuration)); DryRun = configuration.DryRun; IncludeSystemPermissionTests = configuration.IncludeSystemPermissionTests; - IOSTestProjects = configuration.IOSTestProjects; + TestProjects = configuration.TestProjects; JenkinsConfiguration = configuration.JenkinsConfiguration; LogDirectory = configuration.LogDirectory ?? throw new ArgumentNullException (nameof (configuration.LogDirectory)); MarkdownSummaryPath = configuration.MarkdownSummaryPath; @@ -323,82 +323,217 @@ static string FindXcode (string path) } while (true); } - void AutoConfigureDotNet () + void PopulateTests () { - string [] noConfigurations = null; - var debugAndRelease = new string [] { "Debug", "Release" }; + PopulatePlatformSpecificProjects (); + PopulateUnitTestProjects (); + } - var projects = new [] { - new { Label = TestLabel.Introspection ,ProjectPath = "introspection", IsFSharp = false, Configurations = noConfigurations, }, - new { Label = TestLabel.Monotouch, ProjectPath = "monotouch-test", IsFSharp = false, Configurations = noConfigurations, }, - new { Label = TestLabel.Linker,ProjectPath = Path.Combine ("linker", "ios", "dont link"), IsFSharp = false, Configurations = debugAndRelease, }, - new { Label = TestLabel.Linker,ProjectPath = Path.Combine ("linker", "ios", "link sdk"), IsFSharp = false, Configurations = debugAndRelease, }, - new { Label = TestLabel.Linker,ProjectPath = Path.Combine ("linker", "ios", "link all"), IsFSharp = false, Configurations = debugAndRelease, }, - new { Label = TestLabel.Linker,ProjectPath = Path.Combine ("linker", "ios", "trimmode copy"), IsFSharp = false, Configurations = debugAndRelease, }, - new { Label = TestLabel.Linker, ProjectPath = Path.Combine ("linker", "ios", "trimmode link"), IsFSharp = false, Configurations = debugAndRelease, }, - new { Label = TestLabel.Fsharp, ProjectPath = "fsharp", IsFSharp = true, Configurations = noConfigurations, }, - new { Label = TestLabel.Framework, ProjectPath = "framework-test", IsFSharp = false, Configurations = noConfigurations, }, - new { Label = TestLabel.InterdependentBindingProjects, ProjectPath = "interdependent-binding-projects", IsFSharp = false, Configurations = noConfigurations, }, - new { Label = TestLabel.Xcframework, ProjectPath = "xcframework-test", IsFSharp = false, Configurations = noConfigurations, }, + void PopulateUnitTestProjects () + { + var projectInfos = new [] { + new { + Label = TestLabel.Msbuild, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "msbuild", "Xamarin.MacDev.Tasks.Tests", "Xamarin.MacDev.Tasks.Tests.csproj")), + Name = "MSBuild tasks tests", + Timeout = (TimeSpan?) TimeSpan.FromMinutes (60), + Filter = "", + }, + new { + Label = TestLabel.Msbuild, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "msbuild", "Xamarin.MacDev.Tests", "Xamarin.MacDev.Tests.csproj")), + Name = "MSBuild integration tests", + Timeout = (TimeSpan?) TimeSpan.FromMinutes (120), + Filter = "", + }, + new { + Label = TestLabel.Cecil, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "cecil-tests", "cecil-tests.csproj")), + Name = "Cecil-based tests", + Timeout = (TimeSpan?) TimeSpan.FromMinutes (10), + Filter = "", + }, + new { + Label = TestLabel.Generator, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "bgen", "bgen-tests.csproj")), + Name = "BGen tests", + Timeout = (TimeSpan?) null, + Filter = "", + }, + new { + Label = TestLabel.Generator, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Generator.Tests", "Microsoft.Macios.Generator.Tests.csproj")), + Name = "Roslyn Generator tests", + Timeout = (TimeSpan?) null, + Filter = "", + }, + new { + Label = TestLabel.Generator, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Bindings.Analyzer.Tests", "Microsoft.Macios.Bindings.Analyzer.Tests.csproj")), + Name = "Roslyn Analyzer tests", + Timeout = (TimeSpan?) null, + Filter = "", + }, + new { + Label = TestLabel.Generator, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Transformer.Tests", "Microsoft.Macios.Transformer.Tests.csproj")), + Name = "Roslyn Transformer tests", + Timeout = (TimeSpan?) null, + Filter = "", + }, + new { + Label = TestLabel.Generator, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Bindings.CodeFixers.Tests", "Microsoft.Macios.Bindings.CodeFixers.Tests.csproj")), + Name = "Roslyn Codefixers tests", + Timeout = (TimeSpan?) null, + Filter = "", + }, + new { + Label = TestLabel.DotnetTest, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "dotnet", "UnitTests", "DotNetUnitTests.csproj")), + Name = "DotNet tests", + Timeout = (TimeSpan?) TimeSpan.FromMinutes (165 /* 2h45m: to time out here before the CI job does at 3h */), + Filter = "Category!=Windows", + }, + new { + Label = TestLabel.Xtro, + ProjectPath = Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "xtro-sharpie", "UnitTests", "UnitTests.csproj")), + Name = "Xtro", + Timeout = (TimeSpan?) TimeSpan.FromMinutes (15), + Filter = "", + }, }; - var iOSSkip = new TestLabel [] { - TestLabel.Framework, - }; - var tvOSSkip = new TestLabel [] { - TestLabel.Framework, - }; - var macOSSkip = new TestLabel [] { - }; - var macCatalystSkip = new TestLabel [] { + foreach (var projectInfo in projectInfos) { + var project = new TestProject (projectInfo.Label, projectInfo.ProjectPath) { + TestPlatform = TestPlatform.All, + IsExecutableProject = false, + Name = projectInfo.Name, + }; + if (projectInfo.Timeout is not null) + project.Timeout = projectInfo.Timeout.Value; + TestProjects.Add (project); + } + } + + void PopulatePlatformSpecificProjects () + { + string [] noConfigurations = null; + var debugAndRelease = new string [] { "Debug", "Release" }; + + var projectInfos = new [] { + new { + Label = TestLabel.Introspection, + Platforms = TestPlatform.All, + ProjectPath = "introspection", + IsFSharp = false, + Configurations = noConfigurations, + }, + new { + Label = TestLabel.Monotouch, + Platforms = TestPlatform.All, + ProjectPath = "monotouch-test", + IsFSharp = false, + Configurations = noConfigurations, + }, + new { + Label = TestLabel.Linker, + Platforms = TestPlatform.All, + ProjectPath = Path.Combine ("linker", "ios", "dont link"), + IsFSharp = false, + Configurations = debugAndRelease, + }, + new { + Label = TestLabel.Linker, + Platforms = TestPlatform.All, + ProjectPath = Path.Combine ("linker", "ios", "link sdk"), + IsFSharp = false, + Configurations = debugAndRelease, + }, + new { + Label = TestLabel.Linker, + Platforms = TestPlatform.All, + ProjectPath = Path.Combine ("linker", "ios", "link all"), + IsFSharp = false, + Configurations = debugAndRelease, + }, + new { + Label = TestLabel.Linker, + Platforms = TestPlatform.All, + ProjectPath = Path.Combine ("linker", "ios", "trimmode copy"), + IsFSharp = false, + Configurations = debugAndRelease, + }, + new { + Label = TestLabel.Linker, + Platforms = TestPlatform.All, + ProjectPath = Path.Combine ("linker", "ios", "trimmode link"), + IsFSharp = false, + Configurations = debugAndRelease, + }, + new { + Label = TestLabel.Fsharp, + Platforms = TestPlatform.All, + ProjectPath = "fsharp", + IsFSharp = true, + Configurations = noConfigurations, + }, + new { + Label = TestLabel.Framework, + Platforms = TestPlatform.Mac | TestPlatform.MacCatalyst, + ProjectPath = "framework-test", + IsFSharp = false, + Configurations = noConfigurations, + }, + new { + Label = TestLabel.InterdependentBindingProjects, + Platforms = TestPlatform.All, + ProjectPath = "interdependent-binding-projects", + IsFSharp = false, + Configurations = noConfigurations, + }, + new { + Label = TestLabel.Xcframework, + Platforms = TestPlatform.All, + ProjectPath = "xcframework-test", + IsFSharp = false, + Configurations = noConfigurations, + }, }; - // If .NET is not enabled, then ignore, otherwise leave undecided for other code to determine. - foreach (var projectInfo in projects) { + foreach (var projectInfo in projectInfos) { var projectPath = projectInfo.ProjectPath; var projectName = Path.GetFileName (projectPath); var projExtension = projectInfo.IsFSharp ? ".fsproj" : ".csproj"; + var platforms = projectInfo.Platforms; - if (!iOSSkip.Contains (projectInfo.Label)) { - IOSTestProjects.Add (new iOSTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "iOS", projectName + projExtension))) { + if (platforms.HasFlag (TestPlatform.iOS)) { + TestProjects.Add (new TestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "iOS", projectName + projExtension))) { Name = projectName, - IsDotNetProject = true, - SkipiOSVariation = false, - SkiptvOSVariation = true, - SkipDeviceVariations = false, TestPlatform = TestPlatform.iOS, Configurations = projectInfo.Configurations, }); } - if (!tvOSSkip.Contains (projectInfo.Label)) { - IOSTestProjects.Add (new iOSTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "tvOS", projectName + projExtension))) { + if (platforms.HasFlag (TestPlatform.tvOS)) { + TestProjects.Add (new TestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "tvOS", projectName + projExtension))) { Name = projectName, - IsDotNetProject = true, - SkipiOSVariation = true, - SkiptvOSVariation = true, - SkipDeviceVariations = false, - GenerateVariations = false, TestPlatform = TestPlatform.tvOS, Configurations = projectInfo.Configurations, }); } - if (!macOSSkip.Contains (projectInfo.Label)) { - MacTestProjects.Add (new MacTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "macOS", projectName + projExtension))) { + if (platforms.HasFlag (TestPlatform.Mac)) { + TestProjects.Add (new TestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "macOS", projectName + projExtension))) { Name = projectName, - IsDotNetProject = true, - TargetFrameworkFlavors = MacFlavors.DotNet, TestPlatform = TestPlatform.Mac, Configurations = projectInfo.Configurations, }); } - if (!macCatalystSkip.Contains (projectInfo.Label)) { - MacTestProjects.Add (new MacTestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "MacCatalyst", projectName + projExtension))) { + if (platforms.HasFlag (TestPlatform.MacCatalyst)) { + TestProjects.Add (new TestProject (projectInfo.Label, Path.GetFullPath (Path.Combine (RootDirectory, projectPath, "dotnet", "MacCatalyst", projectName + projExtension))) { Name = projectName, - IsDotNetProject = true, - TargetFrameworkFlavors = MacFlavors.MacCatalyst, TestPlatform = TestPlatform.MacCatalyst, Configurations = projectInfo.Configurations, }); @@ -456,7 +591,7 @@ int Install () { HarnessLog ??= GetAdHocLog (); - foreach (var project in IOSTestProjects) { + foreach (var project in TestProjects) { var runner = CreateAppRunner (project); using (var install_log = new AppInstallMonitorLog (runner.MainLog)) { var rv = runner.InstallAsync (install_log.CancellationToken).Result; @@ -471,7 +606,7 @@ int Uninstall () { HarnessLog ??= GetAdHocLog (); - foreach (var project in IOSTestProjects) { + foreach (var project in TestProjects) { var runner = CreateAppRunner (project); var rv = runner.UninstallAsync ().Result; if (!rv.Succeeded) @@ -484,7 +619,7 @@ int Run () { HarnessLog ??= GetAdHocLog (); - foreach (var project in IOSTestProjects) { + foreach (var project in TestProjects) { var runner = CreateAppRunner (project); var rv = runner.RunAsync ().Result; if (rv != 0) @@ -558,9 +693,7 @@ public int Execute () int Jenkins () { - if (autoConf) { - AutoConfigureDotNet (); - } + PopulateTests (); var jenkins = new Jenkins.Jenkins (this, processManager, ResultParser, TunnelBore); return jenkins.Run (); diff --git a/tests/xharness/IHarness.cs b/tests/xharness/IHarness.cs index 8161a934a322..7a3c0c1ebb4c 100644 --- a/tests/xharness/IHarness.cs +++ b/tests/xharness/IHarness.cs @@ -22,8 +22,7 @@ public interface IHarness { IResultParser ResultParser { get; } AppBundleLocator AppBundleLocator { get; } ITunnelBore TunnelBore { get; } - List IOSTestProjects { get; } - List MacTestProjects { get; } + List TestProjects { get; } bool INCLUDE_IOS { get; } bool INCLUDE_TVOS { get; } bool INCLUDE_MAC { get; } @@ -31,6 +30,7 @@ public interface IHarness { string JENKINS_RESULTS_DIRECTORY { get; } string DOTNET_DIR { get; set; } string DOTNET_TFM { get; } + Version DotNetVersion { get; } string XcodeRoot { get; } string LogDirectory { get; } double Timeout { get; } diff --git a/tests/xharness/Jenkins/Jenkins.cs b/tests/xharness/Jenkins/Jenkins.cs index c574584da001..51d8f0ef1bd6 100644 --- a/tests/xharness/Jenkins/Jenkins.cs +++ b/tests/xharness/Jenkins/Jenkins.cs @@ -66,7 +66,6 @@ public ILogs Logs { } public List Tasks { get; private set; } = new List (); - Dictionary DependencyTasks = new Dictionary (); public IErrorKnowledgeBase ErrorKnowledgeBase => new ErrorKnowledgeBase (); public IResourceManager ResourceManager => resourceManager; @@ -108,177 +107,29 @@ public bool IsIncluded (TestProject project) public bool IsBetaXcode => Harness.XcodeRoot.IndexOf ("beta", StringComparison.OrdinalIgnoreCase) >= 0; - Task PopulateTasksAsync () + async Task PopulateTasksAsync () { - // Missing: - // api-diff - testSelector.SelectTests (TestSelection); DeviceLoader.LoadAllAsync ().DoNotAwait (); - var simTasksFactory = new RunSimulatorTasksFactory (); - var loadsim = simTasksFactory.CreateAsync (this, processManager, testVariationsFactory) - .ContinueWith ((v) => { - if (v.Status == TaskStatus.RanToCompletion) { - Console.WriteLine ("Simulator tasks created"); - Tasks.AddRange (v.Result); - } else { - Console.WriteLine ($"Failed to create simulator tasks: {v.Exception}"); - } - }); - - //Tasks.AddRange (await CreateRunSimulatorTasksAsync ()); - var crashReportSnapshotFactory = new CrashSnapshotReporterFactory (processManager); // all factories are enumerators \o/ - var testFactories = new IEnumerable [] { - new MacTestTasksEnumerable (this, processManager, crashReportSnapshotFactory, testVariationsFactory), - new NUnitTestTasksEnumerable (this, processManager) - }; - - // add all tests defined by the factory - foreach (var f in testFactories) { - Tasks.AddRange (f); - } - - // individual special tasks - var buildDotNetXtroTests = new MakeTask (jenkins: this, processManager: processManager) { - Platform = TestPlatform.All, - TestName = "Xtro", - Target = "dotnet-wrench", - WorkingDirectory = Path.Combine (HarnessConfiguration.RootDirectory, "xtro-sharpie"), - Ignored = !TestSelection.IsEnabled (TestLabel.Xtro), - Timeout = TimeSpan.FromMinutes (15), - SupportsParallelExecution = false, - }; - - var runDotNetXtroReporter = new RunXtroTask (this, buildDotNetXtroTests, processManager, crashReportSnapshotFactory) { - Platform = TestPlatform.Mac, - TestName = buildDotNetXtroTests.TestName, - Mode = ".NET", - Ignored = buildDotNetXtroTests.Ignored, - WorkingDirectory = buildDotNetXtroTests.WorkingDirectory, - AnnotationsDirectory = Path.Combine (buildDotNetXtroTests.WorkingDirectory, "api-annotations-dotnet"), - }; - Tasks.Add (runDotNetXtroReporter); - - var buildDotNetGeneratorProject = new TestProject (TestLabel.Generator, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "bgen", "bgen-tests.csproj"))) { - IsDotNetProject = true, - }; - var buildDotNetGenerator = new MSBuildTask (jenkins: this, testProject: buildDotNetGeneratorProject, processManager: processManager) { - TestProject = buildDotNetGeneratorProject, - SpecifyPlatform = false, - SpecifyConfiguration = false, - Platform = TestPlatform.iOS, - }; - var runDotNetGenerator = new DotNetTestTask (this, buildDotNetGenerator, processManager) { - TestProject = buildDotNetGeneratorProject, - Platform = TestPlatform.iOS, - TestName = "Generator tests", - Mode = ".NET", - Ignored = !TestSelection.IsEnabled (TestLabel.Generator), - }; - Tasks.Add (runDotNetGenerator); - - var buildDotNetRoslynGeneratorProject = new TestProject (TestLabel.Generator, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Generator.Tests", "Microsoft.Macios.Generator.Tests.csproj"))) { - IsDotNetProject = true, - }; - var buildDotNetRoslynGenerator = new MSBuildTask (jenkins: this, testProject: buildDotNetRoslynGeneratorProject, processManager: processManager) { - TestProject = buildDotNetRoslynGeneratorProject, - SpecifyPlatform = false, - SpecifyConfiguration = false, - Platform = TestPlatform.iOS, - }; - var runDotNetRoslynGenerator = new DotNetTestTask (this, buildDotNetRoslynGenerator, processManager) { - TestProject = buildDotNetRoslynGeneratorProject, - Platform = TestPlatform.iOS, - TestName = "Roslyn Generator tests", - Mode = ".NET", - Ignored = !TestSelection.IsEnabled (TestLabel.Generator), - }; - Tasks.Add (runDotNetRoslynGenerator); - - var buildDotNetRoslynAnalyzerProject = new TestProject (TestLabel.Generator, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Bindings.Analyzer.Tests", "Microsoft.Macios.Bindings.Analyzer.Tests.csproj"))) { - IsDotNetProject = true, - }; - var buildDotNetRoslynAnalyzer = new MSBuildTask (jenkins: this, testProject: buildDotNetRoslynAnalyzerProject, processManager: processManager) { - TestProject = buildDotNetRoslynAnalyzerProject, - SpecifyPlatform = false, - SpecifyConfiguration = false, - Platform = TestPlatform.iOS, - }; - var runDotNetRoslynAnalyzer = new DotNetTestTask (this, buildDotNetRoslynAnalyzer, processManager) { - TestProject = buildDotNetRoslynAnalyzerProject, - Platform = TestPlatform.iOS, - TestName = "Roslyn Analyzer tests", - Mode = ".NET", - Ignored = !TestSelection.IsEnabled (TestLabel.Generator), - }; - Tasks.Add (runDotNetRoslynAnalyzer); - var buildDotNetRoslynTransformerProject = new TestProject (TestLabel.Generator, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Transformer.Tests", "Microsoft.Macios.Transformer.Tests.csproj"))) { - IsDotNetProject = true, - }; - var buildDotNetRoslynTransformer = new MSBuildTask (jenkins: this, testProject: buildDotNetRoslynTransformerProject, processManager: processManager) { - TestProject = buildDotNetRoslynTransformerProject, - SpecifyPlatform = false, - SpecifyConfiguration = false, - Platform = TestPlatform.iOS, + var testFactories = new TaskFactory [] { + new RunSimulatorTasksFactory (this, processManager, testVariationsFactory), + new NUnitTestTasksEnumerable (this, processManager, testVariationsFactory), + new RunDeviceTasksFactory (this, processManager, testVariationsFactory), + new MacTestTasksFactory (this, processManager, testVariationsFactory, crashReportSnapshotFactory), }; - var runDotNetRoslynTransformer = new DotNetTestTask (this, buildDotNetRoslynTransformer, processManager) { - TestProject = buildDotNetRoslynTransformerProject, - Platform = TestPlatform.iOS, - TestName = "Roslyn Transformer tests", - Mode = ".NET", - Ignored = !TestSelection.IsEnabled (TestLabel.Generator), - }; - Tasks.Add (runDotNetRoslynTransformer); - var buildDotNetRoslynCodefixersProject = new TestProject (TestLabel.Generator, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "rgen", "Microsoft.Macios.Bindings.CodeFixers.Tests", "Microsoft.Macios.Bindings.CodeFixers.Tests.csproj"))) { - IsDotNetProject = true, - }; - var buildDotNetRoslynCodefixers = new MSBuildTask (jenkins: this, testProject: buildDotNetRoslynCodefixersProject, processManager: processManager) { - TestProject = buildDotNetRoslynCodefixersProject, - SpecifyPlatform = false, - SpecifyConfiguration = false, - Platform = TestPlatform.iOS, - }; - var runDotNetRoslynCodefixers = new DotNetTestTask (this, buildDotNetRoslynCodefixers, processManager) { - TestProject = buildDotNetRoslynCodefixersProject, - Platform = TestPlatform.iOS, - TestName = "Roslyn Codefixers tests", - Mode = ".NET", - Ignored = !TestSelection.IsEnabled (TestLabel.Generator), - }; - Tasks.Add (runDotNetRoslynCodefixers); - - var buildDotNetTestsProject = new TestProject (TestLabel.DotnetTest, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "dotnet", "UnitTests", "DotNetUnitTests.csproj"))) { - IsDotNetProject = true, - }; - var buildDotNetTests = new MSBuildTask (this, testProject: buildDotNetTestsProject, processManager: processManager) { - SpecifyPlatform = false, - Platform = TestPlatform.All, - ProjectConfiguration = "Debug", - Ignored = !TestSelection.IsEnabled (TestLabel.DotnetTest), - }; - var runDotNetTests = new DotNetTestTask (this, buildDotNetTests, processManager) { - TestProject = buildDotNetTestsProject, - Platform = TestPlatform.All, - TestName = "DotNet tests", - Filter = "Category!=Windows", - Timeout = TimeSpan.FromMinutes (360), - Ignored = !TestSelection.IsEnabled (TestLabel.DotnetTest), - }; - Tasks.Add (runDotNetTests); + // Start creating all the tasks in parallel + var tasks = testFactories.Select (v => v.CreateTasksAsync ()).ToArray (); - var deviceTestFactory = new RunDeviceTasksFactory (); - var loaddev = deviceTestFactory.CreateAsync (this, processManager, testVariationsFactory).ContinueWith ((v) => { - Console.WriteLine ("Got device tasks completed"); - Tasks.AddRange (v.Result); - }); + // Wait for everything to finish + await Task.WhenAll (tasks); - return Task.WhenAll (loadsim, loaddev); + Tasks.AddRange (tasks.SelectMany (v => v.Result)); } [DllImport ("libc")] @@ -504,8 +355,6 @@ public void GenerateReport () var allSimulatorTasks = new List (); var allExecuteTasks = new List (); - var allNUnitTasks = new List (); - var allMakeTasks = new List (); var allDeviceTasks = new List (); var allDotNetTestTasks = new List (); @@ -522,18 +371,6 @@ public void GenerateReport () continue; } - var nunit = task as NUnitExecuteTask; - if (nunit is not null) { - allNUnitTasks.Add (nunit); - continue; - } - - var make = task as MakeTask; - if (make is not null) { - allMakeTasks.Add (make); - continue; - } - var run_device = task as RunDeviceTask; if (run_device is not null) { allDeviceTasks.Add (run_device); @@ -558,8 +395,6 @@ public void GenerateReport () if (!Populating) { allTasks.AddRange (allExecuteTasks); allTasks.AddRange (allSimulatorTasks); - allTasks.AddRange (allNUnitTasks); - allTasks.AddRange (allMakeTasks); allTasks.AddRange (allDeviceTasks); allTasks.AddRange (allDotNetTestTasks); } diff --git a/tests/xharness/Jenkins/MacTaskTestsFactory.cs b/tests/xharness/Jenkins/MacTaskTestsFactory.cs new file mode 100644 index 000000000000..dfc399b255d6 --- /dev/null +++ b/tests/xharness/Jenkins/MacTaskTestsFactory.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; + +using System.IO; +using Microsoft.DotNet.XHarness.iOS.Shared.Execution; +using Microsoft.DotNet.XHarness.iOS.Shared.Utilities; +using Xharness.Jenkins.TestTasks; + +#nullable enable + +namespace Xharness.Jenkins { + class MacTestTasksFactory : TaskFactory { + readonly ICrashSnapshotReporterFactory crashReportSnapshotFactory; + + public MacTestTasksFactory (Jenkins jenkins, IMlaunchProcessManager processManager, TestVariationsFactory testVariationsFactory, ICrashSnapshotReporterFactory crashReportSnapshotFactory) + : base (jenkins, processManager, testVariationsFactory) + { + this.crashReportSnapshotFactory = crashReportSnapshotFactory; + } + + public override Task> CreateTasksAsync () + { + var jenkins = this.Jenkins; + var processManager = this.ProcessManager; + var testVariationsFactory = this.TestVariationsFactory; + + var rv = new List (); + + foreach (var project in jenkins.Harness.TestProjects) { + if (!project.IsExecutableProject) + continue; + + bool ignored = false; + switch (project.TestPlatform) { + case TestPlatform.Mac: + ignored |= !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac); + break; + case TestPlatform.MacCatalyst: + ignored |= !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst); + break; + default: + continue; + } + + if (project.Ignore == true) + ignored = true; + + if (!jenkins.IsIncluded (project)) + ignored = true; + + var configurations = project.Configurations; + if (configurations is null) + configurations = new string [] { "Debug" }; + + foreach (var config in configurations) { + var build = new MSBuildTask (jenkins: jenkins, testProject: project, processManager: processManager) { + SpecifyPlatform = false, + ProjectConfiguration = config, + Platform = project.TestPlatform, + Ignored = !jenkins.TestSelection.IsEnabled (project.Label), + SupportsParallelExecution = false, + }; + build.CloneTestProject (jenkins.MainLog, processManager, project, HarnessConfiguration.RootDirectory); + + var exec = new MacExecuteTask (jenkins, build, processManager, crashReportSnapshotFactory) { + Ignored = ignored, + TestName = project.Name, + IsUnitTest = true, + }; + + var variations = testVariationsFactory.CreateTestVariations ( + new [] { exec }, + (buildTask, test, candidates) => + new MacExecuteTask (jenkins, buildTask, processManager, crashReportSnapshotFactory) { + IsUnitTest = true, + } + ); + + foreach (var v in variations) { + v.Variation = string.IsNullOrEmpty (v.Variation) ? config : v.Variation; + } + + rv.AddRange (variations); + } + } + + return Task.FromResult> (rv); + } + } +} diff --git a/tests/xharness/Jenkins/MacTestTasksEnumerable.cs b/tests/xharness/Jenkins/MacTestTasksEnumerable.cs deleted file mode 100644 index f8df3ce234a4..000000000000 --- a/tests/xharness/Jenkins/MacTestTasksEnumerable.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using Microsoft.DotNet.XHarness.iOS.Shared.Execution; -using Microsoft.DotNet.XHarness.iOS.Shared.Utilities; -using Xharness.Jenkins.TestTasks; - -namespace Xharness.Jenkins { - class MacTestTasksEnumerable : IEnumerable { - - readonly Jenkins jenkins; - readonly IMlaunchProcessManager processManager; - readonly ICrashSnapshotReporterFactory crashReportSnapshotFactory; - readonly ITestVariationsFactory testVariationsFactory; - - public MacTestTasksEnumerable (Jenkins jenkins, - IMlaunchProcessManager processManager, - ICrashSnapshotReporterFactory crashReportSnapshotFactory, - ITestVariationsFactory testVariationsFactory) - { - this.jenkins = jenkins ?? throw new ArgumentNullException (nameof (jenkins)); - this.processManager = processManager ?? throw new ArgumentNullException (nameof (processManager)); - this.crashReportSnapshotFactory = crashReportSnapshotFactory ?? throw new ArgumentNullException (nameof (crashReportSnapshotFactory)); - this.testVariationsFactory = testVariationsFactory ?? throw new ArgumentNullException (nameof (testVariationsFactory)); - } - - NUnitExecuteTask CreateNUnitTask (MacTestProject project, MSBuildTask build, bool ignored) - { - if (project is null) - throw new ArgumentNullException (nameof (project)); - if (build is null) - throw new ArgumentNullException (nameof (build)); - - var dll = Path.Combine (Path.GetDirectoryName (build.TestProject.Path), project.Xml.GetOutputAssemblyPath (build.ProjectPlatform, build.ProjectConfiguration).Replace ('\\', '/')); - return new NUnitExecuteTask (jenkins, build, processManager) { - Ignored = ignored, - TestLibrary = dll, - TestProject = project, - Platform = build.Platform, - TestName = project.Name, - Timeout = TimeSpan.FromMinutes (120), - Mode = "macOS", - }; - } - - IEnumerable CreateMacExecuteTask (MacTestProject project, MSBuildTask build, bool ignored) - { - if (project is null) - throw new ArgumentNullException (nameof (project)); - if (build is null) - throw new ArgumentNullException (nameof (build)); - - var exec = new MacExecuteTask (jenkins, build, processManager, crashReportSnapshotFactory) { - Ignored = ignored, - TestName = project.Name, - IsUnitTest = true, - }; - return testVariationsFactory.CreateTestVariations (new [] { exec }, (buildTask, test, candidates) => - new MacExecuteTask (jenkins, buildTask, processManager, crashReportSnapshotFactory) { IsUnitTest = true }); - } - - public IEnumerator GetEnumerator () - { - - foreach (var project in jenkins.Harness.MacTestProjects) { - bool ignored = false; - - if (project.TestPlatform == TestPlatform.MacCatalyst) { - ignored |= !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst); - } else { - ignored |= !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac); - } - - if (project.Ignore == true) - ignored = true; - - if (!jenkins.IsIncluded (project)) - ignored = true; - - var configurations = project.Configurations; - if (configurations is null) - configurations = new string [] { "Debug" }; - - TestPlatform platform = project.TargetFrameworkFlavors.ToTestPlatform (); - foreach (var config in configurations) { - MSBuildTask build = new MSBuildTask (jenkins: jenkins, testProject: project, processManager: processManager); - build.Platform = platform; - build.CloneTestProject (jenkins.MainLog, processManager, project, HarnessConfiguration.RootDirectory); - build.ProjectConfiguration = config; - build.SpecifyPlatform = false; - build.SpecifyConfiguration = build.ProjectConfiguration != "Debug"; - build.Dependency = project.Dependency; - - var ignored_main = ignored; - var execs = project.IsNUnitProject - ? (IEnumerable) new [] { CreateNUnitTask (project, build, ignored_main) } - : CreateMacExecuteTask (project, build, ignored_main); - - foreach (var e in execs) { - e.Variation = string.IsNullOrEmpty (e.Variation) ? config : e.Variation; - yield return e; - } - - } - } - } - - IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); - - } -} diff --git a/tests/xharness/Jenkins/NUnitTestTasksEnumerable.cs b/tests/xharness/Jenkins/NUnitTestTasksEnumerable.cs index 13809c45353a..00e81cb5883b 100644 --- a/tests/xharness/Jenkins/NUnitTestTasksEnumerable.cs +++ b/tests/xharness/Jenkins/NUnitTestTasksEnumerable.cs @@ -2,106 +2,63 @@ using System.Collections; using System.Collections.Generic; using System.IO; +using System.Threading.Tasks; using Microsoft.DotNet.XHarness.iOS.Shared.Execution; using Xharness.Jenkins.TestTasks; -namespace Xharness.Jenkins { - class NUnitTestTasksEnumerable : IEnumerable { +#nullable enable - readonly Jenkins jenkins; - readonly IMlaunchProcessManager processManager; +namespace Xharness.Jenkins { + abstract class TaskFactory { + protected Jenkins Jenkins { get; private set; } + protected IMlaunchProcessManager ProcessManager { get; private set; } + protected TestVariationsFactory TestVariationsFactory { get; private set; } - public NUnitTestTasksEnumerable (Jenkins jenkins, IMlaunchProcessManager processManager) + public TaskFactory (Jenkins jenkins, IMlaunchProcessManager processManager, TestVariationsFactory testVariationsFactory) { - this.jenkins = jenkins ?? throw new ArgumentNullException (nameof (jenkins)); - this.processManager = processManager ?? throw new ArgumentNullException (nameof (processManager)); + Jenkins = jenkins; + ProcessManager = processManager; + TestVariationsFactory = testVariationsFactory; } - public IEnumerator GetEnumerator () + public abstract Task> CreateTasksAsync (); + } + + class NUnitTestTasksEnumerable : TaskFactory { + public NUnitTestTasksEnumerable (Jenkins jenkins, IMlaunchProcessManager processManager, TestVariationsFactory testVariationsFactory) + : base (jenkins, processManager, testVariationsFactory) { - var msbuildTasksTestsProject = new TestProject (TestLabel.Msbuild, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "msbuild", "Xamarin.MacDev.Tasks.Tests", "Xamarin.MacDev.Tasks.Tests.csproj"))) { - IsDotNetProject = true, - }; - var env = new Dictionary { - }; - var buildiOSMSBuild = new MSBuildTask (jenkins: jenkins, testProject: msbuildTasksTestsProject, processManager: processManager) { - SpecifyPlatform = false, - ProjectConfiguration = "Debug", - Platform = TestPlatform.All, - Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Msbuild), - SupportsParallelExecution = false, - }; - var nunitExecutioniOSMSBuild = new DotNetTestTask (jenkins, buildiOSMSBuild, processManager) { - TestProject = msbuildTasksTestsProject, - ProjectConfiguration = "Debug", - Platform = TestPlatform.All, - TestName = "MSBuild tests", - Mode = "Tasks", - Timeout = TimeSpan.FromMinutes (60), - Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Msbuild), - SupportsParallelExecution = false, - }; - yield return nunitExecutioniOSMSBuild; + } - var msbuildIntegrationTestsProject = new TestProject (TestLabel.Msbuild, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "msbuild", "Xamarin.MacDev.Tests", "Xamarin.MacDev.Tests.csproj"))) { - IsDotNetProject = true, - }; - var buildiOSMSBuildIntegration = new MSBuildTask (jenkins: jenkins, testProject: msbuildIntegrationTestsProject, processManager: processManager) { - SpecifyPlatform = false, - ProjectConfiguration = "Debug", - Platform = TestPlatform.All, - Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Msbuild), - SupportsParallelExecution = false, - }; - var nunitExecutioniOSMSBuildIntegration = new DotNetTestTask (jenkins, buildiOSMSBuildIntegration, processManager) { - TestProject = msbuildIntegrationTestsProject, - ProjectConfiguration = "Debug", - Platform = TestPlatform.All, - TestName = "MSBuild tests", - Mode = "Integration", - Timeout = TimeSpan.FromMinutes (120), - Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Msbuild), - SupportsParallelExecution = false, - }; - yield return nunitExecutioniOSMSBuildIntegration; + public override Task> CreateTasksAsync () + { + var jenkins = this.Jenkins; + var processManager = this.ProcessManager; - var buildCecilTestsProject = new TestProject (TestLabel.Cecil, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "cecil-tests", "cecil-tests.csproj"))) { - IsDotNetProject = true, - }; - var buildCecilTests = new MSBuildTask (jenkins: jenkins, testProject: buildCecilTestsProject, processManager: processManager) { - TestProject = buildCecilTestsProject, - SpecifyPlatform = false, - SpecifyConfiguration = false, - Platform = TestPlatform.iOS, - Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Cecil), - }; - var runCecilTests = new DotNetTestTask (jenkins, buildCecilTests, processManager) { - TestProject = buildCecilTestsProject, - Platform = TestPlatform.iOS, - TestName = "Cecil-based tests", - Timeout = TimeSpan.FromMinutes (10), - Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Cecil), - }; - yield return runCecilTests; + var rv = new List (); + foreach (var project in jenkins.Harness.TestProjects) { + if (project.IsExecutableProject) + continue; - var buildSampleTestsProject = new TestProject (TestLabel.SampleTester, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "sampletester", "sampletester.csproj"))); - var buildSampleTests = new MSBuildTask (jenkins: jenkins, testProject: buildSampleTestsProject, processManager: processManager) { - SpecifyPlatform = false, - Platform = TestPlatform.All, - ProjectConfiguration = "Debug", - }; - var runSampleTests = new NUnitExecuteTask (jenkins, buildSampleTests, processManager) { - TestLibrary = Path.Combine (HarnessConfiguration.RootDirectory, "sampletester", "bin", "Debug", "sampletester.dll"), - TestProject = new TestProject (TestLabel.SampleTester, Path.GetFullPath (Path.Combine (HarnessConfiguration.RootDirectory, "sampletester", "sampletester.csproj"))), - Platform = TestPlatform.All, - TestName = "Sample tests", - Timeout = TimeSpan.FromDays (1), // These can take quite a while to execute. - InProcess = true, - Ignored = true, // Ignored by default, can be run manually. On CI will execute if the label 'run-sample-tests' is present on a PR (but in Azure Devops on a different bot). - }; - yield return runSampleTests; + var build = new MSBuildTask (jenkins: jenkins, testProject: project, processManager: processManager) { + SpecifyPlatform = false, + ProjectConfiguration = "Debug", + Platform = project.TestPlatform, + Ignored = !jenkins.TestSelection.IsEnabled (project.Label), + SupportsParallelExecution = false, + TestName = project.Name, + }; + var run = new DotNetTestTask (jenkins, build, processManager) { + TestProject = project, + Platform = build.Platform, + TestName = project.Name, + Timeout = project.Timeout, + Ignored = !jenkins.TestSelection.IsEnabled (project.Label), + SupportsParallelExecution = false, + }; + rv.Add (run); + } + return Task.FromResult> (rv); } - - IEnumerator IEnumerable.GetEnumerator () => GetEnumerator (); } } diff --git a/tests/xharness/Jenkins/RunDeviceTasksFactory.cs b/tests/xharness/Jenkins/RunDeviceTasksFactory.cs index 32833f6e34c3..551f46b15342 100644 --- a/tests/xharness/Jenkins/RunDeviceTasksFactory.cs +++ b/tests/xharness/Jenkins/RunDeviceTasksFactory.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -6,87 +7,65 @@ using Xharness.Jenkins.TestTasks; namespace Xharness.Jenkins { - class RunDeviceTasksFactory { + class RunDeviceTasksFactory : TaskFactory { + public RunDeviceTasksFactory (Jenkins jenkins, IMlaunchProcessManager processManager, TestVariationsFactory testVariationsFactory) + : base (jenkins, processManager, testVariationsFactory) + { + } - public Task> CreateAsync (Jenkins jenkins, IMlaunchProcessManager processManager, TestVariationsFactory testVariationsFactory) + public override Task> CreateTasksAsync () { + var jenkins = this.Jenkins; + var processManager = this.ProcessManager; + var testVariationsFactory = this.TestVariationsFactory; + var rv = new List (); - var projectTasks = new List (); - foreach (var project in jenkins.Harness.IOSTestProjects) { + foreach (var project in jenkins.Harness.TestProjects) { if (!project.IsExecutableProject) continue; - if (project.SkipDeviceVariations) - continue; - bool ignored = project.Ignore ?? !jenkins.TestSelection.IsEnabled (PlatformLabel.Device); if (!jenkins.IsIncluded (project)) ignored = true; - if (project.IsDotNetProject) - ignored = true; - - projectTasks.Clear (); - - bool createiOS; - bool createtvOS; - - if (project.GenerateVariations) { - createiOS = !project.SkipiOSVariation; - createtvOS = !project.SkiptvOSVariation; - } else { - createiOS = project.TestPlatform == TestPlatform.iOS; - createtvOS = project.TestPlatform == TestPlatform.tvOS; - } - if (createiOS) { - var build64 = new MSBuildTask (jenkins: jenkins, testProject: project, processManager: processManager) { - ProjectConfiguration = "Debug", - ProjectPlatform = "iPhone", - Platform = TestPlatform.iOS, - TestName = project.Name, - }; - build64.CloneTestProject (jenkins.MainLog, processManager, project, HarnessConfiguration.RootDirectory); - projectTasks.Add (new RunDeviceTask ( - jenkins: jenkins, - devices: jenkins.Devices, - buildTask: build64, - processManager: processManager, - tunnelBore: jenkins.TunnelBore, - errorKnowledgeBase: jenkins.ErrorKnowledgeBase, - useTcpTunnel: jenkins.Harness.UseTcpTunnel, - candidates: jenkins.Devices.Connected64BitIOS.Where (d => project.IsSupported (d.DevicePlatform, d.ProductVersion))) { Ignored = !jenkins.TestSelection.IsEnabled (PlatformLabel.iOS) }); + IEnumerable candidates; + switch (project.TestPlatform) { + case TestPlatform.iOS: + ignored |= !jenkins.TestSelection.IsEnabled (PlatformLabel.iOS); + candidates = jenkins.Devices.Connected64BitIOS; + break; + case TestPlatform.tvOS: + ignored |= !jenkins.TestSelection.IsEnabled (PlatformLabel.tvOS); + candidates = jenkins.Devices.ConnectedTV; + break; + default: + continue; } - if (createtvOS) { - var tvOSProject = project.GenerateVariations ? project.AsTvOSProject () : project; - var buildTV = new MSBuildTask (jenkins: jenkins, testProject: tvOSProject, processManager: processManager) { - ProjectConfiguration = "Debug", - ProjectPlatform = "iPhone", - Platform = TestPlatform.tvOS, - TestName = project.Name, - }; - buildTV.CloneTestProject (jenkins.MainLog, processManager, tvOSProject, HarnessConfiguration.RootDirectory); - projectTasks.Add (new RunDeviceTask ( - jenkins: jenkins, - devices: jenkins.Devices, - buildTask: buildTV, - processManager: processManager, - tunnelBore: jenkins.TunnelBore, - errorKnowledgeBase: jenkins.ErrorKnowledgeBase, - useTcpTunnel: jenkins.Harness.UseTcpTunnel, - candidates: jenkins.Devices.ConnectedTV.Where (d => project.IsSupported (d.DevicePlatform, d.ProductVersion))) { Ignored = !jenkins.TestSelection.IsEnabled (PlatformLabel.tvOS) }); - } + var buildTask = new MSBuildTask (jenkins: jenkins, testProject: project, processManager: processManager) { + ProjectConfiguration = "Debug", + ProjectPlatform = "iPhone", + Platform = project.TestPlatform, + TestName = project.Name, + }; + buildTask.CloneTestProject (jenkins.MainLog, processManager, project, HarnessConfiguration.RootDirectory); + var runTask = new RunDeviceTask ( + jenkins: jenkins, + devices: jenkins.Devices, + buildTask: buildTask, + processManager: processManager, + tunnelBore: jenkins.TunnelBore, + errorKnowledgeBase: jenkins.ErrorKnowledgeBase, + useTcpTunnel: jenkins.Harness.UseTcpTunnel, + candidates: candidates) { + Ignored = ignored, + }; - foreach (var task in projectTasks) { - task.TimeoutMultiplier = project.TimeoutMultiplier; - task.BuildOnly |= project.BuildOnly; - task.Ignored |= ignored; - } - rv.AddRange (projectTasks); + rv.Add (runTask); } - return Task.FromResult> (testVariationsFactory.CreateTestVariations (rv, (buildTask, test, candidates) + return Task.FromResult> (testVariationsFactory.CreateTestVariations (rv, (buildTask, test, candidates) => new RunDeviceTask ( jenkins: jenkins, devices: jenkins.Devices, diff --git a/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs b/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs index 6555f78cf291..91f095fec843 100644 --- a/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs +++ b/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs @@ -6,17 +6,25 @@ using Microsoft.DotNet.XHarness.iOS.Shared; using Microsoft.DotNet.XHarness.iOS.Shared.Execution; using Microsoft.DotNet.XHarness.iOS.Shared.Hardware; +using Mono.CompilerServices.SymbolWriter; using Xharness.Jenkins.TestTasks; namespace Xharness.Jenkins { // lets try and keep this class stateless, will make our lifes better - class RunSimulatorTasksFactory { + class RunSimulatorTasksFactory : TaskFactory { + public RunSimulatorTasksFactory (Jenkins jenkins, IMlaunchProcessManager processManager, TestVariationsFactory testVariationsFactory) + : base (jenkins, processManager, testVariationsFactory) + { + } - public async Task> CreateAsync (Jenkins jenkins, IMlaunchProcessManager processManager, TestVariationsFactory testVariationsFactory) + public async override Task> CreateTasksAsync () { - var runSimulatorTasks = new List (); + var jenkins = this.Jenkins; + var processManager = this.ProcessManager; + var testVariationsFactory = this.TestVariationsFactory; - foreach (var project in jenkins.Harness.IOSTestProjects) { + var runSimulatorTasks = new List (); + foreach (var project in jenkins.Harness.TestProjects) { if (!project.IsExecutableProject) continue; @@ -25,14 +33,7 @@ public async Task> CreateAsync (Jenkins jenkins, IMlaunch ignored = true; var ps = new List> (); - if (!project.GenerateVariations) { - ps.Add (new Tuple (project, project.TestPlatform, ignored)); - } else { - if (!project.SkipiOSVariation) - ps.Add (new Tuple (project, TestPlatform.iOS, ignored)); - if (!project.SkiptvOSVariation) - ps.Add (new Tuple (project.AsTvOSProject (), TestPlatform.tvOS, ignored)); - } + ps.Add (new Tuple (project, project.TestPlatform, ignored)); var configurations = project.Configurations; if (configurations is null) @@ -59,14 +60,12 @@ public async Task> CreateAsync (Jenkins jenkins, IMlaunch derived.Platform = testPlatform; derived.Ignored = configIgnored; derived.TestName = project.Name; - derived.Dependency = project.Dependency; derived.CloneTestProject (jenkins.MainLog, processManager, pair.Item1, HarnessConfiguration.RootDirectory); var simTasks = CreateAsync (jenkins, processManager, derived); runSimulatorTasks.AddRange (simTasks); foreach (var task in simTasks) { if (configurations.Length > 1) task.Variation = config; - task.TimeoutMultiplier = project.TimeoutMultiplier; } } } @@ -101,10 +100,13 @@ IEnumerable CreateAsync (Jenkins jenkins, IMlaunchProcessManag { var runtasks = new List (); - TestTarget [] targets = buildTask.Platform.GetAppRunnerTargets (); + var targets = buildTask.Platform.GetTestTargetsForSimulator (); TestPlatform [] platforms; bool [] ignored; + if (targets.Length == 0) + return Array.Empty (); + switch (buildTask.Platform) { case TestPlatform.tvOS: platforms = new TestPlatform [] { TestPlatform.tvOS }; diff --git a/tests/xharness/Jenkins/TestData.cs b/tests/xharness/Jenkins/TestData.cs index 62606cf308eb..b8e3fde842f1 100644 --- a/tests/xharness/Jenkins/TestData.cs +++ b/tests/xharness/Jenkins/TestData.cs @@ -12,7 +12,6 @@ class TestData { public bool Profiling; public string LinkMode; public string Defines; - public string Undefines; public bool? Ignored; public bool EnableSGenConc; public bool UseLlvm; @@ -21,5 +20,6 @@ class TestData { public string RuntimeIdentifier; public string Registrar; public bool PublishAot; // NativeAOT + public string TestVariation; } } diff --git a/tests/xharness/Jenkins/TestServer.cs b/tests/xharness/Jenkins/TestServer.cs index 3ae207a9a13f..0c1609be8102 100644 --- a/tests/xharness/Jenkins/TestServer.cs +++ b/tests/xharness/Jenkins/TestServer.cs @@ -16,14 +16,15 @@ class TestServer { public Task RunAsync (Jenkins jenkins, HtmlReportWriter htmlReportWriter) { - var server = new HttpListener (); + HttpListener server; // Try and find an unused port int attemptsLeft = 50; int port = 51234; // Try this port first, to try to not vary between runs just because. Random r = new Random ((int) DateTime.Now.Ticks); - while (attemptsLeft-- > 0) { + do { var newPort = port != 0 ? port : r.Next (49152, 65535); // The suggested range for dynamic ports is 49152-65535 (IANA) + server = new HttpListener (); server.Prefixes.Clear (); server.Prefixes.Add ("http://*:" + newPort + "/"); try { @@ -34,7 +35,7 @@ public Task RunAsync (Jenkins jenkins, HtmlReportWriter htmlReportWriter) jenkins.MainLog.WriteLine ("Failed to listen on port {0}: {1}", newPort, ex.Message); port = 0; } - } + } while (attemptsLeft-- > 0); jenkins.MainLog.WriteLine ($"Created server on localhost:{port}"); var tcs = new TaskCompletionSource (); @@ -278,8 +279,16 @@ IEnumerable find_tasks (StreamWriter writer, string ids) jenkins.GenerateReport (); } - if (serveFile is null) + if (serveFile is null) { serveFile = Path.Combine (Path.GetDirectoryName (jenkins.LogDirectory), request.Url.LocalPath.Substring (1)); + serveFile = Path.GetFullPath (serveFile); + if (!serveFile.StartsWith (Path.GetDirectoryName (Path.GetFullPath (jenkins.LogDirectory)) + Path.DirectorySeparatorChar)) { + Console.WriteLine ($"400: {request.Url.LocalPath}"); + response.StatusCode = 400; + response.OutputStream.WriteByte ((byte) '?'); + break; + } + } var path = serveFile; if (File.Exists (path)) { var buffer = new byte [4096]; diff --git a/tests/xharness/Jenkins/TestTasks/AppleTestTask.cs b/tests/xharness/Jenkins/TestTasks/AppleTestTask.cs index 135558692cd1..b8e47819e90f 100644 --- a/tests/xharness/Jenkins/TestTasks/AppleTestTask.cs +++ b/tests/xharness/Jenkins/TestTasks/AppleTestTask.cs @@ -35,27 +35,7 @@ public override void SetEnvironmentVariables (Process process) var xcodeRoot = Jenkins.Harness.XcodeRoot; process.StartInfo.EnvironmentVariables ["RootTestsDirectory"] = HarnessConfiguration.RootDirectory; - - switch (Platform) { - case TestPlatform.iOS: - case TestPlatform.tvOS: - case TestPlatform.MacCatalyst: - process.StartInfo.EnvironmentVariables ["MD_APPLE_SDK_ROOT"] = xcodeRoot; - break; - case TestPlatform.Mac: - process.StartInfo.EnvironmentVariables ["MD_APPLE_SDK_ROOT"] = xcodeRoot; - break; - case TestPlatform.All: - // Don't set: - // MSBuildExtensionsPath - // TargetFrameworkFallbackSearchPaths - // because these values used by both XM and XI and we can't set it to two different values at the same time. - // Any test that depends on these values should not be using 'TestPlatform.All' - process.StartInfo.EnvironmentVariables ["MD_APPLE_SDK_ROOT"] = xcodeRoot; - break; - default: - throw new NotImplementedException ($"Unknown test platform: {Platform}"); - } + process.StartInfo.EnvironmentVariables ["MD_APPLE_SDK_ROOT"] = xcodeRoot; foreach (var kvp in Environment) { if (kvp.Value is null) { diff --git a/tests/xharness/Jenkins/TestTasks/BuildProject.cs b/tests/xharness/Jenkins/TestTasks/BuildProject.cs index 30837a459595..c2a11ffe3f6d 100644 --- a/tests/xharness/Jenkins/TestTasks/BuildProject.cs +++ b/tests/xharness/Jenkins/TestTasks/BuildProject.cs @@ -18,7 +18,6 @@ public class BuildProject : BuildTool { public IEnvManager EnvironmentManager { get; set; } public IEventLogger EventLogger { get; set; } readonly Func msbuildPath; - bool? restoreNuGets; public string? SolutionPath { get; set; } @@ -30,68 +29,12 @@ public BuildProject (Func msbuildPath, IProcessManager processManager, I EnvironmentManager = envManager ?? throw new ArgumentNullException (nameof (envManager)); } - public bool RestoreNugets { - get { - if (restoreNuGets.HasValue) - return restoreNuGets.Value; - if (TestProject.IsDotNetProject) - return false; - if (Platform == TestPlatform.MacCatalyst) - return false; - return TestProject.RestoreNugetsInProject || !string.IsNullOrEmpty (SolutionPath); - } - set { - restoreNuGets = value; - } - } - public bool SupportsParallelExecution { get { return false; } } - async Task RestoreNugetsAsync (string projectPath, ILog log) - { - using var _ = await ResourceManager.NugetResource.AcquireExclusiveAsync (); - if (!File.Exists (projectPath)) - throw new FileNotFoundException ("Could not find the solution whose nugets to restore.", projectPath); - - using (var nuget = new Process ()) { - nuget.StartInfo.FileName = msbuildPath (); - var args = new List (); - if (TestProject.IsDotNetProject) { - args.Add ("restore"); - args.Add ("/verbosity:detailed"); - } else { - args.Add ("-t"); - args.Add ("--"); - args.Add ("/Library/Frameworks/Mono.framework/Versions/Current/Commands/nuget"); - args.Add ("restore"); - args.Add ("-Verbosity"); - args.Add ("detailed"); - } - args.Add (projectPath); - nuget.StartInfo.Arguments = StringUtils.FormatArguments (args); - EnvironmentManager.SetEnvironmentVariables (nuget); - EventLogger.LogEvent (log, "Restoring nugets for {0} ({1}) on path {2}", TestName, Mode, projectPath); - - var timeout = TimeSpan.FromMinutes (15); - var result = await ProcessManager.RunAsync (nuget, log, timeout); - if (result.TimedOut) { - log.WriteLine ("Nuget restore timed out after {0} seconds.", timeout.TotalSeconds); - return TestExecutingResult.TimedOut; - } - - if (!result.Succeeded) { - return TestExecutingResult.Failed; - } - } - - EventLogger.LogEvent (log, "Restoring nugets completed for {0} ({1}) on path {2}", TestName, Mode, projectPath); - return TestExecutingResult.Succeeded; - } - static IEnumerable GetNestedReferenceProjects (string csproj) { if (!File.Exists (csproj)) @@ -109,31 +52,5 @@ static IEnumerable GetNestedReferenceProjects (string csproj) } return result; } - - // This method must be called with the desktop resource acquired - // (which is why it takes an IAcquiredResources as a parameter without using it in the function itself). - public async Task RestoreNugetsAsync (ILog log, IAcquiredResource resource) - { - if (!RestoreNugets) - return TestExecutingResult.Ignored; - - if (!File.Exists (SolutionPath ?? TestProject.Path)) - throw new FileNotFoundException ("Could not find the solution whose nugets to restore.", SolutionPath ?? TestProject.Path); - - // might happen that the project does contain reference projects with nugets, grab the reference projects and ensure - // that they have the nugets restored (usually, watch os test projects - if (SolutionPath is null) { - var references = GetNestedReferenceProjects (TestProject.Path); - foreach (var referenceProject in references) { - var execResult = await RestoreNugetsAsync (referenceProject, log); // do the replace in case we use win paths - if ((execResult & TestExecutingResult.TimedOut) == TestExecutingResult.TimedOut) { - return execResult; - } - } - } - - // restore for the main project/solution] - return await RestoreNugetsAsync (SolutionPath ?? TestProject.Path, log); - } } } diff --git a/tests/xharness/Jenkins/TestTasks/BuildProjectTask.cs b/tests/xharness/Jenkins/TestTasks/BuildProjectTask.cs index e63718d23763..ce21abb56c05 100644 --- a/tests/xharness/Jenkins/TestTasks/BuildProjectTask.cs +++ b/tests/xharness/Jenkins/TestTasks/BuildProjectTask.cs @@ -15,11 +15,6 @@ protected BuildProjectTask (Jenkins jenkins, TestProject testProject, IProcessMa { } - public bool RestoreNugets { - get => BuildProject.RestoreNugets; - set => BuildProject.RestoreNugets = value; - } - public override bool SupportsParallelExecution => BuildProject.SupportsParallelExecution; } } diff --git a/tests/xharness/Jenkins/TestTasks/DotNetTestTask.cs b/tests/xharness/Jenkins/TestTasks/DotNetTestTask.cs index 69a53a34a778..2e0e463018a8 100644 --- a/tests/xharness/Jenkins/TestTasks/DotNetTestTask.cs +++ b/tests/xharness/Jenkins/TestTasks/DotNetTestTask.cs @@ -1,8 +1,11 @@ +using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using System.Xml; using Microsoft.DotNet.XHarness.iOS.Shared.Execution; using Microsoft.DotNet.XHarness.iOS.Shared.Logging; +using Microsoft.DotNet.XHarness.iOS.Shared.Utilities; namespace Xharness.Jenkins.TestTasks { class DotNetTestTask : RunTestTask { @@ -18,6 +21,7 @@ public override async Task RunTestAsync () using (var resource = await NotifyAndAcquireDesktopResourceAsync ()) { var trx = Logs.Create ($"results-{Timestamp}.trx", LogType.TrxLog.ToString ()); var html = Logs.Create ($"results-{Timestamp}.html", LogType.HtmlLog.ToString ()); + var xml = Logs.Create ($"results-{Timestamp}.xml", LogType.NUnitResult.ToString ()); var args = new List { "test", @@ -28,6 +32,9 @@ public override async Task RunTestAsync () "--logger:html;LogFileName=" + Path.GetFileName (html.FullPath) }; + if (TestProject?.IsNUnitTestProject == true) + args.Add ($"--logger:nunit;LogFileName={Path.GetFileName (xml.FullPath)}"); + var envTestFilter = global::System.Environment.GetEnvironmentVariable ("TEST_FILTER"); if (!string.IsNullOrEmpty (envTestFilter)) { if (!string.IsNullOrEmpty (Filter)) { @@ -46,6 +53,23 @@ public override async Task RunTestAsync () WorkingDirectory = Path.GetDirectoryName (ProjectFile); await ExecuteProcessAsync (Jenkins.Harness.GetDotNetExecutable (Path.GetDirectoryName (ProjectFile)), args); + + try { + var xmlDoc = new XmlDocument (); + xmlDoc.LoadWithoutNetworkAccess (xml.FullPath); + var nodes = xmlDoc.SelectNodes ("//attachments/attachment")!; + foreach (XmlNode node in nodes) { + var filePath = node.SelectSingleNode ("filePath")?.InnerText; + var description = node.SelectSingleNode ("description")?.InnerText; + if (File.Exists (filePath)) { + Logs.AddFile (filePath, description); + } else { + MainLog.WriteLine ($"The xml file '{xml.FullPath}' has an attachment of a file that doesn't exist: {filePath}"); + } + } + } catch (Exception e) { + MainLog.WriteLine ($"Failed to look for attachments in the XML file '{xml.FullPath}': {e}"); + } } } } diff --git a/tests/xharness/Jenkins/TestTasks/MSBuild.cs b/tests/xharness/Jenkins/TestTasks/MSBuild.cs index c638d6364467..b38ff9043a16 100644 --- a/tests/xharness/Jenkins/TestTasks/MSBuild.cs +++ b/tests/xharness/Jenkins/TestTasks/MSBuild.cs @@ -60,12 +60,6 @@ public MSBuild (Func msbuildPath, { BuildLog = buildLog; (TestExecutingResult ExecutionResult, KnownIssue KnownFailure) result = (TestExecutingResult.NotStarted, (KnownIssue) null); - var restoreResult = await RestoreNugetsAsync (buildLog, resource); - if ((restoreResult & TestExecutingResult.Failed) == TestExecutingResult.Failed) { - BuildLog.WriteLine ($"Failed to restore nugets: {restoreResult}"); - result.ExecutionResult = restoreResult; - return result; - } using (var xbuild = new Process ()) { xbuild.StartInfo.FileName = msbuildPath (); diff --git a/tests/xharness/Jenkins/TestTasks/MSBuildTask.cs b/tests/xharness/Jenkins/TestTasks/MSBuildTask.cs index c407e45b08f2..a4c3008f1186 100644 --- a/tests/xharness/Jenkins/TestTasks/MSBuildTask.cs +++ b/tests/xharness/Jenkins/TestTasks/MSBuildTask.cs @@ -18,13 +18,11 @@ public override void SetEnvironmentVariables (Process process) base.SetEnvironmentVariables (process); // modify those env vars that we do care about - if (TestProject.IsDotNetProject) { - process.StartInfo.EnvironmentVariables.Remove ("MSBUILD_EXE_PATH"); - process.StartInfo.EnvironmentVariables.Remove ("MSBuildExtensionsPathFallbackPathsOverride"); - process.StartInfo.EnvironmentVariables.Remove ("MSBuildSDKsPath"); - process.StartInfo.EnvironmentVariables.Remove ("TargetFrameworkFallbackSearchPaths"); - process.StartInfo.EnvironmentVariables.Remove ("MSBuildExtensionsPathFallbackPathsOverride"); - } + process.StartInfo.EnvironmentVariables.Remove ("MSBUILD_EXE_PATH"); + process.StartInfo.EnvironmentVariables.Remove ("MSBuildExtensionsPathFallbackPathsOverride"); + process.StartInfo.EnvironmentVariables.Remove ("MSBuildSDKsPath"); + process.StartInfo.EnvironmentVariables.Remove ("TargetFrameworkFallbackSearchPaths"); + process.StartInfo.EnvironmentVariables.Remove ("MSBuildExtensionsPathFallbackPathsOverride"); } protected virtual List ToolArguments => @@ -37,23 +35,13 @@ public MSBuildTask (Jenkins jenkins, TestProject testProject, IProcessManager pr protected override void InitializeTool () { - if (TestProject.IsDotNetProject) { - buildToolTask = new DotNetBuild ( - msbuildPath: () => ToolName, - processManager: ProcessManager, - resourceManager: ResourceManager, - eventLogger: this, - envManager: this, - errorKnowledgeBase: Jenkins.ErrorKnowledgeBase); - } else { - buildToolTask = new MSBuild ( - msbuildPath: () => ToolName, - processManager: ProcessManager, - resourceManager: ResourceManager, - eventLogger: this, - envManager: this, - errorKnowledgeBase: Jenkins.ErrorKnowledgeBase); - } + buildToolTask = new DotNetBuild ( + msbuildPath: () => ToolName, + processManager: ProcessManager, + resourceManager: ResourceManager, + eventLogger: this, + envManager: this, + errorKnowledgeBase: Jenkins.ErrorKnowledgeBase); } protected override async Task ExecuteAsync () diff --git a/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs b/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs index 16e1bd6ea469..736b5cb079cf 100644 --- a/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs +++ b/tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs @@ -49,12 +49,7 @@ public override async Task RunTestAsync () } else { var project = new XmlDocument (); project.LoadWithoutNetworkAccess (ProjectFile); - string outputPath; - if (TestProject?.IsDotNetProject == true) { - outputPath = await Harness.AppBundleLocator.LocateAppBundle (project, ProjectFile, TestTarget.None, BuildTask.ProjectConfiguration); - } else { - outputPath = project.GetOutputPath (BuildTask.ProjectPlatform, BuildTask.ProjectConfiguration).Replace ('\\', '/'); - } + var outputPath = await Harness.AppBundleLocator.LocateAppBundle (project, ProjectFile, TestTarget.None, BuildTask.ProjectConfiguration); var assemblyName = project.GetAssemblyName (); Path = System.IO.Path.Combine (System.IO.Path.GetDirectoryName (ProjectFile), outputPath, assemblyName + ".app", "Contents", "MacOS", assemblyName); } diff --git a/tests/xharness/Jenkins/TestTasks/MacTask.cs b/tests/xharness/Jenkins/TestTasks/MacTask.cs index 3a51f44b5850..510fa15564d1 100644 --- a/tests/xharness/Jenkins/TestTasks/MacTask.cs +++ b/tests/xharness/Jenkins/TestTasks/MacTask.cs @@ -12,9 +12,9 @@ public override string Mode { get { switch (Platform) { case TestPlatform.Mac: - return "Mac [dotnet]"; + return "macOS"; case TestPlatform.MacCatalyst: - return "Mac Catalyst [dotnet]"; + return "Mac Catalyst"; default: throw new NotImplementedException (Platform.ToString ()); } diff --git a/tests/xharness/Jenkins/TestTasks/MakeTask.cs b/tests/xharness/Jenkins/TestTasks/MakeTask.cs deleted file mode 100644 index f677f9032f58..000000000000 --- a/tests/xharness/Jenkins/TestTasks/MakeTask.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.DotNet.XHarness.Common.Execution; -using Microsoft.DotNet.XHarness.iOS.Shared; -using Microsoft.DotNet.XHarness.iOS.Shared.Logging; - -namespace Xharness.Jenkins.TestTasks { - class MakeTask : BuildToolTask { - public string Target; - public string WorkingDirectory; - public TimeSpan Timeout = TimeSpan.FromMinutes (5); - - public MakeTask (Jenkins jenkins, IProcessManager processManager) : base (jenkins, null, processManager) - { - } - - protected override async Task ExecuteAsync () - { - using (var resource = await NotifyAndAcquireDesktopResourceAsync ()) { - using (var make = new Process ()) { - make.StartInfo.FileName = "make"; - make.StartInfo.WorkingDirectory = WorkingDirectory; - make.StartInfo.Arguments = Target; - SetEnvironmentVariables (make); - var log = Logs.Create ($"make-{Platform}-{Timestamp}.txt", LogType.BuildLog.ToString ()); - LogEvent (log, "Making {0} in {1}", Target, WorkingDirectory); - if (!Jenkins.Harness.DryRun) { - var timeout = Timeout; - var result = await ProcessManager.RunAsync (make, log, timeout); - if (result.TimedOut) { - ExecutionResult = TestExecutingResult.TimedOut; - log.WriteLine ("Make timed out after {0} seconds.", timeout.TotalSeconds); - } else if (result.Succeeded) { - ExecutionResult = TestExecutingResult.Succeeded; - } else { - ExecutionResult = TestExecutingResult.Failed; - } - } - using (var reader = log.GetReader ()) - AddCILogFiles (reader); - Jenkins.MainLog.WriteLine ("Made {0} ({1})", TestName, Mode); - } - } - } - } -} diff --git a/tests/xharness/Jenkins/TestTasks/NUnitExecuteTask.cs b/tests/xharness/Jenkins/TestTasks/NUnitExecuteTask.cs deleted file mode 100644 index 6adac729dbaa..000000000000 --- a/tests/xharness/Jenkins/TestTasks/NUnitExecuteTask.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using System.Xml; -using Microsoft.DotNet.XHarness.Common.Logging; -using Microsoft.DotNet.XHarness.iOS.Shared.Execution; -using Microsoft.DotNet.XHarness.iOS.Shared.Logging; -using Microsoft.DotNet.XHarness.iOS.Shared.Utilities; - -namespace Xharness.Jenkins.TestTasks { - class NUnitExecuteTask : RunTestTask { - public string TestLibrary; - public string TestExecutable; - public bool ProduceHtmlReport = true; - public bool InProcess; - - public NUnitExecuteTask (Jenkins jenkins, BuildToolTask build_task, IMlaunchProcessManager processManager) - : base (jenkins, build_task, processManager) - { - } - - public static bool TryGetNUnitVersion (ILog log, string csproj, out string version, out bool isPackageRef) - { - const string default_nunit_version = "3.9.0"; - - isPackageRef = false; - version = string.Empty; - - var packages_conf = Path.Combine (Path.GetDirectoryName (csproj), "packages.config"); - if (!File.Exists (packages_conf)) { - var xml = new XmlDocument (); - xml.LoadWithoutNetworkAccess (csproj); - var packageref = xml.SelectSingleNode ("//*[local-name()='PackageReference' and (@Include = 'NUnit.ConsoleRunner' or @Include = 'NUnit.Runners')]"); - if (packageref is not null) { - isPackageRef = true; - version = packageref.Attributes ["Version"].InnerText; - log.WriteLine ("Found PackageReference in {0} for NUnit.ConsoleRunner {1}", csproj, version); - } else { - version = default_nunit_version; - log.WriteLine ("No packages.config found for {0}: assuming nunit version is {1}", csproj, version); - } - } else { - using (var str = new StreamReader (packages_conf)) { - using (var reader = XmlReader.Create (str)) { - while (reader.Read ()) { - if (reader.NodeType != XmlNodeType.Element) - continue; - if (reader.Name != "package") - continue; - var id = reader.GetAttribute ("id"); - if (id != "NUnit.ConsoleRunner" && id != "NUnit.Runners") - continue; - version = reader.GetAttribute ("version"); - break; - } - } - } - if (version == string.Empty) { - version = default_nunit_version; - log.WriteLine ("Could not find the NUnit.ConsoleRunner element in {0}, using the default version ({1})", packages_conf, version); - } else { - log.WriteLine ("Found the NUnit.ConsoleRunner/NUnit.Runners element in {0} for {2}, version is: {1}", packages_conf, version, csproj); - } - } - - return true; - } - - public static bool TryGetNUnitExecutionSettings (ILog log, string csproj, string testLibrary, out string testExecutable, out string workingDirectory) - { - if (!TryGetNUnitVersion (log, csproj, out var nunit_version, out var is_packageref)) { - log.WriteLine ($"Failed to find NUnit version for {csproj}"); - throw new Exception ($"Failed to find NUnit version for {csproj}"); - } - - if (is_packageref) { - if (nunit_version [0] == '2') { - testExecutable = Path.Combine (HarnessConfiguration.RootDirectory, "..", "packages", "NUnit.Runners", nunit_version, "tools", "nunit-console.exe"); - } else { - testExecutable = Path.Combine (HarnessConfiguration.RootDirectory, "..", "tools", $"nunit3-console-{nunit_version}"); - } - if (!File.Exists (testExecutable)) - throw new FileNotFoundException ($"The helper script to execute the unit tests does not exist: {testExecutable}"); - workingDirectory = Path.GetDirectoryName (csproj); - } else if (nunit_version [0] == '2') { - testExecutable = Path.Combine (HarnessConfiguration.RootDirectory, "..", "packages", "NUnit.Runners." + nunit_version, "tools", "nunit-console.exe"); - workingDirectory = Path.Combine (Path.GetDirectoryName (testExecutable), "lib"); - } else { - testExecutable = Path.Combine (HarnessConfiguration.RootDirectory, "..", "packages", "NUnit.ConsoleRunner." + nunit_version, "tools", "nunit3-console.exe"); - workingDirectory = Path.GetDirectoryName (testLibrary); - } - testExecutable = Path.GetFullPath (testExecutable); - workingDirectory = Path.GetFullPath (workingDirectory); - if (!File.Exists (testExecutable)) - throw new FileNotFoundException ($"The nunit executable '{testExecutable}' doesn't exist."); - - return true; - } - - public void FindNUnitConsoleExecutable (ILog log) - { - if (!string.IsNullOrEmpty (TestExecutable)) { - log.WriteLine ("Using existing executable: {0}", TestExecutable); - return; - } - - if (!TryGetNUnitExecutionSettings (log, TestProject.Path, TestLibrary, out var testExecutable, out var workingDirectory)) - throw new Exception ($"Unable to get NUnit execution settings for {TestProject.Path}"); - TestExecutable = testExecutable; - WorkingDirectory = workingDirectory; - } - - public bool IsNUnit3 { - get { - return Path.GetFileName (TestExecutable).Contains ("unit3-console"); - } - } - public override IEnumerable AggregatedLogs { - get { - return base.AggregatedLogs.Union (BuildTask.Logs); - } - } - - public override string Mode { - get { - return base.Mode ?? "NUnit"; - } - set { - base.Mode = value; - } - } - - public override Task RunTestAsync () - { - throw new NotSupportedException ("Legacy projects not supported anymore"); - } - - public override void Reset () - { - base.Reset (); - BuildTask?.Reset (); - } - } -} diff --git a/tests/xharness/Jenkins/TestTasks/RunXtroTask.cs b/tests/xharness/Jenkins/TestTasks/RunXtroTask.cs deleted file mode 100644 index 2ee399d6e389..000000000000 --- a/tests/xharness/Jenkins/TestTasks/RunXtroTask.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.DotNet.XHarness.iOS.Shared; -using Microsoft.DotNet.XHarness.iOS.Shared.Execution; -using Microsoft.DotNet.XHarness.iOS.Shared.Logging; - -namespace Xharness.Jenkins.TestTasks { - class RunXtroTask : MacExecuteTask { - public string AnnotationsDirectory; - string mode; - - public RunXtroTask (Jenkins jenkins, BuildToolTask build_task, IMlaunchProcessManager processManager, ICrashSnapshotReporterFactory crashReportSnapshotFactory) - : base (jenkins, build_task, processManager, crashReportSnapshotFactory) - { - } - - public override string Mode { - get => mode; - set => mode = value; - } - - public override async Task RunTestAsync () - { - using (var resource = await NotifyAndAcquireDesktopResourceAsync ()) { - using (var proc = new Process ()) { - var reporter = System.IO.Path.Combine (WorkingDirectory, "xtro-report", "bin", "Debug", "xtro-report"); - var results = System.IO.Path.Combine (Logs.Directory, $"xtro-{Timestamp}"); - proc.StartInfo.FileName = reporter; - proc.StartInfo.Arguments = $"{AnnotationsDirectory} {results}"; - - Jenkins.MainLog.WriteLine ("Executing {0} ({1})", TestName, Mode); - var log = Logs.Create ($"execute-xtro-{Timestamp}.txt", LogType.ExecutionLog.ToString ()); - log.WriteLine ("{0} {1}", proc.StartInfo.FileName, proc.StartInfo.Arguments); - if (!Jenkins.Harness.DryRun) { - ExecutionResult = TestExecutingResult.Running; - - var snapshot = CrashReportSnapshotFactory.Create (log, Logs, isDevice: false, deviceName: null); - await snapshot.StartCaptureAsync (); - - try { - var timeout = TimeSpan.FromMinutes (20); - - var result = await ProcessManager.RunAsync (proc, log, timeout); - if (result.TimedOut) { - FailureMessage = $"Execution timed out after {timeout.TotalSeconds} seconds."; - log.WriteLine (FailureMessage); - ExecutionResult = TestExecutingResult.TimedOut; - } else if (result.Succeeded) { - ExecutionResult = TestExecutingResult.Succeeded; - } else { - ExecutionResult = TestExecutingResult.Failed; - FailureMessage = result.ExitCode != 1 ? $"Test run crashed (exit code: {result.ExitCode})." : "Test run failed."; - log.WriteLine (FailureMessage); - } - } finally { - await snapshot.EndCaptureAsync (TimeSpan.FromSeconds (Succeeded ? 0 : 5)); - } - } - Jenkins.MainLog.WriteLine ("Executed {0} ({1})", TestName, Mode); - - Logs.AddFile (System.IO.Path.Combine (results, "index.html"), "HTML Report"); - } - } - } - } -} diff --git a/tests/xharness/Jenkins/TestTasks/TestTask.cs b/tests/xharness/Jenkins/TestTasks/TestTask.cs index 758dbb66ae08..241320ec3dc9 100644 --- a/tests/xharness/Jenkins/TestTasks/TestTask.cs +++ b/tests/xharness/Jenkins/TestTasks/TestTask.cs @@ -31,7 +31,6 @@ public abstract class TestTasks : IEnvManager, IEventLogger, ITestTask { #region Public vars public Dictionary Environment = new (); - public Func Dependency; // a task that's feteched and awaited before this task's ExecuteAsync method public Task InitialTask { get; set; } // a task that's executed before this task's ExecuteAsync method. public Task CompletedTask; // a task that's executed after this task's ExecuteAsync method. public List Resources = new (); @@ -136,6 +135,9 @@ public virtual string TestName { if (testName is not null) return testName; + if (TestProject?.Name is not null) + return TestProject.Name; + var rv = Path.GetFileNameWithoutExtension (ProjectFile); if (rv is null) return $"unknown test name ({GetType ().Name}"; @@ -218,9 +220,6 @@ async Task RunInternalAsync () ExecutionResult = ExecutionResult & ~TestExecutingResult.StateMask | TestExecutingResult.InProgress; try { - if (Dependency is not null) - await Dependency (); - if (InitialTask is not null) await InitialTask; diff --git a/tests/xharness/Jenkins/TestVariationsFactory.cs b/tests/xharness/Jenkins/TestVariationsFactory.cs index f7aca9bb6224..44a20dede5e7 100644 --- a/tests/xharness/Jenkins/TestVariationsFactory.cs +++ b/tests/xharness/Jenkins/TestVariationsFactory.cs @@ -29,9 +29,7 @@ IEnumerable GetTestData (RunTestTask test) { // This function returns additional test configurations (in addition to the default one) for the specific test - // 32-bit interpreter doesn't work yet: https://github.com/mono/mono/issues/9871 - var supports_interpreter = true; - var supports_dynamic_registrar_on_device = true; + var supports_interpreter = test.Platform != TestPlatform.Mac; var ignore = test.TestProject.Ignore; var mac_supports_arm64 = Harness.CanRunArm64; var arm64_runtime_identifier = string.Empty; @@ -58,54 +56,40 @@ IEnumerable GetTestData (RunTestTask test) break; } + switch (test.TestName) { + case "link all": + if (test.ProjectConfiguration == "Debug") { + // in .NET 9 we add a variation to test original resource bundling (which is opt in in .NET 9), + // and in .NET 10 we change the variation to test *not* bundling original resources (because it becomes opt out in .NET 10, + // so we don't test it by default). + if (jenkins.Harness.DotNetVersion.Major <= 9) { + yield return new TestData { Variation = "Debug (bundle original resources)", TestVariation = "bundle-original-resources", Debug = true }; + } else { + yield return new TestData { Variation = "Debug (don't bundle original resources)", TestVariation = "do-not-bundle-original-resources", Debug = true }; + } + } + break; + } + switch (test.ProjectPlatform) { case "iPhone": - var supports_debug = true; if (test.ProjectConfiguration.Contains ("Debug")) yield return new TestData { Variation = "Release", Debug = false, Profiling = false }; - // Disable this by default for tvOS/Release because the app ends up being too big (https://github.com/xamarin/maccore/issues/2282) - var sdk_release_skip = test.Platform == TestPlatform.tvOS && test.TestName == "dont link"; - sdk_release_skip = sdk_release_skip || test.TestProject.IsDotNetProject; - if (!sdk_release_skip) - yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (release)", AppBundleExtraOptions = $"--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = false, Profiling = false, }; - switch (test.TestName) { case "monotouch-test": - if (test.TestProject.IsDotNetProject) - ignore = true; - if (supports_dynamic_registrar_on_device) - yield return new TestData { Variation = "Debug (dynamic registrar)", Registrar = "dynamic", Debug = true, Profiling = false, Ignored = ignore }; + ignore = true; + yield return new TestData { Variation = "Debug (dynamic registrar)", Registrar = "dynamic", Debug = true, Profiling = false, Ignored = ignore }; yield return new TestData { Variation = "Release (all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "static", Debug = false, Profiling = false, Defines = "OPTIMIZEALL", Ignored = ignore }; - if (supports_debug) { - yield return new TestData { Variation = "Debug (all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "static", Debug = true, Profiling = false, Defines = "OPTIMIZEALL", Ignored = ignore }; - yield return new TestData { Variation = "Debug: SGenConc", AppBundleExtraOptions = "", Debug = true, Profiling = false, EnableSGenConc = true, Ignored = ignore }; - } - if (supports_interpreter) { - if (supports_debug) { - yield return new TestData { Variation = "Debug (interpreter)", AppBundleExtraOptions = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME", Ignored = ignore }; - yield return new TestData { Variation = "Debug (interpreter -mscorlib)", AppBundleExtraOptions = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME", Ignored = ignore }; - } - yield return new TestData { Variation = "Release (interpreter -mscorlib)", AppBundleExtraOptions = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME", Ignored = ignore }; - } - if (test.TestProject.IsDotNetProject) { - yield return new TestData { Variation = "Release (LLVM)", Debug = false, UseLlvm = true, Ignored = ignore }; - yield return new TestData { Variation = "Debug (managed static registrar)", Registrar = "managed-static", Debug = true, Profiling = false, Ignored = ignore }; - yield return new TestData { Variation = "Release (managed static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "managed-static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; - } - if (test.TestProject.IsDotNetProject) - yield return new TestData { Variation = "Release (NativeAOT)", Debug = false, PublishAot = true, Ignored = ignore, LinkMode = "Full" }; - break; - case string name when name.StartsWith ("mscorlib", StringComparison.Ordinal): - if (supports_debug) - yield return new TestData { Variation = "Debug: SGenConc", AppBundleExtraOptions = "", Debug = true, Profiling = false, EnableSGenConc = true }; + yield return new TestData { Variation = "Debug (all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "static", Debug = true, Profiling = false, Defines = "OPTIMIZEALL", Ignored = ignore }; + yield return new TestData { Variation = "Debug: SGenConc", AppBundleExtraOptions = "", Debug = true, Profiling = false, EnableSGenConc = true, Ignored = ignore }; if (supports_interpreter) { - if (supports_debug) { - yield return new TestData { Variation = "Debug (interpreter)", AppBundleExtraOptions = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME", KnownFailure = new KnownIssue ("#1683", issueLink: "https://github.com/xamarin/maccore/issues/1683") }; - yield return new TestData { Variation = "Debug (interpreter -mscorlib)", AppBundleExtraOptions = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME", KnownFailure = new KnownIssue ("#1682", issueLink: "https://github.com/xamarin/maccore/issues/1682") }; - } - yield return new TestData { Variation = "Release (interpreter -mscorlib)", AppBundleExtraOptions = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME", KnownFailure = new KnownIssue ("#1682", issueLink: "https://github.com/xamarin/maccore/issues/1682") }; + yield return new TestData { Variation = "Debug (interpreter)", TestVariation = "interpreter", Debug = true, Profiling = false, Ignored = ignore, Defines = "" }; } + yield return new TestData { Variation = "Release (LLVM)", Debug = false, UseLlvm = true, Ignored = ignore }; + yield return new TestData { Variation = "Debug (managed static registrar)", Registrar = "managed-static", Debug = true, Profiling = false, Ignored = ignore }; + yield return new TestData { Variation = "Release (managed static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "managed-static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; + yield return new TestData { Variation = "Release (NativeAOT)", Debug = false, PublishAot = true, Ignored = ignore, LinkMode = "Full" }; break; } break; @@ -113,26 +97,29 @@ IEnumerable GetTestData (RunTestTask test) switch (test.TestName) { case "monotouch-test": // The default is to run monotouch-test with the dynamic registrar (in the simulator), so that's already covered - yield return new TestData { Variation = "Debug (LinkSdk)", Debug = true, Profiling = false, LinkMode = test.TestProject.IsDotNetProject ? "SdkOnly" : "LinkSdk", Ignored = ignore }; + yield return new TestData { Variation = "Debug (LinkSdk)", Debug = true, Profiling = false, LinkMode = "SdkOnly", Ignored = ignore }; yield return new TestData { Variation = "Debug (static registrar)", Registrar = "static", Debug = true, Profiling = false, Ignored = ignore }; yield return new TestData { Variation = "Release (all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; yield return new TestData { Variation = "Debug (all optimizations)", AppBundleExtraOptions = "--optimize:all,-remove-uithread-checks", Registrar = "static", Debug = true, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore ?? !jenkins.TestSelection.IsEnabled (TestLabel.All) }; - if (test.TestProject.IsDotNetProject && mac_supports_arm64) { + if (mac_supports_arm64) { yield return new TestData { Variation = "Debug (ARM64)", Debug = true, Profiling = false, Ignored = !mac_supports_arm64 ? true : ignore, RuntimeIdentifier = arm64_sim_runtime_identifier, }; yield return new TestData { Variation = "Release (NativeAOT, ARM64)", Debug = false, PublishAot = true, Ignored = ignore, RuntimeIdentifier = arm64_sim_runtime_identifier, LinkMode = "Full" }; } - if (test.TestProject.IsDotNetProject) { - yield return new TestData { Variation = "Debug (managed static registrar)", Registrar = "managed-static", Debug = true, Profiling = false, Ignored = ignore }; - yield return new TestData { Variation = "Release (managed static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "managed-static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; - yield return new TestData { Variation = "Release (NativeAOT, x64)", Debug = false, PublishAot = true, Ignored = ignore, RuntimeIdentifier = x64_sim_runtime_identifier, LinkMode = "Full" }; + yield return new TestData { Variation = "Debug (managed static registrar)", Registrar = "managed-static", Debug = true, Profiling = false, Ignored = ignore }; + yield return new TestData { Variation = "Release (managed static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "managed-static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; + yield return new TestData { Variation = "Release (NativeAOT, x64)", Debug = false, PublishAot = true, Ignored = ignore, RuntimeIdentifier = x64_sim_runtime_identifier, LinkMode = "Full" }; + if (supports_interpreter) { + yield return new TestData { Variation = "Debug (interpreter)", TestVariation = "interpreter", Debug = true, Profiling = false, Ignored = ignore }; + // interpreter+release fails due to https://github.com/dotnet/runtime/issues/110649. + // yield return new TestData { Variation = "Release (interpreter)", TestVariation = "interpreter", Debug = false, Profiling = false, Ignored = ignore, UseLlvm = false }; } break; case "introspection": - if (test.TestProject.IsDotNetProject && mac_supports_arm64) + if (mac_supports_arm64) yield return new TestData { Variation = "Debug (ARM64)", Debug = true, Profiling = false, Ignored = !mac_supports_arm64 ? true : ignore, RuntimeIdentifier = arm64_sim_runtime_identifier, }; - foreach (var target in test.Platform.GetAppRunnerTargets ()) + foreach (var target in test.Platform.GetTestTargetsForSimulator ()) yield return new TestData { Variation = $"Debug ({test.Platform.GetSimulatorMinVersion ()})", Debug = true, @@ -148,32 +135,23 @@ IEnumerable GetTestData (RunTestTask test) case null: switch (test.TestName) { case "monotouch-test": - if (test.TestProject.IsDotNetProject) { - yield return new TestData { Variation = "Debug (ARM64)", Debug = true, Profiling = false, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac) || !mac_supports_arm64, RuntimeIdentifier = arm64_runtime_identifier, }; - if (test.Platform != TestPlatform.MacCatalyst) { - yield return new TestData { Variation = "Debug (static registrar)", Registrar = "static", Debug = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac), }; - yield return new TestData { Variation = "Debug (static registrar, ARM64)", Registrar = "static", Debug = true, Profiling = false, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac) || !mac_supports_arm64, RuntimeIdentifier = arm64_runtime_identifier, }; - yield return new TestData { Variation = "Release (NativeAOT, ARM64)", Debug = false, PublishAot = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac) || !mac_supports_arm64, RuntimeIdentifier = arm64_runtime_identifier, LinkMode = "Full" }; - yield return new TestData { Variation = "Release (NativeAOT, x64)", Debug = false, PublishAot = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac), RuntimeIdentifier = "osx-x64", LinkMode = "Full" }; - } - if (test.Platform == TestPlatform.MacCatalyst) { - yield return new TestData { Variation = "Release (ARM64, LLVM)", Debug = false, UseLlvm = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst) || !mac_supports_arm64, RuntimeIdentifier = arm64_runtime_identifier }; - yield return new TestData { Variation = "Release (static registrar)", Registrar = "static", Debug = false, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst) }; - yield return new TestData { Variation = "Release (managed static registrar)", Registrar = "managed-static", Debug = false, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst) }; - yield return new TestData { Variation = "Release (NativeAOT)", Debug = false, PublishAot = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst), LinkMode = "Full" }; - yield return new TestData { Variation = "Release (NativeAOT, ARM64)", Debug = false, PublishAot = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst) || !mac_supports_arm64, RuntimeIdentifier = arm64_runtime_identifier, LinkMode = "Full" }; - yield return new TestData { Variation = "Release (NativeAOT, x64)", Debug = false, PublishAot = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.MacCatalyst), LinkMode = "Full", RuntimeIdentifier = x64_runtime_identifier }; - } - if (test.Platform == TestPlatform.Mac) { - yield return new TestData { Variation = "Release (static registrar)", Registrar = "static", Debug = false, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac) }; - yield return new TestData { Variation = "Release (managed static registrar)", Registrar = "managed-static", Debug = false, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac) }; - yield return new TestData { Variation = "Release (NativeAOT)", Debug = false, PublishAot = true, Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Monotouch) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Mac), LinkMode = "Full" }; - } - if (test.TestProject.IsDotNetProject) { - yield return new TestData { Variation = "Release (static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; - yield return new TestData { Variation = "Debug (managed static registrar)", Registrar = "managed-static", Debug = true, Profiling = false, Ignored = ignore }; - yield return new TestData { Variation = "Release (managed static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "managed-static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; - } + yield return new TestData { Variation = "Debug (ARM64)", Debug = true, Profiling = false, Ignored = !mac_supports_arm64 ? true : ignore, RuntimeIdentifier = arm64_runtime_identifier, }; + yield return new TestData { Variation = "Debug (managed static registrar)", Registrar = "managed-static", Debug = true, Profiling = false, Ignored = ignore }; + yield return new TestData { Variation = "Debug (static registrar)", Registrar = "static", Debug = true, Ignored = ignore, }; + yield return new TestData { Variation = "Debug (static registrar, ARM64)", Registrar = "static", Debug = true, Profiling = false, Ignored = !mac_supports_arm64 ? true : ignore, RuntimeIdentifier = arm64_runtime_identifier, }; + yield return new TestData { Variation = "Release (managed static registrar)", Registrar = "managed-static", Debug = false, Ignored = ignore }; + yield return new TestData { Variation = "Release (managed static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "managed-static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; + yield return new TestData { Variation = "Release (NativeAOT)", Debug = false, PublishAot = true, Ignored = ignore, LinkMode = "Full" }; + yield return new TestData { Variation = "Release (NativeAOT, ARM64)", Debug = false, PublishAot = true, Ignored = !mac_supports_arm64 ? true : ignore, RuntimeIdentifier = arm64_runtime_identifier, LinkMode = "Full" }; + yield return new TestData { Variation = "Release (NativeAOT, x64)", Debug = false, PublishAot = true, Ignored = ignore, RuntimeIdentifier = x64_runtime_identifier, LinkMode = "Full" }; + yield return new TestData { Variation = "Release (static registrar)", Registrar = "static", Debug = false, Ignored = ignore }; + yield return new TestData { Variation = "Release (static registrar, all optimizations)", AppBundleExtraOptions = "--optimize:all", Registrar = "static", Debug = false, Profiling = false, LinkMode = "Full", Defines = "OPTIMIZEALL", Ignored = ignore }; + if (test.Platform == TestPlatform.MacCatalyst) { + yield return new TestData { Variation = "Release (ARM64, LLVM)", Debug = false, UseLlvm = true, Ignored = !mac_supports_arm64 ? true : ignore, RuntimeIdentifier = arm64_runtime_identifier }; + } + if (supports_interpreter) { + yield return new TestData { Variation = "Debug (interpreter)", TestVariation = "interpreter", Debug = true, Profiling = false, Ignored = ignore }; + yield return new TestData { Variation = "Release (interpreter)", TestVariation = "interpreter", Debug = false, Profiling = false, Ignored = ignore, UseLlvm = false }; } break; } @@ -188,9 +166,6 @@ public IEnumerable CreateTestVariations (IEnumerable tests, Func (tests); @@ -203,7 +178,6 @@ public IEnumerable CreateTestVariations (IEnumerable tests, Func CreateTestVariations (IEnumerable tests, Func CreateTestVariations (IEnumerable tests, Func CreateTestVariations (IEnumerable tests, Func TestPlatform.Mac, - MacFlavors.MacCatalyst => TestPlatform.MacCatalyst, - _ => throw new NotImplementedException (flavor.ToString ()), - }; - } - } -} diff --git a/tests/xharness/MacTestProject.cs b/tests/xharness/MacTestProject.cs deleted file mode 100644 index 5e9d78798d87..000000000000 --- a/tests/xharness/MacTestProject.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -namespace Xharness { - - [Flags] - public enum MacFlavors { - None = 0, - DotNet = 16, - MacCatalyst = 32, - } - - public class MacTestProject : TestProject { - public MacFlavors TargetFrameworkFlavors; - - public override bool GenerateVariations { - get { - return false; - } - set { - throw new Exception ("This value is read-only"); - } - } - - public MacTestProject (TestLabel label, string path) - : base (label, path, true) - { - } - - public override TestProject Clone () - { - return CompleteClone (new MacTestProject (Label, Path)); - } - - protected override TestProject CompleteClone (TestProject project) - { - var rv = (MacTestProject) project; - rv.TargetFrameworkFlavors = TargetFrameworkFlavors; - return base.CompleteClone (rv); - } - - public override string ToString () - { - return base.ToString () + " (" + TargetFrameworkFlavors.ToString () + ")"; - } - } -} diff --git a/tests/xharness/Makefile b/tests/xharness/Makefile new file mode 100644 index 000000000000..8ccfb80cb358 --- /dev/null +++ b/tests/xharness/Makefile @@ -0,0 +1,2 @@ +build: + $(MAKE) -C .. xharness diff --git a/tests/xharness/Program.cs b/tests/xharness/Program.cs index 1991d170b51d..8e96dbad8c76 100644 --- a/tests/xharness/Program.cs +++ b/tests/xharness/Program.cs @@ -39,28 +39,7 @@ public static int Main (string [] args) { "h|?|help", "Displays the help", (v) => showHelp () }, { "v|verbose", "Show verbose output", (v) => configuration.Verbosity++ }, { "use-system:", "Use the system version of Xamarin.iOS/Xamarin.Mac or the locally build version. Default: the locally build version.", (v) => configuration.UseSystemXamarinIOSMac = v == "1" || v == "true" || string.IsNullOrEmpty (v) }, - { "autoconf", "Automatically decide what to configure.", (v) => configuration.AutoConf = true }, { "rootdir=", "The root directory for the tests.", (v) => HarnessConfiguration.RootDirectory = v }, - { "project=", "Add a project file to process. This can be specified multiple times.", (v) => configuration.IOSTestProjects.Add (new iOSTestProject (TestLabel.None, v)) }, - // Run - { "run=", "Executes a project.", (v) => - { - action = HarnessAction.Run; - configuration.IOSTestProjects.Add (new iOSTestProject (TestLabel.None, v)); - } - }, - { "install=", "Installs a project.", (v) => - { - action = HarnessAction.Install; - configuration.IOSTestProjects.Add (new iOSTestProject (TestLabel.None, v)); - } - }, - { "uninstall=", "Uninstalls a project.", (v) => - { - action = HarnessAction.Uninstall; - configuration.IOSTestProjects.Add (new iOSTestProject (TestLabel.None, v)); - } - }, { "sdkroot=", "Where Xcode is", (v) => configuration.SdkRoot = v }, { "target=", "Where to run the project ([ios|tvos]-[device|simulator).", (v) => configuration.Target = v.ParseAsAppRunnerTarget () }, { "configuration=", "Which configuration to run (defaults to Debug).", (v) => configuration.BuildConfiguration = v }, diff --git a/tests/xharness/TestPlatform.cs b/tests/xharness/TestPlatform.cs index 00d45ed9d64c..11bf12534083 100644 --- a/tests/xharness/TestPlatform.cs +++ b/tests/xharness/TestPlatform.cs @@ -1,11 +1,15 @@ +using System; + namespace Xharness { + [Flags] public enum TestPlatform { - None, - All, + None = 0, + + iOS = 1, + tvOS = 2, + MacCatalyst = 4, + Mac = 8, - iOS, - tvOS, - MacCatalyst, - Mac, + All = iOS | tvOS | MacCatalyst | Mac, } } diff --git a/tests/xharness/TestProject.cs b/tests/xharness/TestProject.cs index e749522c3df9..c1ea2103ef0d 100644 --- a/tests/xharness/TestProject.cs +++ b/tests/xharness/TestProject.cs @@ -18,24 +18,18 @@ namespace Xharness { public class TestProject { XmlDocument? xml; - bool generate_variations = true; public TestPlatform TestPlatform; public TestLabel Label; public string Path; - public string? SolutionPath; public string? Name; public bool IsExecutableProject; - public bool IsNUnitProject; - public bool IsDotNetProject; public string []? Configurations; - public Func? Dependency; public string? FailureMessage; - public bool RestoreNugetsInProject = true; - public double TimeoutMultiplier = 1; + public TimeSpan Timeout = TimeSpan.FromMinutes (10); public bool? Ignore; - public IEnumerable? ProjectReferences; + public IEnumerable ProjectReferences = Array.Empty (); public TestProject (TestLabel label, string path, bool isExecutableProject = true) { @@ -44,7 +38,20 @@ public TestProject (TestLabel label, string path, bool isExecutableProject = tru IsExecutableProject = isExecutableProject; } - public virtual bool GenerateVariations { get => generate_variations; set => generate_variations = value; } + bool? is_nunit_test_project; + public bool IsNUnitTestProject { + get { + if (!is_nunit_test_project.HasValue) { + if (string.IsNullOrEmpty (Path)) { + is_nunit_test_project = false; + } else { + is_nunit_test_project = File.ReadAllLines (Path).Any (v => v.Contains (" (); } } diff --git a/tests/xharness/Xharness.Tests/Jenkins/NUnitTestTasksEnumerableTests.cs b/tests/xharness/Xharness.Tests/Jenkins/NUnitTestTasksEnumerableTests.cs deleted file mode 100644 index a4900b0a7f9d..000000000000 --- a/tests/xharness/Xharness.Tests/Jenkins/NUnitTestTasksEnumerableTests.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Linq; -using Microsoft.DotNet.XHarness.Common.Logging; -using Microsoft.DotNet.XHarness.iOS.Shared; -using Microsoft.DotNet.XHarness.iOS.Shared.Execution; -using Microsoft.DotNet.XHarness.iOS.Shared.Listeners; -using Moq; -using NUnit.Framework; -using Xharness.Jenkins; - -namespace Xharness.Tests.Jenkins { - - [TestFixture] - public class NUnitTestTaskEnumerableTests { - - Mock processManager; - Mock resultParser; - Mock tunnel; - Mock log; - - Harness harness; - HarnessConfiguration configuration; - Xharness.Jenkins.Jenkins jenkins; - NUnitTestTasksEnumerable factory; - - [SetUp] - public void SetUp () - { - processManager = new Mock (); - resultParser = new Mock (); - tunnel = new Mock (); - log = new Mock (); - configuration = new HarnessConfiguration (); - harness = new Harness (resultParser.Object, HarnessAction.Jenkins, configuration); - jenkins = new Xharness.Jenkins.Jenkins (harness, processManager.Object, resultParser.Object, tunnel.Object); - jenkins.MainLog = log.Object; - - factory = new NUnitTestTasksEnumerable (jenkins, processManager.Object); - } - - [TestCase ("MSBuild tests")] - [TestCase ("MTouch tests")] - [TestCase ("Generator tests")] - [TestCase ("Cecil-based tests")] - [TestCase ("Sample tests")] - public void ContainsTest (string testName) - => Assert.True (factory.Select (t => t.TestName == testName).Any (), testName); - - [Test] - public void CountTest () - => Assert.AreEqual (6, factory.Count (), "Added or removed tests?"); - } -} diff --git a/tests/xharness/Xharness.Tests/Tests/TestTargetExtensionsTests.cs b/tests/xharness/Xharness.Tests/Tests/TestTargetExtensionsTests.cs index 64efc73be642..6ff560f46f9c 100644 --- a/tests/xharness/Xharness.Tests/Tests/TestTargetExtensionsTests.cs +++ b/tests/xharness/Xharness.Tests/Tests/TestTargetExtensionsTests.cs @@ -11,7 +11,7 @@ public class TestTargetExtensionsTests { [TestCase (TestPlatform.tvOS, new [] { TestTarget.Simulator_tvOS })] public void GetAppRunnerTargetsTest (TestPlatform platform, TestTarget [] expectedTargets) { - var targets = platform.GetAppRunnerTargets (); + var targets = platform.GetTestTargetsForSimulator (); Assert.AreEqual (expectedTargets.Length, targets.Length); foreach (var t in expectedTargets) { Assert.Contains (t, targets); diff --git a/tests/xharness/Xharness.Tests/Xharness.Tests.csproj b/tests/xharness/Xharness.Tests/Xharness.Tests.csproj index aa9e19d2f69c..904eaf9e99e4 100644 --- a/tests/xharness/Xharness.Tests/Xharness.Tests.csproj +++ b/tests/xharness/Xharness.Tests/Xharness.Tests.csproj @@ -16,7 +16,6 @@ - @@ -58,5 +57,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + diff --git a/tests/xharness/iOSTestProject.cs b/tests/xharness/iOSTestProject.cs deleted file mode 100644 index ec6f171726a4..000000000000 --- a/tests/xharness/iOSTestProject.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using Microsoft.DotNet.XHarness.iOS.Shared.Hardware; - -namespace Xharness { - public class iOSTestProject : TestProject { - public bool SkipiOSVariation; - public bool SkiptvOSVariation; - public bool SkipDeviceVariations; - public bool BuildOnly; - - public iOSTestProject (TestLabel label, string path) - : base (label, path, true) - { - Name = System.IO.Path.GetFileNameWithoutExtension (path); - } - - public bool IsSupported (DevicePlatform devicePlatform, string productVersion) - { - return true; - } - - public override TestProject Clone () - { - return CompleteClone (new iOSTestProject (Label, Path)); - } - - protected override TestProject CompleteClone (TestProject project) - { - var rv = (iOSTestProject) project; - rv.SkipiOSVariation = SkipiOSVariation; - rv.SkiptvOSVariation = SkiptvOSVariation; - rv.SkipDeviceVariations = SkipDeviceVariations; - rv.BuildOnly = BuildOnly; - return base.CompleteClone (rv); - } - } -} diff --git a/tests/xharness/xharness.csproj b/tests/xharness/xharness.csproj index 7899035397d6..f276a9ba8a79 100644 --- a/tests/xharness/xharness.csproj +++ b/tests/xharness/xharness.csproj @@ -14,19 +14,19 @@ Project - --verbose --jenkins:server --autoconf --rootdir .. + --verbose --jenkins:server --rootdir .. Project - --verbose --jenkins --autoconf --rootdir .. + --verbose --jenkins --rootdir .. Project - --verbose --jenkins --autoconf --rootdir .. --label run-all-tests,skip-ios-device-tests,skip-mac-32-tests --markdown-summary=../TestSummary.md + --verbose --jenkins --rootdir .. --label run-all-tests,skip-ios-device-tests,skip-mac-32-tests --markdown-summary=../TestSummary.md Project - --verbose --jenkins --autoconf --rootdir .. --label=skip-mac-tests,skip-ios-simulator-tests,skip-ios-msbuild-tests,skip-system-permission-tests,run-ios-device-tests,run-ios-extensions-tests --markdown-summary=../TestSummary.md + --verbose --jenkins --rootdir .. --label=skip-mac-tests,skip-ios-simulator-tests,skip-ios-msbuild-tests,skip-system-permission-tests,run-ios-device-tests,run-ios-extensions-tests --markdown-summary=../TestSummary.md @@ -47,12 +47,11 @@ - - + @@ -82,10 +81,8 @@ - - @@ -95,11 +92,8 @@ - - - @@ -108,7 +102,6 @@ - diff --git a/tests/xtro-sharpie/Makefile b/tests/xtro-sharpie/Makefile index 35d7f4bf2ddc..9bb56da34c43 100644 --- a/tests/xtro-sharpie/Makefile +++ b/tests/xtro-sharpie/Makefile @@ -178,13 +178,14 @@ endif gen-all: gen-ios gen-tvos gen-macos gen-maccatalyst -dotnet-wrench: - $(MAKE) -j8 dotnet-classify - report-dotnet/index.html: $(XTRO_REPORT) .stamp-dotnet-classify $(Q) rm -rf report-dotnet $(Q_GEN) $(XTRO_REPORT_EXEC) $(DOTNET_ANNOTATIONS_DIR) report-dotnet +report-dotnet/report.zip: report-dotnet/index.html + $(Q) rm -f "$@" + $(Q) cd report-dotnet && zip -r9 report.zip . -x report.zip + dotnet-report: report-dotnet/index.html report-short: @@ -229,3 +230,6 @@ $(U2TODO): $(wildcard u2todo/*.cs u2todo/*.csproj xtro-sharpie/Filter.cs) unclassified2todo: $(U2TODO) cd $(DOTNET_ANNOTATIONS_DIR) && $(DOTNET) exec $(abspath $(U2TODO)) + +run-tests run-unit-tests: + $(Q) $(MAKE) -C UnitTests $@ diff --git a/tests/xtro-sharpie/UnitTests/GlobalImports.cs b/tests/xtro-sharpie/UnitTests/GlobalImports.cs new file mode 100644 index 000000000000..cd7debe8ff00 --- /dev/null +++ b/tests/xtro-sharpie/UnitTests/GlobalImports.cs @@ -0,0 +1,9 @@ +global using System; +global using System.Collections.Generic; +global using System.IO; +global using System.Linq; +global using System.Text; + +global using NUnit.Framework; + +global using Xamarin.Utils; diff --git a/tests/xtro-sharpie/UnitTests/Makefile b/tests/xtro-sharpie/UnitTests/Makefile new file mode 100644 index 000000000000..c47fb45cd62e --- /dev/null +++ b/tests/xtro-sharpie/UnitTests/Makefile @@ -0,0 +1,16 @@ +TOP=../../.. + +include $(TOP)/Make.config + + +build: + $(DOTNET) build UnitTests.csproj + +publish: + $(DOTNET) publish UnitTests.csproj + +# Example TEST_FILTER: +# TEST_FILTER="--filter FullyQualifiedName~Xtro" +# Docs: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#filter-option-details +run-tests run-unit-tests: + $(DOTNET) test UnitTests.csproj $(TEST_FILTER) diff --git a/tests/xtro-sharpie/UnitTests/UnitTests.csproj b/tests/xtro-sharpie/UnitTests/UnitTests.csproj new file mode 100644 index 000000000000..d4d02af8f78d --- /dev/null +++ b/tests/xtro-sharpie/UnitTests/UnitTests.csproj @@ -0,0 +1,49 @@ + + + net$(BundledNETCoreAppTargetFrameworkVersion) + false + $(DefineConstants);NET;TESTS + enable + Nullable + + + + + + + + + + + + + + + external\Configuration.cs + + + external\ConfigurationNUnit.cs + + + external\Cache.cs + + + external\ApplePlatform.cs + + + external\Execution.cs + + + external\ExecutionHelper.cs + + + external\SdkVersions.cs + + + external\StringUtils.cs + + + external\TargetFramework.cs + + + diff --git a/tests/xtro-sharpie/UnitTests/Xtro.cs b/tests/xtro-sharpie/UnitTests/Xtro.cs new file mode 100644 index 000000000000..9b4dd819c721 --- /dev/null +++ b/tests/xtro-sharpie/UnitTests/Xtro.cs @@ -0,0 +1,35 @@ +using System.Diagnostics; +using System.Xml; + +#nullable enable + +namespace Xamarin.Tests { + [TestFixture] + public class Xtro { + [Test] + public void RunTest () + { + var dir = Path.Combine (Configuration.SourceRoot, "tests", "xtro-sharpie"); + var args = new [] { + "-C", dir, + "report-dotnet/report.zip", + "-j", "8", + }; + var rv = ExecutionHelper.Execute ("make", args); + + var report = Path.Combine (dir, "report-dotnet", "index.html"); + if (File.Exists (report)) { + Console.WriteLine ($"Added {report} as attachment."); + TestContext.AddTestAttachment (report, "HTML report"); + } + + var zippedReport = Path.Combine (dir, "report-dotnet", "report.zip"); + if (File.Exists (zippedReport)) { + Console.WriteLine ($"Added {zippedReport} as attachment."); + TestContext.AddTestAttachment (zippedReport, "HTML report (zipped)"); + } + + Assert.AreEqual (0, rv, "ExitCode"); + } + } +} diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.ignore index 0a72b194ef8f..57740b67f44c 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.ignore @@ -12,3 +12,14 @@ ### deprecated in iOS8 !missing-protocol-member! AVAudioPlayerDelegate::audioPlayerEndInterruption:withFlags: not found + +## I have no idea where these come from, I can't find them neither online, nor in any headers. +!missing-selector! AVAudioSession::isAVAudioSessionAvailable not bound +!missing-selector! AVAudioSession::preferredAVAudioSessionMode not bound +!missing-selector! AVAudioSession::setPreferredAVAudioSessionMode:error: not bound + +# Introspection says this selector isn't there on Mac Catalyst, so not binding it. +!missing-selector! AVAudioSession::setPrefersEchoCancelledInput:error: not bound + +# isEqual: is already exposed from NSObject, no need to expose again +!missing-selector! AVCaptionRegion::isEqual: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo deleted file mode 100644 index b84ad26a0020..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo +++ /dev/null @@ -1,923 +0,0 @@ -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsBestMatchingPreferredLanguages: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::mediaSelectionGroupForMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::trackWithTrackID: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::unusedTrackID missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::associatedTracksOfType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::samplePresentationTimeForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::segmentForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:to:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:toNodes:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVMutableComposition::insertTimeRange:ofAsset:atTime:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVURLAsset::compatibleTrackForCompositionTrack: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVVideoComposition::isValidForAsset:timeRange:validationDelegate: missing a [Deprecated] attribute -!missing-enum! AVAssetTrackGroupOutputHandling not bound -!missing-enum! AVMIDIControlChangeMessageType not bound -!missing-enum! AVMIDIMetaEventType not bound -!missing-enum! AVSpeechSynthesisMarkerMark not bound -!missing-enum-value! AVError native value AVErrorAirPlayReceiverTemporarilyUnavailable = -11882 not bound -!missing-enum-value! AVError native value AVErrorFailedToLoadSampleData = -11881 not bound -!missing-enum-value! AVError native value AVErrorInvalidSampleCursor = -11880 not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoMultiviewVideo not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoVideo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyAlbum not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyApproximateDurationInSeconds not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyArtist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyChannelLayout not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComments not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComposer not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyCopyright not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyEncodingApplication not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyGenre not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyISRC not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyKeySignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyLyricist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyNominalBitRate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyRecordedDate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceBitDepth not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceEncoder not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySubTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTempo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTimeSignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTrackNumber not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyYear not bound -!missing-field! AVExtendedNoteOnEventDefaultInstrument not bound -!missing-field! AVPlayerInterstitialEventJoinCue not bound -!missing-field! AVPlayerInterstitialEventLeaveCue not bound -!missing-field! AVPlayerInterstitialEventNoCue not bound -!missing-field! AVURLAssetHTTPUserAgentKey not bound -!missing-field! AVURLAssetPrimarySessionIdentifierKey not bound -!missing-field! AVVideoTransferFunction_Linear not bound -!missing-protocol-conformance! AVPlayerInterstitialEvent should conform to NSCopying -!missing-selector! +AVAssetPlaybackAssistant::assetPlaybackAssistantWithAsset: not bound -!missing-selector! +AVCaptureDevice::isStudioLightEnabled not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:prototypeInstruction:completionHandler: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time: not bound -!missing-selector! +AVSampleBufferGenerator::notifyOfDataReadyForSampleBuffer:completionHandler: not bound -!missing-selector! +AVSpeechSynthesisProviderVoice::updateSpeechVoices not bound -!missing-selector! +AVSpeechUtterance::speechUtteranceWithSSMLRepresentation: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! AVAssetExportSession::audioTrackGroupHandling not bound -!missing-selector! AVAssetExportSession::setAudioTrackGroupHandling: not bound -!missing-selector! AVAssetPlaybackAssistant::loadPlaybackConfigurationOptionsWithCompletionHandler: not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::isEntireLengthAvailableOnDemand not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::setEntireLengthAvailableOnDemand: not bound -!missing-selector! AVAssetTrack::makeSampleCursorAtFirstSampleInDecodeOrder not bound -!missing-selector! AVAssetTrack::makeSampleCursorAtLastSampleInDecodeOrder not bound -!missing-selector! AVAssetTrack::makeSampleCursorWithPresentationTimeStamp: not bound -!missing-selector! AVAudioEngine::connectMIDI:to:format:eventListBlock: not bound -!missing-selector! AVAudioEngine::connectMIDI:toNodes:format:eventListBlock: not bound -!missing-selector! AVAudioSequencer::createAndAppendTrack not bound -!missing-selector! AVAudioSequencer::removeTrack: not bound -!missing-selector! AVAudioSequencer::reverseEvents not bound -!missing-selector! AVAudioSequencer::setUserCallback: not bound -!missing-selector! AVAudioUnitMIDIInstrument::sendMIDIEventList: not bound -!missing-selector! AVAUPresetEvent::element not bound -!missing-selector! AVAUPresetEvent::initWithScope:element:dictionary: not bound -!missing-selector! AVAUPresetEvent::presetDictionary not bound -!missing-selector! AVAUPresetEvent::scope not bound -!missing-selector! AVAUPresetEvent::setElement: not bound -!missing-selector! AVAUPresetEvent::setScope: not bound -!missing-selector! AVCaptureDevice::companionDeskViewCamera not bound -!missing-selector! AVCaptureDevice::isContinuityCamera not bound -!missing-selector! AVCaptureDevice::isStudioLightActive not bound -!missing-selector! AVCaptureDeviceFormat::isStudioLightSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForStudioLight not bound -!missing-selector! AVComposition::chapterMetadataGroupsBestMatchingPreferredLanguages: not bound -!missing-selector! AVComposition::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: not bound -!missing-selector! AVComposition::mediaSelectionGroupForMediaCharacteristic: not bound -!missing-selector! AVComposition::metadataForFormat: not bound -!missing-selector! AVComposition::unusedTrackID not bound -!missing-selector! AVCompositionTrack::associatedTracksOfType: not bound -!missing-selector! AVCompositionTrack::hasMediaCharacteristic: not bound -!missing-selector! AVCompositionTrack::metadataForFormat: not bound -!missing-selector! AVCompositionTrack::samplePresentationTimeForTrackTime: not bound -!missing-selector! AVExtendedNoteOnEvent::duration not bound -!missing-selector! AVExtendedNoteOnEvent::groupID not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:instrumentID:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::instrumentID not bound -!missing-selector! AVExtendedNoteOnEvent::midiNote not bound -!missing-selector! AVExtendedNoteOnEvent::setDuration: not bound -!missing-selector! AVExtendedNoteOnEvent::setGroupID: not bound -!missing-selector! AVExtendedNoteOnEvent::setInstrumentID: not bound -!missing-selector! AVExtendedNoteOnEvent::setMidiNote: not bound -!missing-selector! AVExtendedNoteOnEvent::setVelocity: not bound -!missing-selector! AVExtendedNoteOnEvent::velocity not bound -!missing-selector! AVExtendedTempoEvent::initWithTempo: not bound -!missing-selector! AVExtendedTempoEvent::setTempo: not bound -!missing-selector! AVExtendedTempoEvent::tempo not bound -!missing-selector! AVMIDIChannelEvent::channel not bound -!missing-selector! AVMIDIChannelEvent::setChannel: not bound -!missing-selector! AVMIDIChannelPressureEvent::initWithChannel:pressure: not bound -!missing-selector! AVMIDIChannelPressureEvent::pressure not bound -!missing-selector! AVMIDIChannelPressureEvent::setPressure: not bound -!missing-selector! AVMIDIControlChangeEvent::initWithChannel:messageType:value: not bound -!missing-selector! AVMIDIControlChangeEvent::messageType not bound -!missing-selector! AVMIDIControlChangeEvent::value not bound -!missing-selector! AVMIDIMetaEvent::initWithType:data: not bound -!missing-selector! AVMIDIMetaEvent::type not bound -!missing-selector! AVMIDINoteEvent::channel not bound -!missing-selector! AVMIDINoteEvent::duration not bound -!missing-selector! AVMIDINoteEvent::initWithChannel:key:velocity:duration: not bound -!missing-selector! AVMIDINoteEvent::key not bound -!missing-selector! AVMIDINoteEvent::setChannel: not bound -!missing-selector! AVMIDINoteEvent::setDuration: not bound -!missing-selector! AVMIDINoteEvent::setKey: not bound -!missing-selector! AVMIDINoteEvent::setVelocity: not bound -!missing-selector! AVMIDINoteEvent::velocity not bound -!missing-selector! AVMIDIPitchBendEvent::initWithChannel:value: not bound -!missing-selector! AVMIDIPitchBendEvent::setValue: not bound -!missing-selector! AVMIDIPitchBendEvent::value not bound -!missing-selector! AVMIDIPolyPressureEvent::initWithChannel:key:pressure: not bound -!missing-selector! AVMIDIPolyPressureEvent::key not bound -!missing-selector! AVMIDIPolyPressureEvent::pressure not bound -!missing-selector! AVMIDIPolyPressureEvent::setKey: not bound -!missing-selector! AVMIDIPolyPressureEvent::setPressure: not bound -!missing-selector! AVMIDIProgramChangeEvent::initWithChannel:programNumber: not bound -!missing-selector! AVMIDIProgramChangeEvent::programNumber not bound -!missing-selector! AVMIDIProgramChangeEvent::setProgramNumber: not bound -!missing-selector! AVMIDISysexEvent::initWithData: not bound -!missing-selector! AVMIDISysexEvent::sizeInBytes not bound -!missing-selector! AVMusicTrack::addEvent:atBeat: not bound -!missing-selector! AVMusicTrack::clearEventsInRange: not bound -!missing-selector! AVMusicTrack::copyAndMergeEventsInRange:fromTrack:mergeAtBeat: not bound -!missing-selector! AVMusicTrack::copyEventsInRange:fromTrack:insertAtBeat: not bound -!missing-selector! AVMusicTrack::cutEventsInRange: not bound -!missing-selector! AVMusicTrack::enumerateEventsInRange:usingBlock: not bound -!missing-selector! AVMusicTrack::moveEventsInRange:byAmount: not bound -!missing-selector! AVMusicTrack::setUsesAutomatedParameters: not bound -!missing-selector! AVMusicTrack::usesAutomatedParameters not bound -!missing-selector! AVMusicUserEvent::initWithData: not bound -!missing-selector! AVMusicUserEvent::sizeInBytes not bound -!missing-selector! AVMutableMovie::chapterMetadataGroupsBestMatchingPreferredLanguages: not bound -!missing-selector! AVMutableMovie::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: not bound -!missing-selector! AVMutableMovie::mediaSelectionGroupForMediaCharacteristic: not bound -!missing-selector! AVMutableMovie::metadataForFormat: not bound -!missing-selector! AVMutableMovie::unusedTrackID not bound -!missing-selector! AVMutableMovieTrack::associatedTracksOfType: not bound -!missing-selector! AVMutableMovieTrack::hasMediaCharacteristic: not bound -!missing-selector! AVMutableMovieTrack::metadataForFormat: not bound -!missing-selector! AVMutableMovieTrack::samplePresentationTimeForTrackTime: not bound -!missing-selector! AVMutableMovieTrack::segmentForTrackTime: not bound -!missing-selector! AVParameterEvent::element not bound -!missing-selector! AVParameterEvent::initWithParameterID:scope:element:value: not bound -!missing-selector! AVParameterEvent::parameterID not bound -!missing-selector! AVParameterEvent::scope not bound -!missing-selector! AVParameterEvent::setElement: not bound -!missing-selector! AVParameterEvent::setParameterID: not bound -!missing-selector! AVParameterEvent::setScope: not bound -!missing-selector! AVParameterEvent::setValue: not bound -!missing-selector! AVParameterEvent::value not bound -!missing-selector! AVPlayer::defaultRate not bound -!missing-selector! AVPlayer::setDefaultRate: not bound -!missing-selector! AVPlayerInterstitialEvent::alignsResumptionWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::alignsStartWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::cue not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsResumptionWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsStartWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setCue: not bound -!missing-selector! AVPlayerInterstitialEvent::setDate: not bound -!missing-selector! AVPlayerInterstitialEvent::setIdentifier: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlayoutLimit: not bound -!missing-selector! AVPlayerInterstitialEvent::setPrimaryItem: not bound -!missing-selector! AVPlayerInterstitialEvent::setRestrictions: not bound -!missing-selector! AVPlayerInterstitialEvent::setResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEvent::setTemplateItems: not bound -!missing-selector! AVPlayerInterstitialEvent::setTime: not bound -!missing-selector! AVPlayerInterstitialEvent::setUserDefinedAttributes: not bound -!missing-selector! AVPlayerInterstitialEvent::setWillPlayOnce: not bound -!missing-selector! AVPlayerInterstitialEvent::willPlayOnce not bound -!missing-selector! AVRouteDetector::detectsCustomRoutes not bound -!missing-selector! AVRouteDetector::setDetectsCustomRoutes: not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:addingToBatch:error: not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:error: not bound -!missing-selector! AVSampleBufferGenerator::initWithAsset:timebase: not bound -!missing-selector! AVSampleBufferGenerator::makeBatch not bound -!missing-selector! AVSampleBufferGeneratorBatch::cancel not bound -!missing-selector! AVSampleBufferGeneratorBatch::makeDataReadyWithCompletionHandler: not bound -!missing-selector! AVSampleBufferRequest::direction not bound -!missing-selector! AVSampleBufferRequest::initWithStartCursor: not bound -!missing-selector! AVSampleBufferRequest::limitCursor not bound -!missing-selector! AVSampleBufferRequest::maxSampleCount not bound -!missing-selector! AVSampleBufferRequest::mode not bound -!missing-selector! AVSampleBufferRequest::overrideTime not bound -!missing-selector! AVSampleBufferRequest::preferredMinSampleCount not bound -!missing-selector! AVSampleBufferRequest::setDirection: not bound -!missing-selector! AVSampleBufferRequest::setLimitCursor: not bound -!missing-selector! AVSampleBufferRequest::setMaxSampleCount: not bound -!missing-selector! AVSampleBufferRequest::setMode: not bound -!missing-selector! AVSampleBufferRequest::setOverrideTime: not bound -!missing-selector! AVSampleBufferRequest::setPreferredMinSampleCount: not bound -!missing-selector! AVSampleBufferRequest::startCursor not bound -!missing-selector! AVSpeechSynthesisMarker::byteSampleOffset not bound -!missing-selector! AVSpeechSynthesisMarker::initWithMarkerType:forTextRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::mark not bound -!missing-selector! AVSpeechSynthesisMarker::setByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::setMark: not bound -!missing-selector! AVSpeechSynthesisMarker::setTextRange: not bound -!missing-selector! AVSpeechSynthesisMarker::textRange not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::cancelSpeechRequest not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechSynthesisOutputMetadataBlock: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechVoices: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechSynthesisOutputMetadataBlock not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechVoices not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::synthesizeSpeechRequest: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::initWithSSMLRepresentation:voice: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::ssmlRepresentation not bound -!missing-selector! AVSpeechSynthesisProviderRequest::voice not bound -!missing-selector! AVSpeechSynthesisProviderVoice::age not bound -!missing-selector! AVSpeechSynthesisProviderVoice::gender not bound -!missing-selector! AVSpeechSynthesisProviderVoice::identifier not bound -!missing-selector! AVSpeechSynthesisProviderVoice::initWithName:identifier:primaryLanguages:supportedLanguages: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::name not bound -!missing-selector! AVSpeechSynthesisProviderVoice::primaryLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setAge: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setGender: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVersion: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVoiceSize: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::supportedLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::version not bound -!missing-selector! AVSpeechSynthesisProviderVoice::voiceSize not bound -!missing-selector! AVSpeechSynthesizer::writeUtterance:toBufferCallback:toMarkerCallback: not bound -!missing-selector! AVSpeechUtterance::initWithSSMLRepresentation: not bound -!missing-selector! AVURLAsset::httpSessionIdentifier not bound -!missing-type! AVAssetPlaybackAssistant not bound -!missing-type! AVAUPresetEvent not bound -!missing-type! AVExtendedNoteOnEvent not bound -!missing-type! AVExtendedTempoEvent not bound -!missing-type! AVMIDIChannelEvent not bound -!missing-type! AVMIDIChannelPressureEvent not bound -!missing-type! AVMIDIControlChangeEvent not bound -!missing-type! AVMIDIMetaEvent not bound -!missing-type! AVMIDINoteEvent not bound -!missing-type! AVMIDIPitchBendEvent not bound -!missing-type! AVMIDIPolyPressureEvent not bound -!missing-type! AVMIDIProgramChangeEvent not bound -!missing-type! AVMIDISysexEvent not bound -!missing-type! AVMusicEvent not bound -!missing-type! AVMusicUserEvent not bound -!missing-type! AVParameterEvent not bound -!missing-type! AVSampleBufferGenerator not bound -!missing-type! AVSampleBufferGeneratorBatch not bound -!missing-type! AVSampleBufferRequest not bound -!missing-type! AVSpeechSynthesisMarker not bound -!missing-type! AVSpeechSynthesisProviderAudioUnit not bound -!missing-type! AVSpeechSynthesisProviderRequest not bound -!missing-type! AVSpeechSynthesisProviderVoice not bound -!deprecated-attribute-missing! AVCaptureConnection::isVideoOrientationSupported missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::enqueueSampleBuffer: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::error missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flush missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flushAndRemoveImage missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::isReadyForMoreMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requestMediaDataWhenReadyOnQueue:usingBlock: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requiresFlushToResumeDecoding missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::status missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::stopRequestingMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::timebase missing a [Deprecated] attribute -!extra-designated-initializer! AVPlayerLooper::initWithPlayer:templateItem:timeRange: is incorrectly decorated with an [DesignatedInitializer] attribute -!missing-enum! AVAudioSessionRenderingMode not bound -!missing-enum! AVAudioVoiceProcessingOtherAudioDuckingLevel not bound -!missing-enum! AVAudioVoiceProcessingSpeechActivityEvent not bound -!missing-enum! AVCapturePhotoOutputCaptureReadiness not bound -!missing-enum! AVExternalContentProtectionStatus not bound -!missing-enum! AVPlayerInterstitialEventAssetListResponseStatus not bound -!missing-enum! AVPlayerLooperItemOrdering not bound -!missing-enum! AVSpeechSynthesisPersonalVoiceAuthorizationStatus not bound -!missing-enum! AVSpeechSynthesisVoiceTraits not bound -!missing-enum! CMTagCollectionVideoOutputPreset not bound -!missing-enum-value! AVCaptureColorSpace native value AVCaptureColorSpace_AppleLog = 3 not bound -!missing-enum-value! AVCaptureSystemPressureFactors native value AVCaptureSystemPressureFactorCameraTemperature = 8 not bound -!missing-enum-value! AVError native value AVErrorEncodeFailed = -11883 not bound -!missing-enum-value! AVError native value AVErrorSandboxExtensionDenied = -11884 not bound -!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound -!missing-field! AVAssetExportPresetMVHEVC1440x1440 not bound -!missing-field! AVAssetExportPresetMVHEVC960x960 not bound -!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound -!missing-field! AVAudioApplicationMuteStateKey not bound -!missing-field! AVAudioSessionPortContinuityMicrophone not bound -!missing-field! AVAudioSessionRenderingCapabilitiesChangeNotification not bound -!missing-field! AVAudioSessionRenderingModeChangeNotification not bound -!missing-field! AVAudioSessionRenderingModeNewRenderingModeKey not bound -!missing-field! AVCaptureDeviceTypeContinuityCamera not bound -!missing-field! AVCaptureDeviceTypeMicrophone not bound -!missing-field! AVFileTypeAHAP not bound -!missing-field! AVMediaCharacteristicCarriesVideoStereoMetadata not bound -!missing-field! AVMediaCharacteristicContainsStereoMultiviewVideo not bound -!missing-field! AVMediaCharacteristicEnhancesSpeechIntelligibility not bound -!missing-field! AVMediaCharacteristicIndicatesHorizontalFieldOfView not bound -!missing-field! AVMediaCharacteristicTactileMinimal not bound -!missing-field! AVMediaTypeHaptic not bound -!missing-field! AVMetadataObjectTypeHumanFullBody not bound -!missing-field! AVOutputSettingsPresetMVHEVC1440x1440 not bound -!missing-field! AVOutputSettingsPresetMVHEVC960x960 not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeErrorKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeEventKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeStatusKey not bound -!missing-field! AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotification not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotificationErrorKey not bound -!missing-field! AVSampleBufferVideoRendererRequiresFlushToResumeDecodingDidChangeNotification not bound -!missing-field! AVSpeechSynthesisAvailableVoicesDidChangeNotification not bound -!missing-field! AVURLAssetOverrideMIMETypeKey not bound -!missing-field! AVVideoCompositionPerFrameHDRDisplayMetadataPolicyGenerate not bound -!missing-field! AVVideoCompositionPerFrameHDRDisplayMetadataPolicyPropagate not bound -!missing-field! AVVideoDecompressionPropertiesKey not bound -!missing-pinvoke! AVCaptureReactionSystemImageNameForType is not bound -!missing-pinvoke! CMTagCollectionCreateWithVideoOutputPreset is not bound -!missing-protocol! AVCapturePhotoOutputReadinessCoordinatorDelegate not bound -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:externalProtectionStatusDidChangeForContentKey: not found -!missing-protocol-member! AVSpeechSynthesizerDelegate::speechSynthesizer:willSpeakMarker:utterance: not found -!missing-selector! +AVAssetVariantQualifier::predicateForBinauralAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForDownmixAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForImmersiveAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetWriterInputTaggedPixelBufferGroupAdaptor::assetWriterInputTaggedPixelBufferGroupAdaptorWithAssetWriterInput:sourcePixelBufferAttributes: not bound -!missing-selector! +AVCaptureDevice::reactionEffectGesturesEnabled not bound -!missing-selector! +AVCaptureDevice::reactionEffectsEnabled not bound -!missing-selector! +AVCaptureDevice::setUserPreferredCamera: not bound -!missing-selector! +AVCaptureDevice::systemPreferredCamera not bound -!missing-selector! +AVCaptureDevice::userPreferredCamera not bound -!missing-selector! +AVExternalStorageDevice::authorizationStatus not bound -!missing-selector! +AVExternalStorageDevice::requestAccessWithCompletionHandler: not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::isSupported not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::sharedSession not bound -!missing-selector! +AVSpeechSynthesizer::personalVoiceAuthorizationStatus not bound -!missing-selector! +AVSpeechSynthesizer::requestPersonalVoiceAuthorizationWithCompletionHandler: not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isBinaural not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isDownmix not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isImmersive not bound -!missing-selector! AVAssetVariantVideoAttributes::videoLayoutAttributes not bound -!missing-selector! AVAssetVariantVideoLayoutAttributes::stereoViewComponents not bound -!missing-selector! AVAssetWriter::initialMovieFragmentInterval not bound -!missing-selector! AVAssetWriter::setInitialMovieFragmentInterval: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::appendTaggedPixelBufferGroup:withPresentationTime: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::assetWriterInput not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::initWithAssetWriterInput:sourcePixelBufferAttributes: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::pixelBufferPool not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::sourcePixelBufferAttributes not bound -!missing-selector! AVAudioInputNode::setMutedSpeechActivityEventListener: not bound -!missing-selector! AVAudioInputNode::setVoiceProcessingOtherAudioDuckingConfiguration: not bound -!missing-selector! AVAudioInputNode::voiceProcessingOtherAudioDuckingConfiguration not bound -!missing-selector! AVAudioPlayer::initWithContentsOfURL:error: not bound -!missing-selector! AVAudioPlayer::initWithData:error: not bound -!missing-selector! AVAudioSession::prefersInterruptionOnRouteDisconnect not bound -!missing-selector! AVAudioSession::renderingMode not bound -!missing-selector! AVAudioSession::setPrefersInterruptionOnRouteDisconnect:error: not bound -!missing-selector! AVAudioSession::supportedOutputChannelLayouts not bound -!missing-selector! AVCaptureConnection::setVideoRotationAngle: not bound -!missing-selector! AVCaptureDeskViewApplication::presentWithCompletionHandler: not bound -!missing-selector! AVCaptureDeskViewApplication::presentWithLaunchConfiguration:completionHandler: not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::mainWindowFrame not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::requiresSetUpModeCompletion not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setMainWindowFrame: not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setRequiresSetUpModeCompletion: not bound -!missing-selector! AVCaptureDevice::availableReactionTypes not bound -!missing-selector! AVCaptureDevice::canPerformReactionEffects not bound -!missing-selector! AVCaptureDevice::centerStageRectOfInterest not bound -!missing-selector! AVCaptureDevice::displayVideoZoomFactorMultiplier not bound -!missing-selector! AVCaptureDevice::performEffectForReaction: not bound -!missing-selector! AVCaptureDevice::reactionEffectsInProgress not bound -!missing-selector! AVCaptureDevice::setCenterStageRectOfInterest: not bound -!missing-selector! AVCaptureDeviceFormat::reactionEffectsSupported not bound -!missing-selector! AVCaptureDeviceFormat::supportedVideoZoomRangesForDepthDataDelivery not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForReactionEffectsInProgress not bound -!missing-selector! AVCaptureDeviceFormat::zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::device not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::initWithDevice:previewLayer: not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::previewLayer not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelCapture not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelPreview not bound -!missing-selector! AVCapturePhotoOutput::captureReadiness not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationSupported not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureEnabled not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureSupported not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagEnabled not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagSupported not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationSupported: not bound -!missing-selector! AVCapturePhotoOutput::setResponsiveCaptureEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setZeroShutterLagEnabled: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::captureReadiness not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::delegate not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::initWithPhotoOutput: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::setDelegate: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::startTrackingCaptureRequestUsingPhotoSettings: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::stopTrackingCaptureRequestUsingPhotoSettingsUniqueID: not bound -!missing-selector! AVCaptureReactionEffectState::endTime not bound -!missing-selector! AVCaptureReactionEffectState::reactionType not bound -!missing-selector! AVCaptureReactionEffectState::startTime not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVCaptureVideoDataOutput::recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType:outputFileURL: not bound -!missing-selector! AVContentKey::externalContentProtectionStatus not bound -!missing-selector! AVContentKey::revoke not bound -!missing-selector! AVExternalStorageDevice::displayName not bound -!missing-selector! AVExternalStorageDevice::freeSize not bound -!missing-selector! AVExternalStorageDevice::isConnected not bound -!missing-selector! AVExternalStorageDevice::isNotRecommendedForCaptureUse not bound -!missing-selector! AVExternalStorageDevice::nextAvailableURLsWithPathExtensions:error: not bound -!missing-selector! AVExternalStorageDevice::totalSize not bound -!missing-selector! AVExternalStorageDevice::uuid not bound -!missing-selector! AVExternalStorageDeviceDiscoverySession::externalStorageDevices not bound -!missing-selector! AVMutableVideoComposition::perFrameHDRDisplayMetadataPolicy not bound -!missing-selector! AVMutableVideoComposition::setPerFrameHDRDisplayMetadataPolicy: not bound -!missing-selector! AVPlayer::setVideoOutput: not bound -!missing-selector! AVPlayer::videoOutput not bound -!missing-selector! AVPlayerInterstitialEvent::assetListResponse not bound -!missing-selector! AVPlayerItem::isApplicationAuthorizedForPlayback not bound -!missing-selector! AVPlayerItem::isAuthorizationRequiredForPlayback not bound -!missing-selector! AVPlayerItem::isContentAuthorizedForPlayback not bound -!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound -!missing-selector! AVPlayerLooper::initWithPlayer:templateItem:timeRange:existingItemsOrdering: not bound -!missing-selector! AVPlayerVideoOutput::copyTaggedBufferGroupForHostTime:presentationTimeStamp:activeConfiguration: not bound -!missing-selector! AVPlayerVideoOutput::initWithSpecification: not bound -!missing-selector! AVPlayerVideoOutputConfiguration::activationTime not bound -!missing-selector! AVPlayerVideoOutputConfiguration::dataChannelDescriptions not bound -!missing-selector! AVPlayerVideoOutputConfiguration::sourcePlayerItem not bound -!missing-selector! AVSampleBufferDisplayLayer::isReadyForDisplay not bound -!missing-selector! AVSampleBufferDisplayLayer::sampleBufferRenderer not bound -!missing-selector! AVSampleBufferVideoRenderer::copyDisplayedPixelBuffer not bound -!missing-selector! AVSampleBufferVideoRenderer::error not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMinimumUpcomingSampleBufferPresentationTime: not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes not bound -!missing-selector! AVSampleBufferVideoRenderer::flushWithRemovalOfDisplayedImage:completionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::loadVideoPerformanceMetricsWithCompletionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::requiresFlushToResumeDecoding not bound -!missing-selector! AVSampleBufferVideoRenderer::resetUpcomingSampleBufferPresentationTimeExpectations not bound -!missing-selector! AVSampleBufferVideoRenderer::status not bound -!missing-selector! AVSpeechSynthesisMarker::bookmarkName not bound -!missing-selector! AVSpeechSynthesisMarker::initWithBookmarkName:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithParagraphRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithPhonemeString:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithSentenceRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithWordRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::phoneme not bound -!missing-selector! AVSpeechSynthesisMarker::setBookmarkName: not bound -!missing-selector! AVSpeechSynthesisMarker::setPhoneme: not bound -!missing-selector! AVSpeechSynthesisVoice::voiceTraits not bound -!missing-selector! AVVideoComposition::perFrameHDRDisplayMetadataPolicy not bound -!missing-selector! AVVideoOutputSpecification::initWithTagCollections: not bound -!missing-selector! AVVideoOutputSpecification::preferredTagCollections not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfCorruptedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfDroppedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfFramesDisplayedUsingOptimizedCompositing not bound -!missing-selector! AVVideoPerformanceMetrics::totalAccumulatedFrameDelay not bound -!missing-selector! AVVideoPerformanceMetrics::totalNumberOfFrames not bound -!missing-selector! AVZoomRange::containsZoomFactor: not bound -!missing-selector! AVZoomRange::maxZoomFactor not bound -!missing-selector! AVZoomRange::minZoomFactor not bound -!missing-type! AVAssetVariantVideoLayoutAttributes not bound -!missing-type! AVAssetWriterInputTaggedPixelBufferGroupAdaptor not bound -!missing-type! AVCaptureDeskViewApplication not bound -!missing-type! AVCaptureDeskViewApplicationLaunchConfiguration not bound -!missing-type! AVCaptureDeviceRotationCoordinator not bound -!missing-type! AVCapturePhotoOutputReadinessCoordinator not bound -!missing-type! AVCaptureReactionEffectState not bound -!missing-type! AVExternalStorageDevice not bound -!missing-type! AVExternalStorageDeviceDiscoverySession not bound -!missing-type! AVMetadataHumanFullBodyObject not bound -!missing-type! AVPlayerVideoOutput not bound -!missing-type! AVPlayerVideoOutputConfiguration not bound -!missing-type! AVSampleBufferVideoRenderer not bound -!missing-type! AVVideoOutputSpecification not bound -!missing-type! AVVideoPerformanceMetrics not bound -!missing-type! AVZoomRange not bound -!deprecated-attribute-missing! AVAggregateAssetDownloadTask missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didCompleteForMediaSelection: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:willDownloadToURL: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:assetDownloadTask:didFinishDownloadingToURL: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:assetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadTask::loadedTimeRanges missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadTask::options missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadURLSession::aggregateAssetDownloadTaskWithURLAsset:mediaSelections:assetTitle:assetArtworkData:options: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadURLSession::assetDownloadTaskWithURLAsset:assetTitle:assetArtworkData:options: missing a [Deprecated] attribute -!missing-enum! AVCaptionAnimation not bound -!missing-enum! AVCaptionConversionValidatorStatus not bound -!missing-enum! AVCaptionDecoration not bound -!missing-enum! AVCaptionFontStyle not bound -!missing-enum! AVCaptionFontWeight not bound -!missing-enum! AVCaptionRegionDisplayAlignment not bound -!missing-enum! AVCaptionRegionScroll not bound -!missing-enum! AVCaptionRegionWritingMode not bound -!missing-enum! AVCaptionRubyAlignment not bound -!missing-enum! AVCaptionRubyPosition not bound -!missing-enum! AVCaptionTextAlignment not bound -!missing-enum! AVCaptionTextCombine not bound -!missing-enum! AVCaptionUnitsType not bound -!missing-enum! AVCaptureMultichannelAudioMode not bound -!missing-enum! AVPlayerInterstitialEventTimelineOccupancy not bound -!missing-enum! AVPlayerItemSegmentType not bound -!missing-enum-value! AVError native value AVErrorToneMappingFailed = -11885 not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyForceSDR not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyMatchSource not bound -!missing-field! AVAssetPlaybackConfigurationOptionSpatialVideo not bound -!missing-field! AVCaptionConversionAdjustmentTypeTimeRange not bound -!missing-field! AVCaptionConversionWarningTypeExcessMediaData not bound -!missing-field! AVCaptionMediaSubTypeKey not bound -!missing-field! AVCaptionMediaTypeKey not bound -!missing-field! AVCaptionTimeCodeFrameDurationKey not bound -!missing-field! AVCaptionUseDropFrameTimeCodeKey not bound -!missing-field! AVFileTypeAppleiTT not bound -!missing-field! AVFileTypeSCC not bound -!missing-field! AVMediaTypeAuxiliaryPicture not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncNotification not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonCurrentSegmentChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonKey not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonLoadedTimeRangesChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonSegmentsChanged not bound -!missing-field! AVSpatialCaptureDiscomfortReasonNotEnoughLight not bound -!missing-field! AVSpatialCaptureDiscomfortReasonSubjectTooClose not bound -!missing-field! AVVideoCodecTypeAppleProRes4444XQ not bound -!missing-field! AVVideoTransferFunction_IEC_sRGB not bound -!missing-pinvoke! AVCaptionDimensionMake is not bound -!missing-pinvoke! AVCaptionPointMake is not bound -!missing-pinvoke! AVCaptionSizeMake is not bound -!missing-protocol! AVAssetReaderCaptionValidationHandling not bound -!missing-protocol! AVMetricEventStreamPublisher not bound -!missing-protocol! AVMetricEventStreamSubscriber not bound -!missing-protocol! AVPlayerItemIntegratedTimelineObserver not bound -!missing-protocol! AVPlayerItemRenderedLegibleOutputPushDelegate not bound -!missing-protocol-conformance! AVPlayerItem should conform to AVMetricEventStreamPublisher (defined in 'AVMetricEventStreamPublisher' category) -!missing-protocol-member! AVAssetDownloadDelegate::URLSession:assetDownloadTask:willDownloadToURL: not found -!missing-selector! +AVAssetReaderOutputCaptionAdaptor::assetReaderOutputCaptionAdaptorWithAssetReaderTrackOutput: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForAudioSampleRate:mediaSelectionOption:operatorType: not bound -!missing-selector! +AVAssetWriterInputCaptionAdaptor::assetWriterInputCaptionAdaptorWithAssetWriterInput: not bound -!missing-selector! +AVCaptionConversionValidator::captionConversionValidatorWithCaptions:timeRange:conversionSettings: not bound -!missing-selector! +AVCaptionFormatConformer::captionFormatConformerWithConversionSettings: not bound -!missing-selector! +AVCaptionRegion::appleITTBottomRegion not bound -!missing-selector! +AVCaptionRegion::appleITTLeftRegion not bound -!missing-selector! +AVCaptionRegion::appleITTRightRegion not bound -!missing-selector! +AVCaptionRegion::appleITTTopRegion not bound -!missing-selector! +AVCaptionRegion::subRipTextBottomRegion not bound -!missing-selector! +AVCaptureDevice::isBackgroundReplacementEnabled not bound -!missing-selector! +AVMetricEventStream::eventStream not bound -!missing-selector! AVAssetImageGenerator::dynamicRangePolicy not bound -!missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::assetReaderTrackOutput not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::captionsNotPresentInPreviousGroupsInCaptionGroup: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::initWithAssetReaderTrackOutput: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::nextCaptionGroup not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::setValidationDelegate: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::validationDelegate not bound -!missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound -!missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::appendCaption: not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::appendCaptionGroup: not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::assetWriterInput not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::initWithAssetWriterInput: not bound -!missing-selector! AVCaption::animation not bound -!missing-selector! AVCaption::backgroundColorAtIndex:range: not bound -!missing-selector! AVCaption::decorationAtIndex:range: not bound -!missing-selector! AVCaption::fontStyleAtIndex:range: not bound -!missing-selector! AVCaption::fontWeightAtIndex:range: not bound -!missing-selector! AVCaption::initWithText:timeRange: not bound -!missing-selector! AVCaption::region not bound -!missing-selector! AVCaption::rubyAtIndex:range: not bound -!missing-selector! AVCaption::text not bound -!missing-selector! AVCaption::textAlignment not bound -!missing-selector! AVCaption::textColorAtIndex:range: not bound -!missing-selector! AVCaption::textCombineAtIndex:range: not bound -!missing-selector! AVCaption::timeRange not bound -!missing-selector! AVCaptionConversionAdjustment::adjustmentType not bound -!missing-selector! AVCaptionConversionTimeRangeAdjustment::durationOffset not bound -!missing-selector! AVCaptionConversionTimeRangeAdjustment::startTimeOffset not bound -!missing-selector! AVCaptionConversionValidator::captions not bound -!missing-selector! AVCaptionConversionValidator::initWithCaptions:timeRange:conversionSettings: not bound -!missing-selector! AVCaptionConversionValidator::status not bound -!missing-selector! AVCaptionConversionValidator::stopValidating not bound -!missing-selector! AVCaptionConversionValidator::timeRange not bound -!missing-selector! AVCaptionConversionValidator::validateCaptionConversionWithWarningHandler: not bound -!missing-selector! AVCaptionConversionValidator::warnings not bound -!missing-selector! AVCaptionConversionWarning::adjustment not bound -!missing-selector! AVCaptionConversionWarning::rangeOfCaptions not bound -!missing-selector! AVCaptionConversionWarning::warningType not bound -!missing-selector! AVCaptionFormatConformer::conformedCaptionForCaption:error: not bound -!missing-selector! AVCaptionFormatConformer::conformsCaptionsToTimeRange not bound -!missing-selector! AVCaptionFormatConformer::initWithConversionSettings: not bound -!missing-selector! AVCaptionFormatConformer::setConformsCaptionsToTimeRange: not bound -!missing-selector! AVCaptionGroup::captions not bound -!missing-selector! AVCaptionGroup::initWithCaptions:timeRange: not bound -!missing-selector! AVCaptionGroup::initWithTimeRange: not bound -!missing-selector! AVCaptionGroup::timeRange not bound -!missing-selector! AVCaptionGrouper::addCaption: not bound -!missing-selector! AVCaptionGrouper::flushAddedCaptionsIntoGroupsUpToTime: not bound -!missing-selector! AVCaptionRegion::displayAlignment not bound -!missing-selector! AVCaptionRegion::encodeWithCoder: not bound -!missing-selector! AVCaptionRegion::identifier not bound -!missing-selector! AVCaptionRegion::isEqual: not bound -!missing-selector! AVCaptionRegion::mutableCopyWithZone: not bound -!missing-selector! AVCaptionRegion::origin not bound -!missing-selector! AVCaptionRegion::scroll not bound -!missing-selector! AVCaptionRegion::size not bound -!missing-selector! AVCaptionRegion::writingMode not bound -!missing-selector! AVCaptionRenderer::bounds not bound -!missing-selector! AVCaptionRenderer::captions not bound -!missing-selector! AVCaptionRenderer::captionSceneChangesInRange: not bound -!missing-selector! AVCaptionRenderer::renderInContext:forTime: not bound -!missing-selector! AVCaptionRenderer::setBounds: not bound -!missing-selector! AVCaptionRenderer::setCaptions: not bound -!missing-selector! AVCaptionRendererScene::hasActiveCaptions not bound -!missing-selector! AVCaptionRendererScene::needsPeriodicRefresh not bound -!missing-selector! AVCaptionRendererScene::timeRange not bound -!missing-selector! AVCaptionRuby::alignment not bound -!missing-selector! AVCaptionRuby::initWithText: not bound -!missing-selector! AVCaptionRuby::initWithText:position:alignment: not bound -!missing-selector! AVCaptionRuby::position not bound -!missing-selector! AVCaptionRuby::text not bound -!missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound -!missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound -!missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound -!missing-selector! AVCaptureDevice::spatialCaptureDiscomfortReasons not bound -!missing-selector! AVCaptureDeviceFormat::isAutoVideoFrameRateSupported not bound -!missing-selector! AVCaptureDeviceFormat::isBackgroundReplacementSupported not bound -!missing-selector! AVCaptureDeviceFormat::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForBackgroundReplacement not bound -!missing-selector! AVCaptureDeviceInput::isMultichannelAudioModeSupported: not bound -!missing-selector! AVCaptureDeviceInput::multichannelAudioMode not bound -!missing-selector! AVCaptureDeviceInput::setMultichannelAudioMode: not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureEnabled not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureMovieFileOutput::setSpatialVideoCaptureEnabled: not bound -!missing-selector! AVCapturePhoto::constantColorCenterWeightedMeanConfidenceLevel not bound -!missing-selector! AVCapturePhoto::constantColorConfidenceMap not bound -!missing-selector! AVCapturePhoto::isConstantColorFallbackPhoto not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorSupported not bound -!missing-selector! AVCapturePhotoOutput::isShutterSoundSuppressionSupported not bound -!missing-selector! AVCapturePhotoOutput::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorFallbackPhotoDeliveryEnabled not bound -!missing-selector! AVCapturePhotoSettings::isShutterSoundSuppressionEnabled not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorFallbackPhotoDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setShutterSoundSuppressionEnabled: not bound -!missing-selector! AVCaptureSession::configuresApplicationAudioSessionToMixWithOthers not bound -!missing-selector! AVCaptureSession::setConfiguresApplicationAudioSessionToMixWithOthers: not bound -!missing-selector! AVMetricContentKeyRequestEvent::contentKeySpecifier not bound -!missing-selector! AVMetricContentKeyRequestEvent::isClientInitiated not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaType not bound -!missing-selector! AVMetricErrorEvent::didRecover not bound -!missing-selector! AVMetricErrorEvent::error not bound -!missing-selector! AVMetricEvent::date not bound -!missing-selector! AVMetricEvent::mediaTime not bound -!missing-selector! AVMetricEvent::sessionID not bound -!missing-selector! AVMetricEventStream::addPublisher: not bound -!missing-selector! AVMetricEventStream::setSubscriber:queue: not bound -!missing-selector! AVMetricEventStream::subscribeToAllMetricEvents not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvent: not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvents: not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::byteRange not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::indexFileURL not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::isMapSegment not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::url not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::isMultivariantPlaylist not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::byteRange not bound -!missing-selector! AVMetricMediaResourceRequestEvent::errorEvent not bound -!missing-selector! AVMetricMediaResourceRequestEvent::networkTransactionMetrics not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::serverAddress not bound -!missing-selector! AVMetricMediaResourceRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::wasReadFromCache not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::contentKeyRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::mediaSegmentRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::playlistRequestEvents not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::timeTaken not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::variant not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::errorEvent not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::mediaResourceRequestCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::playbackDuration not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::recoverableErrorCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::stallCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentInInitialStartup not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentRecoveringFromStall not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedAverageBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedPeakBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::variantSwitchCount not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::previousRate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::rate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::variant not bound -!missing-selector! AVMetricPlayerItemSeekDidCompleteEvent::didSeekInBuffer not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::didSucceed not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::toVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::toVariant not bound -!missing-selector! AVMutableCaption::animation not bound -!missing-selector! AVMutableCaption::region not bound -!missing-selector! AVMutableCaption::removeBackgroundColorInRange: not bound -!missing-selector! AVMutableCaption::removeDecorationInRange: not bound -!missing-selector! AVMutableCaption::removeFontStyleInRange: not bound -!missing-selector! AVMutableCaption::removeFontWeightInRange: not bound -!missing-selector! AVMutableCaption::removeRubyInRange: not bound -!missing-selector! AVMutableCaption::removeTextColorInRange: not bound -!missing-selector! AVMutableCaption::removeTextCombineInRange: not bound -!missing-selector! AVMutableCaption::setAVMutableCaption: not bound -!missing-selector! AVMutableCaption::setBackgroundColor:inRange: not bound -!missing-selector! AVMutableCaption::setDecoration:inRange: not bound -!missing-selector! AVMutableCaption::setFontStyle:inRange: not bound -!missing-selector! AVMutableCaption::setFontWeight:inRange: not bound -!missing-selector! AVMutableCaption::setRuby:inRange: not bound -!missing-selector! AVMutableCaption::setText: not bound -!missing-selector! AVMutableCaption::setTextAlignment: not bound -!missing-selector! AVMutableCaption::setTextColor:inRange: not bound -!missing-selector! AVMutableCaption::setTextCombine:inRange: not bound -!missing-selector! AVMutableCaption::setTimeRange: not bound -!missing-selector! AVMutableCaption::text not bound -!missing-selector! AVMutableCaption::textAlignment not bound -!missing-selector! AVMutableCaption::timeRange not bound -!missing-selector! AVMutableCaptionRegion::displayAlignment not bound -!missing-selector! AVMutableCaptionRegion::init not bound -!missing-selector! AVMutableCaptionRegion::initWithIdentifier: not bound -!missing-selector! AVMutableCaptionRegion::origin not bound -!missing-selector! AVMutableCaptionRegion::scroll not bound -!missing-selector! AVMutableCaptionRegion::setDisplayAlignment: not bound -!missing-selector! AVMutableCaptionRegion::setOrigin: not bound -!missing-selector! AVMutableCaptionRegion::setScroll: not bound -!missing-selector! AVMutableCaptionRegion::setSize: not bound -!missing-selector! AVMutableCaptionRegion::setWritingMode: not bound -!missing-selector! AVMutableCaptionRegion::size not bound -!missing-selector! AVMutableCaptionRegion::writingMode not bound -!missing-selector! AVPlayerInterstitialEvent::contentMayVary not bound -!missing-selector! AVPlayerInterstitialEvent::plannedDuration not bound -!missing-selector! AVPlayerInterstitialEvent::setContentMayVary: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlannedDuration: not bound -!missing-selector! AVPlayerInterstitialEvent::setSupplementsPrimaryContent: not bound -!missing-selector! AVPlayerInterstitialEvent::setTimelineOccupancy: not bound -!missing-selector! AVPlayerInterstitialEvent::supplementsPrimaryContent not bound -!missing-selector! AVPlayerInterstitialEvent::timelineOccupancy not bound -!missing-selector! AVPlayerItem::integratedTimeline not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addBoundaryTimeObserverForSegment:offsetsIntoSegment:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addPeriodicTimeObserverForInterval:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentSnapshot not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimeline::removeTimeObserver: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToDate:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToTime:toleranceBefore:toleranceAfter:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentSegment not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::duration not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::mapTime:toSegment:atSegmentOffset: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::segments not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::advanceIntervalForDelegateInvocation not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::delegate not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::delegateQueue not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::initWithVideoDisplaySize: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setAdvanceIntervalForDelegateInvocation: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setDelegate:queue: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setVideoDisplaySize: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::videoDisplaySize not bound -!missing-selector! AVPlayerItemSegment::interstitialEvent not bound -!missing-selector! AVPlayerItemSegment::loadedTimeRanges not bound -!missing-selector! AVPlayerItemSegment::segmentType not bound -!missing-selector! AVPlayerItemSegment::startDate not bound -!missing-selector! AVPlayerItemSegment::timeMapping not bound -!missing-selector! AVPlayerVideoOutputConfiguration::preferredTransform not bound -!missing-selector! AVRenderedCaptionImage::pixelBuffer not bound -!missing-selector! AVRenderedCaptionImage::position not bound -!missing-selector! AVVideoComposition::isValidForTracks:assetDuration:timeRange:validationDelegate: not bound -!missing-selector! AVVideoOutputSpecification::defaultOutputSettings not bound -!missing-selector! AVVideoOutputSpecification::setDefaultOutputSettings: not bound -!missing-selector! AVVideoOutputSpecification::setOutputSettings:forTagCollection: not bound -!missing-type! AVAssetReaderOutputCaptionAdaptor not bound -!missing-type! AVAssetWriterInputCaptionAdaptor not bound -!missing-type! AVCaption not bound -!missing-type! AVCaptionConversionAdjustment not bound -!missing-type! AVCaptionConversionTimeRangeAdjustment not bound -!missing-type! AVCaptionConversionValidator not bound -!missing-type! AVCaptionConversionWarning not bound -!missing-type! AVCaptionFormatConformer not bound -!missing-type! AVCaptionGroup not bound -!missing-type! AVCaptionGrouper not bound -!missing-type! AVCaptionRegion not bound -!missing-type! AVCaptionRenderer not bound -!missing-type! AVCaptionRendererScene not bound -!missing-type! AVCaptionRuby not bound -!missing-type! AVMetricContentKeyRequestEvent not bound -!missing-type! AVMetricErrorEvent not bound -!missing-type! AVMetricEvent not bound -!missing-type! AVMetricEventStream not bound -!missing-type! AVMetricHLSMediaSegmentRequestEvent not bound -!missing-type! AVMetricHLSPlaylistRequestEvent not bound -!missing-type! AVMetricMediaResourceRequestEvent not bound -!missing-type! AVMetricPlayerItemInitialLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemPlaybackSummaryEvent not bound -!missing-type! AVMetricPlayerItemRateChangeEvent not bound -!missing-type! AVMetricPlayerItemSeekDidCompleteEvent not bound -!missing-type! AVMetricPlayerItemSeekEvent not bound -!missing-type! AVMetricPlayerItemStallEvent not bound -!missing-type! AVMetricPlayerItemVariantSwitchEvent not bound -!missing-type! AVMetricPlayerItemVariantSwitchStartEvent not bound -!missing-type! AVMutableCaption not bound -!missing-type! AVMutableCaptionRegion not bound -!missing-type! AVPlayerItemIntegratedTimeline not bound -!missing-type! AVPlayerItemIntegratedTimelineSnapshot not bound -!missing-type! AVPlayerItemRenderedLegibleOutput not bound -!missing-type! AVPlayerItemSegment not bound -!missing-type! AVRenderedCaptionImage not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionConflict = -11887 not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionDisabled = -11886 not bound -!missing-selector! AVMutableComposition::insertTimeRange:ofAsset:atTime:completionHandler: not bound -!missing-field! AVMetadataIdentifierQuickTimeMetadataFullFrameRatePlaybackIntent not bound -!missing-field! AVMetadataQuickTimeMetadataKeyFullFrameRatePlaybackIntent not bound -!missing-field! AVVideoCodecTypeJPEGXL not bound -!missing-protocol! AVCaptureSessionControlsDelegate not bound -!missing-selector! AVCaptureControl::isEnabled not bound -!missing-selector! AVCaptureControl::setEnabled: not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedExposureBiasRange not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedVideoZoomRange not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalEnabled not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalSupported not bound -!missing-selector! AVCaptureDeviceInput::setWindNoiseRemovalEnabled: not bound -!missing-selector! AVCaptureIndexPicker::accessibilityIdentifier not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:localizedIndexTitles: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes:localizedTitleTransform: not bound -!missing-selector! AVCaptureIndexPicker::localizedIndexTitles not bound -!missing-selector! AVCaptureIndexPicker::localizedTitle not bound -!missing-selector! AVCaptureIndexPicker::numberOfIndexes not bound -!missing-selector! AVCaptureIndexPicker::selectedIndex not bound -!missing-selector! AVCaptureIndexPicker::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureIndexPicker::setActionQueue:action: not bound -!missing-selector! AVCaptureIndexPicker::setSelectedIndex: not bound -!missing-selector! AVCaptureIndexPicker::symbolName not bound -!missing-selector! AVCapturePhotoOutput::availableRawPhotoCodecTypes not bound -!missing-selector! AVCapturePhotoOutput::supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType: not bound -!missing-selector! AVCapturePhotoSettings::rawFileFormat not bound -!missing-selector! AVCapturePhotoSettings::setRawFileFormat: not bound -!missing-selector! AVCaptureSession::addControl: not bound -!missing-selector! AVCaptureSession::canAddControl: not bound -!missing-selector! AVCaptureSession::controls not bound -!missing-selector! AVCaptureSession::controlsDelegate not bound -!missing-selector! AVCaptureSession::controlsDelegateCallbackQueue not bound -!missing-selector! AVCaptureSession::maxControlsCount not bound -!missing-selector! AVCaptureSession::removeControl: not bound -!missing-selector! AVCaptureSession::setControlsDelegate:queue: not bound -!missing-selector! AVCaptureSession::supportsControls not bound -!missing-selector! AVCaptureSlider::accessibilityIdentifier not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue:step: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:values: not bound -!missing-selector! AVCaptureSlider::localizedTitle not bound -!missing-selector! AVCaptureSlider::localizedValueFormat not bound -!missing-selector! AVCaptureSlider::prominentValues not bound -!missing-selector! AVCaptureSlider::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureSlider::setActionQueue:action: not bound -!missing-selector! AVCaptureSlider::setLocalizedValueFormat: not bound -!missing-selector! AVCaptureSlider::setProminentValues: not bound -!missing-selector! AVCaptureSlider::setValue: not bound -!missing-selector! AVCaptureSlider::symbolName not bound -!missing-selector! AVCaptureSlider::value not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice:action: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice:action: not bound -!missing-selector! AVExposureBiasRange::containsExposureBias: not bound -!missing-selector! AVExposureBiasRange::maxExposureBias not bound -!missing-selector! AVExposureBiasRange::minExposureBias not bound -!missing-type! AVCaptureControl not bound -!missing-type! AVCaptureIndexPicker not bound -!missing-type! AVCaptureSlider not bound -!missing-type! AVCaptureSystemExposureBiasSlider not bound -!missing-type! AVCaptureSystemZoomSlider not bound -!missing-type! AVExposureBiasRange not bound -!missing-enum! AVAudioApplicationMicrophoneInjectionPermission not bound -!missing-enum! AVAudioSessionMicrophoneInjectionMode not bound -!missing-field! AVAudioSessionMicrophoneInjectionCapabilitiesChangeNotification not bound -!missing-field! AVAudioSessionMicrophoneInjectionIsAvailableKey not bound -!missing-selector! +AVAudioApplication::requestMicrophoneInjectionPermissionWithCompletionHandler: not bound -!missing-selector! AVAudioApplication::microphoneInjectionPermission not bound -!missing-selector! AVAudioSession::isAVAudioSessionAvailable not bound -!missing-selector! AVAudioSession::preferredAVAudioSessionMode not bound -!missing-selector! AVAudioSession::setPreferredAVAudioSessionMode:error: not bound -!missing-selector! AVAudioSession::isEchoCancelledInputAvailable not bound -!missing-selector! AVAudioSession::isEchoCancelledInputEnabled not bound -!missing-selector! AVAudioSession::prefersEchoCancelledInput not bound -!missing-selector! AVAudioSession::setPrefersEchoCancelledInput:error: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.ignore deleted file mode 100644 index 7fea3335ffc4..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.ignore +++ /dev/null @@ -1,4 +0,0 @@ -## `VideoCallSupport` category introspection failures on MacCatalyst 15 -!missing-selector! AVPictureInPictureControllerContentSource::activeVideoCallContentViewController not bound -!missing-selector! AVPictureInPictureControllerContentSource::activeVideoCallSourceView not bound -!missing-selector! AVPictureInPictureControllerContentSource::initWithActiveVideoCallSourceView:contentViewController: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.todo deleted file mode 100644 index 1ad5b7857754..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.todo +++ /dev/null @@ -1,8 +0,0 @@ -!missing-enum! AVCaptureEventPhase not bound -!missing-selector! AVCaptureEvent::phase not bound -!missing-selector! AVCaptureEventInteraction::initWithEventHandler: not bound -!missing-selector! AVCaptureEventInteraction::initWithPrimaryEventHandler:secondaryEventHandler: not bound -!missing-selector! AVCaptureEventInteraction::isEnabled not bound -!missing-selector! AVCaptureEventInteraction::setEnabled: not bound -!missing-type! AVCaptureEvent not bound -!missing-type! AVCaptureEventInteraction not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MLCompute.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MLCompute.todo deleted file mode 100644 index 1ed0615ad429..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-MLCompute.todo +++ /dev/null @@ -1,56 +0,0 @@ -!deprecated-attribute-missing! MLCActivationDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCActivationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamWOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCArithmeticLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCBatchNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCComparisonLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConcatenationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDevice missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDropoutLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCFullyConnectedLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGatherLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGramMatrixLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGroupNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInferenceGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInstanceNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayerNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizerDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPaddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPlatform missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReductionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReshapeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCRMSPropOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCScatterLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSelectionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSGDOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSliceLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSoftmaxLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSplitLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorData missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorOptimizerDeviceData missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorParameter missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTrainingGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTransposeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCUpsampleLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossLayer missing a [Deprecated] attribute diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Matter.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Matter.todo deleted file mode 100644 index 9589b1e63c27..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Matter.todo +++ /dev/null @@ -1,40 +0,0 @@ -!missing-enum! MTRColorControlColorCapabilitiesBitmap not bound -!missing-enum! MTRColorControlDirection not bound -!missing-enum! MTRColorControlDriftCompensation not bound -!missing-enum! MTRColorControlEnhancedColorMode not bound -!missing-enum! MTRColorControlMoveMode not bound -!missing-enum! MTRColorControlOptionsBitmap not bound -!missing-enum! MTRColorControlStepMode not bound -!missing-enum! MTRColorControlUpdateFlagsBitmap not bound -!missing-enum! MTRDeviceTypeIDType not bound -!missing-field! MTRDeviceControllerRegistrationControllerContextKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDsKey not bound -!missing-pinvoke! MTREventNameForID is not bound -!missing-pinvoke! MTRRequestCommandNameForID is not bound -!missing-pinvoke! MTRResponseCommandNameForID is not bound -!missing-protocol! MTRXPCClientProtocol not bound -!missing-protocol! MTRXPCClientProtocol_MTRDevice not bound -!missing-protocol! MTRXPCClientProtocol_MTRDeviceController not bound -!missing-protocol! MTRXPCServerProtocol not bound -!missing-protocol! MTRXPCServerProtocol_MTRDevice not bound -!missing-protocol! MTRXPCServerProtocol_MTRDeviceController not bound -!missing-selector! +MTRDeviceType::deviceTypeForID: not bound -!missing-selector! MTRCertificateInfo::publicKeyData not bound -!missing-selector! MTRDevice::readAttributePaths: not bound -!missing-selector! MTRDeviceController::addDeviceControllerDelegate:queue: not bound -!missing-selector! MTRDeviceController::isSuspended not bound -!missing-selector! MTRDeviceController::removeDeviceControllerDelegate: not bound -!missing-selector! MTRDeviceController::resume not bound -!missing-selector! MTRDeviceController::suspend not bound -!missing-selector! MTRDeviceControllerAbstractParameters::setStartSuspended: not bound -!missing-selector! MTRDeviceControllerAbstractParameters::startSuspended not bound -!missing-selector! MTRDeviceControllerExternalCertificateParameters::rootCertificate not bound -!missing-selector! MTRDeviceType::id not bound -!missing-selector! MTRDeviceType::isUtility not bound -!missing-selector! MTRDeviceType::name not bound -!missing-selector! MTRXPCDeviceControllerParameters::initWithXPConnectionBlock:uniqueIdentifier: not bound -!missing-selector! MTRXPCDeviceControllerParameters::uniqueIdentifier not bound -!missing-selector! MTRXPCDeviceControllerParameters::xpcConnectionBlock not bound -!missing-type! MTRDeviceType not bound -!missing-type! MTRXPCDeviceControllerParameters not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Metal.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Metal.ignore deleted file mode 100644 index 4dc5421d375b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Metal.ignore +++ /dev/null @@ -1,6 +0,0 @@ -!extra-enum-value! Managed value 0 for MTLFeatureSet.iOS_GPUFamily1_v1 is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 1 for MTLFeatureSet.iOS_GPUFamily2_v1 is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 2 for MTLFeatureSet.iOS_GPUFamily1_v2 is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 3 for MTLFeatureSet.iOS_GPUFamily2_v2 is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 30000 for MTLFeatureSet.tvOS_GPUFamily1_v1 is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 4 for MTLFeatureSet.iOS_GPUFamily3_v1 is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-OSLog.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-OSLog.todo deleted file mode 100644 index bc0bdcfbec57..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-OSLog.todo +++ /dev/null @@ -1 +0,0 @@ -!extra-enum-value! Managed value 0 for OSLogStoreScope.System is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore index 9fc752ab787b..50b188b86fcd 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-UIKit.ignore @@ -143,52 +143,9 @@ !extra-null-allowed! 'UIKit.UIView UIKit.UIScreen::SnapshotView(System.Boolean)' has a extraneous [NullAllowed] on return type # Initial result from new rule missing-null-allowed -!missing-null-allowed! 'CoreAnimation.CADisplayLink UIKit.UIScreen::CreateDisplayLink(Foundation.NSObject,ObjCRuntime.Selector)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSArray Foundation.NSBundle::LoadNib(System.String,Foundation.NSObject,Foundation.NSDictionary)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIButton::get_CurrentAttributedTitle()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIButton::GetAttributedTitle(UIKit.UIControlState)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIPickerViewDelegate::GetAttributedTitle(UIKit.UIPickerView,System.IntPtr,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSData UIKit.UIPasteboard::DataForPasteboardType(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetDataForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetDataForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetValuesForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetValuesForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIBarItem::_GetTitleTextAttributes(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedDecorationIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedSupplementaryIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIDocument::GetFileAttributesToWrite(Foundation.NSUrl,UIKit.UIDocumentSaveOperation,Foundation.NSError&)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIMotionEffect::ComputeKeyPathsAndRelativeValues(UIKit.UIOffset)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UISearchBar::_GetScopeBarButtonTitleTextAttributes(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewFocusUpdateContext::get_NextFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewFocusUpdateContext::get_PreviouslyFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewDelegate::WillDeselectRow(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewDelegate::WillSelectRow(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewFocusUpdateContext::get_NextFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewFocusUpdateContext::get_PreviouslyFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedItemIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexSet UIKit.UIPasteboard::ItemSetWithPasteboardTypes(System.String[])' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSNumber[] UIKit.UIImagePickerController::AvailableCaptureModesForCameraDevice(UIKit.UIImagePickerControllerCameraDevice)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemProvider::get_PlaceholderItem()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemSource::GetItemForActivity(UIKit.UIActivityViewController,Foundation.NSString)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIDocument::ContentsForType(System.String,Foundation.NSError&)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIFontDescriptor::GetObject(Foundation.NSString)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIManagedDocument::AdditionalContent(Foundation.NSUrl,Foundation.NSError&)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIPasteboard::GetValue(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIResponder::GetTargetForAction(ObjCRuntime.Selector,Foundation.NSObject)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject[] UIKit.UICollisionBehavior::get_BoundaryIdentifiers()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSProgress UIKit.UIDocument::get_Progress()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::get_AllTouches()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForGestureRecognizer(UIKit.UIGestureRecognizer)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForView(UIKit.UIView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForWindow(UIKit.UIWindow)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UIActivity::get_Type()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UIActivityItemProvider::get_ActivityType()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UICollectionReusableView::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UIResponder::get_TextInputContextIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UITableViewCell::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UITableViewHeaderFooterView::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUuid UIKit.UIDevice::get_IdentifierForVendor()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ObjCRuntime.Class UIKit.UIStateRestoring::get_ObjectRestorationClass()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Boolean UIKit.UIApplicationDelegate::FinishedLaunching(UIKit.UIApplication,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean UIKit.UIApplicationDelegate::WillFinishLaunching(UIKit.UIApplication,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean UIKit.UIManagedDocument::ConfigurePersistentStoreCoordinator(Foundation.NSUrl,System.String,System.String,Foundation.NSDictionary,Foundation.NSError)' is missing an [NullAllowed] on parameter #2 @@ -202,32 +159,6 @@ !missing-null-allowed! 'System.Double UIKit.UIViewControllerAnimatedTransitioning::TransitionDuration(UIKit.IUIViewControllerContextTransitioning)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.IntPtr UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.IntPtr UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.String UIKit.UIActivity::get_Title()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIAlertAction::get_Title()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIButton::get_CurrentTitle()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIButton::Title(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UICollectionViewLayoutAttributes::get_RepresentedElementKind()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIDocument::get_FileType()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIDocument::get_SavingFileType()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPickerViewAccessibilityDelegate::GetAccessibilityHint(UIKit.UIPickerView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPickerViewAccessibilityDelegate::GetAccessibilityLabel(UIKit.UIPickerView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPickerViewDelegate::GetTitle(UIKit.UIPickerView,System.IntPtr,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPrinter::get_DisplayLocation()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPrinter::get_MakeAndModel()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIScrollViewAccessibilityDelegate::GetAccessibilityScrollStatus(UIKit.UIScrollView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UISegmentedControl::TitleAt(System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDataSource::TitleForFooter(UIKit.UITableView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDataSource::TitleForHeader(UIKit.UITableView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDelegate::TitleForDeleteConfirmation(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextDocumentProxy::get_DocumentContextAfterInput()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextDocumentProxy::get_DocumentContextBeforeInput()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextInputMode::get_PrimaryLanguage()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIControl::GetActions(Foundation.NSObject,UIKit.UIControlEvent)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIDictationPhrase::get_AlternativeInterpretations()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIImagePickerController::AvailableMediaTypes(UIKit.UIImagePickerControllerSourceType)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITableViewDataSource::SectionIndexTitles(UIKit.UITableView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITextChecker::CompletionsForPartialWordRange(Foundation.NSRange,System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITextChecker::GuessesForWordRange(Foundation.NSRange,System.String,System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Void Foundation.NSObject::set_AccessibilityAttributedUserInputLabels(Foundation.NSAttributedString[])' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Foundation.NSObject::set_AccessibilityUserInputLabels(System.String[])' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void UIKit.UIAccessibilityCustomAction::.ctor(System.String,Foundation.NSObject,ObjCRuntime.Selector)' is missing an [NullAllowed] on parameter #1 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-AVFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-AVFoundation.ignore index 43da0dbd3955..584c2479208c 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-AVFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-AVFoundation.ignore @@ -10,8 +10,6 @@ ## unsorted !missing-field! AVCoreAnimationBeginTimeAtZero not bound -!missing-field! AVVideoTransferFunction_ITU_R_2100_HLG not bound -!missing-field! AVVideoTransferFunction_SMPTE_ST_2084_PQ not bound !missing-protocol-conformance! AVAsset should conform to AVAsynchronousKeyValueLoading !missing-protocol-conformance! AVAssetTrack should conform to AVAsynchronousKeyValueLoading !missing-protocol-conformance! AVMetadataItem should conform to AVAsynchronousKeyValueLoading @@ -46,3 +44,8 @@ # no tests/samples !missing-pinvoke! AVSampleBufferAttachContentKey is not bound + +# Missing some MIDI APIs to bind these +!missing-selector! AVAudioEngine::connectMIDI:to:format:eventListBlock: not bound +!missing-selector! AVAudioEngine::connectMIDI:toNodes:format:eventListBlock: not bound +!missing-selector! AVAudioUnitMIDIInstrument::sendMIDIEventList: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-CoreFoundation.ignore index 236a2934f529..b003d21bf4ee 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-CoreFoundation.ignore @@ -10,7 +10,6 @@ !missing-enum! __CFByteOrder not bound !missing-enum! CFCalendarUnit not bound !missing-enum! CFCharacterSetPredefinedSet not bound -!missing-enum! CFComparisonResult not bound !missing-enum! CFDataSearchFlags not bound !missing-enum! CFDateFormatterStyle not bound !missing-enum! CFFileSecurityClearOptions not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore index 59ab95e917a6..499156bc2399 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore @@ -255,106 +255,8 @@ !missing-pinvoke! CMBufferQueueGetMinDecodeTimeStamp is not bound !missing-pinvoke! CMBufferQueueGetMinPresentationTimeStamp is not bound !missing-pinvoke! CMBufferQueueGetTypeID is not bound -!missing-enum! CMPackingType not bound -!missing-enum! CMProjectionType not bound -!missing-enum! CMStereoViewComponents not bound -!missing-enum! CMStereoViewInterpretationOptions not bound -!missing-enum! CMTagCategory not bound -!missing-enum! CMTagCollectionError not bound -!missing-enum! CMTagDataType not bound -!missing-enum! CMTagError not bound -!missing-enum! CMTaggedBufferGroupError not bound !missing-field! kCMFormatDescriptionExtension_ContentColorVolume not bound -!missing-field! kCMTagCategoryKey not bound -!missing-field! kCMTagCollectionTagsArrayKey not bound -!missing-field! kCMTagDataTypeKey not bound -!missing-field! kCMTagInvalid not bound -!missing-field! kCMTagMediaSubTypeMebx not bound -!missing-field! kCMTagMediaTypeAudio not bound -!missing-field! kCMTagMediaTypeMetadata not bound -!missing-field! kCMTagMediaTypeVideo not bound -!missing-field! kCMTagPackingTypeNone not bound -!missing-field! kCMTagPackingTypeOverUnder not bound -!missing-field! kCMTagPackingTypeSideBySide not bound -!missing-field! kCMTagProjectionTypeEquirectangular not bound -!missing-field! kCMTagProjectionTypeFisheye not bound -!missing-field! kCMTagProjectionTypeRectangular not bound -!missing-field! kCMTagStereoInterpretationOrderReversed not bound -!missing-field! kCMTagStereoLeftAndRightEye not bound -!missing-field! kCMTagStereoLeftEye not bound -!missing-field! kCMTagStereoNone not bound -!missing-field! kCMTagStereoRightEye not bound -!missing-field! kCMTagValueKey not bound !missing-pinvoke! CMBufferQueueCopyHead is not bound -!missing-pinvoke! CMSampleBufferCreateForTaggedBufferGroup is not bound -!missing-pinvoke! CMSampleBufferGetTaggedBufferGroup is not bound -!missing-pinvoke! CMTagCollectionAddTag is not bound -!missing-pinvoke! CMTagCollectionAddTagsFromArray is not bound -!missing-pinvoke! CMTagCollectionAddTagsFromCollection is not bound -!missing-pinvoke! CMTagCollectionApply is not bound -!missing-pinvoke! CMTagCollectionApplyUntil is not bound -!missing-pinvoke! CMTagCollectionContainsCategory is not bound -!missing-pinvoke! CMTagCollectionContainsSpecifiedTags is not bound -!missing-pinvoke! CMTagCollectionContainsTag is not bound -!missing-pinvoke! CMTagCollectionContainsTagsOfCollection is not bound -!missing-pinvoke! CMTagCollectionCopyAsData is not bound -!missing-pinvoke! CMTagCollectionCopyAsDictionary is not bound -!missing-pinvoke! CMTagCollectionCopyDescription is not bound -!missing-pinvoke! CMTagCollectionCopyTagsOfCategories is not bound -!missing-pinvoke! CMTagCollectionCountTagsWithFilterFunction is not bound -!missing-pinvoke! CMTagCollectionCreate is not bound -!missing-pinvoke! CMTagCollectionCreateCopy is not bound -!missing-pinvoke! CMTagCollectionCreateDifference is not bound -!missing-pinvoke! CMTagCollectionCreateExclusiveOr is not bound -!missing-pinvoke! CMTagCollectionCreateFromData is not bound -!missing-pinvoke! CMTagCollectionCreateFromDictionary is not bound -!missing-pinvoke! CMTagCollectionCreateIntersection is not bound -!missing-pinvoke! CMTagCollectionCreateMutable is not bound -!missing-pinvoke! CMTagCollectionCreateMutableCopy is not bound -!missing-pinvoke! CMTagCollectionCreateUnion is not bound -!missing-pinvoke! CMTagCollectionGetCount is not bound -!missing-pinvoke! CMTagCollectionGetCountOfCategory is not bound -!missing-pinvoke! CMTagCollectionGetTags is not bound -!missing-pinvoke! CMTagCollectionGetTagsWithCategory is not bound -!missing-pinvoke! CMTagCollectionGetTagsWithFilterFunction is not bound -!missing-pinvoke! CMTagCollectionGetTypeID is not bound -!missing-pinvoke! CMTagCollectionIsEmpty is not bound -!missing-pinvoke! CMTagCollectionRemoveAllTags is not bound -!missing-pinvoke! CMTagCollectionRemoveAllTagsOfCategory is not bound -!missing-pinvoke! CMTagCollectionRemoveTag is not bound -!missing-pinvoke! CMTagCompare is not bound -!missing-pinvoke! CMTagCopyAsDictionary is not bound -!missing-pinvoke! CMTagCopyDescription is not bound -!missing-pinvoke! CMTagEqualToTag is not bound -!missing-pinvoke! CMTaggedBufferGroupCreate is not bound -!missing-pinvoke! CMTaggedBufferGroupCreateCombined is not bound -!missing-pinvoke! CMTaggedBufferGroupFormatDescriptionCreateForTaggedBufferGroup is not bound -!missing-pinvoke! CMTaggedBufferGroupFormatDescriptionMatchesTaggedBufferGroup is not bound -!missing-pinvoke! CMTaggedBufferGroupGetCMSampleBufferAtIndex is not bound -!missing-pinvoke! CMTaggedBufferGroupGetCMSampleBufferForTag is not bound -!missing-pinvoke! CMTaggedBufferGroupGetCMSampleBufferForTagCollection is not bound -!missing-pinvoke! CMTaggedBufferGroupGetCount is not bound -!missing-pinvoke! CMTaggedBufferGroupGetCVPixelBufferAtIndex is not bound -!missing-pinvoke! CMTaggedBufferGroupGetCVPixelBufferForTag is not bound -!missing-pinvoke! CMTaggedBufferGroupGetCVPixelBufferForTagCollection is not bound -!missing-pinvoke! CMTaggedBufferGroupGetNumberOfMatchesForTagCollection is not bound -!missing-pinvoke! CMTaggedBufferGroupGetTagCollectionAtIndex is not bound -!missing-pinvoke! CMTaggedBufferGroupGetTypeID is not bound -!missing-pinvoke! CMTagGetFlagsValue is not bound -!missing-pinvoke! CMTagGetFloat64Value is not bound -!missing-pinvoke! CMTagGetOSTypeValue is not bound -!missing-pinvoke! CMTagGetSInt64Value is not bound -!missing-pinvoke! CMTagGetValueDataType is not bound -!missing-pinvoke! CMTagHasFlagsValue is not bound -!missing-pinvoke! CMTagHasFloat64Value is not bound -!missing-pinvoke! CMTagHash is not bound -!missing-pinvoke! CMTagHasOSTypeValue is not bound -!missing-pinvoke! CMTagHasSInt64Value is not bound -!missing-pinvoke! CMTagMakeFromDictionary is not bound -!missing-pinvoke! CMTagMakeWithFlagsValue is not bound -!missing-pinvoke! CMTagMakeWithFloat64Value is not bound -!missing-pinvoke! CMTagMakeWithOSTypeValue is not bound -!missing-pinvoke! CMTagMakeWithSInt64Value is not bound !missing-pinvoke! CMVideoFormatDescriptionCopyTagCollectionArray is not bound !missing-field! kCMFormatDescriptionExtension_LogTransferFunction not bound !missing-field! kCMFormatDescriptionLogTransferFunction_AppleLog not bound @@ -362,7 +264,6 @@ !missing-field! kCMMetadataDataType_QuickTimeMetadataUUID not bound !missing-field! kCMMetadataIdentifier_QuickTimeMetadataSceneIlluminance not bound !missing-field! kCMMetadataIdentifier_QuickTimeMetadataSegmentIdentifier not bound -!missing-field! kCMTagProjectionTypeHalfEquirectangular not bound !missing-pinvoke! CMBufferQueueInstallTrigger is not bound ## block version of the above API diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-MapKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-MapKit.ignore index 9b3e4e3724ba..94a793aa2649 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-MapKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-MapKit.ignore @@ -3,15 +3,5 @@ !missing-field! MKMapRectWorld not bound !missing-field! MKMapSizeWorld not bound -## soft deprecation -!deprecated-attribute-missing! MKMapView::mapType missing a [Deprecated] attribute -!deprecated-attribute-missing! MKMapView::setMapType: missing a [Deprecated] attribute -!deprecated-attribute-missing! MKMapView::pointOfInterestFilter missing a [Deprecated] attribute -!deprecated-attribute-missing! MKMapView::setPointOfInterestFilter: missing a [Deprecated] attribute -!deprecated-attribute-missing! MKMapView::showsBuildings missing a [Deprecated] attribute -!deprecated-attribute-missing! MKMapView::setShowsBuildings: missing a [Deprecated] attribute -!deprecated-attribute-missing! MKMapView::showsTraffic missing a [Deprecated] attribute -!deprecated-attribute-missing! MKMapView::setShowsTraffic: missing a [Deprecated] attribute - ## The MKOverlay protocol implements the MKAnnotation protocol, which has a required 'coordinate' property, so the API is there. !missing-protocol-member! MKOverlay::coordinate not found diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-Matter.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-Matter.ignore index b78379aae2f7..4bfb09240ba7 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-Matter.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-Matter.ignore @@ -10353,3 +10353,43 @@ !missing-type! MTRValveConfigurationAndControlClusterOpenParams not bound !missing-type! MTRValveConfigurationAndControlClusterValveFaultEvent not bound !missing-type! MTRValveConfigurationAndControlClusterValveStateChangedEvent not bound +!missing-enum! MTRColorControlColorCapabilitiesBitmap not bound +!missing-enum! MTRColorControlDirection not bound +!missing-enum! MTRColorControlDriftCompensation not bound +!missing-enum! MTRColorControlEnhancedColorMode not bound +!missing-enum! MTRColorControlMoveMode not bound +!missing-enum! MTRColorControlOptionsBitmap not bound +!missing-enum! MTRColorControlStepMode not bound +!missing-enum! MTRColorControlUpdateFlagsBitmap not bound +!missing-enum! MTRDeviceTypeIDType not bound +!missing-field! MTRDeviceControllerRegistrationControllerContextKey not bound +!missing-field! MTRDeviceControllerRegistrationNodeIDKey not bound +!missing-field! MTRDeviceControllerRegistrationNodeIDsKey not bound +!missing-pinvoke! MTREventNameForID is not bound +!missing-pinvoke! MTRRequestCommandNameForID is not bound +!missing-pinvoke! MTRResponseCommandNameForID is not bound +!missing-protocol! MTRXPCClientProtocol not bound +!missing-protocol! MTRXPCClientProtocol_MTRDevice not bound +!missing-protocol! MTRXPCClientProtocol_MTRDeviceController not bound +!missing-protocol! MTRXPCServerProtocol not bound +!missing-protocol! MTRXPCServerProtocol_MTRDevice not bound +!missing-protocol! MTRXPCServerProtocol_MTRDeviceController not bound +!missing-selector! +MTRDeviceType::deviceTypeForID: not bound +!missing-selector! MTRCertificateInfo::publicKeyData not bound +!missing-selector! MTRDevice::readAttributePaths: not bound +!missing-selector! MTRDeviceController::addDeviceControllerDelegate:queue: not bound +!missing-selector! MTRDeviceController::isSuspended not bound +!missing-selector! MTRDeviceController::removeDeviceControllerDelegate: not bound +!missing-selector! MTRDeviceController::resume not bound +!missing-selector! MTRDeviceController::suspend not bound +!missing-selector! MTRDeviceControllerAbstractParameters::setStartSuspended: not bound +!missing-selector! MTRDeviceControllerAbstractParameters::startSuspended not bound +!missing-selector! MTRDeviceControllerExternalCertificateParameters::rootCertificate not bound +!missing-selector! MTRDeviceType::id not bound +!missing-selector! MTRDeviceType::isUtility not bound +!missing-selector! MTRDeviceType::name not bound +!missing-selector! MTRXPCDeviceControllerParameters::initWithXPConnectionBlock:uniqueIdentifier: not bound +!missing-selector! MTRXPCDeviceControllerParameters::uniqueIdentifier not bound +!missing-selector! MTRXPCDeviceControllerParameters::xpcConnectionBlock not bound +!missing-type! MTRDeviceType not bound +!missing-type! MTRXPCDeviceControllerParameters not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-ObjCRuntime.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-ObjCRuntime.ignore index c9d7c4a3ce47..c58684c7f79d 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-ObjCRuntime.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-ObjCRuntime.ignore @@ -17,6 +17,7 @@ !unknown-pinvoke! objc_allocateClassPair bound !unknown-pinvoke! objc_allocateProtocol bound !unknown-pinvoke! objc_getClass bound +!unknown-pinvoke! objc_getClassList bound !unknown-pinvoke! objc_getProtocol bound !unknown-pinvoke! objc_msgSend bound !unknown-pinvoke! objc_msgSendSuper bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-ReplayKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-ReplayKit.ignore deleted file mode 100644 index dd4e534d8035..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-ReplayKit.ignore +++ /dev/null @@ -1,2 +0,0 @@ -## https://trello.com/c/eA440suj/91-33875315-rpbroadcasthandler-updatebroadcasturl-unrecognized-selector -!missing-selector! RPBroadcastHandler::updateBroadcastURL: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.ignore index a10ca55f52f8..6a076f91b75d 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.ignore @@ -13,7 +13,5 @@ ### deprecated in iOS8 !missing-protocol-member! AVAudioPlayerDelegate::audioPlayerEndInterruption:withFlags: not found -## https://github.com/xamarin/xamarin-macios/issues/16229 prevents crashing instead of return null -## so these selectors have been bound manually -!missing-selector! AVAudioPlayer::initWithContentsOfURL:error: not bound -!missing-selector! AVAudioPlayer::initWithData:error: not bound +# isEqual: is already exposed from NSObject, no need to expose again +!missing-selector! AVCaptionRegion::isEqual: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo deleted file mode 100644 index acd504c10ea0..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo +++ /dev/null @@ -1,911 +0,0 @@ -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsBestMatchingPreferredLanguages: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::mediaSelectionGroupForMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::trackWithTrackID: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::unusedTrackID missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::associatedTracksOfType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::samplePresentationTimeForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::segmentForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:to:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:toNodes:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVMutableComposition::insertTimeRange:ofAsset:atTime:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVURLAsset::compatibleTrackForCompositionTrack: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVVideoComposition::isValidForAsset:timeRange:validationDelegate: missing a [Deprecated] attribute -!missing-enum! AVAssetTrackGroupOutputHandling not bound -!missing-enum! AVMIDIControlChangeMessageType not bound -!missing-enum! AVMIDIMetaEventType not bound -!missing-enum! AVSpeechSynthesisMarkerMark not bound -!missing-enum-value! AVError native value AVErrorAirPlayReceiverTemporarilyUnavailable = -11882 not bound -!missing-enum-value! AVError native value AVErrorFailedToLoadSampleData = -11881 not bound -!missing-enum-value! AVError native value AVErrorInvalidSampleCursor = -11880 not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoMultiviewVideo not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoVideo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyAlbum not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyApproximateDurationInSeconds not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyArtist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyChannelLayout not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComments not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComposer not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyCopyright not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyEncodingApplication not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyGenre not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyISRC not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyKeySignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyLyricist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyNominalBitRate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyRecordedDate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceBitDepth not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceEncoder not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySubTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTempo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTimeSignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTrackNumber not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyYear not bound -!missing-field! AVExtendedNoteOnEventDefaultInstrument not bound -!missing-field! AVPlayerInterstitialEventJoinCue not bound -!missing-field! AVPlayerInterstitialEventLeaveCue not bound -!missing-field! AVPlayerInterstitialEventNoCue not bound -!missing-field! AVURLAssetHTTPUserAgentKey not bound -!missing-field! AVURLAssetPrimarySessionIdentifierKey not bound -!missing-field! AVVideoTransferFunction_Linear not bound -!missing-protocol-conformance! AVPlayerInterstitialEvent should conform to NSCopying -!missing-selector! +AVAssetPlaybackAssistant::assetPlaybackAssistantWithAsset: not bound -!missing-selector! +AVCaptureDevice::isStudioLightEnabled not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:prototypeInstruction:completionHandler: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time: not bound -!missing-selector! +AVSampleBufferGenerator::notifyOfDataReadyForSampleBuffer:completionHandler: not bound -!missing-selector! +AVSpeechSynthesisProviderVoice::updateSpeechVoices not bound -!missing-selector! +AVSpeechUtterance::speechUtteranceWithSSMLRepresentation: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! AVAssetExportSession::audioTrackGroupHandling not bound -!missing-selector! AVAssetExportSession::setAudioTrackGroupHandling: not bound -!missing-selector! AVAssetPlaybackAssistant::loadPlaybackConfigurationOptionsWithCompletionHandler: not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::isEntireLengthAvailableOnDemand not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::setEntireLengthAvailableOnDemand: not bound -!missing-selector! AVAssetTrack::canProvideSampleCursors not bound -!missing-selector! AVAssetTrack::makeSampleCursorAtFirstSampleInDecodeOrder not bound -!missing-selector! AVAssetTrack::makeSampleCursorAtLastSampleInDecodeOrder not bound -!missing-selector! AVAssetTrack::makeSampleCursorWithPresentationTimeStamp: not bound -!missing-selector! AVAudioEngine::connectMIDI:to:format:eventListBlock: not bound -!missing-selector! AVAudioEngine::connectMIDI:toNodes:format:eventListBlock: not bound -!missing-selector! AVAudioSequencer::createAndAppendTrack not bound -!missing-selector! AVAudioSequencer::removeTrack: not bound -!missing-selector! AVAudioSequencer::reverseEvents not bound -!missing-selector! AVAudioSequencer::setUserCallback: not bound -!missing-selector! AVAudioUnitComponent::configurationDictionary not bound -!missing-selector! AVAudioUnitComponent::icon not bound -!missing-selector! AVAudioUnitComponent::passesAUVal not bound -!missing-selector! AVAudioUnitMIDIInstrument::sendMIDIEventList: not bound -!missing-selector! AVAUPresetEvent::element not bound -!missing-selector! AVAUPresetEvent::initWithScope:element:dictionary: not bound -!missing-selector! AVAUPresetEvent::presetDictionary not bound -!missing-selector! AVAUPresetEvent::scope not bound -!missing-selector! AVAUPresetEvent::setElement: not bound -!missing-selector! AVAUPresetEvent::setScope: not bound -!missing-selector! AVCaptureDevice::companionDeskViewCamera not bound -!missing-selector! AVCaptureDevice::isContinuityCamera not bound -!missing-selector! AVCaptureDevice::isStudioLightActive not bound -!missing-selector! AVCaptureDeviceFormat::isStudioLightSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForStudioLight not bound -!missing-selector! AVComposition::chapterMetadataGroupsBestMatchingPreferredLanguages: not bound -!missing-selector! AVComposition::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: not bound -!missing-selector! AVComposition::mediaSelectionGroupForMediaCharacteristic: not bound -!missing-selector! AVComposition::metadataForFormat: not bound -!missing-selector! AVComposition::unusedTrackID not bound -!missing-selector! AVCompositionTrack::associatedTracksOfType: not bound -!missing-selector! AVCompositionTrack::hasMediaCharacteristic: not bound -!missing-selector! AVCompositionTrack::metadataForFormat: not bound -!missing-selector! AVCompositionTrack::samplePresentationTimeForTrackTime: not bound -!missing-selector! AVExtendedNoteOnEvent::duration not bound -!missing-selector! AVExtendedNoteOnEvent::groupID not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:instrumentID:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::instrumentID not bound -!missing-selector! AVExtendedNoteOnEvent::midiNote not bound -!missing-selector! AVExtendedNoteOnEvent::setDuration: not bound -!missing-selector! AVExtendedNoteOnEvent::setGroupID: not bound -!missing-selector! AVExtendedNoteOnEvent::setInstrumentID: not bound -!missing-selector! AVExtendedNoteOnEvent::setMidiNote: not bound -!missing-selector! AVExtendedNoteOnEvent::setVelocity: not bound -!missing-selector! AVExtendedNoteOnEvent::velocity not bound -!missing-selector! AVExtendedTempoEvent::initWithTempo: not bound -!missing-selector! AVExtendedTempoEvent::setTempo: not bound -!missing-selector! AVExtendedTempoEvent::tempo not bound -!missing-selector! AVMIDIChannelEvent::channel not bound -!missing-selector! AVMIDIChannelEvent::setChannel: not bound -!missing-selector! AVMIDIChannelPressureEvent::initWithChannel:pressure: not bound -!missing-selector! AVMIDIChannelPressureEvent::pressure not bound -!missing-selector! AVMIDIChannelPressureEvent::setPressure: not bound -!missing-selector! AVMIDIControlChangeEvent::initWithChannel:messageType:value: not bound -!missing-selector! AVMIDIControlChangeEvent::messageType not bound -!missing-selector! AVMIDIControlChangeEvent::value not bound -!missing-selector! AVMIDIMetaEvent::initWithType:data: not bound -!missing-selector! AVMIDIMetaEvent::type not bound -!missing-selector! AVMIDINoteEvent::channel not bound -!missing-selector! AVMIDINoteEvent::duration not bound -!missing-selector! AVMIDINoteEvent::initWithChannel:key:velocity:duration: not bound -!missing-selector! AVMIDINoteEvent::key not bound -!missing-selector! AVMIDINoteEvent::setChannel: not bound -!missing-selector! AVMIDINoteEvent::setDuration: not bound -!missing-selector! AVMIDINoteEvent::setKey: not bound -!missing-selector! AVMIDINoteEvent::setVelocity: not bound -!missing-selector! AVMIDINoteEvent::velocity not bound -!missing-selector! AVMIDIPitchBendEvent::initWithChannel:value: not bound -!missing-selector! AVMIDIPitchBendEvent::setValue: not bound -!missing-selector! AVMIDIPitchBendEvent::value not bound -!missing-selector! AVMIDIPolyPressureEvent::initWithChannel:key:pressure: not bound -!missing-selector! AVMIDIPolyPressureEvent::key not bound -!missing-selector! AVMIDIPolyPressureEvent::pressure not bound -!missing-selector! AVMIDIPolyPressureEvent::setKey: not bound -!missing-selector! AVMIDIPolyPressureEvent::setPressure: not bound -!missing-selector! AVMIDIProgramChangeEvent::initWithChannel:programNumber: not bound -!missing-selector! AVMIDIProgramChangeEvent::programNumber not bound -!missing-selector! AVMIDIProgramChangeEvent::setProgramNumber: not bound -!missing-selector! AVMIDISysexEvent::initWithData: not bound -!missing-selector! AVMIDISysexEvent::sizeInBytes not bound -!missing-selector! AVMusicTrack::addEvent:atBeat: not bound -!missing-selector! AVMusicTrack::clearEventsInRange: not bound -!missing-selector! AVMusicTrack::copyAndMergeEventsInRange:fromTrack:mergeAtBeat: not bound -!missing-selector! AVMusicTrack::copyEventsInRange:fromTrack:insertAtBeat: not bound -!missing-selector! AVMusicTrack::cutEventsInRange: not bound -!missing-selector! AVMusicTrack::enumerateEventsInRange:usingBlock: not bound -!missing-selector! AVMusicTrack::moveEventsInRange:byAmount: not bound -!missing-selector! AVMusicTrack::setUsesAutomatedParameters: not bound -!missing-selector! AVMusicTrack::usesAutomatedParameters not bound -!missing-selector! AVMusicUserEvent::initWithData: not bound -!missing-selector! AVMusicUserEvent::sizeInBytes not bound -!missing-selector! AVMutableMovie::chapterMetadataGroupsBestMatchingPreferredLanguages: not bound -!missing-selector! AVMutableMovie::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: not bound -!missing-selector! AVMutableMovie::mediaSelectionGroupForMediaCharacteristic: not bound -!missing-selector! AVMutableMovie::metadataForFormat: not bound -!missing-selector! AVMutableMovie::unusedTrackID not bound -!missing-selector! AVMutableMovieTrack::associatedTracksOfType: not bound -!missing-selector! AVMutableMovieTrack::hasMediaCharacteristic: not bound -!missing-selector! AVMutableMovieTrack::metadataForFormat: not bound -!missing-selector! AVMutableMovieTrack::samplePresentationTimeForTrackTime: not bound -!missing-selector! AVMutableMovieTrack::segmentForTrackTime: not bound -!missing-selector! AVParameterEvent::element not bound -!missing-selector! AVParameterEvent::initWithParameterID:scope:element:value: not bound -!missing-selector! AVParameterEvent::parameterID not bound -!missing-selector! AVParameterEvent::scope not bound -!missing-selector! AVParameterEvent::setElement: not bound -!missing-selector! AVParameterEvent::setParameterID: not bound -!missing-selector! AVParameterEvent::setScope: not bound -!missing-selector! AVParameterEvent::setValue: not bound -!missing-selector! AVParameterEvent::value not bound -!missing-selector! AVPlayer::defaultRate not bound -!missing-selector! AVPlayer::setDefaultRate: not bound -!missing-selector! AVPlayerInterstitialEvent::alignsResumptionWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::alignsStartWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::cue not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsResumptionWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsStartWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setCue: not bound -!missing-selector! AVPlayerInterstitialEvent::setDate: not bound -!missing-selector! AVPlayerInterstitialEvent::setIdentifier: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlayoutLimit: not bound -!missing-selector! AVPlayerInterstitialEvent::setPrimaryItem: not bound -!missing-selector! AVPlayerInterstitialEvent::setRestrictions: not bound -!missing-selector! AVPlayerInterstitialEvent::setResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEvent::setTemplateItems: not bound -!missing-selector! AVPlayerInterstitialEvent::setTime: not bound -!missing-selector! AVPlayerInterstitialEvent::setUserDefinedAttributes: not bound -!missing-selector! AVPlayerInterstitialEvent::setWillPlayOnce: not bound -!missing-selector! AVPlayerInterstitialEvent::willPlayOnce not bound -!missing-selector! AVRouteDetector::detectsCustomRoutes not bound -!missing-selector! AVRouteDetector::setDetectsCustomRoutes: not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:addingToBatch:error: not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:error: not bound -!missing-selector! AVSampleBufferGenerator::initWithAsset:timebase: not bound -!missing-selector! AVSampleBufferGenerator::makeBatch not bound -!missing-selector! AVSampleBufferGeneratorBatch::cancel not bound -!missing-selector! AVSampleBufferGeneratorBatch::makeDataReadyWithCompletionHandler: not bound -!missing-selector! AVSampleBufferRequest::direction not bound -!missing-selector! AVSampleBufferRequest::initWithStartCursor: not bound -!missing-selector! AVSampleBufferRequest::limitCursor not bound -!missing-selector! AVSampleBufferRequest::maxSampleCount not bound -!missing-selector! AVSampleBufferRequest::mode not bound -!missing-selector! AVSampleBufferRequest::overrideTime not bound -!missing-selector! AVSampleBufferRequest::preferredMinSampleCount not bound -!missing-selector! AVSampleBufferRequest::setDirection: not bound -!missing-selector! AVSampleBufferRequest::setLimitCursor: not bound -!missing-selector! AVSampleBufferRequest::setMaxSampleCount: not bound -!missing-selector! AVSampleBufferRequest::setMode: not bound -!missing-selector! AVSampleBufferRequest::setOverrideTime: not bound -!missing-selector! AVSampleBufferRequest::setPreferredMinSampleCount: not bound -!missing-selector! AVSampleBufferRequest::startCursor not bound -!missing-selector! AVSpeechSynthesisMarker::byteSampleOffset not bound -!missing-selector! AVSpeechSynthesisMarker::initWithMarkerType:forTextRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::mark not bound -!missing-selector! AVSpeechSynthesisMarker::setByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::setMark: not bound -!missing-selector! AVSpeechSynthesisMarker::setTextRange: not bound -!missing-selector! AVSpeechSynthesisMarker::textRange not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::cancelSpeechRequest not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechSynthesisOutputMetadataBlock: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechVoices: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechSynthesisOutputMetadataBlock not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechVoices not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::synthesizeSpeechRequest: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::initWithSSMLRepresentation:voice: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::ssmlRepresentation not bound -!missing-selector! AVSpeechSynthesisProviderRequest::voice not bound -!missing-selector! AVSpeechSynthesisProviderVoice::age not bound -!missing-selector! AVSpeechSynthesisProviderVoice::gender not bound -!missing-selector! AVSpeechSynthesisProviderVoice::identifier not bound -!missing-selector! AVSpeechSynthesisProviderVoice::initWithName:identifier:primaryLanguages:supportedLanguages: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::name not bound -!missing-selector! AVSpeechSynthesisProviderVoice::primaryLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setAge: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setGender: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVersion: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVoiceSize: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::supportedLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::version not bound -!missing-selector! AVSpeechSynthesisProviderVoice::voiceSize not bound -!missing-selector! AVSpeechSynthesizer::writeUtterance:toBufferCallback:toMarkerCallback: not bound -!missing-selector! AVSpeechUtterance::initWithSSMLRepresentation: not bound -!missing-selector! AVURLAsset::httpSessionIdentifier not bound -!missing-type! AVAssetPlaybackAssistant not bound -!missing-type! AVAUPresetEvent not bound -!missing-type! AVExtendedNoteOnEvent not bound -!missing-type! AVExtendedTempoEvent not bound -!missing-type! AVMIDIChannelEvent not bound -!missing-type! AVMIDIChannelPressureEvent not bound -!missing-type! AVMIDIControlChangeEvent not bound -!missing-type! AVMIDIMetaEvent not bound -!missing-type! AVMIDINoteEvent not bound -!missing-type! AVMIDIPitchBendEvent not bound -!missing-type! AVMIDIPolyPressureEvent not bound -!missing-type! AVMIDIProgramChangeEvent not bound -!missing-type! AVMIDISysexEvent not bound -!missing-type! AVMusicEvent not bound -!missing-type! AVMusicUserEvent not bound -!missing-type! AVParameterEvent not bound -!missing-type! AVSampleBufferGenerator not bound -!missing-type! AVSampleBufferGeneratorBatch not bound -!missing-type! AVSampleBufferRequest not bound -!missing-type! AVSpeechSynthesisMarker not bound -!missing-type! AVSpeechSynthesisProviderAudioUnit not bound -!missing-type! AVSpeechSynthesisProviderRequest not bound -!missing-type! AVSpeechSynthesisProviderVoice not bound -!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound -!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound -!missing-enum! AVPlayerInterstitialEventAssetListResponseStatus not bound -!missing-enum-value! AVError native value AVErrorEncodeFailed = -11883 not bound -!missing-enum-value! AVError native value AVErrorSandboxExtensionDenied = -11884 not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeErrorKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeEventKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeStatusKey not bound -!missing-selector! AVCaptureDevice::centerStageRectOfInterest not bound -!missing-selector! AVCaptureDevice::setCenterStageRectOfInterest: not bound -!missing-selector! AVPlayerInterstitialEvent::assetListResponse not bound -!deprecated-attribute-missing! AVAudioSession::recordPermission missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioSession::requestRecordPermission: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVCaptureConnection::isVideoOrientationSupported missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::enqueueSampleBuffer: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::error missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flush missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flushAndRemoveImage missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::isReadyForMoreMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requestMediaDataWhenReadyOnQueue:usingBlock: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requiresFlushToResumeDecoding missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::status missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::stopRequestingMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::timebase missing a [Deprecated] attribute -!extra-designated-initializer! AVPlayerLooper::initWithPlayer:templateItem:timeRange: is incorrectly decorated with an [DesignatedInitializer] attribute -!missing-enum! AVAudioVoiceProcessingOtherAudioDuckingLevel not bound -!missing-enum! AVAudioVoiceProcessingSpeechActivityEvent not bound -!missing-enum! AVCapturePhotoOutputCaptureReadiness not bound -!missing-enum! AVPlayerLooperItemOrdering not bound -!missing-enum! AVSpeechSynthesisPersonalVoiceAuthorizationStatus not bound -!missing-enum! AVSpeechSynthesisVoiceTraits not bound -!missing-field! AVAssetExportPresetMVHEVC1440x1440 not bound -!missing-field! AVAssetExportPresetMVHEVC960x960 not bound -!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound -!missing-field! AVAudioApplicationMuteStateKey not bound -!missing-field! AVAudioSessionPortContinuityMicrophone not bound -!missing-field! AVCaptureDeviceTypeMicrophone not bound -!missing-field! AVFileTypeAHAP not bound -!missing-field! AVMediaCharacteristicCarriesVideoStereoMetadata not bound -!missing-field! AVMediaCharacteristicContainsStereoMultiviewVideo not bound -!missing-field! AVMediaCharacteristicEnhancesSpeechIntelligibility not bound -!missing-field! AVMediaCharacteristicIndicatesHorizontalFieldOfView not bound -!missing-field! AVMediaCharacteristicTactileMinimal not bound -!missing-field! AVMediaTypeHaptic not bound -!missing-field! AVMetadataObjectTypeHumanFullBody not bound -!missing-field! AVOutputSettingsPresetMVHEVC1440x1440 not bound -!missing-field! AVOutputSettingsPresetMVHEVC960x960 not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotification not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotificationErrorKey not bound -!missing-field! AVSampleBufferVideoRendererRequiresFlushToResumeDecodingDidChangeNotification not bound -!missing-field! AVSpeechSynthesisAvailableVoicesDidChangeNotification not bound -!missing-field! AVURLAssetOverrideMIMETypeKey not bound -!missing-field! AVVideoCompositionPerFrameHDRDisplayMetadataPolicyGenerate not bound -!missing-field! AVVideoCompositionPerFrameHDRDisplayMetadataPolicyPropagate not bound -!missing-pinvoke! AVCaptureReactionSystemImageNameForType is not bound -!missing-protocol! AVCapturePhotoOutputReadinessCoordinatorDelegate not bound -!missing-protocol-member! AVCapturePhotoCaptureDelegate::captureOutput:didFinishCapturingDeferredPhotoProxy:error: not found -!missing-protocol-member! AVSpeechSynthesizerDelegate::speechSynthesizer:willSpeakMarker:utterance: not found -!missing-selector! +AVAssetVariantQualifier::predicateForBinauralAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForDownmixAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForImmersiveAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetWriterInputTaggedPixelBufferGroupAdaptor::assetWriterInputTaggedPixelBufferGroupAdaptorWithAssetWriterInput:sourcePixelBufferAttributes: not bound -!missing-selector! +AVCaptureDevice::reactionEffectGesturesEnabled not bound -!missing-selector! +AVCaptureDevice::reactionEffectsEnabled not bound -!missing-selector! +AVCaptureDevice::setUserPreferredCamera: not bound -!missing-selector! +AVCaptureDevice::systemPreferredCamera not bound -!missing-selector! +AVCaptureDevice::userPreferredCamera not bound -!missing-selector! +AVSpeechSynthesizer::personalVoiceAuthorizationStatus not bound -!missing-selector! +AVSpeechSynthesizer::requestPersonalVoiceAuthorizationWithCompletionHandler: not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isBinaural not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isDownmix not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isImmersive not bound -!missing-selector! AVAssetVariantVideoAttributes::videoLayoutAttributes not bound -!missing-selector! AVAssetVariantVideoLayoutAttributes::stereoViewComponents not bound -!missing-selector! AVAssetWriter::initialMovieFragmentInterval not bound -!missing-selector! AVAssetWriter::setInitialMovieFragmentInterval: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::appendTaggedPixelBufferGroup:withPresentationTime: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::assetWriterInput not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::initWithAssetWriterInput:sourcePixelBufferAttributes: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::pixelBufferPool not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::sourcePixelBufferAttributes not bound -!missing-selector! AVAudioInputNode::setMutedSpeechActivityEventListener: not bound -!missing-selector! AVAudioInputNode::setVoiceProcessingOtherAudioDuckingConfiguration: not bound -!missing-selector! AVAudioInputNode::voiceProcessingOtherAudioDuckingConfiguration not bound -!missing-selector! AVAudioSession::prefersInterruptionOnRouteDisconnect not bound -!missing-selector! AVAudioSession::setPrefersInterruptionOnRouteDisconnect:error: not bound -!missing-selector! AVCaptureConnection::setVideoRotationAngle: not bound -!missing-selector! AVCaptureDevice::availableReactionTypes not bound -!missing-selector! AVCaptureDevice::canPerformReactionEffects not bound -!missing-selector! AVCaptureDevice::performEffectForReaction: not bound -!missing-selector! AVCaptureDevice::reactionEffectsInProgress not bound -!missing-selector! AVCaptureDeviceFormat::reactionEffectsSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForReactionEffectsInProgress not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::device not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::initWithDevice:previewLayer: not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::previewLayer not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelCapture not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelPreview not bound -!missing-selector! AVCapturePhotoOutput::captureReadiness not bound -!missing-selector! AVCapturePhotoOutput::isAutoDeferredPhotoDeliveryEnabled not bound -!missing-selector! AVCapturePhotoOutput::isAutoDeferredPhotoDeliverySupported not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationSupported not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureEnabled not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureSupported not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagEnabled not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagSupported not bound -!missing-selector! AVCapturePhotoOutput::setAutoDeferredPhotoDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationSupported: not bound -!missing-selector! AVCapturePhotoOutput::setResponsiveCaptureEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setZeroShutterLagEnabled: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::captureReadiness not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::delegate not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::initWithPhotoOutput: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::setDelegate: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::startTrackingCaptureRequestUsingPhotoSettings: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::stopTrackingCaptureRequestUsingPhotoSettingsUniqueID: not bound -!missing-selector! AVCaptureReactionEffectState::endTime not bound -!missing-selector! AVCaptureReactionEffectState::reactionType not bound -!missing-selector! AVCaptureReactionEffectState::startTime not bound -!missing-selector! AVCaptureResolvedPhotoSettings::deferredPhotoProxyDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVMutableVideoComposition::perFrameHDRDisplayMetadataPolicy not bound -!missing-selector! AVMutableVideoComposition::setPerFrameHDRDisplayMetadataPolicy: not bound -!missing-selector! AVPlayerLooper::initWithPlayer:templateItem:timeRange:existingItemsOrdering: not bound -!missing-selector! AVSampleBufferDisplayLayer::sampleBufferRenderer not bound -!missing-selector! AVSampleBufferVideoRenderer::error not bound -!missing-selector! AVSampleBufferVideoRenderer::flushWithRemovalOfDisplayedImage:completionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::requiresFlushToResumeDecoding not bound -!missing-selector! AVSampleBufferVideoRenderer::status not bound -!missing-selector! AVSpeechSynthesisMarker::bookmarkName not bound -!missing-selector! AVSpeechSynthesisMarker::initWithBookmarkName:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithParagraphRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithPhonemeString:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithSentenceRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithWordRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::phoneme not bound -!missing-selector! AVSpeechSynthesisMarker::setBookmarkName: not bound -!missing-selector! AVSpeechSynthesisMarker::setPhoneme: not bound -!missing-selector! AVSpeechSynthesisVoice::voiceTraits not bound -!missing-selector! AVVideoComposition::perFrameHDRDisplayMetadataPolicy not bound -!missing-type! AVAssetVariantVideoLayoutAttributes not bound -!missing-type! AVAssetWriterInputTaggedPixelBufferGroupAdaptor not bound -!missing-type! AVCaptureDeferredPhotoProxy not bound -!missing-type! AVCaptureDeviceRotationCoordinator not bound -!missing-type! AVCapturePhotoOutputReadinessCoordinator not bound -!missing-type! AVCaptureReactionEffectState not bound -!missing-type! AVMetadataHumanFullBodyObject not bound -!missing-type! AVSampleBufferVideoRenderer not bound -!missing-field! AVCaptureDeviceTypeContinuityCamera not bound -!deprecated-attribute-missing! AVCaptureDeviceFormat::supportedVideoZoomFactorsForDepthDataDelivery missing a [Deprecated] attribute -!missing-enum-value! AVCaptureColorSpace native value AVCaptureColorSpace_AppleLog = 3 not bound -!missing-enum-value! AVCaptureSystemPressureFactors native value AVCaptureSystemPressureFactorCameraTemperature = 8 not bound -!missing-selector! +AVExternalStorageDevice::authorizationStatus not bound -!missing-selector! +AVExternalStorageDevice::requestAccessWithCompletionHandler: not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::isSupported not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::sharedSession not bound -!missing-selector! AVCaptureVideoDataOutput::recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType:outputFileURL: not bound -!missing-selector! AVExternalStorageDevice::displayName not bound -!missing-selector! AVExternalStorageDevice::freeSize not bound -!missing-selector! AVExternalStorageDevice::isConnected not bound -!missing-selector! AVExternalStorageDevice::isNotRecommendedForCaptureUse not bound -!missing-selector! AVExternalStorageDevice::nextAvailableURLsWithPathExtensions:error: not bound -!missing-selector! AVExternalStorageDevice::totalSize not bound -!missing-selector! AVExternalStorageDevice::uuid not bound -!missing-selector! AVExternalStorageDeviceDiscoverySession::externalStorageDevices not bound -!missing-type! AVExternalStorageDevice not bound -!missing-type! AVExternalStorageDeviceDiscoverySession not bound -!missing-enum! CMTagCollectionVideoOutputPreset not bound -!missing-field! AVVideoDecompressionPropertiesKey not bound -!missing-pinvoke! CMTagCollectionCreateWithVideoOutputPreset is not bound -!missing-selector! AVCaptureDeviceFormat::supportedVideoZoomRangesForDepthDataDelivery not bound -!missing-selector! AVCaptureDeviceFormat::zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported not bound -!missing-selector! AVPlayer::setVideoOutput: not bound -!missing-selector! AVPlayer::videoOutput not bound -!missing-selector! AVPlayerVideoOutput::copyTaggedBufferGroupForHostTime:presentationTimeStamp:activeConfiguration: not bound -!missing-selector! AVPlayerVideoOutput::initWithSpecification: not bound -!missing-selector! AVPlayerVideoOutputConfiguration::activationTime not bound -!missing-selector! AVPlayerVideoOutputConfiguration::dataChannelDescriptions not bound -!missing-selector! AVPlayerVideoOutputConfiguration::sourcePlayerItem not bound -!missing-selector! AVVideoOutputSpecification::initWithTagCollections: not bound -!missing-selector! AVVideoOutputSpecification::preferredTagCollections not bound -!missing-selector! AVZoomRange::containsZoomFactor: not bound -!missing-selector! AVZoomRange::maxZoomFactor not bound -!missing-selector! AVZoomRange::minZoomFactor not bound -!missing-type! AVPlayerVideoOutput not bound -!missing-type! AVPlayerVideoOutputConfiguration not bound -!missing-type! AVVideoOutputSpecification not bound -!missing-type! AVZoomRange not bound -!deprecated-attribute-missing! AVAggregateAssetDownloadTask missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didCompleteForMediaSelection: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:willDownloadToURL: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:assetDownloadTask:didFinishDownloadingToURL: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:assetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadTask::loadedTimeRanges missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadTask::options missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadURLSession::aggregateAssetDownloadTaskWithURLAsset:mediaSelections:assetTitle:assetArtworkData:options: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadURLSession::assetDownloadTaskWithURLAsset:assetTitle:assetArtworkData:options: missing a [Deprecated] attribute -!missing-enum! AVCaptionAnimation not bound -!missing-enum! AVCaptionConversionValidatorStatus not bound -!missing-enum! AVCaptionDecoration not bound -!missing-enum! AVCaptionFontStyle not bound -!missing-enum! AVCaptionFontWeight not bound -!missing-enum! AVCaptionRegionDisplayAlignment not bound -!missing-enum! AVCaptionRegionScroll not bound -!missing-enum! AVCaptionRegionWritingMode not bound -!missing-enum! AVCaptionRubyAlignment not bound -!missing-enum! AVCaptionRubyPosition not bound -!missing-enum! AVCaptionTextAlignment not bound -!missing-enum! AVCaptionTextCombine not bound -!missing-enum! AVCaptionUnitsType not bound -!missing-enum! AVCaptureMultichannelAudioMode not bound -!missing-enum! AVExternalContentProtectionStatus not bound -!missing-enum! AVPlayerInterstitialEventTimelineOccupancy not bound -!missing-enum! AVPlayerItemSegmentType not bound -!missing-enum-value! AVError native value AVErrorToneMappingFailed = -11885 not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyForceSDR not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyMatchSource not bound -!missing-field! AVAssetPlaybackConfigurationOptionSpatialVideo not bound -!missing-field! AVCaptionConversionAdjustmentTypeTimeRange not bound -!missing-field! AVCaptionConversionWarningTypeExcessMediaData not bound -!missing-field! AVCaptionMediaSubTypeKey not bound -!missing-field! AVCaptionMediaTypeKey not bound -!missing-field! AVCaptionTimeCodeFrameDurationKey not bound -!missing-field! AVCaptionUseDropFrameTimeCodeKey not bound -!missing-field! AVFileTypeAppleiTT not bound -!missing-field! AVFileTypeSCC not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncNotification not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonCurrentSegmentChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonKey not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonLoadedTimeRangesChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonSegmentsChanged not bound -!missing-field! AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification not bound -!missing-field! AVSpatialCaptureDiscomfortReasonNotEnoughLight not bound -!missing-field! AVSpatialCaptureDiscomfortReasonSubjectTooClose not bound -!missing-field! AVVideoCodecTypeAppleProRes4444XQ not bound -!missing-field! AVVideoTransferFunction_IEC_sRGB not bound -!missing-pinvoke! AVCaptionDimensionMake is not bound -!missing-pinvoke! AVCaptionPointMake is not bound -!missing-pinvoke! AVCaptionSizeMake is not bound -!missing-protocol! AVAssetReaderCaptionValidationHandling not bound -!missing-protocol! AVMetricEventStreamPublisher not bound -!missing-protocol! AVMetricEventStreamSubscriber not bound -!missing-protocol! AVPlayerItemIntegratedTimelineObserver not bound -!missing-protocol! AVPlayerItemRenderedLegibleOutputPushDelegate not bound -!missing-protocol-conformance! AVPlayerItem should conform to AVMetricEventStreamPublisher (defined in 'AVMetricEventStreamPublisher' category) -!missing-protocol-member! AVAssetDownloadDelegate::URLSession:assetDownloadTask:willDownloadToURL: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:externalProtectionStatusDidChangeForContentKey: not found -!missing-selector! +AVAssetReaderOutputCaptionAdaptor::assetReaderOutputCaptionAdaptorWithAssetReaderTrackOutput: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForAudioSampleRate:mediaSelectionOption:operatorType: not bound -!missing-selector! +AVAssetWriterInputCaptionAdaptor::assetWriterInputCaptionAdaptorWithAssetWriterInput: not bound -!missing-selector! +AVCaptionConversionValidator::captionConversionValidatorWithCaptions:timeRange:conversionSettings: not bound -!missing-selector! +AVCaptionFormatConformer::captionFormatConformerWithConversionSettings: not bound -!missing-selector! +AVCaptionRegion::appleITTBottomRegion not bound -!missing-selector! +AVCaptionRegion::appleITTLeftRegion not bound -!missing-selector! +AVCaptionRegion::appleITTRightRegion not bound -!missing-selector! +AVCaptionRegion::appleITTTopRegion not bound -!missing-selector! +AVCaptionRegion::subRipTextBottomRegion not bound -!missing-selector! +AVCaptureDevice::isBackgroundReplacementEnabled not bound -!missing-selector! +AVMetricEventStream::eventStream not bound -!missing-selector! AVAssetImageGenerator::dynamicRangePolicy not bound -!missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::assetReaderTrackOutput not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::captionsNotPresentInPreviousGroupsInCaptionGroup: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::initWithAssetReaderTrackOutput: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::nextCaptionGroup not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::setValidationDelegate: not bound -!missing-selector! AVAssetReaderOutputCaptionAdaptor::validationDelegate not bound -!missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound -!missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::appendCaption: not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::appendCaptionGroup: not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::assetWriterInput not bound -!missing-selector! AVAssetWriterInputCaptionAdaptor::initWithAssetWriterInput: not bound -!missing-selector! AVCaption::animation not bound -!missing-selector! AVCaption::backgroundColorAtIndex:range: not bound -!missing-selector! AVCaption::decorationAtIndex:range: not bound -!missing-selector! AVCaption::fontStyleAtIndex:range: not bound -!missing-selector! AVCaption::fontWeightAtIndex:range: not bound -!missing-selector! AVCaption::initWithText:timeRange: not bound -!missing-selector! AVCaption::region not bound -!missing-selector! AVCaption::rubyAtIndex:range: not bound -!missing-selector! AVCaption::text not bound -!missing-selector! AVCaption::textAlignment not bound -!missing-selector! AVCaption::textColorAtIndex:range: not bound -!missing-selector! AVCaption::textCombineAtIndex:range: not bound -!missing-selector! AVCaption::timeRange not bound -!missing-selector! AVCaptionConversionAdjustment::adjustmentType not bound -!missing-selector! AVCaptionConversionTimeRangeAdjustment::durationOffset not bound -!missing-selector! AVCaptionConversionTimeRangeAdjustment::startTimeOffset not bound -!missing-selector! AVCaptionConversionValidator::captions not bound -!missing-selector! AVCaptionConversionValidator::initWithCaptions:timeRange:conversionSettings: not bound -!missing-selector! AVCaptionConversionValidator::status not bound -!missing-selector! AVCaptionConversionValidator::stopValidating not bound -!missing-selector! AVCaptionConversionValidator::timeRange not bound -!missing-selector! AVCaptionConversionValidator::validateCaptionConversionWithWarningHandler: not bound -!missing-selector! AVCaptionConversionValidator::warnings not bound -!missing-selector! AVCaptionConversionWarning::adjustment not bound -!missing-selector! AVCaptionConversionWarning::rangeOfCaptions not bound -!missing-selector! AVCaptionConversionWarning::warningType not bound -!missing-selector! AVCaptionFormatConformer::conformedCaptionForCaption:error: not bound -!missing-selector! AVCaptionFormatConformer::conformsCaptionsToTimeRange not bound -!missing-selector! AVCaptionFormatConformer::initWithConversionSettings: not bound -!missing-selector! AVCaptionFormatConformer::setConformsCaptionsToTimeRange: not bound -!missing-selector! AVCaptionGroup::captions not bound -!missing-selector! AVCaptionGroup::initWithCaptions:timeRange: not bound -!missing-selector! AVCaptionGroup::initWithTimeRange: not bound -!missing-selector! AVCaptionGroup::timeRange not bound -!missing-selector! AVCaptionGrouper::addCaption: not bound -!missing-selector! AVCaptionGrouper::flushAddedCaptionsIntoGroupsUpToTime: not bound -!missing-selector! AVCaptionRegion::displayAlignment not bound -!missing-selector! AVCaptionRegion::encodeWithCoder: not bound -!missing-selector! AVCaptionRegion::identifier not bound -!missing-selector! AVCaptionRegion::isEqual: not bound -!missing-selector! AVCaptionRegion::mutableCopyWithZone: not bound -!missing-selector! AVCaptionRegion::origin not bound -!missing-selector! AVCaptionRegion::scroll not bound -!missing-selector! AVCaptionRegion::size not bound -!missing-selector! AVCaptionRegion::writingMode not bound -!missing-selector! AVCaptionRenderer::bounds not bound -!missing-selector! AVCaptionRenderer::captions not bound -!missing-selector! AVCaptionRenderer::captionSceneChangesInRange: not bound -!missing-selector! AVCaptionRenderer::renderInContext:forTime: not bound -!missing-selector! AVCaptionRenderer::setBounds: not bound -!missing-selector! AVCaptionRenderer::setCaptions: not bound -!missing-selector! AVCaptionRendererScene::hasActiveCaptions not bound -!missing-selector! AVCaptionRendererScene::needsPeriodicRefresh not bound -!missing-selector! AVCaptionRendererScene::timeRange not bound -!missing-selector! AVCaptionRuby::alignment not bound -!missing-selector! AVCaptionRuby::initWithText: not bound -!missing-selector! AVCaptionRuby::initWithText:position:alignment: not bound -!missing-selector! AVCaptionRuby::position not bound -!missing-selector! AVCaptionRuby::text not bound -!missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound -!missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound -!missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound -!missing-selector! AVCaptureDevice::spatialCaptureDiscomfortReasons not bound -!missing-selector! AVCaptureDeviceFormat::isAutoVideoFrameRateSupported not bound -!missing-selector! AVCaptureDeviceFormat::isBackgroundReplacementSupported not bound -!missing-selector! AVCaptureDeviceFormat::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForBackgroundReplacement not bound -!missing-selector! AVCaptureDeviceInput::isMultichannelAudioModeSupported: not bound -!missing-selector! AVCaptureDeviceInput::multichannelAudioMode not bound -!missing-selector! AVCaptureDeviceInput::setMultichannelAudioMode: not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureEnabled not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureMovieFileOutput::setSpatialVideoCaptureEnabled: not bound -!missing-selector! AVCapturePhoto::constantColorCenterWeightedMeanConfidenceLevel not bound -!missing-selector! AVCapturePhoto::constantColorConfidenceMap not bound -!missing-selector! AVCapturePhoto::isConstantColorFallbackPhoto not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorSupported not bound -!missing-selector! AVCapturePhotoOutput::isShutterSoundSuppressionSupported not bound -!missing-selector! AVCapturePhotoOutput::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorFallbackPhotoDeliveryEnabled not bound -!missing-selector! AVCapturePhotoSettings::isShutterSoundSuppressionEnabled not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorFallbackPhotoDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setShutterSoundSuppressionEnabled: not bound -!missing-selector! AVCaptureSession::configuresApplicationAudioSessionToMixWithOthers not bound -!missing-selector! AVCaptureSession::setConfiguresApplicationAudioSessionToMixWithOthers: not bound -!missing-selector! AVContentKey::externalContentProtectionStatus not bound -!missing-selector! AVContentKey::revoke not bound -!missing-selector! AVMetricContentKeyRequestEvent::contentKeySpecifier not bound -!missing-selector! AVMetricContentKeyRequestEvent::isClientInitiated not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaType not bound -!missing-selector! AVMetricErrorEvent::didRecover not bound -!missing-selector! AVMetricErrorEvent::error not bound -!missing-selector! AVMetricEvent::date not bound -!missing-selector! AVMetricEvent::mediaTime not bound -!missing-selector! AVMetricEvent::sessionID not bound -!missing-selector! AVMetricEventStream::addPublisher: not bound -!missing-selector! AVMetricEventStream::setSubscriber:queue: not bound -!missing-selector! AVMetricEventStream::subscribeToAllMetricEvents not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvent: not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvents: not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::byteRange not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::isMapSegment not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::url not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::isMultivariantPlaylist not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::byteRange not bound -!missing-selector! AVMetricMediaResourceRequestEvent::errorEvent not bound -!missing-selector! AVMetricMediaResourceRequestEvent::networkTransactionMetrics not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::serverAddress not bound -!missing-selector! AVMetricMediaResourceRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::wasReadFromCache not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::contentKeyRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::mediaSegmentRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::playlistRequestEvents not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::timeTaken not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::variant not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::errorEvent not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::mediaResourceRequestCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::playbackDuration not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::recoverableErrorCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::stallCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentInInitialStartup not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentRecoveringFromStall not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedAverageBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedPeakBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::variantSwitchCount not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::previousRate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::rate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::variant not bound -!missing-selector! AVMetricPlayerItemSeekDidCompleteEvent::didSeekInBuffer not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::didSucceed not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::toVariant not bound -!missing-selector! AVMutableCaption::animation not bound -!missing-selector! AVMutableCaption::region not bound -!missing-selector! AVMutableCaption::removeBackgroundColorInRange: not bound -!missing-selector! AVMutableCaption::removeDecorationInRange: not bound -!missing-selector! AVMutableCaption::removeFontStyleInRange: not bound -!missing-selector! AVMutableCaption::removeFontWeightInRange: not bound -!missing-selector! AVMutableCaption::removeRubyInRange: not bound -!missing-selector! AVMutableCaption::removeTextColorInRange: not bound -!missing-selector! AVMutableCaption::removeTextCombineInRange: not bound -!missing-selector! AVMutableCaption::setAVMutableCaption: not bound -!missing-selector! AVMutableCaption::setBackgroundColor:inRange: not bound -!missing-selector! AVMutableCaption::setDecoration:inRange: not bound -!missing-selector! AVMutableCaption::setFontStyle:inRange: not bound -!missing-selector! AVMutableCaption::setFontWeight:inRange: not bound -!missing-selector! AVMutableCaption::setRuby:inRange: not bound -!missing-selector! AVMutableCaption::setText: not bound -!missing-selector! AVMutableCaption::setTextAlignment: not bound -!missing-selector! AVMutableCaption::setTextColor:inRange: not bound -!missing-selector! AVMutableCaption::setTextCombine:inRange: not bound -!missing-selector! AVMutableCaption::setTimeRange: not bound -!missing-selector! AVMutableCaption::text not bound -!missing-selector! AVMutableCaption::textAlignment not bound -!missing-selector! AVMutableCaption::timeRange not bound -!missing-selector! AVMutableCaptionRegion::displayAlignment not bound -!missing-selector! AVMutableCaptionRegion::init not bound -!missing-selector! AVMutableCaptionRegion::initWithIdentifier: not bound -!missing-selector! AVMutableCaptionRegion::origin not bound -!missing-selector! AVMutableCaptionRegion::scroll not bound -!missing-selector! AVMutableCaptionRegion::setDisplayAlignment: not bound -!missing-selector! AVMutableCaptionRegion::setOrigin: not bound -!missing-selector! AVMutableCaptionRegion::setScroll: not bound -!missing-selector! AVMutableCaptionRegion::setSize: not bound -!missing-selector! AVMutableCaptionRegion::setWritingMode: not bound -!missing-selector! AVMutableCaptionRegion::size not bound -!missing-selector! AVMutableCaptionRegion::writingMode not bound -!missing-selector! AVPlayerInterstitialEvent::contentMayVary not bound -!missing-selector! AVPlayerInterstitialEvent::plannedDuration not bound -!missing-selector! AVPlayerInterstitialEvent::setContentMayVary: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlannedDuration: not bound -!missing-selector! AVPlayerInterstitialEvent::setSupplementsPrimaryContent: not bound -!missing-selector! AVPlayerInterstitialEvent::setTimelineOccupancy: not bound -!missing-selector! AVPlayerInterstitialEvent::supplementsPrimaryContent not bound -!missing-selector! AVPlayerInterstitialEvent::timelineOccupancy not bound -!missing-selector! AVPlayerItem::integratedTimeline not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addBoundaryTimeObserverForSegment:offsetsIntoSegment:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addPeriodicTimeObserverForInterval:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentSnapshot not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimeline::removeTimeObserver: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToDate:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToTime:toleranceBefore:toleranceAfter:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentSegment not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::duration not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::mapTime:toSegment:atSegmentOffset: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::segments not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::advanceIntervalForDelegateInvocation not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::delegate not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::delegateQueue not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::initWithVideoDisplaySize: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setAdvanceIntervalForDelegateInvocation: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setDelegate:queue: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setVideoDisplaySize: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::videoDisplaySize not bound -!missing-selector! AVPlayerItemSegment::interstitialEvent not bound -!missing-selector! AVPlayerItemSegment::loadedTimeRanges not bound -!missing-selector! AVPlayerItemSegment::segmentType not bound -!missing-selector! AVPlayerItemSegment::startDate not bound -!missing-selector! AVPlayerItemSegment::timeMapping not bound -!missing-selector! AVPlayerVideoOutputConfiguration::preferredTransform not bound -!missing-selector! AVRenderedCaptionImage::pixelBuffer not bound -!missing-selector! AVRenderedCaptionImage::position not bound -!missing-enum! AVExternalContentProtectionStatus not bound -!missing-field! AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification not bound -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:externalProtectionStatusDidChangeForContentKey: not found -!missing-selector! AVContentKey::externalContentProtectionStatus not bound -!missing-selector! AVContentKey::revoke not bound -!missing-selector! AVSampleBufferDisplayLayer::isReadyForDisplay not bound -!missing-selector! AVSampleBufferVideoRenderer::copyDisplayedPixelBuffer not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMinimumUpcomingSampleBufferPresentationTime: not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes not bound -!missing-selector! AVSampleBufferVideoRenderer::loadVideoPerformanceMetricsWithCompletionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::resetUpcomingSampleBufferPresentationTimeExpectations not bound -!missing-selector! AVVideoComposition::isValidForTracks:assetDuration:timeRange:validationDelegate: not bound -!missing-selector! AVVideoOutputSpecification::defaultOutputSettings not bound -!missing-selector! AVVideoOutputSpecification::setDefaultOutputSettings: not bound -!missing-selector! AVVideoOutputSpecification::setOutputSettings:forTagCollection: not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfCorruptedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfDroppedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfFramesDisplayedUsingOptimizedCompositing not bound -!missing-selector! AVVideoPerformanceMetrics::totalAccumulatedFrameDelay not bound -!missing-selector! AVVideoPerformanceMetrics::totalNumberOfFrames not bound -!missing-type! AVAssetReaderOutputCaptionAdaptor not bound -!missing-type! AVAssetWriterInputCaptionAdaptor not bound -!missing-type! AVCaption not bound -!missing-type! AVCaptionConversionAdjustment not bound -!missing-type! AVCaptionConversionTimeRangeAdjustment not bound -!missing-type! AVCaptionConversionValidator not bound -!missing-type! AVCaptionConversionWarning not bound -!missing-type! AVCaptionFormatConformer not bound -!missing-type! AVCaptionGroup not bound -!missing-type! AVCaptionGrouper not bound -!missing-type! AVCaptionRegion not bound -!missing-type! AVCaptionRenderer not bound -!missing-type! AVCaptionRendererScene not bound -!missing-type! AVCaptionRuby not bound -!missing-type! AVMetricContentKeyRequestEvent not bound -!missing-type! AVMetricErrorEvent not bound -!missing-type! AVMetricEvent not bound -!missing-type! AVMetricEventStream not bound -!missing-type! AVMetricHLSMediaSegmentRequestEvent not bound -!missing-type! AVMetricHLSPlaylistRequestEvent not bound -!missing-type! AVMetricMediaResourceRequestEvent not bound -!missing-type! AVMetricPlayerItemInitialLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemPlaybackSummaryEvent not bound -!missing-type! AVMetricPlayerItemRateChangeEvent not bound -!missing-type! AVMetricPlayerItemSeekDidCompleteEvent not bound -!missing-type! AVMetricPlayerItemSeekEvent not bound -!missing-type! AVMetricPlayerItemStallEvent not bound -!missing-type! AVMetricPlayerItemVariantSwitchEvent not bound -!missing-type! AVMutableCaption not bound -!missing-type! AVMutableCaptionRegion not bound -!missing-type! AVPlayerItemIntegratedTimeline not bound -!missing-type! AVPlayerItemIntegratedTimelineSnapshot not bound -!missing-type! AVPlayerItemRenderedLegibleOutput not bound -!missing-type! AVPlayerItemSegment not bound -!missing-type! AVRenderedCaptionImage not bound -!missing-type! AVVideoPerformanceMetrics not bound -!missing-field! AVMediaTypeAuxiliaryPicture not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::indexFileURL not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::toVariant not bound -!missing-type! AVMetricPlayerItemVariantSwitchStartEvent not bound -!missing-type! AVVideoPerformanceMetrics not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionConflict = -11887 not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionDisabled = -11886 not bound -!missing-selector! AVMutableComposition::insertTimeRange:ofAsset:atTime:completionHandler: not bound -!missing-field! AVMetadataIdentifierQuickTimeMetadataFullFrameRatePlaybackIntent not bound -!missing-field! AVMetadataQuickTimeMetadataKeyFullFrameRatePlaybackIntent not bound -!missing-field! AVVideoCodecTypeJPEGXL not bound -!missing-protocol! AVCaptureSessionControlsDelegate not bound -!missing-selector! AVCaptureControl::isEnabled not bound -!missing-selector! AVCaptureControl::setEnabled: not bound -!missing-selector! AVCaptureDevice::displayVideoZoomFactorMultiplier not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedExposureBiasRange not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedVideoZoomRange not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalEnabled not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalSupported not bound -!missing-selector! AVCaptureDeviceInput::setWindNoiseRemovalEnabled: not bound -!missing-selector! AVCaptureIndexPicker::accessibilityIdentifier not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:localizedIndexTitles: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes:localizedTitleTransform: not bound -!missing-selector! AVCaptureIndexPicker::localizedIndexTitles not bound -!missing-selector! AVCaptureIndexPicker::localizedTitle not bound -!missing-selector! AVCaptureIndexPicker::numberOfIndexes not bound -!missing-selector! AVCaptureIndexPicker::selectedIndex not bound -!missing-selector! AVCaptureIndexPicker::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureIndexPicker::setActionQueue:action: not bound -!missing-selector! AVCaptureIndexPicker::setSelectedIndex: not bound -!missing-selector! AVCaptureIndexPicker::symbolName not bound -!missing-selector! AVCapturePhotoOutput::availableRawPhotoCodecTypes not bound -!missing-selector! AVCapturePhotoOutput::supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType: not bound -!missing-selector! AVCapturePhotoSettings::rawFileFormat not bound -!missing-selector! AVCapturePhotoSettings::setRawFileFormat: not bound -!missing-selector! AVCaptureSession::addControl: not bound -!missing-selector! AVCaptureSession::canAddControl: not bound -!missing-selector! AVCaptureSession::controls not bound -!missing-selector! AVCaptureSession::controlsDelegate not bound -!missing-selector! AVCaptureSession::controlsDelegateCallbackQueue not bound -!missing-selector! AVCaptureSession::maxControlsCount not bound -!missing-selector! AVCaptureSession::removeControl: not bound -!missing-selector! AVCaptureSession::setControlsDelegate:queue: not bound -!missing-selector! AVCaptureSession::supportsControls not bound -!missing-selector! AVCaptureSlider::accessibilityIdentifier not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue:step: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:values: not bound -!missing-selector! AVCaptureSlider::localizedTitle not bound -!missing-selector! AVCaptureSlider::localizedValueFormat not bound -!missing-selector! AVCaptureSlider::prominentValues not bound -!missing-selector! AVCaptureSlider::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureSlider::setActionQueue:action: not bound -!missing-selector! AVCaptureSlider::setLocalizedValueFormat: not bound -!missing-selector! AVCaptureSlider::setProminentValues: not bound -!missing-selector! AVCaptureSlider::setValue: not bound -!missing-selector! AVCaptureSlider::symbolName not bound -!missing-selector! AVCaptureSlider::value not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice:action: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice:action: not bound -!missing-selector! AVExposureBiasRange::containsExposureBias: not bound -!missing-selector! AVExposureBiasRange::maxExposureBias not bound -!missing-selector! AVExposureBiasRange::minExposureBias not bound -!missing-type! AVCaptureControl not bound -!missing-type! AVCaptureIndexPicker not bound -!missing-type! AVCaptureSlider not bound -!missing-type! AVCaptureSystemExposureBiasSlider not bound -!missing-type! AVCaptureSystemZoomSlider not bound -!missing-type! AVExposureBiasRange not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVKit.ignore deleted file mode 100644 index 05f74c4813ea..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-AVKit.ignore +++ /dev/null @@ -1 +0,0 @@ -## not available on iOS - but we don't put availability attributes on error codes diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MLCompute.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-MLCompute.todo deleted file mode 100644 index d14eb75bf584..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-MLCompute.todo +++ /dev/null @@ -1,55 +0,0 @@ -!deprecated-attribute-missing! MLCActivationDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCActivationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamWOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCArithmeticLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCBatchNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCComparisonLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConcatenationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDevice missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDropoutLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCFullyConnectedLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGatherLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGramMatrixLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGroupNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInferenceGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInstanceNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayerNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizerDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPaddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPlatform missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReductionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReshapeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCScatterLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSelectionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSGDOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSliceLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSoftmaxLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSplitLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorData missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorParameter missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTrainingGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTransposeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCUpsampleLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorOptimizerDeviceData missing a [Deprecated] attribute diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Matter.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-Matter.todo deleted file mode 100644 index 9589b1e63c27..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-Matter.todo +++ /dev/null @@ -1,40 +0,0 @@ -!missing-enum! MTRColorControlColorCapabilitiesBitmap not bound -!missing-enum! MTRColorControlDirection not bound -!missing-enum! MTRColorControlDriftCompensation not bound -!missing-enum! MTRColorControlEnhancedColorMode not bound -!missing-enum! MTRColorControlMoveMode not bound -!missing-enum! MTRColorControlOptionsBitmap not bound -!missing-enum! MTRColorControlStepMode not bound -!missing-enum! MTRColorControlUpdateFlagsBitmap not bound -!missing-enum! MTRDeviceTypeIDType not bound -!missing-field! MTRDeviceControllerRegistrationControllerContextKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDsKey not bound -!missing-pinvoke! MTREventNameForID is not bound -!missing-pinvoke! MTRRequestCommandNameForID is not bound -!missing-pinvoke! MTRResponseCommandNameForID is not bound -!missing-protocol! MTRXPCClientProtocol not bound -!missing-protocol! MTRXPCClientProtocol_MTRDevice not bound -!missing-protocol! MTRXPCClientProtocol_MTRDeviceController not bound -!missing-protocol! MTRXPCServerProtocol not bound -!missing-protocol! MTRXPCServerProtocol_MTRDevice not bound -!missing-protocol! MTRXPCServerProtocol_MTRDeviceController not bound -!missing-selector! +MTRDeviceType::deviceTypeForID: not bound -!missing-selector! MTRCertificateInfo::publicKeyData not bound -!missing-selector! MTRDevice::readAttributePaths: not bound -!missing-selector! MTRDeviceController::addDeviceControllerDelegate:queue: not bound -!missing-selector! MTRDeviceController::isSuspended not bound -!missing-selector! MTRDeviceController::removeDeviceControllerDelegate: not bound -!missing-selector! MTRDeviceController::resume not bound -!missing-selector! MTRDeviceController::suspend not bound -!missing-selector! MTRDeviceControllerAbstractParameters::setStartSuspended: not bound -!missing-selector! MTRDeviceControllerAbstractParameters::startSuspended not bound -!missing-selector! MTRDeviceControllerExternalCertificateParameters::rootCertificate not bound -!missing-selector! MTRDeviceType::id not bound -!missing-selector! MTRDeviceType::isUtility not bound -!missing-selector! MTRDeviceType::name not bound -!missing-selector! MTRXPCDeviceControllerParameters::initWithXPConnectionBlock:uniqueIdentifier: not bound -!missing-selector! MTRXPCDeviceControllerParameters::uniqueIdentifier not bound -!missing-selector! MTRXPCDeviceControllerParameters::xpcConnectionBlock not bound -!missing-type! MTRDeviceType not bound -!missing-type! MTRXPCDeviceControllerParameters not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-OSLog.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-OSLog.todo deleted file mode 100644 index bc0bdcfbec57..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-OSLog.todo +++ /dev/null @@ -1 +0,0 @@ -!extra-enum-value! Managed value 0 for OSLogStoreScope.System is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-ReplayKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-ReplayKit.ignore new file mode 100644 index 000000000000..c249320a6ceb --- /dev/null +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-ReplayKit.ignore @@ -0,0 +1,4 @@ +# SCStreamErrorDomain is from ScreenCaptureKit, but only macOS and Mac Catalyst. +# However, Apple seems to also have added it to ReplayKit for iOS and tvOS, which is why xtro detects it as such. +# It doesn't seem useful though in ReplayKit, so just skip binding it. +!missing-field! SCStreamErrorDomain not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-ReplayKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-ReplayKit.todo deleted file mode 100644 index 4ff284e5ada1..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-ReplayKit.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-field! SCStreamErrorDomain not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore index 7a4d4f38e100..5fa5783bcd48 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/iOS-UIKit.ignore @@ -147,52 +147,9 @@ !extra-null-allowed! 'UIKit.UIView UIKit.UIScreen::SnapshotView(System.Boolean)' has a extraneous [NullAllowed] on return type # Initial result from new rule missing-null-allowed -!missing-null-allowed! 'CoreAnimation.CADisplayLink UIKit.UIScreen::CreateDisplayLink(Foundation.NSObject,ObjCRuntime.Selector)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSArray Foundation.NSBundle::LoadNib(System.String,Foundation.NSObject,Foundation.NSDictionary)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIButton::get_CurrentAttributedTitle()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIButton::GetAttributedTitle(UIKit.UIControlState)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIPickerViewDelegate::GetAttributedTitle(UIKit.UIPickerView,System.IntPtr,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSData UIKit.UIPasteboard::DataForPasteboardType(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetDataForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetDataForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetValuesForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'Foundation.NSData[] UIKit.UIPasteboard::GetValuesForPasteboardType(System.String,Foundation.NSIndexSet)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIBarItem::_GetTitleTextAttributes(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedDecorationIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedSupplementaryIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIDocument::GetFileAttributesToWrite(Foundation.NSUrl,UIKit.UIDocumentSaveOperation,Foundation.NSError&)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIMotionEffect::ComputeKeyPathsAndRelativeValues(UIKit.UIOffset)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UISearchBar::_GetScopeBarButtonTitleTextAttributes(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewFocusUpdateContext::get_NextFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewFocusUpdateContext::get_PreviouslyFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewDelegate::WillDeselectRow(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewDelegate::WillSelectRow(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewFocusUpdateContext::get_NextFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewFocusUpdateContext::get_PreviouslyFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedItemIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexSet UIKit.UIPasteboard::ItemSetWithPasteboardTypes(System.String[])' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSNumber[] UIKit.UIImagePickerController::AvailableCaptureModesForCameraDevice(UIKit.UIImagePickerControllerCameraDevice)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemProvider::get_PlaceholderItem()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIActivityItemSource::GetItemForActivity(UIKit.UIActivityViewController,Foundation.NSString)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIDocument::ContentsForType(System.String,Foundation.NSError&)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIFontDescriptor::GetObject(Foundation.NSString)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIManagedDocument::AdditionalContent(Foundation.NSUrl,Foundation.NSError&)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIPasteboard::GetValue(System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIResponder::GetTargetForAction(ObjCRuntime.Selector,Foundation.NSObject)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject[] UIKit.UICollisionBehavior::get_BoundaryIdentifiers()' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSProgress UIKit.UIDocument::get_Progress()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::get_AllTouches()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForGestureRecognizer(UIKit.UIGestureRecognizer)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForView(UIKit.UIView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForWindow(UIKit.UIWindow)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UIActivity::get_Type()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UIActivityItemProvider::get_ActivityType()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UICollectionReusableView::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UIResponder::get_TextInputContextIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UITableViewCell::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UITableViewHeaderFooterView::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUuid UIKit.UIDevice::get_IdentifierForVendor()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ObjCRuntime.Class UIKit.UIStateRestoring::get_ObjectRestorationClass()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Boolean UIKit.UIApplicationDelegate::FinishedLaunching(UIKit.UIApplication,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean UIKit.UIApplicationDelegate::WillFinishLaunching(UIKit.UIApplication,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean UIKit.UIManagedDocument::ConfigurePersistentStoreCoordinator(Foundation.NSUrl,System.String,System.String,Foundation.NSDictionary,Foundation.NSError)' is missing an [NullAllowed] on parameter #2 @@ -206,32 +163,6 @@ !missing-null-allowed! 'System.Double UIKit.UIViewControllerAnimatedTransitioning::TransitionDuration(UIKit.IUIViewControllerContextTransitioning)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.IntPtr UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.IntPtr UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.String UIKit.UIActivity::get_Title()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIAlertAction::get_Title()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIButton::get_CurrentTitle()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIButton::Title(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UICollectionViewLayoutAttributes::get_RepresentedElementKind()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIDocument::get_FileType()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIDocument::get_SavingFileType()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPickerViewAccessibilityDelegate::GetAccessibilityHint(UIKit.UIPickerView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPickerViewAccessibilityDelegate::GetAccessibilityLabel(UIKit.UIPickerView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPickerViewDelegate::GetTitle(UIKit.UIPickerView,System.IntPtr,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPrinter::get_DisplayLocation()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIPrinter::get_MakeAndModel()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIScrollViewAccessibilityDelegate::GetAccessibilityScrollStatus(UIKit.UIScrollView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UISegmentedControl::TitleAt(System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDataSource::TitleForFooter(UIKit.UITableView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDataSource::TitleForHeader(UIKit.UITableView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDelegate::TitleForDeleteConfirmation(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextDocumentProxy::get_DocumentContextAfterInput()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextDocumentProxy::get_DocumentContextBeforeInput()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextInputMode::get_PrimaryLanguage()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIControl::GetActions(Foundation.NSObject,UIKit.UIControlEvent)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIDictationPhrase::get_AlternativeInterpretations()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIImagePickerController::AvailableMediaTypes(UIKit.UIImagePickerControllerSourceType)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITableViewDataSource::SectionIndexTitles(UIKit.UITableView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITextChecker::CompletionsForPartialWordRange(Foundation.NSRange,System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITextChecker::GuessesForWordRange(Foundation.NSRange,System.String,System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Void Foundation.NSObject::set_AccessibilityAttributedUserInputLabels(Foundation.NSAttributedString[])' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Foundation.NSObject::set_AccessibilityUserInputLabels(System.String[])' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void UIKit.UIAccessibilityCustomAction::.ctor(System.String,Foundation.NSObject,ObjCRuntime.Selector)' is missing an [NullAllowed] on parameter #1 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore index bbb62661b2c5..3e470129d995 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.ignore @@ -1,10 +1,6 @@ ## from iOS 4.0 to 5.1 -## iOS Only. Available on OSX but probably private selector mostly decorated with NS_AVAILABLE_IOS -!missing-field! AVMediaCharacteristicEasyToRead not bound -!missing-field! AVVideoDecompressionPropertiesKey not bound - ## unsorted !unknown-native-enum! AVCaptureAutoFocusRangeRestriction bound !unknown-native-enum! AVCaptureLensStabilizationStatus bound @@ -27,16 +23,24 @@ !missing-field! AVMetadataIdentifierQuickTimeMetadataSpatialOverCaptureQualityScoringVersion not bound -# This fields are use for a notifications that returns a AVAudioSessionRouteDescription -# which cannot be found on macOS - # not applicable to macOS !extra-enum-value! Managed value -11818 for AVError.SessionWasInterrupted not found in native headers !extra-enum-value! Managed value -11819 for AVError.MediaServicesWereReset not found in native headers !extra-enum-value! Managed value -11837 for AVError.DeviceIsNotAvailableInBackground not found in native headers !extra-enum-value! Managed value -11847 for AVError.OperationInterrupted not found in native headers -## https://github.com/xamarin/xamarin-macios/issues/16229 prevents crashing instead of return null -## so these selectors have been bound manually -!missing-selector! AVAudioPlayer::initWithContentsOfURL:error: not bound -!missing-selector! AVAudioPlayer::initWithData:error: not bound +# There are two enum values with the same value, one available on macOS and the other one isn't - xtro reports an error about the one that is available, because xtro incorrectly maps the value to the enum value that isn't. +!extra-enum-value! Managed value 1 for AVAudioSessionRouteSharingPolicy.LongFormAudio is available for the current platform while the value in the native header is not + +# Removed in XAMCORE_5_0 +!extra-enum-value! Managed value 1684369017 for AVAudioSessionRecordPermission.Denied is available for the current platform while the value in the native header is not +!extra-enum-value! Managed value 1735552628 for AVAudioSessionRecordPermission.Granted is available for the current platform while the value in the native header is not +!extra-enum-value! Managed value 1970168948 for AVAudioSessionRecordPermission.Undetermined is available for the current platform while the value in the native header is not +!unknown-field! AVAudioSessionInterruptionNotification bound +!unknown-field! AVAudioSessionInterruptionOptionKey bound +!unknown-field! AVAudioSessionInterruptionTypeKey bound +!unknown-field! AVAudioSessionMediaServicesWereLostNotification bound +!unknown-field! AVAudioSessionMediaServicesWereResetNotification bound + +# isEqual: is already exposed from NSObject, no need to expose again +!missing-selector! AVCaptionRegion::isEqual: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo deleted file mode 100644 index aa0ee41af052..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo +++ /dev/null @@ -1,770 +0,0 @@ -!extra-enum-value! Managed value 1 for AVAudioSessionRouteSharingPolicy.LongForm is available for the current platform while the value in the native header is not -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsBestMatchingPreferredLanguages: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::mediaSelectionGroupForMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::trackWithTrackID: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::unusedTrackID missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::associatedTracksOfType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::samplePresentationTimeForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::segmentForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVMutableComposition::insertTimeRange:ofAsset:atTime:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVURLAsset::compatibleTrackForCompositionTrack: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVVideoComposition::isValidForAsset:timeRange:validationDelegate: missing a [Deprecated] attribute -!missing-enum! AVAssetTrackGroupOutputHandling not bound -!missing-enum! AVCapturePhotoQualityPrioritization not bound -!missing-enum! AVMIDIControlChangeMessageType not bound -!missing-enum! AVMIDIMetaEventType not bound -!missing-enum! AVSpeechSynthesisMarkerMark not bound -!missing-enum-value! AVError native value AVErrorAirPlayReceiverTemporarilyUnavailable = -11882 not bound -!missing-enum-value! AVError native value AVErrorFailedToLoadSampleData = -11881 not bound -!missing-enum-value! AVError native value AVErrorInvalidSampleCursor = -11880 not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoMultiviewVideo not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoVideo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyAlbum not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyApproximateDurationInSeconds not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyArtist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyChannelLayout not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComments not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComposer not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyCopyright not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyEncodingApplication not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyGenre not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyISRC not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyKeySignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyLyricist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyNominalBitRate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyRecordedDate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceBitDepth not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceEncoder not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySubTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTempo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTimeSignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTrackNumber not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyYear not bound -!missing-field! AVCaptureDeviceTypeDeskViewCamera not bound -!missing-field! AVExtendedNoteOnEventDefaultInstrument not bound -!missing-field! AVPlayerInterstitialEventJoinCue not bound -!missing-field! AVPlayerInterstitialEventLeaveCue not bound -!missing-field! AVPlayerInterstitialEventNoCue not bound -!missing-field! AVURLAssetHTTPUserAgentKey not bound -!missing-field! AVURLAssetPrimarySessionIdentifierKey not bound -!missing-field! AVVideoTransferFunction_Linear not bound -!missing-protocol! AVCaptureMetadataOutputObjectsDelegate not bound -!missing-protocol-conformance! AVPlayerInterstitialEvent should conform to NSCopying -!missing-selector! +AVAssetPlaybackAssistant::assetPlaybackAssistantWithAsset: not bound -!missing-selector! +AVCaptureDevice::isStudioLightEnabled not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:prototypeInstruction:completionHandler: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time: not bound -!missing-selector! +AVSpeechSynthesisProviderVoice::updateSpeechVoices not bound -!missing-selector! +AVSpeechUtterance::speechUtteranceWithSSMLRepresentation: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! AVAssetExportSession::audioTrackGroupHandling not bound -!missing-selector! AVAssetExportSession::setAudioTrackGroupHandling: not bound -!missing-selector! AVAssetPlaybackAssistant::loadPlaybackConfigurationOptionsWithCompletionHandler: not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::isEntireLengthAvailableOnDemand not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::setEntireLengthAvailableOnDemand: not bound -!missing-selector! AVAudioEngine::connectMIDI:to:format:eventListBlock: not bound -!missing-selector! AVAudioEngine::connectMIDI:toNodes:format:eventListBlock: not bound -!missing-selector! AVAudioSequencer::createAndAppendTrack not bound -!missing-selector! AVAudioSequencer::removeTrack: not bound -!missing-selector! AVAudioSequencer::reverseEvents not bound -!missing-selector! AVAudioSequencer::setUserCallback: not bound -!missing-selector! AVAudioUnitMIDIInstrument::sendMIDIEventList: not bound -!missing-selector! AVAUPresetEvent::element not bound -!missing-selector! AVAUPresetEvent::initWithScope:element:dictionary: not bound -!missing-selector! AVAUPresetEvent::presetDictionary not bound -!missing-selector! AVAUPresetEvent::scope not bound -!missing-selector! AVAUPresetEvent::setElement: not bound -!missing-selector! AVAUPresetEvent::setScope: not bound -!missing-selector! AVCaptionRegion::isEqual: not bound -!missing-selector! AVCaptureDevice::companionDeskViewCamera not bound -!missing-selector! AVCaptureDevice::isContinuityCamera not bound -!missing-selector! AVCaptureDevice::isStudioLightActive not bound -!missing-selector! AVCaptureDeviceFormat::isStudioLightSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForStudioLight not bound -!missing-selector! AVCaptureMetadataOutput::availableMetadataObjectTypes not bound -!missing-selector! AVCaptureMetadataOutput::init not bound -!missing-selector! AVCaptureMetadataOutput::metadataObjectsCallbackQueue not bound -!missing-selector! AVCaptureMetadataOutput::metadataObjectsDelegate not bound -!missing-selector! AVCaptureMetadataOutput::metadataObjectTypes not bound -!missing-selector! AVCaptureMetadataOutput::rectOfInterest not bound -!missing-selector! AVCaptureMetadataOutput::setMetadataObjectsDelegate:queue: not bound -!missing-selector! AVCaptureMetadataOutput::setMetadataObjectTypes: not bound -!missing-selector! AVCaptureMetadataOutput::setRectOfInterest: not bound -!missing-selector! AVCapturePhotoOutput::maxPhotoQualityPrioritization not bound -!missing-selector! AVCapturePhotoOutput::setMaxPhotoQualityPrioritization: not bound -!missing-selector! AVCapturePhotoOutput::supportedFlashModes not bound -!missing-selector! AVCapturePhotoSettings::photoQualityPrioritization not bound -!missing-selector! AVCapturePhotoSettings::setPhotoQualityPrioritization: not bound -!missing-selector! AVComposition::chapterMetadataGroupsBestMatchingPreferredLanguages: not bound -!missing-selector! AVComposition::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: not bound -!missing-selector! AVComposition::mediaSelectionGroupForMediaCharacteristic: not bound -!missing-selector! AVComposition::metadataForFormat: not bound -!missing-selector! AVComposition::unusedTrackID not bound -!missing-selector! AVCompositionTrack::associatedTracksOfType: not bound -!missing-selector! AVCompositionTrack::hasMediaCharacteristic: not bound -!missing-selector! AVCompositionTrack::metadataForFormat: not bound -!missing-selector! AVCompositionTrack::samplePresentationTimeForTrackTime: not bound -!missing-selector! AVExtendedNoteOnEvent::duration not bound -!missing-selector! AVExtendedNoteOnEvent::groupID not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:instrumentID:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::instrumentID not bound -!missing-selector! AVExtendedNoteOnEvent::midiNote not bound -!missing-selector! AVExtendedNoteOnEvent::setDuration: not bound -!missing-selector! AVExtendedNoteOnEvent::setGroupID: not bound -!missing-selector! AVExtendedNoteOnEvent::setInstrumentID: not bound -!missing-selector! AVExtendedNoteOnEvent::setMidiNote: not bound -!missing-selector! AVExtendedNoteOnEvent::setVelocity: not bound -!missing-selector! AVExtendedNoteOnEvent::velocity not bound -!missing-selector! AVExtendedTempoEvent::initWithTempo: not bound -!missing-selector! AVExtendedTempoEvent::setTempo: not bound -!missing-selector! AVExtendedTempoEvent::tempo not bound -!missing-selector! AVMIDIChannelEvent::channel not bound -!missing-selector! AVMIDIChannelEvent::setChannel: not bound -!missing-selector! AVMIDIChannelPressureEvent::initWithChannel:pressure: not bound -!missing-selector! AVMIDIChannelPressureEvent::pressure not bound -!missing-selector! AVMIDIChannelPressureEvent::setPressure: not bound -!missing-selector! AVMIDIControlChangeEvent::initWithChannel:messageType:value: not bound -!missing-selector! AVMIDIControlChangeEvent::messageType not bound -!missing-selector! AVMIDIControlChangeEvent::value not bound -!missing-selector! AVMIDIMetaEvent::initWithType:data: not bound -!missing-selector! AVMIDIMetaEvent::type not bound -!missing-selector! AVMIDINoteEvent::channel not bound -!missing-selector! AVMIDINoteEvent::duration not bound -!missing-selector! AVMIDINoteEvent::initWithChannel:key:velocity:duration: not bound -!missing-selector! AVMIDINoteEvent::key not bound -!missing-selector! AVMIDINoteEvent::setChannel: not bound -!missing-selector! AVMIDINoteEvent::setDuration: not bound -!missing-selector! AVMIDINoteEvent::setKey: not bound -!missing-selector! AVMIDINoteEvent::setVelocity: not bound -!missing-selector! AVMIDINoteEvent::velocity not bound -!missing-selector! AVMIDIPitchBendEvent::initWithChannel:value: not bound -!missing-selector! AVMIDIPitchBendEvent::setValue: not bound -!missing-selector! AVMIDIPitchBendEvent::value not bound -!missing-selector! AVMIDIPolyPressureEvent::initWithChannel:key:pressure: not bound -!missing-selector! AVMIDIPolyPressureEvent::key not bound -!missing-selector! AVMIDIPolyPressureEvent::pressure not bound -!missing-selector! AVMIDIPolyPressureEvent::setKey: not bound -!missing-selector! AVMIDIPolyPressureEvent::setPressure: not bound -!missing-selector! AVMIDIProgramChangeEvent::initWithChannel:programNumber: not bound -!missing-selector! AVMIDIProgramChangeEvent::programNumber not bound -!missing-selector! AVMIDIProgramChangeEvent::setProgramNumber: not bound -!missing-selector! AVMIDISysexEvent::initWithData: not bound -!missing-selector! AVMIDISysexEvent::sizeInBytes not bound -!missing-selector! AVMusicTrack::addEvent:atBeat: not bound -!missing-selector! AVMusicTrack::clearEventsInRange: not bound -!missing-selector! AVMusicTrack::copyAndMergeEventsInRange:fromTrack:mergeAtBeat: not bound -!missing-selector! AVMusicTrack::copyEventsInRange:fromTrack:insertAtBeat: not bound -!missing-selector! AVMusicTrack::cutEventsInRange: not bound -!missing-selector! AVMusicTrack::enumerateEventsInRange:usingBlock: not bound -!missing-selector! AVMusicTrack::moveEventsInRange:byAmount: not bound -!missing-selector! AVMusicTrack::setUsesAutomatedParameters: not bound -!missing-selector! AVMusicTrack::usesAutomatedParameters not bound -!missing-selector! AVMusicUserEvent::initWithData: not bound -!missing-selector! AVMusicUserEvent::sizeInBytes not bound -!missing-selector! AVMutableMovie::chapterMetadataGroupsBestMatchingPreferredLanguages: not bound -!missing-selector! AVMutableMovie::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: not bound -!missing-selector! AVMutableMovie::mediaSelectionGroupForMediaCharacteristic: not bound -!missing-selector! AVMutableMovie::metadataForFormat: not bound -!missing-selector! AVMutableMovie::unusedTrackID not bound -!missing-selector! AVMutableMovieTrack::associatedTracksOfType: not bound -!missing-selector! AVMutableMovieTrack::hasMediaCharacteristic: not bound -!missing-selector! AVMutableMovieTrack::metadataForFormat: not bound -!missing-selector! AVMutableMovieTrack::samplePresentationTimeForTrackTime: not bound -!missing-selector! AVMutableMovieTrack::segmentForTrackTime: not bound -!missing-selector! AVParameterEvent::element not bound -!missing-selector! AVParameterEvent::initWithParameterID:scope:element:value: not bound -!missing-selector! AVParameterEvent::parameterID not bound -!missing-selector! AVParameterEvent::scope not bound -!missing-selector! AVParameterEvent::setElement: not bound -!missing-selector! AVParameterEvent::setParameterID: not bound -!missing-selector! AVParameterEvent::setScope: not bound -!missing-selector! AVParameterEvent::setValue: not bound -!missing-selector! AVParameterEvent::value not bound -!missing-selector! AVPlayer::defaultRate not bound -!missing-selector! AVPlayer::setDefaultRate: not bound -!missing-selector! AVPlayerInterstitialEvent::alignsResumptionWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::alignsStartWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::cue not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsResumptionWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsStartWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setCue: not bound -!missing-selector! AVPlayerInterstitialEvent::setDate: not bound -!missing-selector! AVPlayerInterstitialEvent::setIdentifier: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlayoutLimit: not bound -!missing-selector! AVPlayerInterstitialEvent::setPrimaryItem: not bound -!missing-selector! AVPlayerInterstitialEvent::setRestrictions: not bound -!missing-selector! AVPlayerInterstitialEvent::setResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEvent::setTemplateItems: not bound -!missing-selector! AVPlayerInterstitialEvent::setTime: not bound -!missing-selector! AVPlayerInterstitialEvent::setUserDefinedAttributes: not bound -!missing-selector! AVPlayerInterstitialEvent::setWillPlayOnce: not bound -!missing-selector! AVPlayerInterstitialEvent::willPlayOnce not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:addingToBatch:error: not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:error: not bound -!missing-selector! AVSampleBufferGenerator::makeBatch not bound -!missing-selector! AVSampleBufferGeneratorBatch::cancel not bound -!missing-selector! AVSampleBufferGeneratorBatch::makeDataReadyWithCompletionHandler: not bound -!missing-selector! AVSpeechSynthesisMarker::byteSampleOffset not bound -!missing-selector! AVSpeechSynthesisMarker::initWithMarkerType:forTextRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::mark not bound -!missing-selector! AVSpeechSynthesisMarker::setByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::setMark: not bound -!missing-selector! AVSpeechSynthesisMarker::setTextRange: not bound -!missing-selector! AVSpeechSynthesisMarker::textRange not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::cancelSpeechRequest not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechSynthesisOutputMetadataBlock: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechVoices: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechSynthesisOutputMetadataBlock not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechVoices not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::synthesizeSpeechRequest: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::initWithSSMLRepresentation:voice: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::ssmlRepresentation not bound -!missing-selector! AVSpeechSynthesisProviderRequest::voice not bound -!missing-selector! AVSpeechSynthesisProviderVoice::age not bound -!missing-selector! AVSpeechSynthesisProviderVoice::gender not bound -!missing-selector! AVSpeechSynthesisProviderVoice::identifier not bound -!missing-selector! AVSpeechSynthesisProviderVoice::initWithName:identifier:primaryLanguages:supportedLanguages: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::name not bound -!missing-selector! AVSpeechSynthesisProviderVoice::primaryLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setAge: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setGender: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVersion: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVoiceSize: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::supportedLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::version not bound -!missing-selector! AVSpeechSynthesisProviderVoice::voiceSize not bound -!missing-selector! AVSpeechSynthesizer::writeUtterance:toBufferCallback:toMarkerCallback: not bound -!missing-selector! AVSpeechUtterance::initWithSSMLRepresentation: not bound -!missing-selector! AVURLAsset::httpSessionIdentifier not bound -!missing-type! AVAssetPlaybackAssistant not bound -!missing-type! AVAUPresetEvent not bound -!missing-type! AVCaptureMetadataOutput not bound -!missing-type! AVExtendedNoteOnEvent not bound -!missing-type! AVExtendedTempoEvent not bound -!missing-type! AVMIDIChannelEvent not bound -!missing-type! AVMIDIChannelPressureEvent not bound -!missing-type! AVMIDIControlChangeEvent not bound -!missing-type! AVMIDIMetaEvent not bound -!missing-type! AVMIDINoteEvent not bound -!missing-type! AVMIDIPitchBendEvent not bound -!missing-type! AVMIDIPolyPressureEvent not bound -!missing-type! AVMIDIProgramChangeEvent not bound -!missing-type! AVMIDISysexEvent not bound -!missing-type! AVMusicEvent not bound -!missing-type! AVMusicUserEvent not bound -!missing-type! AVParameterEvent not bound -!missing-type! AVSampleBufferGeneratorBatch not bound -!missing-type! AVSpeechSynthesisMarker not bound -!missing-type! AVSpeechSynthesisProviderAudioUnit not bound -!missing-type! AVSpeechSynthesisProviderRequest not bound -!missing-type! AVSpeechSynthesisProviderVoice not bound -!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound -!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound -!missing-selector! AVCaptureDeskViewApplication::presentWithCompletionHandler: not bound -!missing-selector! AVCaptureDeskViewApplication::presentWithLaunchConfiguration:completionHandler: not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::mainWindowFrame not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::requiresSetUpModeCompletion not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setMainWindowFrame: not bound -!missing-selector! AVCaptureDeskViewApplicationLaunchConfiguration::setRequiresSetUpModeCompletion: not bound -!missing-type! AVCaptureDeskViewApplication not bound -!missing-type! AVCaptureDeskViewApplicationLaunchConfiguration not bound -!missing-enum! AVPlayerInterstitialEventAssetListResponseStatus not bound -!missing-enum-value! AVError native value AVErrorEncodeFailed = -11883 not bound -!missing-enum-value! AVError native value AVErrorSandboxExtensionDenied = -11884 not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeErrorKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeEventKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeStatusKey not bound -!missing-selector! AVCaptureDevice::centerStageRectOfInterest not bound -!missing-selector! AVCaptureDevice::setCenterStageRectOfInterest: not bound -!missing-selector! AVPlayerInterstitialEvent::assetListResponse not bound -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::enqueueSampleBuffer: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::error missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flush missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flushAndRemoveImage missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::isReadyForMoreMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requestMediaDataWhenReadyOnQueue:usingBlock: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requiresFlushToResumeDecoding missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::status missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::stopRequestingMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::timebase missing a [Deprecated] attribute -!extra-designated-initializer! AVPlayerLooper::initWithPlayer:templateItem:timeRange: is incorrectly decorated with an [DesignatedInitializer] attribute -!extra-enum-value! Managed value 1684369017 for AVAudioSessionRecordPermission.Denied is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 1735552628 for AVAudioSessionRecordPermission.Granted is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 1970168948 for AVAudioSessionRecordPermission.Undetermined is available for the current platform while the value in the native header is not -!missing-enum! AVAudioVoiceProcessingOtherAudioDuckingLevel not bound -!missing-enum! AVAudioVoiceProcessingSpeechActivityEvent not bound -!missing-enum! AVCapturePhotoOutputCaptureReadiness not bound -!missing-enum! AVPlayerLooperItemOrdering not bound -!missing-enum! AVSpeechSynthesisPersonalVoiceAuthorizationStatus not bound -!missing-enum! AVSpeechSynthesisVoiceTraits not bound -!missing-field! AVAssetExportPresetMVHEVC1440x1440 not bound -!missing-field! AVAssetExportPresetMVHEVC960x960 not bound -!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound -!missing-field! AVAudioApplicationMuteStateKey not bound -!missing-field! AVCaptureDeviceTypeMicrophone not bound -!missing-field! AVFileTypeAHAP not bound -!missing-field! AVMediaCharacteristicCarriesVideoStereoMetadata not bound -!missing-field! AVMediaCharacteristicContainsStereoMultiviewVideo not bound -!missing-field! AVMediaCharacteristicEnhancesSpeechIntelligibility not bound -!missing-field! AVMediaCharacteristicIndicatesHorizontalFieldOfView not bound -!missing-field! AVMediaCharacteristicTactileMinimal not bound -!missing-field! AVMediaTypeHaptic not bound -!missing-field! AVMetadataObjectTypeHumanFullBody not bound -!missing-field! AVOutputSettingsPresetMVHEVC1440x1440 not bound -!missing-field! AVOutputSettingsPresetMVHEVC960x960 not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotification not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotificationErrorKey not bound -!missing-field! AVSampleBufferVideoRendererRequiresFlushToResumeDecodingDidChangeNotification not bound -!missing-field! AVSpeechSynthesisAvailableVoicesDidChangeNotification not bound -!missing-field! AVURLAssetOverrideMIMETypeKey not bound -!missing-field! AVVideoCompositionPerFrameHDRDisplayMetadataPolicyGenerate not bound -!missing-field! AVVideoCompositionPerFrameHDRDisplayMetadataPolicyPropagate not bound -!missing-pinvoke! AVCaptureReactionSystemImageNameForType is not bound -!missing-protocol! AVCapturePhotoOutputReadinessCoordinatorDelegate not bound -!missing-protocol-member! AVSpeechSynthesizerDelegate::speechSynthesizer:willSpeakMarker:utterance: not found -!missing-selector! +AVAssetVariantQualifier::predicateForBinauralAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForDownmixAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForImmersiveAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetWriterInputTaggedPixelBufferGroupAdaptor::assetWriterInputTaggedPixelBufferGroupAdaptorWithAssetWriterInput:sourcePixelBufferAttributes: not bound -!missing-selector! +AVCaptureDevice::reactionEffectGesturesEnabled not bound -!missing-selector! +AVCaptureDevice::reactionEffectsEnabled not bound -!missing-selector! +AVCaptureDevice::setUserPreferredCamera: not bound -!missing-selector! +AVCaptureDevice::systemPreferredCamera not bound -!missing-selector! +AVCaptureDevice::userPreferredCamera not bound -!missing-selector! +AVSpeechSynthesizer::personalVoiceAuthorizationStatus not bound -!missing-selector! +AVSpeechSynthesizer::requestPersonalVoiceAuthorizationWithCompletionHandler: not bound -!missing-selector! AVAssetExportSession::allowsParallelizedExport not bound -!missing-selector! AVAssetExportSession::setAllowsParallelizedExport: not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isBinaural not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isDownmix not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isImmersive not bound -!missing-selector! AVAssetVariantVideoAttributes::videoLayoutAttributes not bound -!missing-selector! AVAssetVariantVideoLayoutAttributes::stereoViewComponents not bound -!missing-selector! AVAssetWriter::initialMovieFragmentInterval not bound -!missing-selector! AVAssetWriter::setInitialMovieFragmentInterval: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::appendTaggedPixelBufferGroup:withPresentationTime: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::assetWriterInput not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::initWithAssetWriterInput:sourcePixelBufferAttributes: not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::pixelBufferPool not bound -!missing-selector! AVAssetWriterInputTaggedPixelBufferGroupAdaptor::sourcePixelBufferAttributes not bound -!missing-selector! AVAudioInputNode::setMutedSpeechActivityEventListener: not bound -!missing-selector! AVAudioInputNode::setVoiceProcessingOtherAudioDuckingConfiguration: not bound -!missing-selector! AVAudioInputNode::voiceProcessingOtherAudioDuckingConfiguration not bound -!missing-selector! AVCaptureConnection::setVideoRotationAngle: not bound -!missing-selector! AVCaptureDevice::availableReactionTypes not bound -!missing-selector! AVCaptureDevice::canPerformReactionEffects not bound -!missing-selector! AVCaptureDevice::performEffectForReaction: not bound -!missing-selector! AVCaptureDevice::reactionEffectsInProgress not bound -!missing-selector! AVCaptureDeviceFormat::reactionEffectsSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForReactionEffectsInProgress not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::device not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::initWithDevice:previewLayer: not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::previewLayer not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelCapture not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelPreview not bound -!missing-selector! AVCapturePhotoOutput::captureReadiness not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationSupported not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureEnabled not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureSupported not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagEnabled not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagSupported not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationSupported: not bound -!missing-selector! AVCapturePhotoOutput::setResponsiveCaptureEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setZeroShutterLagEnabled: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::captureReadiness not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::delegate not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::initWithPhotoOutput: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::setDelegate: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::startTrackingCaptureRequestUsingPhotoSettings: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::stopTrackingCaptureRequestUsingPhotoSettingsUniqueID: not bound -!missing-selector! AVCaptureReactionEffectState::endTime not bound -!missing-selector! AVCaptureReactionEffectState::reactionType not bound -!missing-selector! AVCaptureReactionEffectState::startTime not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVMutableVideoComposition::perFrameHDRDisplayMetadataPolicy not bound -!missing-selector! AVMutableVideoComposition::setPerFrameHDRDisplayMetadataPolicy: not bound -!missing-selector! AVPlayerLooper::initWithPlayer:templateItem:timeRange:existingItemsOrdering: not bound -!missing-selector! AVSampleBufferDisplayLayer::sampleBufferRenderer not bound -!missing-selector! AVSampleBufferVideoRenderer::error not bound -!missing-selector! AVSampleBufferVideoRenderer::flushWithRemovalOfDisplayedImage:completionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::requiresFlushToResumeDecoding not bound -!missing-selector! AVSampleBufferVideoRenderer::status not bound -!missing-selector! AVSpeechSynthesisMarker::bookmarkName not bound -!missing-selector! AVSpeechSynthesisMarker::initWithBookmarkName:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithParagraphRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithPhonemeString:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithSentenceRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithWordRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::phoneme not bound -!missing-selector! AVSpeechSynthesisMarker::setBookmarkName: not bound -!missing-selector! AVSpeechSynthesisMarker::setPhoneme: not bound -!missing-selector! AVSpeechSynthesisVoice::voiceTraits not bound -!missing-selector! AVVideoComposition::perFrameHDRDisplayMetadataPolicy not bound -!missing-type! AVAssetVariantVideoLayoutAttributes not bound -!missing-type! AVAssetWriterInputTaggedPixelBufferGroupAdaptor not bound -!missing-type! AVCaptureDeviceRotationCoordinator not bound -!missing-type! AVCapturePhotoOutputReadinessCoordinator not bound -!missing-type! AVCaptureReactionEffectState not bound -!missing-type! AVMetadataHumanFullBodyObject not bound -!missing-type! AVSampleBufferVideoRenderer not bound -!unknown-field! AVAudioSessionInterruptionNotification bound -!unknown-field! AVAudioSessionInterruptionOptionKey bound -!unknown-field! AVAudioSessionInterruptionTypeKey bound -!unknown-field! AVAudioSessionMediaServicesWereLostNotification bound -!unknown-field! AVAudioSessionMediaServicesWereResetNotification bound -!missing-field! AVCaptureDeviceTypeContinuityCamera not bound -!missing-selector! AVCaptureDevice::displayVideoZoomFactorMultiplier not bound -!missing-enum-value! AVCaptureColorSpace native value AVCaptureColorSpace_AppleLog = 3 not bound -!missing-selector! +AVExternalStorageDevice::authorizationStatus not bound -!missing-selector! +AVExternalStorageDevice::requestAccessWithCompletionHandler: not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::isSupported not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::sharedSession not bound -!missing-selector! AVCaptureVideoDataOutput::recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType:outputFileURL: not bound -!missing-selector! AVExternalStorageDevice::displayName not bound -!missing-selector! AVExternalStorageDevice::freeSize not bound -!missing-selector! AVExternalStorageDevice::isConnected not bound -!missing-selector! AVExternalStorageDevice::isNotRecommendedForCaptureUse not bound -!missing-selector! AVExternalStorageDevice::nextAvailableURLsWithPathExtensions:error: not bound -!missing-selector! AVExternalStorageDevice::totalSize not bound -!missing-selector! AVExternalStorageDevice::uuid not bound -!missing-selector! AVExternalStorageDeviceDiscoverySession::externalStorageDevices not bound -!missing-type! AVExternalStorageDevice not bound -!missing-type! AVExternalStorageDeviceDiscoverySession not bound -!missing-enum! AVAudioSessionRenderingMode not bound -!missing-enum! CMTagCollectionVideoOutputPreset not bound -!missing-pinvoke! CMTagCollectionCreateWithVideoOutputPreset is not bound -!missing-selector! AVCaptureDeviceFormat::supportedVideoZoomRangesForDepthDataDelivery not bound -!missing-selector! AVCaptureDeviceFormat::zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported not bound -!missing-selector! AVPlayer::setVideoOutput: not bound -!missing-selector! AVPlayer::videoOutput not bound -!missing-selector! AVPlayerVideoOutput::copyTaggedBufferGroupForHostTime:presentationTimeStamp:activeConfiguration: not bound -!missing-selector! AVPlayerVideoOutput::initWithSpecification: not bound -!missing-selector! AVPlayerVideoOutputConfiguration::activationTime not bound -!missing-selector! AVPlayerVideoOutputConfiguration::dataChannelDescriptions not bound -!missing-selector! AVPlayerVideoOutputConfiguration::sourcePlayerItem not bound -!missing-selector! AVVideoOutputSpecification::initWithTagCollections: not bound -!missing-selector! AVVideoOutputSpecification::preferredTagCollections not bound -!missing-selector! AVZoomRange::containsZoomFactor: not bound -!missing-selector! AVZoomRange::maxZoomFactor not bound -!missing-selector! AVZoomRange::minZoomFactor not bound -!missing-type! AVPlayerVideoOutput not bound -!missing-type! AVPlayerVideoOutputConfiguration not bound -!missing-type! AVVideoOutputSpecification not bound -!missing-type! AVZoomRange not bound -!missing-enum! AVExternalContentProtectionStatus not bound -!missing-field! AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification not bound -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:externalProtectionStatusDidChangeForContentKey: not found -!missing-selector! AVContentKey::externalContentProtectionStatus not bound -!missing-selector! AVContentKey::revoke not bound -!missing-selector! AVSampleBufferDisplayLayer::isReadyForDisplay not bound -!missing-selector! AVSampleBufferVideoRenderer::copyDisplayedPixelBuffer not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMinimumUpcomingSampleBufferPresentationTime: not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes not bound -!missing-selector! AVSampleBufferVideoRenderer::loadVideoPerformanceMetricsWithCompletionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::resetUpcomingSampleBufferPresentationTimeExpectations not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfCorruptedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfDroppedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfFramesDisplayedUsingOptimizedCompositing not bound -!missing-selector! AVVideoPerformanceMetrics::totalAccumulatedFrameDelay not bound -!missing-selector! AVVideoPerformanceMetrics::totalNumberOfFrames not bound -!missing-type! AVVideoPerformanceMetrics not bound -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:to:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:toNodes:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVCaptureConnection::isVideoOrientationSupported missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferGenerator::createSampleBufferForRequest: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAggregateAssetDownloadTask missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didCompleteForMediaSelection: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:willDownloadToURL: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:assetDownloadTask:didFinishDownloadingToURL: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadDelegate::URLSession:assetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadTask::loadedTimeRanges missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadTask::options missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadURLSession::aggregateAssetDownloadTaskWithURLAsset:mediaSelections:assetTitle:assetArtworkData:options: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetDownloadURLSession::assetDownloadTaskWithURLAsset:assetTitle:assetArtworkData:options: missing a [Deprecated] attribute -!missing-enum! AVCaptureMultichannelAudioMode not bound -!missing-enum! AVExternalContentProtectionStatus not bound -!missing-enum! AVPlayerInterstitialEventTimelineOccupancy not bound -!missing-enum! AVPlayerItemSegmentType not bound -!missing-enum-value! AVError native value AVErrorToneMappingFailed = -11885 not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyForceSDR not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyMatchSource not bound -!missing-field! AVAssetPlaybackConfigurationOptionSpatialVideo not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncNotification not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonCurrentSegmentChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonKey not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonLoadedTimeRangesChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonSegmentsChanged not bound -!missing-field! AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification not bound -!missing-field! AVSpatialCaptureDiscomfortReasonNotEnoughLight not bound -!missing-field! AVSpatialCaptureDiscomfortReasonSubjectTooClose not bound -!missing-field! AVVideoCodecTypeAppleProRes4444XQ not bound -!missing-field! AVVideoTransferFunction_IEC_sRGB not bound -!missing-protocol! AVMetricEventStreamPublisher not bound -!missing-protocol! AVMetricEventStreamSubscriber not bound -!missing-protocol! AVPlayerItemIntegratedTimelineObserver not bound -!missing-protocol! AVPlayerItemRenderedLegibleOutputPushDelegate not bound -!missing-protocol-conformance! AVPlayerItem should conform to AVMetricEventStreamPublisher (defined in 'AVMetricEventStreamPublisher' category) -!missing-protocol-member! AVAssetDownloadDelegate::URLSession:assetDownloadTask:willDownloadToURL: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:externalProtectionStatusDidChangeForContentKey: not found -!missing-selector! +AVAssetVariantQualifier::predicateForAudioSampleRate:mediaSelectionOption:operatorType: not bound -!missing-selector! +AVCaptureDevice::isBackgroundReplacementEnabled not bound -!missing-selector! +AVMetricEventStream::eventStream not bound -!missing-selector! AVAssetImageGenerator::dynamicRangePolicy not bound -!missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound -!missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound -!missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound -!missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound -!missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound -!missing-selector! AVCaptureDevice::spatialCaptureDiscomfortReasons not bound -!missing-selector! AVCaptureDeviceFormat::isAutoVideoFrameRateSupported not bound -!missing-selector! AVCaptureDeviceFormat::isBackgroundReplacementSupported not bound -!missing-selector! AVCaptureDeviceFormat::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForBackgroundReplacement not bound -!missing-selector! AVCaptureDeviceInput::isMultichannelAudioModeSupported: not bound -!missing-selector! AVCaptureDeviceInput::multichannelAudioMode not bound -!missing-selector! AVCaptureDeviceInput::setMultichannelAudioMode: not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureEnabled not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureMovieFileOutput::setSpatialVideoCaptureEnabled: not bound -!missing-selector! AVCapturePhoto::constantColorCenterWeightedMeanConfidenceLevel not bound -!missing-selector! AVCapturePhoto::constantColorConfidenceMap not bound -!missing-selector! AVCapturePhoto::isConstantColorFallbackPhoto not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorSupported not bound -!missing-selector! AVCapturePhotoOutput::isShutterSoundSuppressionSupported not bound -!missing-selector! AVCapturePhotoOutput::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorFallbackPhotoDeliveryEnabled not bound -!missing-selector! AVCapturePhotoSettings::isShutterSoundSuppressionEnabled not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorFallbackPhotoDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setShutterSoundSuppressionEnabled: not bound -!missing-selector! AVContentKey::externalContentProtectionStatus not bound -!missing-selector! AVContentKey::revoke not bound -!missing-selector! AVMediaExtensionProperties::containingBundleName not bound -!missing-selector! AVMediaExtensionProperties::containingBundleURL not bound -!missing-selector! AVMediaExtensionProperties::extensionName not bound -!missing-selector! AVMediaExtensionProperties::extensionURL not bound -!missing-selector! AVMetricContentKeyRequestEvent::contentKeySpecifier not bound -!missing-selector! AVMetricContentKeyRequestEvent::isClientInitiated not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaType not bound -!missing-selector! AVMetricErrorEvent::didRecover not bound -!missing-selector! AVMetricErrorEvent::error not bound -!missing-selector! AVMetricEvent::date not bound -!missing-selector! AVMetricEvent::mediaTime not bound -!missing-selector! AVMetricEvent::sessionID not bound -!missing-selector! AVMetricEventStream::addPublisher: not bound -!missing-selector! AVMetricEventStream::setSubscriber:queue: not bound -!missing-selector! AVMetricEventStream::subscribeToAllMetricEvents not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvent: not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvents: not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::byteRange not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::isMapSegment not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::url not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::isMultivariantPlaylist not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::byteRange not bound -!missing-selector! AVMetricMediaResourceRequestEvent::errorEvent not bound -!missing-selector! AVMetricMediaResourceRequestEvent::networkTransactionMetrics not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::serverAddress not bound -!missing-selector! AVMetricMediaResourceRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::wasReadFromCache not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::contentKeyRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::mediaSegmentRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::playlistRequestEvents not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::timeTaken not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::variant not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::errorEvent not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::mediaResourceRequestCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::playbackDuration not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::recoverableErrorCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::stallCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentInInitialStartup not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentRecoveringFromStall not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedAverageBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedPeakBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::variantSwitchCount not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::previousRate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::rate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::variant not bound -!missing-selector! AVMetricPlayerItemSeekDidCompleteEvent::didSeekInBuffer not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::didSucceed not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::toVariant not bound -!missing-selector! AVPlayerInterstitialEvent::contentMayVary not bound -!missing-selector! AVPlayerInterstitialEvent::plannedDuration not bound -!missing-selector! AVPlayerInterstitialEvent::setContentMayVary: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlannedDuration: not bound -!missing-selector! AVPlayerInterstitialEvent::setSupplementsPrimaryContent: not bound -!missing-selector! AVPlayerInterstitialEvent::setTimelineOccupancy: not bound -!missing-selector! AVPlayerInterstitialEvent::supplementsPrimaryContent not bound -!missing-selector! AVPlayerInterstitialEvent::timelineOccupancy not bound -!missing-selector! AVPlayerItem::integratedTimeline not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addBoundaryTimeObserverForSegment:offsetsIntoSegment:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addPeriodicTimeObserverForInterval:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentSnapshot not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimeline::removeTimeObserver: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToDate:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToTime:toleranceBefore:toleranceAfter:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentSegment not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::duration not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::mapTime:toSegment:atSegmentOffset: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::segments not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::advanceIntervalForDelegateInvocation not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::delegate not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::delegateQueue not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::initWithVideoDisplaySize: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setAdvanceIntervalForDelegateInvocation: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setDelegate:queue: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::setVideoDisplaySize: not bound -!missing-selector! AVPlayerItemRenderedLegibleOutput::videoDisplaySize not bound -!missing-selector! AVPlayerItemSegment::interstitialEvent not bound -!missing-selector! AVPlayerItemSegment::loadedTimeRanges not bound -!missing-selector! AVPlayerItemSegment::segmentType not bound -!missing-selector! AVPlayerItemSegment::startDate not bound -!missing-selector! AVPlayerItemSegment::timeMapping not bound -!missing-selector! AVPlayerVideoOutputConfiguration::preferredTransform not bound -!missing-selector! AVRenderedCaptionImage::pixelBuffer not bound -!missing-selector! AVRenderedCaptionImage::position not bound -!missing-selector! AVSampleBufferDisplayLayer::isReadyForDisplay not bound -!missing-selector! AVSampleBufferVideoRenderer::copyDisplayedPixelBuffer not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMinimumUpcomingSampleBufferPresentationTime: not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes not bound -!missing-selector! AVSampleBufferVideoRenderer::loadVideoPerformanceMetricsWithCompletionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::resetUpcomingSampleBufferPresentationTimeExpectations not bound -!missing-selector! AVURLAsset::mediaExtensionProperties not bound -!missing-selector! AVVideoComposition::isValidForTracks:assetDuration:timeRange:validationDelegate: not bound -!missing-selector! AVVideoOutputSpecification::defaultOutputSettings not bound -!missing-selector! AVVideoOutputSpecification::setDefaultOutputSettings: not bound -!missing-selector! AVVideoOutputSpecification::setOutputSettings:forTagCollection: not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfCorruptedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfDroppedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfFramesDisplayedUsingOptimizedCompositing not bound -!missing-selector! AVVideoPerformanceMetrics::totalAccumulatedFrameDelay not bound -!missing-selector! AVVideoPerformanceMetrics::totalNumberOfFrames not bound -!missing-type! AVMediaExtensionProperties not bound -!missing-type! AVMetricContentKeyRequestEvent not bound -!missing-type! AVMetricErrorEvent not bound -!missing-type! AVMetricEvent not bound -!missing-type! AVMetricEventStream not bound -!missing-type! AVMetricHLSMediaSegmentRequestEvent not bound -!missing-type! AVMetricHLSPlaylistRequestEvent not bound -!missing-type! AVMetricMediaResourceRequestEvent not bound -!missing-type! AVMetricPlayerItemInitialLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemPlaybackSummaryEvent not bound -!missing-type! AVMetricPlayerItemRateChangeEvent not bound -!missing-type! AVMetricPlayerItemSeekDidCompleteEvent not bound -!missing-type! AVMetricPlayerItemSeekEvent not bound -!missing-type! AVMetricPlayerItemStallEvent not bound -!missing-type! AVMetricPlayerItemVariantSwitchEvent not bound -!missing-type! AVPlayerItemIntegratedTimeline not bound -!missing-type! AVPlayerItemIntegratedTimelineSnapshot not bound -!missing-type! AVPlayerItemRenderedLegibleOutput not bound -!missing-type! AVPlayerItemSegment not bound -!missing-type! AVRenderedCaptionImage not bound -!missing-type! AVVideoPerformanceMetrics not bound -!missing-selector! AVMediaExtensionProperties::extensionIdentifier not bound -!missing-field! AVMediaTypeAuxiliaryPicture not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::indexFileURL not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::toVariant not bound -!missing-type! AVMetricPlayerItemVariantSwitchStartEvent not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionConflict = -11887 not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionDisabled = -11886 not bound -!missing-selector! AVMutableComposition::insertTimeRange:ofAsset:atTime:completionHandler: not bound -!missing-field! AVMetadataIdentifierQuickTimeMetadataFullFrameRatePlaybackIntent not bound -!missing-field! AVMetadataQuickTimeMetadataKeyFullFrameRatePlaybackIntent not bound -!missing-field! AVVideoCodecTypeJPEGXL not bound -!missing-protocol! AVCaptureSessionControlsDelegate not bound -!missing-selector! AVCaptureControl::isEnabled not bound -!missing-selector! AVCaptureControl::setEnabled: not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedExposureBiasRange not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedVideoZoomRange not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalEnabled not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalSupported not bound -!missing-selector! AVCaptureDeviceInput::setWindNoiseRemovalEnabled: not bound -!missing-selector! AVCaptureIndexPicker::accessibilityIdentifier not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:localizedIndexTitles: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes:localizedTitleTransform: not bound -!missing-selector! AVCaptureIndexPicker::localizedIndexTitles not bound -!missing-selector! AVCaptureIndexPicker::localizedTitle not bound -!missing-selector! AVCaptureIndexPicker::numberOfIndexes not bound -!missing-selector! AVCaptureIndexPicker::selectedIndex not bound -!missing-selector! AVCaptureIndexPicker::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureIndexPicker::setActionQueue:action: not bound -!missing-selector! AVCaptureIndexPicker::setSelectedIndex: not bound -!missing-selector! AVCaptureIndexPicker::symbolName not bound -!missing-selector! AVCaptureSession::addControl: not bound -!missing-selector! AVCaptureSession::canAddControl: not bound -!missing-selector! AVCaptureSession::controls not bound -!missing-selector! AVCaptureSession::controlsDelegate not bound -!missing-selector! AVCaptureSession::controlsDelegateCallbackQueue not bound -!missing-selector! AVCaptureSession::maxControlsCount not bound -!missing-selector! AVCaptureSession::removeControl: not bound -!missing-selector! AVCaptureSession::setControlsDelegate:queue: not bound -!missing-selector! AVCaptureSession::supportsControls not bound -!missing-selector! AVCaptureSlider::accessibilityIdentifier not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue:step: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:values: not bound -!missing-selector! AVCaptureSlider::localizedTitle not bound -!missing-selector! AVCaptureSlider::localizedValueFormat not bound -!missing-selector! AVCaptureSlider::prominentValues not bound -!missing-selector! AVCaptureSlider::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureSlider::setActionQueue:action: not bound -!missing-selector! AVCaptureSlider::setLocalizedValueFormat: not bound -!missing-selector! AVCaptureSlider::setProminentValues: not bound -!missing-selector! AVCaptureSlider::setValue: not bound -!missing-selector! AVCaptureSlider::symbolName not bound -!missing-selector! AVCaptureSlider::value not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice:action: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice:action: not bound -!missing-selector! AVExposureBiasRange::containsExposureBias: not bound -!missing-selector! AVExposureBiasRange::maxExposureBias not bound -!missing-selector! AVExposureBiasRange::minExposureBias not bound -!missing-type! AVCaptureControl not bound -!missing-type! AVCaptureIndexPicker not bound -!missing-type! AVCaptureSlider not bound -!missing-type! AVCaptureSystemExposureBiasSlider not bound -!missing-type! AVCaptureSystemZoomSlider not bound -!missing-type! AVExposureBiasRange not bound -!missing-enum! AVAudioApplicationMicrophoneInjectionPermission not bound -!missing-enum! AVAudioSessionMicrophoneInjectionMode not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVKit.todo deleted file mode 100644 index 940f89e893a6..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-AVKit.todo +++ /dev/null @@ -1,2 +0,0 @@ -!missing-selector! AVPlayerView::setVideoFrameAnalysisTypes: not bound -!missing-selector! AVPlayerView::videoFrameAnalysisTypes not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreHaptics.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreHaptics.ignore index e5d330ec11c5..f67ca24d20ba 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreHaptics.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreHaptics.ignore @@ -1,122 +1,2 @@ -# This framework, although appers in the header, will not compile: https://github.com/xamarin/maccore/issues/2261 -!missing-enum! CHHapticEngineFinishedAction not bound -!missing-enum! CHHapticEngineStoppedReason not bound -!missing-enum! CHHapticErrorCode not bound -!missing-field! CHHapticDynamicParameterIDAudioAttackTimeControl not bound -!missing-field! CHHapticDynamicParameterIDAudioBrightnessControl not bound -!missing-field! CHHapticDynamicParameterIDAudioDecayTimeControl not bound -!missing-field! CHHapticDynamicParameterIDAudioPanControl not bound -!missing-field! CHHapticDynamicParameterIDAudioPitchControl not bound -!missing-field! CHHapticDynamicParameterIDAudioReleaseTimeControl not bound -!missing-field! CHHapticDynamicParameterIDAudioVolumeControl not bound -!missing-field! CHHapticDynamicParameterIDHapticAttackTimeControl not bound -!missing-field! CHHapticDynamicParameterIDHapticDecayTimeControl not bound -!missing-field! CHHapticDynamicParameterIDHapticIntensityControl not bound -!missing-field! CHHapticDynamicParameterIDHapticReleaseTimeControl not bound -!missing-field! CHHapticDynamicParameterIDHapticSharpnessControl not bound -!missing-field! CHHapticEventParameterIDAttackTime not bound -!missing-field! CHHapticEventParameterIDAudioBrightness not bound -!missing-field! CHHapticEventParameterIDAudioPan not bound -!missing-field! CHHapticEventParameterIDAudioPitch not bound -!missing-field! CHHapticEventParameterIDAudioVolume not bound -!missing-field! CHHapticEventParameterIDDecayTime not bound -!missing-field! CHHapticEventParameterIDHapticIntensity not bound -!missing-field! CHHapticEventParameterIDHapticSharpness not bound -!missing-field! CHHapticEventParameterIDReleaseTime not bound -!missing-field! CHHapticEventParameterIDSustained not bound -!missing-field! CHHapticEventTypeAudioContinuous not bound -!missing-field! CHHapticEventTypeAudioCustom not bound -!missing-field! CHHapticEventTypeHapticContinuous not bound -!missing-field! CHHapticEventTypeHapticTransient not bound -!missing-field! CHHapticPatternKeyEvent not bound -!missing-field! CHHapticPatternKeyEventDuration not bound -!missing-field! CHHapticPatternKeyEventParameters not bound -!missing-field! CHHapticPatternKeyEventType not bound -!missing-field! CHHapticPatternKeyEventWaveformPath not bound -!missing-field! CHHapticPatternKeyParameter not bound -!missing-field! CHHapticPatternKeyParameterCurve not bound -!missing-field! CHHapticPatternKeyParameterCurveControlPoints not bound -!missing-field! CHHapticPatternKeyParameterID not bound -!missing-field! CHHapticPatternKeyParameterValue not bound -!missing-field! CHHapticPatternKeyPattern not bound -!missing-field! CHHapticPatternKeyTime not bound -!missing-field! CHHapticPatternKeyVersion not bound -!missing-protocol! CHHapticAdvancedPatternPlayer not bound -!missing-protocol! CHHapticDeviceCapability not bound -!missing-protocol! CHHapticParameterAttributes not bound -!missing-protocol! CHHapticPatternPlayer not bound -!missing-selector! +CHHapticEngine::capabilitiesForHardware not bound -!missing-selector! CHHapticDynamicParameter::initWithParameterID:value:relativeTime: not bound -!missing-selector! CHHapticDynamicParameter::parameterID not bound -!missing-selector! CHHapticDynamicParameter::relativeTime not bound -!missing-selector! CHHapticDynamicParameter::setRelativeTime: not bound -!missing-selector! CHHapticDynamicParameter::setValue: not bound -!missing-selector! CHHapticDynamicParameter::value not bound -!missing-selector! CHHapticEngine::createAdvancedPlayerWithPattern:error: not bound -!missing-selector! CHHapticEngine::createPlayerWithPattern:error: not bound -!missing-selector! CHHapticEngine::currentTime not bound -!missing-selector! CHHapticEngine::initAndReturnError: not bound +# This selector takes an AVAudioSession, which isn't available on macOS. !missing-selector! CHHapticEngine::initWithAudioSession:error: not bound -!missing-selector! CHHapticEngine::isAutoShutdownEnabled not bound -!missing-selector! CHHapticEngine::isMutedForAudio not bound -!missing-selector! CHHapticEngine::isMutedForHaptics not bound -!missing-selector! CHHapticEngine::notifyWhenPlayersFinished: not bound -!missing-selector! CHHapticEngine::playPatternFromData:error: not bound -!missing-selector! CHHapticEngine::playPatternFromURL:error: not bound -!missing-selector! CHHapticEngine::playsHapticsOnly not bound -!missing-selector! CHHapticEngine::registerAudioResource:options:error: not bound -!missing-selector! CHHapticEngine::resetHandler not bound -!missing-selector! CHHapticEngine::setAutoShutdownEnabled: not bound -!missing-selector! CHHapticEngine::setIsMutedForAudio: not bound -!missing-selector! CHHapticEngine::setIsMutedForHaptics: not bound -!missing-selector! CHHapticEngine::setPlaysHapticsOnly: not bound -!missing-selector! CHHapticEngine::setResetHandler: not bound -!missing-selector! CHHapticEngine::setStoppedHandler: not bound -!missing-selector! CHHapticEngine::startAndReturnError: not bound -!missing-selector! CHHapticEngine::startWithCompletionHandler: not bound -!missing-selector! CHHapticEngine::stoppedHandler not bound -!missing-selector! CHHapticEngine::stopWithCompletionHandler: not bound -!missing-selector! CHHapticEngine::unregisterAudioResource:error: not bound -!missing-selector! CHHapticEvent::duration not bound -!missing-selector! CHHapticEvent::eventParameters not bound -!missing-selector! CHHapticEvent::initWithAudioResourceID:parameters:relativeTime: not bound -!missing-selector! CHHapticEvent::initWithAudioResourceID:parameters:relativeTime:duration: not bound -!missing-selector! CHHapticEvent::initWithEventType:parameters:relativeTime: not bound -!missing-selector! CHHapticEvent::initWithEventType:parameters:relativeTime:duration: not bound -!missing-selector! CHHapticEvent::relativeTime not bound -!missing-selector! CHHapticEvent::setDuration: not bound -!missing-selector! CHHapticEvent::setRelativeTime: not bound -!missing-selector! CHHapticEvent::type not bound -!missing-selector! CHHapticEventParameter::initWithParameterID:value: not bound -!missing-selector! CHHapticEventParameter::parameterID not bound -!missing-selector! CHHapticEventParameter::setValue: not bound -!missing-selector! CHHapticEventParameter::value not bound -!missing-selector! CHHapticParameterCurve::controlPoints not bound -!missing-selector! CHHapticParameterCurve::initWithParameterID:controlPoints:relativeTime: not bound -!missing-selector! CHHapticParameterCurve::parameterID not bound -!missing-selector! CHHapticParameterCurve::relativeTime not bound -!missing-selector! CHHapticParameterCurve::setRelativeTime: not bound -!missing-selector! CHHapticParameterCurveControlPoint::initWithRelativeTime:value: not bound -!missing-selector! CHHapticParameterCurveControlPoint::relativeTime not bound -!missing-selector! CHHapticParameterCurveControlPoint::setRelativeTime: not bound -!missing-selector! CHHapticParameterCurveControlPoint::setValue: not bound -!missing-selector! CHHapticParameterCurveControlPoint::value not bound -!missing-selector! CHHapticPattern::duration not bound -!missing-selector! CHHapticPattern::exportDictionaryAndReturnError: not bound -!missing-selector! CHHapticPattern::initWithDictionary:error: not bound -!missing-selector! CHHapticPattern::initWithEvents:parameterCurves:error: not bound -!missing-selector! CHHapticPattern::initWithEvents:parameters:error: not bound -!missing-type! CHHapticDynamicParameter not bound -!missing-type! CHHapticEngine not bound -!missing-type! CHHapticEvent not bound -!missing-type! CHHapticEventParameter not bound -!missing-type! CHHapticParameterCurve not bound -!missing-type! CHHapticParameterCurveControlPoint not bound -!missing-type! CHHapticPattern not bound -!missing-field! CHHapticAudioResourceKeyUseVolumeEnvelope not bound -!missing-field! CHHapticPatternKeyEventWaveformUseVolumeEnvelope not bound -!missing-field! CHHapticAudioResourceKeyLoopEnabled not bound -!missing-field! CHHapticPatternKeyEventWaveformLoopEnabled not bound -!missing-selector! CHHapticEngine::playsAudioOnly not bound -!missing-selector! CHHapticEngine::setPlaysAudioOnly: not bound -!missing-selector! CHHapticPattern::initWithContentsOfURL:error: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMIDI.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMIDI.ignore index 20bfae56def7..e0e99129c1d0 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMIDI.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreMIDI.ignore @@ -31,8 +31,6 @@ !missing-pinvoke! MIDISendEventList is not bound !missing-pinvoke! MIDISourceCreateWithProtocol is not bound -# header's clearly say this enum value is not supported on macOS, yet xtro claims it is -!missing-enum-value! MidiNotificationMessageId native value kMIDIMsgInternalStart = 4096 not bound !missing-pinvoke! MIDIEventPacketSysexBytesForGroup is not bound !missing-pinvoke! MIDISendUMPSysex is not bound !missing-pinvoke! MIDISendUMPSysex8 is not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MLCompute.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-MLCompute.todo deleted file mode 100644 index 4bfc56f89c44..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MLCompute.todo +++ /dev/null @@ -1,57 +0,0 @@ -!deprecated-attribute-missing! MLCRMSPropOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCActivationDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCActivationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamWOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCArithmeticLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCBatchNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCComparisonLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConcatenationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDevice missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDropoutLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCFullyConnectedLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGatherLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGramMatrixLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGroupNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInferenceGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInstanceNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayerNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizerDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPaddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPlatform missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReductionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReshapeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCScatterLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSelectionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSGDOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSliceLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSoftmaxLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSplitLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorData missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorOptimizerDeviceData missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorParameter missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTrainingGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTransposeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCUpsampleLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorOptimizerDeviceData missing a [Deprecated] attribute diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MapKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-MapKit.ignore deleted file mode 100644 index 68ffaa04db33..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-MapKit.ignore +++ /dev/null @@ -1 +0,0 @@ -!missing-enum-value! MKUserTrackingMode native value MKUserTrackingModeFollowWithHeading = 2 not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Matter.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-Matter.todo deleted file mode 100644 index 9589b1e63c27..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-Matter.todo +++ /dev/null @@ -1,40 +0,0 @@ -!missing-enum! MTRColorControlColorCapabilitiesBitmap not bound -!missing-enum! MTRColorControlDirection not bound -!missing-enum! MTRColorControlDriftCompensation not bound -!missing-enum! MTRColorControlEnhancedColorMode not bound -!missing-enum! MTRColorControlMoveMode not bound -!missing-enum! MTRColorControlOptionsBitmap not bound -!missing-enum! MTRColorControlStepMode not bound -!missing-enum! MTRColorControlUpdateFlagsBitmap not bound -!missing-enum! MTRDeviceTypeIDType not bound -!missing-field! MTRDeviceControllerRegistrationControllerContextKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDsKey not bound -!missing-pinvoke! MTREventNameForID is not bound -!missing-pinvoke! MTRRequestCommandNameForID is not bound -!missing-pinvoke! MTRResponseCommandNameForID is not bound -!missing-protocol! MTRXPCClientProtocol not bound -!missing-protocol! MTRXPCClientProtocol_MTRDevice not bound -!missing-protocol! MTRXPCClientProtocol_MTRDeviceController not bound -!missing-protocol! MTRXPCServerProtocol not bound -!missing-protocol! MTRXPCServerProtocol_MTRDevice not bound -!missing-protocol! MTRXPCServerProtocol_MTRDeviceController not bound -!missing-selector! +MTRDeviceType::deviceTypeForID: not bound -!missing-selector! MTRCertificateInfo::publicKeyData not bound -!missing-selector! MTRDevice::readAttributePaths: not bound -!missing-selector! MTRDeviceController::addDeviceControllerDelegate:queue: not bound -!missing-selector! MTRDeviceController::isSuspended not bound -!missing-selector! MTRDeviceController::removeDeviceControllerDelegate: not bound -!missing-selector! MTRDeviceController::resume not bound -!missing-selector! MTRDeviceController::suspend not bound -!missing-selector! MTRDeviceControllerAbstractParameters::setStartSuspended: not bound -!missing-selector! MTRDeviceControllerAbstractParameters::startSuspended not bound -!missing-selector! MTRDeviceControllerExternalCertificateParameters::rootCertificate not bound -!missing-selector! MTRDeviceType::id not bound -!missing-selector! MTRDeviceType::isUtility not bound -!missing-selector! MTRDeviceType::name not bound -!missing-selector! MTRXPCDeviceControllerParameters::initWithXPConnectionBlock:uniqueIdentifier: not bound -!missing-selector! MTRXPCDeviceControllerParameters::uniqueIdentifier not bound -!missing-selector! MTRXPCDeviceControllerParameters::xpcConnectionBlock not bound -!missing-type! MTRDeviceType not bound -!missing-type! MTRXPCDeviceControllerParameters not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore index 93c7dc807dfe..7a968e261884 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.ignore @@ -1,13 +1,19 @@ +## no generator support for NSFastEnumeration / https://bugzilla.xamarin.com/show_bug.cgi?id=4391 +!missing-protocol-conformance! AVCaptureSynchronizedDataCollection should conform to NSFastEnumeration + ## https://github.com/xamarin/xamarin-macios/issues/3213 should be fixed before conformance to 'AVQueuedSampleBufferRendering' is restored. !missing-protocol-conformance! AVSampleBufferDisplayLayer should conform to AVQueuedSampleBufferRendering (defined in 'AVSampleBufferDisplayLayerQueueManagement' category) # as per the header comments, the following enum has to be ignored on tvOS !missing-enum! AVAudioSessionIOType not bound +## this API is to have cute Objective-C syntax for something that's (according to the docs) identical to what another method does (which we've bound). +!missing-selector! AVCaptureSynchronizedDataCollection::objectForKeyedSubscript: not bound + ### deprecated in iOS8 !missing-protocol-member! AVAudioPlayerDelegate::audioPlayerEndInterruption:withFlags: not found -## https://github.com/xamarin/xamarin-macios/issues/16229 prevents crashing instead of return null -## so these selectors have been bound manually -!missing-selector! AVAudioPlayer::initWithContentsOfURL:error: not bound -!missing-selector! AVAudioPlayer::initWithData:error: not bound +## removed in XAMCORE_5_0 +!extra-enum-value! Managed value 1684369017 for AVAudioSessionRecordPermission.Denied is available for the current platform while the value in the native header is not +!extra-enum-value! Managed value 1735552628 for AVAudioSessionRecordPermission.Granted is available for the current platform while the value in the native header is not +!extra-enum-value! Managed value 1970168948 for AVAudioSessionRecordPermission.Undetermined is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo deleted file mode 100644 index cfab5485384d..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo +++ /dev/null @@ -1,1240 +0,0 @@ -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsBestMatchingPreferredLanguages: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::mediaSelectionGroupForMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaCharacteristic: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::tracksWithMediaType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::trackWithTrackID: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAsset::unusedTrackID missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::associatedTracksOfType: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::metadataForFormat: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::samplePresentationTimeForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAssetTrack::segmentForTrackTime: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:to:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVAudioEngine::connectMIDI:toNodes:format:block: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVMutableComposition::insertTimeRange:ofAsset:atTime:error: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVURLAsset::compatibleTrackForCompositionTrack: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVVideoComposition::isValidForAsset:timeRange:validationDelegate: missing a [Deprecated] attribute -!missing-enum! AVAssetTrackGroupOutputHandling not bound -!missing-enum! AVMIDIControlChangeMessageType not bound -!missing-enum! AVMIDIMetaEventType not bound -!missing-enum! AVSpeechSynthesisMarkerMark not bound -!missing-enum-value! AVError native value AVErrorAirPlayReceiverTemporarilyUnavailable = -11882 not bound -!missing-enum-value! AVError native value AVErrorFailedToLoadSampleData = -11881 not bound -!missing-enum-value! AVError native value AVErrorInvalidSampleCursor = -11880 not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoMultiviewVideo not bound -!missing-field! AVAssetPlaybackConfigurationOptionStereoVideo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyAlbum not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyApproximateDurationInSeconds not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyArtist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyChannelLayout not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComments not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyComposer not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyCopyright not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyEncodingApplication not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyGenre not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyISRC not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyKeySignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyLyricist not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyNominalBitRate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyRecordedDate not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceBitDepth not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySourceEncoder not bound -!missing-field! AVAudioSequencerInfoDictionaryKeySubTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTempo not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTimeSignature not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTitle not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyTrackNumber not bound -!missing-field! AVAudioSequencerInfoDictionaryKeyYear not bound -!missing-field! AVExtendedNoteOnEventDefaultInstrument not bound -!missing-field! AVPlayerInterstitialEventJoinCue not bound -!missing-field! AVPlayerInterstitialEventLeaveCue not bound -!missing-field! AVPlayerInterstitialEventNoCue not bound -!missing-field! AVURLAssetHTTPUserAgentKey not bound -!missing-field! AVURLAssetPrimarySessionIdentifierKey not bound -!missing-field! AVVideoTransferFunction_Linear not bound -!missing-protocol-conformance! AVPlayerInterstitialEvent should conform to NSCopying -!missing-selector! +AVAssetPlaybackAssistant::assetPlaybackAssistantWithAsset: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! +AVMutableVideoComposition::videoCompositionWithPropertiesOfAsset:prototypeInstruction:completionHandler: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:date: not bound -!missing-selector! +AVPlayerInterstitialEvent::interstitialEventWithPrimaryItem:time: not bound -!missing-selector! +AVSampleBufferGenerator::notifyOfDataReadyForSampleBuffer:completionHandler: not bound -!missing-selector! +AVSpeechSynthesisProviderVoice::updateSpeechVoices not bound -!missing-selector! +AVSpeechUtterance::speechUtteranceWithSSMLRepresentation: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler: not bound -!missing-selector! +AVVideoComposition::videoCompositionWithPropertiesOfAsset:completionHandler: not bound -!missing-selector! AVAssetExportSession::audioTrackGroupHandling not bound -!missing-selector! AVAssetExportSession::setAudioTrackGroupHandling: not bound -!missing-selector! AVAssetPlaybackAssistant::loadPlaybackConfigurationOptionsWithCompletionHandler: not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::isEntireLengthAvailableOnDemand not bound -!missing-selector! AVAssetResourceLoadingContentInformationRequest::setEntireLengthAvailableOnDemand: not bound -!missing-selector! AVAssetTrack::canProvideSampleCursors not bound -!missing-selector! AVAssetTrack::makeSampleCursorAtFirstSampleInDecodeOrder not bound -!missing-selector! AVAssetTrack::makeSampleCursorAtLastSampleInDecodeOrder not bound -!missing-selector! AVAssetTrack::makeSampleCursorWithPresentationTimeStamp: not bound -!missing-selector! AVAudioEngine::connectMIDI:to:format:eventListBlock: not bound -!missing-selector! AVAudioEngine::connectMIDI:toNodes:format:eventListBlock: not bound -!missing-selector! AVAudioSequencer::createAndAppendTrack not bound -!missing-selector! AVAudioSequencer::removeTrack: not bound -!missing-selector! AVAudioSequencer::reverseEvents not bound -!missing-selector! AVAudioSequencer::setUserCallback: not bound -!missing-selector! AVAudioUnitComponent::icon not bound -!missing-selector! AVAudioUnitMIDIInstrument::sendMIDIEventList: not bound -!missing-selector! AVAUPresetEvent::element not bound -!missing-selector! AVAUPresetEvent::initWithScope:element:dictionary: not bound -!missing-selector! AVAUPresetEvent::presetDictionary not bound -!missing-selector! AVAUPresetEvent::scope not bound -!missing-selector! AVAUPresetEvent::setElement: not bound -!missing-selector! AVAUPresetEvent::setScope: not bound -!missing-selector! AVComposition::chapterMetadataGroupsBestMatchingPreferredLanguages: not bound -!missing-selector! AVComposition::chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys: not bound -!missing-selector! AVComposition::mediaSelectionGroupForMediaCharacteristic: not bound -!missing-selector! AVComposition::metadataForFormat: not bound -!missing-selector! AVComposition::unusedTrackID not bound -!missing-selector! AVCompositionTrack::associatedTracksOfType: not bound -!missing-selector! AVCompositionTrack::hasMediaCharacteristic: not bound -!missing-selector! AVCompositionTrack::metadataForFormat: not bound -!missing-selector! AVCompositionTrack::samplePresentationTimeForTrackTime: not bound -!missing-selector! AVExtendedNoteOnEvent::duration not bound -!missing-selector! AVExtendedNoteOnEvent::groupID not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::initWithMIDINote:velocity:instrumentID:groupID:duration: not bound -!missing-selector! AVExtendedNoteOnEvent::instrumentID not bound -!missing-selector! AVExtendedNoteOnEvent::midiNote not bound -!missing-selector! AVExtendedNoteOnEvent::setDuration: not bound -!missing-selector! AVExtendedNoteOnEvent::setGroupID: not bound -!missing-selector! AVExtendedNoteOnEvent::setInstrumentID: not bound -!missing-selector! AVExtendedNoteOnEvent::setMidiNote: not bound -!missing-selector! AVExtendedNoteOnEvent::setVelocity: not bound -!missing-selector! AVExtendedNoteOnEvent::velocity not bound -!missing-selector! AVExtendedTempoEvent::initWithTempo: not bound -!missing-selector! AVExtendedTempoEvent::setTempo: not bound -!missing-selector! AVExtendedTempoEvent::tempo not bound -!missing-selector! AVMIDIChannelEvent::channel not bound -!missing-selector! AVMIDIChannelEvent::setChannel: not bound -!missing-selector! AVMIDIChannelPressureEvent::initWithChannel:pressure: not bound -!missing-selector! AVMIDIChannelPressureEvent::pressure not bound -!missing-selector! AVMIDIChannelPressureEvent::setPressure: not bound -!missing-selector! AVMIDIControlChangeEvent::initWithChannel:messageType:value: not bound -!missing-selector! AVMIDIControlChangeEvent::messageType not bound -!missing-selector! AVMIDIControlChangeEvent::value not bound -!missing-selector! AVMIDIMetaEvent::initWithType:data: not bound -!missing-selector! AVMIDIMetaEvent::type not bound -!missing-selector! AVMIDINoteEvent::channel not bound -!missing-selector! AVMIDINoteEvent::duration not bound -!missing-selector! AVMIDINoteEvent::initWithChannel:key:velocity:duration: not bound -!missing-selector! AVMIDINoteEvent::key not bound -!missing-selector! AVMIDINoteEvent::setChannel: not bound -!missing-selector! AVMIDINoteEvent::setDuration: not bound -!missing-selector! AVMIDINoteEvent::setKey: not bound -!missing-selector! AVMIDINoteEvent::setVelocity: not bound -!missing-selector! AVMIDINoteEvent::velocity not bound -!missing-selector! AVMIDIPitchBendEvent::initWithChannel:value: not bound -!missing-selector! AVMIDIPitchBendEvent::setValue: not bound -!missing-selector! AVMIDIPitchBendEvent::value not bound -!missing-selector! AVMIDIPolyPressureEvent::initWithChannel:key:pressure: not bound -!missing-selector! AVMIDIPolyPressureEvent::key not bound -!missing-selector! AVMIDIPolyPressureEvent::pressure not bound -!missing-selector! AVMIDIPolyPressureEvent::setKey: not bound -!missing-selector! AVMIDIPolyPressureEvent::setPressure: not bound -!missing-selector! AVMIDIProgramChangeEvent::initWithChannel:programNumber: not bound -!missing-selector! AVMIDIProgramChangeEvent::programNumber not bound -!missing-selector! AVMIDIProgramChangeEvent::setProgramNumber: not bound -!missing-selector! AVMIDISysexEvent::initWithData: not bound -!missing-selector! AVMIDISysexEvent::sizeInBytes not bound -!missing-selector! AVMusicTrack::addEvent:atBeat: not bound -!missing-selector! AVMusicTrack::clearEventsInRange: not bound -!missing-selector! AVMusicTrack::copyAndMergeEventsInRange:fromTrack:mergeAtBeat: not bound -!missing-selector! AVMusicTrack::copyEventsInRange:fromTrack:insertAtBeat: not bound -!missing-selector! AVMusicTrack::cutEventsInRange: not bound -!missing-selector! AVMusicTrack::enumerateEventsInRange:usingBlock: not bound -!missing-selector! AVMusicTrack::moveEventsInRange:byAmount: not bound -!missing-selector! AVMusicTrack::setUsesAutomatedParameters: not bound -!missing-selector! AVMusicTrack::usesAutomatedParameters not bound -!missing-selector! AVMusicUserEvent::initWithData: not bound -!missing-selector! AVMusicUserEvent::sizeInBytes not bound -!missing-selector! AVParameterEvent::element not bound -!missing-selector! AVParameterEvent::initWithParameterID:scope:element:value: not bound -!missing-selector! AVParameterEvent::parameterID not bound -!missing-selector! AVParameterEvent::scope not bound -!missing-selector! AVParameterEvent::setElement: not bound -!missing-selector! AVParameterEvent::setParameterID: not bound -!missing-selector! AVParameterEvent::setScope: not bound -!missing-selector! AVParameterEvent::setValue: not bound -!missing-selector! AVParameterEvent::value not bound -!missing-selector! AVPlayer::defaultRate not bound -!missing-selector! AVPlayer::setDefaultRate: not bound -!missing-selector! AVPlayerInterstitialEvent::alignsResumptionWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::alignsStartWithPrimarySegmentBoundary not bound -!missing-selector! AVPlayerInterstitialEvent::cue not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsResumptionWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setAlignsStartWithPrimarySegmentBoundary: not bound -!missing-selector! AVPlayerInterstitialEvent::setCue: not bound -!missing-selector! AVPlayerInterstitialEvent::setDate: not bound -!missing-selector! AVPlayerInterstitialEvent::setIdentifier: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlayoutLimit: not bound -!missing-selector! AVPlayerInterstitialEvent::setPrimaryItem: not bound -!missing-selector! AVPlayerInterstitialEvent::setRestrictions: not bound -!missing-selector! AVPlayerInterstitialEvent::setResumptionOffset: not bound -!missing-selector! AVPlayerInterstitialEvent::setTemplateItems: not bound -!missing-selector! AVPlayerInterstitialEvent::setTime: not bound -!missing-selector! AVPlayerInterstitialEvent::setUserDefinedAttributes: not bound -!missing-selector! AVPlayerInterstitialEvent::setWillPlayOnce: not bound -!missing-selector! AVPlayerInterstitialEvent::willPlayOnce not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:addingToBatch:error: not bound -!missing-selector! AVSampleBufferGenerator::createSampleBufferForRequest:error: not bound -!missing-selector! AVSampleBufferGenerator::initWithAsset:timebase: not bound -!missing-selector! AVSampleBufferGenerator::makeBatch not bound -!missing-selector! AVSampleBufferGeneratorBatch::cancel not bound -!missing-selector! AVSampleBufferGeneratorBatch::makeDataReadyWithCompletionHandler: not bound -!missing-selector! AVSampleBufferRequest::direction not bound -!missing-selector! AVSampleBufferRequest::initWithStartCursor: not bound -!missing-selector! AVSampleBufferRequest::limitCursor not bound -!missing-selector! AVSampleBufferRequest::maxSampleCount not bound -!missing-selector! AVSampleBufferRequest::mode not bound -!missing-selector! AVSampleBufferRequest::overrideTime not bound -!missing-selector! AVSampleBufferRequest::preferredMinSampleCount not bound -!missing-selector! AVSampleBufferRequest::setDirection: not bound -!missing-selector! AVSampleBufferRequest::setLimitCursor: not bound -!missing-selector! AVSampleBufferRequest::setMaxSampleCount: not bound -!missing-selector! AVSampleBufferRequest::setMode: not bound -!missing-selector! AVSampleBufferRequest::setOverrideTime: not bound -!missing-selector! AVSampleBufferRequest::setPreferredMinSampleCount: not bound -!missing-selector! AVSampleBufferRequest::startCursor not bound -!missing-selector! AVSpeechSynthesisMarker::byteSampleOffset not bound -!missing-selector! AVSpeechSynthesisMarker::initWithMarkerType:forTextRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::mark not bound -!missing-selector! AVSpeechSynthesisMarker::setByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::setMark: not bound -!missing-selector! AVSpeechSynthesisMarker::setTextRange: not bound -!missing-selector! AVSpeechSynthesisMarker::textRange not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::cancelSpeechRequest not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechSynthesisOutputMetadataBlock: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::setSpeechVoices: not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechSynthesisOutputMetadataBlock not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::speechVoices not bound -!missing-selector! AVSpeechSynthesisProviderAudioUnit::synthesizeSpeechRequest: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::initWithSSMLRepresentation:voice: not bound -!missing-selector! AVSpeechSynthesisProviderRequest::ssmlRepresentation not bound -!missing-selector! AVSpeechSynthesisProviderRequest::voice not bound -!missing-selector! AVSpeechSynthesisProviderVoice::age not bound -!missing-selector! AVSpeechSynthesisProviderVoice::gender not bound -!missing-selector! AVSpeechSynthesisProviderVoice::identifier not bound -!missing-selector! AVSpeechSynthesisProviderVoice::initWithName:identifier:primaryLanguages:supportedLanguages: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::name not bound -!missing-selector! AVSpeechSynthesisProviderVoice::primaryLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setAge: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setGender: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVersion: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::setVoiceSize: not bound -!missing-selector! AVSpeechSynthesisProviderVoice::supportedLanguages not bound -!missing-selector! AVSpeechSynthesisProviderVoice::version not bound -!missing-selector! AVSpeechSynthesisProviderVoice::voiceSize not bound -!missing-selector! AVSpeechSynthesizer::writeUtterance:toBufferCallback:toMarkerCallback: not bound -!missing-selector! AVSpeechUtterance::initWithSSMLRepresentation: not bound -!missing-selector! AVURLAsset::httpSessionIdentifier not bound -!missing-type! AVAssetPlaybackAssistant not bound -!missing-type! AVAUPresetEvent not bound -!missing-type! AVExtendedNoteOnEvent not bound -!missing-type! AVExtendedTempoEvent not bound -!missing-type! AVMIDIChannelEvent not bound -!missing-type! AVMIDIChannelPressureEvent not bound -!missing-type! AVMIDIControlChangeEvent not bound -!missing-type! AVMIDIMetaEvent not bound -!missing-type! AVMIDINoteEvent not bound -!missing-type! AVMIDIPitchBendEvent not bound -!missing-type! AVMIDIPolyPressureEvent not bound -!missing-type! AVMIDIProgramChangeEvent not bound -!missing-type! AVMIDISysexEvent not bound -!missing-type! AVMusicEvent not bound -!missing-type! AVMusicUserEvent not bound -!missing-type! AVParameterEvent not bound -!missing-type! AVSampleBufferGenerator not bound -!missing-type! AVSampleBufferGeneratorBatch not bound -!missing-type! AVSampleBufferRequest not bound -!missing-type! AVSpeechSynthesisMarker not bound -!missing-type! AVSpeechSynthesisProviderAudioUnit not bound -!missing-type! AVSpeechSynthesisProviderRequest not bound -!missing-type! AVSpeechSynthesisProviderVoice not bound -!missing-enum-value! AVSpeechSynthesisVoiceQuality native value AVSpeechSynthesisVoiceQualityPremium = 3 not bound -!missing-selector! AVPlayerLayer::copyDisplayedPixelBuffer not bound -!missing-enum! AVPlayerInterstitialEventAssetListResponseStatus not bound -!missing-enum-value! AVError native value AVErrorEncodeFailed = -11883 not bound -!missing-enum-value! AVError native value AVErrorSandboxExtensionDenied = -11884 not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeErrorKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeEventKey not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeNotification not bound -!missing-field! AVPlayerInterstitialEventMonitorAssetListResponseStatusDidChangeStatusKey not bound -!missing-selector! AVPlayerInterstitialEvent::assetListResponse not bound -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::enqueueSampleBuffer: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::error missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flush missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::flushAndRemoveImage missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::isReadyForMoreMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requestMediaDataWhenReadyOnQueue:usingBlock: missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::requiresFlushToResumeDecoding missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::status missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::stopRequestingMediaData missing a [Deprecated] attribute -!deprecated-attribute-missing! AVSampleBufferDisplayLayer::timebase missing a [Deprecated] attribute -!extra-designated-initializer! AVPlayerLooper::initWithPlayer:templateItem:timeRange: is incorrectly decorated with an [DesignatedInitializer] attribute -!extra-enum-value! Managed value 1684369017 for AVAudioSessionRecordPermission.Denied is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 1735552628 for AVAudioSessionRecordPermission.Granted is available for the current platform while the value in the native header is not -!extra-enum-value! Managed value 1970168948 for AVAudioSessionRecordPermission.Undetermined is available for the current platform while the value in the native header is not -!missing-enum! AVAudioVoiceProcessingSpeechActivityEvent not bound -!missing-enum! AVAuthorizationStatus not bound -!missing-enum! AVCaptureAutoFocusRangeRestriction not bound -!missing-enum! AVCaptureAutoFocusSystem not bound -!missing-enum! AVCaptureCenterStageControlMode not bound -!missing-enum! AVCaptureColorSpace not bound -!missing-enum! AVCaptureExposureMode not bound -!missing-enum! AVCaptureFlashMode not bound -!missing-enum! AVCaptureFocusMode not bound -!missing-enum! AVCaptureLensStabilizationStatus not bound -!missing-enum! AVCaptureMicrophoneMode not bound -!missing-enum! AVCapturePhotoOutputCaptureReadiness not bound -!missing-enum! AVCapturePhotoQualityPrioritization not bound -!missing-enum! AVCapturePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions not bound -!missing-enum! AVCapturePrimaryConstituentDeviceSwitchingBehavior not bound -!missing-enum! AVCaptureSessionInterruptionReason not bound -!missing-enum! AVCaptureSystemPressureFactors not bound -!missing-enum! AVCaptureSystemUserInterface not bound -!missing-enum! AVCaptureTorchMode not bound -!missing-enum! AVCaptureWhiteBalanceMode not bound -!missing-enum! AVPlayerLooperItemOrdering not bound -!missing-enum! AVSpeechSynthesisPersonalVoiceAuthorizationStatus not bound -!missing-enum! AVSpeechSynthesisVoiceTraits not bound -!missing-field! AVAudioApplicationInputMuteStateChangeNotification not bound -!missing-field! AVAudioApplicationMuteStateKey not bound -!missing-field! AVAudioSessionPortContinuityMicrophone not bound -!missing-field! AVCaptureDeviceSubjectAreaDidChangeNotification not bound -!missing-field! AVCaptureDeviceTypeContinuityCamera not bound -!missing-field! AVCaptureDeviceTypeMicrophone not bound -!missing-field! AVCaptureDeviceWasConnectedNotification not bound -!missing-field! AVCaptureDeviceWasDisconnectedNotification not bound -!missing-field! AVCaptureExposureDurationCurrent not bound -!missing-field! AVCaptureExposureTargetBiasCurrent not bound -!missing-field! AVCaptureISOCurrent not bound -!missing-field! AVCaptureLensPositionCurrent not bound -!missing-field! AVCaptureMaxAvailableTorchLevel not bound -!missing-field! AVCaptureSystemPressureLevelCritical not bound -!missing-field! AVCaptureSystemPressureLevelFair not bound -!missing-field! AVCaptureSystemPressureLevelNominal not bound -!missing-field! AVCaptureSystemPressureLevelSerious not bound -!missing-field! AVCaptureSystemPressureLevelShutdown not bound -!missing-field! AVCaptureWhiteBalanceGainsCurrent not bound -!missing-field! AVContentKeySessionServerPlaybackContextOptionProtocolVersions not bound -!missing-field! AVContentKeySessionServerPlaybackContextOptionServerChallenge not bound -!missing-field! AVFileTypeAHAP not bound -!missing-field! AVMediaCharacteristicCarriesVideoStereoMetadata not bound -!missing-field! AVMediaCharacteristicContainsStereoMultiviewVideo not bound -!missing-field! AVMediaCharacteristicEnhancesSpeechIntelligibility not bound -!missing-field! AVMediaCharacteristicIndicatesHorizontalFieldOfView not bound -!missing-field! AVMediaCharacteristicTactileMinimal not bound -!missing-field! AVMediaTypeHaptic not bound -!missing-field! AVMetadataObjectTypeCatBody not bound -!missing-field! AVMetadataObjectTypeDogBody not bound -!missing-field! AVMetadataObjectTypeHumanBody not bound -!missing-field! AVMetadataObjectTypeHumanFullBody not bound -!missing-field! AVMetadataObjectTypeSalientObject not bound -!missing-field! AVOutputSettingsPresetMVHEVC1440x1440 not bound -!missing-field! AVOutputSettingsPresetMVHEVC960x960 not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotification not bound -!missing-field! AVSampleBufferVideoRendererDidFailToDecodeNotificationErrorKey not bound -!missing-field! AVSampleBufferVideoRendererRequiresFlushToResumeDecodingDidChangeNotification not bound -!missing-field! AVSpeechSynthesisAvailableVoicesDidChangeNotification not bound -!missing-field! AVURLAssetOverrideMIMETypeKey not bound -!missing-pinvoke! AVCaptureReactionSystemImageNameForType is not bound -!missing-protocol! AVAudioRecorderDelegate not bound -!missing-protocol! AVCaptureAudioDataOutputSampleBufferDelegate not bound -!missing-protocol! AVCaptureDataOutputSynchronizerDelegate not bound -!missing-protocol! AVCaptureDepthDataOutputDelegate not bound -!missing-protocol! AVCaptureMetadataOutputObjectsDelegate not bound -!missing-protocol! AVCapturePhotoCaptureDelegate not bound -!missing-protocol! AVCapturePhotoFileDataRepresentationCustomizer not bound -!missing-protocol! AVCapturePhotoOutputReadinessCoordinatorDelegate not bound -!missing-protocol! AVCaptureVideoDataOutputSampleBufferDelegate not bound -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didUpdatePersistableContentKey:forContentKeyIdentifier: not found -!missing-protocol-member! AVSpeechSynthesizerDelegate::speechSynthesizer:willSpeakMarker:utterance: not found -!missing-selector! +AVAssetVariantQualifier::predicateForBinauralAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForDownmixAudio:mediaSelectionOption: not bound -!missing-selector! +AVAssetVariantQualifier::predicateForImmersiveAudio:mediaSelectionOption: not bound -!missing-selector! +AVCaptureAutoExposureBracketedStillImageSettings::autoExposureSettingsWithExposureTargetBias: not bound -!missing-selector! +AVCaptureDevice::activeMicrophoneMode not bound -!missing-selector! +AVCaptureDevice::authorizationStatusForMediaType: not bound -!missing-selector! +AVCaptureDevice::centerStageControlMode not bound -!missing-selector! +AVCaptureDevice::defaultDeviceWithDeviceType:mediaType:position: not bound -!missing-selector! +AVCaptureDevice::defaultDeviceWithMediaType: not bound -!missing-selector! +AVCaptureDevice::deviceWithUniqueID: not bound -!missing-selector! +AVCaptureDevice::extrinsicMatrixFromDevice:toDevice: not bound -!missing-selector! +AVCaptureDevice::isCenterStageEnabled not bound -!missing-selector! +AVCaptureDevice::isPortraitEffectEnabled not bound -!missing-selector! +AVCaptureDevice::isStudioLightEnabled not bound -!missing-selector! +AVCaptureDevice::preferredMicrophoneMode not bound -!missing-selector! +AVCaptureDevice::reactionEffectGesturesEnabled not bound -!missing-selector! +AVCaptureDevice::reactionEffectsEnabled not bound -!missing-selector! +AVCaptureDevice::requestAccessForMediaType:completionHandler: not bound -!missing-selector! +AVCaptureDevice::setCenterStageControlMode: not bound -!missing-selector! +AVCaptureDevice::setCenterStageEnabled: not bound -!missing-selector! +AVCaptureDevice::setUserPreferredCamera: not bound -!missing-selector! +AVCaptureDevice::showSystemUserInterface: not bound -!missing-selector! +AVCaptureDevice::systemPreferredCamera not bound -!missing-selector! +AVCaptureDevice::userPreferredCamera not bound -!missing-selector! +AVCaptureDeviceDiscoverySession::discoverySessionWithDeviceTypes:mediaType:position: not bound -!missing-selector! +AVCaptureDeviceInput::deviceInputWithDevice:error: not bound -!missing-selector! +AVCaptureManualExposureBracketedStillImageSettings::manualExposureSettingsWithExposureDuration:ISO: not bound -!missing-selector! +AVCaptureMetadataInput::metadataInputWithFormatDescription:clock: not bound -!missing-selector! +AVCaptureMultiCamSession::isMultiCamSupported not bound -!missing-selector! +AVCapturePhotoBracketSettings::photoBracketSettingsWithRawPixelFormatType:processedFormat:bracketedSettings: not bound -!missing-selector! +AVCapturePhotoBracketSettings::photoBracketSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:bracketedSettings: not bound -!missing-selector! +AVCapturePhotoOutput::isAppleProRAWPixelFormat: not bound -!missing-selector! +AVCapturePhotoOutput::isBayerRAWPixelFormat: not bound -!missing-selector! +AVCapturePhotoSettings::photoSettings not bound -!missing-selector! +AVCapturePhotoSettings::photoSettingsFromPhotoSettings: not bound -!missing-selector! +AVCapturePhotoSettings::photoSettingsWithFormat: not bound -!missing-selector! +AVCapturePhotoSettings::photoSettingsWithRawPixelFormatType: not bound -!missing-selector! +AVCapturePhotoSettings::photoSettingsWithRawPixelFormatType:processedFormat: not bound -!missing-selector! +AVCapturePhotoSettings::photoSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType: not bound -!missing-selector! +AVSpeechSynthesizer::personalVoiceAuthorizationStatus not bound -!missing-selector! +AVSpeechSynthesizer::requestPersonalVoiceAuthorizationWithCompletionHandler: not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isBinaural not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isDownmix not bound -!missing-selector! AVAssetVariantAudioRenditionSpecificAttributes::isImmersive not bound -!missing-selector! AVAssetVariantVideoAttributes::videoLayoutAttributes not bound -!missing-selector! AVAssetVariantVideoLayoutAttributes::stereoViewComponents not bound -!missing-selector! AVAssetWriter::initialMovieFragmentInterval not bound -!missing-selector! AVAssetWriter::setInitialMovieFragmentInterval: not bound -!missing-selector! AVAudioInputNode::setMutedSpeechActivityEventListener: not bound -!missing-selector! AVAudioRecorder::averagePowerForChannel: not bound -!missing-selector! AVAudioRecorder::channelAssignments not bound -!missing-selector! AVAudioRecorder::currentTime not bound -!missing-selector! AVAudioRecorder::delegate not bound -!missing-selector! AVAudioRecorder::deleteRecording not bound -!missing-selector! AVAudioRecorder::deviceCurrentTime not bound -!missing-selector! AVAudioRecorder::format not bound -!missing-selector! AVAudioRecorder::initWithURL:format:error: not bound -!missing-selector! AVAudioRecorder::initWithURL:settings:error: not bound -!missing-selector! AVAudioRecorder::isMeteringEnabled not bound -!missing-selector! AVAudioRecorder::isRecording not bound -!missing-selector! AVAudioRecorder::pause not bound -!missing-selector! AVAudioRecorder::peakPowerForChannel: not bound -!missing-selector! AVAudioRecorder::prepareToRecord not bound -!missing-selector! AVAudioRecorder::record not bound -!missing-selector! AVAudioRecorder::recordAtTime: not bound -!missing-selector! AVAudioRecorder::recordAtTime:forDuration: not bound -!missing-selector! AVAudioRecorder::recordForDuration: not bound -!missing-selector! AVAudioRecorder::setChannelAssignments: not bound -!missing-selector! AVAudioRecorder::setDelegate: not bound -!missing-selector! AVAudioRecorder::setMeteringEnabled: not bound -!missing-selector! AVAudioRecorder::settings not bound -!missing-selector! AVAudioRecorder::stop not bound -!missing-selector! AVAudioRecorder::updateMeters not bound -!missing-selector! AVAudioRecorder::url not bound -!missing-selector! AVAudioSession::prefersInterruptionOnRouteDisconnect not bound -!missing-selector! AVAudioSession::setPrefersInterruptionOnRouteDisconnect:error: not bound -!missing-selector! AVCaptureAudioDataOutput::init not bound -!missing-selector! AVCaptureAudioDataOutput::recommendedAudioSettingsForAssetWriterWithOutputFileType: not bound -!missing-selector! AVCaptureAudioDataOutput::sampleBufferCallbackQueue not bound -!missing-selector! AVCaptureAudioDataOutput::sampleBufferDelegate not bound -!missing-selector! AVCaptureAudioDataOutput::setSampleBufferDelegate:queue: not bound -!missing-selector! AVCaptureAutoExposureBracketedStillImageSettings::exposureTargetBias not bound -!missing-selector! AVCaptureConnection::setVideoRotationAngle: not bound -!missing-selector! AVCaptureDataOutputSynchronizer::dataOutputs not bound -!missing-selector! AVCaptureDataOutputSynchronizer::delegate not bound -!missing-selector! AVCaptureDataOutputSynchronizer::delegateCallbackQueue not bound -!missing-selector! AVCaptureDataOutputSynchronizer::initWithDataOutputs: not bound -!missing-selector! AVCaptureDataOutputSynchronizer::setDelegate:queue: not bound -!missing-selector! AVCaptureDepthDataOutput::alwaysDiscardsLateDepthData not bound -!missing-selector! AVCaptureDepthDataOutput::delegate not bound -!missing-selector! AVCaptureDepthDataOutput::delegateCallbackQueue not bound -!missing-selector! AVCaptureDepthDataOutput::init not bound -!missing-selector! AVCaptureDepthDataOutput::isFilteringEnabled not bound -!missing-selector! AVCaptureDepthDataOutput::setAlwaysDiscardsLateDepthData: not bound -!missing-selector! AVCaptureDepthDataOutput::setDelegate:callbackQueue: not bound -!missing-selector! AVCaptureDepthDataOutput::setFilteringEnabled: not bound -!missing-selector! AVCaptureDevice::activeColorSpace not bound -!missing-selector! AVCaptureDevice::activeDepthDataFormat not bound -!missing-selector! AVCaptureDevice::activeDepthDataMinFrameDuration not bound -!missing-selector! AVCaptureDevice::activeFormat not bound -!missing-selector! AVCaptureDevice::activeMaxExposureDuration not bound -!missing-selector! AVCaptureDevice::activePrimaryConstituentDevice not bound -!missing-selector! AVCaptureDevice::activePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions not bound -!missing-selector! AVCaptureDevice::activePrimaryConstituentDeviceSwitchingBehavior not bound -!missing-selector! AVCaptureDevice::activeVideoMaxFrameDuration not bound -!missing-selector! AVCaptureDevice::activeVideoMinFrameDuration not bound -!missing-selector! AVCaptureDevice::autoFocusRangeRestriction not bound -!missing-selector! AVCaptureDevice::automaticallyAdjustsFaceDrivenAutoExposureEnabled not bound -!missing-selector! AVCaptureDevice::automaticallyAdjustsFaceDrivenAutoFocusEnabled not bound -!missing-selector! AVCaptureDevice::automaticallyAdjustsVideoHDREnabled not bound -!missing-selector! AVCaptureDevice::automaticallyEnablesLowLightBoostWhenAvailable not bound -!missing-selector! AVCaptureDevice::availableReactionTypes not bound -!missing-selector! AVCaptureDevice::cancelVideoZoomRamp not bound -!missing-selector! AVCaptureDevice::canPerformReactionEffects not bound -!missing-selector! AVCaptureDevice::chromaticityValuesForDeviceWhiteBalanceGains: not bound -!missing-selector! AVCaptureDevice::companionDeskViewCamera not bound -!missing-selector! AVCaptureDevice::constituentDevices not bound -!missing-selector! AVCaptureDevice::deviceType not bound -!missing-selector! AVCaptureDevice::deviceWhiteBalanceGains not bound -!missing-selector! AVCaptureDevice::deviceWhiteBalanceGainsForChromaticityValues: not bound -!missing-selector! AVCaptureDevice::deviceWhiteBalanceGainsForTemperatureAndTintValues: not bound -!missing-selector! AVCaptureDevice::exposureDuration not bound -!missing-selector! AVCaptureDevice::exposureMode not bound -!missing-selector! AVCaptureDevice::exposurePointOfInterest not bound -!missing-selector! AVCaptureDevice::exposureTargetBias not bound -!missing-selector! AVCaptureDevice::exposureTargetOffset not bound -!missing-selector! AVCaptureDevice::fallbackPrimaryConstituentDevices not bound -!missing-selector! AVCaptureDevice::focusMode not bound -!missing-selector! AVCaptureDevice::focusPointOfInterest not bound -!missing-selector! AVCaptureDevice::formats not bound -!missing-selector! AVCaptureDevice::grayWorldDeviceWhiteBalanceGains not bound -!missing-selector! AVCaptureDevice::hasFlash not bound -!missing-selector! AVCaptureDevice::hasMediaType: not bound -!missing-selector! AVCaptureDevice::hasTorch not bound -!missing-selector! AVCaptureDevice::isAdjustingExposure not bound -!missing-selector! AVCaptureDevice::isAdjustingFocus not bound -!missing-selector! AVCaptureDevice::isAdjustingWhiteBalance not bound -!missing-selector! AVCaptureDevice::isAutoFocusRangeRestrictionSupported not bound -!missing-selector! AVCaptureDevice::isCenterStageActive not bound -!missing-selector! AVCaptureDevice::isConnected not bound -!missing-selector! AVCaptureDevice::isContinuityCamera not bound -!missing-selector! AVCaptureDevice::isExposureModeSupported: not bound -!missing-selector! AVCaptureDevice::isExposurePointOfInterestSupported not bound -!missing-selector! AVCaptureDevice::isFaceDrivenAutoExposureEnabled not bound -!missing-selector! AVCaptureDevice::isFaceDrivenAutoFocusEnabled not bound -!missing-selector! AVCaptureDevice::isFlashAvailable not bound -!missing-selector! AVCaptureDevice::isFocusModeSupported: not bound -!missing-selector! AVCaptureDevice::isFocusPointOfInterestSupported not bound -!missing-selector! AVCaptureDevice::isGeometricDistortionCorrectionEnabled not bound -!missing-selector! AVCaptureDevice::isGeometricDistortionCorrectionSupported not bound -!missing-selector! AVCaptureDevice::isGlobalToneMappingEnabled not bound -!missing-selector! AVCaptureDevice::isLockingFocusWithCustomLensPositionSupported not bound -!missing-selector! AVCaptureDevice::isLockingWhiteBalanceWithCustomDeviceGainsSupported not bound -!missing-selector! AVCaptureDevice::isLowLightBoostEnabled not bound -!missing-selector! AVCaptureDevice::isLowLightBoostSupported not bound -!missing-selector! AVCaptureDevice::ISO not bound -!missing-selector! AVCaptureDevice::isPortraitEffectActive not bound -!missing-selector! AVCaptureDevice::isRampingVideoZoom not bound -!missing-selector! AVCaptureDevice::isSmoothAutoFocusEnabled not bound -!missing-selector! AVCaptureDevice::isSmoothAutoFocusSupported not bound -!missing-selector! AVCaptureDevice::isStudioLightActive not bound -!missing-selector! AVCaptureDevice::isSubjectAreaChangeMonitoringEnabled not bound -!missing-selector! AVCaptureDevice::isSuspended not bound -!missing-selector! AVCaptureDevice::isTorchActive not bound -!missing-selector! AVCaptureDevice::isTorchAvailable not bound -!missing-selector! AVCaptureDevice::isTorchModeSupported: not bound -!missing-selector! AVCaptureDevice::isVideoHDREnabled not bound -!missing-selector! AVCaptureDevice::isVirtualDevice not bound -!missing-selector! AVCaptureDevice::isWhiteBalanceModeSupported: not bound -!missing-selector! AVCaptureDevice::lensAperture not bound -!missing-selector! AVCaptureDevice::lensPosition not bound -!missing-selector! AVCaptureDevice::localizedName not bound -!missing-selector! AVCaptureDevice::lockForConfiguration: not bound -!missing-selector! AVCaptureDevice::manufacturer not bound -!missing-selector! AVCaptureDevice::maxAvailableVideoZoomFactor not bound -!missing-selector! AVCaptureDevice::maxExposureTargetBias not bound -!missing-selector! AVCaptureDevice::maxWhiteBalanceGain not bound -!missing-selector! AVCaptureDevice::minAvailableVideoZoomFactor not bound -!missing-selector! AVCaptureDevice::minExposureTargetBias not bound -!missing-selector! AVCaptureDevice::minimumFocusDistance not bound -!missing-selector! AVCaptureDevice::modelID not bound -!missing-selector! AVCaptureDevice::performEffectForReaction: not bound -!missing-selector! AVCaptureDevice::position not bound -!missing-selector! AVCaptureDevice::primaryConstituentDeviceRestrictedSwitchingBehaviorConditions not bound -!missing-selector! AVCaptureDevice::primaryConstituentDeviceSwitchingBehavior not bound -!missing-selector! AVCaptureDevice::rampToVideoZoomFactor:withRate: not bound -!missing-selector! AVCaptureDevice::reactionEffectsInProgress not bound -!missing-selector! AVCaptureDevice::setActiveColorSpace: not bound -!missing-selector! AVCaptureDevice::setActiveDepthDataFormat: not bound -!missing-selector! AVCaptureDevice::setActiveDepthDataMinFrameDuration: not bound -!missing-selector! AVCaptureDevice::setActiveFormat: not bound -!missing-selector! AVCaptureDevice::setActiveMaxExposureDuration: not bound -!missing-selector! AVCaptureDevice::setActiveVideoMaxFrameDuration: not bound -!missing-selector! AVCaptureDevice::setActiveVideoMinFrameDuration: not bound -!missing-selector! AVCaptureDevice::setAutoFocusRangeRestriction: not bound -!missing-selector! AVCaptureDevice::setAutomaticallyAdjustsFaceDrivenAutoExposureEnabled: not bound -!missing-selector! AVCaptureDevice::setAutomaticallyAdjustsFaceDrivenAutoFocusEnabled: not bound -!missing-selector! AVCaptureDevice::setAutomaticallyAdjustsVideoHDREnabled: not bound -!missing-selector! AVCaptureDevice::setAutomaticallyEnablesLowLightBoostWhenAvailable: not bound -!missing-selector! AVCaptureDevice::setExposureMode: not bound -!missing-selector! AVCaptureDevice::setExposureModeCustomWithDuration:ISO:completionHandler: not bound -!missing-selector! AVCaptureDevice::setExposurePointOfInterest: not bound -!missing-selector! AVCaptureDevice::setExposureTargetBias:completionHandler: not bound -!missing-selector! AVCaptureDevice::setFaceDrivenAutoExposureEnabled: not bound -!missing-selector! AVCaptureDevice::setFaceDrivenAutoFocusEnabled: not bound -!missing-selector! AVCaptureDevice::setFallbackPrimaryConstituentDevices: not bound -!missing-selector! AVCaptureDevice::setFocusMode: not bound -!missing-selector! AVCaptureDevice::setFocusModeLockedWithLensPosition:completionHandler: not bound -!missing-selector! AVCaptureDevice::setFocusPointOfInterest: not bound -!missing-selector! AVCaptureDevice::setGeometricDistortionCorrectionEnabled: not bound -!missing-selector! AVCaptureDevice::setGlobalToneMappingEnabled: not bound -!missing-selector! AVCaptureDevice::setPrimaryConstituentDeviceSwitchingBehavior:restrictedSwitchingBehaviorConditions: not bound -!missing-selector! AVCaptureDevice::setSmoothAutoFocusEnabled: not bound -!missing-selector! AVCaptureDevice::setSubjectAreaChangeMonitoringEnabled: not bound -!missing-selector! AVCaptureDevice::setTorchMode: not bound -!missing-selector! AVCaptureDevice::setTorchModeOnWithLevel:error: not bound -!missing-selector! AVCaptureDevice::setVideoHDREnabled: not bound -!missing-selector! AVCaptureDevice::setVideoZoomFactor: not bound -!missing-selector! AVCaptureDevice::setWhiteBalanceMode: not bound -!missing-selector! AVCaptureDevice::setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler: not bound -!missing-selector! AVCaptureDevice::supportedFallbackPrimaryConstituentDevices not bound -!missing-selector! AVCaptureDevice::supportsAVCaptureSessionPreset: not bound -!missing-selector! AVCaptureDevice::systemPressureState not bound -!missing-selector! AVCaptureDevice::temperatureAndTintValuesForDeviceWhiteBalanceGains: not bound -!missing-selector! AVCaptureDevice::torchLevel not bound -!missing-selector! AVCaptureDevice::torchMode not bound -!missing-selector! AVCaptureDevice::uniqueID not bound -!missing-selector! AVCaptureDevice::unlockForConfiguration not bound -!missing-selector! AVCaptureDevice::videoZoomFactor not bound -!missing-selector! AVCaptureDevice::virtualDeviceSwitchOverVideoZoomFactors not bound -!missing-selector! AVCaptureDevice::whiteBalanceMode not bound -!missing-selector! AVCaptureDeviceDiscoverySession::devices not bound -!missing-selector! AVCaptureDeviceDiscoverySession::supportedMultiCamDeviceSets not bound -!missing-selector! AVCaptureDeviceFormat::autoFocusSystem not bound -!missing-selector! AVCaptureDeviceFormat::formatDescription not bound -!missing-selector! AVCaptureDeviceFormat::geometricDistortionCorrectedVideoFieldOfView not bound -!missing-selector! AVCaptureDeviceFormat::isCenterStageSupported not bound -!missing-selector! AVCaptureDeviceFormat::isGlobalToneMappingSupported not bound -!missing-selector! AVCaptureDeviceFormat::isHighestPhotoQualitySupported not bound -!missing-selector! AVCaptureDeviceFormat::isHighPhotoQualitySupported not bound -!missing-selector! AVCaptureDeviceFormat::isMultiCamSupported not bound -!missing-selector! AVCaptureDeviceFormat::isPortraitEffectsMatteStillImageDeliverySupported not bound -!missing-selector! AVCaptureDeviceFormat::isPortraitEffectSupported not bound -!missing-selector! AVCaptureDeviceFormat::isStudioLightSupported not bound -!missing-selector! AVCaptureDeviceFormat::isVideoBinned not bound -!missing-selector! AVCaptureDeviceFormat::isVideoHDRSupported not bound -!missing-selector! AVCaptureDeviceFormat::isVideoStabilizationModeSupported: not bound -!missing-selector! AVCaptureDeviceFormat::maxExposureDuration not bound -!missing-selector! AVCaptureDeviceFormat::maxISO not bound -!missing-selector! AVCaptureDeviceFormat::mediaType not bound -!missing-selector! AVCaptureDeviceFormat::minExposureDuration not bound -!missing-selector! AVCaptureDeviceFormat::minISO not bound -!missing-selector! AVCaptureDeviceFormat::reactionEffectsSupported not bound -!missing-selector! AVCaptureDeviceFormat::secondaryNativeResolutionZoomFactors not bound -!missing-selector! AVCaptureDeviceFormat::supportedColorSpaces not bound -!missing-selector! AVCaptureDeviceFormat::supportedDepthDataFormats not bound -!missing-selector! AVCaptureDeviceFormat::supportedMaxPhotoDimensions not bound -!missing-selector! AVCaptureDeviceFormat::unsupportedCaptureOutputClasses not bound -!missing-selector! AVCaptureDeviceFormat::videoFieldOfView not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForCenterStage not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForPortraitEffect not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForReactionEffectsInProgress not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForStudioLight not bound -!missing-selector! AVCaptureDeviceFormat::videoMaxZoomFactor not bound -!missing-selector! AVCaptureDeviceFormat::videoMaxZoomFactorForCenterStage not bound -!missing-selector! AVCaptureDeviceFormat::videoMinZoomFactorForCenterStage not bound -!missing-selector! AVCaptureDeviceFormat::videoSupportedFrameRateRanges not bound -!missing-selector! AVCaptureDeviceFormat::videoZoomFactorUpscaleThreshold not bound -!missing-selector! AVCaptureDeviceInput::device not bound -!missing-selector! AVCaptureDeviceInput::initWithDevice:error: not bound -!missing-selector! AVCaptureDeviceInput::portsWithMediaType:sourceDeviceType:sourceDevicePosition: not bound -!missing-selector! AVCaptureDeviceInput::setUnifiedAutoExposureDefaultsEnabled: not bound -!missing-selector! AVCaptureDeviceInput::setVideoMinFrameDurationOverride: not bound -!missing-selector! AVCaptureDeviceInput::unifiedAutoExposureDefaultsEnabled not bound -!missing-selector! AVCaptureDeviceInput::videoMinFrameDurationOverride not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::device not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::initWithDevice:previewLayer: not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::previewLayer not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelCapture not bound -!missing-selector! AVCaptureDeviceRotationCoordinator::videoRotationAngleForHorizonLevelPreview not bound -!missing-selector! AVCaptureManualExposureBracketedStillImageSettings::exposureDuration not bound -!missing-selector! AVCaptureManualExposureBracketedStillImageSettings::ISO not bound -!missing-selector! AVCaptureMetadataInput::appendTimedMetadataGroup:error: not bound -!missing-selector! AVCaptureMetadataInput::initWithFormatDescription:clock: not bound -!missing-selector! AVCaptureMetadataOutput::availableMetadataObjectTypes not bound -!missing-selector! AVCaptureMetadataOutput::init not bound -!missing-selector! AVCaptureMetadataOutput::metadataObjectsCallbackQueue not bound -!missing-selector! AVCaptureMetadataOutput::metadataObjectsDelegate not bound -!missing-selector! AVCaptureMetadataOutput::metadataObjectTypes not bound -!missing-selector! AVCaptureMetadataOutput::rectOfInterest not bound -!missing-selector! AVCaptureMetadataOutput::setMetadataObjectsDelegate:queue: not bound -!missing-selector! AVCaptureMetadataOutput::setMetadataObjectTypes: not bound -!missing-selector! AVCaptureMetadataOutput::setRectOfInterest: not bound -!missing-selector! AVCaptureMovieFileOutput::availableVideoCodecTypes not bound -!missing-selector! AVCaptureMovieFileOutput::init not bound -!missing-selector! AVCaptureMovieFileOutput::isPrimaryConstituentDeviceSwitchingBehaviorForRecordingEnabled not bound -!missing-selector! AVCaptureMovieFileOutput::metadata not bound -!missing-selector! AVCaptureMovieFileOutput::movieFragmentInterval not bound -!missing-selector! AVCaptureMovieFileOutput::outputSettingsForConnection: not bound -!missing-selector! AVCaptureMovieFileOutput::primaryConstituentDeviceRestrictedSwitchingBehaviorConditionsForRecording not bound -!missing-selector! AVCaptureMovieFileOutput::primaryConstituentDeviceSwitchingBehaviorForRecording not bound -!missing-selector! AVCaptureMovieFileOutput::recordsVideoOrientationAndMirroringChangesAsMetadataTrackForConnection: not bound -!missing-selector! AVCaptureMovieFileOutput::setMetadata: not bound -!missing-selector! AVCaptureMovieFileOutput::setMovieFragmentInterval: not bound -!missing-selector! AVCaptureMovieFileOutput::setOutputSettings:forConnection: not bound -!missing-selector! AVCaptureMovieFileOutput::setPrimaryConstituentDeviceSwitchingBehaviorForRecording:restrictedSwitchingBehaviorConditions: not bound -!missing-selector! AVCaptureMovieFileOutput::setPrimaryConstituentDeviceSwitchingBehaviorForRecordingEnabled: not bound -!missing-selector! AVCaptureMovieFileOutput::setRecordsVideoOrientationAndMirroringChanges:asMetadataTrackForConnection: not bound -!missing-selector! AVCaptureMovieFileOutput::supportedOutputSettingsKeysForConnection: not bound -!missing-selector! AVCaptureMultiCamSession::hardwareCost not bound -!missing-selector! AVCaptureMultiCamSession::systemPressureCost not bound -!missing-selector! AVCapturePhoto::bracketSettings not bound -!missing-selector! AVCapturePhoto::cameraCalibrationData not bound -!missing-selector! AVCapturePhoto::CGImageRepresentation not bound -!missing-selector! AVCapturePhoto::depthData not bound -!missing-selector! AVCapturePhoto::embeddedThumbnailPhotoFormat not bound -!missing-selector! AVCapturePhoto::fileDataRepresentation not bound -!missing-selector! AVCapturePhoto::fileDataRepresentationWithCustomizer: not bound -!missing-selector! AVCapturePhoto::isRawPhoto not bound -!missing-selector! AVCapturePhoto::lensStabilizationStatus not bound -!missing-selector! AVCapturePhoto::metadata not bound -!missing-selector! AVCapturePhoto::photoCount not bound -!missing-selector! AVCapturePhoto::pixelBuffer not bound -!missing-selector! AVCapturePhoto::portraitEffectsMatte not bound -!missing-selector! AVCapturePhoto::previewCGImageRepresentation not bound -!missing-selector! AVCapturePhoto::previewPixelBuffer not bound -!missing-selector! AVCapturePhoto::resolvedSettings not bound -!missing-selector! AVCapturePhoto::semanticSegmentationMatteForType: not bound -!missing-selector! AVCapturePhoto::sequenceCount not bound -!missing-selector! AVCapturePhoto::sourceDeviceType not bound -!missing-selector! AVCapturePhoto::timestamp not bound -!missing-selector! AVCapturePhotoBracketSettings::bracketedSettings not bound -!missing-selector! AVCapturePhotoBracketSettings::isLensStabilizationEnabled not bound -!missing-selector! AVCapturePhotoBracketSettings::setLensStabilizationEnabled: not bound -!missing-selector! AVCapturePhotoOutput::availableLivePhotoVideoCodecTypes not bound -!missing-selector! AVCapturePhotoOutput::availablePhotoCodecTypes not bound -!missing-selector! AVCapturePhotoOutput::availablePhotoFileTypes not bound -!missing-selector! AVCapturePhotoOutput::availablePhotoPixelFormatTypes not bound -!missing-selector! AVCapturePhotoOutput::availableRawPhotoFileTypes not bound -!missing-selector! AVCapturePhotoOutput::availableRawPhotoPixelFormatTypes not bound -!missing-selector! AVCapturePhotoOutput::availableSemanticSegmentationMatteTypes not bound -!missing-selector! AVCapturePhotoOutput::capturePhotoWithSettings:delegate: not bound -!missing-selector! AVCapturePhotoOutput::captureReadiness not bound -!missing-selector! AVCapturePhotoOutput::enabledSemanticSegmentationMatteTypes not bound -!missing-selector! AVCapturePhotoOutput::init not bound -!missing-selector! AVCapturePhotoOutput::isAppleProRAWEnabled not bound -!missing-selector! AVCapturePhotoOutput::isAppleProRAWSupported not bound -!missing-selector! AVCapturePhotoOutput::isAutoRedEyeReductionSupported not bound -!missing-selector! AVCapturePhotoOutput::isCameraCalibrationDataDeliverySupported not bound -!missing-selector! AVCapturePhotoOutput::isContentAwareDistortionCorrectionEnabled not bound -!missing-selector! AVCapturePhotoOutput::isContentAwareDistortionCorrectionSupported not bound -!missing-selector! AVCapturePhotoOutput::isDepthDataDeliveryEnabled not bound -!missing-selector! AVCapturePhotoOutput::isDepthDataDeliverySupported not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVCapturePhotoOutput::isFastCapturePrioritizationSupported not bound -!missing-selector! AVCapturePhotoOutput::isFlashScene not bound -!missing-selector! AVCapturePhotoOutput::isLensStabilizationDuringBracketedCaptureSupported not bound -!missing-selector! AVCapturePhotoOutput::isLivePhotoAutoTrimmingEnabled not bound -!missing-selector! AVCapturePhotoOutput::isLivePhotoCaptureEnabled not bound -!missing-selector! AVCapturePhotoOutput::isLivePhotoCaptureSupported not bound -!missing-selector! AVCapturePhotoOutput::isLivePhotoCaptureSuspended not bound -!missing-selector! AVCapturePhotoOutput::isPortraitEffectsMatteDeliveryEnabled not bound -!missing-selector! AVCapturePhotoOutput::isPortraitEffectsMatteDeliverySupported not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureEnabled not bound -!missing-selector! AVCapturePhotoOutput::isResponsiveCaptureSupported not bound -!missing-selector! AVCapturePhotoOutput::isVirtualDeviceConstituentPhotoDeliveryEnabled not bound -!missing-selector! AVCapturePhotoOutput::isVirtualDeviceConstituentPhotoDeliverySupported not bound -!missing-selector! AVCapturePhotoOutput::isVirtualDeviceFusionSupported not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagEnabled not bound -!missing-selector! AVCapturePhotoOutput::isZeroShutterLagSupported not bound -!missing-selector! AVCapturePhotoOutput::maxBracketedCapturePhotoCount not bound -!missing-selector! AVCapturePhotoOutput::maxPhotoDimensions not bound -!missing-selector! AVCapturePhotoOutput::maxPhotoQualityPrioritization not bound -!missing-selector! AVCapturePhotoOutput::photoSettingsForSceneMonitoring not bound -!missing-selector! AVCapturePhotoOutput::preparedPhotoSettingsArray not bound -!missing-selector! AVCapturePhotoOutput::preservesLivePhotoCaptureSuspendedOnSessionStop not bound -!missing-selector! AVCapturePhotoOutput::setAppleProRAWEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setContentAwareDistortionCorrectionEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setDepthDataDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setEnabledSemanticSegmentationMatteTypes: not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setFastCapturePrioritizationSupported: not bound -!missing-selector! AVCapturePhotoOutput::setLivePhotoAutoTrimmingEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setLivePhotoCaptureEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setLivePhotoCaptureSuspended: not bound -!missing-selector! AVCapturePhotoOutput::setMaxPhotoDimensions: not bound -!missing-selector! AVCapturePhotoOutput::setMaxPhotoQualityPrioritization: not bound -!missing-selector! AVCapturePhotoOutput::setPhotoSettingsForSceneMonitoring: not bound -!missing-selector! AVCapturePhotoOutput::setPortraitEffectsMatteDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setPreparedPhotoSettingsArray:completionHandler: not bound -!missing-selector! AVCapturePhotoOutput::setPreservesLivePhotoCaptureSuspendedOnSessionStop: not bound -!missing-selector! AVCapturePhotoOutput::setResponsiveCaptureEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setVirtualDeviceConstituentPhotoDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoOutput::setZeroShutterLagEnabled: not bound -!missing-selector! AVCapturePhotoOutput::supportedFlashModes not bound -!missing-selector! AVCapturePhotoOutput::supportedPhotoCodecTypesForFileType: not bound -!missing-selector! AVCapturePhotoOutput::supportedPhotoPixelFormatTypesForFileType: not bound -!missing-selector! AVCapturePhotoOutput::supportedRawPhotoPixelFormatTypesForFileType: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::captureReadiness not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::delegate not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::initWithPhotoOutput: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::setDelegate: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::startTrackingCaptureRequestUsingPhotoSettings: not bound -!missing-selector! AVCapturePhotoOutputReadinessCoordinator::stopTrackingCaptureRequestUsingPhotoSettingsUniqueID: not bound -!missing-selector! AVCapturePhotoSettings::availableEmbeddedThumbnailPhotoCodecTypes not bound -!missing-selector! AVCapturePhotoSettings::availablePreviewPhotoPixelFormatTypes not bound -!missing-selector! AVCapturePhotoSettings::availableRawEmbeddedThumbnailPhotoCodecTypes not bound -!missing-selector! AVCapturePhotoSettings::embeddedThumbnailPhotoFormat not bound -!missing-selector! AVCapturePhotoSettings::embedsDepthDataInPhoto not bound -!missing-selector! AVCapturePhotoSettings::embedsPortraitEffectsMatteInPhoto not bound -!missing-selector! AVCapturePhotoSettings::embedsSemanticSegmentationMattesInPhoto not bound -!missing-selector! AVCapturePhotoSettings::enabledSemanticSegmentationMatteTypes not bound -!missing-selector! AVCapturePhotoSettings::flashMode not bound -!missing-selector! AVCapturePhotoSettings::format not bound -!missing-selector! AVCapturePhotoSettings::isAutoContentAwareDistortionCorrectionEnabled not bound -!missing-selector! AVCapturePhotoSettings::isAutoRedEyeReductionEnabled not bound -!missing-selector! AVCapturePhotoSettings::isAutoVirtualDeviceFusionEnabled not bound -!missing-selector! AVCapturePhotoSettings::isCameraCalibrationDataDeliveryEnabled not bound -!missing-selector! AVCapturePhotoSettings::isDepthDataDeliveryEnabled not bound -!missing-selector! AVCapturePhotoSettings::isDepthDataFiltered not bound -!missing-selector! AVCapturePhotoSettings::isPortraitEffectsMatteDeliveryEnabled not bound -!missing-selector! AVCapturePhotoSettings::livePhotoMovieFileURL not bound -!missing-selector! AVCapturePhotoSettings::livePhotoMovieMetadata not bound -!missing-selector! AVCapturePhotoSettings::livePhotoVideoCodecType not bound -!missing-selector! AVCapturePhotoSettings::maxPhotoDimensions not bound -!missing-selector! AVCapturePhotoSettings::metadata not bound -!missing-selector! AVCapturePhotoSettings::photoQualityPrioritization not bound -!missing-selector! AVCapturePhotoSettings::previewPhotoFormat not bound -!missing-selector! AVCapturePhotoSettings::processedFileType not bound -!missing-selector! AVCapturePhotoSettings::rawEmbeddedThumbnailPhotoFormat not bound -!missing-selector! AVCapturePhotoSettings::rawFileType not bound -!missing-selector! AVCapturePhotoSettings::rawPhotoPixelFormatType not bound -!missing-selector! AVCapturePhotoSettings::setAutoContentAwareDistortionCorrectionEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setAutoRedEyeReductionEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setAutoVirtualDeviceFusionEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setCameraCalibrationDataDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setDepthDataDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setDepthDataFiltered: not bound -!missing-selector! AVCapturePhotoSettings::setEmbeddedThumbnailPhotoFormat: not bound -!missing-selector! AVCapturePhotoSettings::setEmbedsDepthDataInPhoto: not bound -!missing-selector! AVCapturePhotoSettings::setEmbedsPortraitEffectsMatteInPhoto: not bound -!missing-selector! AVCapturePhotoSettings::setEmbedsSemanticSegmentationMattesInPhoto: not bound -!missing-selector! AVCapturePhotoSettings::setEnabledSemanticSegmentationMatteTypes: not bound -!missing-selector! AVCapturePhotoSettings::setFlashMode: not bound -!missing-selector! AVCapturePhotoSettings::setLivePhotoMovieFileURL: not bound -!missing-selector! AVCapturePhotoSettings::setLivePhotoMovieMetadata: not bound -!missing-selector! AVCapturePhotoSettings::setLivePhotoVideoCodecType: not bound -!missing-selector! AVCapturePhotoSettings::setMaxPhotoDimensions: not bound -!missing-selector! AVCapturePhotoSettings::setMetadata: not bound -!missing-selector! AVCapturePhotoSettings::setPhotoQualityPrioritization: not bound -!missing-selector! AVCapturePhotoSettings::setPortraitEffectsMatteDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setPreviewPhotoFormat: not bound -!missing-selector! AVCapturePhotoSettings::setRawEmbeddedThumbnailPhotoFormat: not bound -!missing-selector! AVCapturePhotoSettings::setVirtualDeviceConstituentPhotoDeliveryEnabledDevices: not bound -!missing-selector! AVCapturePhotoSettings::uniqueID not bound -!missing-selector! AVCapturePhotoSettings::virtualDeviceConstituentPhotoDeliveryEnabledDevices not bound -!missing-selector! AVCaptureReactionEffectState::endTime not bound -!missing-selector! AVCaptureReactionEffectState::reactionType not bound -!missing-selector! AVCaptureReactionEffectState::startTime not bound -!missing-selector! AVCaptureResolvedPhotoSettings::dimensionsForSemanticSegmentationMatteOfType: not bound -!missing-selector! AVCaptureResolvedPhotoSettings::embeddedThumbnailDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::expectedPhotoCount not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isContentAwareDistortionCorrectionEnabled not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isFastCapturePrioritizationEnabled not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isFlashEnabled not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isRedEyeReductionEnabled not bound -!missing-selector! AVCaptureResolvedPhotoSettings::isVirtualDeviceFusionEnabled not bound -!missing-selector! AVCaptureResolvedPhotoSettings::livePhotoMovieDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::photoDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::photoProcessingTimeRange not bound -!missing-selector! AVCaptureResolvedPhotoSettings::portraitEffectsMatteDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::previewDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::rawEmbeddedThumbnailDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::rawPhotoDimensions not bound -!missing-selector! AVCaptureResolvedPhotoSettings::uniqueID not bound -!missing-selector! AVCaptureSession::connections not bound -!missing-selector! AVCaptureSession::hardwareCost not bound -!missing-selector! AVCaptureSession::isMultitaskingCameraAccessEnabled not bound -!missing-selector! AVCaptureSession::isMultitaskingCameraAccessSupported not bound -!missing-selector! AVCaptureSession::setMultitaskingCameraAccessEnabled: not bound -!missing-selector! AVCaptureSynchronizedData::timestamp not bound -!missing-selector! AVCaptureSynchronizedDataCollection::count not bound -!missing-selector! AVCaptureSynchronizedDataCollection::objectForKeyedSubscript: not bound -!missing-selector! AVCaptureSynchronizedDataCollection::synchronizedDataForCaptureOutput: not bound -!missing-selector! AVCaptureSynchronizedDepthData::depthData not bound -!missing-selector! AVCaptureSynchronizedDepthData::depthDataWasDropped not bound -!missing-selector! AVCaptureSynchronizedDepthData::droppedReason not bound -!missing-selector! AVCaptureSynchronizedMetadataObjectData::metadataObjects not bound -!missing-selector! AVCaptureSynchronizedSampleBufferData::droppedReason not bound -!missing-selector! AVCaptureSynchronizedSampleBufferData::sampleBuffer not bound -!missing-selector! AVCaptureSynchronizedSampleBufferData::sampleBufferWasDropped not bound -!missing-selector! AVCaptureSystemPressureState::factors not bound -!missing-selector! AVCaptureSystemPressureState::level not bound -!missing-selector! AVCaptureVideoDataOutput::alwaysDiscardsLateVideoFrames not bound -!missing-selector! AVCaptureVideoDataOutput::automaticallyConfiguresOutputBufferDimensions not bound -!missing-selector! AVCaptureVideoDataOutput::availableVideoCodecTypes not bound -!missing-selector! AVCaptureVideoDataOutput::availableVideoCodecTypesForAssetWriterWithOutputFileType: not bound -!missing-selector! AVCaptureVideoDataOutput::availableVideoCVPixelFormatTypes not bound -!missing-selector! AVCaptureVideoDataOutput::deliversPreviewSizedOutputBuffers not bound -!missing-selector! AVCaptureVideoDataOutput::init not bound -!missing-selector! AVCaptureVideoDataOutput::recommendedVideoSettingsForAssetWriterWithOutputFileType: not bound -!missing-selector! AVCaptureVideoDataOutput::recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType: not bound -!missing-selector! AVCaptureVideoDataOutput::sampleBufferCallbackQueue not bound -!missing-selector! AVCaptureVideoDataOutput::sampleBufferDelegate not bound -!missing-selector! AVCaptureVideoDataOutput::setAlwaysDiscardsLateVideoFrames: not bound -!missing-selector! AVCaptureVideoDataOutput::setAutomaticallyConfiguresOutputBufferDimensions: not bound -!missing-selector! AVCaptureVideoDataOutput::setDeliversPreviewSizedOutputBuffers: not bound -!missing-selector! AVCaptureVideoDataOutput::setSampleBufferDelegate:queue: not bound -!missing-selector! AVCaptureVideoDataOutput::setVideoSettings: not bound -!missing-selector! AVCaptureVideoDataOutput::videoSettings not bound -!missing-selector! AVCaptureVideoPreviewLayer::isPreviewing not bound -!missing-selector! AVContentKeyRequest::respondByRequestingPersistableContentKeyRequestAndReturnError: not bound -!missing-selector! AVContentKeySession::invalidateAllPersistableContentKeysForApp:options:completionHandler: not bound -!missing-selector! AVContentKeySession::invalidatePersistableContentKey:options:completionHandler: not bound -!missing-selector! AVContentKeySession::makeSecureTokenForExpirationDateOfPersistableContentKey:completionHandler: not bound -!missing-selector! AVContinuityDevice::audioSessionInputs not bound -!missing-selector! AVContinuityDevice::connectionID not bound -!missing-selector! AVContinuityDevice::isConnected not bound -!missing-selector! AVContinuityDevice::videoDevices not bound -!missing-selector! AVDisplayCriteria::initWithRefreshRate:formatDescription: not bound -!missing-selector! AVFrameRateRange::maxFrameDuration not bound -!missing-selector! AVFrameRateRange::maxFrameRate not bound -!missing-selector! AVFrameRateRange::minFrameDuration not bound -!missing-selector! AVFrameRateRange::minFrameRate not bound -!missing-selector! AVMetadataBodyObject::bodyID not bound -!missing-selector! AVMetadataSalientObject::objectID not bound -!missing-selector! AVPlayerLooper::initWithPlayer:templateItem:timeRange:existingItemsOrdering: not bound -!missing-selector! AVSampleBufferDisplayLayer::sampleBufferRenderer not bound -!missing-selector! AVSampleBufferVideoRenderer::error not bound -!missing-selector! AVSampleBufferVideoRenderer::flushWithRemovalOfDisplayedImage:completionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::requiresFlushToResumeDecoding not bound -!missing-selector! AVSampleBufferVideoRenderer::status not bound -!missing-selector! AVSpeechSynthesisMarker::bookmarkName not bound -!missing-selector! AVSpeechSynthesisMarker::initWithBookmarkName:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithParagraphRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithPhonemeString:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithSentenceRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::initWithWordRange:atByteSampleOffset: not bound -!missing-selector! AVSpeechSynthesisMarker::phoneme not bound -!missing-selector! AVSpeechSynthesisMarker::setBookmarkName: not bound -!missing-selector! AVSpeechSynthesisMarker::setPhoneme: not bound -!missing-selector! AVSpeechSynthesisVoice::voiceTraits not bound -!missing-type! AVAssetVariantVideoLayoutAttributes not bound -!missing-type! AVAudioRecorder not bound -!missing-type! AVCaptureAudioDataOutput not bound -!missing-type! AVCaptureAutoExposureBracketedStillImageSettings not bound -!missing-type! AVCaptureBracketedStillImageSettings not bound -!missing-type! AVCaptureDataOutputSynchronizer not bound -!missing-type! AVCaptureDepthDataOutput not bound -!missing-type! AVCaptureDevice not bound -!missing-type! AVCaptureDeviceDiscoverySession not bound -!missing-type! AVCaptureDeviceFormat not bound -!missing-type! AVCaptureDeviceInput not bound -!missing-type! AVCaptureDeviceRotationCoordinator not bound -!missing-type! AVCaptureManualExposureBracketedStillImageSettings not bound -!missing-type! AVCaptureMetadataInput not bound -!missing-type! AVCaptureMetadataOutput not bound -!missing-type! AVCaptureMovieFileOutput not bound -!missing-type! AVCaptureMultiCamSession not bound -!missing-type! AVCapturePhoto not bound -!missing-type! AVCapturePhotoBracketSettings not bound -!missing-type! AVCapturePhotoOutput not bound -!missing-type! AVCapturePhotoOutputReadinessCoordinator not bound -!missing-type! AVCapturePhotoSettings not bound -!missing-type! AVCaptureReactionEffectState not bound -!missing-type! AVCaptureResolvedPhotoSettings not bound -!missing-type! AVCaptureSynchronizedData not bound -!missing-type! AVCaptureSynchronizedDataCollection not bound -!missing-type! AVCaptureSynchronizedDepthData not bound -!missing-type! AVCaptureSynchronizedMetadataObjectData not bound -!missing-type! AVCaptureSynchronizedSampleBufferData not bound -!missing-type! AVCaptureSystemPressureState not bound -!missing-type! AVCaptureVideoDataOutput not bound -!missing-type! AVContinuityDevice not bound -!missing-type! AVFrameRateRange not bound -!missing-type! AVMetadataBodyObject not bound -!missing-type! AVMetadataCatBodyObject not bound -!missing-type! AVMetadataDogBodyObject not bound -!missing-type! AVMetadataHumanBodyObject not bound -!missing-type! AVMetadataHumanFullBodyObject not bound -!missing-type! AVMetadataSalientObject not bound -!missing-type! AVSampleBufferVideoRenderer not bound -!missing-selector! AVCaptureDevice::displayVideoZoomFactorMultiplier not bound -!missing-selector! +AVExternalStorageDevice::authorizationStatus not bound -!missing-selector! +AVExternalStorageDevice::requestAccessWithCompletionHandler: not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::isSupported not bound -!missing-selector! +AVExternalStorageDeviceDiscoverySession::sharedSession not bound -!missing-selector! AVCaptureVideoDataOutput::recommendedVideoSettingsForVideoCodecType:assetWriterOutputFileType:outputFileURL: not bound -!missing-selector! AVExternalStorageDevice::displayName not bound -!missing-selector! AVExternalStorageDevice::freeSize not bound -!missing-selector! AVExternalStorageDevice::isConnected not bound -!missing-selector! AVExternalStorageDevice::isNotRecommendedForCaptureUse not bound -!missing-selector! AVExternalStorageDevice::nextAvailableURLsWithPathExtensions:error: not bound -!missing-selector! AVExternalStorageDevice::totalSize not bound -!missing-selector! AVExternalStorageDevice::uuid not bound -!missing-selector! AVExternalStorageDeviceDiscoverySession::externalStorageDevices not bound -!missing-type! AVExternalStorageDevice not bound -!missing-type! AVExternalStorageDeviceDiscoverySession not bound -!missing-enum! CMTagCollectionVideoOutputPreset not bound -!missing-pinvoke! CMTagCollectionCreateWithVideoOutputPreset is not bound -!missing-selector! AVCaptureDeviceFormat::supportedVideoZoomRangesForDepthDataDelivery not bound -!missing-selector! AVCaptureDeviceFormat::zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported not bound -!missing-selector! AVPlayer::setVideoOutput: not bound -!missing-selector! AVPlayer::videoOutput not bound -!missing-selector! AVPlayerVideoOutput::copyTaggedBufferGroupForHostTime:presentationTimeStamp:activeConfiguration: not bound -!missing-selector! AVPlayerVideoOutput::initWithSpecification: not bound -!missing-selector! AVPlayerVideoOutputConfiguration::activationTime not bound -!missing-selector! AVPlayerVideoOutputConfiguration::dataChannelDescriptions not bound -!missing-selector! AVPlayerVideoOutputConfiguration::sourcePlayerItem not bound -!missing-selector! AVVideoOutputSpecification::initWithTagCollections: not bound -!missing-selector! AVVideoOutputSpecification::preferredTagCollections not bound -!missing-selector! AVZoomRange::containsZoomFactor: not bound -!missing-selector! AVZoomRange::maxZoomFactor not bound -!missing-selector! AVZoomRange::minZoomFactor not bound -!missing-type! AVPlayerVideoOutput not bound -!missing-type! AVPlayerVideoOutputConfiguration not bound -!missing-type! AVVideoOutputSpecification not bound -!missing-type! AVZoomRange not bound -!missing-enum! AVCaptureMultichannelAudioMode not bound -!missing-enum! AVExternalContentProtectionStatus not bound -!missing-enum! AVPlayerInterstitialEventTimelineOccupancy not bound -!missing-enum! AVPlayerItemSegmentType not bound -!missing-enum-value! AVError native value AVErrorToneMappingFailed = -11885 not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyForceSDR not bound -!missing-field! AVAssetImageGeneratorDynamicRangePolicyMatchSource not bound -!missing-field! AVAssetPlaybackConfigurationOptionSpatialVideo not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncNotification not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonCurrentSegmentChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonKey not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonLoadedTimeRangesChanged not bound -!missing-field! AVPlayerIntegratedTimelineSnapshotsOutOfSyncReasonSegmentsChanged not bound -!missing-field! AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification not bound -!missing-field! AVSpatialCaptureDiscomfortReasonNotEnoughLight not bound -!missing-field! AVSpatialCaptureDiscomfortReasonSubjectTooClose not bound -!missing-field! AVVideoCodecTypeAppleProRes4444XQ not bound -!missing-field! AVVideoTransferFunction_IEC_sRGB not bound -!missing-protocol! AVMetricEventStreamPublisher not bound -!missing-protocol! AVMetricEventStreamSubscriber not bound -!missing-protocol! AVPlayerItemIntegratedTimelineObserver not bound -!missing-protocol-conformance! AVPlayerItem should conform to AVMetricEventStreamPublisher (defined in 'AVMetricEventStreamPublisher' category) -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:externalProtectionStatusDidChangeForContentKey: not found -!missing-selector! +AVAssetVariantQualifier::predicateForAudioSampleRate:mediaSelectionOption:operatorType: not bound -!missing-selector! +AVCaptureDevice::isBackgroundReplacementEnabled not bound -!missing-selector! +AVMetricEventStream::eventStream not bound -!missing-selector! AVAssetImageGenerator::dynamicRangePolicy not bound -!missing-selector! AVAssetImageGenerator::setDynamicRangePolicy: not bound -!missing-selector! AVAssetResourceLoader::sendsCommonMediaClientDataAsHTTPHeaders not bound -!missing-selector! AVAssetResourceLoader::setSendsCommonMediaClientDataAsHTTPHeaders: not bound -!missing-selector! AVCaptureDevice::isAutoVideoFrameRateEnabled not bound -!missing-selector! AVCaptureDevice::isBackgroundReplacementActive not bound -!missing-selector! AVCaptureDevice::setAutoVideoFrameRateEnabled: not bound -!missing-selector! AVCaptureDevice::spatialCaptureDiscomfortReasons not bound -!missing-selector! AVCaptureDeviceFormat::isAutoVideoFrameRateSupported not bound -!missing-selector! AVCaptureDeviceFormat::isBackgroundReplacementSupported not bound -!missing-selector! AVCaptureDeviceFormat::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureDeviceFormat::videoFrameRateRangeForBackgroundReplacement not bound -!missing-selector! AVCaptureDeviceInput::isMultichannelAudioModeSupported: not bound -!missing-selector! AVCaptureDeviceInput::multichannelAudioMode not bound -!missing-selector! AVCaptureDeviceInput::setMultichannelAudioMode: not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureEnabled not bound -!missing-selector! AVCaptureMovieFileOutput::isSpatialVideoCaptureSupported not bound -!missing-selector! AVCaptureMovieFileOutput::setSpatialVideoCaptureEnabled: not bound -!missing-selector! AVCapturePhoto::constantColorCenterWeightedMeanConfidenceLevel not bound -!missing-selector! AVCapturePhoto::constantColorConfidenceMap not bound -!missing-selector! AVCapturePhoto::isConstantColorFallbackPhoto not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoOutput::isConstantColorSupported not bound -!missing-selector! AVCapturePhotoOutput::isShutterSoundSuppressionSupported not bound -!missing-selector! AVCapturePhotoOutput::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorEnabled not bound -!missing-selector! AVCapturePhotoSettings::isConstantColorFallbackPhotoDeliveryEnabled not bound -!missing-selector! AVCapturePhotoSettings::isShutterSoundSuppressionEnabled not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setConstantColorFallbackPhotoDeliveryEnabled: not bound -!missing-selector! AVCapturePhotoSettings::setShutterSoundSuppressionEnabled: not bound -!missing-selector! AVCaptureSession::configuresApplicationAudioSessionToMixWithOthers not bound -!missing-selector! AVCaptureSession::setConfiguresApplicationAudioSessionToMixWithOthers: not bound -!missing-selector! AVContentKey::externalContentProtectionStatus not bound -!missing-selector! AVContentKey::revoke not bound -!missing-selector! AVMetricContentKeyRequestEvent::contentKeySpecifier not bound -!missing-selector! AVMetricContentKeyRequestEvent::isClientInitiated not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricContentKeyRequestEvent::mediaType not bound -!missing-selector! AVMetricErrorEvent::didRecover not bound -!missing-selector! AVMetricErrorEvent::error not bound -!missing-selector! AVMetricEvent::date not bound -!missing-selector! AVMetricEvent::mediaTime not bound -!missing-selector! AVMetricEvent::sessionID not bound -!missing-selector! AVMetricEventStream::addPublisher: not bound -!missing-selector! AVMetricEventStream::setSubscriber:queue: not bound -!missing-selector! AVMetricEventStream::subscribeToAllMetricEvents not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvent: not bound -!missing-selector! AVMetricEventStream::subscribeToMetricEvents: not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::byteRange not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::isMapSegment not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::url not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::isMultivariantPlaylist not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaResourceRequestEvent not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::mediaType not bound -!missing-selector! AVMetricHLSPlaylistRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::byteRange not bound -!missing-selector! AVMetricMediaResourceRequestEvent::errorEvent not bound -!missing-selector! AVMetricMediaResourceRequestEvent::networkTransactionMetrics not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::requestStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseEndTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::responseStartTime not bound -!missing-selector! AVMetricMediaResourceRequestEvent::serverAddress not bound -!missing-selector! AVMetricMediaResourceRequestEvent::url not bound -!missing-selector! AVMetricMediaResourceRequestEvent::wasReadFromCache not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::contentKeyRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::mediaSegmentRequestEvents not bound -!missing-selector! AVMetricPlayerItemInitialLikelyToKeepUpEvent::playlistRequestEvents not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::timeTaken not bound -!missing-selector! AVMetricPlayerItemLikelyToKeepUpEvent::variant not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::errorEvent not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::mediaResourceRequestCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::playbackDuration not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::recoverableErrorCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::stallCount not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentInInitialStartup not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeSpentRecoveringFromStall not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedAverageBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::timeWeightedPeakBitrate not bound -!missing-selector! AVMetricPlayerItemPlaybackSummaryEvent::variantSwitchCount not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::previousRate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::rate not bound -!missing-selector! AVMetricPlayerItemRateChangeEvent::variant not bound -!missing-selector! AVMetricPlayerItemSeekDidCompleteEvent::didSeekInBuffer not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::didSucceed not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchEvent::toVariant not bound -!missing-selector! AVPlayerInterstitialEvent::contentMayVary not bound -!missing-selector! AVPlayerInterstitialEvent::plannedDuration not bound -!missing-selector! AVPlayerInterstitialEvent::setContentMayVary: not bound -!missing-selector! AVPlayerInterstitialEvent::setPlannedDuration: not bound -!missing-selector! AVPlayerInterstitialEvent::setSupplementsPrimaryContent: not bound -!missing-selector! AVPlayerInterstitialEvent::setTimelineOccupancy: not bound -!missing-selector! AVPlayerInterstitialEvent::supplementsPrimaryContent not bound -!missing-selector! AVPlayerInterstitialEvent::timelineOccupancy not bound -!missing-selector! AVPlayerItem::integratedTimeline not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addBoundaryTimeObserverForSegment:offsetsIntoSegment:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::addPeriodicTimeObserverForInterval:queue:usingBlock: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentSnapshot not bound -!missing-selector! AVPlayerItemIntegratedTimeline::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimeline::removeTimeObserver: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToDate:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimeline::seekToTime:toleranceBefore:toleranceAfter:completionHandler: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentDate not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentSegment not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::currentTime not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::duration not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::mapTime:toSegment:atSegmentOffset: not bound -!missing-selector! AVPlayerItemIntegratedTimelineSnapshot::segments not bound -!missing-selector! AVPlayerItemSegment::interstitialEvent not bound -!missing-selector! AVPlayerItemSegment::loadedTimeRanges not bound -!missing-selector! AVPlayerItemSegment::segmentType not bound -!missing-selector! AVPlayerItemSegment::startDate not bound -!missing-selector! AVPlayerItemSegment::timeMapping not bound -!missing-selector! AVPlayerVideoOutputConfiguration::preferredTransform not bound -!missing-enum! AVExternalContentProtectionStatus not bound -!missing-field! AVSampleBufferDisplayLayerReadyForDisplayDidChangeNotification not bound -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:didProvideContentKeyRequests:forInitializationData: not found -!missing-protocol-member! AVContentKeySessionDelegate::contentKeySession:externalProtectionStatusDidChangeForContentKey: not found -!missing-selector! AVContentKey::externalContentProtectionStatus not bound -!missing-selector! AVContentKey::revoke not bound -!missing-selector! AVSampleBufferDisplayLayer::isReadyForDisplay not bound -!missing-selector! AVSampleBufferVideoRenderer::copyDisplayedPixelBuffer not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMinimumUpcomingSampleBufferPresentationTime: not bound -!missing-selector! AVSampleBufferVideoRenderer::expectMonotonicallyIncreasingUpcomingSampleBufferPresentationTimes not bound -!missing-selector! AVSampleBufferVideoRenderer::loadVideoPerformanceMetricsWithCompletionHandler: not bound -!missing-selector! AVSampleBufferVideoRenderer::resetUpcomingSampleBufferPresentationTimeExpectations not bound -!missing-selector! AVVideoComposition::isValidForTracks:assetDuration:timeRange:validationDelegate: not bound -!missing-selector! AVVideoOutputSpecification::defaultOutputSettings not bound -!missing-selector! AVVideoOutputSpecification::setDefaultOutputSettings: not bound -!missing-selector! AVVideoOutputSpecification::setOutputSettings:forTagCollection: not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfCorruptedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfDroppedFrames not bound -!missing-selector! AVVideoPerformanceMetrics::numberOfFramesDisplayedUsingOptimizedCompositing not bound -!missing-selector! AVVideoPerformanceMetrics::totalAccumulatedFrameDelay not bound -!missing-selector! AVVideoPerformanceMetrics::totalNumberOfFrames not bound -!missing-type! AVMetricContentKeyRequestEvent not bound -!missing-type! AVMetricErrorEvent not bound -!missing-type! AVMetricEvent not bound -!missing-type! AVMetricEventStream not bound -!missing-type! AVMetricHLSMediaSegmentRequestEvent not bound -!missing-type! AVMetricHLSPlaylistRequestEvent not bound -!missing-type! AVMetricMediaResourceRequestEvent not bound -!missing-type! AVMetricPlayerItemInitialLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemLikelyToKeepUpEvent not bound -!missing-type! AVMetricPlayerItemPlaybackSummaryEvent not bound -!missing-type! AVMetricPlayerItemRateChangeEvent not bound -!missing-type! AVMetricPlayerItemSeekDidCompleteEvent not bound -!missing-type! AVMetricPlayerItemSeekEvent not bound -!missing-type! AVMetricPlayerItemStallEvent not bound -!missing-type! AVMetricPlayerItemVariantSwitchEvent not bound -!missing-type! AVPlayerItemIntegratedTimeline not bound -!missing-type! AVPlayerItemIntegratedTimelineSnapshot not bound -!missing-type! AVPlayerItemSegment not bound -!missing-type! AVVideoPerformanceMetrics not bound -!missing-field! AVMediaTypeAuxiliaryPicture not bound -!missing-selector! AVMetricHLSMediaSegmentRequestEvent::indexFileURL not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::fromVariant not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::loadedTimeRanges not bound -!missing-selector! AVMetricPlayerItemVariantSwitchStartEvent::toVariant not bound -!missing-type! AVMetricPlayerItemVariantSwitchStartEvent not bound -!missing-type! AVVideoPerformanceMetrics not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionConflict = -11887 not bound -!missing-enum-value! AVError native value AVErrorMediaExtensionDisabled = -11886 not bound -!missing-selector! AVMutableComposition::insertTimeRange:ofAsset:atTime:completionHandler: not bound -!missing-field! AVMetadataIdentifierQuickTimeMetadataFullFrameRatePlaybackIntent not bound -!missing-field! AVMetadataQuickTimeMetadataKeyFullFrameRatePlaybackIntent not bound -!missing-field! AVVideoCodecTypeJPEGXL not bound -!missing-protocol! AVCaptureSessionControlsDelegate not bound -!missing-selector! AVCaptureControl::isEnabled not bound -!missing-selector! AVCaptureControl::setEnabled: not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedExposureBiasRange not bound -!missing-selector! AVCaptureDeviceFormat::systemRecommendedVideoZoomRange not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalEnabled not bound -!missing-selector! AVCaptureDeviceInput::isWindNoiseRemovalSupported not bound -!missing-selector! AVCaptureDeviceInput::setWindNoiseRemovalEnabled: not bound -!missing-selector! AVCaptureIndexPicker::accessibilityIdentifier not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:localizedIndexTitles: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes: not bound -!missing-selector! AVCaptureIndexPicker::initWithLocalizedTitle:symbolName:numberOfIndexes:localizedTitleTransform: not bound -!missing-selector! AVCaptureIndexPicker::localizedIndexTitles not bound -!missing-selector! AVCaptureIndexPicker::localizedTitle not bound -!missing-selector! AVCaptureIndexPicker::numberOfIndexes not bound -!missing-selector! AVCaptureIndexPicker::selectedIndex not bound -!missing-selector! AVCaptureIndexPicker::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureIndexPicker::setActionQueue:action: not bound -!missing-selector! AVCaptureIndexPicker::setSelectedIndex: not bound -!missing-selector! AVCaptureIndexPicker::symbolName not bound -!missing-selector! AVCapturePhotoOutput::availableRawPhotoCodecTypes not bound -!missing-selector! AVCapturePhotoOutput::supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType: not bound -!missing-selector! AVCapturePhotoSettings::rawFileFormat not bound -!missing-selector! AVCapturePhotoSettings::setRawFileFormat: not bound -!missing-selector! AVCaptureSession::addControl: not bound -!missing-selector! AVCaptureSession::canAddControl: not bound -!missing-selector! AVCaptureSession::controls not bound -!missing-selector! AVCaptureSession::controlsDelegate not bound -!missing-selector! AVCaptureSession::controlsDelegateCallbackQueue not bound -!missing-selector! AVCaptureSession::maxControlsCount not bound -!missing-selector! AVCaptureSession::removeControl: not bound -!missing-selector! AVCaptureSession::setControlsDelegate:queue: not bound -!missing-selector! AVCaptureSession::supportsControls not bound -!missing-selector! AVCaptureSlider::accessibilityIdentifier not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:minValue:maxValue:step: not bound -!missing-selector! AVCaptureSlider::initWithLocalizedTitle:symbolName:values: not bound -!missing-selector! AVCaptureSlider::localizedTitle not bound -!missing-selector! AVCaptureSlider::localizedValueFormat not bound -!missing-selector! AVCaptureSlider::prominentValues not bound -!missing-selector! AVCaptureSlider::setAccessibilityIdentifier: not bound -!missing-selector! AVCaptureSlider::setActionQueue:action: not bound -!missing-selector! AVCaptureSlider::setLocalizedValueFormat: not bound -!missing-selector! AVCaptureSlider::setProminentValues: not bound -!missing-selector! AVCaptureSlider::setValue: not bound -!missing-selector! AVCaptureSlider::symbolName not bound -!missing-selector! AVCaptureSlider::value not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemExposureBiasSlider::initWithDevice:action: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice: not bound -!missing-selector! AVCaptureSystemZoomSlider::initWithDevice:action: not bound -!missing-selector! AVExposureBiasRange::containsExposureBias: not bound -!missing-selector! AVExposureBiasRange::maxExposureBias not bound -!missing-selector! AVExposureBiasRange::minExposureBias not bound -!missing-type! AVCaptureControl not bound -!missing-type! AVCaptureIndexPicker not bound -!missing-type! AVCaptureSlider not bound -!missing-type! AVCaptureSystemExposureBiasSlider not bound -!missing-type! AVCaptureSystemZoomSlider not bound -!missing-type! AVExposureBiasRange not bound -!missing-enum! AVAudioApplicationMicrophoneInjectionPermission not bound -!missing-enum! AVAudioSessionMicrophoneInjectionMode not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVKit.todo deleted file mode 100644 index 468c14674123..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVKit.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-null-allowed! 'System.Void AVKit.AVPlayerViewController::set_InfoViewActions(UIKit.UIAction[])' is missing an [NullAllowed] on parameter #0 -!missing-protocol! AVContinuityDevicePickerViewControllerDelegate not bound -!missing-selector! +AVContinuityDevicePickerViewController::isSupported not bound -!missing-selector! AVContinuityDevicePickerViewController::delegate not bound -!missing-selector! AVContinuityDevicePickerViewController::setDelegate: not bound -!missing-type! AVContinuityDevicePickerViewController not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreHaptics.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreHaptics.ignore deleted file mode 100644 index 0362888af68f..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreHaptics.ignore +++ /dev/null @@ -1,2 +0,0 @@ -# AVFoundation is not present on tvOS issue: https://github.com/xamarin/maccore/issues/2261 -!missing-selector! CHHapticEngine::initWithAudioSession:error: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MLCompute.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MLCompute.todo deleted file mode 100644 index d14eb75bf584..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MLCompute.todo +++ /dev/null @@ -1,55 +0,0 @@ -!deprecated-attribute-missing! MLCActivationDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCActivationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCAdamWOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCArithmeticLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCBatchNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCComparisonLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConcatenationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCConvolutionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDevice missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCDropoutLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCEmbeddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCFullyConnectedLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGatherLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGramMatrixLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCGroupNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInferenceGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCInstanceNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLayerNormalizationLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLossLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCLSTMLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMatMulLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCMultiheadAttentionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCOptimizerDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPaddingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPlatform missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCPoolingLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReductionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCReshapeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCScatterLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSelectionLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSGDOptimizer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSliceLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSoftmaxLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCSplitLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorData missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorParameter missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTrainingGraph missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTransposeLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCUpsampleLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossDescriptor missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCYOLOLossLayer missing a [Deprecated] attribute -!deprecated-attribute-missing! MLCTensorOptimizerDeviceData missing a [Deprecated] attribute diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MapKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MapKit.ignore deleted file mode 100644 index 68ffaa04db33..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-MapKit.ignore +++ /dev/null @@ -1 +0,0 @@ -!missing-enum-value! MKUserTrackingMode native value MKUserTrackingModeFollowWithHeading = 2 not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Matter.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Matter.todo deleted file mode 100644 index 9589b1e63c27..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-Matter.todo +++ /dev/null @@ -1,40 +0,0 @@ -!missing-enum! MTRColorControlColorCapabilitiesBitmap not bound -!missing-enum! MTRColorControlDirection not bound -!missing-enum! MTRColorControlDriftCompensation not bound -!missing-enum! MTRColorControlEnhancedColorMode not bound -!missing-enum! MTRColorControlMoveMode not bound -!missing-enum! MTRColorControlOptionsBitmap not bound -!missing-enum! MTRColorControlStepMode not bound -!missing-enum! MTRColorControlUpdateFlagsBitmap not bound -!missing-enum! MTRDeviceTypeIDType not bound -!missing-field! MTRDeviceControllerRegistrationControllerContextKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDKey not bound -!missing-field! MTRDeviceControllerRegistrationNodeIDsKey not bound -!missing-pinvoke! MTREventNameForID is not bound -!missing-pinvoke! MTRRequestCommandNameForID is not bound -!missing-pinvoke! MTRResponseCommandNameForID is not bound -!missing-protocol! MTRXPCClientProtocol not bound -!missing-protocol! MTRXPCClientProtocol_MTRDevice not bound -!missing-protocol! MTRXPCClientProtocol_MTRDeviceController not bound -!missing-protocol! MTRXPCServerProtocol not bound -!missing-protocol! MTRXPCServerProtocol_MTRDevice not bound -!missing-protocol! MTRXPCServerProtocol_MTRDeviceController not bound -!missing-selector! +MTRDeviceType::deviceTypeForID: not bound -!missing-selector! MTRCertificateInfo::publicKeyData not bound -!missing-selector! MTRDevice::readAttributePaths: not bound -!missing-selector! MTRDeviceController::addDeviceControllerDelegate:queue: not bound -!missing-selector! MTRDeviceController::isSuspended not bound -!missing-selector! MTRDeviceController::removeDeviceControllerDelegate: not bound -!missing-selector! MTRDeviceController::resume not bound -!missing-selector! MTRDeviceController::suspend not bound -!missing-selector! MTRDeviceControllerAbstractParameters::setStartSuspended: not bound -!missing-selector! MTRDeviceControllerAbstractParameters::startSuspended not bound -!missing-selector! MTRDeviceControllerExternalCertificateParameters::rootCertificate not bound -!missing-selector! MTRDeviceType::id not bound -!missing-selector! MTRDeviceType::isUtility not bound -!missing-selector! MTRDeviceType::name not bound -!missing-selector! MTRXPCDeviceControllerParameters::initWithXPConnectionBlock:uniqueIdentifier: not bound -!missing-selector! MTRXPCDeviceControllerParameters::uniqueIdentifier not bound -!missing-selector! MTRXPCDeviceControllerParameters::xpcConnectionBlock not bound -!missing-type! MTRDeviceType not bound -!missing-type! MTRXPCDeviceControllerParameters not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-OSLog.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-OSLog.todo deleted file mode 100644 index bc0bdcfbec57..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-OSLog.todo +++ /dev/null @@ -1 +0,0 @@ -!extra-enum-value! Managed value 0 for OSLogStoreScope.System is available for the current platform while the value in the native header is not diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ReplayKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ReplayKit.ignore index d368d62f9eff..4483a9808218 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ReplayKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ReplayKit.ignore @@ -1,2 +1,7 @@ ## Not used on tvOS (no camera) !missing-enum! RPCameraPosition not bound + +# SCStreamErrorDomain is from ScreenCaptureKit, but only macOS and Mac Catalyst. +# However, Apple seems to also have added it to ReplayKit for iOS and tvOS, which is why xtro detects it as such. +# It doesn't seem useful though in ReplayKit, so just skip binding it. +!missing-field! SCStreamErrorDomain not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ReplayKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ReplayKit.todo deleted file mode 100644 index 4ff284e5ada1..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-ReplayKit.todo +++ /dev/null @@ -1 +0,0 @@ -!missing-field! SCStreamErrorDomain not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore index 0c56cfbf7c49..b1305516ab9e 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-UIKit.ignore @@ -179,35 +179,7 @@ !extra-null-allowed! 'UIKit.UIView UIKit.UIScreen::SnapshotView(System.Boolean)' has a extraneous [NullAllowed] on return type # Initial result from new rule missing-null-allowed -!missing-null-allowed! 'CoreAnimation.CADisplayLink UIKit.UIScreen::CreateDisplayLink(Foundation.NSObject,ObjCRuntime.Selector)' is missing an [NullAllowed] on return type !missing-null-allowed! 'Foundation.NSArray Foundation.NSBundle::LoadNib(System.String,Foundation.NSObject,Foundation.NSDictionary)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIButton::get_CurrentAttributedTitle()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSAttributedString UIKit.UIButton::GetAttributedTitle(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIBarItem::_GetTitleTextAttributes(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedDecorationIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedSupplementaryIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UIMotionEffect::ComputeKeyPathsAndRelativeValues(UIKit.UIOffset)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSDictionary UIKit.UISearchBar::_GetScopeBarButtonTitleTextAttributes(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewFocusUpdateContext::get_NextFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UICollectionViewFocusUpdateContext::get_PreviouslyFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewDelegate::WillDeselectRow(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewDelegate::WillSelectRow(UIKit.UITableView,Foundation.NSIndexPath)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewFocusUpdateContext::get_NextFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath UIKit.UITableViewFocusUpdateContext::get_PreviouslyFocusedIndexPath()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSIndexPath[] UIKit.UICollectionViewLayoutInvalidationContext::get_InvalidatedItemIndexPaths()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIFontDescriptor::GetObject(Foundation.NSString)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject UIKit.UIResponder::GetTargetForAction(ObjCRuntime.Selector,Foundation.NSObject)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSObject[] UIKit.UICollisionBehavior::get_BoundaryIdentifiers()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::get_AllTouches()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForGestureRecognizer(UIKit.UIGestureRecognizer)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForView(UIKit.UIView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSSet UIKit.UIEvent::TouchesForWindow(UIKit.UIWindow)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UICollectionReusableView::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UIResponder::get_TextInputContextIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UITableViewCell::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSString UIKit.UITableViewHeaderFooterView::get_ReuseIdentifier()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'Foundation.NSUuid UIKit.UIDevice::get_IdentifierForVendor()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'ObjCRuntime.Class UIKit.UIStateRestoring::get_ObjectRestorationClass()' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Boolean UIKit.UIApplicationDelegate::FinishedLaunching(UIKit.UIApplication,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean UIKit.UIApplicationDelegate::WillFinishLaunching(UIKit.UIApplication,Foundation.NSDictionary)' is missing an [NullAllowed] on parameter #1 !missing-null-allowed! 'System.Boolean UIKit.UIScrollView::TouchesShouldBegin(Foundation.NSSet,UIKit.UIEvent,UIKit.UIView)' is missing an [NullAllowed] on parameter #1 @@ -216,22 +188,6 @@ !missing-null-allowed! 'System.Double UIKit.UIViewControllerAnimatedTransitioning::TransitionDuration(UIKit.IUIViewControllerContextTransitioning)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.IntPtr UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.IntPtr UIKit.UIApplication::BeginBackgroundTask(System.String,System.Action)' is missing an [NullAllowed] on parameter #1 -!missing-null-allowed! 'System.String UIKit.UIAlertAction::get_Title()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIButton::get_CurrentTitle()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIButton::Title(UIKit.UIControlState)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UICollectionViewLayoutAttributes::get_RepresentedElementKind()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UIScrollViewAccessibilityDelegate::GetAccessibilityScrollStatus(UIKit.UIScrollView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UISegmentedControl::TitleAt(System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDataSource::TitleForFooter(UIKit.UITableView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITableViewDataSource::TitleForHeader(UIKit.UITableView,System.IntPtr)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextDocumentProxy::get_DocumentContextAfterInput()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextDocumentProxy::get_DocumentContextBeforeInput()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String UIKit.UITextInputMode::get_PrimaryLanguage()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIControl::GetActions(Foundation.NSObject,UIKit.UIControlEvent)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UIDictationPhrase::get_AlternativeInterpretations()' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITableViewDataSource::SectionIndexTitles(UIKit.UITableView)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITextChecker::CompletionsForPartialWordRange(Foundation.NSRange,System.String,System.String)' is missing an [NullAllowed] on return type -!missing-null-allowed! 'System.String[] UIKit.UITextChecker::GuessesForWordRange(Foundation.NSRange,System.String,System.String)' is missing an [NullAllowed] on return type !missing-null-allowed! 'System.Void Foundation.NSObject::set_AccessibilityAttributedUserInputLabels(Foundation.NSAttributedString[])' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void Foundation.NSObject::set_AccessibilityUserInputLabels(System.String[])' is missing an [NullAllowed] on parameter #0 !missing-null-allowed! 'System.Void UIKit.UIAccessibilityCustomAction::.ctor(System.String,Foundation.NSObject,ObjCRuntime.Selector)' is missing an [NullAllowed] on parameter #1 @@ -366,9 +322,6 @@ ## Enums not needed on tvOS !missing-enum! UIListSeparatorVisibility not bound !missing-enum! UIPrintRenderingQuality not bound -!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 # Not binding for now, does not make sense on tvOS !missing-selector! +UITextInputContext::current not bound diff --git a/tests/xtro-sharpie/xtro-sharpie/DeprecatedCheck.cs b/tests/xtro-sharpie/xtro-sharpie/DeprecatedCheck.cs index 9ed63861ba08..b750f79879c0 100644 --- a/tests/xtro-sharpie/xtro-sharpie/DeprecatedCheck.cs +++ b/tests/xtro-sharpie/xtro-sharpie/DeprecatedCheck.cs @@ -105,16 +105,16 @@ public void ProcessItem (ICustomAttributeProvider item, string itemName, Version if (AttributeHelpers.HasAnyAdvice (item)) return; - if (!AttributeHelpers.HasAnyDeprecationForCurrentPlatform (item)) { - Log.On (framework).Add ($"!deprecated-attribute-missing! {itemName} missing a [Deprecated] attribute"); - return; - } - // Don't version check us when Apple does __attribute__((availability(macos, introduced=10.0, deprecated=100000))); // #define __API_TO_BE_DEPRECATED 100000 if (objcVersion.Major == 100000) return; + if (!AttributeHelpers.HasAnyDeprecationForCurrentPlatform (item)) { + Log.On (framework).Add ($"!deprecated-attribute-missing! {itemName} missing a [Deprecated] attribute"); + return; + } + // Some APIs have both a [Deprecated] and [Obsoleted]. Bias towards [Obsoleted]. Version managedVersion; bool foundObsoleted = AttributeHelpers.FindObsolete (item, out managedVersion); diff --git a/tests/xtro-sharpie/xtro-sharpie/EnumCheck.cs b/tests/xtro-sharpie/xtro-sharpie/EnumCheck.cs index f583aaec68c2..874928b40c07 100644 --- a/tests/xtro-sharpie/xtro-sharpie/EnumCheck.cs +++ b/tests/xtro-sharpie/xtro-sharpie/EnumCheck.cs @@ -244,8 +244,12 @@ public override void VisitEnumDecl (EnumDecl decl, VisitKind visitKind) // couldn't find a matching managed enum value for the native enum value // don't report deprecated native enum values (or if the native enum itself is deprecated) as missing - if (!valueDecl.IsDeprecated () && !decl.IsDeprecated ()) + if (!valueDecl.IsDeprecated () && !decl.IsDeprecated ()) { + // skip native enum values that aren't available on the current platform, unless it's an error enum. + if (!valueDecl.IsAvailable () && !IsErrorEnum (mname)) + continue; Log.On (framework).Add ($"!missing-enum-value! {type.Name} native value {valueName} = {value} not bound"); + } } } @@ -280,14 +284,21 @@ public override void VisitEnumDecl (EnumDecl decl, VisitKind visitKind) Log.On (framework).Add ($"!wrong-enum-size! {name} managed {managed_size} vs native {native_size}"); } + static bool IsErrorEnum (string typeName) + { + if (typeName.EndsWith ("Error", StringComparison.Ordinal)) + return true; + if (typeName.EndsWith ("ErrorCode", StringComparison.Ordinal)) + return true; + return false; + } + static bool IsErrorEnum (TypeDefinition type) { if (!type.IsEnum) return false; - if (type.Name.EndsWith ("Error", StringComparison.Ordinal)) - return true; - if (type.Name.EndsWith ("ErrorCode", StringComparison.Ordinal)) + if (IsErrorEnum (type.Name)) return true; if (!type.HasCustomAttributes) @@ -308,6 +319,8 @@ static bool IsExtraZeroValid (string typeName, string valueName) // `Ok = 0` and `Success = 0` are often added to errors enums case "Ok": case "Success": + if (typeName.EndsWith ("Error", StringComparison.Ordinal)) + return true; if (typeName.EndsWith ("ErrorCode", StringComparison.Ordinal)) return true; if (typeName.EndsWith ("Status", StringComparison.Ordinal)) diff --git a/tools/apidiff/Makefile b/tools/apidiff/Makefile index 335632fe8324..a2c357b1eb5c 100644 --- a/tools/apidiff/Makefile +++ b/tools/apidiff/Makefile @@ -122,9 +122,9 @@ $(OUTPUT_DIR)/api-diff.md: $(API_DIFF_DEPENDENCIES) $(Q) if $(foreach html,$(wildcard $(OUTPUT_DIR)/diff/Microsoft.*.html),! test -s "$(html)" &&) true; then \ echo "
NET (empty diffs)" >> "$@"; \ elif grep BreakingChangesDetected "$(OUTPUT_DIR)"/diff/Microsoft.*.html &> /dev/null; then \ - echo "
.NET ($(MARKDOWN_BREAKING_CHANGES_MESSAGE))" >> "$@"; \ + echo "
.NET ( $(MARKDOWN_BREAKING_CHANGES_MESSAGE) )" >> "$@"; \ else \ - echo "
.NET ($(MARKDOWN_NO_BREAKING_CHANGES_MESSAGE))" >> "$@"; \ + echo "
.NET ( $(MARKDOWN_NO_BREAKING_CHANGES_MESSAGE) )" >> "$@"; \ fi $(Q) echo "" >> $@ diff --git a/tools/apidiff/report-status.sh b/tools/apidiff/report-status.sh index 58ed08a4c45a..cc6285001e62 100755 --- a/tools/apidiff/report-status.sh +++ b/tools/apidiff/report-status.sh @@ -38,9 +38,9 @@ elif [[ $FORMAT == markdown ]]; then elif ! test -s "$OUTPUT_DIR/$HTML"; then echo -n "~$PLATFORM~: (empty diff detected)" >> "$OUTPUT" elif grep "BreakingChangesDetected" "$OUTPUT_DIR/$HTML" >/dev/null 2>&1; then - echo -n "$PLATFORM: [vsdrops]($HTML) [gist]($MARKDOWN) ($MARKDOWN_BREAKING_CHANGES_MESSAGE)" >> "$OUTPUT" + echo -n "$PLATFORM: [vsdrops]($HTML) [gist]($MARKDOWN) ( $MARKDOWN_BREAKING_CHANGES_MESSAGE )" >> "$OUTPUT" elif ! grep "No change detected" "$OUTPUT_DIR/$HTML" >/dev/null 2>&1; then - echo -n "$PLATFORM: [vsdrops]($HTML) [gist]($MARKDOWN) ($MARKDOWN_NO_BREAKING_CHANGES_MESSAGE)" >> "$OUTPUT" + echo -n "$PLATFORM: [vsdrops]($HTML) [gist]($MARKDOWN) ( $MARKDOWN_NO_BREAKING_CHANGES_MESSAGE )" >> "$OUTPUT" else echo -n "~$PLATFORM~ (no change detected)" >> "$OUTPUT" fi diff --git a/tools/autoformat.sh b/tools/autoformat.sh index 88f9d89d4f01..b2e6dd5aa20b 100755 --- a/tools/autoformat.sh +++ b/tools/autoformat.sh @@ -64,6 +64,13 @@ dotnet format whitespace "$SRC_DIR/tests/xtro-sharpie/xtro-report/xtro-report.cs dotnet format whitespace "$SRC_DIR/tests/xtro-sharpie/xtro-sanity/xtro-sanity.csproj" dotnet format whitespace "$SRC_DIR/tools/api-tools/mono-api-html/mono-api-html.csproj" dotnet format whitespace "$SRC_DIR/tools/api-tools/mono-api-info/mono-api-info.csproj" +dotnet format whitespace "$SRC_DIR/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.iOS.csproj" +dotnet format whitespace "$SRC_DIR/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.MacCatalyst.csproj" +dotnet format whitespace "$SRC_DIR/tests/common/MonoTouch.Dialog/MonoTouch.Dialog.tvOS.csproj" +dotnet format whitespace "$SRC_DIR/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.iOS.csproj" +dotnet format whitespace "$SRC_DIR/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.MacCatalyst.csproj" +dotnet format whitespace "$SRC_DIR/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.macOS.csproj" +dotnet format whitespace "$SRC_DIR/tests/common/Touch.Unit/Touch.Client/dotnet/Touch.Client.tvOS.csproj" dotnet format whitespace --folder "$SRC_DIR" for file in "$SRC_DIR"/dotnet/Templates/Microsoft.*.Templates/*/*/.template.config/localize/*.json "$SRC_DIR"/dotnet/Templates/Microsoft.*.Templates/*/.template.config/localize/*.json; do diff --git a/tools/common/Application.cs b/tools/common/Application.cs index 5036b2b8d4fe..b2b0bd9e64c4 100644 --- a/tools/common/Application.cs +++ b/tools/common/Application.cs @@ -1685,8 +1685,9 @@ internal ProductConstants ProductConstants { get { switch (Platform) { case ApplePlatform.iOS: - case ApplePlatform.MacCatalyst: return ProductConstants.iOS; + case ApplePlatform.MacCatalyst: + return ProductConstants.MacCatalyst; case ApplePlatform.TVOS: return ProductConstants.tvOS; case ApplePlatform.MacOSX: diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index fa956f2333eb..0990959207b6 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -159,9 +159,6 @@ public static Frameworks MacFrameworks { { "ImageCaptureCore", "ImageCaptureCore", 10,5 }, { "ServiceManagement", 10, 6 }, -#if !NET - { "QTKit", 10, 6 }, -#endif { "QuickLookUI", "Quartz", 10, 6, "QuickLookUI" }, { "MediaToolbox", 10, 9 }, @@ -245,8 +242,7 @@ public static Frameworks MacFrameworks { { "PencilKit", "PencilKit", 10,15 }, { "Speech", "Speech", 10,15 }, { "LinkPresentation", "LinkPresentation", 10,15 }, - // not sure if the API is available, issue: https://github.com/xamarin/maccore/issues/1951 - //{ "CoreHaptics", "CoreHaptics", 10,15 }, + { "CoreHaptics", "CoreHaptics", 10, 15 }, { "AutomaticAssessmentConfiguration", "AutomaticAssessmentConfiguration", 10,15,4 }, @@ -266,9 +262,6 @@ public static Frameworks MacFrameworks { { "AdServices", "AdServices", 11,1 }, -#if !NET - { "Chip", "CHIP", 12, 0 }, -#endif { "LocalAuthenticationEmbeddedUI", "LocalAuthenticationEmbeddedUI", 12, 0 }, { "MailKit", "MailKit", 12, 0 }, { "MetricKit", 12, 0 }, @@ -345,9 +338,6 @@ public static Frameworks CreateiOSFrameworks (bool is_simulator_build) { "CoreMedia", "CoreMedia", 4 }, { "CoreVideo", "CoreVideo", 4 }, { "CoreTelephony", "CoreTelephony", 4 }, -#if !NET - { "iAd", "iAd", 4 }, -#endif { "QuickLook", "QuickLook", 4 }, { "ImageIO", "ImageIO", 4 }, { "CoreText", "CoreText", 4 }, @@ -457,9 +447,6 @@ public static Frameworks CreateiOSFrameworks (bool is_simulator_build) { "CoreLocationUI", "CoreLocationUI", 15,0 }, -#if !NET - { "Chip", "CHIP", new Version (15, 0), NotAvailableInSimulator /* no headers in beta 2 */ }, -#endif { "Phase", "PHASE", new Version (15,0), NotAvailableInSimulator /* no headers in beta 2 */ }, { "OSLog", "OSLog", 15,0 }, { "ShazamKit", "ShazamKit", new Version (15,0), NotAvailableInSimulator}, @@ -549,9 +536,6 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build) { "Accessibility", "Accessibility", 7,0 }, { "UniformTypeIdentifiers", "UniformTypeIdentifiers", 7,0 }, -#if !NET - { "Chip", "CHIP", new Version (8, 0), NotAvailableInSimulator /* no headers in beta 2 */ }, -#endif { "CoreMidi", "CoreMIDI", 8,0 }, { "CryptoTokenKit", "CryptoTokenKit", 8, 0 }, { "NearbyInteraction", "NearbyInteraction", 8,0 }, @@ -655,9 +639,6 @@ public static Frameworks TVOSFrameworks { { "UniformTypeIdentifiers", "UniformTypeIdentifiers", 14,0 }, { "Intents", "Intents", 14,0 }, -#if !NET - { "Chip", "CHIP", new Version (15, 0), NotAvailableInSimulator /* no headers in beta 2 */ }, -#endif { "DeviceDiscoveryUI", "DeviceDiscoveryUI", 16,0 }, { "OSLog", "OSLog", 15,0 }, { "CoreMidi", "CoreMIDI", 15,0 }, @@ -732,10 +713,6 @@ public static Frameworks GetMacCatalystFrameworks () case "AssetsLibrary": case "CarPlay": case "Cinematic": -#if !NET - case "iAd": - case "CHIP": -#endif case "WatchConnectivity": f.Unavailable = true; break; @@ -829,18 +806,6 @@ static bool FilterFrameworks (Application app, Framework framework) } switch (app.Platform) { -#if !NET - // CHIP has been removed in Xcode 14 Beta 5 in favor of Matter - case ApplePlatform.iOS when framework.Name == "CHIP": - case ApplePlatform.TVOS when framework.Name == "CHIP": - case ApplePlatform.MacOSX when framework.Name == "CHIP": - case ApplePlatform.WatchOS when framework.Name == "CHIP": - if (Driver.XcodeVersion.Major >= 14) { - Driver.Log (3, "Not linking with the framework {0} because it's not available when using Xcode 14+.", framework.Name); - return false; - } - break; -#endif case ApplePlatform.iOS: switch (framework.Name) { case "GameKit": @@ -862,20 +827,6 @@ static bool FilterFrameworks (Application app, Framework framework) case ApplePlatform.MacCatalyst: break; // Include all frameworks by default case ApplePlatform.MacOSX: -#if !NET - switch (framework.Name) { - case "QTKit": -#if MMP - if (Driver.LinkProhibitedFrameworks) { - ErrorHelper.Warning (5221, Errors.MM5221, framework.Name); - } else { - ErrorHelper.Warning (5220, Errors.MM5220, framework.Name); - return false; - } -#endif - return true; - } -#endif // !NET return true; default: throw ErrorHelper.CreateError (71, Errors.MX0071 /* "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case." */, app.Platform, app.GetProductName ()); diff --git a/tools/common/MachO.cs b/tools/common/MachO.cs index 21bf8792d7ff..197c99736be1 100644 --- a/tools/common/MachO.cs +++ b/tools/common/MachO.cs @@ -66,6 +66,7 @@ public class MachO { internal const uint FAT_MAGIC = 0xcafebabe; internal const uint FAT_CIGAM = 0xbebafeca; /* NXSwapLong(FAT_MAGIC) */ + internal const uint MH_OBJECT = 0x1; /* relocatable object file */ internal const uint MH_DYLIB = 0x6; /* dynamically bound shared library */ // Values here match the corresponding values in the Abi enum. @@ -198,7 +199,7 @@ internal static int ToBigEndian (int number) | ((number << 24))); } - static object ReadFile (BinaryReader reader, string filename) + static object? ReadFile (BinaryReader reader, string filename, bool throw_if_error = true) { var magic = reader.ReadUInt32 (); reader.BaseStream.Position = 0; @@ -221,7 +222,9 @@ static object ReadFile (BinaryReader reader, string filename) sl.Read (filename, reader, reader.BaseStream.Length); return sl; } - throw new Exception (string.Format ("File format not recognized: {0} (magic: 0x{1})", filename, magic.ToString ("X"))); + if (throw_if_error) + throw new Exception (string.Format ("File format not recognized: {0} (magic: 0x{1})", filename, magic.ToString ("X"))); + return null; } } @@ -229,7 +232,7 @@ static object ReadFile (string filename) { using (var fs = new FileStream (filename, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (var reader = new BinaryReader (fs)) { - return ReadFile (reader, filename); + return ReadFile (reader, filename)!; } } } @@ -477,6 +480,30 @@ public static Abi GetArch (int cputype, int cpusubtype) return Abi.None; } + public static bool IsStaticLibraryOrObjectFile (string filename, bool throw_if_error, out bool objectFile) + { + objectFile = false; + using var fs = File.OpenRead (filename); + using var reader = new BinaryReader (fs); + if (StaticLibrary.IsStaticLibrary (reader, throw_if_error)) + return true; + var f = ReadFile (reader, filename, throw_if_error); + if (f is StaticLibrary) + return true; + var fat = f as FatFile; + if (fat is null) + return false; + foreach (var entry in fat.entries!) { + if (entry.IsStaticLibrary) + return true; + if (entry.entry?.IsObjectFile == true) { + objectFile = true; + return true; + } + } + return false; + } + public static bool IsDynamicFramework (string filename) { var f = ReadFile (filename); @@ -862,6 +889,10 @@ public MachO.Architectures Architecture { public bool IsDynamicLibrary { get { return filetype == MachO.MH_DYLIB; } } + + public bool IsObjectFile { + get => filetype == MachO.MH_OBJECT; + } } public class FatFile { @@ -928,6 +959,7 @@ public class FatEntry { public StaticLibrary? static_library; public bool IsDynamicLibrary { get { return entry?.IsDynamicLibrary == true; } } + public bool IsStaticLibrary { get => static_library is not null; } public FatFile Parent { get { return parent!; } } internal void WriteHeader (BinaryWriter writer) diff --git a/tools/common/Make.common b/tools/common/Make.common index 7d6a5e21edb3..5241cabacffd 100644 --- a/tools/common/Make.common +++ b/tools/common/Make.common @@ -5,11 +5,6 @@ $(abspath ../common/SdkVersions.cs): ../common/SdkVersions.in.cs Makefile $(TOP) -e 's/@IOS_SDK_VERSION@/$(IOS_SDK_VERSION)/g' -e 's/@TVOS_SDK_VERSION@/$(TVOS_SDK_VERSION)/' -e 's/@MACOS_SDK_VERSION@/$(MACOS_SDK_VERSION)/' \ -e 's/@MACCATALYST_SDK_VERSION@/$(MACCATALYST_SDK_VERSION)/g' \ \ - -e 's/@MIN_IOS_SDK_VERSION@/$(MIN_IOS_SDK_VERSION)/g' \ - -e 's/@MIN_TVOS_SDK_VERSION@/$(MIN_TVOS_SDK_VERSION)/' \ - -e 's/@MIN_MACOS_SDK_VERSION@/$(MIN_MACOS_SDK_VERSION)/' \ - -e 's/@MIN_MACCATALYST_SDK_VERSION@/$(MIN_MACCATALYST_SDK_VERSION)/g' \ - \ -e 's/@DOTNET_MIN_IOS_SDK_VERSION@/$(DOTNET_MIN_IOS_SDK_VERSION)/g' \ -e 's/@DOTNET_MIN_TVOS_SDK_VERSION@/$(DOTNET_MIN_TVOS_SDK_VERSION)/' \ -e 's/@DOTNET_MIN_MACOS_SDK_VERSION@/$(DOTNET_MIN_MACOS_SDK_VERSION)/' \ @@ -25,18 +20,12 @@ $(abspath ../common/SdkVersions.cs): ../common/SdkVersions.in.cs Makefile $(TOP) -e "s/@MAX_IOS_DEPLOYMENT_TARGET@/$(MAX_IOS_DEPLOYMENT_TARGET)/g" \ -e "s/@MAX_TVOS_DEPLOYMENT_TARGET@/$(MAX_TVOS_DEPLOYMENT_TARGET)/g" \ \ - -e "s/@IOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \ - -e 's/@IOS_REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g' \ -e "s/@IOS_NUGET_VERSION@/$(IOS_NUGET_VERSION)/g" \ -e "s/@IOS_NUGET_REVISION@/$(NUGET_PRERELEASE_IDENTIFIER)$(IOS_NUGET_COMMIT_DISTANCE)$(NUGET_BUILD_METADATA)/g" \ \ - -e "s/@TVOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \ - -e 's/@TVOS_REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g' \ -e "s/@TVOS_NUGET_VERSION@/$(TVOS_NUGET_VERSION)/g" \ -e "s/@TVOS_NUGET_REVISION@/$(NUGET_PRERELEASE_IDENTIFIER)$(TVOS_NUGET_COMMIT_DISTANCE)$(NUGET_BUILD_METADATA)/g" \ \ - -e "s/@MACOS_VERSION@/$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR).$(MAC_PACKAGE_VERSION_REV)/g" \ - -e 's/@MACOS_REVISION@/$(MAC_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g' \ -e "s/@MACOS_NUGET_VERSION@/$(MACOS_NUGET_VERSION)/g" \ -e "s/@MACOS_NUGET_REVISION@/$(NUGET_PRERELEASE_IDENTIFIER)$(MACOS_NUGET_COMMIT_DISTANCE)$(NUGET_BUILD_METADATA)/g" \ \ @@ -60,10 +49,6 @@ $(abspath ../common/SdkVersions.cs): ../common/SdkVersions.in.cs Makefile $(TOP) $(abspath ../common/ProductConstants.cs): ../common/ProductConstants.in.cs Makefile $(TOP)/Make.config $(GIT_DIRECTORY)/index $(Q_GEN) sed \ - -e "s/@IOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \ - -e "s/@TVOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \ - -e "s/@MACOS_VERSION@/$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR).$(MAC_PACKAGE_VERSION_REV)/g" \ - \ $(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),-e 's/@$(platform)_REVISION@/$($(platform)_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g') \ $(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),-e 's/@$(platform)_NUGET_VERSION@/$($(platform)_NUGET_VERSION)/g') \ $(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),-e "s/@$(platform)_NUGET_REVISION@/$(NUGET_PRERELEASE_IDENTIFIER)$($(platform)_NUGET_COMMIT_DISTANCE)$(NUGET_BUILD_METADATA)/g") \ diff --git a/tools/common/Optimizations.cs b/tools/common/Optimizations.cs index b6ea74fdc497..804b3257ce5d 100644 --- a/tools/common/Optimizations.cs +++ b/tools/common/Optimizations.cs @@ -262,10 +262,10 @@ public void Initialize (Application app, out List messages) OptimizeBlockLiteralSetupBlock = app.Registrar == RegistrarMode.Static || app.Registrar == RegistrarMode.ManagedStatic; } - // We will register protocols if the static registrar is enabled and loading assemblies is not possible + // We will register protocols if the static registrar is enabled if (!RegisterProtocols.HasValue) { if (app.Platform != ApplePlatform.MacOSX || app.XamarinRuntime == XamarinRuntime.NativeAOT) { - RegisterProtocols = (app.Registrar == RegistrarMode.Static || app.Registrar == RegistrarMode.ManagedStatic) && !app.UseInterpreter; + RegisterProtocols = (app.Registrar == RegistrarMode.Static || app.Registrar == RegistrarMode.ManagedStatic); } else { RegisterProtocols = false; } diff --git a/tools/common/ProductConstants.in.cs b/tools/common/ProductConstants.in.cs index 88da439fabf2..8272feab2785 100644 --- a/tools/common/ProductConstants.in.cs +++ b/tools/common/ProductConstants.in.cs @@ -20,14 +20,9 @@ sealed class ProductConstants { Version = version; Revision = revision; } -#if BUNDLER public readonly static ProductConstants iOS = new ProductConstants ("@IOS_NUGET_VERSION@", "@IOS_NUGET_REVISION@"); public readonly static ProductConstants tvOS = new ProductConstants ("@TVOS_NUGET_VERSION@", "@TVOS_NUGET_REVISION@"); public readonly static ProductConstants macOS = new ProductConstants ("@MACOS_NUGET_VERSION@", "@MACOS_NUGET_REVISION@"); -#else - public readonly static ProductConstants iOS = new ProductConstants ("@IOS_VERSION@", "@IOS_REVISION@"); - public readonly static ProductConstants tvOS = new ProductConstants ("@TVOS_VERSION@", "@TVOS_REVISION@"); - public readonly static ProductConstants macOS = new ProductConstants ("@MACOS_VERSION@", "@MACOS_REVISION@"); -#endif + public readonly static ProductConstants MacCatalyst = new ProductConstants ("@MACCATALYST_NUGET_VERSION@", "@MACCATALYST_NUGET_VERSION@"); } } diff --git a/tools/common/SdkVersions.cs b/tools/common/SdkVersions.cs index 0a146dcedcfa..f4d0e46f4ceb 100644 --- a/tools/common/SdkVersions.cs +++ b/tools/common/SdkVersions.cs @@ -25,13 +25,9 @@ static class SdkVersions { public const string MinTVOS = "12.2"; public const string MinMacCatalyst = "15.0"; - public const string DotNetMinOSX = "12.0"; public const string DotNetMiniOS = "12.2"; public const string DotNetMinTVOS = "12.2"; public const string DotNetMinMacCatalyst = "15.0"; - public const string LegacyMinOSX = "12.0"; - public const string LegacyMiniOS = "12.2"; - public const string LegacyMinTVOS = "12.2"; public const string MiniOSSimulator = "15.0"; public const string MinTVOSSimulator = "15.0"; diff --git a/tools/common/SdkVersions.in.cs b/tools/common/SdkVersions.in.cs index a505fc9ea2cc..5800f3c0e268 100644 --- a/tools/common/SdkVersions.in.cs +++ b/tools/common/SdkVersions.in.cs @@ -25,13 +25,9 @@ static class SdkVersions { public const string MinTVOS = "@DOTNET_MIN_TVOS_SDK_VERSION@"; public const string MinMacCatalyst = "@DOTNET_MIN_MACCATALYST_SDK_VERSION@"; - public const string DotNetMinOSX = "@DOTNET_MIN_MACOS_SDK_VERSION@"; public const string DotNetMiniOS = "@DOTNET_MIN_IOS_SDK_VERSION@"; public const string DotNetMinTVOS = "@DOTNET_MIN_TVOS_SDK_VERSION@"; public const string DotNetMinMacCatalyst = "@DOTNET_MIN_MACCATALYST_SDK_VERSION@"; - public const string LegacyMinOSX = "@MIN_MACOS_SDK_VERSION@"; - public const string LegacyMiniOS = "@MIN_IOS_SDK_VERSION@"; - public const string LegacyMinTVOS = "@MIN_TVOS_SDK_VERSION@"; public const string MiniOSSimulator = "@MIN_IOS_SIMULATOR_VERSION@"; public const string MinTVOSSimulator = "@MIN_TVOS_SIMULATOR_VERSION@"; diff --git a/tools/common/StaticRegistrar.cs b/tools/common/StaticRegistrar.cs index 66c14bf6bb06..2f1c90c1e31d 100644 --- a/tools/common/StaticRegistrar.cs +++ b/tools/common/StaticRegistrar.cs @@ -1360,6 +1360,9 @@ public override RegisterAttribute GetRegisterAttribute (TypeReference type) case "SkipRegistration": rv.SkipRegistration = (bool) prop.Argument.Value; break; + case "IsStubClass": + rv.IsStubClass = (bool) prop.Argument.Value; + break; default: throw ErrorHelper.CreateError (4124, Errors.MT4124_A, type.FullName, prop.Name); } @@ -2258,40 +2261,21 @@ void CheckNamespace (string ns, List exceptions) string h; switch (ns) { case "CallKit": + case "CoreHaptics": if (App.Platform == ApplePlatform.MacOSX) { - // AVFoundation can't be imported before CallKit on macOS + // AVFoundation can't be imported before CallKit or CoreHaptics on macOS // Ref: https://github.com/xamarin/maccore/issues/2301 // Ref: https://github.com/xamarin/maccore/issues/2257 + // Ref: https://github.com/xamarin/maccore/issues/2261 // The fun part is that other frameworks can import AVFoundation, so we can't check for AVFoundation specifically. - // Instead add CallKit before any other imports. + // Instead add CallKit/CoreHaptics before any other imports. var firstImport = header.StringBuilder.ToString ().IndexOf ("#import <"); if (firstImport >= 0) { - header.StringBuilder.Insert (firstImport, "#import \n"); + header.StringBuilder.Insert (firstImport, $"#import <{ns}/{ns}.h>\n"); return; } } goto default; -#if !NET || LEGACY_TOOLS - case "Chip": - switch (App.Platform) { - case ApplePlatform.iOS when App.SdkVersion.Major <= 15: - case ApplePlatform.TVOS when App.SdkVersion.Major <= 15: - case ApplePlatform.MacOSX when App.SdkVersion.Major <= 12: - case ApplePlatform.WatchOS when App.SdkVersion.Major <= 8: - h = ""; - break; - default: - // The framework has been renamed. - header.WriteLine ("@protocol CHIPDevicePairingDelegate "); - header.WriteLine ("@end"); - header.WriteLine ("@protocol CHIPKeypair "); - header.WriteLine ("@end"); - header.WriteLine ("@protocol CHIPPersistentStorageDelegate "); - header.WriteLine ("@end"); - break; - } - return; -#endif case "GLKit": // This prevents this warning: // /Applications/Xcode83.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:5:2: warning: gl.h and gl3.h are both @@ -2354,12 +2338,6 @@ void CheckNamespace (string ns, List exceptions) } } goto default; -#if !NET || LEGACY_TOOLS - case "QTKit": - if (App.Platform == ApplePlatform.MacOSX && App.SdkVersion >= MacOSTenTwelveVersion) - return; // 10.12 removed the header files for QTKit - goto default; -#endif case "IOSurface": // There is no IOSurface.h h = ""; break; @@ -2367,20 +2345,6 @@ void CheckNamespace (string ns, List exceptions) header.WriteLine ("#import "); header.WriteLine ("#import "); return; -#if !NET || LEGACY_TOOLS - case "iAd": - if (App.SdkVersion.Major >= 13) { - // most of the framework has been obliterated from the headers - header.WriteLine ("@class ADBannerView;"); - header.WriteLine ("@class ADInterstitialAd;"); - header.WriteLine ("@protocol ADBannerViewDelegate "); - header.WriteLine ("@end"); - header.WriteLine ("@protocol ADInterstitialAdDelegate "); - header.WriteLine ("@end"); - return; - } - goto default; -#endif case "ThreadNetwork": h = ""; break; @@ -2816,9 +2780,6 @@ static bool IsTypeCore (ObjCType type, string nsToMatch) return ns == nsToMatch; } -#if !NET || LEGACY_TOOLS - static bool IsQTKitType (ObjCType type) => IsTypeCore (type, "QTKit"); -#endif static bool IsMapKitType (ObjCType type) => IsTypeCore (type, "MapKit"); static bool IsIntentsType (ObjCType type) => IsTypeCore (type, "Intents"); static bool IsExternalAccessoryType (ObjCType type) => IsTypeCore (type, "ExternalAccessory"); @@ -2876,21 +2837,8 @@ List GetAllTypes (List exceptions) Driver.Log (5, "The static registrar won't generate code for {0} because its framework is not supported in the simulator.", @class.ExportedName); continue; // Some types are not supported in the simulator. } - } else { -#if !NET || LEGACY_TOOLS - if (IsQTKitType (@class) && App.SdkVersion >= MacOSTenTwelveVersion) - continue; // QTKit header was removed in 10.12 SDK -#endif } -#if !NET || LEGACY_TOOLS - // Xcode 11 removed WatchKit for iOS! - if (IsTypeCore (@class, "WatchKit") && App.Platform == Xamarin.Utils.ApplePlatform.iOS) { - exceptions.Add (ErrorHelper.CreateWarning (4178, $"The class '{@class.Type.FullName}' will not be registered because the WatchKit framework has been removed from the iOS SDK.")); - continue; - } -#endif - // Xcode 15 removed NewsstandKit if (Driver.XcodeVersion.Major >= 15) { if (IsTypeCore (@class, "NewsstandKit")) { @@ -3033,30 +2981,34 @@ void Specialize (AutoIndentStringBuilder sb, out string initialization_method) GetAssemblyQualifiedName (@class.Type), @class.ClassMapIndex, (int) flags, flags); - bool use_dynamic; - - if (@class.Type.Resolve ().Module.Assembly.Name.Name == PlatformAssembly) { - // we don't need to use the static ref to prevent the linker from removing (otherwise unreferenced) code for monotouch.dll types. - use_dynamic = true; - // be smarter: we don't need to use dynamic refs for types available in the lowest version (target deployment) we building for. - // We do need to use dynamic class lookup when the following conditions are all true: - // * The class is not available in the target deployment version. - // * The class is not in a weakly linked framework (for instance if an existing framework introduces a new class, we don't - // weakly link the framework because it already exists in the target deployment version - but since the class doesn't, we - // must use dynamic class lookup to determine if it's available or not. - } else { + bool? use_dynamic = null; + if (@class.RegisterAttribute?.IsStubClass == true) use_dynamic = false; - } - switch (@class.ExportedName) { - case "EKObject": - // EKObject's class is a private symbol, so we can't link with it... - use_dynamic = true; - break; + if (!use_dynamic.HasValue) { + if (@class.Type.Resolve ().Module.Assembly.Name.Name == PlatformAssembly) { + // we don't need to use the static ref to prevent the linker from removing (otherwise unreferenced) code for monotouch.dll types. + use_dynamic = true; + // be smarter: we don't need to use dynamic refs for types available in the lowest version (target deployment) we building for. + // We do need to use dynamic class lookup when the following conditions are all true: + // * The class is not available in the target deployment version. + // * The class is not in a weakly linked framework (for instance if an existing framework introduces a new class, we don't + // weakly link the framework because it already exists in the target deployment version - but since the class doesn't, we + // must use dynamic class lookup to determine if it's available or not. + } else { + use_dynamic = false; + } + + switch (@class.ExportedName) { + case "EKObject": + // EKObject's class is a private symbol, so we can't link with it... + use_dynamic = true; + break; + } } string get_class; - if (use_dynamic) { + if (use_dynamic == true) { get_class = string.Format ("objc_getClass (\"{0}\")", @class.ExportedName); } else { get_class = string.Format ("[{0} class]", EncodeNonAsciiCharacters (@class.ExportedName)); @@ -3111,6 +3063,9 @@ void Specialize (AutoIndentStringBuilder sb, out string initialization_method) iface.Write ("@protocol ").Write (exportedName); declarations.AppendFormat ("@protocol {0};\n", exportedName); } else { + var is_stub_class = @class.RegisterAttribute?.IsStubClass; + if (is_stub_class == true) + iface.WriteLine ("__attribute__((objc_class_stub)) __attribute__((objc_subclassing_restricted))"); iface.Write ("@interface {0} : {1}", class_name, EncodeNonAsciiCharacters (@class.SuperType.ExportedName)); declarations.AppendFormat ("@class {0};\n", class_name); } @@ -5899,6 +5854,7 @@ public RegisterAttribute (string name, bool isWrapper) public string Name { get; set; } public bool IsWrapper { get; set; } public bool SkipRegistration { get; set; } + public bool IsStubClass { get; set; } } class AdoptsAttribute : Attribute { diff --git a/tools/common/Target.cs b/tools/common/Target.cs index 0d3c4b37c43b..dbc158dabcf9 100644 --- a/tools/common/Target.cs +++ b/tools/common/Target.cs @@ -194,9 +194,7 @@ public void GatherFrameworks () // *** Makefile so simlauncher-sgen does not miss any framework HashSet processed = new HashSet (); -#if !MONOMAC Version v80 = new Version (8, 0); -#endif foreach (ModuleDefinition md in productAssembly.Modules) { foreach (TypeDefinition td in md.Types) { @@ -216,20 +214,6 @@ public void GatherFrameworks () if (Driver.GetFrameworks (App).TryGetValue (nspace, out framework)) { // framework specific processing switch (framework.Name) { -#if MONOMAC && (!NET || LEGACY_TOOLS) - case "QTKit": - // we already warn in Frameworks.cs Gather method - if (!Driver.LinkProhibitedFrameworks) - continue; - break; - case "CHIP": - // CHIP has been removed in Xcode 14 Beta 5 in favor of Matter - if (Driver.XcodeVersion.Major >= 14) { - Driver.Log (3, "Not linking with the framework {0} because it's not available when using Xcode 14+", framework.Name); - continue; - } - break; -#else case "CoreAudioKit": // CoreAudioKit seems to be functional in the iOS 9 simulator. if (App.IsSimulatorBuild && App.SdkVersion.Major < 9) @@ -257,23 +241,6 @@ public void GatherFrameworks () continue; } break; -#if !NET || !LEGACY_TOOLS - case "WatchKit": - // Xcode 11 doesn't ship WatchKit for iOS - if (Driver.XcodeVersion.Major == 11 && App.Platform == ApplePlatform.iOS) { - ErrorHelper.Warning (5219, Errors.MT5219); - continue; - } - break; - case "CHIP": - // CHIP has been removed in Xcode 14 Beta 5 in favor of Matter - if (Driver.XcodeVersion.Major >= 14) { - Driver.Log (3, "Not linking with the framework {0} because it's not available when using Xcode 14+", framework.Name); - continue; - } else if (App.IsSimulatorBuild) - continue; - break; -#endif case "GameKit": if (Driver.XcodeVersion.Major >= 14 && Is32Build) { Driver.Log (3, "Not linking with the framework {0} because it's not available when using Xcode 14+ and building for a 32-bit simulator architecture.", framework.Name); @@ -302,7 +269,6 @@ public void GatherFrameworks () continue; } break; -#endif } if (framework.Unavailable) { diff --git a/tools/compare-commits.sh b/tools/compare-commits.sh index 9d0906f85ea4..273b4846b145 100755 --- a/tools/compare-commits.sh +++ b/tools/compare-commits.sh @@ -141,10 +141,17 @@ function report_error_line () # Figure out the pull request if test -z "$BASE_HASH"; then if test -n "$PULL_REQUEST_ID"; then + echo "Computing API diff for pull request #$BLUE$PULL_REQUEST_ID$CLEAR" if test -z "$PULL_REQUEST_TARGET_BRANCH"; then - echo "${RED}--pull-request-target-branch= is required when using --pull-request${CLEAR}" - exit 1 + echo "The target branch (using --pull-request-target-branch=) was not specified, trying to compute it." + PR_FILENAME=pr-$PULL_REQUEST_ID.json + curl --silent --fail --location --connect-timeout 15 --show-error https://api.github.com/repos/xamarin/xamarin-macios/pulls/21927 -o "$PR_FILENAME" + BASE_REF=$(python3 -c 'import json,sys;print(json.load(sys.stdin)["base"]["ref"]);' < "$PR_FILENAME") + rm -f "$PR_FILENAME" + PULL_REQUEST_TARGET_BRANCH=origin/"$BASE_REF" + echo "Computed pull request target branch: $BLUE$PULL_REQUEST_TARGET_BRANCH$CLEAR" fi + git fetch --no-tags --progress -- https://github.com/xamarin/xamarin-macios +refs/pull/"$PULL_REQUEST_ID"/*:refs/remotes/origin/pr/"$PULL_REQUEST_ID"/* # The current hash is either a merge commit from GH, or the commit just before the merge commit. # However, we don't know if refs/pull/PULL_REQUEST_ID/merge or refs/pull/PULL_REQUEST_ID/head are pointing to the right place, @@ -156,22 +163,29 @@ if test -z "$BASE_HASH"; then GH_HEAD=$(git log -1 --pretty=%H refs/remotes/origin/pr/"$PULL_REQUEST_ID"/head) CURRENT_HEAD=$(git log -1 --pretty=%H HEAD) + MERGE_COMMIT_SUBJECT=$(git show refs/remotes/origin/pr/"$PULL_REQUEST_ID"/merge --pretty=%s | head -1) + echo "Computing the merge base:" + echo " GH_MERGE=$BLUE$GH_MERGE$CLEAR" + echo " CURRENT_HEAD=$BLUE$CURRENT_HEAD$CLEAR" + echo " GH_HEAD=$BLUE$GH_HEAD$CLEAR" + echo " Tip of GitHub's ${BLUE}pull/$PULL_REQUEST_ID/merge$CLEAR branch: $BLUE$MERGE_COMMIT_SUBJECT$CLEAR" + if [[ "$GH_MERGE" == "$CURRENT_HEAD" ]]; then # we're at the merge commit. MERGE_BASE=$(git merge-base "$CURRENT_HEAD^1" "$PULL_REQUEST_TARGET_BRANCH" ) - echo "1: $MERGE_BASE" + echo "We're a merge commit (1), computed merge base between $BLUE$CURRENT_HEAD^1$CLEAR and $BLUE$PULL_REQUEST_TARGET_BRANCH$CLEAR: $BLUE$MERGE_BASE$CLEAR" elif [[ "$GH_HEAD" == "$CURRENT_HEAD" ]]; then # we're at the tip of the branch MERGE_BASE=$(git merge-base "$CURRENT_HEAD" "$PULL_REQUEST_TARGET_BRANCH" ) - echo "2: $MERGE_BASE" - elif [[ "$(git show refs/remotes/origin/pr/"$PULL_REQUEST_ID"/merge --pretty=%B | xargs)" =~ ^Merge" "[a-f0-9]{40}" into "[a-f0-9]{40}$ ]]; then + echo "We're at the tip of a branch (1), computed merge base between $BLUE$CURRENT_HEAD$CLEAR and $BLUE$PULL_REQUEST_TARGET_BRANCH$CLEAR: $BLUE$MERGE_BASE$CLEAR" + elif [[ "$MERGE_COMMIT_SUBJECT" =~ ^Merge" "[a-f0-9]{40}" into "[a-f0-9]{40}$ ]]; then # we're a merge commit, get the previous commit MERGE_BASE=$(git merge-base "$CURRENT_HEAD^1" "$PULL_REQUEST_TARGET_BRANCH" ) - echo "3: $MERGE_BASE" + echo "We're a merge commit (2), computed merge base between $BLUE$CURRENT_HEAD^1$CLEAR and $BLUE$PULL_REQUEST_TARGET_BRANCH$CLEAR: $BLUE$MERGE_BASE$CLEAR" else # we're at the tip of the branch MERGE_BASE=$(git merge-base "$CURRENT_HEAD" "$PULL_REQUEST_TARGET_BRANCH" ) - echo "4: $MERGE_BASE" + echo "We're at the tip of a branch (2), computed merge base between $BLUE$CURRENT_HEAD$CLEAR and $BLUE$PULL_REQUEST_TARGET_BRANCH$CLEAR: $BLUE$MERGE_BASE$CLEAR" fi BASE_HASH=$MERGE_BASE @@ -229,11 +243,17 @@ if test -z "$SKIP_DIRTY_CHECK"; then fi fi -echo "Comparing the changes between $BLUE$BASE_HASH$CLEAR and $BLUE$CURRENT_HASH$CLEAR:" +# Resolve any treeish hash value (for instance HEAD^4) to the unique (MD5) hash +RESOLVED_BASE_HASH=$(git log -1 --pretty=%H "$BASE_HASH") + +if [[ "$RESOLVED_BASE_HASH" == "$BASE_HASH" ]]; then + echo "Comparing the changes between $BLUE$BASE_HASH$CLEAR and $BLUE$CURRENT_HASH$CLEAR:" +else + echo "Comparing the changes between $BLUE$BASE_HASH$CLEAR ($BLUE$RESOLVED_BASE_HASH$CLEAR) and $BLUE$CURRENT_HASH$CLEAR:" +fi git log "$BASE_HASH..$CURRENT_HASH" --oneline $GIT_COLOR | sed 's/^/ /' -# Resolve any treeish hash value (for instance HEAD^4) to the unique (MD5) hash -BASE_HASH=$(git log -1 --pretty=%H "$BASE_HASH") +BASE_HASH=$RESOLVED_BASE_HASH # We'll clone xamarin-macios again into a different directory, and build it @@ -269,6 +289,15 @@ if test -z "$USE_EXISTING_BUILD"; then mkdir -p "$OUTPUT_SRC_DIR" cd "$OUTPUT_SRC_DIR" + + echo " ${BLUE}Getting ADR from existing clone to avoid having to setup auth to get it again...${CLEAR}" + FILE="$ROOT_DIR/adr-path.raw" + make print-variable-value-to-file VARIABLE=ADR_PATH FILE=$FILE -C "$ROOT_DIR/tools/devops" + ADR_PATH=$(cat "$FILE") + rm -f "$FILE" + cp -cr "$ADR_PATH" . + + echo " ${BLUE}Cloning xamarin-macios...${CLEAR}" git clone https://github.com/xamarin/xamarin-macios --reference "$ROOT_DIR" 2>&1 | sed 's/^/ /' cd xamarin-macios git reset --hard "$BASE_HASH" 2>&1 | sed 's/^/ /' diff --git a/tools/devops/automation/build-pipeline.yml b/tools/devops/automation/build-pipeline.yml index 90c47f33e33c..de5ac8964149 100644 --- a/tools/devops/automation/build-pipeline.yml +++ b/tools/devops/automation/build-pipeline.yml @@ -16,15 +16,6 @@ parameters: type: string default: 'Sonoma' - - name: pool - type: string - displayName: Bot pool to use - default: automatic - values: - - pr - - ci - - automatic - - name: runGovernanceTests displayName: Run Governance Checks type: boolean @@ -172,6 +163,9 @@ variables: value: true trigger: + # because we are building for developers branches, batch the builds to use + # less resources. Otherwise, we would be building for every commit. + batch: true branches: include: - '*' @@ -233,7 +227,7 @@ extends: macOSName: ${{ parameters.macOSName }} isPR: false provisionatorChannel: ${{ parameters.provisionatorChannel }} - pool: ${{ parameters.pool }} + pool: $(CIBuildPool) runGovernanceTests: ${{ parameters.runGovernanceTests }} forceInsertion: ${{ parameters.forceInsertion }} pushNugets: ${{ parameters.pushNugets }} diff --git a/tools/devops/automation/build-pull-request.yml b/tools/devops/automation/build-pull-request.yml index 5725c0d59ea2..ee0b940d0a0c 100644 --- a/tools/devops/automation/build-pull-request.yml +++ b/tools/devops/automation/build-pull-request.yml @@ -17,15 +17,6 @@ parameters: type: string default: 'Sonoma' -- name: pool - type: string - displayName: Bot pool to use - default: automatic - values: - - pr - - ci - - automatic - - name: runGovernanceTests displayName: Run Governance Checks type: boolean @@ -158,7 +149,11 @@ variables: value: false -trigger: none +# only allow triggers from specific branches +trigger: + branches: + include: + - refs/heads/dev/* pr: autoCancel: true @@ -218,7 +213,7 @@ extends: macOSName: ${{ parameters.macOSName }} isPR: true provisionatorChannel: ${{ parameters.provisionatorChannel }} - pool: ${{ parameters.pool }} + pool: $(PRBuildPool) runGovernanceTests: ${{ parameters.runGovernanceTests }} forceInsertion: ${{ parameters.forceInsertion }} pushNugets: false diff --git a/tools/devops/automation/run-ci-api-diff.yml b/tools/devops/automation/run-ci-api-diff.yml index ae851ebf6ad8..8ccd511ab0c3 100644 --- a/tools/devops/automation/run-ci-api-diff.yml +++ b/tools/devops/automation/run-ci-api-diff.yml @@ -1,29 +1,19 @@ # Pipeline that will calculate the api diff on a ci commit. -trigger: - branches: - include: - - '*' - exclude: - - refs/heads/locfiles/* - - refs/heads/dev/* - - refs/heads/darc-* - - refs/heads/backport-pr-* - paths: - exclude: - - .github - - docs - - CODEOWNERS - - ISSUE_TEMPLATE.md - - LICENSE - - NOTICE.txt - - SECURITY.MD - - README.md - - src/README.md - - tools/mtouch/README.md - - msbuild/Xamarin.Localization.MSBuild/README.md +trigger: none +pr: none + +# we cannot use a template in a pipeline context +resources: + pipelines: + - pipeline: macios + source: \Xamarin\Mac-iOS\ci pipelines\xamarin-macios-ci + trigger: + stages: + - configure_build extends: template: templates/pipelines/api-diff-pipeline.yml parameters: isPR: false + pool: $(CIBuildPool) diff --git a/tools/devops/automation/run-pr-api-diff.yml b/tools/devops/automation/run-pr-api-diff.yml index 3b2681cf6396..42924ca932a9 100644 --- a/tools/devops/automation/run-pr-api-diff.yml +++ b/tools/devops/automation/run-pr-api-diff.yml @@ -1,27 +1,18 @@ # Pipeline that will calculate the api diff on a pr commit. trigger: none +pr: none -pr: - autoCancel: true - branches: - include: - - '*' # yes, you do need the quote, * has meaning in yamls - paths: - exclude: - - .github - - docs - - CODEOWNERS - - ISSUE_TEMPLATE.md - - LICENSE - - NOTICE.txt - - SECURITY.MD - - README.md - - src/README.md - - tools/mtouch/README.md - - msbuild/Xamarin.Localization.MSBuild/README.md +resources: + pipelines: + - pipeline: macios + source: \Xamarin\Mac-iOS\pr pipelines\xamarin-macios-pr + trigger: + stages: + - configure_build extends: template: templates/pipelines/api-diff-pipeline.yml parameters: isPR: true + pool: $(PRBuildPool) diff --git a/tools/devops/automation/scripts/GitHub.psm1 b/tools/devops/automation/scripts/GitHub.psm1 index 8e78884f7297..d9fd7f62e56f 100644 --- a/tools/devops/automation/scripts/GitHub.psm1 +++ b/tools/devops/automation/scripts/GitHub.psm1 @@ -227,6 +227,7 @@ class GitHubComments { [ValidateNotNullOrEmpty ()][string] $Repo [ValidateNotNullOrEmpty ()][string] $Token [string] $Hash + [string[]] $PRIds hidden static [string] $GitHubGraphQLEndpoint = "https://api.github.com/graphql" GitHubComments ( @@ -238,6 +239,7 @@ class GitHubComments { $this.Repo = $githubRepo $this.Token = $githubToken $this.Hash = $null + $this.PRIds = [string[]]@() } GitHubComments ( @@ -250,27 +252,33 @@ class GitHubComments { $this.Repo = $githubRepo $this.Token = $githubToken $this.Hash = $hash + $this.PRIds = Get-GitHubPRsForHash -Org $githubOrg -Repo $githubRepo -Token $githubToken -Hash $hash } - static [bool] IsPR() { - if ($Env:BUILD_REASON -eq "PullRequest") { - return $true; - } - - if (($Env:BUILD_REASON -eq "ResourceTrigger")) { - $sourceBranch = $Env:BUILD_SOURCEBRANCH - if ($sourceBranch.StartsWith("refs/pull/") -and $sourceBranch.EndsWith("/merge")) { - return $true + [bool] IsPR() { + # if the object has a list of pr ids, we are a pr, else check the resource trigger + if ($this.PRIds.Length -gt 0) { + return $true + } else { + # we might have gotten here because of the trigger type. This means that we are in a PR BUT + # we did not get the PR ids, but those can be found in the diff evirtoment vars + if ($Env:BUILD_REASON -eq "PullRequest") { + # set the PR ids to the PR we have in the VSTS env vars + $this.PRIds = @($Env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER) + return $true; } - } - return $false - } + if (($Env:BUILD_REASON -eq "ResourceTrigger")) { + $sourceBranch = $Env:BUILD_SOURCEBRANCH + if ($sourceBranch.StartsWith("refs/pull/") -and $sourceBranch.EndsWith("/merge")) { + # Set the PRs parsing the source branch + $this.PRIds = @($sourceBranch.Replace("refs/pull/", "").Replace("/merge", "")) + return $true + } + } - static [string] GetPRID() { - $buildSourceBranch = $Env:BUILD_SOURCEBRANCH - $changeId = $buildSourceBranch.Replace("refs/pull/", "").Replace("/merge", "") - return $changeId + return $false + } } [void] WriteCommentHeader( @@ -301,8 +309,9 @@ class GitHubComments { $stringBuilder.AppendLine("[Pipeline]($targetUrl) on Agent $Env:TESTS_BOT") # Env:TESTS_BOT is added by the pipeline as a variable coming from the execute tests job $hashUrl = $null $hashSource = $null - if ([GitHubComments]::IsPR()) { - $changeId = [GitHubComments]::GetPRID() + if ($this.IsPR()) { + # we should only have a single PR id, don't worry too much about it + $changeId = $this.PRIds[0] $hashUrl = "https://github.com/$($this.Org)/$($this.Repo)/pull/$changeId/commits/$($this.Hash)" $hashSource = " [PR build]" } else { @@ -325,8 +334,9 @@ class GitHubComments { [string] GetCommentUrl() { # if the build was due to PR, we want to write the comment in the PR rather than in the commit - if ([GitHubComments]::IsPR()) { - $changeId = [GitHubComments]::GetPRID() + if ($this.IsPR()) { + # we should only have a single PR id, don't worry too much about it + $changeId = $this.PRIds[0] $url = "https://api.github.com/repos/$($this.Org)/$($this.Repo)/issues/$changeId/comments" } else { if ($this.Hash) { @@ -372,17 +382,23 @@ class GitHubComments { [void] HideComments( [string] $commentId ) { + if ($this.PRIds.Length -eq 0) { + Write-Host "Not hiding comments, because we're not in a pull request" + return + } + if (!$commentId) { Write-Host "Not hiding comments, because no comment id provided" return } - if (![GitHubComments]::IsPR()) { + if (!$this.IsPR()) { Write-Host "Not hiding comments, because we're not in a pull request" return } - $prId = "$Env:BUILD_SOURCEBRANCH".Replace("refs/pull/", "").Replace("/merge", "") + # we should only have a single pr id, don't worry too much about it + $prId = $this.PRIds[0] $prComments = $this.GetCommentsForPR($prId) $botComments = [System.Collections.ArrayList]@() @@ -833,6 +849,69 @@ function Get-GitHubPRInfo { return $request } +<# + .SYNOPSIS + Get the PR Ids related to a commit hash. If the hash has multiple PRs, all of them will be returned. + If the commit has landed in main, the PRs will be empty. + + .PARAMETER Org + The organization that owns the repository. + + .PARAMETER Repo + The repository where the commit is located. + + .PARAMETER Token + The token to be used to authenticate with the GitHub API. + + .PARAMETER Hash + The hash of the commit whose PRs we want to retrieve. +#> +function Get-GitHubPRsForHash { + param ( + [String] + $Org, + + [String] + $Repo, + + [string] + $Token, + + [Parameter(Mandatory)] + [String] + $Hash + ) + + Write-Host "Getting related PR ids for commit $Hash" + + if ($Org -and $Repo) { + $url = "https://api.github.com/repos/$($Org)/$($Repo)/commits/$Hash/pulls" + } else { + $url = "https://api.github.com/repos/$Env:BUILD_REPOSITORY_NAME/commits/$Hash/pulls" + } + + if (-not $Token) { + $Token = $Env:GITHUB_TOKEN + } + + $headers = @{ + Authorization = ("token {0}" -f $Token); + } + + $request = Invoke-Request -Request { Invoke-RestMethod -Uri $url -Method "GET" -ContentType 'application/json' -Headers $headers } + Write-Host "Request result: $request" + + # loop over the result and remove all the extra noise we are not interested in + $prs = [System.Collections.ArrayList]@() + foreach ($prInfo in $request) { + $number = $prInfo.number + Write-Host "Found PR #$number for commit $hash" + $prs.Add($number) > $null + } + Write-Host "Found $($prs.Count) PRs for commit $hash" + return $prs +} + <# .SYNOPSIS Class used to represent a single file to be added to a gist. @@ -1088,6 +1167,7 @@ function Convert-Markdown { # module exports, any other functions are private and should not be used outside the module. Export-ModuleMember -Function New-GitHubComment Export-ModuleMember -Function Get-GitHubPRInfo +Export-ModuleMember -Function Get-GitHubPRsForHash Export-ModuleMember -Function New-GistWithFiles Export-ModuleMember -Function New-GistObjectDefinition Export-ModuleMember -Function New-GistWithContent diff --git a/tools/devops/automation/scripts/VSTS.psm1 b/tools/devops/automation/scripts/VSTS.psm1 index 10e51bd062d2..0a6821034089 100644 --- a/tools/devops/automation/scripts/VSTS.psm1 +++ b/tools/devops/automation/scripts/VSTS.psm1 @@ -255,7 +255,8 @@ class BuildConfiguration { "BUILD_REPOSITORY_PROVIDER", "BUILD_REPOSITORY_URI", "BUILD_SOURCEBRANCH", - "BUILD_SOURCEBRANCHNAME" + "BUILD_SOURCEBRANCHNAME", + "BUILD_SOURCEVERSION" ) <# @@ -312,7 +313,7 @@ class BuildConfiguration { [void] SetLabelsFromPR ([PSCustomObject] $prInfo, [bool]$isPR) { if ($prInfo) { - Write-Deubg "Setting VSTS labels from $($prInfo.labels)" + Write-Debug "Setting VSTS labels from $($prInfo.labels)" foreach ($l in [BuildConfiguration]::labelsOfInterest) { $labelPresent = 1 -eq ($prInfo.labels | Where-Object { $_.name -eq "$l"}).Count # We need to replace dashes with underscores, because bash can't access an environment variable with a dash in the name. @@ -335,29 +336,42 @@ class BuildConfiguration { .SYNOPSIS Retrieve the change id and export it as an enviroment variable. #> - [string] ExportChangeId ([object] $configuration) { + [string] ExportPRId ([object] $configuration) { # This is an interesting step, we do know we are dealing with a PR, but we need the PR id to # be able to get the labels, the buildSourceBranch follows the pattern: refs/pull/{ChangeId}/merge # we could use a regexp but then we would have two problems instead of one - $changeId = $null + $prId = $null if ($configuration.PARENT_BUILD_BUILD_SOURCEBRANCH) { - # use the source branch information from the configuration object - $changeId = $configuration.PARENT_BUILD_BUILD_SOURCEBRANCH.Replace("refs/pull/", "").Replace("/merge", "") - } else { - Write-Debug "Retrieving change id from the environment since it could not be found in the config." - # retrieve the change ide form the BUILD_SOURCEBRANCH enviroment variable. - $changeId = "$Env:BUILD_SOURCEBRANCH".Replace("refs/pull/", "").Replace("/merge", "") + # there are two possible situations, the build is a PR manually triggered or a PR triggered by a commit to a + # dev/* branch. In the first case we can get the PR id from the source branch, in the second case we need to + # get the PR id associated to the current commit. + if ($configuration.PARENT_BUILD_BUILD_SOURCEBRANCH.StartsWith("refs/pull")) { + Write-Host "Getting the change id from the parent build source branch" + $prId = $configuration.PARENT_BUILD_BUILD_SOURCEBRANCH.Replace("refs/pull/", "").Replace("/merge", "") + } elseif ($Env:BUILD_SOURCEBRANCH.StartsWith("refs/pull")) { + Write-Host "Getting the change id from the current build source branch" + $prId = "$Env:BUILD_SOURCEBRANCH".Replace("refs/pull/", "").Replace("/merge", "") + } else { + Write-Host "Getting the change id from the current build source version with the Github API" + # use the github command to retrieve the associate PR id + $prIDs = Get-GitHubPRsForHash -Hash $configuration.PARENT_BUILD_BUILD_SOURCEVERSION + Write-Host "PR IDs: $prIDs" + if ($prIDs.Length -gt 0) { + $prId = $prIDs[0] + } + } } # we can always fail (regexp error or not env varaible) - if ($changeId) { + if ($prId) { # add a var with the change id, which can be later consumed by some of the old scripts from # jenkins - Write-Host "##vso[task.setvariable variable=pr_number;isOutput=true]$changeId" + Write-Host "##vso[task.setvariable variable=pr_number;isOutput=true]$prId" } else { Write-Debug "Not setting the change id because it could not be calculated." } - return $changeId + Write-Host "Change id: $prId" + return $prId } [PSCustomObject] Import([string] $configFile) { @@ -507,12 +521,12 @@ class BuildConfiguration { $tags.Add("cronjob") } - if ($configuration.BuildReason -eq "PullRequest" -or (($configuration.BuildReason -eq "Manual") -and ($configuration.PARENT_BUILD_BUILD_SOURCEBRANCH -eq "merge")) ) { + if ($configuration.PARENT_BUILD_BUILD_SOURCEBRANCH.StartsWith("refs/heads/dev/") -or $configuration.BuildReason -eq "PullRequest" -or (($configuration.BuildReason -eq "Manual") -and ($configuration.PARENT_BUILD_BUILD_SOURCEBRANCH -eq "merge")) ) { Write-Host "Configuring build from PR." # retrieve the PR data to be able to fwd the labels from github - $changeId = $this.ExportChangeId($configuration) - $prInfo = Get-GitHubPRInfo -ChangeId $changeId + $prId = $this.ExportPRId($configuration) + $prInfo = Get-GitHubPRInfo -ChangeId $prId Write-Host $prInfo # make peoples life better, loop over the labels and add them as tags in the vsts build diff --git a/tools/devops/automation/scripts/bash/compare.sh b/tools/devops/automation/scripts/bash/compare.sh index 70174d8c92c0..5cf5164308b5 100755 --- a/tools/devops/automation/scripts/bash/compare.sh +++ b/tools/devops/automation/scripts/bash/compare.sh @@ -25,31 +25,15 @@ if test -z "$PR_ID"; then PR_ID=$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER fi -# Figure out the base hash we want to compare against -if [[ $PR_ID ]]; then - git fetch --no-tags --progress "https://github.com/$BUILD_REPOSITORY_NAME" +refs/pull/"$PR_ID"/*:refs/remotes/origin/pr/"$PR_ID"/* - - # Compute the correct base hash to use for comparison by getting the merge base between the target branch and the commit we're building. - if MERGE_BASE=$(git merge-base "$SYSTEM_PULLREQUEST_SOURCECOMMITID" "refs/remotes/origin/$SYSTEM_PULLREQUEST_TARGETBRANCH"); then - if test -n "$MERGE_BASE"; then - echo "Computed merge base: $MERGE_BASE" - BASE=$MERGE_BASE - fi - fi -fi -if test -z "$BASE"; then - if test -z "$PR_ID"; then - BASE=HEAD^1 - else - BASE="origin/pr/$PR_ID/merge^1" - fi -fi - mkdir -p "$CHANGE_DETECTION_RESULTS_DIR" # We always want to zip up (and later upload) whatever's in the results directory, so store the exit code here, and then exit with it later. RC=0 -./tools/compare-commits.sh --base="$BASE" "--output-dir=$CHANGE_DETECTION_OUTPUT_DIR" || RC=$? +if [[ $PR_ID ]]; then + ./tools/compare-commits.sh "--output-dir=$CHANGE_DETECTION_OUTPUT_DIR" --pull-request="$PR_ID"|| RC=$? +else + ./tools/compare-commits.sh "--output-dir=$CHANGE_DETECTION_OUTPUT_DIR" || RC=$? +fi if test -d "$CHANGE_DETECTION_OUTPUT_DIR"; then rm -f "$CHANGE_DETECTION_OUTPUT_DIR/change-detection.zip" diff --git a/tools/devops/automation/templates/api-diff-stage.yml b/tools/devops/automation/templates/api-diff-stage.yml index 295e018dd15d..1db68ce3e822 100644 --- a/tools/devops/automation/templates/api-diff-stage.yml +++ b/tools/devops/automation/templates/api-diff-stage.yml @@ -6,11 +6,6 @@ parameters: - name: pool type: string - default: automatic - values: - - pr - - ci - - automatic - name: isPR type: boolean @@ -37,21 +32,6 @@ stages: displayName: 'Configure' jobs: - - ${{ if eq(parameters.pool, 'automatic') }}: - - job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml - pool: # Consider using an agentless (server) job here, but would need to host selection logic as an Azure function: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#server - vmImage: ubuntu-latest - steps: - - checkout: none # https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#checkout - - # Selects appropriate agent pool based on trigger type (PR or CI); manually triggered builds target the PR pool - - template: azure-devops-pools/agent-pool-selector.yml@yaml-templates - parameters: - agentPoolPR: $(PRBuildPool) - agentPoolPRUrl: $(PRBuildPoolUrl) - agentPoolCI: $(CIBuildPool) - agentPoolCIUrl: $(CIBuildPoolUrl) - - job: configure displayName: 'Configure build' pool: diff --git a/tools/devops/automation/templates/build/api-diff-stage.yml b/tools/devops/automation/templates/build/api-diff-stage.yml index 846cea9570df..cccf1d5ac166 100644 --- a/tools/devops/automation/templates/build/api-diff-stage.yml +++ b/tools/devops/automation/templates/build/api-diff-stage.yml @@ -40,18 +40,12 @@ jobs: displayName: 'Detect API changes' timeoutInMinutes: 1000 variables: - ${{ if eq(parameters.pool, 'automatic') }}: - AgentPoolComputed: $[ stageDependencies.configure_build.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ] - ${{ if eq(parameters.pool, 'ci') }}: - AgentPoolComputed: $(CIBuildPool) - ${{ if eq(parameters.pool, 'pr') }}: - AgentPoolComputed: $(PRBuildPool) PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ] # set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ] pool: - name: $(AgentPoolComputed) + name: ${{ parameters.pool }} demands: - Agent.OS -equals Darwin - macOS.Name -equals ${{ parameters.macOSName }} diff --git a/tools/devops/automation/templates/build/build-mac-tests-stage.yml b/tools/devops/automation/templates/build/build-mac-tests-stage.yml index 1d3310e3dfe8..db5ade9fc13d 100644 --- a/tools/devops/automation/templates/build/build-mac-tests-stage.yml +++ b/tools/devops/automation/templates/build/build-mac-tests-stage.yml @@ -42,12 +42,6 @@ jobs: timeoutInMinutes: 180 variables: DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ] - ${{ if eq(parameters.pool, 'automatic') }}: - AgentPoolComputed: $[ stageDependencies.configure_build.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ] - ${{ if eq(parameters.pool, 'ci') }}: - AgentPoolComputed: $(CIBuildPool) - ${{ if eq(parameters.pool, 'pr') }}: - AgentPoolComputed: $(PRBuildPool) # add all the variables that have been parsed by the configuration step. Could we have a less verbose way?? # old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ] @@ -57,7 +51,7 @@ jobs: condition: ne(stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'],'') pool: os: macOS - name: $(AgentPoolComputed) + name: ${{ parameters.pool }} demands: - Agent.OS -equals Darwin - macOS.Name -equals ${{ parameters.macOSName }} diff --git a/tools/devops/automation/templates/build/build-stage.yml b/tools/devops/automation/templates/build/build-stage.yml index 2cf94db56128..d06f0d82d420 100644 --- a/tools/devops/automation/templates/build/build-stage.yml +++ b/tools/devops/automation/templates/build/build-stage.yml @@ -46,12 +46,6 @@ jobs: INCLUDE_DOTNET_MACCATALYST: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACCATALYST'] ] INCLUDE_DOTNET_MACOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACOS'] ] INCLUDE_DOTNET_TVOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_TVOS'] ] - ${{ if eq(parameters.pool, 'automatic') }}: - AgentPoolComputed: $[ stageDependencies.configure_build.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ] - ${{ if eq(parameters.pool, 'ci') }}: - AgentPoolComputed: $(CIBuildPool) - ${{ if eq(parameters.pool, 'pr') }}: - AgentPoolComputed: $(PRBuildPool) # add all the variables that have been parsed by the configuration step. Could we have a less verbose way?? # # build-package @@ -71,7 +65,7 @@ jobs: RUN_MAC_TESTS: $[ stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'] ] pool: os: macOS - name: $(AgentPoolComputed) + name: ${{ parameters.pool }} demands: - Agent.OS -equals Darwin - macOS.Name -equals ${{ parameters.macOSName }} diff --git a/tools/devops/automation/templates/common/checkout.yml b/tools/devops/automation/templates/common/checkout.yml index 4f17c49ef746..d19226c57c35 100644 --- a/tools/devops/automation/templates/common/checkout.yml +++ b/tools/devops/automation/templates/common/checkout.yml @@ -23,11 +23,13 @@ steps: path: s/$(BUILD_REPOSITORY_TITLE) fetchTags: false -- pwsh: ./undo_github_merge.ps1 -SourceBranch "$(Build.SourceBranch)" -IsPr "${{ parameters.isPR }}" +- pwsh: ./undo_github_merge.ps1 -SourceBranch "$(Build.SourceBranch)" -IsPr "$Env:IS_PR" name: fix_commit displayName: "Undo Github merge" workingDirectory: $(System.DefaultWorkingDirectory)/$(BUILD_REPOSITORY_TITLE)/tools/devops/automation/scripts timeoutInMinutes: 15 + env: + IS_PR: and(eq(parameters.isPR, 'true'), not(startsWith(variables['Build.SourceBranch'], 'refs/pull'))) - checkout: maccore clean: true diff --git a/tools/devops/automation/templates/main-stage.yml b/tools/devops/automation/templates/main-stage.yml index 8a4f39f018f9..446b67dcb94b 100644 --- a/tools/devops/automation/templates/main-stage.yml +++ b/tools/devops/automation/templates/main-stage.yml @@ -6,11 +6,6 @@ parameters: - name: pool type: string - default: automatic - values: - - pr - - ci - - automatic - name: runGovernanceTests type: boolean @@ -175,22 +170,6 @@ stages: ${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}: condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}') jobs: - - ${{ if eq(parameters.pool, 'automatic') }}: - - job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml - pool: # Consider using an agentless (server) job here, but would need to host selection logic as an Azure function: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#server - name: AzurePipelines-EO - demands: - - ImageOverride -equals 1ESPT-Windows2022 - steps: - - checkout: none # https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#checkout - - # Selects appropriate agent pool based on trigger type (PR or CI); manually triggered builds target the PR pool - - template: azure-devops-pools/agent-pool-selector.yml@yaml-templates - parameters: - agentPoolPR: $(PRBuildPool) - agentPoolPRUrl: $(PRBuildPoolUrl) - agentPoolCI: $(CIBuildPool) - agentPoolCIUrl: $(CIBuildPoolUrl) - job: configure displayName: 'Configure build' diff --git a/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml b/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml index 4d502cb224cf..991def1ca58b 100644 --- a/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml +++ b/tools/devops/automation/templates/pipelines/api-diff-pipeline.yml @@ -16,11 +16,6 @@ parameters: - name: pool type: string displayName: Bot pool to use - default: automatic - values: - - pr - - ci - - automatic - name: isPR displayName: Is PR build diff --git a/tools/devops/automation/templates/pipelines/run-api-scan.yml b/tools/devops/automation/templates/pipelines/run-api-scan.yml index 6211e710403e..d8d3f73a3745 100644 --- a/tools/devops/automation/templates/pipelines/run-api-scan.yml +++ b/tools/devops/automation/templates/pipelines/run-api-scan.yml @@ -91,22 +91,6 @@ stages: - stage: configure_build displayName: 'Configure' jobs: - - - ${{ if eq(parameters.pool, 'automatic') }}: - - job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml - pool: # Consider using an agentless (server) job here, but would need to host selection logic as an Azure function: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#server - vmImage: ubuntu-latest - steps: - - checkout: none # https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#checkout - - # Selects appropriate agent pool based on trigger type (PR or CI); manually triggered builds target the PR pool - - template: azure-devops-pools/agent-pool-selector.yml@yaml-templates - parameters: - agentPoolPR: $(PRBuildPool) - agentPoolPRUrl: $(PRBuildPoolUrl) - agentPoolCI: $(CIBuildPool) - agentPoolCIUrl: $(CIBuildPoolUrl) - - job: configure displayName: 'Configure build' pool: diff --git a/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml b/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml index 4080f9e1188c..b87e0def11af 100644 --- a/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml +++ b/tools/devops/automation/templates/pipelines/run-tests-pipeline.yml @@ -16,15 +16,6 @@ parameters: type: string default: 'Sonoma' - - name: pool - type: string - displayName: Bot pool to use - default: automatic - values: - - pr - - ci - - automatic - - name: runTests displayName: Run Simulator Tests type: boolean @@ -114,7 +105,6 @@ stages: macOSName: ${{ parameters.macOSName }} isPR: ${{ parameters.isPR }} provisionatorChannel: ${{ parameters.provisionatorChannel }} - pool: ${{ parameters.pool }} runTests: ${{ parameters.runTests }} runDeviceTests: ${{ parameters.runDeviceTests }} runWindowsIntegration: ${{ parameters.runWindowsIntegration }} diff --git a/tools/devops/automation/templates/tests-stage.yml b/tools/devops/automation/templates/tests-stage.yml index 951605b7ccb2..481ac2fba5d8 100644 --- a/tools/devops/automation/templates/tests-stage.yml +++ b/tools/devops/automation/templates/tests-stage.yml @@ -4,14 +4,6 @@ parameters: type: string default: 'latest' -- name: pool - type: string - default: automatic - values: - - pr - - ci - - automatic - - name: runTests type: boolean default: true @@ -170,21 +162,6 @@ stages: condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}') jobs: - - ${{ if eq(parameters.pool, 'automatic') }}: - - job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml - pool: # Consider using an agentless (server) job here, but would need to host selection logic as an Azure function: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#server - vmImage: ubuntu-latest - steps: - - checkout: none # https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#checkout - - # Selects appropriate agent pool based on trigger type (PR or CI); manually triggered builds target the PR pool - - template: azure-devops-pools/agent-pool-selector.yml@yaml-templates - parameters: - agentPoolPR: $(PRBuildPool) - agentPoolPRUrl: $(PRBuildPoolUrl) - agentPoolCI: $(CIBuildPool) - agentPoolCIUrl: $(CIBuildPoolUrl) - - job: configure displayName: 'Configure build' pool: @@ -218,7 +195,7 @@ stages: supportedPlatforms: ${{ parameters.supportedPlatforms }} stageName: 'simulator_tests' displayName: '${{ parameters.stageDisplayNamePrefix }}Simulator tests' - testPool: '' # use the default + testPool: $(PRBuildPool) statusContext: 'VSTS: simulator tests' makeTarget: 'jenkins' vsdropsPrefix: ${{ variables.vsdropsPrefix }} diff --git a/tools/devops/automation/templates/tests/stage.yml b/tools/devops/automation/templates/tests/stage.yml index 89f4d67de919..701b9d5fa6e1 100644 --- a/tools/devops/automation/templates/tests/stage.yml +++ b/tools/devops/automation/templates/tests/stage.yml @@ -100,12 +100,8 @@ stages: BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ] DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ] - ${{ if eq(parameters.testPool, '') }}: - AgentPoolComputed: $(PRBuildPool) - ${{ else }}: - AgentPoolComputed: ${{ parameters.testPool }} pool: - name: $(AgentPoolComputed) + name: ${{ parameters.testPool }} demands: - Agent.OS -equals Darwin - macOS.Name -equals ${{ parameters.macOSName }} diff --git a/tools/governance/cgmanifest.json b/tools/governance/cgmanifest.json index 62660fac08a3..cca41afae872 100644 --- a/tools/governance/cgmanifest.json +++ b/tools/governance/cgmanifest.json @@ -1,16 +1,6 @@ { "$schema": "https://json.schemastore.org/component-detection-manifest.json", "Registrations": [ - { - "Component": { - "Type": "git", - "Git": { - "RepositoryUrl": "https://github.com/spouliot/Touch.Unit.git", - "CommitHash": "89afaf7e05a942c87231cf5601b3a5b59640e218" - } - }, - "DevelopmentDependency": true - }, { "Component": { "Type": "git", diff --git a/tools/linker/ObjCExtensions.cs b/tools/linker/ObjCExtensions.cs index efcdc9ed3ff4..08856a76a6aa 100644 --- a/tools/linker/ObjCExtensions.cs +++ b/tools/linker/ObjCExtensions.cs @@ -15,9 +15,6 @@ static class Namespaces { public const string AVFoundation = nameof (AVFoundation); public const string AVKit = nameof (AVKit); public const string AVRouting = nameof (AVRouting); -#if !NET - public const string Chip = nameof (Chip); -#endif public const string Cinematic = nameof (Cinematic); public const string CloudKit = nameof (CloudKit); public const string Contacts = nameof (Contacts); @@ -70,9 +67,6 @@ static class Namespaces { public const string Photos = nameof (Photos); public const string PhotosUI = nameof (PhotosUI); public const string PrintCore = nameof (PrintCore); -#if !NET - public const string QTKit = nameof (QTKit); -#endif public const string QuartzComposer = nameof (QuartzComposer); public const string Registrar = nameof (Registrar); public const string SceneKit = nameof (SceneKit); diff --git a/tools/linker/RemoveUserResourcesSubStep.cs b/tools/linker/RemoveUserResourcesSubStep.cs index 96da535e5e20..712b67f58b37 100644 --- a/tools/linker/RemoveUserResourcesSubStep.cs +++ b/tools/linker/RemoveUserResourcesSubStep.cs @@ -11,17 +11,12 @@ using Xamarin.Bundler; using Xamarin.Utils; +#nullable enable + namespace Xamarin.Linker { public class RemoveUserResourcesSubStep : ExceptionalSubStep { - - const string iOS_Content = "__monotouch_content_"; - const string iOS_Page = "__monotouch_page_"; - const string Mac_Content = "__xammac_content_"; - const string Mac_Page = "__xammac_page_"; - - string Content; - string Page; + string [] prefixes = Array.Empty (); public override SubStepTargets Targets { get { return SubStepTargets.Assembly; } @@ -41,12 +36,18 @@ public override void Initialize (LinkContext context) case ApplePlatform.TVOS: case ApplePlatform.WatchOS: case ApplePlatform.MacCatalyst: - Content = iOS_Content; - Page = iOS_Page; + prefixes = new string [] { + "__monotouch_content_", + "__monotouch_page_", + "__monotouch_item_", + }; break; case ApplePlatform.MacOSX: - Content = Mac_Content; - Page = Mac_Page; + prefixes = new string [] { + "__xammac_content_", + "__xammac_page_", + "__xammac_item_", + }; break; default: Report (ErrorHelper.CreateError (71, Errors.MX0071, LinkContext.App.Platform, LinkContext.App.ProductName)); @@ -63,7 +64,7 @@ protected override void Process (AssemblyDefinition assembly) if (!module.HasResources) return; - HashSet libraries = null; + HashSet? libraries = null; if (assembly.HasCustomAttributes) { foreach (var ca in assembly.CustomAttributes) { if (!ca.AttributeType.Is ("ObjCRuntime", "LinkWithAttribute")) @@ -104,16 +105,15 @@ bool IsMonoTouchResource (string resourceName) if (Simulator) return false; - if (resourceName.StartsWith (Content, StringComparison.OrdinalIgnoreCase)) - return true; - - if (resourceName.StartsWith (Page, StringComparison.OrdinalIgnoreCase)) - return true; + foreach (var prefix in prefixes) { + if (resourceName.StartsWith (prefix, StringComparison.OrdinalIgnoreCase)) + return true; + } return false; } - static bool IsNativeLibrary (string resourceName, HashSet libraries) + static bool IsNativeLibrary (string resourceName, HashSet? libraries) { if (libraries is null) return false; diff --git a/tools/mmp/Makefile b/tools/mmp/Makefile index 2f0fd9206884..666a7cc261d9 100644 --- a/tools/mmp/Makefile +++ b/tools/mmp/Makefile @@ -69,10 +69,10 @@ Microsoft.macOS.registrar.coreclr.arm64.m: $(TOP)/src/build/dotnet/macos/64/Micr $(Q) touch $@ $(basename $@).h %.x86_64.a: %.x86_64.m - $(Q_CC) $(CLANG) -isysroot $(macos_SDK) -DDEBUG -g -gdwarf-2 -x objective-c++ -std=c++14 -o $@ -c -arch x86_64 $< -Wall -Wno-unguarded-availability-new -I$(TOP)/runtime -mmacosx-version-min=$(MIN_MACOS_SDK_VERSION) -fobjc-runtime=macosx $(EXTRA_DEFINES) + $(Q_CC) $(CLANG) -isysroot $(macos_SDK) -DDEBUG -g -gdwarf-2 -x objective-c++ -std=c++14 -o $@ -c -arch x86_64 $< -Wall -Wno-unguarded-availability-new -I$(TOP)/runtime -mmacosx-version-min=$(DOTNET_MIN_MACOS_SDK_VERSION) -fobjc-runtime=macosx $(EXTRA_DEFINES) %.arm64.a: %.arm64.m - $(Q_CC) $(CLANG) -isysroot $(macos_SDK) -DDEBUG -g -gdwarf-2 -x objective-c++ -std=c++14 -o $@ -c -arch arm64 $< -Wall -Wno-unguarded-availability-new -I$(TOP)/runtime -mmacosx-version-min=$(MIN_MACOS_SDK_VERSION) -fobjc-runtime=macosx $(EXTRA_DEFINES) + $(Q_CC) $(CLANG) -isysroot $(macos_SDK) -DDEBUG -g -gdwarf-2 -x objective-c++ -std=c++14 -o $@ -c -arch arm64 $< -Wall -Wno-unguarded-availability-new -I$(TOP)/runtime -mmacosx-version-min=$(DOTNET_MIN_MACOS_SDK_VERSION) -fobjc-runtime=macosx $(EXTRA_DEFINES) dotnet: $(MMP_TARGETS_DOTNET) ifdef INCLUDE_MAC diff --git a/tools/mtouch/Makefile b/tools/mtouch/Makefile index ebde0cf10fe4..ca9f21d8d9ff 100644 --- a/tools/mtouch/Makefile +++ b/tools/mtouch/Makefile @@ -27,8 +27,8 @@ $(LOCAL_MTOUCH): $(mtouch_dependencies) $(abspath Constants.cs): Constants.cs.in Makefile $(TOP)/Make.config.inc $(Q_GEN) sed \ - -e "s/@VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \ - -e 's/@REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g' \ + -e "s/@VERSION@/$(IOS_NUGET_VERSION_MAJOR).$(IOS_NUGET_VERSION_MINOR).$(IOS_NUGET_VERSION_PATCH)/g" \ + -e 's/@REVISION@/$(IOS_NUGET_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g' \ $< > $@ # # Partial static registrar libraries