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:
-
+ 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}{prop.Name}>");
+}
+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